@atlas-viewer/atlas 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.global.js +8 -8
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";var AtlasViewer=(()=>{var nE=Object.create;var ks=Object.defineProperty;var rE=Object.getOwnPropertyDescriptor;var iE=Object.getOwnPropertyNames;var oE=Object.getPrototypeOf,sE=Object.prototype.hasOwnProperty;var lE=(e,t,n)=>t in e?ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),aE=(e,t)=>{for(var n in t)ks(e,n,{get:t[n],enumerable:!0})},Qg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of iE(t))!sE.call(e,s)&&s!==n&&ks(e,s,{get:()=>t[s],enumerable:!(r=rE(t,s))||r.enumerable});return e};var Y=(e,t,n)=>(n=e!=null?nE(oE(e)):{},Qg(t||!e||!e.__esModule?ks(n,"default",{value:e,enumerable:!0}):n,e)),uE=e=>Qg(ks({},"__esModule",{value:!0}),e);var v=(e,t,n)=>(lE(e,typeof t!="symbol"?t+"":t,n),n);var fv=mt((fT,hv)=>{"use strict";var lv=!1,zi,sh,lh,Va,Qa,av,Ga,ah,uh,ch,uv,dh,hh,cv,dv;function Dt(){if(!lv){lv=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(dh=/\b(iPhone|iP[ao]d)/.exec(e),hh=/\b(iP[ao]d)/.exec(e),ch=/Android/i.exec(e),cv=/FBAN\/\w+;/i.exec(e),dv=/Mobile/i.exec(e),uv=!!/Win64/.exec(e),t){zi=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,zi&&document&&document.documentMode&&(zi=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);av=r?parseFloat(r[1])+4:zi,sh=t[2]?parseFloat(t[2]):NaN,lh=t[3]?parseFloat(t[3]):NaN,Va=t[4]?parseFloat(t[4]):NaN,Va?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Qa=t&&t[1]?parseFloat(t[1]):NaN):Qa=NaN}else zi=sh=lh=Qa=Va=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Ga=s?parseFloat(s[1].replace("_",".")):!0}else Ga=!1;ah=!!n[2],uh=!!n[3]}else Ga=ah=uh=!1}}var fh={ie:function(){return Dt()||zi},ieCompatibilityMode:function(){return Dt()||av>zi},ie64:function(){return fh.ie()&&uv},firefox:function(){return Dt()||sh},opera:function(){return Dt()||lh},webkit:function(){return Dt()||Va},safari:function(){return fh.webkit()},chrome:function(){return Dt()||Qa},windows:function(){return Dt()||ah},osx:function(){return Dt()||Ga},linux:function(){return Dt()||uh},iphone:function(){return Dt()||dh},mobile:function(){return Dt()||dh||hh||ch||dv},nativeApp:function(){return Dt()||cv},android:function(){return Dt()||ch},ipad:function(){return Dt()||hh}};hv.exports=fh});var mv=mt((pT,pv)=>{"use strict";var Xa=!!(typeof window<"u"&&window.document&&window.document.createElement),wE={canUseDOM:Xa,canUseWorkers:typeof Worker<"u",canUseEventListeners:Xa&&!!(window.addEventListener||window.attachEvent),canUseViewport:Xa&&!!window.screen,isInWorker:!Xa};pv.exports=wE});var wv=mt((mT,yv)=>{"use strict";var gv=mv(),vv;gv.canUseDOM&&(vv=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function SE(e,t){if(!gv.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var s=document.createElement("div");s.setAttribute(n,"return;"),r=typeof s[n]=="function"}return!r&&vv&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}yv.exports=SE});var kv=mt((gT,Pv)=>{"use strict";var xE=fv(),EE=wv(),Sv=10,xv=40,Ev=800;function _v(e){var t=0,n=0,r=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*Sv,s=n*Sv,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||s)&&e.deltaMode&&(e.deltaMode==1?(r*=xv,s*=xv):(r*=Ev,s*=Ev)),r&&!t&&(t=r<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:s}}_v.getEventType=function(){return xE.firefox()?"DOMMouseScroll":EE("wheel")?"wheel":"mousewheel"};Pv.exports=_v});var Tv=mt((vT,Cv)=>{"use strict";Cv.exports=kv()});var Uv=mt(oe=>{"use strict";var Fs=Symbol.for("react.element"),PE=Symbol.for("react.portal"),kE=Symbol.for("react.fragment"),CE=Symbol.for("react.strict_mode"),TE=Symbol.for("react.profiler"),RE=Symbol.for("react.provider"),zE=Symbol.for("react.context"),IE=Symbol.for("react.forward_ref"),LE=Symbol.for("react.suspense"),NE=Symbol.for("react.memo"),OE=Symbol.for("react.lazy"),Ov=Symbol.iterator;function FE(e){return e===null||typeof e!="object"?null:(e=Ov&&e[Ov]||e["@@iterator"],typeof e=="function"?e:null)}var Av={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dv=Object.assign,Wv={};function yo(e,t,n){this.props=e,this.context=t,this.refs=Wv,this.updater=n||Av}yo.prototype.isReactComponent={};yo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bv(){}Bv.prototype=yo.prototype;function mh(e,t,n){this.props=e,this.context=t,this.refs=Wv,this.updater=n||Av}var gh=mh.prototype=new Bv;gh.constructor=mh;Dv(gh,yo.prototype);gh.isPureReactComponent=!0;var Fv=Array.isArray,jv=Object.prototype.hasOwnProperty,vh={current:null},bv={key:!0,ref:!0,__self:!0,__source:!0};function Hv(e,t,n){var r,s={},l=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(l=""+t.key),t)jv.call(t,r)&&!bv.hasOwnProperty(r)&&(s[r]=t[r]);var h=arguments.length-2;if(h===1)s.children=n;else if(1<h){for(var f=Array(h),g=0;g<h;g++)f[g]=arguments[g+2];s.children=f}if(e&&e.defaultProps)for(r in h=e.defaultProps,h)s[r]===void 0&&(s[r]=h[r]);return{$$typeof:Fs,type:e,key:l,ref:u,props:s,_owner:vh.current}}function ME(e,t){return{$$typeof:Fs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fs}function AE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mv=/\/+/g;function ph(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AE(""+e.key):t.toString(36)}function Za(e,t,n,r,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var u=!1;if(e===null)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case Fs:case PE:u=!0}}if(u)return u=e,s=s(u),e=r===""?"."+ph(u,0):r,Fv(s)?(n="",e!=null&&(n=e.replace(Mv,"$&/")+"/"),Za(s,t,n,"",function(g){return g})):s!=null&&(yh(s)&&(s=ME(s,n+(!s.key||u&&u.key===s.key?"":(""+s.key).replace(Mv,"$&/")+"/")+e)),t.push(s)),1;if(u=0,r=r===""?".":r+":",Fv(e))for(var h=0;h<e.length;h++){l=e[h];var f=r+ph(l,h);u+=Za(l,t,n,f,s)}else if(f=FE(e),typeof f=="function")for(e=f.call(e),h=0;!(l=e.next()).done;)l=l.value,f=r+ph(l,h++),u+=Za(l,t,n,f,s);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function Ya(e,t,n){if(e==null)return e;var r=[],s=0;return Za(e,r,"","",function(l){return t.call(n,l,s++)}),r}function DE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Pt={current:null},Ka={transition:null},WE={ReactCurrentDispatcher:Pt,ReactCurrentBatchConfig:Ka,ReactCurrentOwner:vh};oe.Children={map:Ya,forEach:function(e,t,n){Ya(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ya(e,function(){t++}),t},toArray:function(e){return Ya(e,function(t){return t})||[]},only:function(e){if(!yh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=yo;oe.Fragment=kE;oe.Profiler=TE;oe.PureComponent=mh;oe.StrictMode=CE;oe.Suspense=LE;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WE;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dv({},e.props),s=e.key,l=e.ref,u=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,u=vh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var h=e.type.defaultProps;for(f in t)jv.call(t,f)&&!bv.hasOwnProperty(f)&&(r[f]=t[f]===void 0&&h!==void 0?h[f]:t[f])}var f=arguments.length-2;if(f===1)r.children=n;else if(1<f){h=Array(f);for(var g=0;g<f;g++)h[g]=arguments[g+2];r.children=h}return{$$typeof:Fs,type:e.type,key:s,ref:l,props:r,_owner:u}};oe.createContext=function(e){return e={$$typeof:zE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:RE,_context:e},e.Consumer=e};oe.createElement=Hv;oe.createFactory=function(e){var t=Hv.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:IE,render:e}};oe.isValidElement=yh;oe.lazy=function(e){return{$$typeof:OE,_payload:{_status:-1,_result:e},_init:DE}};oe.memo=function(e,t){return{$$typeof:NE,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Ka.transition;Ka.transition={};try{e()}finally{Ka.transition=t}};oe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};oe.useCallback=function(e,t){return Pt.current.useCallback(e,t)};oe.useContext=function(e){return Pt.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return Pt.current.useDeferredValue(e)};oe.useEffect=function(e,t){return Pt.current.useEffect(e,t)};oe.useId=function(){return Pt.current.useId()};oe.useImperativeHandle=function(e,t,n){return Pt.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return Pt.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return Pt.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return Pt.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return Pt.current.useReducer(e,t,n)};oe.useRef=function(e){return Pt.current.useRef(e)};oe.useState=function(e){return Pt.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return Pt.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return Pt.current.useTransition()};oe.version="18.2.0"});var le=mt((CT,Vv)=>{"use strict";Vv.exports=Uv()});var Gv=mt($a=>{"use strict";var BE=le(),jE=Symbol.for("react.element"),bE=Symbol.for("react.fragment"),HE=Object.prototype.hasOwnProperty,UE=BE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VE={key:!0,ref:!0,__self:!0,__source:!0};function Qv(e,t,n){var r,s={},l=null,u=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(u=t.ref);for(r in t)HE.call(t,r)&&!VE.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:jE,type:e,key:l,ref:u,props:s,_owner:UE.current}}$a.Fragment=bE;$a.jsx=Qv;$a.jsxs=Qv});var Ie=mt((RT,Xv)=>{"use strict";Xv.exports=Gv()});var sy=mt(ve=>{"use strict";function _h(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,s=e[r];if(0<eu(s,t))e[r]=t,e[n]=s,n=r;else break e}}function In(e){return e.length===0?null:e[0]}function nu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,s=e.length,l=s>>>1;r<l;){var u=2*(r+1)-1,h=e[u],f=u+1,g=e[f];if(0>eu(h,n))f<s&&0>eu(g,h)?(e[r]=g,e[f]=n,r=f):(e[r]=h,e[u]=n,r=u);else if(f<s&&0>eu(g,n))e[r]=g,e[f]=n,r=f;else break e}}return t}function eu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?($v=performance,ve.unstable_now=function(){return $v.now()}):(Sh=Date,qv=Sh.now(),ve.unstable_now=function(){return Sh.now()-qv});var $v,Sh,qv,Jn=[],Xr=[],KE=1,fn=null,gt=3,ru=!1,Ii=!1,Ds=!1,ty=typeof setTimeout=="function"?setTimeout:null,ny=typeof clearTimeout=="function"?clearTimeout:null,Jv=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ph(e){for(var t=In(Xr);t!==null;){if(t.callback===null)nu(Xr);else if(t.startTime<=e)nu(Xr),t.sortIndex=t.expirationTime,_h(Jn,t);else break;t=In(Xr)}}function kh(e){if(Ds=!1,Ph(e),!Ii)if(In(Jn)!==null)Ii=!0,Th(Ch);else{var t=In(Xr);t!==null&&Rh(kh,t.startTime-e)}}function Ch(e,t){Ii=!1,Ds&&(Ds=!1,ny(Ws),Ws=-1),ru=!0;var n=gt;try{for(Ph(t),fn=In(Jn);fn!==null&&(!(fn.expirationTime>t)||e&&!oy());){var r=fn.callback;if(typeof r=="function"){fn.callback=null,gt=fn.priorityLevel;var s=r(fn.expirationTime<=t);t=ve.unstable_now(),typeof s=="function"?fn.callback=s:fn===In(Jn)&&nu(Jn),Ph(t)}else nu(Jn);fn=In(Jn)}if(fn!==null)var l=!0;else{var u=In(Xr);u!==null&&Rh(kh,u.startTime-t),l=!1}return l}finally{fn=null,gt=n,ru=!1}}var iu=!1,tu=null,Ws=-1,ry=5,iy=-1;function oy(){return!(ve.unstable_now()-iy<ry)}function xh(){if(tu!==null){var e=ve.unstable_now();iy=e;var t=!0;try{t=tu(!0,e)}finally{t?As():(iu=!1,tu=null)}}else iu=!1}var As;typeof Jv=="function"?As=function(){Jv(xh)}:typeof MessageChannel<"u"?(Eh=new MessageChannel,ey=Eh.port2,Eh.port1.onmessage=xh,As=function(){ey.postMessage(null)}):As=function(){ty(xh,0)};var Eh,ey;function Th(e){tu=e,iu||(iu=!0,As())}function Rh(e,t){Ws=ty(function(){e(ve.unstable_now())},t)}ve.unstable_IdlePriority=5;ve.unstable_ImmediatePriority=1;ve.unstable_LowPriority=4;ve.unstable_NormalPriority=3;ve.unstable_Profiling=null;ve.unstable_UserBlockingPriority=2;ve.unstable_cancelCallback=function(e){e.callback=null};ve.unstable_continueExecution=function(){Ii||ru||(Ii=!0,Th(Ch))};ve.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ry=0<e?Math.floor(1e3/e):5};ve.unstable_getCurrentPriorityLevel=function(){return gt};ve.unstable_getFirstCallbackNode=function(){return In(Jn)};ve.unstable_next=function(e){switch(gt){case 1:case 2:case 3:var t=3;break;default:t=gt}var n=gt;gt=t;try{return e()}finally{gt=n}};ve.unstable_pauseExecution=function(){};ve.unstable_requestPaint=function(){};ve.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=gt;gt=e;try{return t()}finally{gt=n}};ve.unstable_scheduleCallback=function(e,t,n){var r=ve.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=n+s,e={id:KE++,callback:t,priorityLevel:e,startTime:n,expirationTime:s,sortIndex:-1},n>r?(e.sortIndex=n,_h(Xr,e),In(Jn)===null&&e===In(Xr)&&(Ds?(ny(Ws),Ws=-1):Ds=!0,Rh(kh,n-r))):(e.sortIndex=s,_h(Jn,e),Ii||ru||(Ii=!0,Th(Ch))),e};ve.unstable_shouldYield=oy;ve.unstable_wrapCallback=function(e){var t=gt;return function(){var n=gt;gt=t;try{return e.apply(this,arguments)}finally{gt=n}}}});var zh=mt((FT,ly)=>{"use strict";ly.exports=sy()});var uy=mt((MT,ay)=>{"use strict";ay.exports=function(t){var n={},r=le(),s=zh(),l=Object.assign;function u(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;a<arguments.length;a++)o+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,f=Symbol.for("react.element"),g=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),_=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function z(i){return i===null||typeof i!="object"?null:(i=O&&i[O]||i["@@iterator"],typeof i=="function"?i:null)}function D(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case m:return"Fragment";case g:return"Portal";case E:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case x:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case k:return(i.displayName||"Context")+".Consumer";case P:return(i._context.displayName||"Context")+".Provider";case R:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case w:return o=i.displayName||null,o!==null?o:D(i.type)||"Memo";case _:o=i._payload,i=i._init;try{return D(i(o))}catch{}}return null}function b(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return D(o);case 8:return o===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function q(i){var o=i,a=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,o.flags&4098&&(a=o.return),i=o.return;while(i)}return o.tag===3?a:null}function M(i){if(q(i)!==i)throw Error(u(188))}function K(i){var o=i.alternate;if(!o){if(o=q(i),o===null)throw Error(u(188));return o!==i?null:i}for(var a=i,c=o;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(c=d.return,c!==null){a=c;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return M(d),i;if(p===c)return M(d),o;p=p.sibling}throw Error(u(188))}if(a.return!==c.return)a=d,c=p;else{for(var y=!1,C=d.child;C;){if(C===a){y=!0,a=d,c=p;break}if(C===c){y=!0,c=d,a=p;break}C=C.sibling}if(!y){for(C=p.child;C;){if(C===a){y=!0,a=p,c=d;break}if(C===c){y=!0,c=p,a=d;break}C=C.sibling}if(!y)throw Error(u(189))}}if(a.alternate!==c)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?i:o}function se(i){return i=K(i),i!==null?Wn(i):null}function Wn(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Wn(i);if(o!==null)return o;i=i.sibling}return null}function fe(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){if(i.tag!==4){var o=fe(i);if(o!==null)return o}i=i.sibling}return null}var xt=Array.isArray,tn=t.getPublicInstance,Ir=t.getRootHostContext,Lr=t.getChildHostContext,j=t.prepareForCommit,Me=t.resetAfterCommit,qi=t.createInstance,es=t.appendInitialChild,ts=t.finalizeInitialChildren,ns=t.prepareUpdate,Ji=t.shouldSetTextContent,Dl=t.createTextInstance,Ac=t.scheduleTimeout,nm=t.cancelTimeout,rs=t.noTimeout,Nr=t.isPrimaryRenderer,ut=t.supportsMutation,$=t.supportsPersistence,J=t.supportsHydration,me=t.getInstanceFromNode,zt=t.preparePortalMount,mi=t.getCurrentEventPriority,Bn=t.detachDeletedInstance,ur=t.supportsMicrotasks,ES=t.scheduleMicrotask,is=t.supportsTestSelectors,_S=t.findFiberRoot,PS=t.getBoundingRect,kS=t.getTextContent,os=t.isHiddenSubtree,CS=t.matchAccessibilityRole,TS=t.setFocusIfFocusable,RS=t.setupIntersectionObserver,zS=t.appendChild,IS=t.appendChildToContainer,LS=t.commitTextUpdate,NS=t.commitMount,OS=t.commitUpdate,FS=t.insertBefore,MS=t.insertInContainerBefore,AS=t.removeChild,DS=t.removeChildFromContainer,rm=t.resetTextContent,WS=t.hideInstance,BS=t.hideTextInstance,jS=t.unhideInstance,bS=t.unhideTextInstance,HS=t.clearContainer,US=t.cloneInstance,im=t.createContainerChildSet,om=t.appendChildToContainerChildSet,VS=t.finalizeContainerChildren,Dc=t.replaceContainerChildren,sm=t.cloneHiddenInstance,lm=t.cloneHiddenTextInstance,QS=t.canHydrateInstance,GS=t.canHydrateTextInstance,XS=t.canHydrateSuspenseInstance,am=t.isSuspenseInstancePending,Wc=t.isSuspenseInstanceFallback,YS=t.getSuspenseInstanceFallbackErrorDetails,ZS=t.registerSuspenseInstanceRetry,Wl=t.getNextHydratableSibling,KS=t.getFirstHydratableChild,$S=t.getFirstHydratableChildWithinContainer,qS=t.getFirstHydratableChildWithinSuspenseInstance,JS=t.hydrateInstance,ex=t.hydrateTextInstance,tx=t.hydrateSuspenseInstance,nx=t.getNextHydratableInstanceAfterSuspenseInstance,rx=t.commitHydratedContainer,ix=t.commitHydratedSuspenseInstance,ox=t.clearSuspenseBoundary,sx=t.clearSuspenseBoundaryFromContainer,lx=t.shouldDeleteUnhydratedTailInstances,ax=t.didNotMatchHydratedContainerTextInstance,ux=t.didNotMatchHydratedTextInstance,Bc;function ss(i){if(Bc===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);Bc=o&&o[1]||""}return`
|
|
1
|
+
"use strict";var AtlasViewer=(()=>{var nE=Object.create;var ks=Object.defineProperty;var rE=Object.getOwnPropertyDescriptor;var iE=Object.getOwnPropertyNames;var oE=Object.getPrototypeOf,sE=Object.prototype.hasOwnProperty;var lE=(e,t,n)=>t in e?ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),aE=(e,t)=>{for(var n in t)ks(e,n,{get:t[n],enumerable:!0})},Qg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of iE(t))!sE.call(e,s)&&s!==n&&ks(e,s,{get:()=>t[s],enumerable:!(r=rE(t,s))||r.enumerable});return e};var Y=(e,t,n)=>(n=e!=null?nE(oE(e)):{},Qg(t||!e||!e.__esModule?ks(n,"default",{value:e,enumerable:!0}):n,e)),uE=e=>Qg(ks({},"__esModule",{value:!0}),e);var v=(e,t,n)=>(lE(e,typeof t!="symbol"?t+"":t,n),n);var fv=gt((fT,hv)=>{"use strict";var lv=!1,zi,sh,lh,Va,Qa,av,Ga,ah,uh,ch,uv,dh,hh,cv,dv;function Dt(){if(!lv){lv=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(dh=/\b(iPhone|iP[ao]d)/.exec(e),hh=/\b(iP[ao]d)/.exec(e),ch=/Android/i.exec(e),cv=/FBAN\/\w+;/i.exec(e),dv=/Mobile/i.exec(e),uv=!!/Win64/.exec(e),t){zi=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,zi&&document&&document.documentMode&&(zi=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);av=r?parseFloat(r[1])+4:zi,sh=t[2]?parseFloat(t[2]):NaN,lh=t[3]?parseFloat(t[3]):NaN,Va=t[4]?parseFloat(t[4]):NaN,Va?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Qa=t&&t[1]?parseFloat(t[1]):NaN):Qa=NaN}else zi=sh=lh=Qa=Va=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Ga=s?parseFloat(s[1].replace("_",".")):!0}else Ga=!1;ah=!!n[2],uh=!!n[3]}else Ga=ah=uh=!1}}var fh={ie:function(){return Dt()||zi},ieCompatibilityMode:function(){return Dt()||av>zi},ie64:function(){return fh.ie()&&uv},firefox:function(){return Dt()||sh},opera:function(){return Dt()||lh},webkit:function(){return Dt()||Va},safari:function(){return fh.webkit()},chrome:function(){return Dt()||Qa},windows:function(){return Dt()||ah},osx:function(){return Dt()||Ga},linux:function(){return Dt()||uh},iphone:function(){return Dt()||dh},mobile:function(){return Dt()||dh||hh||ch||dv},nativeApp:function(){return Dt()||cv},android:function(){return Dt()||ch},ipad:function(){return Dt()||hh}};hv.exports=fh});var mv=gt((pT,pv)=>{"use strict";var Xa=!!(typeof window<"u"&&window.document&&window.document.createElement),wE={canUseDOM:Xa,canUseWorkers:typeof Worker<"u",canUseEventListeners:Xa&&!!(window.addEventListener||window.attachEvent),canUseViewport:Xa&&!!window.screen,isInWorker:!Xa};pv.exports=wE});var wv=gt((mT,yv)=>{"use strict";var gv=mv(),vv;gv.canUseDOM&&(vv=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function SE(e,t){if(!gv.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var s=document.createElement("div");s.setAttribute(n,"return;"),r=typeof s[n]=="function"}return!r&&vv&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}yv.exports=SE});var kv=gt((gT,Pv)=>{"use strict";var xE=fv(),EE=wv(),Sv=10,xv=40,Ev=800;function _v(e){var t=0,n=0,r=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*Sv,s=n*Sv,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||s)&&e.deltaMode&&(e.deltaMode==1?(r*=xv,s*=xv):(r*=Ev,s*=Ev)),r&&!t&&(t=r<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:s}}_v.getEventType=function(){return xE.firefox()?"DOMMouseScroll":EE("wheel")?"wheel":"mousewheel"};Pv.exports=_v});var Tv=gt((vT,Cv)=>{"use strict";Cv.exports=kv()});var Uv=gt(oe=>{"use strict";var Fs=Symbol.for("react.element"),PE=Symbol.for("react.portal"),kE=Symbol.for("react.fragment"),CE=Symbol.for("react.strict_mode"),TE=Symbol.for("react.profiler"),RE=Symbol.for("react.provider"),zE=Symbol.for("react.context"),IE=Symbol.for("react.forward_ref"),LE=Symbol.for("react.suspense"),NE=Symbol.for("react.memo"),OE=Symbol.for("react.lazy"),Ov=Symbol.iterator;function FE(e){return e===null||typeof e!="object"?null:(e=Ov&&e[Ov]||e["@@iterator"],typeof e=="function"?e:null)}var Av={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dv=Object.assign,Wv={};function yo(e,t,n){this.props=e,this.context=t,this.refs=Wv,this.updater=n||Av}yo.prototype.isReactComponent={};yo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bv(){}Bv.prototype=yo.prototype;function mh(e,t,n){this.props=e,this.context=t,this.refs=Wv,this.updater=n||Av}var gh=mh.prototype=new Bv;gh.constructor=mh;Dv(gh,yo.prototype);gh.isPureReactComponent=!0;var Fv=Array.isArray,jv=Object.prototype.hasOwnProperty,vh={current:null},bv={key:!0,ref:!0,__self:!0,__source:!0};function Hv(e,t,n){var r,s={},l=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(l=""+t.key),t)jv.call(t,r)&&!bv.hasOwnProperty(r)&&(s[r]=t[r]);var h=arguments.length-2;if(h===1)s.children=n;else if(1<h){for(var f=Array(h),g=0;g<h;g++)f[g]=arguments[g+2];s.children=f}if(e&&e.defaultProps)for(r in h=e.defaultProps,h)s[r]===void 0&&(s[r]=h[r]);return{$$typeof:Fs,type:e,key:l,ref:u,props:s,_owner:vh.current}}function ME(e,t){return{$$typeof:Fs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fs}function AE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mv=/\/+/g;function ph(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AE(""+e.key):t.toString(36)}function Za(e,t,n,r,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var u=!1;if(e===null)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case Fs:case PE:u=!0}}if(u)return u=e,s=s(u),e=r===""?"."+ph(u,0):r,Fv(s)?(n="",e!=null&&(n=e.replace(Mv,"$&/")+"/"),Za(s,t,n,"",function(g){return g})):s!=null&&(yh(s)&&(s=ME(s,n+(!s.key||u&&u.key===s.key?"":(""+s.key).replace(Mv,"$&/")+"/")+e)),t.push(s)),1;if(u=0,r=r===""?".":r+":",Fv(e))for(var h=0;h<e.length;h++){l=e[h];var f=r+ph(l,h);u+=Za(l,t,n,f,s)}else if(f=FE(e),typeof f=="function")for(e=f.call(e),h=0;!(l=e.next()).done;)l=l.value,f=r+ph(l,h++),u+=Za(l,t,n,f,s);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function Ya(e,t,n){if(e==null)return e;var r=[],s=0;return Za(e,r,"","",function(l){return t.call(n,l,s++)}),r}function DE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var kt={current:null},Ka={transition:null},WE={ReactCurrentDispatcher:kt,ReactCurrentBatchConfig:Ka,ReactCurrentOwner:vh};oe.Children={map:Ya,forEach:function(e,t,n){Ya(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ya(e,function(){t++}),t},toArray:function(e){return Ya(e,function(t){return t})||[]},only:function(e){if(!yh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=yo;oe.Fragment=kE;oe.Profiler=TE;oe.PureComponent=mh;oe.StrictMode=CE;oe.Suspense=LE;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WE;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dv({},e.props),s=e.key,l=e.ref,u=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,u=vh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var h=e.type.defaultProps;for(f in t)jv.call(t,f)&&!bv.hasOwnProperty(f)&&(r[f]=t[f]===void 0&&h!==void 0?h[f]:t[f])}var f=arguments.length-2;if(f===1)r.children=n;else if(1<f){h=Array(f);for(var g=0;g<f;g++)h[g]=arguments[g+2];r.children=h}return{$$typeof:Fs,type:e.type,key:s,ref:l,props:r,_owner:u}};oe.createContext=function(e){return e={$$typeof:zE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:RE,_context:e},e.Consumer=e};oe.createElement=Hv;oe.createFactory=function(e){var t=Hv.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:IE,render:e}};oe.isValidElement=yh;oe.lazy=function(e){return{$$typeof:OE,_payload:{_status:-1,_result:e},_init:DE}};oe.memo=function(e,t){return{$$typeof:NE,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Ka.transition;Ka.transition={};try{e()}finally{Ka.transition=t}};oe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};oe.useCallback=function(e,t){return kt.current.useCallback(e,t)};oe.useContext=function(e){return kt.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return kt.current.useDeferredValue(e)};oe.useEffect=function(e,t){return kt.current.useEffect(e,t)};oe.useId=function(){return kt.current.useId()};oe.useImperativeHandle=function(e,t,n){return kt.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return kt.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return kt.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return kt.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return kt.current.useReducer(e,t,n)};oe.useRef=function(e){return kt.current.useRef(e)};oe.useState=function(e){return kt.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return kt.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return kt.current.useTransition()};oe.version="18.2.0"});var le=gt((CT,Vv)=>{"use strict";Vv.exports=Uv()});var Gv=gt($a=>{"use strict";var BE=le(),jE=Symbol.for("react.element"),bE=Symbol.for("react.fragment"),HE=Object.prototype.hasOwnProperty,UE=BE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VE={key:!0,ref:!0,__self:!0,__source:!0};function Qv(e,t,n){var r,s={},l=null,u=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(u=t.ref);for(r in t)HE.call(t,r)&&!VE.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:jE,type:e,key:l,ref:u,props:s,_owner:UE.current}}$a.Fragment=bE;$a.jsx=Qv;$a.jsxs=Qv});var Ie=gt((RT,Xv)=>{"use strict";Xv.exports=Gv()});var sy=gt(ge=>{"use strict";function _h(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,s=e[r];if(0<eu(s,t))e[r]=t,e[n]=s,n=r;else break e}}function In(e){return e.length===0?null:e[0]}function nu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,s=e.length,l=s>>>1;r<l;){var u=2*(r+1)-1,h=e[u],f=u+1,g=e[f];if(0>eu(h,n))f<s&&0>eu(g,h)?(e[r]=g,e[f]=n,r=f):(e[r]=h,e[u]=n,r=u);else if(f<s&&0>eu(g,n))e[r]=g,e[f]=n,r=f;else break e}}return t}function eu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?($v=performance,ge.unstable_now=function(){return $v.now()}):(Sh=Date,qv=Sh.now(),ge.unstable_now=function(){return Sh.now()-qv});var $v,Sh,qv,Jn=[],Xr=[],KE=1,fn=null,vt=3,ru=!1,Ii=!1,Ds=!1,ty=typeof setTimeout=="function"?setTimeout:null,ny=typeof clearTimeout=="function"?clearTimeout:null,Jv=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ph(e){for(var t=In(Xr);t!==null;){if(t.callback===null)nu(Xr);else if(t.startTime<=e)nu(Xr),t.sortIndex=t.expirationTime,_h(Jn,t);else break;t=In(Xr)}}function kh(e){if(Ds=!1,Ph(e),!Ii)if(In(Jn)!==null)Ii=!0,Th(Ch);else{var t=In(Xr);t!==null&&Rh(kh,t.startTime-e)}}function Ch(e,t){Ii=!1,Ds&&(Ds=!1,ny(Ws),Ws=-1),ru=!0;var n=vt;try{for(Ph(t),fn=In(Jn);fn!==null&&(!(fn.expirationTime>t)||e&&!oy());){var r=fn.callback;if(typeof r=="function"){fn.callback=null,vt=fn.priorityLevel;var s=r(fn.expirationTime<=t);t=ge.unstable_now(),typeof s=="function"?fn.callback=s:fn===In(Jn)&&nu(Jn),Ph(t)}else nu(Jn);fn=In(Jn)}if(fn!==null)var l=!0;else{var u=In(Xr);u!==null&&Rh(kh,u.startTime-t),l=!1}return l}finally{fn=null,vt=n,ru=!1}}var iu=!1,tu=null,Ws=-1,ry=5,iy=-1;function oy(){return!(ge.unstable_now()-iy<ry)}function xh(){if(tu!==null){var e=ge.unstable_now();iy=e;var t=!0;try{t=tu(!0,e)}finally{t?As():(iu=!1,tu=null)}}else iu=!1}var As;typeof Jv=="function"?As=function(){Jv(xh)}:typeof MessageChannel<"u"?(Eh=new MessageChannel,ey=Eh.port2,Eh.port1.onmessage=xh,As=function(){ey.postMessage(null)}):As=function(){ty(xh,0)};var Eh,ey;function Th(e){tu=e,iu||(iu=!0,As())}function Rh(e,t){Ws=ty(function(){e(ge.unstable_now())},t)}ge.unstable_IdlePriority=5;ge.unstable_ImmediatePriority=1;ge.unstable_LowPriority=4;ge.unstable_NormalPriority=3;ge.unstable_Profiling=null;ge.unstable_UserBlockingPriority=2;ge.unstable_cancelCallback=function(e){e.callback=null};ge.unstable_continueExecution=function(){Ii||ru||(Ii=!0,Th(Ch))};ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ry=0<e?Math.floor(1e3/e):5};ge.unstable_getCurrentPriorityLevel=function(){return vt};ge.unstable_getFirstCallbackNode=function(){return In(Jn)};ge.unstable_next=function(e){switch(vt){case 1:case 2:case 3:var t=3;break;default:t=vt}var n=vt;vt=t;try{return e()}finally{vt=n}};ge.unstable_pauseExecution=function(){};ge.unstable_requestPaint=function(){};ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=vt;vt=e;try{return t()}finally{vt=n}};ge.unstable_scheduleCallback=function(e,t,n){var r=ge.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=n+s,e={id:KE++,callback:t,priorityLevel:e,startTime:n,expirationTime:s,sortIndex:-1},n>r?(e.sortIndex=n,_h(Xr,e),In(Jn)===null&&e===In(Xr)&&(Ds?(ny(Ws),Ws=-1):Ds=!0,Rh(kh,n-r))):(e.sortIndex=s,_h(Jn,e),Ii||ru||(Ii=!0,Th(Ch))),e};ge.unstable_shouldYield=oy;ge.unstable_wrapCallback=function(e){var t=vt;return function(){var n=vt;vt=t;try{return e.apply(this,arguments)}finally{vt=n}}}});var zh=gt((FT,ly)=>{"use strict";ly.exports=sy()});var uy=gt((MT,ay)=>{"use strict";ay.exports=function(t){var n={},r=le(),s=zh(),l=Object.assign;function u(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;a<arguments.length;a++)o+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,f=Symbol.for("react.element"),g=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),_=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function z(i){return i===null||typeof i!="object"?null:(i=O&&i[O]||i["@@iterator"],typeof i=="function"?i:null)}function D(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case m:return"Fragment";case g:return"Portal";case E:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case x:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case k:return(i.displayName||"Context")+".Consumer";case P:return(i._context.displayName||"Context")+".Provider";case R:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case w:return o=i.displayName||null,o!==null?o:D(i.type)||"Memo";case _:o=i._payload,i=i._init;try{return D(i(o))}catch{}}return null}function b(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return D(o);case 8:return o===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function q(i){var o=i,a=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,o.flags&4098&&(a=o.return),i=o.return;while(i)}return o.tag===3?a:null}function M(i){if(q(i)!==i)throw Error(u(188))}function K(i){var o=i.alternate;if(!o){if(o=q(i),o===null)throw Error(u(188));return o!==i?null:i}for(var a=i,c=o;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(c=d.return,c!==null){a=c;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return M(d),i;if(p===c)return M(d),o;p=p.sibling}throw Error(u(188))}if(a.return!==c.return)a=d,c=p;else{for(var y=!1,C=d.child;C;){if(C===a){y=!0,a=d,c=p;break}if(C===c){y=!0,c=d,a=p;break}C=C.sibling}if(!y){for(C=p.child;C;){if(C===a){y=!0,a=p,c=d;break}if(C===c){y=!0,c=p,a=d;break}C=C.sibling}if(!y)throw Error(u(189))}}if(a.alternate!==c)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?i:o}function se(i){return i=K(i),i!==null?Wn(i):null}function Wn(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=Wn(i);if(o!==null)return o;i=i.sibling}return null}function fe(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){if(i.tag!==4){var o=fe(i);if(o!==null)return o}i=i.sibling}return null}var Et=Array.isArray,tn=t.getPublicInstance,Ir=t.getRootHostContext,Lr=t.getChildHostContext,j=t.prepareForCommit,Me=t.resetAfterCommit,qi=t.createInstance,es=t.appendInitialChild,ts=t.finalizeInitialChildren,ns=t.prepareUpdate,Ji=t.shouldSetTextContent,Dl=t.createTextInstance,Ac=t.scheduleTimeout,nm=t.cancelTimeout,rs=t.noTimeout,Nr=t.isPrimaryRenderer,ct=t.supportsMutation,$=t.supportsPersistence,J=t.supportsHydration,ye=t.getInstanceFromNode,rt=t.preparePortalMount,mi=t.getCurrentEventPriority,Bn=t.detachDeletedInstance,ur=t.supportsMicrotasks,ES=t.scheduleMicrotask,is=t.supportsTestSelectors,_S=t.findFiberRoot,PS=t.getBoundingRect,kS=t.getTextContent,os=t.isHiddenSubtree,CS=t.matchAccessibilityRole,TS=t.setFocusIfFocusable,RS=t.setupIntersectionObserver,zS=t.appendChild,IS=t.appendChildToContainer,LS=t.commitTextUpdate,NS=t.commitMount,OS=t.commitUpdate,FS=t.insertBefore,MS=t.insertInContainerBefore,AS=t.removeChild,DS=t.removeChildFromContainer,rm=t.resetTextContent,WS=t.hideInstance,BS=t.hideTextInstance,jS=t.unhideInstance,bS=t.unhideTextInstance,HS=t.clearContainer,US=t.cloneInstance,im=t.createContainerChildSet,om=t.appendChildToContainerChildSet,VS=t.finalizeContainerChildren,Dc=t.replaceContainerChildren,sm=t.cloneHiddenInstance,lm=t.cloneHiddenTextInstance,QS=t.canHydrateInstance,GS=t.canHydrateTextInstance,XS=t.canHydrateSuspenseInstance,am=t.isSuspenseInstancePending,Wc=t.isSuspenseInstanceFallback,YS=t.getSuspenseInstanceFallbackErrorDetails,ZS=t.registerSuspenseInstanceRetry,Wl=t.getNextHydratableSibling,KS=t.getFirstHydratableChild,$S=t.getFirstHydratableChildWithinContainer,qS=t.getFirstHydratableChildWithinSuspenseInstance,JS=t.hydrateInstance,ex=t.hydrateTextInstance,tx=t.hydrateSuspenseInstance,nx=t.getNextHydratableInstanceAfterSuspenseInstance,rx=t.commitHydratedContainer,ix=t.commitHydratedSuspenseInstance,ox=t.clearSuspenseBoundary,sx=t.clearSuspenseBoundaryFromContainer,lx=t.shouldDeleteUnhydratedTailInstances,ax=t.didNotMatchHydratedContainerTextInstance,ux=t.didNotMatchHydratedTextInstance,Bc;function ss(i){if(Bc===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);Bc=o&&o[1]||""}return`
|
|
2
2
|
`+Bc+i}var jc=!1;function bc(i,o){if(!i||jc)return"";jc=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(B){var c=B}Reflect.construct(i,[],o)}else{try{o.call()}catch(B){c=B}i.call(o.prototype)}else{try{throw Error()}catch(B){c=B}i()}}catch(B){if(B&&c&&typeof B.stack=="string"){for(var d=B.stack.split(`
|
|
3
3
|
`),p=c.stack.split(`
|
|
4
4
|
`),y=d.length-1,C=p.length-1;1<=y&&0<=C&&d[y]!==p[C];)C--;for(;1<=y&&0<=C;y--,C--)if(d[y]!==p[C]){if(y!==1||C!==1)do if(y--,C--,0>C||d[y]!==p[C]){var N=`
|
|
5
|
-
`+d[y].replace(" at new "," at ");return i.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",i.displayName)),N}while(1<=y&&0<=C);break}}}finally{jc=!1,Error.prepareStackTrace=a}return(i=i?i.displayName||i.name:"")?ss(i):""}var cx=Object.prototype.hasOwnProperty,Hc=[],eo=-1;function Or(i){return{current:i}}function we(i){0>eo||(i.current=Hc[eo],Hc[eo]=null,eo--)}function ge(i,o){eo++,Hc[eo]=i.current,i.current=o}var Fr={},ct=Or(Fr),It=Or(!1),gi=Fr;function to(i,o){var a=i.type.contextTypes;if(!a)return Fr;var c=i.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in a)d[p]=o[p];return c&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=d),d}function Lt(i){return i=i.childContextTypes,i!=null}function Bl(){we(It),we(ct)}function um(i,o,a){if(ct.current!==Fr)throw Error(u(168));ge(ct,o),ge(It,a)}function cm(i,o,a){var c=i.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var d in c)if(!(d in o))throw Error(u(108,b(i)||"Unknown",d));return l({},a,c)}function jl(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Fr,gi=ct.current,ge(ct,i),ge(It,It.current),!0}function dm(i,o,a){var c=i.stateNode;if(!c)throw Error(u(169));a?(i=cm(i,o,gi),c.__reactInternalMemoizedMergedChildContext=i,we(It),we(ct),ge(ct,i)):we(It),ge(It,a)}var xn=Math.clz32?Math.clz32:fx,dx=Math.log,hx=Math.LN2;function fx(i){return i>>>=0,i===0?32:31-(dx(i)/hx|0)|0}var bl=64,Hl=4194304;function ls(i){switch(i&-i){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: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Ul(i,o){var a=i.pendingLanes;if(a===0)return 0;var c=0,d=i.suspendedLanes,p=i.pingedLanes,y=a&268435455;if(y!==0){var C=y&~d;C!==0?c=ls(C):(p&=y,p!==0&&(c=ls(p)))}else y=a&~d,y!==0?c=ls(y):p!==0&&(c=ls(p));if(c===0)return 0;if(o!==0&&o!==c&&!(o&d)&&(d=c&-c,p=o&-o,d>=p||d===16&&(p&4194240)!==0))return o;if(c&4&&(c|=a&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=c;0<o;)a=31-xn(o),d=1<<a,c|=i[a],o&=~d;return c}function px(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mx(i,o){for(var a=i.suspendedLanes,c=i.pingedLanes,d=i.expirationTimes,p=i.pendingLanes;0<p;){var y=31-xn(p),C=1<<y,N=d[y];N===-1?(!(C&a)||C&c)&&(d[y]=px(C,o)):N<=o&&(i.expiredLanes|=C),p&=~C}}function Uc(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function hm(){var i=bl;return bl<<=1,!(bl&4194240)&&(bl=64),i}function Vc(i){for(var o=[],a=0;31>a;a++)o.push(i);return o}function as(i,o,a){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-xn(o),i[o]=a}function gx(i,o){var a=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var c=i.eventTimes;for(i=i.expirationTimes;0<a;){var d=31-xn(a),p=1<<d;o[d]=0,c[d]=-1,i[d]=-1,a&=~p}}function Qc(i,o){var a=i.entangledLanes|=o;for(i=i.entanglements;a;){var c=31-xn(a),d=1<<c;d&o|i[c]&o&&(i[c]|=o),a&=~d}}var ue=0;function fm(i){return i&=-i,1<i?4<i?i&268435455?16:536870912:4:1}var Gc=s.unstable_scheduleCallback,pm=s.unstable_cancelCallback,vx=s.unstable_shouldYield,yx=s.unstable_requestPaint,$e=s.unstable_now,Xc=s.unstable_ImmediatePriority,wx=s.unstable_UserBlockingPriority,Yc=s.unstable_NormalPriority,Sx=s.unstable_IdlePriority,Vl=null,jn=null;function xx(i){if(jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(Vl,i,void 0,(i.current.flags&128)===128)}catch{}}function Ex(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var En=typeof Object.is=="function"?Object.is:Ex,cr=null,Ql=!1,Zc=!1;function mm(i){cr===null?cr=[i]:cr.push(i)}function _x(i){Ql=!0,mm(i)}function bn(){if(!Zc&&cr!==null){Zc=!0;var i=0,o=ue;try{var a=cr;for(ue=1;i<a.length;i++){var c=a[i];do c=c(!0);while(c!==null)}cr=null,Ql=!1}catch(d){throw cr!==null&&(cr=cr.slice(i+1)),Gc(Xc,bn),d}finally{ue=o,Zc=!1}}return null}var no=[],ro=0,Gl=null,Xl=0,nn=[],rn=0,vi=null,dr=1,hr="";function yi(i,o){no[ro++]=Xl,no[ro++]=Gl,Gl=i,Xl=o}function gm(i,o,a){nn[rn++]=dr,nn[rn++]=hr,nn[rn++]=vi,vi=i;var c=dr;i=hr;var d=32-xn(c)-1;c&=~(1<<d),a+=1;var p=32-xn(o)+d;if(30<p){var y=d-d%5;p=(c&(1<<y)-1).toString(32),c>>=y,d-=y,dr=1<<32-xn(o)+d|a<<d|c,hr=p+i}else dr=1<<p|a<<d|c,hr=i}function Kc(i){i.return!==null&&(yi(i,1),gm(i,1,0))}function $c(i){for(;i===Gl;)Gl=no[--ro],no[ro]=null,Xl=no[--ro],no[ro]=null;for(;i===vi;)vi=nn[--rn],nn[rn]=null,hr=nn[--rn],nn[rn]=null,dr=nn[--rn],nn[rn]=null}var Ut=null,on=null,_e=!1,us=!1,_n=null;function vm(i,o){var a=cn(5,null,null,0);a.elementType="DELETED",a.stateNode=o,a.return=i,o=i.deletions,o===null?(i.deletions=[a],i.flags|=16):o.push(a)}function ym(i,o){switch(i.tag){case 5:return o=QS(o,i.type,i.pendingProps),o!==null?(i.stateNode=o,Ut=i,on=KS(o),!0):!1;case 6:return o=GS(o,i.pendingProps),o!==null?(i.stateNode=o,Ut=i,on=null,!0):!1;case 13:if(o=XS(o),o!==null){var a=vi!==null?{id:dr,overflow:hr}:null;return i.memoizedState={dehydrated:o,treeContext:a,retryLane:1073741824},a=cn(18,null,null,0),a.stateNode=o,a.return=i,i.child=a,Ut=i,on=null,!0}return!1;default:return!1}}function qc(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Jc(i){if(_e){var o=on;if(o){var a=o;if(!ym(i,o)){if(qc(i))throw Error(u(418));o=Wl(a);var c=Ut;o&&ym(i,o)?vm(c,a):(i.flags=i.flags&-4097|2,_e=!1,Ut=i)}}else{if(qc(i))throw Error(u(418));i.flags=i.flags&-4097|2,_e=!1,Ut=i}}}function wm(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Ut=i}function Yl(i){if(!J||i!==Ut)return!1;if(!_e)return wm(i),_e=!0,!1;if(i.tag!==3&&(i.tag!==5||lx(i.type)&&!Ji(i.type,i.memoizedProps))){var o=on;if(o){if(qc(i))throw Sm(),Error(u(418));for(;o;)vm(i,o),o=Wl(o)}}if(wm(i),i.tag===13){if(!J)throw Error(u(316));if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));on=nx(i)}else on=Ut?Wl(i.stateNode):null;return!0}function Sm(){for(var i=on;i;)i=Wl(i)}function io(){J&&(on=Ut=null,us=_e=!1)}function ed(i){_n===null?_n=[i]:_n.push(i)}var Px=h.ReactCurrentBatchConfig;function Zl(i,o){if(En(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var a=Object.keys(i),c=Object.keys(o);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var d=a[c];if(!cx.call(o,d)||!En(i[d],o[d]))return!1}return!0}function kx(i){switch(i.tag){case 5:return ss(i.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return i=bc(i.type,!1),i;case 11:return i=bc(i.type.render,!1),i;case 1:return i=bc(i.type,!0),i;default:return""}}function Pn(i,o){if(i&&i.defaultProps){o=l({},o),i=i.defaultProps;for(var a in i)o[a]===void 0&&(o[a]=i[a]);return o}return o}var Kl=Or(null),$l=null,oo=null,td=null;function nd(){td=oo=$l=null}function xm(i,o,a){Nr?(ge(Kl,o._currentValue),o._currentValue=a):(ge(Kl,o._currentValue2),o._currentValue2=a)}function rd(i){var o=Kl.current;we(Kl),Nr?i._currentValue=o:i._currentValue2=o}function id(i,o,a){for(;i!==null;){var c=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),i===a)break;i=i.return}}function so(i,o){$l=i,td=oo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&o&&(Nt=!0),i.firstContext=null)}function sn(i){var o=Nr?i._currentValue:i._currentValue2;if(td!==i)if(i={context:i,memoizedValue:o,next:null},oo===null){if($l===null)throw Error(u(308));oo=i,$l.dependencies={lanes:0,firstContext:i}}else oo=oo.next=i;return o}var wi=null;function od(i){wi===null?wi=[i]:wi.push(i)}function Em(i,o,a,c){var d=o.interleaved;return d===null?(a.next=a,od(o)):(a.next=d.next,d.next=a),o.interleaved=a,Hn(i,c)}function Hn(i,o){i.lanes|=o;var a=i.alternate;for(a!==null&&(a.lanes|=o),a=i,i=i.return;i!==null;)i.childLanes|=o,a=i.alternate,a!==null&&(a.childLanes|=o),a=i,i=i.return;return a.tag===3?a.stateNode:null}var Mr=!1;function sd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _m(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function fr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ar(i,o,a){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,ie&2){var d=c.pending;return d===null?o.next=o:(o.next=d.next,d.next=o),c.pending=o,Hn(i,a)}return d=c.interleaved,d===null?(o.next=o,od(c)):(o.next=d.next,d.next=o),c.interleaved=o,Hn(i,a)}function ql(i,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194240)!==0)){var c=o.lanes;c&=i.pendingLanes,a|=c,o.lanes=a,Qc(i,a)}}function Pm(i,o){var a=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var d=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var y={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};p===null?d=p=y:p=p.next=y,a=a.next}while(a!==null);p===null?d=p=o:p=p.next=o}else d=p=o;a={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:c.shared,effects:c.effects},i.updateQueue=a;return}i=a.lastBaseUpdate,i===null?a.firstBaseUpdate=o:i.next=o,a.lastBaseUpdate=o}function Jl(i,o,a,c){var d=i.updateQueue;Mr=!1;var p=d.firstBaseUpdate,y=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var N=C,B=N.next;N.next=null,y===null?p=B:y.next=B,y=N;var X=i.alternate;X!==null&&(X=X.updateQueue,C=X.lastBaseUpdate,C!==y&&(C===null?X.firstBaseUpdate=B:C.next=B,X.lastBaseUpdate=N))}if(p!==null){var te=d.baseState;y=0,X=B=N=null,C=p;do{var H=C.lane,Se=C.eventTime;if((c&H)===H){X!==null&&(X=X.next={eventTime:Se,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var pe=i,Mt=C;switch(H=o,Se=a,Mt.tag){case 1:if(pe=Mt.payload,typeof pe=="function"){te=pe.call(Se,te,H);break e}te=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Mt.payload,H=typeof pe=="function"?pe.call(Se,te,H):pe,H==null)break e;te=l({},te,H);break e;case 2:Mr=!0}}C.callback!==null&&C.lane!==0&&(i.flags|=64,H=d.effects,H===null?d.effects=[C]:H.push(C))}else Se={eventTime:Se,lane:H,tag:C.tag,payload:C.payload,callback:C.callback,next:null},X===null?(B=X=Se,N=te):X=X.next=Se,y|=H;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;H=C,C=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);if(X===null&&(N=te),d.baseState=N,d.firstBaseUpdate=B,d.lastBaseUpdate=X,o=d.shared.interleaved,o!==null){d=o;do y|=d.lane,d=d.next;while(d!==o)}else p===null&&(d.shared.lanes=0);xi|=y,i.lanes=y,i.memoizedState=te}}function km(i,o,a){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var c=i[o],d=c.callback;if(d!==null){if(c.callback=null,c=a,typeof d!="function")throw Error(u(191,d));d.call(c)}}}var Cm=new r.Component().refs;function ld(i,o,a,c){o=i.memoizedState,a=a(c,o),a=a==null?o:l({},o,a),i.memoizedState=a,i.lanes===0&&(i.updateQueue.baseState=a)}var ea={isMounted:function(i){return(i=i._reactInternals)?q(i)===i:!1},enqueueSetState:function(i,o,a){i=i._reactInternals;var c=pt(),d=Br(i),p=fr(c,d);p.payload=o,a!=null&&(p.callback=a),o=Ar(i,p,d),o!==null&&(un(o,i,d,c),ql(o,i,d))},enqueueReplaceState:function(i,o,a){i=i._reactInternals;var c=pt(),d=Br(i),p=fr(c,d);p.tag=1,p.payload=o,a!=null&&(p.callback=a),o=Ar(i,p,d),o!==null&&(un(o,i,d,c),ql(o,i,d))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var a=pt(),c=Br(i),d=fr(a,c);d.tag=2,o!=null&&(d.callback=o),o=Ar(i,d,c),o!==null&&(un(o,i,c,a),ql(o,i,c))}};function Tm(i,o,a,c,d,p,y){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,p,y):o.prototype&&o.prototype.isPureReactComponent?!Zl(a,c)||!Zl(d,p):!0}function Rm(i,o,a){var c=!1,d=Fr,p=o.contextType;return typeof p=="object"&&p!==null?p=sn(p):(d=Lt(o)?gi:ct.current,c=o.contextTypes,p=(c=c!=null)?to(i,d):Fr),o=new o(a,p),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ea,i.stateNode=o,o._reactInternals=i,c&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=d,i.__reactInternalMemoizedMaskedChildContext=p),o}function zm(i,o,a,c){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(a,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(a,c),o.state!==i&&ea.enqueueReplaceState(o,o.state,null)}function ad(i,o,a,c){var d=i.stateNode;d.props=a,d.state=i.memoizedState,d.refs=Cm,sd(i);var p=o.contextType;typeof p=="object"&&p!==null?d.context=sn(p):(p=Lt(o)?gi:ct.current,d.context=to(i,p)),d.state=i.memoizedState,p=o.getDerivedStateFromProps,typeof p=="function"&&(ld(i,o,p,a),d.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(o=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),o!==d.state&&ea.enqueueReplaceState(d,d.state,null),Jl(i,a,d,c),d.state=i.memoizedState),typeof d.componentDidMount=="function"&&(i.flags|=4194308)}function cs(i,o,a){if(i=a.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(u(309));var c=a.stateNode}if(!c)throw Error(u(147,i));var d=c,p=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===p?o.ref:(o=function(y){var C=d.refs;C===Cm&&(C=d.refs={}),y===null?delete C[p]:C[p]=y},o._stringRef=p,o)}if(typeof i!="string")throw Error(u(284));if(!a._owner)throw Error(u(290,i))}return i}function ta(i,o){throw i=Object.prototype.toString.call(o),Error(u(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Im(i){var o=i._init;return o(i._payload)}function Lm(i){function o(I,T){if(i){var F=I.deletions;F===null?(I.deletions=[T],I.flags|=16):F.push(T)}}function a(I,T){if(!i)return null;for(;T!==null;)o(I,T),T=T.sibling;return null}function c(I,T){for(I=new Map;T!==null;)T.key!==null?I.set(T.key,T):I.set(T.index,T),T=T.sibling;return I}function d(I,T){return I=br(I,T),I.index=0,I.sibling=null,I}function p(I,T,F){return I.index=F,i?(F=I.alternate,F!==null?(F=F.index,F<T?(I.flags|=2,T):F):(I.flags|=2,T)):(I.flags|=1048576,T)}function y(I){return i&&I.alternate===null&&(I.flags|=2),I}function C(I,T,F,U){return T===null||T.tag!==6?(T=Zd(F,I.mode,U),T.return=I,T):(T=d(T,F),T.return=I,T)}function N(I,T,F,U){var Z=F.type;return Z===m?X(I,T,F.props.children,U,F.key):T!==null&&(T.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===_&&Im(Z)===T.type)?(U=d(T,F.props),U.ref=cs(I,T,F),U.return=I,U):(U=Ta(F.type,F.key,F.props,null,I.mode,U),U.ref=cs(I,T,F),U.return=I,U)}function B(I,T,F,U){return T===null||T.tag!==4||T.stateNode.containerInfo!==F.containerInfo||T.stateNode.implementation!==F.implementation?(T=Kd(F,I.mode,U),T.return=I,T):(T=d(T,F.children||[]),T.return=I,T)}function X(I,T,F,U,Z){return T===null||T.tag!==7?(T=ki(F,I.mode,U,Z),T.return=I,T):(T=d(T,F),T.return=I,T)}function te(I,T,F){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Zd(""+T,I.mode,F),T.return=I,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case f:return F=Ta(T.type,T.key,T.props,null,I.mode,F),F.ref=cs(I,null,T),F.return=I,F;case g:return T=Kd(T,I.mode,F),T.return=I,T;case _:var U=T._init;return te(I,U(T._payload),F)}if(xt(T)||z(T))return T=ki(T,I.mode,F,null),T.return=I,T;ta(I,T)}return null}function H(I,T,F,U){var Z=T!==null?T.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return Z!==null?null:C(I,T,""+F,U);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case f:return F.key===Z?N(I,T,F,U):null;case g:return F.key===Z?B(I,T,F,U):null;case _:return Z=F._init,H(I,T,Z(F._payload),U)}if(xt(F)||z(F))return Z!==null?null:X(I,T,F,U,null);ta(I,F)}return null}function Se(I,T,F,U,Z){if(typeof U=="string"&&U!==""||typeof U=="number")return I=I.get(F)||null,C(T,I,""+U,Z);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case f:return I=I.get(U.key===null?F:U.key)||null,N(T,I,U,Z);case g:return I=I.get(U.key===null?F:U.key)||null,B(T,I,U,Z);case _:var re=U._init;return Se(I,T,F,re(U._payload),Z)}if(xt(U)||z(U))return I=I.get(F)||null,X(T,I,U,Z,null);ta(T,U)}return null}function pe(I,T,F,U){for(var Z=null,re=null,ne=T,ce=T=0,et=null;ne!==null&&ce<F.length;ce++){ne.index>ce?(et=ne,ne=null):et=ne.sibling;var de=H(I,ne,F[ce],U);if(de===null){ne===null&&(ne=et);break}i&&ne&&de.alternate===null&&o(I,ne),T=p(de,T,ce),re===null?Z=de:re.sibling=de,re=de,ne=et}if(ce===F.length)return a(I,ne),_e&&yi(I,ce),Z;if(ne===null){for(;ce<F.length;ce++)ne=te(I,F[ce],U),ne!==null&&(T=p(ne,T,ce),re===null?Z=ne:re.sibling=ne,re=ne);return _e&&yi(I,ce),Z}for(ne=c(I,ne);ce<F.length;ce++)et=Se(ne,I,ce,F[ce],U),et!==null&&(i&&et.alternate!==null&&ne.delete(et.key===null?ce:et.key),T=p(et,T,ce),re===null?Z=et:re.sibling=et,re=et);return i&&ne.forEach(function(Hr){return o(I,Hr)}),_e&&yi(I,ce),Z}function Mt(I,T,F,U){var Z=z(F);if(typeof Z!="function")throw Error(u(150));if(F=Z.call(F),F==null)throw Error(u(151));for(var re=Z=null,ne=T,ce=T=0,et=null,de=F.next();ne!==null&&!de.done;ce++,de=F.next()){ne.index>ce?(et=ne,ne=null):et=ne.sibling;var Hr=H(I,ne,de.value,U);if(Hr===null){ne===null&&(ne=et);break}i&&ne&&Hr.alternate===null&&o(I,ne),T=p(Hr,T,ce),re===null?Z=Hr:re.sibling=Hr,re=Hr,ne=et}if(de.done)return a(I,ne),_e&&yi(I,ce),Z;if(ne===null){for(;!de.done;ce++,de=F.next())de=te(I,de.value,U),de!==null&&(T=p(de,T,ce),re===null?Z=de:re.sibling=de,re=de);return _e&&yi(I,ce),Z}for(ne=c(I,ne);!de.done;ce++,de=F.next())de=Se(ne,I,ce,de.value,U),de!==null&&(i&&de.alternate!==null&&ne.delete(de.key===null?ce:de.key),T=p(de,T,ce),re===null?Z=de:re.sibling=de,re=de);return i&&ne.forEach(function(tE){return o(I,tE)}),_e&&yi(I,ce),Z}function gr(I,T,F,U){if(typeof F=="object"&&F!==null&&F.type===m&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case f:e:{for(var Z=F.key,re=T;re!==null;){if(re.key===Z){if(Z=F.type,Z===m){if(re.tag===7){a(I,re.sibling),T=d(re,F.props.children),T.return=I,I=T;break e}}else if(re.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===_&&Im(Z)===re.type){a(I,re.sibling),T=d(re,F.props),T.ref=cs(I,re,F),T.return=I,I=T;break e}a(I,re);break}else o(I,re);re=re.sibling}F.type===m?(T=ki(F.props.children,I.mode,U,F.key),T.return=I,I=T):(U=Ta(F.type,F.key,F.props,null,I.mode,U),U.ref=cs(I,T,F),U.return=I,I=U)}return y(I);case g:e:{for(re=F.key;T!==null;){if(T.key===re)if(T.tag===4&&T.stateNode.containerInfo===F.containerInfo&&T.stateNode.implementation===F.implementation){a(I,T.sibling),T=d(T,F.children||[]),T.return=I,I=T;break e}else{a(I,T);break}else o(I,T);T=T.sibling}T=Kd(F,I.mode,U),T.return=I,I=T}return y(I);case _:return re=F._init,gr(I,T,re(F._payload),U)}if(xt(F))return pe(I,T,F,U);if(z(F))return Mt(I,T,F,U);ta(I,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,T!==null&&T.tag===6?(a(I,T.sibling),T=d(T,F),T.return=I,I=T):(a(I,T),T=Zd(F,I.mode,U),T.return=I,I=T),y(I)):a(I,T)}return gr}var lo=Lm(!0),Nm=Lm(!1),ds={},ln=Or(ds),hs=Or(ds),ao=Or(ds);function Un(i){if(i===ds)throw Error(u(174));return i}function ud(i,o){ge(ao,o),ge(hs,i),ge(ln,ds),i=Ir(o),we(ln),ge(ln,i)}function uo(){we(ln),we(hs),we(ao)}function Om(i){var o=Un(ao.current),a=Un(ln.current);o=Lr(a,i.type,o),a!==o&&(ge(hs,i),ge(ln,o))}function cd(i){hs.current===i&&(we(ln),we(hs))}var Ce=Or(0);function na(i){for(var o=i;o!==null;){if(o.tag===13){var a=o.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||am(a)||Wc(a)))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var dd=[];function hd(){for(var i=0;i<dd.length;i++){var o=dd[i];Nr?o._workInProgressVersionPrimary=null:o._workInProgressVersionSecondary=null}dd.length=0}var ra=h.ReactCurrentDispatcher,fd=h.ReactCurrentBatchConfig,Si=0,Te=null,Ve=null,qe=null,ia=!1,fs=!1,ps=0,Cx=0;function dt(){throw Error(u(321))}function pd(i,o){if(o===null)return!1;for(var a=0;a<o.length&&a<i.length;a++)if(!En(i[a],o[a]))return!1;return!0}function md(i,o,a,c,d,p){if(Si=p,Te=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ra.current=i===null||i.memoizedState===null?Ix:Lx,i=a(c,d),fs){p=0;do{if(fs=!1,ps=0,25<=p)throw Error(u(301));p+=1,qe=Ve=null,o.updateQueue=null,ra.current=Nx,i=a(c,d)}while(fs)}if(ra.current=la,o=Ve!==null&&Ve.next!==null,Si=0,qe=Ve=Te=null,ia=!1,o)throw Error(u(300));return i}function gd(){var i=ps!==0;return ps=0,i}function Vn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Te.memoizedState=qe=i:qe=qe.next=i,qe}function an(){if(Ve===null){var i=Te.alternate;i=i!==null?i.memoizedState:null}else i=Ve.next;var o=qe===null?Te.memoizedState:qe.next;if(o!==null)qe=o,Ve=i;else{if(i===null)throw Error(u(310));Ve=i,i={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},qe===null?Te.memoizedState=qe=i:qe=qe.next=i}return qe}function ms(i,o){return typeof o=="function"?o(i):o}function vd(i){var o=an(),a=o.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=i;var c=Ve,d=c.baseQueue,p=a.pending;if(p!==null){if(d!==null){var y=d.next;d.next=p.next,p.next=y}c.baseQueue=d=p,a.pending=null}if(d!==null){p=d.next,c=c.baseState;var C=y=null,N=null,B=p;do{var X=B.lane;if((Si&X)===X)N!==null&&(N=N.next={lane:0,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),c=B.hasEagerState?B.eagerState:i(c,B.action);else{var te={lane:X,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null};N===null?(C=N=te,y=c):N=N.next=te,Te.lanes|=X,xi|=X}B=B.next}while(B!==null&&B!==p);N===null?y=c:N.next=C,En(c,o.memoizedState)||(Nt=!0),o.memoizedState=c,o.baseState=y,o.baseQueue=N,a.lastRenderedState=c}if(i=a.interleaved,i!==null){d=i;do p=d.lane,Te.lanes|=p,xi|=p,d=d.next;while(d!==i)}else d===null&&(a.lanes=0);return[o.memoizedState,a.dispatch]}function yd(i){var o=an(),a=o.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=i;var c=a.dispatch,d=a.pending,p=o.memoizedState;if(d!==null){a.pending=null;var y=d=d.next;do p=i(p,y.action),y=y.next;while(y!==d);En(p,o.memoizedState)||(Nt=!0),o.memoizedState=p,o.baseQueue===null&&(o.baseState=p),a.lastRenderedState=p}return[p,c]}function Fm(){}function Mm(i,o){var a=Te,c=an(),d=o(),p=!En(c.memoizedState,d);if(p&&(c.memoizedState=d,Nt=!0),c=c.queue,wd(Wm.bind(null,a,c,i),[i]),c.getSnapshot!==o||p||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,gs(9,Dm.bind(null,a,c,d,o),void 0,null),Je===null)throw Error(u(349));Si&30||Am(a,o,d)}return d}function Am(i,o,a){i.flags|=16384,i={getSnapshot:o,value:a},o=Te.updateQueue,o===null?(o={lastEffect:null,stores:null},Te.updateQueue=o,o.stores=[i]):(a=o.stores,a===null?o.stores=[i]:a.push(i))}function Dm(i,o,a,c){o.value=a,o.getSnapshot=c,Bm(o)&&jm(i)}function Wm(i,o,a){return a(function(){Bm(o)&&jm(i)})}function Bm(i){var o=i.getSnapshot;i=i.value;try{var a=o();return!En(i,a)}catch{return!0}}function jm(i){var o=Hn(i,1);o!==null&&un(o,i,1,-1)}function bm(i){var o=Vn();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:i},o.queue=i,i=i.dispatch=zx.bind(null,Te,i),[o.memoizedState,i]}function gs(i,o,a,c){return i={tag:i,create:o,destroy:a,deps:c,next:null},o=Te.updateQueue,o===null?(o={lastEffect:null,stores:null},Te.updateQueue=o,o.lastEffect=i.next=i):(a=o.lastEffect,a===null?o.lastEffect=i.next=i:(c=a.next,a.next=i,i.next=c,o.lastEffect=i)),i}function Hm(){return an().memoizedState}function oa(i,o,a,c){var d=Vn();Te.flags|=i,d.memoizedState=gs(1|o,a,void 0,c===void 0?null:c)}function sa(i,o,a,c){var d=an();c=c===void 0?null:c;var p=void 0;if(Ve!==null){var y=Ve.memoizedState;if(p=y.destroy,c!==null&&pd(c,y.deps)){d.memoizedState=gs(o,a,p,c);return}}Te.flags|=i,d.memoizedState=gs(1|o,a,p,c)}function Um(i,o){return oa(8390656,8,i,o)}function wd(i,o){return sa(2048,8,i,o)}function Vm(i,o){return sa(4,2,i,o)}function Qm(i,o){return sa(4,4,i,o)}function Gm(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Xm(i,o,a){return a=a!=null?a.concat([i]):null,sa(4,4,Gm.bind(null,o,i),a)}function Sd(){}function Ym(i,o){var a=an();o=o===void 0?null:o;var c=a.memoizedState;return c!==null&&o!==null&&pd(o,c[1])?c[0]:(a.memoizedState=[i,o],i)}function Zm(i,o){var a=an();o=o===void 0?null:o;var c=a.memoizedState;return c!==null&&o!==null&&pd(o,c[1])?c[0]:(i=i(),a.memoizedState=[i,o],i)}function Km(i,o,a){return Si&21?(En(a,o)||(a=hm(),Te.lanes|=a,xi|=a,i.baseState=!0),o):(i.baseState&&(i.baseState=!1,Nt=!0),i.memoizedState=a)}function Tx(i,o){var a=ue;ue=a!==0&&4>a?a:4,i(!0);var c=fd.transition;fd.transition={};try{i(!1),o()}finally{ue=a,fd.transition=c}}function $m(){return an().memoizedState}function Rx(i,o,a){var c=Br(i);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},qm(i))Jm(o,a);else if(a=Em(i,o,a,c),a!==null){var d=pt();un(a,i,c,d),eg(a,o,c)}}function zx(i,o,a){var c=Br(i),d={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(qm(i))Jm(o,d);else{var p=i.alternate;if(i.lanes===0&&(p===null||p.lanes===0)&&(p=o.lastRenderedReducer,p!==null))try{var y=o.lastRenderedState,C=p(y,a);if(d.hasEagerState=!0,d.eagerState=C,En(C,y)){var N=o.interleaved;N===null?(d.next=d,od(o)):(d.next=N.next,N.next=d),o.interleaved=d;return}}catch{}finally{}a=Em(i,o,d,c),a!==null&&(d=pt(),un(a,i,c,d),eg(a,o,c))}}function qm(i){var o=i.alternate;return i===Te||o!==null&&o===Te}function Jm(i,o){fs=ia=!0;var a=i.pending;a===null?o.next=o:(o.next=a.next,a.next=o),i.pending=o}function eg(i,o,a){if(a&4194240){var c=o.lanes;c&=i.pendingLanes,a|=c,o.lanes=a,Qc(i,a)}}var la={readContext:sn,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},Ix={readContext:sn,useCallback:function(i,o){return Vn().memoizedState=[i,o===void 0?null:o],i},useContext:sn,useEffect:Um,useImperativeHandle:function(i,o,a){return a=a!=null?a.concat([i]):null,oa(4194308,4,Gm.bind(null,o,i),a)},useLayoutEffect:function(i,o){return oa(4194308,4,i,o)},useInsertionEffect:function(i,o){return oa(4,2,i,o)},useMemo:function(i,o){var a=Vn();return o=o===void 0?null:o,i=i(),a.memoizedState=[i,o],i},useReducer:function(i,o,a){var c=Vn();return o=a!==void 0?a(o):o,c.memoizedState=c.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},c.queue=i,i=i.dispatch=Rx.bind(null,Te,i),[c.memoizedState,i]},useRef:function(i){var o=Vn();return i={current:i},o.memoizedState=i},useState:bm,useDebugValue:Sd,useDeferredValue:function(i){return Vn().memoizedState=i},useTransition:function(){var i=bm(!1),o=i[0];return i=Tx.bind(null,i[1]),Vn().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,a){var c=Te,d=Vn();if(_e){if(a===void 0)throw Error(u(407));a=a()}else{if(a=o(),Je===null)throw Error(u(349));Si&30||Am(c,o,a)}d.memoizedState=a;var p={value:a,getSnapshot:o};return d.queue=p,Um(Wm.bind(null,c,p,i),[i]),c.flags|=2048,gs(9,Dm.bind(null,c,p,a,o),void 0,null),a},useId:function(){var i=Vn(),o=Je.identifierPrefix;if(_e){var a=hr,c=dr;a=(c&~(1<<32-xn(c)-1)).toString(32)+a,o=":"+o+"R"+a,a=ps++,0<a&&(o+="H"+a.toString(32)),o+=":"}else a=Cx++,o=":"+o+"r"+a.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},Lx={readContext:sn,useCallback:Ym,useContext:sn,useEffect:wd,useImperativeHandle:Xm,useInsertionEffect:Vm,useLayoutEffect:Qm,useMemo:Zm,useReducer:vd,useRef:Hm,useState:function(){return vd(ms)},useDebugValue:Sd,useDeferredValue:function(i){var o=an();return Km(o,Ve.memoizedState,i)},useTransition:function(){var i=vd(ms)[0],o=an().memoizedState;return[i,o]},useMutableSource:Fm,useSyncExternalStore:Mm,useId:$m,unstable_isNewReconciler:!1},Nx={readContext:sn,useCallback:Ym,useContext:sn,useEffect:wd,useImperativeHandle:Xm,useInsertionEffect:Vm,useLayoutEffect:Qm,useMemo:Zm,useReducer:yd,useRef:Hm,useState:function(){return yd(ms)},useDebugValue:Sd,useDeferredValue:function(i){var o=an();return Ve===null?o.memoizedState=i:Km(o,Ve.memoizedState,i)},useTransition:function(){var i=yd(ms)[0],o=an().memoizedState;return[i,o]},useMutableSource:Fm,useSyncExternalStore:Mm,useId:$m,unstable_isNewReconciler:!1};function co(i,o){try{var a="",c=o;do a+=kx(c),c=c.return;while(c);var d=a}catch(p){d=`
|
|
5
|
+
`+d[y].replace(" at new "," at ");return i.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",i.displayName)),N}while(1<=y&&0<=C);break}}}finally{jc=!1,Error.prepareStackTrace=a}return(i=i?i.displayName||i.name:"")?ss(i):""}var cx=Object.prototype.hasOwnProperty,Hc=[],eo=-1;function Or(i){return{current:i}}function we(i){0>eo||(i.current=Hc[eo],Hc[eo]=null,eo--)}function me(i,o){eo++,Hc[eo]=i.current,i.current=o}var Fr={},dt=Or(Fr),It=Or(!1),gi=Fr;function to(i,o){var a=i.type.contextTypes;if(!a)return Fr;var c=i.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in a)d[p]=o[p];return c&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=d),d}function Lt(i){return i=i.childContextTypes,i!=null}function Bl(){we(It),we(dt)}function um(i,o,a){if(dt.current!==Fr)throw Error(u(168));me(dt,o),me(It,a)}function cm(i,o,a){var c=i.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var d in c)if(!(d in o))throw Error(u(108,b(i)||"Unknown",d));return l({},a,c)}function jl(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Fr,gi=dt.current,me(dt,i),me(It,It.current),!0}function dm(i,o,a){var c=i.stateNode;if(!c)throw Error(u(169));a?(i=cm(i,o,gi),c.__reactInternalMemoizedMergedChildContext=i,we(It),we(dt),me(dt,i)):we(It),me(It,a)}var xn=Math.clz32?Math.clz32:fx,dx=Math.log,hx=Math.LN2;function fx(i){return i>>>=0,i===0?32:31-(dx(i)/hx|0)|0}var bl=64,Hl=4194304;function ls(i){switch(i&-i){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: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Ul(i,o){var a=i.pendingLanes;if(a===0)return 0;var c=0,d=i.suspendedLanes,p=i.pingedLanes,y=a&268435455;if(y!==0){var C=y&~d;C!==0?c=ls(C):(p&=y,p!==0&&(c=ls(p)))}else y=a&~d,y!==0?c=ls(y):p!==0&&(c=ls(p));if(c===0)return 0;if(o!==0&&o!==c&&!(o&d)&&(d=c&-c,p=o&-o,d>=p||d===16&&(p&4194240)!==0))return o;if(c&4&&(c|=a&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=c;0<o;)a=31-xn(o),d=1<<a,c|=i[a],o&=~d;return c}function px(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mx(i,o){for(var a=i.suspendedLanes,c=i.pingedLanes,d=i.expirationTimes,p=i.pendingLanes;0<p;){var y=31-xn(p),C=1<<y,N=d[y];N===-1?(!(C&a)||C&c)&&(d[y]=px(C,o)):N<=o&&(i.expiredLanes|=C),p&=~C}}function Uc(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function hm(){var i=bl;return bl<<=1,!(bl&4194240)&&(bl=64),i}function Vc(i){for(var o=[],a=0;31>a;a++)o.push(i);return o}function as(i,o,a){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-xn(o),i[o]=a}function gx(i,o){var a=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var c=i.eventTimes;for(i=i.expirationTimes;0<a;){var d=31-xn(a),p=1<<d;o[d]=0,c[d]=-1,i[d]=-1,a&=~p}}function Qc(i,o){var a=i.entangledLanes|=o;for(i=i.entanglements;a;){var c=31-xn(a),d=1<<c;d&o|i[c]&o&&(i[c]|=o),a&=~d}}var ue=0;function fm(i){return i&=-i,1<i?4<i?i&268435455?16:536870912:4:1}var Gc=s.unstable_scheduleCallback,pm=s.unstable_cancelCallback,vx=s.unstable_shouldYield,yx=s.unstable_requestPaint,$e=s.unstable_now,Xc=s.unstable_ImmediatePriority,wx=s.unstable_UserBlockingPriority,Yc=s.unstable_NormalPriority,Sx=s.unstable_IdlePriority,Vl=null,jn=null;function xx(i){if(jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(Vl,i,void 0,(i.current.flags&128)===128)}catch{}}function Ex(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var En=typeof Object.is=="function"?Object.is:Ex,cr=null,Ql=!1,Zc=!1;function mm(i){cr===null?cr=[i]:cr.push(i)}function _x(i){Ql=!0,mm(i)}function bn(){if(!Zc&&cr!==null){Zc=!0;var i=0,o=ue;try{var a=cr;for(ue=1;i<a.length;i++){var c=a[i];do c=c(!0);while(c!==null)}cr=null,Ql=!1}catch(d){throw cr!==null&&(cr=cr.slice(i+1)),Gc(Xc,bn),d}finally{ue=o,Zc=!1}}return null}var no=[],ro=0,Gl=null,Xl=0,nn=[],rn=0,vi=null,dr=1,hr="";function yi(i,o){no[ro++]=Xl,no[ro++]=Gl,Gl=i,Xl=o}function gm(i,o,a){nn[rn++]=dr,nn[rn++]=hr,nn[rn++]=vi,vi=i;var c=dr;i=hr;var d=32-xn(c)-1;c&=~(1<<d),a+=1;var p=32-xn(o)+d;if(30<p){var y=d-d%5;p=(c&(1<<y)-1).toString(32),c>>=y,d-=y,dr=1<<32-xn(o)+d|a<<d|c,hr=p+i}else dr=1<<p|a<<d|c,hr=i}function Kc(i){i.return!==null&&(yi(i,1),gm(i,1,0))}function $c(i){for(;i===Gl;)Gl=no[--ro],no[ro]=null,Xl=no[--ro],no[ro]=null;for(;i===vi;)vi=nn[--rn],nn[rn]=null,hr=nn[--rn],nn[rn]=null,dr=nn[--rn],nn[rn]=null}var Ut=null,on=null,_e=!1,us=!1,_n=null;function vm(i,o){var a=cn(5,null,null,0);a.elementType="DELETED",a.stateNode=o,a.return=i,o=i.deletions,o===null?(i.deletions=[a],i.flags|=16):o.push(a)}function ym(i,o){switch(i.tag){case 5:return o=QS(o,i.type,i.pendingProps),o!==null?(i.stateNode=o,Ut=i,on=KS(o),!0):!1;case 6:return o=GS(o,i.pendingProps),o!==null?(i.stateNode=o,Ut=i,on=null,!0):!1;case 13:if(o=XS(o),o!==null){var a=vi!==null?{id:dr,overflow:hr}:null;return i.memoizedState={dehydrated:o,treeContext:a,retryLane:1073741824},a=cn(18,null,null,0),a.stateNode=o,a.return=i,i.child=a,Ut=i,on=null,!0}return!1;default:return!1}}function qc(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Jc(i){if(_e){var o=on;if(o){var a=o;if(!ym(i,o)){if(qc(i))throw Error(u(418));o=Wl(a);var c=Ut;o&&ym(i,o)?vm(c,a):(i.flags=i.flags&-4097|2,_e=!1,Ut=i)}}else{if(qc(i))throw Error(u(418));i.flags=i.flags&-4097|2,_e=!1,Ut=i}}}function wm(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Ut=i}function Yl(i){if(!J||i!==Ut)return!1;if(!_e)return wm(i),_e=!0,!1;if(i.tag!==3&&(i.tag!==5||lx(i.type)&&!Ji(i.type,i.memoizedProps))){var o=on;if(o){if(qc(i))throw Sm(),Error(u(418));for(;o;)vm(i,o),o=Wl(o)}}if(wm(i),i.tag===13){if(!J)throw Error(u(316));if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));on=nx(i)}else on=Ut?Wl(i.stateNode):null;return!0}function Sm(){for(var i=on;i;)i=Wl(i)}function io(){J&&(on=Ut=null,us=_e=!1)}function ed(i){_n===null?_n=[i]:_n.push(i)}var Px=h.ReactCurrentBatchConfig;function Zl(i,o){if(En(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var a=Object.keys(i),c=Object.keys(o);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var d=a[c];if(!cx.call(o,d)||!En(i[d],o[d]))return!1}return!0}function kx(i){switch(i.tag){case 5:return ss(i.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return i=bc(i.type,!1),i;case 11:return i=bc(i.type.render,!1),i;case 1:return i=bc(i.type,!0),i;default:return""}}function Pn(i,o){if(i&&i.defaultProps){o=l({},o),i=i.defaultProps;for(var a in i)o[a]===void 0&&(o[a]=i[a]);return o}return o}var Kl=Or(null),$l=null,oo=null,td=null;function nd(){td=oo=$l=null}function xm(i,o,a){Nr?(me(Kl,o._currentValue),o._currentValue=a):(me(Kl,o._currentValue2),o._currentValue2=a)}function rd(i){var o=Kl.current;we(Kl),Nr?i._currentValue=o:i._currentValue2=o}function id(i,o,a){for(;i!==null;){var c=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),i===a)break;i=i.return}}function so(i,o){$l=i,td=oo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&o&&(Nt=!0),i.firstContext=null)}function sn(i){var o=Nr?i._currentValue:i._currentValue2;if(td!==i)if(i={context:i,memoizedValue:o,next:null},oo===null){if($l===null)throw Error(u(308));oo=i,$l.dependencies={lanes:0,firstContext:i}}else oo=oo.next=i;return o}var wi=null;function od(i){wi===null?wi=[i]:wi.push(i)}function Em(i,o,a,c){var d=o.interleaved;return d===null?(a.next=a,od(o)):(a.next=d.next,d.next=a),o.interleaved=a,Hn(i,c)}function Hn(i,o){i.lanes|=o;var a=i.alternate;for(a!==null&&(a.lanes|=o),a=i,i=i.return;i!==null;)i.childLanes|=o,a=i.alternate,a!==null&&(a.childLanes|=o),a=i,i=i.return;return a.tag===3?a.stateNode:null}var Mr=!1;function sd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _m(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function fr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ar(i,o,a){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,ie&2){var d=c.pending;return d===null?o.next=o:(o.next=d.next,d.next=o),c.pending=o,Hn(i,a)}return d=c.interleaved,d===null?(o.next=o,od(c)):(o.next=d.next,d.next=o),c.interleaved=o,Hn(i,a)}function ql(i,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194240)!==0)){var c=o.lanes;c&=i.pendingLanes,a|=c,o.lanes=a,Qc(i,a)}}function Pm(i,o){var a=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var d=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var y={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};p===null?d=p=y:p=p.next=y,a=a.next}while(a!==null);p===null?d=p=o:p=p.next=o}else d=p=o;a={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:c.shared,effects:c.effects},i.updateQueue=a;return}i=a.lastBaseUpdate,i===null?a.firstBaseUpdate=o:i.next=o,a.lastBaseUpdate=o}function Jl(i,o,a,c){var d=i.updateQueue;Mr=!1;var p=d.firstBaseUpdate,y=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var N=C,B=N.next;N.next=null,y===null?p=B:y.next=B,y=N;var X=i.alternate;X!==null&&(X=X.updateQueue,C=X.lastBaseUpdate,C!==y&&(C===null?X.firstBaseUpdate=B:C.next=B,X.lastBaseUpdate=N))}if(p!==null){var te=d.baseState;y=0,X=B=N=null,C=p;do{var H=C.lane,Se=C.eventTime;if((c&H)===H){X!==null&&(X=X.next={eventTime:Se,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var pe=i,Mt=C;switch(H=o,Se=a,Mt.tag){case 1:if(pe=Mt.payload,typeof pe=="function"){te=pe.call(Se,te,H);break e}te=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Mt.payload,H=typeof pe=="function"?pe.call(Se,te,H):pe,H==null)break e;te=l({},te,H);break e;case 2:Mr=!0}}C.callback!==null&&C.lane!==0&&(i.flags|=64,H=d.effects,H===null?d.effects=[C]:H.push(C))}else Se={eventTime:Se,lane:H,tag:C.tag,payload:C.payload,callback:C.callback,next:null},X===null?(B=X=Se,N=te):X=X.next=Se,y|=H;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;H=C,C=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);if(X===null&&(N=te),d.baseState=N,d.firstBaseUpdate=B,d.lastBaseUpdate=X,o=d.shared.interleaved,o!==null){d=o;do y|=d.lane,d=d.next;while(d!==o)}else p===null&&(d.shared.lanes=0);xi|=y,i.lanes=y,i.memoizedState=te}}function km(i,o,a){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var c=i[o],d=c.callback;if(d!==null){if(c.callback=null,c=a,typeof d!="function")throw Error(u(191,d));d.call(c)}}}var Cm=new r.Component().refs;function ld(i,o,a,c){o=i.memoizedState,a=a(c,o),a=a==null?o:l({},o,a),i.memoizedState=a,i.lanes===0&&(i.updateQueue.baseState=a)}var ea={isMounted:function(i){return(i=i._reactInternals)?q(i)===i:!1},enqueueSetState:function(i,o,a){i=i._reactInternals;var c=mt(),d=Br(i),p=fr(c,d);p.payload=o,a!=null&&(p.callback=a),o=Ar(i,p,d),o!==null&&(un(o,i,d,c),ql(o,i,d))},enqueueReplaceState:function(i,o,a){i=i._reactInternals;var c=mt(),d=Br(i),p=fr(c,d);p.tag=1,p.payload=o,a!=null&&(p.callback=a),o=Ar(i,p,d),o!==null&&(un(o,i,d,c),ql(o,i,d))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var a=mt(),c=Br(i),d=fr(a,c);d.tag=2,o!=null&&(d.callback=o),o=Ar(i,d,c),o!==null&&(un(o,i,c,a),ql(o,i,c))}};function Tm(i,o,a,c,d,p,y){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,p,y):o.prototype&&o.prototype.isPureReactComponent?!Zl(a,c)||!Zl(d,p):!0}function Rm(i,o,a){var c=!1,d=Fr,p=o.contextType;return typeof p=="object"&&p!==null?p=sn(p):(d=Lt(o)?gi:dt.current,c=o.contextTypes,p=(c=c!=null)?to(i,d):Fr),o=new o(a,p),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ea,i.stateNode=o,o._reactInternals=i,c&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=d,i.__reactInternalMemoizedMaskedChildContext=p),o}function zm(i,o,a,c){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(a,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(a,c),o.state!==i&&ea.enqueueReplaceState(o,o.state,null)}function ad(i,o,a,c){var d=i.stateNode;d.props=a,d.state=i.memoizedState,d.refs=Cm,sd(i);var p=o.contextType;typeof p=="object"&&p!==null?d.context=sn(p):(p=Lt(o)?gi:dt.current,d.context=to(i,p)),d.state=i.memoizedState,p=o.getDerivedStateFromProps,typeof p=="function"&&(ld(i,o,p,a),d.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(o=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),o!==d.state&&ea.enqueueReplaceState(d,d.state,null),Jl(i,a,d,c),d.state=i.memoizedState),typeof d.componentDidMount=="function"&&(i.flags|=4194308)}function cs(i,o,a){if(i=a.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(u(309));var c=a.stateNode}if(!c)throw Error(u(147,i));var d=c,p=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===p?o.ref:(o=function(y){var C=d.refs;C===Cm&&(C=d.refs={}),y===null?delete C[p]:C[p]=y},o._stringRef=p,o)}if(typeof i!="string")throw Error(u(284));if(!a._owner)throw Error(u(290,i))}return i}function ta(i,o){throw i=Object.prototype.toString.call(o),Error(u(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Im(i){var o=i._init;return o(i._payload)}function Lm(i){function o(I,T){if(i){var F=I.deletions;F===null?(I.deletions=[T],I.flags|=16):F.push(T)}}function a(I,T){if(!i)return null;for(;T!==null;)o(I,T),T=T.sibling;return null}function c(I,T){for(I=new Map;T!==null;)T.key!==null?I.set(T.key,T):I.set(T.index,T),T=T.sibling;return I}function d(I,T){return I=br(I,T),I.index=0,I.sibling=null,I}function p(I,T,F){return I.index=F,i?(F=I.alternate,F!==null?(F=F.index,F<T?(I.flags|=2,T):F):(I.flags|=2,T)):(I.flags|=1048576,T)}function y(I){return i&&I.alternate===null&&(I.flags|=2),I}function C(I,T,F,U){return T===null||T.tag!==6?(T=Zd(F,I.mode,U),T.return=I,T):(T=d(T,F),T.return=I,T)}function N(I,T,F,U){var Z=F.type;return Z===m?X(I,T,F.props.children,U,F.key):T!==null&&(T.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===_&&Im(Z)===T.type)?(U=d(T,F.props),U.ref=cs(I,T,F),U.return=I,U):(U=Ta(F.type,F.key,F.props,null,I.mode,U),U.ref=cs(I,T,F),U.return=I,U)}function B(I,T,F,U){return T===null||T.tag!==4||T.stateNode.containerInfo!==F.containerInfo||T.stateNode.implementation!==F.implementation?(T=Kd(F,I.mode,U),T.return=I,T):(T=d(T,F.children||[]),T.return=I,T)}function X(I,T,F,U,Z){return T===null||T.tag!==7?(T=ki(F,I.mode,U,Z),T.return=I,T):(T=d(T,F),T.return=I,T)}function te(I,T,F){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Zd(""+T,I.mode,F),T.return=I,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case f:return F=Ta(T.type,T.key,T.props,null,I.mode,F),F.ref=cs(I,null,T),F.return=I,F;case g:return T=Kd(T,I.mode,F),T.return=I,T;case _:var U=T._init;return te(I,U(T._payload),F)}if(Et(T)||z(T))return T=ki(T,I.mode,F,null),T.return=I,T;ta(I,T)}return null}function H(I,T,F,U){var Z=T!==null?T.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return Z!==null?null:C(I,T,""+F,U);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case f:return F.key===Z?N(I,T,F,U):null;case g:return F.key===Z?B(I,T,F,U):null;case _:return Z=F._init,H(I,T,Z(F._payload),U)}if(Et(F)||z(F))return Z!==null?null:X(I,T,F,U,null);ta(I,F)}return null}function Se(I,T,F,U,Z){if(typeof U=="string"&&U!==""||typeof U=="number")return I=I.get(F)||null,C(T,I,""+U,Z);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case f:return I=I.get(U.key===null?F:U.key)||null,N(T,I,U,Z);case g:return I=I.get(U.key===null?F:U.key)||null,B(T,I,U,Z);case _:var re=U._init;return Se(I,T,F,re(U._payload),Z)}if(Et(U)||z(U))return I=I.get(F)||null,X(T,I,U,Z,null);ta(T,U)}return null}function pe(I,T,F,U){for(var Z=null,re=null,ne=T,ce=T=0,et=null;ne!==null&&ce<F.length;ce++){ne.index>ce?(et=ne,ne=null):et=ne.sibling;var de=H(I,ne,F[ce],U);if(de===null){ne===null&&(ne=et);break}i&&ne&&de.alternate===null&&o(I,ne),T=p(de,T,ce),re===null?Z=de:re.sibling=de,re=de,ne=et}if(ce===F.length)return a(I,ne),_e&&yi(I,ce),Z;if(ne===null){for(;ce<F.length;ce++)ne=te(I,F[ce],U),ne!==null&&(T=p(ne,T,ce),re===null?Z=ne:re.sibling=ne,re=ne);return _e&&yi(I,ce),Z}for(ne=c(I,ne);ce<F.length;ce++)et=Se(ne,I,ce,F[ce],U),et!==null&&(i&&et.alternate!==null&&ne.delete(et.key===null?ce:et.key),T=p(et,T,ce),re===null?Z=et:re.sibling=et,re=et);return i&&ne.forEach(function(Hr){return o(I,Hr)}),_e&&yi(I,ce),Z}function Mt(I,T,F,U){var Z=z(F);if(typeof Z!="function")throw Error(u(150));if(F=Z.call(F),F==null)throw Error(u(151));for(var re=Z=null,ne=T,ce=T=0,et=null,de=F.next();ne!==null&&!de.done;ce++,de=F.next()){ne.index>ce?(et=ne,ne=null):et=ne.sibling;var Hr=H(I,ne,de.value,U);if(Hr===null){ne===null&&(ne=et);break}i&&ne&&Hr.alternate===null&&o(I,ne),T=p(Hr,T,ce),re===null?Z=Hr:re.sibling=Hr,re=Hr,ne=et}if(de.done)return a(I,ne),_e&&yi(I,ce),Z;if(ne===null){for(;!de.done;ce++,de=F.next())de=te(I,de.value,U),de!==null&&(T=p(de,T,ce),re===null?Z=de:re.sibling=de,re=de);return _e&&yi(I,ce),Z}for(ne=c(I,ne);!de.done;ce++,de=F.next())de=Se(ne,I,ce,de.value,U),de!==null&&(i&&de.alternate!==null&&ne.delete(de.key===null?ce:de.key),T=p(de,T,ce),re===null?Z=de:re.sibling=de,re=de);return i&&ne.forEach(function(tE){return o(I,tE)}),_e&&yi(I,ce),Z}function gr(I,T,F,U){if(typeof F=="object"&&F!==null&&F.type===m&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case f:e:{for(var Z=F.key,re=T;re!==null;){if(re.key===Z){if(Z=F.type,Z===m){if(re.tag===7){a(I,re.sibling),T=d(re,F.props.children),T.return=I,I=T;break e}}else if(re.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===_&&Im(Z)===re.type){a(I,re.sibling),T=d(re,F.props),T.ref=cs(I,re,F),T.return=I,I=T;break e}a(I,re);break}else o(I,re);re=re.sibling}F.type===m?(T=ki(F.props.children,I.mode,U,F.key),T.return=I,I=T):(U=Ta(F.type,F.key,F.props,null,I.mode,U),U.ref=cs(I,T,F),U.return=I,I=U)}return y(I);case g:e:{for(re=F.key;T!==null;){if(T.key===re)if(T.tag===4&&T.stateNode.containerInfo===F.containerInfo&&T.stateNode.implementation===F.implementation){a(I,T.sibling),T=d(T,F.children||[]),T.return=I,I=T;break e}else{a(I,T);break}else o(I,T);T=T.sibling}T=Kd(F,I.mode,U),T.return=I,I=T}return y(I);case _:return re=F._init,gr(I,T,re(F._payload),U)}if(Et(F))return pe(I,T,F,U);if(z(F))return Mt(I,T,F,U);ta(I,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,T!==null&&T.tag===6?(a(I,T.sibling),T=d(T,F),T.return=I,I=T):(a(I,T),T=Zd(F,I.mode,U),T.return=I,I=T),y(I)):a(I,T)}return gr}var lo=Lm(!0),Nm=Lm(!1),ds={},ln=Or(ds),hs=Or(ds),ao=Or(ds);function Un(i){if(i===ds)throw Error(u(174));return i}function ud(i,o){me(ao,o),me(hs,i),me(ln,ds),i=Ir(o),we(ln),me(ln,i)}function uo(){we(ln),we(hs),we(ao)}function Om(i){var o=Un(ao.current),a=Un(ln.current);o=Lr(a,i.type,o),a!==o&&(me(hs,i),me(ln,o))}function cd(i){hs.current===i&&(we(ln),we(hs))}var Ce=Or(0);function na(i){for(var o=i;o!==null;){if(o.tag===13){var a=o.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||am(a)||Wc(a)))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var dd=[];function hd(){for(var i=0;i<dd.length;i++){var o=dd[i];Nr?o._workInProgressVersionPrimary=null:o._workInProgressVersionSecondary=null}dd.length=0}var ra=h.ReactCurrentDispatcher,fd=h.ReactCurrentBatchConfig,Si=0,Te=null,Ve=null,qe=null,ia=!1,fs=!1,ps=0,Cx=0;function ht(){throw Error(u(321))}function pd(i,o){if(o===null)return!1;for(var a=0;a<o.length&&a<i.length;a++)if(!En(i[a],o[a]))return!1;return!0}function md(i,o,a,c,d,p){if(Si=p,Te=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ra.current=i===null||i.memoizedState===null?Ix:Lx,i=a(c,d),fs){p=0;do{if(fs=!1,ps=0,25<=p)throw Error(u(301));p+=1,qe=Ve=null,o.updateQueue=null,ra.current=Nx,i=a(c,d)}while(fs)}if(ra.current=la,o=Ve!==null&&Ve.next!==null,Si=0,qe=Ve=Te=null,ia=!1,o)throw Error(u(300));return i}function gd(){var i=ps!==0;return ps=0,i}function Vn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Te.memoizedState=qe=i:qe=qe.next=i,qe}function an(){if(Ve===null){var i=Te.alternate;i=i!==null?i.memoizedState:null}else i=Ve.next;var o=qe===null?Te.memoizedState:qe.next;if(o!==null)qe=o,Ve=i;else{if(i===null)throw Error(u(310));Ve=i,i={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},qe===null?Te.memoizedState=qe=i:qe=qe.next=i}return qe}function ms(i,o){return typeof o=="function"?o(i):o}function vd(i){var o=an(),a=o.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=i;var c=Ve,d=c.baseQueue,p=a.pending;if(p!==null){if(d!==null){var y=d.next;d.next=p.next,p.next=y}c.baseQueue=d=p,a.pending=null}if(d!==null){p=d.next,c=c.baseState;var C=y=null,N=null,B=p;do{var X=B.lane;if((Si&X)===X)N!==null&&(N=N.next={lane:0,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),c=B.hasEagerState?B.eagerState:i(c,B.action);else{var te={lane:X,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null};N===null?(C=N=te,y=c):N=N.next=te,Te.lanes|=X,xi|=X}B=B.next}while(B!==null&&B!==p);N===null?y=c:N.next=C,En(c,o.memoizedState)||(Nt=!0),o.memoizedState=c,o.baseState=y,o.baseQueue=N,a.lastRenderedState=c}if(i=a.interleaved,i!==null){d=i;do p=d.lane,Te.lanes|=p,xi|=p,d=d.next;while(d!==i)}else d===null&&(a.lanes=0);return[o.memoizedState,a.dispatch]}function yd(i){var o=an(),a=o.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=i;var c=a.dispatch,d=a.pending,p=o.memoizedState;if(d!==null){a.pending=null;var y=d=d.next;do p=i(p,y.action),y=y.next;while(y!==d);En(p,o.memoizedState)||(Nt=!0),o.memoizedState=p,o.baseQueue===null&&(o.baseState=p),a.lastRenderedState=p}return[p,c]}function Fm(){}function Mm(i,o){var a=Te,c=an(),d=o(),p=!En(c.memoizedState,d);if(p&&(c.memoizedState=d,Nt=!0),c=c.queue,wd(Wm.bind(null,a,c,i),[i]),c.getSnapshot!==o||p||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,gs(9,Dm.bind(null,a,c,d,o),void 0,null),Je===null)throw Error(u(349));Si&30||Am(a,o,d)}return d}function Am(i,o,a){i.flags|=16384,i={getSnapshot:o,value:a},o=Te.updateQueue,o===null?(o={lastEffect:null,stores:null},Te.updateQueue=o,o.stores=[i]):(a=o.stores,a===null?o.stores=[i]:a.push(i))}function Dm(i,o,a,c){o.value=a,o.getSnapshot=c,Bm(o)&&jm(i)}function Wm(i,o,a){return a(function(){Bm(o)&&jm(i)})}function Bm(i){var o=i.getSnapshot;i=i.value;try{var a=o();return!En(i,a)}catch{return!0}}function jm(i){var o=Hn(i,1);o!==null&&un(o,i,1,-1)}function bm(i){var o=Vn();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:i},o.queue=i,i=i.dispatch=zx.bind(null,Te,i),[o.memoizedState,i]}function gs(i,o,a,c){return i={tag:i,create:o,destroy:a,deps:c,next:null},o=Te.updateQueue,o===null?(o={lastEffect:null,stores:null},Te.updateQueue=o,o.lastEffect=i.next=i):(a=o.lastEffect,a===null?o.lastEffect=i.next=i:(c=a.next,a.next=i,i.next=c,o.lastEffect=i)),i}function Hm(){return an().memoizedState}function oa(i,o,a,c){var d=Vn();Te.flags|=i,d.memoizedState=gs(1|o,a,void 0,c===void 0?null:c)}function sa(i,o,a,c){var d=an();c=c===void 0?null:c;var p=void 0;if(Ve!==null){var y=Ve.memoizedState;if(p=y.destroy,c!==null&&pd(c,y.deps)){d.memoizedState=gs(o,a,p,c);return}}Te.flags|=i,d.memoizedState=gs(1|o,a,p,c)}function Um(i,o){return oa(8390656,8,i,o)}function wd(i,o){return sa(2048,8,i,o)}function Vm(i,o){return sa(4,2,i,o)}function Qm(i,o){return sa(4,4,i,o)}function Gm(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Xm(i,o,a){return a=a!=null?a.concat([i]):null,sa(4,4,Gm.bind(null,o,i),a)}function Sd(){}function Ym(i,o){var a=an();o=o===void 0?null:o;var c=a.memoizedState;return c!==null&&o!==null&&pd(o,c[1])?c[0]:(a.memoizedState=[i,o],i)}function Zm(i,o){var a=an();o=o===void 0?null:o;var c=a.memoizedState;return c!==null&&o!==null&&pd(o,c[1])?c[0]:(i=i(),a.memoizedState=[i,o],i)}function Km(i,o,a){return Si&21?(En(a,o)||(a=hm(),Te.lanes|=a,xi|=a,i.baseState=!0),o):(i.baseState&&(i.baseState=!1,Nt=!0),i.memoizedState=a)}function Tx(i,o){var a=ue;ue=a!==0&&4>a?a:4,i(!0);var c=fd.transition;fd.transition={};try{i(!1),o()}finally{ue=a,fd.transition=c}}function $m(){return an().memoizedState}function Rx(i,o,a){var c=Br(i);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},qm(i))Jm(o,a);else if(a=Em(i,o,a,c),a!==null){var d=mt();un(a,i,c,d),eg(a,o,c)}}function zx(i,o,a){var c=Br(i),d={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(qm(i))Jm(o,d);else{var p=i.alternate;if(i.lanes===0&&(p===null||p.lanes===0)&&(p=o.lastRenderedReducer,p!==null))try{var y=o.lastRenderedState,C=p(y,a);if(d.hasEagerState=!0,d.eagerState=C,En(C,y)){var N=o.interleaved;N===null?(d.next=d,od(o)):(d.next=N.next,N.next=d),o.interleaved=d;return}}catch{}finally{}a=Em(i,o,d,c),a!==null&&(d=mt(),un(a,i,c,d),eg(a,o,c))}}function qm(i){var o=i.alternate;return i===Te||o!==null&&o===Te}function Jm(i,o){fs=ia=!0;var a=i.pending;a===null?o.next=o:(o.next=a.next,a.next=o),i.pending=o}function eg(i,o,a){if(a&4194240){var c=o.lanes;c&=i.pendingLanes,a|=c,o.lanes=a,Qc(i,a)}}var la={readContext:sn,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},Ix={readContext:sn,useCallback:function(i,o){return Vn().memoizedState=[i,o===void 0?null:o],i},useContext:sn,useEffect:Um,useImperativeHandle:function(i,o,a){return a=a!=null?a.concat([i]):null,oa(4194308,4,Gm.bind(null,o,i),a)},useLayoutEffect:function(i,o){return oa(4194308,4,i,o)},useInsertionEffect:function(i,o){return oa(4,2,i,o)},useMemo:function(i,o){var a=Vn();return o=o===void 0?null:o,i=i(),a.memoizedState=[i,o],i},useReducer:function(i,o,a){var c=Vn();return o=a!==void 0?a(o):o,c.memoizedState=c.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},c.queue=i,i=i.dispatch=Rx.bind(null,Te,i),[c.memoizedState,i]},useRef:function(i){var o=Vn();return i={current:i},o.memoizedState=i},useState:bm,useDebugValue:Sd,useDeferredValue:function(i){return Vn().memoizedState=i},useTransition:function(){var i=bm(!1),o=i[0];return i=Tx.bind(null,i[1]),Vn().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,a){var c=Te,d=Vn();if(_e){if(a===void 0)throw Error(u(407));a=a()}else{if(a=o(),Je===null)throw Error(u(349));Si&30||Am(c,o,a)}d.memoizedState=a;var p={value:a,getSnapshot:o};return d.queue=p,Um(Wm.bind(null,c,p,i),[i]),c.flags|=2048,gs(9,Dm.bind(null,c,p,a,o),void 0,null),a},useId:function(){var i=Vn(),o=Je.identifierPrefix;if(_e){var a=hr,c=dr;a=(c&~(1<<32-xn(c)-1)).toString(32)+a,o=":"+o+"R"+a,a=ps++,0<a&&(o+="H"+a.toString(32)),o+=":"}else a=Cx++,o=":"+o+"r"+a.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},Lx={readContext:sn,useCallback:Ym,useContext:sn,useEffect:wd,useImperativeHandle:Xm,useInsertionEffect:Vm,useLayoutEffect:Qm,useMemo:Zm,useReducer:vd,useRef:Hm,useState:function(){return vd(ms)},useDebugValue:Sd,useDeferredValue:function(i){var o=an();return Km(o,Ve.memoizedState,i)},useTransition:function(){var i=vd(ms)[0],o=an().memoizedState;return[i,o]},useMutableSource:Fm,useSyncExternalStore:Mm,useId:$m,unstable_isNewReconciler:!1},Nx={readContext:sn,useCallback:Ym,useContext:sn,useEffect:wd,useImperativeHandle:Xm,useInsertionEffect:Vm,useLayoutEffect:Qm,useMemo:Zm,useReducer:yd,useRef:Hm,useState:function(){return yd(ms)},useDebugValue:Sd,useDeferredValue:function(i){var o=an();return Ve===null?o.memoizedState=i:Km(o,Ve.memoizedState,i)},useTransition:function(){var i=yd(ms)[0],o=an().memoizedState;return[i,o]},useMutableSource:Fm,useSyncExternalStore:Mm,useId:$m,unstable_isNewReconciler:!1};function co(i,o){try{var a="",c=o;do a+=kx(c),c=c.return;while(c);var d=a}catch(p){d=`
|
|
6
6
|
Error generating stack: `+p.message+`
|
|
7
|
-
`+p.stack}return{value:i,source:o,stack:d,digest:null}}function xd(i,o,a){return{value:i,source:null,stack:a??null,digest:o??null}}function Ed(i,o){try{console.error(o.value)}catch(a){setTimeout(function(){throw a})}}var Ox=typeof WeakMap=="function"?WeakMap:Map;function tg(i,o,a){a=fr(-1,a),a.tag=3,a.payload={element:null};var c=o.value;return a.callback=function(){xa||(xa=!0,Hd=c),Ed(i,o)},a}function ng(i,o,a){a=fr(-1,a),a.tag=3;var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;a.payload=function(){return c(d)},a.callback=function(){Ed(i,o)}}var p=i.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(a.callback=function(){Ed(i,o),typeof c!="function"&&(Dr===null?Dr=new Set([this]):Dr.add(this));var y=o.stack;this.componentDidCatch(o.value,{componentStack:y!==null?y:""})}),a}function rg(i,o,a){var c=i.pingCache;if(c===null){c=i.pingCache=new Ox;var d=new Set;c.set(o,d)}else d=c.get(o),d===void 0&&(d=new Set,c.set(o,d));d.has(a)||(d.add(a),i=Xx.bind(null,i,o,a),o.then(i,i))}function ig(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function og(i,o,a,c,d){return i.mode&1?(i.flags|=65536,i.lanes=d,i):(i===o?i.flags|=65536:(i.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(o=fr(-1,1),o.tag=2,Ar(a,o,1))),a.lanes|=1),i)}var Fx=h.ReactCurrentOwner,Nt=!1;function Et(i,o,a,c){o.child=i===null?Nm(o,null,a,c):lo(o,i.child,a,c)}function sg(i,o,a,c,d){a=a.render;var p=o.ref;return so(o,d),c=md(i,o,a,c,p,d),a=gd(),i!==null&&!Nt?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~d,pr(i,o,d)):(_e&&a&&Kc(o),o.flags|=1,Et(i,o,c,d),o.child)}function lg(i,o,a,c,d){if(i===null){var p=a.type;return typeof p=="function"&&!Yd(p)&&p.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(o.tag=15,o.type=p,ag(i,o,p,c,d)):(i=Ta(a.type,null,c,o,o.mode,d),i.ref=o.ref,i.return=o,o.child=i)}if(p=i.child,!(i.lanes&d)){var y=p.memoizedProps;if(a=a.compare,a=a!==null?a:Zl,a(y,c)&&i.ref===o.ref)return pr(i,o,d)}return o.flags|=1,i=br(p,c),i.ref=o.ref,i.return=o,o.child=i}function ag(i,o,a,c,d){if(i!==null){var p=i.memoizedProps;if(Zl(p,c)&&i.ref===o.ref)if(Nt=!1,o.pendingProps=c=p,(i.lanes&d)!==0)i.flags&131072&&(Nt=!0);else return o.lanes=i.lanes,pr(i,o,d)}return _d(i,o,a,c,d)}function ug(i,o,a){var c=o.pendingProps,d=c.children,p=i!==null?i.memoizedState:null;if(c.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(fo,Vt),Vt|=a;else{if(!(a&1073741824))return i=p!==null?p.baseLanes|a:a,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,ge(fo,Vt),Vt|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=p!==null?p.baseLanes:a,ge(fo,Vt),Vt|=c}else p!==null?(c=p.baseLanes|a,o.memoizedState=null):c=a,ge(fo,Vt),Vt|=c;return Et(i,o,d,a),o.child}function cg(i,o){var a=o.ref;(i===null&&a!==null||i!==null&&i.ref!==a)&&(o.flags|=512,o.flags|=2097152)}function _d(i,o,a,c,d){var p=Lt(a)?gi:ct.current;return p=to(o,p),so(o,d),a=md(i,o,a,c,p,d),c=gd(),i!==null&&!Nt?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~d,pr(i,o,d)):(_e&&c&&Kc(o),o.flags|=1,Et(i,o,a,d),o.child)}function dg(i,o,a,c,d){if(Lt(a)){var p=!0;jl(o)}else p=!1;if(so(o,d),o.stateNode===null)ua(i,o),Rm(o,a,c),ad(o,a,c,d),c=!0;else if(i===null){var y=o.stateNode,C=o.memoizedProps;y.props=C;var N=y.context,B=a.contextType;typeof B=="object"&&B!==null?B=sn(B):(B=Lt(a)?gi:ct.current,B=to(o,B));var X=a.getDerivedStateFromProps,te=typeof X=="function"||typeof y.getSnapshotBeforeUpdate=="function";te||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==c||N!==B)&&zm(o,y,c,B),Mr=!1;var H=o.memoizedState;y.state=H,Jl(o,c,y,d),N=o.memoizedState,C!==c||H!==N||It.current||Mr?(typeof X=="function"&&(ld(o,a,X,c),N=o.memoizedState),(C=Mr||Tm(o,a,C,c,H,N,B))?(te||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(o.flags|=4194308)):(typeof y.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=N),y.props=c,y.state=N,y.context=B,c=C):(typeof y.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{y=o.stateNode,_m(i,o),C=o.memoizedProps,B=o.type===o.elementType?C:Pn(o.type,C),y.props=B,te=o.pendingProps,H=y.context,N=a.contextType,typeof N=="object"&&N!==null?N=sn(N):(N=Lt(a)?gi:ct.current,N=to(o,N));var Se=a.getDerivedStateFromProps;(X=typeof Se=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==te||H!==N)&&zm(o,y,c,N),Mr=!1,H=o.memoizedState,y.state=H,Jl(o,c,y,d);var pe=o.memoizedState;C!==te||H!==pe||It.current||Mr?(typeof Se=="function"&&(ld(o,a,Se,c),pe=o.memoizedState),(B=Mr||Tm(o,a,B,c,H,pe,N)||!1)?(X||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,pe,N),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,pe,N)),typeof y.componentDidUpdate=="function"&&(o.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof y.componentDidUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=pe),y.props=c,y.state=pe,y.context=N,c=B):(typeof y.componentDidUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=1024),c=!1)}return Pd(i,o,a,c,p,d)}function Pd(i,o,a,c,d,p){cg(i,o);var y=(o.flags&128)!==0;if(!c&&!y)return d&&dm(o,a,!1),pr(i,o,p);c=o.stateNode,Fx.current=o;var C=y&&typeof a.getDerivedStateFromError!="function"?null:c.render();return o.flags|=1,i!==null&&y?(o.child=lo(o,i.child,null,p),o.child=lo(o,null,C,p)):Et(i,o,C,p),o.memoizedState=c.state,d&&dm(o,a,!0),o.child}function hg(i){var o=i.stateNode;o.pendingContext?um(i,o.pendingContext,o.pendingContext!==o.context):o.context&&um(i,o.context,!1),ud(i,o.containerInfo)}function fg(i,o,a,c,d){return io(),ed(d),o.flags|=256,Et(i,o,a,c),o.child}var kd={dehydrated:null,treeContext:null,retryLane:0};function Cd(i){return{baseLanes:i,cachePool:null,transitions:null}}function pg(i,o,a){var c=o.pendingProps,d=Ce.current,p=!1,y=(o.flags&128)!==0,C;if((C=y)||(C=i!==null&&i.memoizedState===null?!1:(d&2)!==0),C?(p=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(d|=1),ge(Ce,d&1),i===null)return Jc(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?(o.mode&1?Wc(i)?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(y=c.children,i=c.fallback,p?(c=o.mode,p=o.child,y={mode:"hidden",children:y},!(c&1)&&p!==null?(p.childLanes=0,p.pendingProps=y):p=Ra(y,c,0,null),i=ki(i,c,a,null),p.return=o,i.return=o,p.sibling=i,o.child=p,o.child.memoizedState=Cd(a),o.memoizedState=kd,i):Td(o,y));if(d=i.memoizedState,d!==null&&(C=d.dehydrated,C!==null))return Mx(i,o,y,c,C,d,a);if(p){p=c.fallback,y=o.mode,d=i.child,C=d.sibling;var N={mode:"hidden",children:c.children};return!(y&1)&&o.child!==d?(c=o.child,c.childLanes=0,c.pendingProps=N,o.deletions=null):(c=br(d,N),c.subtreeFlags=d.subtreeFlags&14680064),C!==null?p=br(C,p):(p=ki(p,y,a,null),p.flags|=2),p.return=o,c.return=o,c.sibling=p,o.child=c,c=p,p=o.child,y=i.child.memoizedState,y=y===null?Cd(a):{baseLanes:y.baseLanes|a,cachePool:null,transitions:y.transitions},p.memoizedState=y,p.childLanes=i.childLanes&~a,o.memoizedState=kd,c}return p=i.child,i=p.sibling,c=br(p,{mode:"visible",children:c.children}),!(o.mode&1)&&(c.lanes=a),c.return=o,c.sibling=null,i!==null&&(a=o.deletions,a===null?(o.deletions=[i],o.flags|=16):a.push(i)),o.child=c,o.memoizedState=null,c}function Td(i,o){return o=Ra({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function aa(i,o,a,c){return c!==null&&ed(c),lo(o,i.child,null,a),i=Td(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function Mx(i,o,a,c,d,p,y){if(a)return o.flags&256?(o.flags&=-257,c=xd(Error(u(422))),aa(i,o,y,c)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(p=c.fallback,d=o.mode,c=Ra({mode:"visible",children:c.children},d,0,null),p=ki(p,d,y,null),p.flags|=2,c.return=o,p.return=o,c.sibling=p,o.child=c,o.mode&1&&lo(o,i.child,null,y),o.child.memoizedState=Cd(y),o.memoizedState=kd,p);if(!(o.mode&1))return aa(i,o,y,null);if(Wc(d))return c=YS(d).digest,p=Error(u(419)),c=xd(p,c,void 0),aa(i,o,y,c);if(a=(y&i.childLanes)!==0,Nt||a){if(c=Je,c!==null){switch(y&-y){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=d&(c.suspendedLanes|y)?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,Hn(i,d),un(c,i,d,-1))}return Xd(),c=xd(Error(u(421))),aa(i,o,y,c)}return am(d)?(o.flags|=128,o.child=i.child,o=Yx.bind(null,i),ZS(d,o),null):(i=p.treeContext,J&&(on=qS(d),Ut=o,_e=!0,_n=null,us=!1,i!==null&&(nn[rn++]=dr,nn[rn++]=hr,nn[rn++]=vi,dr=i.id,hr=i.overflow,vi=o)),o=Td(o,c.children),o.flags|=4096,o)}function mg(i,o,a){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o),id(i.return,o,a)}function Rd(i,o,a,c,d){var p=i.memoizedState;p===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:d}:(p.isBackwards=o,p.rendering=null,p.renderingStartTime=0,p.last=c,p.tail=a,p.tailMode=d)}function gg(i,o,a){var c=o.pendingProps,d=c.revealOrder,p=c.tail;if(Et(i,o,c.children,a),c=Ce.current,c&2)c=c&1|2,o.flags|=128;else{if(i!==null&&i.flags&128)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&mg(i,a,o);else if(i.tag===19)mg(i,a,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}c&=1}if(ge(Ce,c),!(o.mode&1))o.memoizedState=null;else switch(d){case"forwards":for(a=o.child,d=null;a!==null;)i=a.alternate,i!==null&&na(i)===null&&(d=a),a=a.sibling;a=d,a===null?(d=o.child,o.child=null):(d=a.sibling,a.sibling=null),Rd(o,!1,d,a,p);break;case"backwards":for(a=null,d=o.child,o.child=null;d!==null;){if(i=d.alternate,i!==null&&na(i)===null){o.child=d;break}i=d.sibling,d.sibling=a,a=d,d=i}Rd(o,!0,a,null,p);break;case"together":Rd(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ua(i,o){!(o.mode&1)&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function pr(i,o,a){if(i!==null&&(o.dependencies=i.dependencies),xi|=o.lanes,!(a&o.childLanes))return null;if(i!==null&&o.child!==i.child)throw Error(u(153));if(o.child!==null){for(i=o.child,a=br(i,i.pendingProps),o.child=a,a.return=o;i.sibling!==null;)i=i.sibling,a=a.sibling=br(i,i.pendingProps),a.return=o;a.sibling=null}return o.child}function Ax(i,o,a){switch(o.tag){case 3:hg(o),io();break;case 5:Om(o);break;case 1:Lt(o.type)&&jl(o);break;case 4:ud(o,o.stateNode.containerInfo);break;case 10:xm(o,o.type._context,o.memoizedProps.value);break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(ge(Ce,Ce.current&1),o.flags|=128,null):a&o.child.childLanes?pg(i,o,a):(ge(Ce,Ce.current&1),i=pr(i,o,a),i!==null?i.sibling:null);ge(Ce,Ce.current&1);break;case 19:if(c=(a&o.childLanes)!==0,i.flags&128){if(c)return gg(i,o,a);o.flags|=128}var d=o.memoizedState;if(d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),ge(Ce,Ce.current),c)break;return null;case 22:case 23:return o.lanes=0,ug(i,o,a)}return pr(i,o,a)}function Qn(i){i.flags|=4}function vg(i,o){if(i!==null&&i.child===o.child)return!0;if(o.flags&16)return!1;for(i=o.child;i!==null;){if(i.flags&12854||i.subtreeFlags&12854)return!1;i=i.sibling}return!0}var vs,ys,ca,da;if(ut)vs=function(i,o){for(var a=o.child;a!==null;){if(a.tag===5||a.tag===6)es(i,a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},ys=function(){},ca=function(i,o,a,c,d){if(i=i.memoizedProps,i!==c){var p=o.stateNode,y=Un(ln.current);a=ns(p,a,i,c,d,y),(o.updateQueue=a)&&Qn(o)}},da=function(i,o,a,c){a!==c&&Qn(o)};else if($){vs=function(i,o,a,c){for(var d=o.child;d!==null;){if(d.tag===5){var p=d.stateNode;a&&c&&(p=sm(p,d.type,d.memoizedProps,d)),es(i,p)}else if(d.tag===6)p=d.stateNode,a&&c&&(p=lm(p,d.memoizedProps,d)),es(i,p);else if(d.tag!==4){if(d.tag===22&&d.memoizedState!==null)p=d.child,p!==null&&(p.return=d),vs(i,d,!0,!0);else if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return;d=d.return}d.sibling.return=d.return,d=d.sibling}};var yg=function(i,o,a,c){for(var d=o.child;d!==null;){if(d.tag===5){var p=d.stateNode;a&&c&&(p=sm(p,d.type,d.memoizedProps,d)),om(i,p)}else if(d.tag===6)p=d.stateNode,a&&c&&(p=lm(p,d.memoizedProps,d)),om(i,p);else if(d.tag!==4){if(d.tag===22&&d.memoizedState!==null)p=d.child,p!==null&&(p.return=d),yg(i,d,!0,!0);else if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return;d=d.return}d.sibling.return=d.return,d=d.sibling}};ys=function(i,o){var a=o.stateNode;if(!vg(i,o)){i=a.containerInfo;var c=im(i);yg(c,o,!1,!1),a.pendingChildren=c,Qn(o),VS(i,c)}},ca=function(i,o,a,c,d){var p=i.stateNode,y=i.memoizedProps;if((i=vg(i,o))&&y===c)o.stateNode=p;else{var C=o.stateNode,N=Un(ln.current),B=null;y!==c&&(B=ns(C,a,y,c,d,N)),i&&B===null?o.stateNode=p:(p=US(p,B,a,y,c,o,i,C),ts(p,a,c,d,N)&&Qn(o),o.stateNode=p,i?Qn(o):vs(p,o,!1,!1))}},da=function(i,o,a,c){a!==c?(i=Un(ao.current),a=Un(ln.current),o.stateNode=Dl(c,i,a,o),Qn(o)):o.stateNode=i.stateNode}}else ys=function(){},ca=function(){},da=function(){};function ws(i,o){if(!_e)switch(i.tailMode){case"hidden":o=i.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?i.tail=null:a.sibling=null;break;case"collapsed":a=i.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function ht(i){var o=i.alternate!==null&&i.alternate.child===i.child,a=0,c=0;if(o)for(var d=i.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags&14680064,c|=d.flags&14680064,d.return=i,d=d.sibling;else for(d=i.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=i,d=d.sibling;return i.subtreeFlags|=c,i.childLanes=a,o}function Dx(i,o,a){var c=o.pendingProps;switch($c(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(o),null;case 1:return Lt(o.type)&&Bl(),ht(o),null;case 3:return a=o.stateNode,uo(),we(It),we(ct),hd(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(i===null||i.child===null)&&(Yl(o)?Qn(o):i===null||i.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,_n!==null&&(Qd(_n),_n=null))),ys(i,o),ht(o),null;case 5:cd(o),a=Un(ao.current);var d=o.type;if(i!==null&&o.stateNode!=null)ca(i,o,d,c,a),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!c){if(o.stateNode===null)throw Error(u(166));return ht(o),null}if(i=Un(ln.current),Yl(o)){if(!J)throw Error(u(175));i=JS(o.stateNode,o.type,o.memoizedProps,a,i,o,!us),o.updateQueue=i,i!==null&&Qn(o)}else{var p=qi(d,c,a,i,o);vs(p,o,!1,!1),o.stateNode=p,ts(p,d,c,a,i)&&Qn(o)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return ht(o),null;case 6:if(i&&o.stateNode!=null)da(i,o,i.memoizedProps,c);else{if(typeof c!="string"&&o.stateNode===null)throw Error(u(166));if(i=Un(ao.current),a=Un(ln.current),Yl(o)){if(!J)throw Error(u(176));if(i=o.stateNode,a=o.memoizedProps,(c=ex(i,a,o,!us))&&(d=Ut,d!==null))switch(d.tag){case 3:ax(d.stateNode.containerInfo,i,a,(d.mode&1)!==0);break;case 5:ux(d.type,d.memoizedProps,d.stateNode,i,a,(d.mode&1)!==0)}c&&Qn(o)}else o.stateNode=Dl(c,i,a,o)}return ht(o),null;case 13:if(we(Ce),c=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_e&&on!==null&&o.mode&1&&!(o.flags&128))Sm(),io(),o.flags|=98560,d=!1;else if(d=Yl(o),c!==null&&c.dehydrated!==null){if(i===null){if(!d)throw Error(u(318));if(!J)throw Error(u(344));if(d=o.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(u(317));tx(d,o)}else io(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;ht(o),d=!1}else _n!==null&&(Qd(_n),_n=null),d=!0;if(!d)return o.flags&65536?o:null}return o.flags&128?(o.lanes=a,o):(a=c!==null,a!==(i!==null&&i.memoizedState!==null)&&a&&(o.child.flags|=8192,o.mode&1&&(i===null||Ce.current&1?Qe===0&&(Qe=3):Xd())),o.updateQueue!==null&&(o.flags|=4),ht(o),null);case 4:return uo(),ys(i,o),i===null&&zt(o.stateNode.containerInfo),ht(o),null;case 10:return rd(o.type._context),ht(o),null;case 17:return Lt(o.type)&&Bl(),ht(o),null;case 19:if(we(Ce),d=o.memoizedState,d===null)return ht(o),null;if(c=(o.flags&128)!==0,p=d.rendering,p===null)if(c)ws(d,!1);else{if(Qe!==0||i!==null&&i.flags&128)for(i=o.child;i!==null;){if(p=na(i),p!==null){for(o.flags|=128,ws(d,!1),i=p.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),o.subtreeFlags=0,i=a,a=o.child;a!==null;)c=a,d=i,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=d,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,d=p.dependencies,c.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),a=a.sibling;return ge(Ce,Ce.current&1|2),o.child}i=i.sibling}d.tail!==null&&$e()>bd&&(o.flags|=128,c=!0,ws(d,!1),o.lanes=4194304)}else{if(!c)if(i=na(p),i!==null){if(o.flags|=128,c=!0,i=i.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),ws(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!_e)return ht(o),null}else 2*$e()-d.renderingStartTime>bd&&a!==1073741824&&(o.flags|=128,c=!0,ws(d,!1),o.lanes=4194304);d.isBackwards?(p.sibling=o.child,o.child=p):(i=d.last,i!==null?i.sibling=p:o.child=p,d.last=p)}return d.tail!==null?(o=d.tail,d.rendering=o,d.tail=o.sibling,d.renderingStartTime=$e(),o.sibling=null,i=Ce.current,ge(Ce,c?i&1|2:i&1),o):(ht(o),null);case 22:case 23:return Gd(),a=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==a&&(o.flags|=8192),a&&o.mode&1?Vt&1073741824&&(ht(o),ut&&o.subtreeFlags&6&&(o.flags|=8192)):ht(o),null;case 24:return null;case 25:return null}throw Error(u(156,o.tag))}function Wx(i,o){switch($c(o),o.tag){case 1:return Lt(o.type)&&Bl(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return uo(),we(It),we(ct),hd(),i=o.flags,i&65536&&!(i&128)?(o.flags=i&-65537|128,o):null;case 5:return cd(o),null;case 13:if(we(Ce),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(u(340));io()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return we(Ce),null;case 4:return uo(),null;case 10:return rd(o.type._context),null;case 22:case 23:return Gd(),null;case 24:return null;default:return null}}var ha=!1,ft=!1,Bx=typeof WeakSet=="function"?WeakSet:Set,Q=null;function ho(i,o){var a=i.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Pe(i,o,c)}else a.current=null}function zd(i,o,a){try{a()}catch(c){Pe(i,o,c)}}var wg=!1;function jx(i,o){for(j(i.containerInfo),Q=o;Q!==null;)if(i=Q,o=i.child,(i.subtreeFlags&1028)!==0&&o!==null)o.return=i,Q=o;else for(;Q!==null;){i=Q;try{var a=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(a!==null){var c=a.memoizedProps,d=a.memoizedState,p=i.stateNode,y=p.getSnapshotBeforeUpdate(i.elementType===i.type?c:Pn(i.type,c),d);p.__reactInternalSnapshotBeforeUpdate=y}break;case 3:ut&&HS(i.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(C){Pe(i,i.return,C)}if(o=i.sibling,o!==null){o.return=i.return,Q=o;break}Q=i.return}return a=wg,wg=!1,a}function Ss(i,o,a){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&i)===i){var p=d.destroy;d.destroy=void 0,p!==void 0&&zd(o,a,p)}d=d.next}while(d!==c)}}function fa(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var a=o=o.next;do{if((a.tag&i)===i){var c=a.create;a.destroy=c()}a=a.next}while(a!==o)}}function Id(i){var o=i.ref;if(o!==null){var a=i.stateNode;switch(i.tag){case 5:i=tn(a);break;default:i=a}typeof o=="function"?o(i):o.current=i}}function Sg(i){var o=i.alternate;o!==null&&(i.alternate=null,Sg(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Bn(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function xg(i){return i.tag===5||i.tag===3||i.tag===4}function Eg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||xg(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Ld(i,o,a){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?MS(a,i,o):IS(a,i);else if(c!==4&&(i=i.child,i!==null))for(Ld(i,o,a),i=i.sibling;i!==null;)Ld(i,o,a),i=i.sibling}function Nd(i,o,a){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?FS(a,i,o):zS(a,i);else if(c!==4&&(i=i.child,i!==null))for(Nd(i,o,a),i=i.sibling;i!==null;)Nd(i,o,a),i=i.sibling}var rt=null,kn=!1;function Gn(i,o,a){for(a=a.child;a!==null;)Od(i,o,a),a=a.sibling}function Od(i,o,a){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(Vl,a)}catch{}switch(a.tag){case 5:ft||ho(a,o);case 6:if(ut){var c=rt,d=kn;rt=null,Gn(i,o,a),rt=c,kn=d,rt!==null&&(kn?DS(rt,a.stateNode):AS(rt,a.stateNode))}else Gn(i,o,a);break;case 18:ut&&rt!==null&&(kn?sx(rt,a.stateNode):ox(rt,a.stateNode));break;case 4:ut?(c=rt,d=kn,rt=a.stateNode.containerInfo,kn=!0,Gn(i,o,a),rt=c,kn=d):($&&(c=a.stateNode.containerInfo,d=im(c),Dc(c,d)),Gn(i,o,a));break;case 0:case 11:case 14:case 15:if(!ft&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var p=d,y=p.destroy;p=p.tag,y!==void 0&&(p&2||p&4)&&zd(a,o,y),d=d.next}while(d!==c)}Gn(i,o,a);break;case 1:if(!ft&&(ho(a,o),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(C){Pe(a,o,C)}Gn(i,o,a);break;case 21:Gn(i,o,a);break;case 22:a.mode&1?(ft=(c=ft)||a.memoizedState!==null,Gn(i,o,a),ft=c):Gn(i,o,a);break;default:Gn(i,o,a)}}function _g(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var a=i.stateNode;a===null&&(a=i.stateNode=new Bx),o.forEach(function(c){var d=Zx.bind(null,i,c);a.has(c)||(a.add(c),c.then(d,d))})}}function Cn(i,o){var a=o.deletions;if(a!==null)for(var c=0;c<a.length;c++){var d=a[c];try{var p=i,y=o;if(ut){var C=y;e:for(;C!==null;){switch(C.tag){case 5:rt=C.stateNode,kn=!1;break e;case 3:rt=C.stateNode.containerInfo,kn=!0;break e;case 4:rt=C.stateNode.containerInfo,kn=!0;break e}C=C.return}if(rt===null)throw Error(u(160));Od(p,y,d),rt=null,kn=!1}else Od(p,y,d);var N=d.alternate;N!==null&&(N.return=null),d.return=null}catch(B){Pe(d,o,B)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Pg(o,i),o=o.sibling}function Pg(i,o){var a=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Cn(o,i),Xn(i),c&4){try{Ss(3,i,i.return),fa(3,i)}catch(H){Pe(i,i.return,H)}try{Ss(5,i,i.return)}catch(H){Pe(i,i.return,H)}}break;case 1:Cn(o,i),Xn(i),c&512&&a!==null&&ho(a,a.return);break;case 5:if(Cn(o,i),Xn(i),c&512&&a!==null&&ho(a,a.return),ut){if(i.flags&32){var d=i.stateNode;try{rm(d)}catch(H){Pe(i,i.return,H)}}if(c&4&&(d=i.stateNode,d!=null)){var p=i.memoizedProps;if(a=a!==null?a.memoizedProps:p,c=i.type,o=i.updateQueue,i.updateQueue=null,o!==null)try{OS(d,o,c,a,p,i)}catch(H){Pe(i,i.return,H)}}}break;case 6:if(Cn(o,i),Xn(i),c&4&&ut){if(i.stateNode===null)throw Error(u(162));d=i.stateNode,p=i.memoizedProps,a=a!==null?a.memoizedProps:p;try{LS(d,a,p)}catch(H){Pe(i,i.return,H)}}break;case 3:if(Cn(o,i),Xn(i),c&4){if(ut&&J&&a!==null&&a.memoizedState.isDehydrated)try{rx(o.containerInfo)}catch(H){Pe(i,i.return,H)}if($){d=o.containerInfo,p=o.pendingChildren;try{Dc(d,p)}catch(H){Pe(i,i.return,H)}}}break;case 4:if(Cn(o,i),Xn(i),c&4&&$){p=i.stateNode,d=p.containerInfo,p=p.pendingChildren;try{Dc(d,p)}catch(H){Pe(i,i.return,H)}}break;case 13:Cn(o,i),Xn(i),d=i.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(jd=$e())),c&4&&_g(i);break;case 22:var y=a!==null&&a.memoizedState!==null;if(i.mode&1?(ft=(a=ft)||y,Cn(o,i),ft=a):Cn(o,i),Xn(i),c&8192){if(a=i.memoizedState!==null,(i.stateNode.isHidden=a)&&!y&&i.mode&1)for(Q=i,c=i.child;c!==null;){for(o=Q=c;Q!==null;){y=Q;var C=y.child;switch(y.tag){case 0:case 11:case 14:case 15:Ss(4,y,y.return);break;case 1:ho(y,y.return);var N=y.stateNode;if(typeof N.componentWillUnmount=="function"){var B=y,X=y.return;try{var te=B;N.props=te.memoizedProps,N.state=te.memoizedState,N.componentWillUnmount()}catch(H){Pe(B,X,H)}}break;case 5:ho(y,y.return);break;case 22:if(y.memoizedState!==null){Tg(o);continue}}C!==null?(C.return=y,Q=C):Tg(o)}c=c.sibling}if(ut){e:if(c=null,ut)for(o=i;;){if(o.tag===5){if(c===null){c=o;try{d=o.stateNode,a?WS(d):jS(o.stateNode,o.memoizedProps)}catch(H){Pe(i,i.return,H)}}}else if(o.tag===6){if(c===null)try{p=o.stateNode,a?BS(p):bS(p,o.memoizedProps)}catch(H){Pe(i,i.return,H)}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}}}break;case 19:Cn(o,i),Xn(i),c&4&&_g(i);break;case 21:break;default:Cn(o,i),Xn(i)}}function Xn(i){var o=i.flags;if(o&2){try{if(ut){e:{for(var a=i.return;a!==null;){if(xg(a)){var c=a;break e}a=a.return}throw Error(u(160))}switch(c.tag){case 5:var d=c.stateNode;c.flags&32&&(rm(d),c.flags&=-33);var p=Eg(i);Nd(i,p,d);break;case 3:case 4:var y=c.stateNode.containerInfo,C=Eg(i);Ld(i,C,y);break;default:throw Error(u(161))}}}catch(N){Pe(i,i.return,N)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function bx(i,o,a){Q=i,kg(i,o,a)}function kg(i,o,a){for(var c=(i.mode&1)!==0;Q!==null;){var d=Q,p=d.child;if(d.tag===22&&c){var y=d.memoizedState!==null||ha;if(!y){var C=d.alternate,N=C!==null&&C.memoizedState!==null||ft;C=ha;var B=ft;if(ha=y,(ft=N)&&!B)for(Q=d;Q!==null;)y=Q,N=y.child,y.tag===22&&y.memoizedState!==null?Rg(d):N!==null?(N.return=y,Q=N):Rg(d);for(;p!==null;)Q=p,kg(p,o,a),p=p.sibling;Q=d,ha=C,ft=B}Cg(i,o,a)}else d.subtreeFlags&8772&&p!==null?(p.return=d,Q=p):Cg(i,o,a)}}function Cg(i){for(;Q!==null;){var o=Q;if(o.flags&8772){var a=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:ft||fa(5,o);break;case 1:var c=o.stateNode;if(o.flags&4&&!ft)if(a===null)c.componentDidMount();else{var d=o.elementType===o.type?a.memoizedProps:Pn(o.type,a.memoizedProps);c.componentDidUpdate(d,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var p=o.updateQueue;p!==null&&km(o,p,c);break;case 3:var y=o.updateQueue;if(y!==null){if(a=null,o.child!==null)switch(o.child.tag){case 5:a=tn(o.child.stateNode);break;case 1:a=o.child.stateNode}km(o,y,a)}break;case 5:var C=o.stateNode;a===null&&o.flags&4&&NS(C,o.type,o.memoizedProps,o);break;case 6:break;case 4:break;case 12:break;case 13:if(J&&o.memoizedState===null){var N=o.alternate;if(N!==null){var B=N.memoizedState;if(B!==null){var X=B.dehydrated;X!==null&&ix(X)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}ft||o.flags&512&&Id(o)}catch(te){Pe(o,o.return,te)}}if(o===i){Q=null;break}if(a=o.sibling,a!==null){a.return=o.return,Q=a;break}Q=o.return}}function Tg(i){for(;Q!==null;){var o=Q;if(o===i){Q=null;break}var a=o.sibling;if(a!==null){a.return=o.return,Q=a;break}Q=o.return}}function Rg(i){for(;Q!==null;){var o=Q;try{switch(o.tag){case 0:case 11:case 15:var a=o.return;try{fa(4,o)}catch(N){Pe(o,a,N)}break;case 1:var c=o.stateNode;if(typeof c.componentDidMount=="function"){var d=o.return;try{c.componentDidMount()}catch(N){Pe(o,d,N)}}var p=o.return;try{Id(o)}catch(N){Pe(o,p,N)}break;case 5:var y=o.return;try{Id(o)}catch(N){Pe(o,y,N)}}}catch(N){Pe(o,o.return,N)}if(o===i){Q=null;break}var C=o.sibling;if(C!==null){C.return=o.return,Q=C;break}Q=o.return}}var pa=0,ma=1,ga=2,va=3,ya=4;if(typeof Symbol=="function"&&Symbol.for){var xs=Symbol.for;pa=xs("selector.component"),ma=xs("selector.has_pseudo_class"),ga=xs("selector.role"),va=xs("selector.test_id"),ya=xs("selector.text")}function Fd(i){var o=me(i);if(o!=null){if(typeof o.memoizedProps["data-testname"]!="string")throw Error(u(364));return o}if(i=_S(i),i===null)throw Error(u(362));return i.stateNode.current}function Md(i,o){switch(o.$$typeof){case pa:if(i.type===o.value)return!0;break;case ma:e:{o=o.value,i=[i,0];for(var a=0;a<i.length;){var c=i[a++],d=i[a++],p=o[d];if(c.tag!==5||!os(c)){for(;p!=null&&Md(c,p);)d++,p=o[d];if(d===o.length){o=!0;break e}else for(c=c.child;c!==null;)i.push(c,d),c=c.sibling}}o=!1}return o;case ga:if(i.tag===5&&CS(i.stateNode,o.value))return!0;break;case ya:if((i.tag===5||i.tag===6)&&(i=kS(i),i!==null&&0<=i.indexOf(o.value)))return!0;break;case va:if(i.tag===5&&(i=i.memoizedProps["data-testname"],typeof i=="string"&&i.toLowerCase()===o.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function Ad(i){switch(i.$$typeof){case pa:return"<"+(D(i.value)||"Unknown")+">";case ma:return":has("+(Ad(i)||"")+")";case ga:return'[role="'+i.value+'"]';case ya:return'"'+i.value+'"';case va:return'[data-testname="'+i.value+'"]';default:throw Error(u(365))}}function zg(i,o){var a=[];i=[i,0];for(var c=0;c<i.length;){var d=i[c++],p=i[c++],y=o[p];if(d.tag!==5||!os(d)){for(;y!=null&&Md(d,y);)p++,y=o[p];if(p===o.length)a.push(d);else for(d=d.child;d!==null;)i.push(d,p),d=d.sibling}}return a}function Dd(i,o){if(!is)throw Error(u(363));i=Fd(i),i=zg(i,o),o=[],i=Array.from(i);for(var a=0;a<i.length;){var c=i[a++];if(c.tag===5)os(c)||o.push(c.stateNode);else for(c=c.child;c!==null;)i.push(c),c=c.sibling}return o}var Hx=Math.ceil,wa=h.ReactCurrentDispatcher,Wd=h.ReactCurrentOwner,Be=h.ReactCurrentBatchConfig,ie=0,Je=null,be=null,it=0,Vt=0,fo=Or(0),Qe=0,Es=null,xi=0,Sa=0,Bd=0,_s=null,Ot=null,jd=0,bd=1/0,mr=null;function po(){bd=$e()+500}var xa=!1,Hd=null,Dr=null,Ea=!1,Wr=null,_a=0,Ps=0,Ud=null,Pa=-1,ka=0;function pt(){return ie&6?$e():Pa!==-1?Pa:Pa=$e()}function Br(i){return i.mode&1?ie&2&&it!==0?it&-it:Px.transition!==null?(ka===0&&(ka=hm()),ka):(i=ue,i!==0?i:mi()):1}function un(i,o,a,c){if(50<Ps)throw Ps=0,Ud=null,Error(u(185));as(i,a,c),(!(ie&2)||i!==Je)&&(i===Je&&(!(ie&2)&&(Sa|=a),Qe===4&&jr(i,it)),Ft(i,c),a===1&&ie===0&&!(o.mode&1)&&(po(),Ql&&bn()))}function Ft(i,o){var a=i.callbackNode;mx(i,o);var c=Ul(i,i===Je?it:0);if(c===0)a!==null&&pm(a),i.callbackNode=null,i.callbackPriority=0;else if(o=c&-c,i.callbackPriority!==o){if(a!=null&&pm(a),o===1)i.tag===0?_x(Lg.bind(null,i)):mm(Lg.bind(null,i)),ur?ES(function(){!(ie&6)&&bn()}):Gc(Xc,bn),a=null;else{switch(fm(c)){case 1:a=Xc;break;case 4:a=wx;break;case 16:a=Yc;break;case 536870912:a=Sx;break;default:a=Yc}a=jg(a,Ig.bind(null,i))}i.callbackPriority=o,i.callbackNode=a}}function Ig(i,o){if(Pa=-1,ka=0,ie&6)throw Error(u(327));var a=i.callbackNode;if(Pi()&&i.callbackNode!==a)return null;var c=Ul(i,i===Je?it:0);if(c===0)return null;if(c&30||c&i.expiredLanes||o)o=Ca(i,c);else{o=c;var d=ie;ie|=2;var p=Fg();(Je!==i||it!==o)&&(mr=null,po(),Ei(i,o));do try{Qx();break}catch(C){Og(i,C)}while(!0);nd(),wa.current=p,ie=d,be!==null?o=0:(Je=null,it=0,o=Qe)}if(o!==0){if(o===2&&(d=Uc(i),d!==0&&(c=d,o=Vd(i,d))),o===1)throw a=Es,Ei(i,0),jr(i,c),Ft(i,$e()),a;if(o===6)jr(i,c);else{if(d=i.current.alternate,!(c&30)&&!Ux(d)&&(o=Ca(i,c),o===2&&(p=Uc(i),p!==0&&(c=p,o=Vd(i,p))),o===1))throw a=Es,Ei(i,0),jr(i,c),Ft(i,$e()),a;switch(i.finishedWork=d,i.finishedLanes=c,o){case 0:case 1:throw Error(u(345));case 2:_i(i,Ot,mr);break;case 3:if(jr(i,c),(c&130023424)===c&&(o=jd+500-$e(),10<o)){if(Ul(i,0)!==0)break;if(d=i.suspendedLanes,(d&c)!==c){pt(),i.pingedLanes|=i.suspendedLanes&d;break}i.timeoutHandle=Ac(_i.bind(null,i,Ot,mr),o);break}_i(i,Ot,mr);break;case 4:if(jr(i,c),(c&4194240)===c)break;for(o=i.eventTimes,d=-1;0<c;){var y=31-xn(c);p=1<<y,y=o[y],y>d&&(d=y),c&=~p}if(c=d,c=$e()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Hx(c/1960))-c,10<c){i.timeoutHandle=Ac(_i.bind(null,i,Ot,mr),c);break}_i(i,Ot,mr);break;case 5:_i(i,Ot,mr);break;default:throw Error(u(329))}}}return Ft(i,$e()),i.callbackNode===a?Ig.bind(null,i):null}function Vd(i,o){var a=_s;return i.current.memoizedState.isDehydrated&&(Ei(i,o).flags|=256),i=Ca(i,o),i!==2&&(o=Ot,Ot=a,o!==null&&Qd(o)),i}function Qd(i){Ot===null?Ot=i:Ot.push.apply(Ot,i)}function Ux(i){for(var o=i;;){if(o.flags&16384){var a=o.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var d=a[c],p=d.getSnapshot;d=d.value;try{if(!En(p(),d))return!1}catch{return!1}}}if(a=o.child,o.subtreeFlags&16384&&a!==null)a.return=o,o=a;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function jr(i,o){for(o&=~Bd,o&=~Sa,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var a=31-xn(o),c=1<<a;i[a]=-1,o&=~c}}function Lg(i){if(ie&6)throw Error(u(327));Pi();var o=Ul(i,0);if(!(o&1))return Ft(i,$e()),null;var a=Ca(i,o);if(i.tag!==0&&a===2){var c=Uc(i);c!==0&&(o=c,a=Vd(i,c))}if(a===1)throw a=Es,Ei(i,0),jr(i,o),Ft(i,$e()),a;if(a===6)throw Error(u(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_i(i,Ot,mr),Ft(i,$e()),null}function Ng(i){Wr!==null&&Wr.tag===0&&!(ie&6)&&Pi();var o=ie;ie|=1;var a=Be.transition,c=ue;try{if(Be.transition=null,ue=1,i)return i()}finally{ue=c,Be.transition=a,ie=o,!(ie&6)&&bn()}}function Gd(){Vt=fo.current,we(fo)}function Ei(i,o){i.finishedWork=null,i.finishedLanes=0;var a=i.timeoutHandle;if(a!==rs&&(i.timeoutHandle=rs,nm(a)),be!==null)for(a=be.return;a!==null;){var c=a;switch($c(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Bl();break;case 3:uo(),we(It),we(ct),hd();break;case 5:cd(c);break;case 4:uo();break;case 13:we(Ce);break;case 19:we(Ce);break;case 10:rd(c.type._context);break;case 22:case 23:Gd()}a=a.return}if(Je=i,be=i=br(i.current,null),it=Vt=o,Qe=0,Es=null,Bd=Sa=xi=0,Ot=_s=null,wi!==null){for(o=0;o<wi.length;o++)if(a=wi[o],c=a.interleaved,c!==null){a.interleaved=null;var d=c.next,p=a.pending;if(p!==null){var y=p.next;p.next=d,c.next=y}a.pending=c}wi=null}return i}function Og(i,o){do{var a=be;try{if(nd(),ra.current=la,ia){for(var c=Te.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}ia=!1}if(Si=0,qe=Ve=Te=null,fs=!1,ps=0,Wd.current=null,a===null||a.return===null){Qe=1,Es=o,be=null;break}e:{var p=i,y=a.return,C=a,N=o;if(o=it,C.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var B=N,X=C,te=X.tag;if(!(X.mode&1)&&(te===0||te===11||te===15)){var H=X.alternate;H?(X.updateQueue=H.updateQueue,X.memoizedState=H.memoizedState,X.lanes=H.lanes):(X.updateQueue=null,X.memoizedState=null)}var Se=ig(y);if(Se!==null){Se.flags&=-257,og(Se,y,C,p,o),Se.mode&1&&rg(p,B,o),o=Se,N=B;var pe=o.updateQueue;if(pe===null){var Mt=new Set;Mt.add(N),o.updateQueue=Mt}else pe.add(N);break e}else{if(!(o&1)){rg(p,B,o),Xd();break e}N=Error(u(426))}}else if(_e&&C.mode&1){var gr=ig(y);if(gr!==null){!(gr.flags&65536)&&(gr.flags|=256),og(gr,y,C,p,o),ed(co(N,C));break e}}p=N=co(N,C),Qe!==4&&(Qe=2),_s===null?_s=[p]:_s.push(p),p=y;do{switch(p.tag){case 3:p.flags|=65536,o&=-o,p.lanes|=o;var I=tg(p,N,o);Pm(p,I);break e;case 1:C=N;var T=p.type,F=p.stateNode;if(!(p.flags&128)&&(typeof T.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(Dr===null||!Dr.has(F)))){p.flags|=65536,o&=-o,p.lanes|=o;var U=ng(p,C,o);Pm(p,U);break e}}p=p.return}while(p!==null)}Ag(a)}catch(Z){o=Z,be===a&&a!==null&&(be=a=a.return);continue}break}while(!0)}function Fg(){var i=wa.current;return wa.current=la,i===null?la:i}function Xd(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Je===null||!(xi&268435455)&&!(Sa&268435455)||jr(Je,it)}function Ca(i,o){var a=ie;ie|=2;var c=Fg();(Je!==i||it!==o)&&(mr=null,Ei(i,o));do try{Vx();break}catch(d){Og(i,d)}while(!0);if(nd(),ie=a,wa.current=c,be!==null)throw Error(u(261));return Je=null,it=0,Qe}function Vx(){for(;be!==null;)Mg(be)}function Qx(){for(;be!==null&&!vx();)Mg(be)}function Mg(i){var o=Bg(i.alternate,i,Vt);i.memoizedProps=i.pendingProps,o===null?Ag(i):be=o,Wd.current=null}function Ag(i){var o=i;do{var a=o.alternate;if(i=o.return,o.flags&32768){if(a=Wx(a,o),a!==null){a.flags&=32767,be=a;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Qe=6,be=null;return}}else if(a=Dx(a,o,Vt),a!==null){be=a;return}if(o=o.sibling,o!==null){be=o;return}be=o=i}while(o!==null);Qe===0&&(Qe=5)}function _i(i,o,a){var c=ue,d=Be.transition;try{Be.transition=null,ue=1,Gx(i,o,a,c)}finally{Be.transition=d,ue=c}return null}function Gx(i,o,a,c){do Pi();while(Wr!==null);if(ie&6)throw Error(u(327));a=i.finishedWork;var d=i.finishedLanes;if(a===null)return null;if(i.finishedWork=null,i.finishedLanes=0,a===i.current)throw Error(u(177));i.callbackNode=null,i.callbackPriority=0;var p=a.lanes|a.childLanes;if(gx(i,p),i===Je&&(be=Je=null,it=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||Ea||(Ea=!0,jg(Yc,function(){return Pi(),null})),p=(a.flags&15990)!==0,a.subtreeFlags&15990||p){p=Be.transition,Be.transition=null;var y=ue;ue=1;var C=ie;ie|=4,Wd.current=null,jx(i,a),Pg(a,i),Me(i.containerInfo),i.current=a,bx(a,i,d),yx(),ie=C,ue=y,Be.transition=p}else i.current=a;if(Ea&&(Ea=!1,Wr=i,_a=d),p=i.pendingLanes,p===0&&(Dr=null),xx(a.stateNode,c),Ft(i,$e()),o!==null)for(c=i.onRecoverableError,a=0;a<o.length;a++)d=o[a],c(d.value,{componentStack:d.stack,digest:d.digest});if(xa)throw xa=!1,i=Hd,Hd=null,i;return _a&1&&i.tag!==0&&Pi(),p=i.pendingLanes,p&1?i===Ud?Ps++:(Ps=0,Ud=i):Ps=0,bn(),null}function Pi(){if(Wr!==null){var i=fm(_a),o=Be.transition,a=ue;try{if(Be.transition=null,ue=16>i?16:i,Wr===null)var c=!1;else{if(i=Wr,Wr=null,_a=0,ie&6)throw Error(u(331));var d=ie;for(ie|=4,Q=i.current;Q!==null;){var p=Q,y=p.child;if(Q.flags&16){var C=p.deletions;if(C!==null){for(var N=0;N<C.length;N++){var B=C[N];for(Q=B;Q!==null;){var X=Q;switch(X.tag){case 0:case 11:case 15:Ss(8,X,p)}var te=X.child;if(te!==null)te.return=X,Q=te;else for(;Q!==null;){X=Q;var H=X.sibling,Se=X.return;if(Sg(X),X===B){Q=null;break}if(H!==null){H.return=Se,Q=H;break}Q=Se}}}var pe=p.alternate;if(pe!==null){var Mt=pe.child;if(Mt!==null){pe.child=null;do{var gr=Mt.sibling;Mt.sibling=null,Mt=gr}while(Mt!==null)}}Q=p}}if(p.subtreeFlags&2064&&y!==null)y.return=p,Q=y;else e:for(;Q!==null;){if(p=Q,p.flags&2048)switch(p.tag){case 0:case 11:case 15:Ss(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,Q=I;break e}Q=p.return}}var T=i.current;for(Q=T;Q!==null;){y=Q;var F=y.child;if(y.subtreeFlags&2064&&F!==null)F.return=y,Q=F;else e:for(y=T;Q!==null;){if(C=Q,C.flags&2048)try{switch(C.tag){case 0:case 11:case 15:fa(9,C)}}catch(Z){Pe(C,C.return,Z)}if(C===y){Q=null;break e}var U=C.sibling;if(U!==null){U.return=C.return,Q=U;break e}Q=C.return}}if(ie=d,bn(),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(Vl,i)}catch{}c=!0}return c}finally{ue=a,Be.transition=o}}return!1}function Dg(i,o,a){o=co(a,o),o=tg(i,o,1),i=Ar(i,o,1),o=pt(),i!==null&&(as(i,1,o),Ft(i,o))}function Pe(i,o,a){if(i.tag===3)Dg(i,i,a);else for(;o!==null;){if(o.tag===3){Dg(o,i,a);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Dr===null||!Dr.has(c))){i=co(a,i),i=ng(o,i,1),o=Ar(o,i,1),i=pt(),o!==null&&(as(o,1,i),Ft(o,i));break}}o=o.return}}function Xx(i,o,a){var c=i.pingCache;c!==null&&c.delete(o),o=pt(),i.pingedLanes|=i.suspendedLanes&a,Je===i&&(it&a)===a&&(Qe===4||Qe===3&&(it&130023424)===it&&500>$e()-jd?Ei(i,0):Bd|=a),Ft(i,o)}function Wg(i,o){o===0&&(i.mode&1?(o=Hl,Hl<<=1,!(Hl&130023424)&&(Hl=4194304)):o=1);var a=pt();i=Hn(i,o),i!==null&&(as(i,o,a),Ft(i,a))}function Yx(i){var o=i.memoizedState,a=0;o!==null&&(a=o.retryLane),Wg(i,a)}function Zx(i,o){var a=0;switch(i.tag){case 13:var c=i.stateNode,d=i.memoizedState;d!==null&&(a=d.retryLane);break;case 19:c=i.stateNode;break;default:throw Error(u(314))}c!==null&&c.delete(o),Wg(i,a)}var Bg;Bg=function(i,o,a){if(i!==null)if(i.memoizedProps!==o.pendingProps||It.current)Nt=!0;else{if(!(i.lanes&a)&&!(o.flags&128))return Nt=!1,Ax(i,o,a);Nt=!!(i.flags&131072)}else Nt=!1,_e&&o.flags&1048576&&gm(o,Xl,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;ua(i,o),i=o.pendingProps;var d=to(o,ct.current);so(o,a),d=md(null,o,c,i,d,a);var p=gd();return o.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Lt(c)?(p=!0,jl(o)):p=!1,o.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,sd(o),d.updater=ea,o.stateNode=d,d._reactInternals=o,ad(o,c,i,a),o=Pd(null,o,c,!0,p,a)):(o.tag=0,_e&&p&&Kc(o),Et(null,o,d,a),o=o.child),o;case 16:c=o.elementType;e:{switch(ua(i,o),i=o.pendingProps,d=c._init,c=d(c._payload),o.type=c,d=o.tag=$x(c),i=Pn(c,i),d){case 0:o=_d(null,o,c,i,a);break e;case 1:o=dg(null,o,c,i,a);break e;case 11:o=sg(null,o,c,i,a);break e;case 14:o=lg(null,o,c,Pn(c.type,i),a);break e}throw Error(u(306,c,""))}return o;case 0:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),_d(i,o,c,d,a);case 1:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),dg(i,o,c,d,a);case 3:e:{if(hg(o),i===null)throw Error(u(387));c=o.pendingProps,p=o.memoizedState,d=p.element,_m(i,o),Jl(o,c,null,a);var y=o.memoizedState;if(c=y.element,J&&p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){d=co(Error(u(423)),o),o=fg(i,o,c,a,d);break e}else if(c!==d){d=co(Error(u(424)),o),o=fg(i,o,c,a,d);break e}else for(J&&(on=$S(o.stateNode.containerInfo),Ut=o,_e=!0,_n=null,us=!1),a=Nm(o,null,c,a),o.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(io(),c===d){o=pr(i,o,a);break e}Et(i,o,c,a)}o=o.child}return o;case 5:return Om(o),i===null&&Jc(o),c=o.type,d=o.pendingProps,p=i!==null?i.memoizedProps:null,y=d.children,Ji(c,d)?y=null:p!==null&&Ji(c,p)&&(o.flags|=32),cg(i,o),Et(i,o,y,a),o.child;case 6:return i===null&&Jc(o),null;case 13:return pg(i,o,a);case 4:return ud(o,o.stateNode.containerInfo),c=o.pendingProps,i===null?o.child=lo(o,null,c,a):Et(i,o,c,a),o.child;case 11:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),sg(i,o,c,d,a);case 7:return Et(i,o,o.pendingProps,a),o.child;case 8:return Et(i,o,o.pendingProps.children,a),o.child;case 12:return Et(i,o,o.pendingProps.children,a),o.child;case 10:e:{if(c=o.type._context,d=o.pendingProps,p=o.memoizedProps,y=d.value,xm(o,c,y),p!==null)if(En(p.value,y)){if(p.children===d.children&&!It.current){o=pr(i,o,a);break e}}else for(p=o.child,p!==null&&(p.return=o);p!==null;){var C=p.dependencies;if(C!==null){y=p.child;for(var N=C.firstContext;N!==null;){if(N.context===c){if(p.tag===1){N=fr(-1,a&-a),N.tag=2;var B=p.updateQueue;if(B!==null){B=B.shared;var X=B.pending;X===null?N.next=N:(N.next=X.next,X.next=N),B.pending=N}}p.lanes|=a,N=p.alternate,N!==null&&(N.lanes|=a),id(p.return,a,o),C.lanes|=a;break}N=N.next}}else if(p.tag===10)y=p.type===o.type?null:p.child;else if(p.tag===18){if(y=p.return,y===null)throw Error(u(341));y.lanes|=a,C=y.alternate,C!==null&&(C.lanes|=a),id(y,a,o),y=p.sibling}else y=p.child;if(y!==null)y.return=p;else for(y=p;y!==null;){if(y===o){y=null;break}if(p=y.sibling,p!==null){p.return=y.return,y=p;break}y=y.return}p=y}Et(i,o,d.children,a),o=o.child}return o;case 9:return d=o.type,c=o.pendingProps.children,so(o,a),d=sn(d),c=c(d),o.flags|=1,Et(i,o,c,a),o.child;case 14:return c=o.type,d=Pn(c,o.pendingProps),d=Pn(c.type,d),lg(i,o,c,d,a);case 15:return ag(i,o,o.type,o.pendingProps,a);case 17:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),ua(i,o),o.tag=1,Lt(c)?(i=!0,jl(o)):i=!1,so(o,a),Rm(o,c,d),ad(o,c,d,a),Pd(null,o,c,!0,i,a);case 19:return gg(i,o,a);case 22:return ug(i,o,a)}throw Error(u(156,o.tag))};function jg(i,o){return Gc(i,o)}function Kx(i,o,a,c){this.tag=i,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(i,o,a,c){return new Kx(i,o,a,c)}function Yd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function $x(i){if(typeof i=="function")return Yd(i)?1:0;if(i!=null){if(i=i.$$typeof,i===R)return 11;if(i===w)return 14}return 2}function br(i,o){var a=i.alternate;return a===null?(a=cn(i.tag,o,i.key,i.mode),a.elementType=i.elementType,a.type=i.type,a.stateNode=i.stateNode,a.alternate=i,i.alternate=a):(a.pendingProps=o,a.type=i.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=i.flags&14680064,a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,o=i.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},a.sibling=i.sibling,a.index=i.index,a.ref=i.ref,a}function Ta(i,o,a,c,d,p){var y=2;if(c=i,typeof i=="function")Yd(i)&&(y=1);else if(typeof i=="string")y=5;else e:switch(i){case m:return ki(a.children,d,p,o);case S:y=8,d|=8;break;case E:return i=cn(12,a,o,d|2),i.elementType=E,i.lanes=p,i;case A:return i=cn(13,a,o,d),i.elementType=A,i.lanes=p,i;case x:return i=cn(19,a,o,d),i.elementType=x,i.lanes=p,i;case L:return Ra(a,d,p,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case P:y=10;break e;case k:y=9;break e;case R:y=11;break e;case w:y=14;break e;case _:y=16,c=null;break e}throw Error(u(130,i==null?i:typeof i,""))}return o=cn(y,a,o,d),o.elementType=i,o.type=c,o.lanes=p,o}function ki(i,o,a,c){return i=cn(7,i,c,o),i.lanes=a,i}function Ra(i,o,a,c){return i=cn(22,i,c,o),i.elementType=L,i.lanes=a,i.stateNode={isHidden:!1},i}function Zd(i,o,a){return i=cn(6,i,null,o),i.lanes=a,i}function Kd(i,o,a){return o=cn(4,i.children!==null?i.children:[],i.key,o),o.lanes=a,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function qx(i,o,a,c,d){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rs,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vc(0),this.expirationTimes=Vc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vc(0),this.identifierPrefix=c,this.onRecoverableError=d,J&&(this.mutableSourceEagerHydrationData=null)}function bg(i,o,a,c,d,p,y,C,N){return i=new qx(i,o,a,C,N),o===1?(o=1,p===!0&&(o|=8)):o=0,p=cn(3,null,null,o),i.current=p,p.stateNode=i,p.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},sd(p),i}function Hg(i){if(!i)return Fr;i=i._reactInternals;e:{if(q(i)!==i||i.tag!==1)throw Error(u(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Lt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(u(171))}if(i.tag===1){var a=i.type;if(Lt(a))return cm(i,a,o)}return o}function Ug(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(u(188)):(i=Object.keys(i).join(","),Error(u(268,i)));return i=se(o),i===null?null:i.stateNode}function Vg(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var a=i.retryLane;i.retryLane=a!==0&&a<o?a:o}}function za(i,o){Vg(i,o),(i=i.alternate)&&Vg(i,o)}function Jx(i){return i=se(i),i===null?null:i.stateNode}function eE(){return null}return n.attemptContinuousHydration=function(i){if(i.tag===13){var o=Hn(i,134217728);if(o!==null){var a=pt();un(o,i,134217728,a)}za(i,134217728)}},n.attemptDiscreteHydration=function(i){if(i.tag===13){var o=Hn(i,1);if(o!==null){var a=pt();un(o,i,1,a)}za(i,1)}},n.attemptHydrationAtCurrentPriority=function(i){if(i.tag===13){var o=Br(i),a=Hn(i,o);if(a!==null){var c=pt();un(a,i,o,c)}za(i,o)}},n.attemptSynchronousHydration=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var a=ls(o.pendingLanes);a!==0&&(Qc(o,a|1),Ft(o,$e()),!(ie&6)&&(po(),bn()))}break;case 13:Ng(function(){var c=Hn(i,1);if(c!==null){var d=pt();un(c,i,1,d)}}),za(i,1)}},n.batchedUpdates=function(i,o){var a=ie;ie|=1;try{return i(o)}finally{ie=a,ie===0&&(po(),Ql&&bn())}},n.createComponentSelector=function(i){return{$$typeof:pa,value:i}},n.createContainer=function(i,o,a,c,d,p,y){return bg(i,o,!1,null,a,c,d,p,y)},n.createHasPseudoClassSelector=function(i){return{$$typeof:ma,value:i}},n.createHydrationContainer=function(i,o,a,c,d,p,y,C,N){return i=bg(a,c,!0,i,d,p,y,C,N),i.context=Hg(null),a=i.current,c=pt(),d=Br(a),p=fr(c,d),p.callback=o??null,Ar(a,p,d),i.current.lanes=d,as(i,d,c),Ft(i,c),i},n.createPortal=function(i,o,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g,key:c==null?null:""+c,children:i,containerInfo:o,implementation:a}},n.createRoleSelector=function(i){return{$$typeof:ga,value:i}},n.createTestNameSelector=function(i){return{$$typeof:va,value:i}},n.createTextSelector=function(i){return{$$typeof:ya,value:i}},n.deferredUpdates=function(i){var o=ue,a=Be.transition;try{return Be.transition=null,ue=16,i()}finally{ue=o,Be.transition=a}},n.discreteUpdates=function(i,o,a,c,d){var p=ue,y=Be.transition;try{return Be.transition=null,ue=1,i(o,a,c,d)}finally{ue=p,Be.transition=y,ie===0&&po()}},n.findAllNodes=Dd,n.findBoundingRects=function(i,o){if(!is)throw Error(u(363));o=Dd(i,o),i=[];for(var a=0;a<o.length;a++)i.push(PS(o[a]));for(o=i.length-1;0<o;o--){a=i[o];for(var c=a.x,d=c+a.width,p=a.y,y=p+a.height,C=o-1;0<=C;C--)if(o!==C){var N=i[C],B=N.x,X=B+N.width,te=N.y,H=te+N.height;if(c>=B&&p>=te&&d<=X&&y<=H){i.splice(o,1);break}else if(c!==B||a.width!==N.width||H<p||te>y){if(!(p!==te||a.height!==N.height||X<c||B>d)){B>c&&(N.width+=B-c,N.x=c),X<d&&(N.width=d-B),i.splice(o,1);break}}else{te>p&&(N.height+=te-p,N.y=p),H<y&&(N.height=y-te),i.splice(o,1);break}}}return i},n.findHostInstance=Ug,n.findHostInstanceWithNoPortals=function(i){return i=K(i),i=i!==null?fe(i):null,i===null?null:i.stateNode},n.findHostInstanceWithWarning=function(i){return Ug(i)},n.flushControlled=function(i){var o=ie;ie|=1;var a=Be.transition,c=ue;try{Be.transition=null,ue=1,i()}finally{ue=c,Be.transition=a,ie=o,ie===0&&(po(),bn())}},n.flushPassiveEffects=Pi,n.flushSync=Ng,n.focusWithin=function(i,o){if(!is)throw Error(u(363));for(i=Fd(i),o=zg(i,o),o=Array.from(o),i=0;i<o.length;){var a=o[i++];if(!os(a)){if(a.tag===5&&TS(a.stateNode))return!0;for(a=a.child;a!==null;)o.push(a),a=a.sibling}}return!1},n.getCurrentUpdatePriority=function(){return ue},n.getFindAllNodesFailureDescription=function(i,o){if(!is)throw Error(u(363));var a=0,c=[];i=[Fd(i),0];for(var d=0;d<i.length;){var p=i[d++],y=i[d++],C=o[y];if((p.tag!==5||!os(p))&&(Md(p,C)&&(c.push(Ad(C)),y++,y>a&&(a=y)),y<o.length))for(p=p.child;p!==null;)i.push(p,y),p=p.sibling}if(a<o.length){for(i=[];a<o.length;a++)i.push(Ad(o[a]));return`findAllNodes was able to match part of the selector:
|
|
7
|
+
`+p.stack}return{value:i,source:o,stack:d,digest:null}}function xd(i,o,a){return{value:i,source:null,stack:a??null,digest:o??null}}function Ed(i,o){try{console.error(o.value)}catch(a){setTimeout(function(){throw a})}}var Ox=typeof WeakMap=="function"?WeakMap:Map;function tg(i,o,a){a=fr(-1,a),a.tag=3,a.payload={element:null};var c=o.value;return a.callback=function(){xa||(xa=!0,Hd=c),Ed(i,o)},a}function ng(i,o,a){a=fr(-1,a),a.tag=3;var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;a.payload=function(){return c(d)},a.callback=function(){Ed(i,o)}}var p=i.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(a.callback=function(){Ed(i,o),typeof c!="function"&&(Dr===null?Dr=new Set([this]):Dr.add(this));var y=o.stack;this.componentDidCatch(o.value,{componentStack:y!==null?y:""})}),a}function rg(i,o,a){var c=i.pingCache;if(c===null){c=i.pingCache=new Ox;var d=new Set;c.set(o,d)}else d=c.get(o),d===void 0&&(d=new Set,c.set(o,d));d.has(a)||(d.add(a),i=Xx.bind(null,i,o,a),o.then(i,i))}function ig(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function og(i,o,a,c,d){return i.mode&1?(i.flags|=65536,i.lanes=d,i):(i===o?i.flags|=65536:(i.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(o=fr(-1,1),o.tag=2,Ar(a,o,1))),a.lanes|=1),i)}var Fx=h.ReactCurrentOwner,Nt=!1;function _t(i,o,a,c){o.child=i===null?Nm(o,null,a,c):lo(o,i.child,a,c)}function sg(i,o,a,c,d){a=a.render;var p=o.ref;return so(o,d),c=md(i,o,a,c,p,d),a=gd(),i!==null&&!Nt?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~d,pr(i,o,d)):(_e&&a&&Kc(o),o.flags|=1,_t(i,o,c,d),o.child)}function lg(i,o,a,c,d){if(i===null){var p=a.type;return typeof p=="function"&&!Yd(p)&&p.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(o.tag=15,o.type=p,ag(i,o,p,c,d)):(i=Ta(a.type,null,c,o,o.mode,d),i.ref=o.ref,i.return=o,o.child=i)}if(p=i.child,!(i.lanes&d)){var y=p.memoizedProps;if(a=a.compare,a=a!==null?a:Zl,a(y,c)&&i.ref===o.ref)return pr(i,o,d)}return o.flags|=1,i=br(p,c),i.ref=o.ref,i.return=o,o.child=i}function ag(i,o,a,c,d){if(i!==null){var p=i.memoizedProps;if(Zl(p,c)&&i.ref===o.ref)if(Nt=!1,o.pendingProps=c=p,(i.lanes&d)!==0)i.flags&131072&&(Nt=!0);else return o.lanes=i.lanes,pr(i,o,d)}return _d(i,o,a,c,d)}function ug(i,o,a){var c=o.pendingProps,d=c.children,p=i!==null?i.memoizedState:null;if(c.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(fo,Vt),Vt|=a;else{if(!(a&1073741824))return i=p!==null?p.baseLanes|a:a,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,me(fo,Vt),Vt|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=p!==null?p.baseLanes:a,me(fo,Vt),Vt|=c}else p!==null?(c=p.baseLanes|a,o.memoizedState=null):c=a,me(fo,Vt),Vt|=c;return _t(i,o,d,a),o.child}function cg(i,o){var a=o.ref;(i===null&&a!==null||i!==null&&i.ref!==a)&&(o.flags|=512,o.flags|=2097152)}function _d(i,o,a,c,d){var p=Lt(a)?gi:dt.current;return p=to(o,p),so(o,d),a=md(i,o,a,c,p,d),c=gd(),i!==null&&!Nt?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~d,pr(i,o,d)):(_e&&c&&Kc(o),o.flags|=1,_t(i,o,a,d),o.child)}function dg(i,o,a,c,d){if(Lt(a)){var p=!0;jl(o)}else p=!1;if(so(o,d),o.stateNode===null)ua(i,o),Rm(o,a,c),ad(o,a,c,d),c=!0;else if(i===null){var y=o.stateNode,C=o.memoizedProps;y.props=C;var N=y.context,B=a.contextType;typeof B=="object"&&B!==null?B=sn(B):(B=Lt(a)?gi:dt.current,B=to(o,B));var X=a.getDerivedStateFromProps,te=typeof X=="function"||typeof y.getSnapshotBeforeUpdate=="function";te||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==c||N!==B)&&zm(o,y,c,B),Mr=!1;var H=o.memoizedState;y.state=H,Jl(o,c,y,d),N=o.memoizedState,C!==c||H!==N||It.current||Mr?(typeof X=="function"&&(ld(o,a,X,c),N=o.memoizedState),(C=Mr||Tm(o,a,C,c,H,N,B))?(te||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(o.flags|=4194308)):(typeof y.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=N),y.props=c,y.state=N,y.context=B,c=C):(typeof y.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{y=o.stateNode,_m(i,o),C=o.memoizedProps,B=o.type===o.elementType?C:Pn(o.type,C),y.props=B,te=o.pendingProps,H=y.context,N=a.contextType,typeof N=="object"&&N!==null?N=sn(N):(N=Lt(a)?gi:dt.current,N=to(o,N));var Se=a.getDerivedStateFromProps;(X=typeof Se=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==te||H!==N)&&zm(o,y,c,N),Mr=!1,H=o.memoizedState,y.state=H,Jl(o,c,y,d);var pe=o.memoizedState;C!==te||H!==pe||It.current||Mr?(typeof Se=="function"&&(ld(o,a,Se,c),pe=o.memoizedState),(B=Mr||Tm(o,a,B,c,H,pe,N)||!1)?(X||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,pe,N),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,pe,N)),typeof y.componentDidUpdate=="function"&&(o.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof y.componentDidUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=pe),y.props=c,y.state=pe,y.context=N,c=B):(typeof y.componentDidUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&H===i.memoizedState||(o.flags|=1024),c=!1)}return Pd(i,o,a,c,p,d)}function Pd(i,o,a,c,d,p){cg(i,o);var y=(o.flags&128)!==0;if(!c&&!y)return d&&dm(o,a,!1),pr(i,o,p);c=o.stateNode,Fx.current=o;var C=y&&typeof a.getDerivedStateFromError!="function"?null:c.render();return o.flags|=1,i!==null&&y?(o.child=lo(o,i.child,null,p),o.child=lo(o,null,C,p)):_t(i,o,C,p),o.memoizedState=c.state,d&&dm(o,a,!0),o.child}function hg(i){var o=i.stateNode;o.pendingContext?um(i,o.pendingContext,o.pendingContext!==o.context):o.context&&um(i,o.context,!1),ud(i,o.containerInfo)}function fg(i,o,a,c,d){return io(),ed(d),o.flags|=256,_t(i,o,a,c),o.child}var kd={dehydrated:null,treeContext:null,retryLane:0};function Cd(i){return{baseLanes:i,cachePool:null,transitions:null}}function pg(i,o,a){var c=o.pendingProps,d=Ce.current,p=!1,y=(o.flags&128)!==0,C;if((C=y)||(C=i!==null&&i.memoizedState===null?!1:(d&2)!==0),C?(p=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(d|=1),me(Ce,d&1),i===null)return Jc(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?(o.mode&1?Wc(i)?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(y=c.children,i=c.fallback,p?(c=o.mode,p=o.child,y={mode:"hidden",children:y},!(c&1)&&p!==null?(p.childLanes=0,p.pendingProps=y):p=Ra(y,c,0,null),i=ki(i,c,a,null),p.return=o,i.return=o,p.sibling=i,o.child=p,o.child.memoizedState=Cd(a),o.memoizedState=kd,i):Td(o,y));if(d=i.memoizedState,d!==null&&(C=d.dehydrated,C!==null))return Mx(i,o,y,c,C,d,a);if(p){p=c.fallback,y=o.mode,d=i.child,C=d.sibling;var N={mode:"hidden",children:c.children};return!(y&1)&&o.child!==d?(c=o.child,c.childLanes=0,c.pendingProps=N,o.deletions=null):(c=br(d,N),c.subtreeFlags=d.subtreeFlags&14680064),C!==null?p=br(C,p):(p=ki(p,y,a,null),p.flags|=2),p.return=o,c.return=o,c.sibling=p,o.child=c,c=p,p=o.child,y=i.child.memoizedState,y=y===null?Cd(a):{baseLanes:y.baseLanes|a,cachePool:null,transitions:y.transitions},p.memoizedState=y,p.childLanes=i.childLanes&~a,o.memoizedState=kd,c}return p=i.child,i=p.sibling,c=br(p,{mode:"visible",children:c.children}),!(o.mode&1)&&(c.lanes=a),c.return=o,c.sibling=null,i!==null&&(a=o.deletions,a===null?(o.deletions=[i],o.flags|=16):a.push(i)),o.child=c,o.memoizedState=null,c}function Td(i,o){return o=Ra({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function aa(i,o,a,c){return c!==null&&ed(c),lo(o,i.child,null,a),i=Td(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function Mx(i,o,a,c,d,p,y){if(a)return o.flags&256?(o.flags&=-257,c=xd(Error(u(422))),aa(i,o,y,c)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(p=c.fallback,d=o.mode,c=Ra({mode:"visible",children:c.children},d,0,null),p=ki(p,d,y,null),p.flags|=2,c.return=o,p.return=o,c.sibling=p,o.child=c,o.mode&1&&lo(o,i.child,null,y),o.child.memoizedState=Cd(y),o.memoizedState=kd,p);if(!(o.mode&1))return aa(i,o,y,null);if(Wc(d))return c=YS(d).digest,p=Error(u(419)),c=xd(p,c,void 0),aa(i,o,y,c);if(a=(y&i.childLanes)!==0,Nt||a){if(c=Je,c!==null){switch(y&-y){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=d&(c.suspendedLanes|y)?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,Hn(i,d),un(c,i,d,-1))}return Xd(),c=xd(Error(u(421))),aa(i,o,y,c)}return am(d)?(o.flags|=128,o.child=i.child,o=Yx.bind(null,i),ZS(d,o),null):(i=p.treeContext,J&&(on=qS(d),Ut=o,_e=!0,_n=null,us=!1,i!==null&&(nn[rn++]=dr,nn[rn++]=hr,nn[rn++]=vi,dr=i.id,hr=i.overflow,vi=o)),o=Td(o,c.children),o.flags|=4096,o)}function mg(i,o,a){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o),id(i.return,o,a)}function Rd(i,o,a,c,d){var p=i.memoizedState;p===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:d}:(p.isBackwards=o,p.rendering=null,p.renderingStartTime=0,p.last=c,p.tail=a,p.tailMode=d)}function gg(i,o,a){var c=o.pendingProps,d=c.revealOrder,p=c.tail;if(_t(i,o,c.children,a),c=Ce.current,c&2)c=c&1|2,o.flags|=128;else{if(i!==null&&i.flags&128)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&mg(i,a,o);else if(i.tag===19)mg(i,a,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}c&=1}if(me(Ce,c),!(o.mode&1))o.memoizedState=null;else switch(d){case"forwards":for(a=o.child,d=null;a!==null;)i=a.alternate,i!==null&&na(i)===null&&(d=a),a=a.sibling;a=d,a===null?(d=o.child,o.child=null):(d=a.sibling,a.sibling=null),Rd(o,!1,d,a,p);break;case"backwards":for(a=null,d=o.child,o.child=null;d!==null;){if(i=d.alternate,i!==null&&na(i)===null){o.child=d;break}i=d.sibling,d.sibling=a,a=d,d=i}Rd(o,!0,a,null,p);break;case"together":Rd(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ua(i,o){!(o.mode&1)&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function pr(i,o,a){if(i!==null&&(o.dependencies=i.dependencies),xi|=o.lanes,!(a&o.childLanes))return null;if(i!==null&&o.child!==i.child)throw Error(u(153));if(o.child!==null){for(i=o.child,a=br(i,i.pendingProps),o.child=a,a.return=o;i.sibling!==null;)i=i.sibling,a=a.sibling=br(i,i.pendingProps),a.return=o;a.sibling=null}return o.child}function Ax(i,o,a){switch(o.tag){case 3:hg(o),io();break;case 5:Om(o);break;case 1:Lt(o.type)&&jl(o);break;case 4:ud(o,o.stateNode.containerInfo);break;case 10:xm(o,o.type._context,o.memoizedProps.value);break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(me(Ce,Ce.current&1),o.flags|=128,null):a&o.child.childLanes?pg(i,o,a):(me(Ce,Ce.current&1),i=pr(i,o,a),i!==null?i.sibling:null);me(Ce,Ce.current&1);break;case 19:if(c=(a&o.childLanes)!==0,i.flags&128){if(c)return gg(i,o,a);o.flags|=128}var d=o.memoizedState;if(d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),me(Ce,Ce.current),c)break;return null;case 22:case 23:return o.lanes=0,ug(i,o,a)}return pr(i,o,a)}function Qn(i){i.flags|=4}function vg(i,o){if(i!==null&&i.child===o.child)return!0;if(o.flags&16)return!1;for(i=o.child;i!==null;){if(i.flags&12854||i.subtreeFlags&12854)return!1;i=i.sibling}return!0}var vs,ys,ca,da;if(ct)vs=function(i,o){for(var a=o.child;a!==null;){if(a.tag===5||a.tag===6)es(i,a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},ys=function(){},ca=function(i,o,a,c,d){if(i=i.memoizedProps,i!==c){var p=o.stateNode,y=Un(ln.current);a=ns(p,a,i,c,d,y),(o.updateQueue=a)&&Qn(o)}},da=function(i,o,a,c){a!==c&&Qn(o)};else if($){vs=function(i,o,a,c){for(var d=o.child;d!==null;){if(d.tag===5){var p=d.stateNode;a&&c&&(p=sm(p,d.type,d.memoizedProps,d)),es(i,p)}else if(d.tag===6)p=d.stateNode,a&&c&&(p=lm(p,d.memoizedProps,d)),es(i,p);else if(d.tag!==4){if(d.tag===22&&d.memoizedState!==null)p=d.child,p!==null&&(p.return=d),vs(i,d,!0,!0);else if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return;d=d.return}d.sibling.return=d.return,d=d.sibling}};var yg=function(i,o,a,c){for(var d=o.child;d!==null;){if(d.tag===5){var p=d.stateNode;a&&c&&(p=sm(p,d.type,d.memoizedProps,d)),om(i,p)}else if(d.tag===6)p=d.stateNode,a&&c&&(p=lm(p,d.memoizedProps,d)),om(i,p);else if(d.tag!==4){if(d.tag===22&&d.memoizedState!==null)p=d.child,p!==null&&(p.return=d),yg(i,d,!0,!0);else if(d.child!==null){d.child.return=d,d=d.child;continue}}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return;d=d.return}d.sibling.return=d.return,d=d.sibling}};ys=function(i,o){var a=o.stateNode;if(!vg(i,o)){i=a.containerInfo;var c=im(i);yg(c,o,!1,!1),a.pendingChildren=c,Qn(o),VS(i,c)}},ca=function(i,o,a,c,d){var p=i.stateNode,y=i.memoizedProps;if((i=vg(i,o))&&y===c)o.stateNode=p;else{var C=o.stateNode,N=Un(ln.current),B=null;y!==c&&(B=ns(C,a,y,c,d,N)),i&&B===null?o.stateNode=p:(p=US(p,B,a,y,c,o,i,C),ts(p,a,c,d,N)&&Qn(o),o.stateNode=p,i?Qn(o):vs(p,o,!1,!1))}},da=function(i,o,a,c){a!==c?(i=Un(ao.current),a=Un(ln.current),o.stateNode=Dl(c,i,a,o),Qn(o)):o.stateNode=i.stateNode}}else ys=function(){},ca=function(){},da=function(){};function ws(i,o){if(!_e)switch(i.tailMode){case"hidden":o=i.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?i.tail=null:a.sibling=null;break;case"collapsed":a=i.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function ft(i){var o=i.alternate!==null&&i.alternate.child===i.child,a=0,c=0;if(o)for(var d=i.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags&14680064,c|=d.flags&14680064,d.return=i,d=d.sibling;else for(d=i.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=i,d=d.sibling;return i.subtreeFlags|=c,i.childLanes=a,o}function Dx(i,o,a){var c=o.pendingProps;switch($c(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(o),null;case 1:return Lt(o.type)&&Bl(),ft(o),null;case 3:return a=o.stateNode,uo(),we(It),we(dt),hd(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(i===null||i.child===null)&&(Yl(o)?Qn(o):i===null||i.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,_n!==null&&(Qd(_n),_n=null))),ys(i,o),ft(o),null;case 5:cd(o),a=Un(ao.current);var d=o.type;if(i!==null&&o.stateNode!=null)ca(i,o,d,c,a),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!c){if(o.stateNode===null)throw Error(u(166));return ft(o),null}if(i=Un(ln.current),Yl(o)){if(!J)throw Error(u(175));i=JS(o.stateNode,o.type,o.memoizedProps,a,i,o,!us),o.updateQueue=i,i!==null&&Qn(o)}else{var p=qi(d,c,a,i,o);vs(p,o,!1,!1),o.stateNode=p,ts(p,d,c,a,i)&&Qn(o)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return ft(o),null;case 6:if(i&&o.stateNode!=null)da(i,o,i.memoizedProps,c);else{if(typeof c!="string"&&o.stateNode===null)throw Error(u(166));if(i=Un(ao.current),a=Un(ln.current),Yl(o)){if(!J)throw Error(u(176));if(i=o.stateNode,a=o.memoizedProps,(c=ex(i,a,o,!us))&&(d=Ut,d!==null))switch(d.tag){case 3:ax(d.stateNode.containerInfo,i,a,(d.mode&1)!==0);break;case 5:ux(d.type,d.memoizedProps,d.stateNode,i,a,(d.mode&1)!==0)}c&&Qn(o)}else o.stateNode=Dl(c,i,a,o)}return ft(o),null;case 13:if(we(Ce),c=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_e&&on!==null&&o.mode&1&&!(o.flags&128))Sm(),io(),o.flags|=98560,d=!1;else if(d=Yl(o),c!==null&&c.dehydrated!==null){if(i===null){if(!d)throw Error(u(318));if(!J)throw Error(u(344));if(d=o.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(u(317));tx(d,o)}else io(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;ft(o),d=!1}else _n!==null&&(Qd(_n),_n=null),d=!0;if(!d)return o.flags&65536?o:null}return o.flags&128?(o.lanes=a,o):(a=c!==null,a!==(i!==null&&i.memoizedState!==null)&&a&&(o.child.flags|=8192,o.mode&1&&(i===null||Ce.current&1?Qe===0&&(Qe=3):Xd())),o.updateQueue!==null&&(o.flags|=4),ft(o),null);case 4:return uo(),ys(i,o),i===null&&rt(o.stateNode.containerInfo),ft(o),null;case 10:return rd(o.type._context),ft(o),null;case 17:return Lt(o.type)&&Bl(),ft(o),null;case 19:if(we(Ce),d=o.memoizedState,d===null)return ft(o),null;if(c=(o.flags&128)!==0,p=d.rendering,p===null)if(c)ws(d,!1);else{if(Qe!==0||i!==null&&i.flags&128)for(i=o.child;i!==null;){if(p=na(i),p!==null){for(o.flags|=128,ws(d,!1),i=p.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),o.subtreeFlags=0,i=a,a=o.child;a!==null;)c=a,d=i,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=d,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,d=p.dependencies,c.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),a=a.sibling;return me(Ce,Ce.current&1|2),o.child}i=i.sibling}d.tail!==null&&$e()>bd&&(o.flags|=128,c=!0,ws(d,!1),o.lanes=4194304)}else{if(!c)if(i=na(p),i!==null){if(o.flags|=128,c=!0,i=i.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),ws(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!_e)return ft(o),null}else 2*$e()-d.renderingStartTime>bd&&a!==1073741824&&(o.flags|=128,c=!0,ws(d,!1),o.lanes=4194304);d.isBackwards?(p.sibling=o.child,o.child=p):(i=d.last,i!==null?i.sibling=p:o.child=p,d.last=p)}return d.tail!==null?(o=d.tail,d.rendering=o,d.tail=o.sibling,d.renderingStartTime=$e(),o.sibling=null,i=Ce.current,me(Ce,c?i&1|2:i&1),o):(ft(o),null);case 22:case 23:return Gd(),a=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==a&&(o.flags|=8192),a&&o.mode&1?Vt&1073741824&&(ft(o),ct&&o.subtreeFlags&6&&(o.flags|=8192)):ft(o),null;case 24:return null;case 25:return null}throw Error(u(156,o.tag))}function Wx(i,o){switch($c(o),o.tag){case 1:return Lt(o.type)&&Bl(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return uo(),we(It),we(dt),hd(),i=o.flags,i&65536&&!(i&128)?(o.flags=i&-65537|128,o):null;case 5:return cd(o),null;case 13:if(we(Ce),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(u(340));io()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return we(Ce),null;case 4:return uo(),null;case 10:return rd(o.type._context),null;case 22:case 23:return Gd(),null;case 24:return null;default:return null}}var ha=!1,pt=!1,Bx=typeof WeakSet=="function"?WeakSet:Set,Q=null;function ho(i,o){var a=i.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Pe(i,o,c)}else a.current=null}function zd(i,o,a){try{a()}catch(c){Pe(i,o,c)}}var wg=!1;function jx(i,o){for(j(i.containerInfo),Q=o;Q!==null;)if(i=Q,o=i.child,(i.subtreeFlags&1028)!==0&&o!==null)o.return=i,Q=o;else for(;Q!==null;){i=Q;try{var a=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(a!==null){var c=a.memoizedProps,d=a.memoizedState,p=i.stateNode,y=p.getSnapshotBeforeUpdate(i.elementType===i.type?c:Pn(i.type,c),d);p.__reactInternalSnapshotBeforeUpdate=y}break;case 3:ct&&HS(i.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(C){Pe(i,i.return,C)}if(o=i.sibling,o!==null){o.return=i.return,Q=o;break}Q=i.return}return a=wg,wg=!1,a}function Ss(i,o,a){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&i)===i){var p=d.destroy;d.destroy=void 0,p!==void 0&&zd(o,a,p)}d=d.next}while(d!==c)}}function fa(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var a=o=o.next;do{if((a.tag&i)===i){var c=a.create;a.destroy=c()}a=a.next}while(a!==o)}}function Id(i){var o=i.ref;if(o!==null){var a=i.stateNode;switch(i.tag){case 5:i=tn(a);break;default:i=a}typeof o=="function"?o(i):o.current=i}}function Sg(i){var o=i.alternate;o!==null&&(i.alternate=null,Sg(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Bn(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function xg(i){return i.tag===5||i.tag===3||i.tag===4}function Eg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||xg(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Ld(i,o,a){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?MS(a,i,o):IS(a,i);else if(c!==4&&(i=i.child,i!==null))for(Ld(i,o,a),i=i.sibling;i!==null;)Ld(i,o,a),i=i.sibling}function Nd(i,o,a){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?FS(a,i,o):zS(a,i);else if(c!==4&&(i=i.child,i!==null))for(Nd(i,o,a),i=i.sibling;i!==null;)Nd(i,o,a),i=i.sibling}var it=null,kn=!1;function Gn(i,o,a){for(a=a.child;a!==null;)Od(i,o,a),a=a.sibling}function Od(i,o,a){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(Vl,a)}catch{}switch(a.tag){case 5:pt||ho(a,o);case 6:if(ct){var c=it,d=kn;it=null,Gn(i,o,a),it=c,kn=d,it!==null&&(kn?DS(it,a.stateNode):AS(it,a.stateNode))}else Gn(i,o,a);break;case 18:ct&&it!==null&&(kn?sx(it,a.stateNode):ox(it,a.stateNode));break;case 4:ct?(c=it,d=kn,it=a.stateNode.containerInfo,kn=!0,Gn(i,o,a),it=c,kn=d):($&&(c=a.stateNode.containerInfo,d=im(c),Dc(c,d)),Gn(i,o,a));break;case 0:case 11:case 14:case 15:if(!pt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var p=d,y=p.destroy;p=p.tag,y!==void 0&&(p&2||p&4)&&zd(a,o,y),d=d.next}while(d!==c)}Gn(i,o,a);break;case 1:if(!pt&&(ho(a,o),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(C){Pe(a,o,C)}Gn(i,o,a);break;case 21:Gn(i,o,a);break;case 22:a.mode&1?(pt=(c=pt)||a.memoizedState!==null,Gn(i,o,a),pt=c):Gn(i,o,a);break;default:Gn(i,o,a)}}function _g(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var a=i.stateNode;a===null&&(a=i.stateNode=new Bx),o.forEach(function(c){var d=Zx.bind(null,i,c);a.has(c)||(a.add(c),c.then(d,d))})}}function Cn(i,o){var a=o.deletions;if(a!==null)for(var c=0;c<a.length;c++){var d=a[c];try{var p=i,y=o;if(ct){var C=y;e:for(;C!==null;){switch(C.tag){case 5:it=C.stateNode,kn=!1;break e;case 3:it=C.stateNode.containerInfo,kn=!0;break e;case 4:it=C.stateNode.containerInfo,kn=!0;break e}C=C.return}if(it===null)throw Error(u(160));Od(p,y,d),it=null,kn=!1}else Od(p,y,d);var N=d.alternate;N!==null&&(N.return=null),d.return=null}catch(B){Pe(d,o,B)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Pg(o,i),o=o.sibling}function Pg(i,o){var a=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Cn(o,i),Xn(i),c&4){try{Ss(3,i,i.return),fa(3,i)}catch(H){Pe(i,i.return,H)}try{Ss(5,i,i.return)}catch(H){Pe(i,i.return,H)}}break;case 1:Cn(o,i),Xn(i),c&512&&a!==null&&ho(a,a.return);break;case 5:if(Cn(o,i),Xn(i),c&512&&a!==null&&ho(a,a.return),ct){if(i.flags&32){var d=i.stateNode;try{rm(d)}catch(H){Pe(i,i.return,H)}}if(c&4&&(d=i.stateNode,d!=null)){var p=i.memoizedProps;if(a=a!==null?a.memoizedProps:p,c=i.type,o=i.updateQueue,i.updateQueue=null,o!==null)try{OS(d,o,c,a,p,i)}catch(H){Pe(i,i.return,H)}}}break;case 6:if(Cn(o,i),Xn(i),c&4&&ct){if(i.stateNode===null)throw Error(u(162));d=i.stateNode,p=i.memoizedProps,a=a!==null?a.memoizedProps:p;try{LS(d,a,p)}catch(H){Pe(i,i.return,H)}}break;case 3:if(Cn(o,i),Xn(i),c&4){if(ct&&J&&a!==null&&a.memoizedState.isDehydrated)try{rx(o.containerInfo)}catch(H){Pe(i,i.return,H)}if($){d=o.containerInfo,p=o.pendingChildren;try{Dc(d,p)}catch(H){Pe(i,i.return,H)}}}break;case 4:if(Cn(o,i),Xn(i),c&4&&$){p=i.stateNode,d=p.containerInfo,p=p.pendingChildren;try{Dc(d,p)}catch(H){Pe(i,i.return,H)}}break;case 13:Cn(o,i),Xn(i),d=i.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(jd=$e())),c&4&&_g(i);break;case 22:var y=a!==null&&a.memoizedState!==null;if(i.mode&1?(pt=(a=pt)||y,Cn(o,i),pt=a):Cn(o,i),Xn(i),c&8192){if(a=i.memoizedState!==null,(i.stateNode.isHidden=a)&&!y&&i.mode&1)for(Q=i,c=i.child;c!==null;){for(o=Q=c;Q!==null;){y=Q;var C=y.child;switch(y.tag){case 0:case 11:case 14:case 15:Ss(4,y,y.return);break;case 1:ho(y,y.return);var N=y.stateNode;if(typeof N.componentWillUnmount=="function"){var B=y,X=y.return;try{var te=B;N.props=te.memoizedProps,N.state=te.memoizedState,N.componentWillUnmount()}catch(H){Pe(B,X,H)}}break;case 5:ho(y,y.return);break;case 22:if(y.memoizedState!==null){Tg(o);continue}}C!==null?(C.return=y,Q=C):Tg(o)}c=c.sibling}if(ct){e:if(c=null,ct)for(o=i;;){if(o.tag===5){if(c===null){c=o;try{d=o.stateNode,a?WS(d):jS(o.stateNode,o.memoizedProps)}catch(H){Pe(i,i.return,H)}}}else if(o.tag===6){if(c===null)try{p=o.stateNode,a?BS(p):bS(p,o.memoizedProps)}catch(H){Pe(i,i.return,H)}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}}}break;case 19:Cn(o,i),Xn(i),c&4&&_g(i);break;case 21:break;default:Cn(o,i),Xn(i)}}function Xn(i){var o=i.flags;if(o&2){try{if(ct){e:{for(var a=i.return;a!==null;){if(xg(a)){var c=a;break e}a=a.return}throw Error(u(160))}switch(c.tag){case 5:var d=c.stateNode;c.flags&32&&(rm(d),c.flags&=-33);var p=Eg(i);Nd(i,p,d);break;case 3:case 4:var y=c.stateNode.containerInfo,C=Eg(i);Ld(i,C,y);break;default:throw Error(u(161))}}}catch(N){Pe(i,i.return,N)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function bx(i,o,a){Q=i,kg(i,o,a)}function kg(i,o,a){for(var c=(i.mode&1)!==0;Q!==null;){var d=Q,p=d.child;if(d.tag===22&&c){var y=d.memoizedState!==null||ha;if(!y){var C=d.alternate,N=C!==null&&C.memoizedState!==null||pt;C=ha;var B=pt;if(ha=y,(pt=N)&&!B)for(Q=d;Q!==null;)y=Q,N=y.child,y.tag===22&&y.memoizedState!==null?Rg(d):N!==null?(N.return=y,Q=N):Rg(d);for(;p!==null;)Q=p,kg(p,o,a),p=p.sibling;Q=d,ha=C,pt=B}Cg(i,o,a)}else d.subtreeFlags&8772&&p!==null?(p.return=d,Q=p):Cg(i,o,a)}}function Cg(i){for(;Q!==null;){var o=Q;if(o.flags&8772){var a=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:pt||fa(5,o);break;case 1:var c=o.stateNode;if(o.flags&4&&!pt)if(a===null)c.componentDidMount();else{var d=o.elementType===o.type?a.memoizedProps:Pn(o.type,a.memoizedProps);c.componentDidUpdate(d,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var p=o.updateQueue;p!==null&&km(o,p,c);break;case 3:var y=o.updateQueue;if(y!==null){if(a=null,o.child!==null)switch(o.child.tag){case 5:a=tn(o.child.stateNode);break;case 1:a=o.child.stateNode}km(o,y,a)}break;case 5:var C=o.stateNode;a===null&&o.flags&4&&NS(C,o.type,o.memoizedProps,o);break;case 6:break;case 4:break;case 12:break;case 13:if(J&&o.memoizedState===null){var N=o.alternate;if(N!==null){var B=N.memoizedState;if(B!==null){var X=B.dehydrated;X!==null&&ix(X)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}pt||o.flags&512&&Id(o)}catch(te){Pe(o,o.return,te)}}if(o===i){Q=null;break}if(a=o.sibling,a!==null){a.return=o.return,Q=a;break}Q=o.return}}function Tg(i){for(;Q!==null;){var o=Q;if(o===i){Q=null;break}var a=o.sibling;if(a!==null){a.return=o.return,Q=a;break}Q=o.return}}function Rg(i){for(;Q!==null;){var o=Q;try{switch(o.tag){case 0:case 11:case 15:var a=o.return;try{fa(4,o)}catch(N){Pe(o,a,N)}break;case 1:var c=o.stateNode;if(typeof c.componentDidMount=="function"){var d=o.return;try{c.componentDidMount()}catch(N){Pe(o,d,N)}}var p=o.return;try{Id(o)}catch(N){Pe(o,p,N)}break;case 5:var y=o.return;try{Id(o)}catch(N){Pe(o,y,N)}}}catch(N){Pe(o,o.return,N)}if(o===i){Q=null;break}var C=o.sibling;if(C!==null){C.return=o.return,Q=C;break}Q=o.return}}var pa=0,ma=1,ga=2,va=3,ya=4;if(typeof Symbol=="function"&&Symbol.for){var xs=Symbol.for;pa=xs("selector.component"),ma=xs("selector.has_pseudo_class"),ga=xs("selector.role"),va=xs("selector.test_id"),ya=xs("selector.text")}function Fd(i){var o=ye(i);if(o!=null){if(typeof o.memoizedProps["data-testname"]!="string")throw Error(u(364));return o}if(i=_S(i),i===null)throw Error(u(362));return i.stateNode.current}function Md(i,o){switch(o.$$typeof){case pa:if(i.type===o.value)return!0;break;case ma:e:{o=o.value,i=[i,0];for(var a=0;a<i.length;){var c=i[a++],d=i[a++],p=o[d];if(c.tag!==5||!os(c)){for(;p!=null&&Md(c,p);)d++,p=o[d];if(d===o.length){o=!0;break e}else for(c=c.child;c!==null;)i.push(c,d),c=c.sibling}}o=!1}return o;case ga:if(i.tag===5&&CS(i.stateNode,o.value))return!0;break;case ya:if((i.tag===5||i.tag===6)&&(i=kS(i),i!==null&&0<=i.indexOf(o.value)))return!0;break;case va:if(i.tag===5&&(i=i.memoizedProps["data-testname"],typeof i=="string"&&i.toLowerCase()===o.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function Ad(i){switch(i.$$typeof){case pa:return"<"+(D(i.value)||"Unknown")+">";case ma:return":has("+(Ad(i)||"")+")";case ga:return'[role="'+i.value+'"]';case ya:return'"'+i.value+'"';case va:return'[data-testname="'+i.value+'"]';default:throw Error(u(365))}}function zg(i,o){var a=[];i=[i,0];for(var c=0;c<i.length;){var d=i[c++],p=i[c++],y=o[p];if(d.tag!==5||!os(d)){for(;y!=null&&Md(d,y);)p++,y=o[p];if(p===o.length)a.push(d);else for(d=d.child;d!==null;)i.push(d,p),d=d.sibling}}return a}function Dd(i,o){if(!is)throw Error(u(363));i=Fd(i),i=zg(i,o),o=[],i=Array.from(i);for(var a=0;a<i.length;){var c=i[a++];if(c.tag===5)os(c)||o.push(c.stateNode);else for(c=c.child;c!==null;)i.push(c),c=c.sibling}return o}var Hx=Math.ceil,wa=h.ReactCurrentDispatcher,Wd=h.ReactCurrentOwner,Be=h.ReactCurrentBatchConfig,ie=0,Je=null,be=null,ot=0,Vt=0,fo=Or(0),Qe=0,Es=null,xi=0,Sa=0,Bd=0,_s=null,Ot=null,jd=0,bd=1/0,mr=null;function po(){bd=$e()+500}var xa=!1,Hd=null,Dr=null,Ea=!1,Wr=null,_a=0,Ps=0,Ud=null,Pa=-1,ka=0;function mt(){return ie&6?$e():Pa!==-1?Pa:Pa=$e()}function Br(i){return i.mode&1?ie&2&&ot!==0?ot&-ot:Px.transition!==null?(ka===0&&(ka=hm()),ka):(i=ue,i!==0?i:mi()):1}function un(i,o,a,c){if(50<Ps)throw Ps=0,Ud=null,Error(u(185));as(i,a,c),(!(ie&2)||i!==Je)&&(i===Je&&(!(ie&2)&&(Sa|=a),Qe===4&&jr(i,ot)),Ft(i,c),a===1&&ie===0&&!(o.mode&1)&&(po(),Ql&&bn()))}function Ft(i,o){var a=i.callbackNode;mx(i,o);var c=Ul(i,i===Je?ot:0);if(c===0)a!==null&&pm(a),i.callbackNode=null,i.callbackPriority=0;else if(o=c&-c,i.callbackPriority!==o){if(a!=null&&pm(a),o===1)i.tag===0?_x(Lg.bind(null,i)):mm(Lg.bind(null,i)),ur?ES(function(){!(ie&6)&&bn()}):Gc(Xc,bn),a=null;else{switch(fm(c)){case 1:a=Xc;break;case 4:a=wx;break;case 16:a=Yc;break;case 536870912:a=Sx;break;default:a=Yc}a=jg(a,Ig.bind(null,i))}i.callbackPriority=o,i.callbackNode=a}}function Ig(i,o){if(Pa=-1,ka=0,ie&6)throw Error(u(327));var a=i.callbackNode;if(Pi()&&i.callbackNode!==a)return null;var c=Ul(i,i===Je?ot:0);if(c===0)return null;if(c&30||c&i.expiredLanes||o)o=Ca(i,c);else{o=c;var d=ie;ie|=2;var p=Fg();(Je!==i||ot!==o)&&(mr=null,po(),Ei(i,o));do try{Qx();break}catch(C){Og(i,C)}while(!0);nd(),wa.current=p,ie=d,be!==null?o=0:(Je=null,ot=0,o=Qe)}if(o!==0){if(o===2&&(d=Uc(i),d!==0&&(c=d,o=Vd(i,d))),o===1)throw a=Es,Ei(i,0),jr(i,c),Ft(i,$e()),a;if(o===6)jr(i,c);else{if(d=i.current.alternate,!(c&30)&&!Ux(d)&&(o=Ca(i,c),o===2&&(p=Uc(i),p!==0&&(c=p,o=Vd(i,p))),o===1))throw a=Es,Ei(i,0),jr(i,c),Ft(i,$e()),a;switch(i.finishedWork=d,i.finishedLanes=c,o){case 0:case 1:throw Error(u(345));case 2:_i(i,Ot,mr);break;case 3:if(jr(i,c),(c&130023424)===c&&(o=jd+500-$e(),10<o)){if(Ul(i,0)!==0)break;if(d=i.suspendedLanes,(d&c)!==c){mt(),i.pingedLanes|=i.suspendedLanes&d;break}i.timeoutHandle=Ac(_i.bind(null,i,Ot,mr),o);break}_i(i,Ot,mr);break;case 4:if(jr(i,c),(c&4194240)===c)break;for(o=i.eventTimes,d=-1;0<c;){var y=31-xn(c);p=1<<y,y=o[y],y>d&&(d=y),c&=~p}if(c=d,c=$e()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Hx(c/1960))-c,10<c){i.timeoutHandle=Ac(_i.bind(null,i,Ot,mr),c);break}_i(i,Ot,mr);break;case 5:_i(i,Ot,mr);break;default:throw Error(u(329))}}}return Ft(i,$e()),i.callbackNode===a?Ig.bind(null,i):null}function Vd(i,o){var a=_s;return i.current.memoizedState.isDehydrated&&(Ei(i,o).flags|=256),i=Ca(i,o),i!==2&&(o=Ot,Ot=a,o!==null&&Qd(o)),i}function Qd(i){Ot===null?Ot=i:Ot.push.apply(Ot,i)}function Ux(i){for(var o=i;;){if(o.flags&16384){var a=o.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var d=a[c],p=d.getSnapshot;d=d.value;try{if(!En(p(),d))return!1}catch{return!1}}}if(a=o.child,o.subtreeFlags&16384&&a!==null)a.return=o,o=a;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function jr(i,o){for(o&=~Bd,o&=~Sa,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var a=31-xn(o),c=1<<a;i[a]=-1,o&=~c}}function Lg(i){if(ie&6)throw Error(u(327));Pi();var o=Ul(i,0);if(!(o&1))return Ft(i,$e()),null;var a=Ca(i,o);if(i.tag!==0&&a===2){var c=Uc(i);c!==0&&(o=c,a=Vd(i,c))}if(a===1)throw a=Es,Ei(i,0),jr(i,o),Ft(i,$e()),a;if(a===6)throw Error(u(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_i(i,Ot,mr),Ft(i,$e()),null}function Ng(i){Wr!==null&&Wr.tag===0&&!(ie&6)&&Pi();var o=ie;ie|=1;var a=Be.transition,c=ue;try{if(Be.transition=null,ue=1,i)return i()}finally{ue=c,Be.transition=a,ie=o,!(ie&6)&&bn()}}function Gd(){Vt=fo.current,we(fo)}function Ei(i,o){i.finishedWork=null,i.finishedLanes=0;var a=i.timeoutHandle;if(a!==rs&&(i.timeoutHandle=rs,nm(a)),be!==null)for(a=be.return;a!==null;){var c=a;switch($c(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Bl();break;case 3:uo(),we(It),we(dt),hd();break;case 5:cd(c);break;case 4:uo();break;case 13:we(Ce);break;case 19:we(Ce);break;case 10:rd(c.type._context);break;case 22:case 23:Gd()}a=a.return}if(Je=i,be=i=br(i.current,null),ot=Vt=o,Qe=0,Es=null,Bd=Sa=xi=0,Ot=_s=null,wi!==null){for(o=0;o<wi.length;o++)if(a=wi[o],c=a.interleaved,c!==null){a.interleaved=null;var d=c.next,p=a.pending;if(p!==null){var y=p.next;p.next=d,c.next=y}a.pending=c}wi=null}return i}function Og(i,o){do{var a=be;try{if(nd(),ra.current=la,ia){for(var c=Te.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}ia=!1}if(Si=0,qe=Ve=Te=null,fs=!1,ps=0,Wd.current=null,a===null||a.return===null){Qe=1,Es=o,be=null;break}e:{var p=i,y=a.return,C=a,N=o;if(o=ot,C.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var B=N,X=C,te=X.tag;if(!(X.mode&1)&&(te===0||te===11||te===15)){var H=X.alternate;H?(X.updateQueue=H.updateQueue,X.memoizedState=H.memoizedState,X.lanes=H.lanes):(X.updateQueue=null,X.memoizedState=null)}var Se=ig(y);if(Se!==null){Se.flags&=-257,og(Se,y,C,p,o),Se.mode&1&&rg(p,B,o),o=Se,N=B;var pe=o.updateQueue;if(pe===null){var Mt=new Set;Mt.add(N),o.updateQueue=Mt}else pe.add(N);break e}else{if(!(o&1)){rg(p,B,o),Xd();break e}N=Error(u(426))}}else if(_e&&C.mode&1){var gr=ig(y);if(gr!==null){!(gr.flags&65536)&&(gr.flags|=256),og(gr,y,C,p,o),ed(co(N,C));break e}}p=N=co(N,C),Qe!==4&&(Qe=2),_s===null?_s=[p]:_s.push(p),p=y;do{switch(p.tag){case 3:p.flags|=65536,o&=-o,p.lanes|=o;var I=tg(p,N,o);Pm(p,I);break e;case 1:C=N;var T=p.type,F=p.stateNode;if(!(p.flags&128)&&(typeof T.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(Dr===null||!Dr.has(F)))){p.flags|=65536,o&=-o,p.lanes|=o;var U=ng(p,C,o);Pm(p,U);break e}}p=p.return}while(p!==null)}Ag(a)}catch(Z){o=Z,be===a&&a!==null&&(be=a=a.return);continue}break}while(!0)}function Fg(){var i=wa.current;return wa.current=la,i===null?la:i}function Xd(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Je===null||!(xi&268435455)&&!(Sa&268435455)||jr(Je,ot)}function Ca(i,o){var a=ie;ie|=2;var c=Fg();(Je!==i||ot!==o)&&(mr=null,Ei(i,o));do try{Vx();break}catch(d){Og(i,d)}while(!0);if(nd(),ie=a,wa.current=c,be!==null)throw Error(u(261));return Je=null,ot=0,Qe}function Vx(){for(;be!==null;)Mg(be)}function Qx(){for(;be!==null&&!vx();)Mg(be)}function Mg(i){var o=Bg(i.alternate,i,Vt);i.memoizedProps=i.pendingProps,o===null?Ag(i):be=o,Wd.current=null}function Ag(i){var o=i;do{var a=o.alternate;if(i=o.return,o.flags&32768){if(a=Wx(a,o),a!==null){a.flags&=32767,be=a;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Qe=6,be=null;return}}else if(a=Dx(a,o,Vt),a!==null){be=a;return}if(o=o.sibling,o!==null){be=o;return}be=o=i}while(o!==null);Qe===0&&(Qe=5)}function _i(i,o,a){var c=ue,d=Be.transition;try{Be.transition=null,ue=1,Gx(i,o,a,c)}finally{Be.transition=d,ue=c}return null}function Gx(i,o,a,c){do Pi();while(Wr!==null);if(ie&6)throw Error(u(327));a=i.finishedWork;var d=i.finishedLanes;if(a===null)return null;if(i.finishedWork=null,i.finishedLanes=0,a===i.current)throw Error(u(177));i.callbackNode=null,i.callbackPriority=0;var p=a.lanes|a.childLanes;if(gx(i,p),i===Je&&(be=Je=null,ot=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||Ea||(Ea=!0,jg(Yc,function(){return Pi(),null})),p=(a.flags&15990)!==0,a.subtreeFlags&15990||p){p=Be.transition,Be.transition=null;var y=ue;ue=1;var C=ie;ie|=4,Wd.current=null,jx(i,a),Pg(a,i),Me(i.containerInfo),i.current=a,bx(a,i,d),yx(),ie=C,ue=y,Be.transition=p}else i.current=a;if(Ea&&(Ea=!1,Wr=i,_a=d),p=i.pendingLanes,p===0&&(Dr=null),xx(a.stateNode,c),Ft(i,$e()),o!==null)for(c=i.onRecoverableError,a=0;a<o.length;a++)d=o[a],c(d.value,{componentStack:d.stack,digest:d.digest});if(xa)throw xa=!1,i=Hd,Hd=null,i;return _a&1&&i.tag!==0&&Pi(),p=i.pendingLanes,p&1?i===Ud?Ps++:(Ps=0,Ud=i):Ps=0,bn(),null}function Pi(){if(Wr!==null){var i=fm(_a),o=Be.transition,a=ue;try{if(Be.transition=null,ue=16>i?16:i,Wr===null)var c=!1;else{if(i=Wr,Wr=null,_a=0,ie&6)throw Error(u(331));var d=ie;for(ie|=4,Q=i.current;Q!==null;){var p=Q,y=p.child;if(Q.flags&16){var C=p.deletions;if(C!==null){for(var N=0;N<C.length;N++){var B=C[N];for(Q=B;Q!==null;){var X=Q;switch(X.tag){case 0:case 11:case 15:Ss(8,X,p)}var te=X.child;if(te!==null)te.return=X,Q=te;else for(;Q!==null;){X=Q;var H=X.sibling,Se=X.return;if(Sg(X),X===B){Q=null;break}if(H!==null){H.return=Se,Q=H;break}Q=Se}}}var pe=p.alternate;if(pe!==null){var Mt=pe.child;if(Mt!==null){pe.child=null;do{var gr=Mt.sibling;Mt.sibling=null,Mt=gr}while(Mt!==null)}}Q=p}}if(p.subtreeFlags&2064&&y!==null)y.return=p,Q=y;else e:for(;Q!==null;){if(p=Q,p.flags&2048)switch(p.tag){case 0:case 11:case 15:Ss(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,Q=I;break e}Q=p.return}}var T=i.current;for(Q=T;Q!==null;){y=Q;var F=y.child;if(y.subtreeFlags&2064&&F!==null)F.return=y,Q=F;else e:for(y=T;Q!==null;){if(C=Q,C.flags&2048)try{switch(C.tag){case 0:case 11:case 15:fa(9,C)}}catch(Z){Pe(C,C.return,Z)}if(C===y){Q=null;break e}var U=C.sibling;if(U!==null){U.return=C.return,Q=U;break e}Q=C.return}}if(ie=d,bn(),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(Vl,i)}catch{}c=!0}return c}finally{ue=a,Be.transition=o}}return!1}function Dg(i,o,a){o=co(a,o),o=tg(i,o,1),i=Ar(i,o,1),o=mt(),i!==null&&(as(i,1,o),Ft(i,o))}function Pe(i,o,a){if(i.tag===3)Dg(i,i,a);else for(;o!==null;){if(o.tag===3){Dg(o,i,a);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Dr===null||!Dr.has(c))){i=co(a,i),i=ng(o,i,1),o=Ar(o,i,1),i=mt(),o!==null&&(as(o,1,i),Ft(o,i));break}}o=o.return}}function Xx(i,o,a){var c=i.pingCache;c!==null&&c.delete(o),o=mt(),i.pingedLanes|=i.suspendedLanes&a,Je===i&&(ot&a)===a&&(Qe===4||Qe===3&&(ot&130023424)===ot&&500>$e()-jd?Ei(i,0):Bd|=a),Ft(i,o)}function Wg(i,o){o===0&&(i.mode&1?(o=Hl,Hl<<=1,!(Hl&130023424)&&(Hl=4194304)):o=1);var a=mt();i=Hn(i,o),i!==null&&(as(i,o,a),Ft(i,a))}function Yx(i){var o=i.memoizedState,a=0;o!==null&&(a=o.retryLane),Wg(i,a)}function Zx(i,o){var a=0;switch(i.tag){case 13:var c=i.stateNode,d=i.memoizedState;d!==null&&(a=d.retryLane);break;case 19:c=i.stateNode;break;default:throw Error(u(314))}c!==null&&c.delete(o),Wg(i,a)}var Bg;Bg=function(i,o,a){if(i!==null)if(i.memoizedProps!==o.pendingProps||It.current)Nt=!0;else{if(!(i.lanes&a)&&!(o.flags&128))return Nt=!1,Ax(i,o,a);Nt=!!(i.flags&131072)}else Nt=!1,_e&&o.flags&1048576&&gm(o,Xl,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;ua(i,o),i=o.pendingProps;var d=to(o,dt.current);so(o,a),d=md(null,o,c,i,d,a);var p=gd();return o.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Lt(c)?(p=!0,jl(o)):p=!1,o.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,sd(o),d.updater=ea,o.stateNode=d,d._reactInternals=o,ad(o,c,i,a),o=Pd(null,o,c,!0,p,a)):(o.tag=0,_e&&p&&Kc(o),_t(null,o,d,a),o=o.child),o;case 16:c=o.elementType;e:{switch(ua(i,o),i=o.pendingProps,d=c._init,c=d(c._payload),o.type=c,d=o.tag=$x(c),i=Pn(c,i),d){case 0:o=_d(null,o,c,i,a);break e;case 1:o=dg(null,o,c,i,a);break e;case 11:o=sg(null,o,c,i,a);break e;case 14:o=lg(null,o,c,Pn(c.type,i),a);break e}throw Error(u(306,c,""))}return o;case 0:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),_d(i,o,c,d,a);case 1:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),dg(i,o,c,d,a);case 3:e:{if(hg(o),i===null)throw Error(u(387));c=o.pendingProps,p=o.memoizedState,d=p.element,_m(i,o),Jl(o,c,null,a);var y=o.memoizedState;if(c=y.element,J&&p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){d=co(Error(u(423)),o),o=fg(i,o,c,a,d);break e}else if(c!==d){d=co(Error(u(424)),o),o=fg(i,o,c,a,d);break e}else for(J&&(on=$S(o.stateNode.containerInfo),Ut=o,_e=!0,_n=null,us=!1),a=Nm(o,null,c,a),o.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(io(),c===d){o=pr(i,o,a);break e}_t(i,o,c,a)}o=o.child}return o;case 5:return Om(o),i===null&&Jc(o),c=o.type,d=o.pendingProps,p=i!==null?i.memoizedProps:null,y=d.children,Ji(c,d)?y=null:p!==null&&Ji(c,p)&&(o.flags|=32),cg(i,o),_t(i,o,y,a),o.child;case 6:return i===null&&Jc(o),null;case 13:return pg(i,o,a);case 4:return ud(o,o.stateNode.containerInfo),c=o.pendingProps,i===null?o.child=lo(o,null,c,a):_t(i,o,c,a),o.child;case 11:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),sg(i,o,c,d,a);case 7:return _t(i,o,o.pendingProps,a),o.child;case 8:return _t(i,o,o.pendingProps.children,a),o.child;case 12:return _t(i,o,o.pendingProps.children,a),o.child;case 10:e:{if(c=o.type._context,d=o.pendingProps,p=o.memoizedProps,y=d.value,xm(o,c,y),p!==null)if(En(p.value,y)){if(p.children===d.children&&!It.current){o=pr(i,o,a);break e}}else for(p=o.child,p!==null&&(p.return=o);p!==null;){var C=p.dependencies;if(C!==null){y=p.child;for(var N=C.firstContext;N!==null;){if(N.context===c){if(p.tag===1){N=fr(-1,a&-a),N.tag=2;var B=p.updateQueue;if(B!==null){B=B.shared;var X=B.pending;X===null?N.next=N:(N.next=X.next,X.next=N),B.pending=N}}p.lanes|=a,N=p.alternate,N!==null&&(N.lanes|=a),id(p.return,a,o),C.lanes|=a;break}N=N.next}}else if(p.tag===10)y=p.type===o.type?null:p.child;else if(p.tag===18){if(y=p.return,y===null)throw Error(u(341));y.lanes|=a,C=y.alternate,C!==null&&(C.lanes|=a),id(y,a,o),y=p.sibling}else y=p.child;if(y!==null)y.return=p;else for(y=p;y!==null;){if(y===o){y=null;break}if(p=y.sibling,p!==null){p.return=y.return,y=p;break}y=y.return}p=y}_t(i,o,d.children,a),o=o.child}return o;case 9:return d=o.type,c=o.pendingProps.children,so(o,a),d=sn(d),c=c(d),o.flags|=1,_t(i,o,c,a),o.child;case 14:return c=o.type,d=Pn(c,o.pendingProps),d=Pn(c.type,d),lg(i,o,c,d,a);case 15:return ag(i,o,o.type,o.pendingProps,a);case 17:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:Pn(c,d),ua(i,o),o.tag=1,Lt(c)?(i=!0,jl(o)):i=!1,so(o,a),Rm(o,c,d),ad(o,c,d,a),Pd(null,o,c,!0,i,a);case 19:return gg(i,o,a);case 22:return ug(i,o,a)}throw Error(u(156,o.tag))};function jg(i,o){return Gc(i,o)}function Kx(i,o,a,c){this.tag=i,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(i,o,a,c){return new Kx(i,o,a,c)}function Yd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function $x(i){if(typeof i=="function")return Yd(i)?1:0;if(i!=null){if(i=i.$$typeof,i===R)return 11;if(i===w)return 14}return 2}function br(i,o){var a=i.alternate;return a===null?(a=cn(i.tag,o,i.key,i.mode),a.elementType=i.elementType,a.type=i.type,a.stateNode=i.stateNode,a.alternate=i,i.alternate=a):(a.pendingProps=o,a.type=i.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=i.flags&14680064,a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,o=i.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},a.sibling=i.sibling,a.index=i.index,a.ref=i.ref,a}function Ta(i,o,a,c,d,p){var y=2;if(c=i,typeof i=="function")Yd(i)&&(y=1);else if(typeof i=="string")y=5;else e:switch(i){case m:return ki(a.children,d,p,o);case S:y=8,d|=8;break;case E:return i=cn(12,a,o,d|2),i.elementType=E,i.lanes=p,i;case A:return i=cn(13,a,o,d),i.elementType=A,i.lanes=p,i;case x:return i=cn(19,a,o,d),i.elementType=x,i.lanes=p,i;case L:return Ra(a,d,p,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case P:y=10;break e;case k:y=9;break e;case R:y=11;break e;case w:y=14;break e;case _:y=16,c=null;break e}throw Error(u(130,i==null?i:typeof i,""))}return o=cn(y,a,o,d),o.elementType=i,o.type=c,o.lanes=p,o}function ki(i,o,a,c){return i=cn(7,i,c,o),i.lanes=a,i}function Ra(i,o,a,c){return i=cn(22,i,c,o),i.elementType=L,i.lanes=a,i.stateNode={isHidden:!1},i}function Zd(i,o,a){return i=cn(6,i,null,o),i.lanes=a,i}function Kd(i,o,a){return o=cn(4,i.children!==null?i.children:[],i.key,o),o.lanes=a,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function qx(i,o,a,c,d){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rs,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vc(0),this.expirationTimes=Vc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vc(0),this.identifierPrefix=c,this.onRecoverableError=d,J&&(this.mutableSourceEagerHydrationData=null)}function bg(i,o,a,c,d,p,y,C,N){return i=new qx(i,o,a,C,N),o===1?(o=1,p===!0&&(o|=8)):o=0,p=cn(3,null,null,o),i.current=p,p.stateNode=i,p.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},sd(p),i}function Hg(i){if(!i)return Fr;i=i._reactInternals;e:{if(q(i)!==i||i.tag!==1)throw Error(u(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Lt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(u(171))}if(i.tag===1){var a=i.type;if(Lt(a))return cm(i,a,o)}return o}function Ug(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(u(188)):(i=Object.keys(i).join(","),Error(u(268,i)));return i=se(o),i===null?null:i.stateNode}function Vg(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var a=i.retryLane;i.retryLane=a!==0&&a<o?a:o}}function za(i,o){Vg(i,o),(i=i.alternate)&&Vg(i,o)}function Jx(i){return i=se(i),i===null?null:i.stateNode}function eE(){return null}return n.attemptContinuousHydration=function(i){if(i.tag===13){var o=Hn(i,134217728);if(o!==null){var a=mt();un(o,i,134217728,a)}za(i,134217728)}},n.attemptDiscreteHydration=function(i){if(i.tag===13){var o=Hn(i,1);if(o!==null){var a=mt();un(o,i,1,a)}za(i,1)}},n.attemptHydrationAtCurrentPriority=function(i){if(i.tag===13){var o=Br(i),a=Hn(i,o);if(a!==null){var c=mt();un(a,i,o,c)}za(i,o)}},n.attemptSynchronousHydration=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var a=ls(o.pendingLanes);a!==0&&(Qc(o,a|1),Ft(o,$e()),!(ie&6)&&(po(),bn()))}break;case 13:Ng(function(){var c=Hn(i,1);if(c!==null){var d=mt();un(c,i,1,d)}}),za(i,1)}},n.batchedUpdates=function(i,o){var a=ie;ie|=1;try{return i(o)}finally{ie=a,ie===0&&(po(),Ql&&bn())}},n.createComponentSelector=function(i){return{$$typeof:pa,value:i}},n.createContainer=function(i,o,a,c,d,p,y){return bg(i,o,!1,null,a,c,d,p,y)},n.createHasPseudoClassSelector=function(i){return{$$typeof:ma,value:i}},n.createHydrationContainer=function(i,o,a,c,d,p,y,C,N){return i=bg(a,c,!0,i,d,p,y,C,N),i.context=Hg(null),a=i.current,c=mt(),d=Br(a),p=fr(c,d),p.callback=o??null,Ar(a,p,d),i.current.lanes=d,as(i,d,c),Ft(i,c),i},n.createPortal=function(i,o,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g,key:c==null?null:""+c,children:i,containerInfo:o,implementation:a}},n.createRoleSelector=function(i){return{$$typeof:ga,value:i}},n.createTestNameSelector=function(i){return{$$typeof:va,value:i}},n.createTextSelector=function(i){return{$$typeof:ya,value:i}},n.deferredUpdates=function(i){var o=ue,a=Be.transition;try{return Be.transition=null,ue=16,i()}finally{ue=o,Be.transition=a}},n.discreteUpdates=function(i,o,a,c,d){var p=ue,y=Be.transition;try{return Be.transition=null,ue=1,i(o,a,c,d)}finally{ue=p,Be.transition=y,ie===0&&po()}},n.findAllNodes=Dd,n.findBoundingRects=function(i,o){if(!is)throw Error(u(363));o=Dd(i,o),i=[];for(var a=0;a<o.length;a++)i.push(PS(o[a]));for(o=i.length-1;0<o;o--){a=i[o];for(var c=a.x,d=c+a.width,p=a.y,y=p+a.height,C=o-1;0<=C;C--)if(o!==C){var N=i[C],B=N.x,X=B+N.width,te=N.y,H=te+N.height;if(c>=B&&p>=te&&d<=X&&y<=H){i.splice(o,1);break}else if(c!==B||a.width!==N.width||H<p||te>y){if(!(p!==te||a.height!==N.height||X<c||B>d)){B>c&&(N.width+=B-c,N.x=c),X<d&&(N.width=d-B),i.splice(o,1);break}}else{te>p&&(N.height+=te-p,N.y=p),H<y&&(N.height=y-te),i.splice(o,1);break}}}return i},n.findHostInstance=Ug,n.findHostInstanceWithNoPortals=function(i){return i=K(i),i=i!==null?fe(i):null,i===null?null:i.stateNode},n.findHostInstanceWithWarning=function(i){return Ug(i)},n.flushControlled=function(i){var o=ie;ie|=1;var a=Be.transition,c=ue;try{Be.transition=null,ue=1,i()}finally{ue=c,Be.transition=a,ie=o,ie===0&&(po(),bn())}},n.flushPassiveEffects=Pi,n.flushSync=Ng,n.focusWithin=function(i,o){if(!is)throw Error(u(363));for(i=Fd(i),o=zg(i,o),o=Array.from(o),i=0;i<o.length;){var a=o[i++];if(!os(a)){if(a.tag===5&&TS(a.stateNode))return!0;for(a=a.child;a!==null;)o.push(a),a=a.sibling}}return!1},n.getCurrentUpdatePriority=function(){return ue},n.getFindAllNodesFailureDescription=function(i,o){if(!is)throw Error(u(363));var a=0,c=[];i=[Fd(i),0];for(var d=0;d<i.length;){var p=i[d++],y=i[d++],C=o[y];if((p.tag!==5||!os(p))&&(Md(p,C)&&(c.push(Ad(C)),y++,y>a&&(a=y)),y<o.length))for(p=p.child;p!==null;)i.push(p,y),p=p.sibling}if(a<o.length){for(i=[];a<o.length;a++)i.push(Ad(o[a]));return`findAllNodes was able to match part of the selector:
|
|
8
8
|
`+(c.join(" > ")+`
|
|
9
9
|
|
|
10
10
|
No matching component was found for:
|
|
11
|
-
`)+i.join(" > ")}return null},n.getPublicRootInstance=function(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return tn(i.child.stateNode);default:return i.child.stateNode}},n.injectIntoDevTools=function(i){if(i={bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:h.ReactCurrentDispatcher,findHostInstanceByFiber:Jx,findFiberByHostInstance:i.findFiberByHostInstance||eE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")i=!1;else{var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled||!o.supportsFiber)i=!0;else{try{Vl=o.inject(i),jn=o}catch{}i=!!o.checkDCE}}return i},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(i,o,a,c){if(!is)throw Error(u(363));i=Dd(i,o);var d=RS(i,a,c).disconnect;return{disconnect:function(){d()}}},n.registerMutableSourceForHydration=function(i,o){var a=o._getVersion;a=a(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,a]:i.mutableSourceEagerHydrationData.push(o,a)},n.runWithPriority=function(i,o){var a=ue;try{return ue=i,o()}finally{ue=a}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(i,o,a,c){var d=o.current,p=
|
|
11
|
+
`)+i.join(" > ")}return null},n.getPublicRootInstance=function(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return tn(i.child.stateNode);default:return i.child.stateNode}},n.injectIntoDevTools=function(i){if(i={bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:h.ReactCurrentDispatcher,findHostInstanceByFiber:Jx,findFiberByHostInstance:i.findFiberByHostInstance||eE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")i=!1;else{var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled||!o.supportsFiber)i=!0;else{try{Vl=o.inject(i),jn=o}catch{}i=!!o.checkDCE}}return i},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(i,o,a,c){if(!is)throw Error(u(363));i=Dd(i,o);var d=RS(i,a,c).disconnect;return{disconnect:function(){d()}}},n.registerMutableSourceForHydration=function(i,o){var a=o._getVersion;a=a(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,a]:i.mutableSourceEagerHydrationData.push(o,a)},n.runWithPriority=function(i,o){var a=ue;try{return ue=i,o()}finally{ue=a}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(i,o,a,c){var d=o.current,p=mt(),y=Br(d);return a=Hg(a),o.context===null?o.context=a:o.pendingContext=a,o=fr(p,y),o.payload={element:i},c=c===void 0?null:c,c!==null&&(o.callback=c),i=Ar(d,o,y),i!==null&&(un(i,d,y,p),ql(i,d,y)),y},n}});var dy=gt((AT,cy)=>{"use strict";cy.exports=uy()});var Fw=gt(en=>{"use strict";var M0=le(),qt=zh();function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var A0=new Set,pl={};function Xi(e,t){Vo(e,t),Vo(e+"Capture",t)}function Vo(e,t){for(pl[e]=t,e=0;e<t.length;e++)A0.add(t[e])}var Pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sf=Object.prototype.hasOwnProperty,s2=/^[: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]*$/,zy={},Iy={};function l2(e){return sf.call(Iy,e)?!0:sf.call(zy,e)?!1:s2.test(e)?Iy[e]=!0:(zy[e]=!0,!1)}function a2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function u2(e,t,n,r){if(t===null||typeof t>"u"||a2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zt(e,t,n,r,s,l,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=u}var ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ut[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ut[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ut[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ut[e]=new zt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ut[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ut[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ut[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ut[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ut[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var qf=/[\-:]([a-z])/g;function Jf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(qf,Jf);ut[t]=new zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qf,Jf);ut[t]=new zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qf,Jf);ut[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ut[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});ut.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ut[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function ep(e,t,n,r){var s=ut.hasOwnProperty(t)?ut[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(u2(t,n,s,r)&&(n=null),r||s===null?l2(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Rr=M0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cu=Symbol.for("react.element"),Co=Symbol.for("react.portal"),To=Symbol.for("react.fragment"),tp=Symbol.for("react.strict_mode"),lf=Symbol.for("react.profiler"),D0=Symbol.for("react.provider"),W0=Symbol.for("react.context"),np=Symbol.for("react.forward_ref"),af=Symbol.for("react.suspense"),uf=Symbol.for("react.suspense_list"),rp=Symbol.for("react.memo"),Kr=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var B0=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Ly=Symbol.iterator;function Xs(e){return e===null||typeof e!="object"?null:(e=Ly&&e[Ly]||e["@@iterator"],typeof e=="function"?e:null)}var Fe=Object.assign,Dh;function tl(e){if(Dh===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Dh=t&&t[1]||""}return`
|
|
12
12
|
`+Dh+e}var Wh=!1;function Bh(e,t){if(!e||Wh)return"";Wh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(g){var r=g}Reflect.construct(e,[],t)}else{try{t.call()}catch(g){r=g}e.call(t.prototype)}else{try{throw Error()}catch(g){r=g}e()}}catch(g){if(g&&r&&typeof g.stack=="string"){for(var s=g.stack.split(`
|
|
13
13
|
`),l=r.stack.split(`
|
|
14
14
|
`),u=s.length-1,h=l.length-1;1<=u&&0<=h&&s[u]!==l[h];)h--;for(;1<=u&&0<=h;u--,h--)if(s[u]!==l[h]){if(u!==1||h!==1)do if(u--,h--,0>h||s[u]!==l[h]){var f=`
|
|
15
15
|
`+s[u].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=u&&0<=h);break}}}finally{Wh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?tl(e):""}function c2(e){switch(e.tag){case 5:return tl(e.type);case 16:return tl("Lazy");case 13:return tl("Suspense");case 19:return tl("SuspenseList");case 0:case 2:case 15:return e=Bh(e.type,!1),e;case 11:return e=Bh(e.type.render,!1),e;case 1:return e=Bh(e.type,!0),e;default:return""}}function cf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case To:return"Fragment";case Co:return"Portal";case lf:return"Profiler";case tp:return"StrictMode";case af:return"Suspense";case uf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case W0:return(e.displayName||"Context")+".Consumer";case D0:return(e._context.displayName||"Context")+".Provider";case np:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rp:return t=e.displayName||null,t!==null?t:cf(e.type)||"Memo";case Kr:t=e._payload,e=e._init;try{return cf(e(t))}catch{}}return null}function d2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cf(t);case 8:return t===tp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ci(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function j0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function h2(e){var t=j0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){r=""+u,l.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function du(e){e._valueTracker||(e._valueTracker=h2(e))}function b0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=j0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bu(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}}function df(e,t){var n=t.checked;return Fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ny(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ci(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function H0(e,t){t=t.checked,t!=null&&ep(e,"checked",t,!1)}function hf(e,t){H0(e,t);var n=ci(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ff(e,t.type,n):t.hasOwnProperty("defaultValue")&&ff(e,t.type,ci(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ff(e,t,n){(t!=="number"||Bu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var nl=Array.isArray;function Wo(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ci(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function pf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return Fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(nl(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ci(n)}}function U0(e,t){var n=ci(t.value),r=ci(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function My(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function V0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?V0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hu,Q0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hu=hu||document.createElement("div"),hu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ol={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},f2=["Webkit","ms","Moz","O"];Object.keys(ol).forEach(function(e){f2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ol[t]=ol[e]})});function G0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ol.hasOwnProperty(e)&&ol[e]?(""+t).trim():t+"px"}function X0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=G0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var p2=Fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gf(e,t){if(t){if(p2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 yf=null;function ip(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wf=null,Bo=null,jo=null;function Ay(e){if(e=Ol(e)){if(typeof wf!="function")throw Error(W(280));var t=e.stateNode;t&&(t=fc(t),wf(e.stateNode,e.type,t))}}function Y0(e){Bo?jo?jo.push(e):jo=[e]:Bo=e}function Z0(){if(Bo){var e=Bo,t=jo;if(jo=Bo=null,Ay(e),t)for(e=0;e<t.length;e++)Ay(t[e])}}function K0(e,t){return e(t)}function $0(){}var jh=!1;function q0(e,t,n){if(jh)return e(t,n);jh=!0;try{return K0(e,t,n)}finally{jh=!1,(Bo!==null||jo!==null)&&($0(),Z0())}}function gl(e,t){var n=e.stateNode;if(n===null)return null;var r=fc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Sf=!1;if(Pr)try{Po={},Object.defineProperty(Po,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{Sf=!1}var Po;function m2(e,t,n,r,s,l,u,h,f){var g=Array.prototype.slice.call(arguments,3);try{t.apply(n,g)}catch(m){this.onError(m)}}var sl=!1,ju=null,bu=!1,xf=null,g2={onError:function(e){sl=!0,ju=e}};function v2(e,t,n,r,s,l,u,h,f){sl=!1,ju=null,m2.apply(g2,arguments)}function y2(e,t,n,r,s,l,u,h,f){if(v2.apply(this,arguments),sl){if(sl){var g=ju;sl=!1,ju=null}else throw Error(W(198));bu||(bu=!0,xf=g)}}function Yi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function J0(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 Dy(e){if(Yi(e)!==e)throw Error(W(188))}function w2(e){var t=e.alternate;if(!t){if(t=Yi(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var l=s.alternate;if(l===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===l.child){for(l=s.child;l;){if(l===n)return Dy(s),e;if(l===r)return Dy(s),t;l=l.sibling}throw Error(W(188))}if(n.return!==r.return)n=s,r=l;else{for(var u=!1,h=s.child;h;){if(h===n){u=!0,n=s,r=l;break}if(h===r){u=!0,r=s,n=l;break}h=h.sibling}if(!u){for(h=l.child;h;){if(h===n){u=!0,n=l,r=s;break}if(h===r){u=!0,r=l,n=s;break}h=h.sibling}if(!u)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function e1(e){return e=w2(e),e!==null?t1(e):null}function t1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=t1(e);if(t!==null)return t;e=e.sibling}return null}var n1=qt.unstable_scheduleCallback,Wy=qt.unstable_cancelCallback,S2=qt.unstable_shouldYield,x2=qt.unstable_requestPaint,je=qt.unstable_now,E2=qt.unstable_getCurrentPriorityLevel,op=qt.unstable_ImmediatePriority,r1=qt.unstable_UserBlockingPriority,Hu=qt.unstable_NormalPriority,_2=qt.unstable_LowPriority,i1=qt.unstable_IdlePriority,uc=null,or=null;function P2(e){if(or&&typeof or.onCommitFiberRoot=="function")try{or.onCommitFiberRoot(uc,e,void 0,(e.current.flags&128)===128)}catch{}}var Mn=Math.clz32?Math.clz32:T2,k2=Math.log,C2=Math.LN2;function T2(e){return e>>>=0,e===0?32:31-(k2(e)/C2|0)|0}var fu=64,pu=4194304;function rl(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Uu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,l=e.pingedLanes,u=n&268435455;if(u!==0){var h=u&~s;h!==0?r=rl(h):(l&=u,l!==0&&(r=rl(l)))}else u=n&~s,u!==0?r=rl(u):l!==0&&(r=rl(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,l=t&-t,s>=l||s===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mn(t),s=1<<n,r|=e[n],t&=~s;return r}function R2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function z2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,l=e.pendingLanes;0<l;){var u=31-Mn(l),h=1<<u,f=s[u];f===-1?(!(h&n)||h&r)&&(s[u]=R2(h,t)):f<=t&&(e.expiredLanes|=h),l&=~h}}function Ef(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function o1(){var e=fu;return fu<<=1,!(fu&4194240)&&(fu=64),e}function bh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ll(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mn(t),e[t]=n}function I2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Mn(n),l=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~l}}function sp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var he=0;function s1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var l1,lp,a1,u1,c1,_f=!1,mu=[],ni=null,ri=null,ii=null,vl=new Map,yl=new Map,qr=[],L2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function By(e,t){switch(e){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":vl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yl.delete(t.pointerId)}}function Ys(e,t,n,r,s,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[s]},t!==null&&(t=Ol(t),t!==null&&lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function N2(e,t,n,r,s){switch(t){case"focusin":return ni=Ys(ni,e,t,n,r,s),!0;case"dragenter":return ri=Ys(ri,e,t,n,r,s),!0;case"mouseover":return ii=Ys(ii,e,t,n,r,s),!0;case"pointerover":var l=s.pointerId;return vl.set(l,Ys(vl.get(l)||null,e,t,n,r,s)),!0;case"gotpointercapture":return l=s.pointerId,yl.set(l,Ys(yl.get(l)||null,e,t,n,r,s)),!0}return!1}function d1(e){var t=Di(e.target);if(t!==null){var n=Yi(t);if(n!==null){if(t=n.tag,t===13){if(t=J0(n),t!==null){e.blockedOn=t,c1(e.priority,function(){a1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yf=r,n.target.dispatchEvent(r),yf=null}else return t=Ol(n),t!==null&&lp(t),e.blockedOn=n,!1;t.shift()}return!0}function jy(e,t,n){zu(e)&&n.delete(t)}function O2(){_f=!1,ni!==null&&zu(ni)&&(ni=null),ri!==null&&zu(ri)&&(ri=null),ii!==null&&zu(ii)&&(ii=null),vl.forEach(jy),yl.forEach(jy)}function Zs(e,t){e.blockedOn===t&&(e.blockedOn=null,_f||(_f=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,O2)))}function wl(e){function t(s){return Zs(s,e)}if(0<mu.length){Zs(mu[0],e);for(var n=1;n<mu.length;n++){var r=mu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ni!==null&&Zs(ni,e),ri!==null&&Zs(ri,e),ii!==null&&Zs(ii,e),vl.forEach(t),yl.forEach(t),n=0;n<qr.length;n++)r=qr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qr.length&&(n=qr[0],n.blockedOn===null);)d1(n),n.blockedOn===null&&qr.shift()}var bo=Rr.ReactCurrentBatchConfig,Vu=!0;function F2(e,t,n,r){var s=he,l=bo.transition;bo.transition=null;try{he=1,ap(e,t,n,r)}finally{he=s,bo.transition=l}}function M2(e,t,n,r){var s=he,l=bo.transition;bo.transition=null;try{he=4,ap(e,t,n,r)}finally{he=s,bo.transition=l}}function ap(e,t,n,r){if(Vu){var s=Pf(e,t,n,r);if(s===null)Yh(e,t,r,Qu,n),By(e,r);else if(N2(s,e,t,n,r))r.stopPropagation();else if(By(e,r),t&4&&-1<L2.indexOf(e)){for(;s!==null;){var l=Ol(s);if(l!==null&&l1(l),l=Pf(e,t,n,r),l===null&&Yh(e,t,r,Qu,n),l===s)break;s=l}s!==null&&r.stopPropagation()}else Yh(e,t,r,null,n)}}var Qu=null;function Pf(e,t,n,r){if(Qu=null,e=ip(r),e=Di(e),e!==null)if(t=Yi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=J0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qu=e,null}function h1(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(E2()){case op:return 1;case r1:return 4;case Hu:case _2:return 16;case i1:return 536870912;default:return 16}default:return 16}}var ei=null,up=null,Iu=null;function f1(){if(Iu)return Iu;var e,t=up,n=t.length,r,s="value"in ei?ei.value:ei.textContent,l=s.length;for(e=0;e<n&&t[e]===s[e];e++);var u=n-e;for(r=1;r<=u&&t[n-r]===s[l-r];r++);return Iu=s.slice(e,1<r?1-r:void 0)}function Lu(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 gu(){return!0}function by(){return!1}function Jt(e){function t(n,r,s,l,u){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=l,this.target=u,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(l):l[h]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?gu:by,this.isPropagationStopped=by,this}return Fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=gu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=gu)},persist:function(){},isPersistent:gu}),t}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cp=Jt($o),Nl=Fe({},$o,{view:0,detail:0}),A2=Jt(Nl),Hh,Uh,Ks,cc=Fe({},Nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dp,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!==Ks&&(Ks&&e.type==="mousemove"?(Hh=e.screenX-Ks.screenX,Uh=e.screenY-Ks.screenY):Uh=Hh=0,Ks=e),Hh)},movementY:function(e){return"movementY"in e?e.movementY:Uh}}),Hy=Jt(cc),D2=Fe({},cc,{dataTransfer:0}),W2=Jt(D2),B2=Fe({},Nl,{relatedTarget:0}),Vh=Jt(B2),j2=Fe({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),b2=Jt(j2),H2=Fe({},$o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),U2=Jt(H2),V2=Fe({},$o,{data:0}),Uy=Jt(V2),Q2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G2={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"},X2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=X2[e])?!!t[e]:!1}function dp(){return Y2}var Z2=Fe({},Nl,{key:function(e){if(e.key){var t=Q2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Lu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?G2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dp,charCode:function(e){return e.type==="keypress"?Lu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Lu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),K2=Jt(Z2),$2=Fe({},cc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vy=Jt($2),q2=Fe({},Nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dp}),J2=Jt(q2),e_=Fe({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),t_=Jt(e_),n_=Fe({},cc,{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}),r_=Jt(n_),i_=[9,13,27,32],hp=Pr&&"CompositionEvent"in window,ll=null;Pr&&"documentMode"in document&&(ll=document.documentMode);var o_=Pr&&"TextEvent"in window&&!ll,p1=Pr&&(!hp||ll&&8<ll&&11>=ll),Qy=" ",Gy=!1;function m1(e,t){switch(e){case"keyup":return i_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function g1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ro=!1;function s_(e,t){switch(e){case"compositionend":return g1(t);case"keypress":return t.which!==32?null:(Gy=!0,Qy);case"textInput":return e=t.data,e===Qy&&Gy?null:e;default:return null}}function l_(e,t){if(Ro)return e==="compositionend"||!hp&&m1(e,t)?(e=f1(),Iu=up=ei=null,Ro=!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 p1&&t.locale!=="ko"?null:t.data;default:return null}}var a_={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 Xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!a_[e.type]:t==="textarea"}function v1(e,t,n,r){Y0(r),t=Gu(t,"onChange"),0<t.length&&(n=new cp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var al=null,Sl=null;function u_(e){R1(e,0)}function dc(e){var t=Lo(e);if(b0(t))return e}function c_(e,t){if(e==="change")return t}var y1=!1;Pr&&(Pr?(yu="oninput"in document,yu||(Qh=document.createElement("div"),Qh.setAttribute("oninput","return;"),yu=typeof Qh.oninput=="function"),vu=yu):vu=!1,y1=vu&&(!document.documentMode||9<document.documentMode));var vu,yu,Qh;function Yy(){al&&(al.detachEvent("onpropertychange",w1),Sl=al=null)}function w1(e){if(e.propertyName==="value"&&dc(Sl)){var t=[];v1(t,Sl,e,ip(e)),q0(u_,t)}}function d_(e,t,n){e==="focusin"?(Yy(),al=t,Sl=n,al.attachEvent("onpropertychange",w1)):e==="focusout"&&Yy()}function h_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dc(Sl)}function f_(e,t){if(e==="click")return dc(t)}function p_(e,t){if(e==="input"||e==="change")return dc(t)}function m_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dn=typeof Object.is=="function"?Object.is:m_;function xl(e,t){if(Dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!sf.call(t,s)||!Dn(e[s],t[s]))return!1}return!0}function Zy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ky(e,t){var n=Zy(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zy(n)}}function S1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?S1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x1(){for(var e=window,t=Bu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bu(e.document)}return t}function fp(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")}function g_(e){var t=x1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&S1(n.ownerDocument.documentElement,n)){if(r!==null&&fp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,l=Math.min(r.start,s);r=r.end===void 0?l:Math.min(r.end,s),!e.extend&&l>r&&(s=r,r=l,l=s),s=Ky(n,l);var u=Ky(n,r);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var v_=Pr&&"documentMode"in document&&11>=document.documentMode,zo=null,kf=null,ul=null,Cf=!1;function $y(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cf||zo==null||zo!==Bu(r)||(r=zo,"selectionStart"in r&&fp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ul&&xl(ul,r)||(ul=r,r=Gu(kf,"onSelect"),0<r.length&&(t=new cp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=zo)))}function wu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Io={animationend:wu("Animation","AnimationEnd"),animationiteration:wu("Animation","AnimationIteration"),animationstart:wu("Animation","AnimationStart"),transitionend:wu("Transition","TransitionEnd")},Gh={},E1={};Pr&&(E1=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function hc(e){if(Gh[e])return Gh[e];if(!Io[e])return e;var t=Io[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in E1)return Gh[e]=t[n];return e}var _1=hc("animationend"),P1=hc("animationiteration"),k1=hc("animationstart"),C1=hc("transitionend"),T1=new Map,qy="abort auxClick 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(" ");function hi(e,t){T1.set(e,t),Xi(t,[e])}for(Su=0;Su<qy.length;Su++)xu=qy[Su],Jy=xu.toLowerCase(),e0=xu[0].toUpperCase()+xu.slice(1),hi(Jy,"on"+e0);var xu,Jy,e0,Su;hi(_1,"onAnimationEnd");hi(P1,"onAnimationIteration");hi(k1,"onAnimationStart");hi("dblclick","onDoubleClick");hi("focusin","onFocus");hi("focusout","onBlur");hi(C1,"onTransitionEnd");Vo("onMouseEnter",["mouseout","mouseover"]);Vo("onMouseLeave",["mouseout","mouseover"]);Vo("onPointerEnter",["pointerout","pointerover"]);Vo("onPointerLeave",["pointerout","pointerover"]);Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var il="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(" "),y_=new Set("cancel close invalid load scroll toggle".split(" ").concat(il));function t0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,y2(r,t,void 0,e),e.currentTarget=null}function R1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var u=r.length-1;0<=u;u--){var h=r[u],f=h.instance,g=h.currentTarget;if(h=h.listener,f!==l&&s.isPropagationStopped())break e;t0(s,h,g),l=f}else for(u=0;u<r.length;u++){if(h=r[u],f=h.instance,g=h.currentTarget,h=h.listener,f!==l&&s.isPropagationStopped())break e;t0(s,h,g),l=f}}}if(bu)throw e=xf,bu=!1,xf=null,e}function xe(e,t){var n=t[Lf];n===void 0&&(n=t[Lf]=new Set);var r=e+"__bubble";n.has(r)||(z1(t,e,2,!1),n.add(r))}function Xh(e,t,n){var r=0;t&&(r|=4),z1(n,e,r,t)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function El(e){if(!e[Eu]){e[Eu]=!0,A0.forEach(function(n){n!=="selectionchange"&&(y_.has(n)||Xh(n,!1,e),Xh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eu]||(t[Eu]=!0,Xh("selectionchange",!1,t))}}function z1(e,t,n,r){switch(h1(t)){case 1:var s=F2;break;case 4:s=M2;break;default:s=ap}n=s.bind(null,t,n,e),s=void 0,!Sf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Yh(e,t,n,r,s){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var u=r.tag;if(u===3||u===4){var h=r.stateNode.containerInfo;if(h===s||h.nodeType===8&&h.parentNode===s)break;if(u===4)for(u=r.return;u!==null;){var f=u.tag;if((f===3||f===4)&&(f=u.stateNode.containerInfo,f===s||f.nodeType===8&&f.parentNode===s))return;u=u.return}for(;h!==null;){if(u=Di(h),u===null)return;if(f=u.tag,f===5||f===6){r=l=u;continue e}h=h.parentNode}}r=r.return}q0(function(){var g=l,m=ip(n),S=[];e:{var E=T1.get(e);if(E!==void 0){var P=cp,k=e;switch(e){case"keypress":if(Lu(n)===0)break e;case"keydown":case"keyup":P=K2;break;case"focusin":k="focus",P=Vh;break;case"focusout":k="blur",P=Vh;break;case"beforeblur":case"afterblur":P=Vh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Hy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=W2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=J2;break;case _1:case P1:case k1:P=b2;break;case C1:P=t_;break;case"scroll":P=A2;break;case"wheel":P=r_;break;case"copy":case"cut":case"paste":P=U2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Vy}var R=(t&4)!==0,A=!R&&e==="scroll",x=R?E!==null?E+"Capture":null:E;R=[];for(var w=g,_;w!==null;){_=w;var L=_.stateNode;if(_.tag===5&&L!==null&&(_=L,x!==null&&(L=gl(w,x),L!=null&&R.push(_l(w,L,_)))),A)break;w=w.return}0<R.length&&(E=new P(E,k,null,n,m),S.push({event:E,listeners:R}))}}if(!(t&7)){e:{if(E=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",E&&n!==yf&&(k=n.relatedTarget||n.fromElement)&&(Di(k)||k[kr]))break e;if((P||E)&&(E=m.window===m?m:(E=m.ownerDocument)?E.defaultView||E.parentWindow:window,P?(k=n.relatedTarget||n.toElement,P=g,k=k?Di(k):null,k!==null&&(A=Yi(k),k!==A||k.tag!==5&&k.tag!==6)&&(k=null)):(P=null,k=g),P!==k)){if(R=Hy,L="onMouseLeave",x="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(R=Vy,L="onPointerLeave",x="onPointerEnter",w="pointer"),A=P==null?E:Lo(P),_=k==null?E:Lo(k),E=new R(L,w+"leave",P,n,m),E.target=A,E.relatedTarget=_,L=null,Di(m)===g&&(R=new R(x,w+"enter",k,n,m),R.target=_,R.relatedTarget=A,L=R),A=L,P&&k)t:{for(R=P,x=k,w=0,_=R;_;_=ko(_))w++;for(_=0,L=x;L;L=ko(L))_++;for(;0<w-_;)R=ko(R),w--;for(;0<_-w;)x=ko(x),_--;for(;w--;){if(R===x||x!==null&&R===x.alternate)break t;R=ko(R),x=ko(x)}R=null}else R=null;P!==null&&n0(S,E,P,R,!1),k!==null&&A!==null&&n0(S,A,k,R,!0)}}e:{if(E=g?Lo(g):window,P=E.nodeName&&E.nodeName.toLowerCase(),P==="select"||P==="input"&&E.type==="file")var O=c_;else if(Xy(E))if(y1)O=p_;else{O=h_;var z=d_}else(P=E.nodeName)&&P.toLowerCase()==="input"&&(E.type==="checkbox"||E.type==="radio")&&(O=f_);if(O&&(O=O(e,g))){v1(S,O,n,m);break e}z&&z(e,E,g),e==="focusout"&&(z=E._wrapperState)&&z.controlled&&E.type==="number"&&ff(E,"number",E.value)}switch(z=g?Lo(g):window,e){case"focusin":(Xy(z)||z.contentEditable==="true")&&(zo=z,kf=g,ul=null);break;case"focusout":ul=kf=zo=null;break;case"mousedown":Cf=!0;break;case"contextmenu":case"mouseup":case"dragend":Cf=!1,$y(S,n,m);break;case"selectionchange":if(v_)break;case"keydown":case"keyup":$y(S,n,m)}var D;if(hp)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Ro?m1(e,n)&&(b="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(p1&&n.locale!=="ko"&&(Ro||b!=="onCompositionStart"?b==="onCompositionEnd"&&Ro&&(D=f1()):(ei=m,up="value"in ei?ei.value:ei.textContent,Ro=!0)),z=Gu(g,b),0<z.length&&(b=new Uy(b,e,null,n,m),S.push({event:b,listeners:z}),D?b.data=D:(D=g1(n),D!==null&&(b.data=D)))),(D=o_?s_(e,n):l_(e,n))&&(g=Gu(g,"onBeforeInput"),0<g.length&&(m=new Uy("onBeforeInput","beforeinput",null,n,m),S.push({event:m,listeners:g}),m.data=D))}R1(S,t)})}function _l(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gu(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,l=s.stateNode;s.tag===5&&l!==null&&(s=l,l=gl(e,n),l!=null&&r.unshift(_l(e,l,s)),l=gl(e,t),l!=null&&r.push(_l(e,l,s))),e=e.return}return r}function ko(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function n0(e,t,n,r,s){for(var l=t._reactName,u=[];n!==null&&n!==r;){var h=n,f=h.alternate,g=h.stateNode;if(f!==null&&f===r)break;h.tag===5&&g!==null&&(h=g,s?(f=gl(n,l),f!=null&&u.unshift(_l(n,f,h))):s||(f=gl(n,l),f!=null&&u.push(_l(n,f,h)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var w_=/\r\n?/g,S_=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(w_,`
|
|
16
|
-
`).replace(S_,"")}function _u(e,t,n){if(t=r0(t),r0(e)!==t&&n)throw Error(W(425))}function Xu(){}var Tf=null,Rf=null;function zf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var If=typeof setTimeout=="function"?setTimeout:void 0,x_=typeof clearTimeout=="function"?clearTimeout:void 0,i0=typeof Promise=="function"?Promise:void 0,E_=typeof queueMicrotask=="function"?queueMicrotask:typeof i0<"u"?function(e){return i0.resolve(null).then(e).catch(__)}:If;function __(e){setTimeout(function(){throw e})}function Zh(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),wl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);wl(t)}function oi(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==="$?")break;if(t==="/$")return null}}return e}function o0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qo=Math.random().toString(36).slice(2),ir="__reactFiber$"+qo,Pl="__reactProps$"+qo,kr="__reactContainer$"+qo,Lf="__reactEvents$"+qo,P_="__reactListeners$"+qo,k_="__reactHandles$"+qo;function Di(e){var t=e[ir];if(t)return t;for(var n=e.parentNode;n;){if(t=n[kr]||n[ir]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=o0(e);e!==null;){if(n=e[ir])return n;e=o0(e)}return t}e=n,n=e.parentNode}return null}function Ol(e){return e=e[ir]||e[kr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Lo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function fc(e){return e[Pl]||null}var Nf=[],No=-1;function fi(e){return{current:e}}function Ee(e){0>No||(e.current=Nf[No],Nf[No]=null,No--)}function ye(e,t){No++,Nf[No]=e.current,e.current=t}var di={},St=fi(di),jt=fi(!1),Hi=di;function Qo(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in n)s[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function bt(e){return e=e.childContextTypes,e!=null}function Yu(){Ee(jt),Ee(St)}function s0(e,t,n){if(St.current!==di)throw Error(W(168));ye(St,t),ye(jt,n)}function I1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(W(108,d2(e)||"Unknown",s));return Fe({},n,r)}function Zu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,Hi=St.current,ye(St,e),ye(jt,jt.current),!0}function l0(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=I1(e,t,Hi),r.__reactInternalMemoizedMergedChildContext=e,Ee(jt),Ee(St),ye(St,e)):Ee(jt),ye(jt,n)}var Sr=null,pc=!1,Kh=!1;function L1(e){Sr===null?Sr=[e]:Sr.push(e)}function C_(e){pc=!0,L1(e)}function pi(){if(!Kh&&Sr!==null){Kh=!0;var e=0,t=he;try{var n=Sr;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sr=null,pc=!1}catch(s){throw Sr!==null&&(Sr=Sr.slice(e+1)),n1(op,pi),s}finally{he=t,Kh=!1}}return null}var Oo=[],Fo=0,Ku=null,$u=0,mn=[],gn=0,Ui=null,xr=1,Er="";function Mi(e,t){Oo[Fo++]=$u,Oo[Fo++]=Ku,Ku=e,$u=t}function N1(e,t,n){mn[gn++]=xr,mn[gn++]=Er,mn[gn++]=Ui,Ui=e;var r=xr;e=Er;var s=32-Mn(r)-1;r&=~(1<<s),n+=1;var l=32-Mn(t)+s;if(30<l){var u=s-s%5;l=(r&(1<<u)-1).toString(32),r>>=u,s-=u,xr=1<<32-Mn(t)+s|n<<s|r,Er=l+e}else xr=1<<l|n<<s|r,Er=e}function pp(e){e.return!==null&&(Mi(e,1),N1(e,1,0))}function mp(e){for(;e===Ku;)Ku=Oo[--Fo],Oo[Fo]=null,$u=Oo[--Fo],Oo[Fo]=null;for(;e===Ui;)Ui=mn[--gn],mn[gn]=null,Er=mn[--gn],mn[gn]=null,xr=mn[--gn],mn[gn]=null}var $t=null,Kt=null,ke=!1,Fn=null;function O1(e,t){var n=vn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function a0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,$t=e,Kt=oi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$t=e,Kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ui!==null?{id:xr,overflow:Er}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,$t=e,Kt=null,!0):!1;default:return!1}}function Of(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ff(e){if(ke){var t=Kt;if(t){var n=t;if(!a0(e,t)){if(Of(e))throw Error(W(418));t=oi(n.nextSibling);var r=$t;t&&a0(e,t)?O1(r,n):(e.flags=e.flags&-4097|2,ke=!1,$t=e)}}else{if(Of(e))throw Error(W(418));e.flags=e.flags&-4097|2,ke=!1,$t=e}}}function u0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$t=e}function Pu(e){if(e!==$t)return!1;if(!ke)return u0(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zf(e.type,e.memoizedProps)),t&&(t=Kt)){if(Of(e))throw F1(),Error(W(418));for(;t;)O1(e,t),t=oi(t.nextSibling)}if(u0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kt=oi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kt=null}}else Kt=$t?oi(e.stateNode.nextSibling):null;return!0}function F1(){for(var e=Kt;e;)e=oi(e.nextSibling)}function Go(){Kt=$t=null,ke=!1}function gp(e){Fn===null?Fn=[e]:Fn.push(e)}var T_=Rr.ReactCurrentBatchConfig;function Nn(e,t){if(e&&e.defaultProps){t=Fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var qu=fi(null),Ju=null,Mo=null,vp=null;function yp(){vp=Mo=Ju=null}function wp(e){var t=qu.current;Ee(qu),e._currentValue=t}function Mf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ho(e,t){Ju=e,vp=Mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Bt=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(vp!==e)if(e={context:e,memoizedValue:t,next:null},Mo===null){if(Ju===null)throw Error(W(308));Mo=e,Ju.dependencies={lanes:0,firstContext:e}}else Mo=Mo.next=e;return t}var Wi=null;function Sp(e){Wi===null?Wi=[e]:Wi.push(e)}function M1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Sp(t)):(n.next=s.next,s.next=n),t.interleaved=n,Cr(e,r)}function Cr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $r=!1;function xp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function A1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _r(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function si(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Cr(e,n)}return s=r.interleaved,s===null?(t.next=t,Sp(r)):(t.next=s.next,s.next=t),r.interleaved=t,Cr(e,n)}function Nu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}function c0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?s=l=u:l=l.next=u,n=n.next}while(n!==null);l===null?s=l=t:l=l.next=t}else s=l=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ec(e,t,n,r){var s=e.updateQueue;$r=!1;var l=s.firstBaseUpdate,u=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var f=h,g=f.next;f.next=null,u===null?l=g:u.next=g,u=f;var m=e.alternate;m!==null&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==u&&(h===null?m.firstBaseUpdate=g:h.next=g,m.lastBaseUpdate=f))}if(l!==null){var S=s.baseState;u=0,m=g=f=null,h=l;do{var E=h.lane,P=h.eventTime;if((r&E)===E){m!==null&&(m=m.next={eventTime:P,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});e:{var k=e,R=h;switch(E=t,P=n,R.tag){case 1:if(k=R.payload,typeof k=="function"){S=k.call(P,S,E);break e}S=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=R.payload,E=typeof k=="function"?k.call(P,S,E):k,E==null)break e;S=Fe({},S,E);break e;case 2:$r=!0}}h.callback!==null&&h.lane!==0&&(e.flags|=64,E=s.effects,E===null?s.effects=[h]:E.push(h))}else P={eventTime:P,lane:E,tag:h.tag,payload:h.payload,callback:h.callback,next:null},m===null?(g=m=P,f=S):m=m.next=P,u|=E;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;E=h,h=E.next,E.next=null,s.lastBaseUpdate=E,s.shared.pending=null}}while(!0);if(m===null&&(f=S),s.baseState=f,s.firstBaseUpdate=g,s.lastBaseUpdate=m,t=s.shared.interleaved,t!==null){s=t;do u|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Qi|=u,e.lanes=u,e.memoizedState=S}}function d0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(W(191,s));s.call(r)}}}var D1=new M0.Component().refs;function Af(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var mc={isMounted:function(e){return(e=e._reactInternals)?Yi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tt(),s=ai(e),l=_r(r,s);l.payload=t,n!=null&&(l.callback=n),t=si(e,l,s),t!==null&&(An(t,e,s,r),Nu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tt(),s=ai(e),l=_r(r,s);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=si(e,l,s),t!==null&&(An(t,e,s,r),Nu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),r=ai(e),s=_r(n,r);s.tag=2,t!=null&&(s.callback=t),t=si(e,s,r),t!==null&&(An(t,e,r,n),Nu(t,e,r))}};function h0(e,t,n,r,s,l,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,u):t.prototype&&t.prototype.isPureReactComponent?!xl(n,r)||!xl(s,l):!0}function W1(e,t,n){var r=!1,s=di,l=t.contextType;return typeof l=="object"&&l!==null?l=wn(l):(s=bt(t)?Hi:St.current,r=t.contextTypes,l=(r=r!=null)?Qo(e,s):di),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=mc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function f0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mc.enqueueReplaceState(t,t.state,null)}function Df(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs=D1,xp(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=wn(l):(l=bt(t)?Hi:St.current,s.context=Qo(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Af(e,t,l,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&mc.enqueueReplaceState(s,s.state,null),ec(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var s=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(u){var h=s.refs;h===D1&&(h=s.refs={}),u===null?delete h[l]:h[l]=u},t._stringRef=l,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function ku(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function p0(e){var t=e._init;return t(e._payload)}function B1(e){function t(x,w){if(e){var _=x.deletions;_===null?(x.deletions=[w],x.flags|=16):_.push(w)}}function n(x,w){if(!e)return null;for(;w!==null;)t(x,w),w=w.sibling;return null}function r(x,w){for(x=new Map;w!==null;)w.key!==null?x.set(w.key,w):x.set(w.index,w),w=w.sibling;return x}function s(x,w){return x=ui(x,w),x.index=0,x.sibling=null,x}function l(x,w,_){return x.index=_,e?(_=x.alternate,_!==null?(_=_.index,_<w?(x.flags|=2,w):_):(x.flags|=2,w)):(x.flags|=1048576,w)}function u(x){return e&&x.alternate===null&&(x.flags|=2),x}function h(x,w,_,L){return w===null||w.tag!==6?(w=rf(_,x.mode,L),w.return=x,w):(w=s(w,_),w.return=x,w)}function f(x,w,_,L){var O=_.type;return O===To?m(x,w,_.props.children,L,_.key):w!==null&&(w.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Kr&&p0(O)===w.type)?(L=s(w,_.props),L.ref=$s(x,w,_),L.return=x,L):(L=Wu(_.type,_.key,_.props,null,x.mode,L),L.ref=$s(x,w,_),L.return=x,L)}function g(x,w,_,L){return w===null||w.tag!==4||w.stateNode.containerInfo!==_.containerInfo||w.stateNode.implementation!==_.implementation?(w=of(_,x.mode,L),w.return=x,w):(w=s(w,_.children||[]),w.return=x,w)}function m(x,w,_,L,O){return w===null||w.tag!==7?(w=bi(_,x.mode,L,O),w.return=x,w):(w=s(w,_),w.return=x,w)}function S(x,w,_){if(typeof w=="string"&&w!==""||typeof w=="number")return w=rf(""+w,x.mode,_),w.return=x,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case cu:return _=Wu(w.type,w.key,w.props,null,x.mode,_),_.ref=$s(x,null,w),_.return=x,_;case Co:return w=of(w,x.mode,_),w.return=x,w;case Kr:var L=w._init;return S(x,L(w._payload),_)}if(nl(w)||Xs(w))return w=bi(w,x.mode,_,null),w.return=x,w;ku(x,w)}return null}function E(x,w,_,L){var O=w!==null?w.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return O!==null?null:h(x,w,""+_,L);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case cu:return _.key===O?f(x,w,_,L):null;case Co:return _.key===O?g(x,w,_,L):null;case Kr:return O=_._init,E(x,w,O(_._payload),L)}if(nl(_)||Xs(_))return O!==null?null:m(x,w,_,L,null);ku(x,_)}return null}function P(x,w,_,L,O){if(typeof L=="string"&&L!==""||typeof L=="number")return x=x.get(_)||null,h(w,x,""+L,O);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case cu:return x=x.get(L.key===null?_:L.key)||null,f(w,x,L,O);case Co:return x=x.get(L.key===null?_:L.key)||null,g(w,x,L,O);case Kr:var z=L._init;return P(x,w,_,z(L._payload),O)}if(nl(L)||Xs(L))return x=x.get(_)||null,m(w,x,L,O,null);ku(w,L)}return null}function k(x,w,_,L){for(var O=null,z=null,D=w,b=w=0,q=null;D!==null&&b<_.length;b++){D.index>b?(q=D,D=null):q=D.sibling;var M=E(x,D,_[b],L);if(M===null){D===null&&(D=q);break}e&&D&&M.alternate===null&&t(x,D),w=l(M,w,b),z===null?O=M:z.sibling=M,z=M,D=q}if(b===_.length)return n(x,D),ke&&Mi(x,b),O;if(D===null){for(;b<_.length;b++)D=S(x,_[b],L),D!==null&&(w=l(D,w,b),z===null?O=D:z.sibling=D,z=D);return ke&&Mi(x,b),O}for(D=r(x,D);b<_.length;b++)q=P(D,x,b,_[b],L),q!==null&&(e&&q.alternate!==null&&D.delete(q.key===null?b:q.key),w=l(q,w,b),z===null?O=q:z.sibling=q,z=q);return e&&D.forEach(function(K){return t(x,K)}),ke&&Mi(x,b),O}function R(x,w,_,L){var O=Xs(_);if(typeof O!="function")throw Error(W(150));if(_=O.call(_),_==null)throw Error(W(151));for(var z=O=null,D=w,b=w=0,q=null,M=_.next();D!==null&&!M.done;b++,M=_.next()){D.index>b?(q=D,D=null):q=D.sibling;var K=E(x,D,M.value,L);if(K===null){D===null&&(D=q);break}e&&D&&K.alternate===null&&t(x,D),w=l(K,w,b),z===null?O=K:z.sibling=K,z=K,D=q}if(M.done)return n(x,D),ke&&Mi(x,b),O;if(D===null){for(;!M.done;b++,M=_.next())M=S(x,M.value,L),M!==null&&(w=l(M,w,b),z===null?O=M:z.sibling=M,z=M);return ke&&Mi(x,b),O}for(D=r(x,D);!M.done;b++,M=_.next())M=P(D,x,b,M.value,L),M!==null&&(e&&M.alternate!==null&&D.delete(M.key===null?b:M.key),w=l(M,w,b),z===null?O=M:z.sibling=M,z=M);return e&&D.forEach(function(se){return t(x,se)}),ke&&Mi(x,b),O}function A(x,w,_,L){if(typeof _=="object"&&_!==null&&_.type===To&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case cu:e:{for(var O=_.key,z=w;z!==null;){if(z.key===O){if(O=_.type,O===To){if(z.tag===7){n(x,z.sibling),w=s(z,_.props.children),w.return=x,x=w;break e}}else if(z.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Kr&&p0(O)===z.type){n(x,z.sibling),w=s(z,_.props),w.ref=$s(x,z,_),w.return=x,x=w;break e}n(x,z);break}else t(x,z);z=z.sibling}_.type===To?(w=bi(_.props.children,x.mode,L,_.key),w.return=x,x=w):(L=Wu(_.type,_.key,_.props,null,x.mode,L),L.ref=$s(x,w,_),L.return=x,x=L)}return u(x);case Co:e:{for(z=_.key;w!==null;){if(w.key===z)if(w.tag===4&&w.stateNode.containerInfo===_.containerInfo&&w.stateNode.implementation===_.implementation){n(x,w.sibling),w=s(w,_.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=of(_,x.mode,L),w.return=x,x=w}return u(x);case Kr:return z=_._init,A(x,w,z(_._payload),L)}if(nl(_))return k(x,w,_,L);if(Xs(_))return R(x,w,_,L);ku(x,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,w!==null&&w.tag===6?(n(x,w.sibling),w=s(w,_),w.return=x,x=w):(n(x,w),w=rf(_,x.mode,L),w.return=x,x=w),u(x)):n(x,w)}return A}var Xo=B1(!0),j1=B1(!1),Fl={},sr=fi(Fl),kl=fi(Fl),Cl=fi(Fl);function Bi(e){if(e===Fl)throw Error(W(174));return e}function Ep(e,t){switch(ye(Cl,t),ye(kl,e),ye(sr,Fl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mf(t,e)}Ee(sr),ye(sr,t)}function Yo(){Ee(sr),Ee(kl),Ee(Cl)}function b1(e){Bi(Cl.current);var t=Bi(sr.current),n=mf(t,e.type);t!==n&&(ye(kl,e),ye(sr,n))}function _p(e){kl.current===e&&(Ee(sr),Ee(kl))}var Ne=fi(0);function tc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 $h=[];function Pp(){for(var e=0;e<$h.length;e++)$h[e]._workInProgressVersionPrimary=null;$h.length=0}var Ou=Rr.ReactCurrentDispatcher,qh=Rr.ReactCurrentBatchConfig,Vi=0,Oe=null,Xe=null,tt=null,nc=!1,cl=!1,Tl=0,R_=0;function vt(){throw Error(W(321))}function kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}function Cp(e,t,n,r,s,l){if(Vi=l,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ou.current=e===null||e.memoizedState===null?N_:O_,e=n(r,s),cl){l=0;do{if(cl=!1,Tl=0,25<=l)throw Error(W(301));l+=1,tt=Xe=null,t.updateQueue=null,Ou.current=F_,e=n(r,s)}while(cl)}if(Ou.current=rc,t=Xe!==null&&Xe.next!==null,Vi=0,tt=Xe=Oe=null,nc=!1,t)throw Error(W(300));return e}function Tp(){var e=Tl!==0;return Tl=0,e}function rr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Oe.memoizedState=tt=e:tt=tt.next=e,tt}function Sn(){if(Xe===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=tt===null?Oe.memoizedState:tt.next;if(t!==null)tt=t,Xe=e;else{if(e===null)throw Error(W(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},tt===null?Oe.memoizedState=tt=e:tt=tt.next=e}return tt}function Rl(e,t){return typeof t=="function"?t(e):t}function Jh(e){var t=Sn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=Xe,s=r.baseQueue,l=n.pending;if(l!==null){if(s!==null){var u=s.next;s.next=l.next,l.next=u}r.baseQueue=s=l,n.pending=null}if(s!==null){l=s.next,r=r.baseState;var h=u=null,f=null,g=l;do{var m=g.lane;if((Vi&m)===m)f!==null&&(f=f.next={lane:0,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null}),r=g.hasEagerState?g.eagerState:e(r,g.action);else{var S={lane:m,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};f===null?(h=f=S,u=r):f=f.next=S,Oe.lanes|=m,Qi|=m}g=g.next}while(g!==null&&g!==l);f===null?u=r:f.next=h,Dn(r,t.memoizedState)||(Bt=!0),t.memoizedState=r,t.baseState=u,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do l=s.lane,Oe.lanes|=l,Qi|=l,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ef(e){var t=Sn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,l=t.memoizedState;if(s!==null){n.pending=null;var u=s=s.next;do l=e(l,u.action),u=u.next;while(u!==s);Dn(l,t.memoizedState)||(Bt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function H1(){}function U1(e,t){var n=Oe,r=Sn(),s=t(),l=!Dn(r.memoizedState,s);if(l&&(r.memoizedState=s,Bt=!0),r=r.queue,Rp(G1.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||tt!==null&&tt.memoizedState.tag&1){if(n.flags|=2048,zl(9,Q1.bind(null,n,r,s,t),void 0,null),nt===null)throw Error(W(349));Vi&30||V1(n,t,s)}return s}function V1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Q1(e,t,n,r){t.value=n,t.getSnapshot=r,X1(t)&&Y1(e)}function G1(e,t,n){return n(function(){X1(t)&&Y1(e)})}function X1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dn(e,n)}catch{return!0}}function Y1(e){var t=Cr(e,1);t!==null&&An(t,e,1,-1)}function m0(e){var t=rr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:e},t.queue=e,e=e.dispatch=L_.bind(null,Oe,e),[t.memoizedState,e]}function zl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Z1(){return Sn().memoizedState}function Fu(e,t,n,r){var s=rr();Oe.flags|=e,s.memoizedState=zl(1|t,n,void 0,r===void 0?null:r)}function gc(e,t,n,r){var s=Sn();r=r===void 0?null:r;var l=void 0;if(Xe!==null){var u=Xe.memoizedState;if(l=u.destroy,r!==null&&kp(r,u.deps)){s.memoizedState=zl(t,n,l,r);return}}Oe.flags|=e,s.memoizedState=zl(1|t,n,l,r)}function g0(e,t){return Fu(8390656,8,e,t)}function Rp(e,t){return gc(2048,8,e,t)}function K1(e,t){return gc(4,2,e,t)}function $1(e,t){return gc(4,4,e,t)}function q1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function J1(e,t,n){return n=n!=null?n.concat([e]):null,gc(4,4,q1.bind(null,t,e),n)}function zp(){}function ew(e,t){var n=Sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tw(e,t){var n=Sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&kp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function nw(e,t,n){return Vi&21?(Dn(n,t)||(n=o1(),Oe.lanes|=n,Qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bt=!0),e.memoizedState=n)}function z_(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=qh.transition;qh.transition={};try{e(!1),t()}finally{he=n,qh.transition=r}}function rw(){return Sn().memoizedState}function I_(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},iw(e))ow(t,n);else if(n=M1(e,t,n,r),n!==null){var s=Tt();An(n,e,r,s),sw(n,t,r)}}function L_(e,t,n){var r=ai(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(iw(e))ow(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var u=t.lastRenderedState,h=l(u,n);if(s.hasEagerState=!0,s.eagerState=h,Dn(h,u)){var f=t.interleaved;f===null?(s.next=s,Sp(t)):(s.next=f.next,f.next=s),t.interleaved=s;return}}catch{}finally{}n=M1(e,t,s,r),n!==null&&(s=Tt(),An(n,e,r,s),sw(n,t,r))}}function iw(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function ow(e,t){cl=nc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}var rc={readContext:wn,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useInsertionEffect:vt,useLayoutEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useMutableSource:vt,useSyncExternalStore:vt,useId:vt,unstable_isNewReconciler:!1},N_={readContext:wn,useCallback:function(e,t){return rr().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:g0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fu(4194308,4,q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fu(4,2,e,t)},useMemo:function(e,t){var n=rr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=I_.bind(null,Oe,e),[r.memoizedState,e]},useRef:function(e){var t=rr();return e={current:e},t.memoizedState=e},useState:m0,useDebugValue:zp,useDeferredValue:function(e){return rr().memoizedState=e},useTransition:function(){var e=m0(!1),t=e[0];return e=z_.bind(null,e[1]),rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Oe,s=rr();if(ke){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),nt===null)throw Error(W(349));Vi&30||V1(r,t,n)}s.memoizedState=n;var l={value:n,getSnapshot:t};return s.queue=l,g0(G1.bind(null,r,l,e),[e]),r.flags|=2048,zl(9,Q1.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=rr(),t=nt.identifierPrefix;if(ke){var n=Er,r=xr;n=(r&~(1<<32-Mn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Tl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=R_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},O_={readContext:wn,useCallback:ew,useContext:wn,useEffect:Rp,useImperativeHandle:J1,useInsertionEffect:K1,useLayoutEffect:$1,useMemo:tw,useReducer:Jh,useRef:Z1,useState:function(){return Jh(Rl)},useDebugValue:zp,useDeferredValue:function(e){var t=Sn();return nw(t,Xe.memoizedState,e)},useTransition:function(){var e=Jh(Rl)[0],t=Sn().memoizedState;return[e,t]},useMutableSource:H1,useSyncExternalStore:U1,useId:rw,unstable_isNewReconciler:!1},F_={readContext:wn,useCallback:ew,useContext:wn,useEffect:Rp,useImperativeHandle:J1,useInsertionEffect:K1,useLayoutEffect:$1,useMemo:tw,useReducer:ef,useRef:Z1,useState:function(){return ef(Rl)},useDebugValue:zp,useDeferredValue:function(e){var t=Sn();return Xe===null?t.memoizedState=e:nw(t,Xe.memoizedState,e)},useTransition:function(){var e=ef(Rl)[0],t=Sn().memoizedState;return[e,t]},useMutableSource:H1,useSyncExternalStore:U1,useId:rw,unstable_isNewReconciler:!1};function Zo(e,t){try{var n="",r=t;do n+=c2(r),r=r.return;while(r);var s=n}catch(l){s=`
|
|
16
|
+
`).replace(S_,"")}function _u(e,t,n){if(t=r0(t),r0(e)!==t&&n)throw Error(W(425))}function Xu(){}var Tf=null,Rf=null;function zf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var If=typeof setTimeout=="function"?setTimeout:void 0,x_=typeof clearTimeout=="function"?clearTimeout:void 0,i0=typeof Promise=="function"?Promise:void 0,E_=typeof queueMicrotask=="function"?queueMicrotask:typeof i0<"u"?function(e){return i0.resolve(null).then(e).catch(__)}:If;function __(e){setTimeout(function(){throw e})}function Zh(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),wl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);wl(t)}function oi(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==="$?")break;if(t==="/$")return null}}return e}function o0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qo=Math.random().toString(36).slice(2),ir="__reactFiber$"+qo,Pl="__reactProps$"+qo,kr="__reactContainer$"+qo,Lf="__reactEvents$"+qo,P_="__reactListeners$"+qo,k_="__reactHandles$"+qo;function Di(e){var t=e[ir];if(t)return t;for(var n=e.parentNode;n;){if(t=n[kr]||n[ir]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=o0(e);e!==null;){if(n=e[ir])return n;e=o0(e)}return t}e=n,n=e.parentNode}return null}function Ol(e){return e=e[ir]||e[kr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Lo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function fc(e){return e[Pl]||null}var Nf=[],No=-1;function fi(e){return{current:e}}function Ee(e){0>No||(e.current=Nf[No],Nf[No]=null,No--)}function ve(e,t){No++,Nf[No]=e.current,e.current=t}var di={},xt=fi(di),jt=fi(!1),Hi=di;function Qo(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in n)s[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function bt(e){return e=e.childContextTypes,e!=null}function Yu(){Ee(jt),Ee(xt)}function s0(e,t,n){if(xt.current!==di)throw Error(W(168));ve(xt,t),ve(jt,n)}function I1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(W(108,d2(e)||"Unknown",s));return Fe({},n,r)}function Zu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,Hi=xt.current,ve(xt,e),ve(jt,jt.current),!0}function l0(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=I1(e,t,Hi),r.__reactInternalMemoizedMergedChildContext=e,Ee(jt),Ee(xt),ve(xt,e)):Ee(jt),ve(jt,n)}var Sr=null,pc=!1,Kh=!1;function L1(e){Sr===null?Sr=[e]:Sr.push(e)}function C_(e){pc=!0,L1(e)}function pi(){if(!Kh&&Sr!==null){Kh=!0;var e=0,t=he;try{var n=Sr;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sr=null,pc=!1}catch(s){throw Sr!==null&&(Sr=Sr.slice(e+1)),n1(op,pi),s}finally{he=t,Kh=!1}}return null}var Oo=[],Fo=0,Ku=null,$u=0,mn=[],gn=0,Ui=null,xr=1,Er="";function Mi(e,t){Oo[Fo++]=$u,Oo[Fo++]=Ku,Ku=e,$u=t}function N1(e,t,n){mn[gn++]=xr,mn[gn++]=Er,mn[gn++]=Ui,Ui=e;var r=xr;e=Er;var s=32-Mn(r)-1;r&=~(1<<s),n+=1;var l=32-Mn(t)+s;if(30<l){var u=s-s%5;l=(r&(1<<u)-1).toString(32),r>>=u,s-=u,xr=1<<32-Mn(t)+s|n<<s|r,Er=l+e}else xr=1<<l|n<<s|r,Er=e}function pp(e){e.return!==null&&(Mi(e,1),N1(e,1,0))}function mp(e){for(;e===Ku;)Ku=Oo[--Fo],Oo[Fo]=null,$u=Oo[--Fo],Oo[Fo]=null;for(;e===Ui;)Ui=mn[--gn],mn[gn]=null,Er=mn[--gn],mn[gn]=null,xr=mn[--gn],mn[gn]=null}var $t=null,Kt=null,ke=!1,Fn=null;function O1(e,t){var n=vn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function a0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,$t=e,Kt=oi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$t=e,Kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ui!==null?{id:xr,overflow:Er}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,$t=e,Kt=null,!0):!1;default:return!1}}function Of(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ff(e){if(ke){var t=Kt;if(t){var n=t;if(!a0(e,t)){if(Of(e))throw Error(W(418));t=oi(n.nextSibling);var r=$t;t&&a0(e,t)?O1(r,n):(e.flags=e.flags&-4097|2,ke=!1,$t=e)}}else{if(Of(e))throw Error(W(418));e.flags=e.flags&-4097|2,ke=!1,$t=e}}}function u0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$t=e}function Pu(e){if(e!==$t)return!1;if(!ke)return u0(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zf(e.type,e.memoizedProps)),t&&(t=Kt)){if(Of(e))throw F1(),Error(W(418));for(;t;)O1(e,t),t=oi(t.nextSibling)}if(u0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kt=oi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kt=null}}else Kt=$t?oi(e.stateNode.nextSibling):null;return!0}function F1(){for(var e=Kt;e;)e=oi(e.nextSibling)}function Go(){Kt=$t=null,ke=!1}function gp(e){Fn===null?Fn=[e]:Fn.push(e)}var T_=Rr.ReactCurrentBatchConfig;function Nn(e,t){if(e&&e.defaultProps){t=Fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var qu=fi(null),Ju=null,Mo=null,vp=null;function yp(){vp=Mo=Ju=null}function wp(e){var t=qu.current;Ee(qu),e._currentValue=t}function Mf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ho(e,t){Ju=e,vp=Mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Bt=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(vp!==e)if(e={context:e,memoizedValue:t,next:null},Mo===null){if(Ju===null)throw Error(W(308));Mo=e,Ju.dependencies={lanes:0,firstContext:e}}else Mo=Mo.next=e;return t}var Wi=null;function Sp(e){Wi===null?Wi=[e]:Wi.push(e)}function M1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Sp(t)):(n.next=s.next,s.next=n),t.interleaved=n,Cr(e,r)}function Cr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $r=!1;function xp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function A1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _r(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function si(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Cr(e,n)}return s=r.interleaved,s===null?(t.next=t,Sp(r)):(t.next=s.next,s.next=t),r.interleaved=t,Cr(e,n)}function Nu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}function c0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?s=l=u:l=l.next=u,n=n.next}while(n!==null);l===null?s=l=t:l=l.next=t}else s=l=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ec(e,t,n,r){var s=e.updateQueue;$r=!1;var l=s.firstBaseUpdate,u=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var f=h,g=f.next;f.next=null,u===null?l=g:u.next=g,u=f;var m=e.alternate;m!==null&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==u&&(h===null?m.firstBaseUpdate=g:h.next=g,m.lastBaseUpdate=f))}if(l!==null){var S=s.baseState;u=0,m=g=f=null,h=l;do{var E=h.lane,P=h.eventTime;if((r&E)===E){m!==null&&(m=m.next={eventTime:P,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});e:{var k=e,R=h;switch(E=t,P=n,R.tag){case 1:if(k=R.payload,typeof k=="function"){S=k.call(P,S,E);break e}S=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=R.payload,E=typeof k=="function"?k.call(P,S,E):k,E==null)break e;S=Fe({},S,E);break e;case 2:$r=!0}}h.callback!==null&&h.lane!==0&&(e.flags|=64,E=s.effects,E===null?s.effects=[h]:E.push(h))}else P={eventTime:P,lane:E,tag:h.tag,payload:h.payload,callback:h.callback,next:null},m===null?(g=m=P,f=S):m=m.next=P,u|=E;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;E=h,h=E.next,E.next=null,s.lastBaseUpdate=E,s.shared.pending=null}}while(!0);if(m===null&&(f=S),s.baseState=f,s.firstBaseUpdate=g,s.lastBaseUpdate=m,t=s.shared.interleaved,t!==null){s=t;do u|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Qi|=u,e.lanes=u,e.memoizedState=S}}function d0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(W(191,s));s.call(r)}}}var D1=new M0.Component().refs;function Af(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var mc={isMounted:function(e){return(e=e._reactInternals)?Yi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rt(),s=ai(e),l=_r(r,s);l.payload=t,n!=null&&(l.callback=n),t=si(e,l,s),t!==null&&(An(t,e,s,r),Nu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rt(),s=ai(e),l=_r(r,s);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=si(e,l,s),t!==null&&(An(t,e,s,r),Nu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rt(),r=ai(e),s=_r(n,r);s.tag=2,t!=null&&(s.callback=t),t=si(e,s,r),t!==null&&(An(t,e,r,n),Nu(t,e,r))}};function h0(e,t,n,r,s,l,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,u):t.prototype&&t.prototype.isPureReactComponent?!xl(n,r)||!xl(s,l):!0}function W1(e,t,n){var r=!1,s=di,l=t.contextType;return typeof l=="object"&&l!==null?l=wn(l):(s=bt(t)?Hi:xt.current,r=t.contextTypes,l=(r=r!=null)?Qo(e,s):di),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=mc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function f0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mc.enqueueReplaceState(t,t.state,null)}function Df(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs=D1,xp(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=wn(l):(l=bt(t)?Hi:xt.current,s.context=Qo(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Af(e,t,l,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&mc.enqueueReplaceState(s,s.state,null),ec(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var s=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(u){var h=s.refs;h===D1&&(h=s.refs={}),u===null?delete h[l]:h[l]=u},t._stringRef=l,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function ku(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function p0(e){var t=e._init;return t(e._payload)}function B1(e){function t(x,w){if(e){var _=x.deletions;_===null?(x.deletions=[w],x.flags|=16):_.push(w)}}function n(x,w){if(!e)return null;for(;w!==null;)t(x,w),w=w.sibling;return null}function r(x,w){for(x=new Map;w!==null;)w.key!==null?x.set(w.key,w):x.set(w.index,w),w=w.sibling;return x}function s(x,w){return x=ui(x,w),x.index=0,x.sibling=null,x}function l(x,w,_){return x.index=_,e?(_=x.alternate,_!==null?(_=_.index,_<w?(x.flags|=2,w):_):(x.flags|=2,w)):(x.flags|=1048576,w)}function u(x){return e&&x.alternate===null&&(x.flags|=2),x}function h(x,w,_,L){return w===null||w.tag!==6?(w=rf(_,x.mode,L),w.return=x,w):(w=s(w,_),w.return=x,w)}function f(x,w,_,L){var O=_.type;return O===To?m(x,w,_.props.children,L,_.key):w!==null&&(w.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Kr&&p0(O)===w.type)?(L=s(w,_.props),L.ref=$s(x,w,_),L.return=x,L):(L=Wu(_.type,_.key,_.props,null,x.mode,L),L.ref=$s(x,w,_),L.return=x,L)}function g(x,w,_,L){return w===null||w.tag!==4||w.stateNode.containerInfo!==_.containerInfo||w.stateNode.implementation!==_.implementation?(w=of(_,x.mode,L),w.return=x,w):(w=s(w,_.children||[]),w.return=x,w)}function m(x,w,_,L,O){return w===null||w.tag!==7?(w=bi(_,x.mode,L,O),w.return=x,w):(w=s(w,_),w.return=x,w)}function S(x,w,_){if(typeof w=="string"&&w!==""||typeof w=="number")return w=rf(""+w,x.mode,_),w.return=x,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case cu:return _=Wu(w.type,w.key,w.props,null,x.mode,_),_.ref=$s(x,null,w),_.return=x,_;case Co:return w=of(w,x.mode,_),w.return=x,w;case Kr:var L=w._init;return S(x,L(w._payload),_)}if(nl(w)||Xs(w))return w=bi(w,x.mode,_,null),w.return=x,w;ku(x,w)}return null}function E(x,w,_,L){var O=w!==null?w.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return O!==null?null:h(x,w,""+_,L);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case cu:return _.key===O?f(x,w,_,L):null;case Co:return _.key===O?g(x,w,_,L):null;case Kr:return O=_._init,E(x,w,O(_._payload),L)}if(nl(_)||Xs(_))return O!==null?null:m(x,w,_,L,null);ku(x,_)}return null}function P(x,w,_,L,O){if(typeof L=="string"&&L!==""||typeof L=="number")return x=x.get(_)||null,h(w,x,""+L,O);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case cu:return x=x.get(L.key===null?_:L.key)||null,f(w,x,L,O);case Co:return x=x.get(L.key===null?_:L.key)||null,g(w,x,L,O);case Kr:var z=L._init;return P(x,w,_,z(L._payload),O)}if(nl(L)||Xs(L))return x=x.get(_)||null,m(w,x,L,O,null);ku(w,L)}return null}function k(x,w,_,L){for(var O=null,z=null,D=w,b=w=0,q=null;D!==null&&b<_.length;b++){D.index>b?(q=D,D=null):q=D.sibling;var M=E(x,D,_[b],L);if(M===null){D===null&&(D=q);break}e&&D&&M.alternate===null&&t(x,D),w=l(M,w,b),z===null?O=M:z.sibling=M,z=M,D=q}if(b===_.length)return n(x,D),ke&&Mi(x,b),O;if(D===null){for(;b<_.length;b++)D=S(x,_[b],L),D!==null&&(w=l(D,w,b),z===null?O=D:z.sibling=D,z=D);return ke&&Mi(x,b),O}for(D=r(x,D);b<_.length;b++)q=P(D,x,b,_[b],L),q!==null&&(e&&q.alternate!==null&&D.delete(q.key===null?b:q.key),w=l(q,w,b),z===null?O=q:z.sibling=q,z=q);return e&&D.forEach(function(K){return t(x,K)}),ke&&Mi(x,b),O}function R(x,w,_,L){var O=Xs(_);if(typeof O!="function")throw Error(W(150));if(_=O.call(_),_==null)throw Error(W(151));for(var z=O=null,D=w,b=w=0,q=null,M=_.next();D!==null&&!M.done;b++,M=_.next()){D.index>b?(q=D,D=null):q=D.sibling;var K=E(x,D,M.value,L);if(K===null){D===null&&(D=q);break}e&&D&&K.alternate===null&&t(x,D),w=l(K,w,b),z===null?O=K:z.sibling=K,z=K,D=q}if(M.done)return n(x,D),ke&&Mi(x,b),O;if(D===null){for(;!M.done;b++,M=_.next())M=S(x,M.value,L),M!==null&&(w=l(M,w,b),z===null?O=M:z.sibling=M,z=M);return ke&&Mi(x,b),O}for(D=r(x,D);!M.done;b++,M=_.next())M=P(D,x,b,M.value,L),M!==null&&(e&&M.alternate!==null&&D.delete(M.key===null?b:M.key),w=l(M,w,b),z===null?O=M:z.sibling=M,z=M);return e&&D.forEach(function(se){return t(x,se)}),ke&&Mi(x,b),O}function A(x,w,_,L){if(typeof _=="object"&&_!==null&&_.type===To&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case cu:e:{for(var O=_.key,z=w;z!==null;){if(z.key===O){if(O=_.type,O===To){if(z.tag===7){n(x,z.sibling),w=s(z,_.props.children),w.return=x,x=w;break e}}else if(z.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Kr&&p0(O)===z.type){n(x,z.sibling),w=s(z,_.props),w.ref=$s(x,z,_),w.return=x,x=w;break e}n(x,z);break}else t(x,z);z=z.sibling}_.type===To?(w=bi(_.props.children,x.mode,L,_.key),w.return=x,x=w):(L=Wu(_.type,_.key,_.props,null,x.mode,L),L.ref=$s(x,w,_),L.return=x,x=L)}return u(x);case Co:e:{for(z=_.key;w!==null;){if(w.key===z)if(w.tag===4&&w.stateNode.containerInfo===_.containerInfo&&w.stateNode.implementation===_.implementation){n(x,w.sibling),w=s(w,_.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=of(_,x.mode,L),w.return=x,x=w}return u(x);case Kr:return z=_._init,A(x,w,z(_._payload),L)}if(nl(_))return k(x,w,_,L);if(Xs(_))return R(x,w,_,L);ku(x,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,w!==null&&w.tag===6?(n(x,w.sibling),w=s(w,_),w.return=x,x=w):(n(x,w),w=rf(_,x.mode,L),w.return=x,x=w),u(x)):n(x,w)}return A}var Xo=B1(!0),j1=B1(!1),Fl={},sr=fi(Fl),kl=fi(Fl),Cl=fi(Fl);function Bi(e){if(e===Fl)throw Error(W(174));return e}function Ep(e,t){switch(ve(Cl,t),ve(kl,e),ve(sr,Fl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mf(t,e)}Ee(sr),ve(sr,t)}function Yo(){Ee(sr),Ee(kl),Ee(Cl)}function b1(e){Bi(Cl.current);var t=Bi(sr.current),n=mf(t,e.type);t!==n&&(ve(kl,e),ve(sr,n))}function _p(e){kl.current===e&&(Ee(sr),Ee(kl))}var Ne=fi(0);function tc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 $h=[];function Pp(){for(var e=0;e<$h.length;e++)$h[e]._workInProgressVersionPrimary=null;$h.length=0}var Ou=Rr.ReactCurrentDispatcher,qh=Rr.ReactCurrentBatchConfig,Vi=0,Oe=null,Xe=null,tt=null,nc=!1,cl=!1,Tl=0,R_=0;function yt(){throw Error(W(321))}function kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}function Cp(e,t,n,r,s,l){if(Vi=l,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ou.current=e===null||e.memoizedState===null?N_:O_,e=n(r,s),cl){l=0;do{if(cl=!1,Tl=0,25<=l)throw Error(W(301));l+=1,tt=Xe=null,t.updateQueue=null,Ou.current=F_,e=n(r,s)}while(cl)}if(Ou.current=rc,t=Xe!==null&&Xe.next!==null,Vi=0,tt=Xe=Oe=null,nc=!1,t)throw Error(W(300));return e}function Tp(){var e=Tl!==0;return Tl=0,e}function rr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Oe.memoizedState=tt=e:tt=tt.next=e,tt}function Sn(){if(Xe===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=tt===null?Oe.memoizedState:tt.next;if(t!==null)tt=t,Xe=e;else{if(e===null)throw Error(W(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},tt===null?Oe.memoizedState=tt=e:tt=tt.next=e}return tt}function Rl(e,t){return typeof t=="function"?t(e):t}function Jh(e){var t=Sn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=Xe,s=r.baseQueue,l=n.pending;if(l!==null){if(s!==null){var u=s.next;s.next=l.next,l.next=u}r.baseQueue=s=l,n.pending=null}if(s!==null){l=s.next,r=r.baseState;var h=u=null,f=null,g=l;do{var m=g.lane;if((Vi&m)===m)f!==null&&(f=f.next={lane:0,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null}),r=g.hasEagerState?g.eagerState:e(r,g.action);else{var S={lane:m,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};f===null?(h=f=S,u=r):f=f.next=S,Oe.lanes|=m,Qi|=m}g=g.next}while(g!==null&&g!==l);f===null?u=r:f.next=h,Dn(r,t.memoizedState)||(Bt=!0),t.memoizedState=r,t.baseState=u,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do l=s.lane,Oe.lanes|=l,Qi|=l,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ef(e){var t=Sn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,l=t.memoizedState;if(s!==null){n.pending=null;var u=s=s.next;do l=e(l,u.action),u=u.next;while(u!==s);Dn(l,t.memoizedState)||(Bt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function H1(){}function U1(e,t){var n=Oe,r=Sn(),s=t(),l=!Dn(r.memoizedState,s);if(l&&(r.memoizedState=s,Bt=!0),r=r.queue,Rp(G1.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||tt!==null&&tt.memoizedState.tag&1){if(n.flags|=2048,zl(9,Q1.bind(null,n,r,s,t),void 0,null),nt===null)throw Error(W(349));Vi&30||V1(n,t,s)}return s}function V1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Q1(e,t,n,r){t.value=n,t.getSnapshot=r,X1(t)&&Y1(e)}function G1(e,t,n){return n(function(){X1(t)&&Y1(e)})}function X1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dn(e,n)}catch{return!0}}function Y1(e){var t=Cr(e,1);t!==null&&An(t,e,1,-1)}function m0(e){var t=rr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:e},t.queue=e,e=e.dispatch=L_.bind(null,Oe,e),[t.memoizedState,e]}function zl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Z1(){return Sn().memoizedState}function Fu(e,t,n,r){var s=rr();Oe.flags|=e,s.memoizedState=zl(1|t,n,void 0,r===void 0?null:r)}function gc(e,t,n,r){var s=Sn();r=r===void 0?null:r;var l=void 0;if(Xe!==null){var u=Xe.memoizedState;if(l=u.destroy,r!==null&&kp(r,u.deps)){s.memoizedState=zl(t,n,l,r);return}}Oe.flags|=e,s.memoizedState=zl(1|t,n,l,r)}function g0(e,t){return Fu(8390656,8,e,t)}function Rp(e,t){return gc(2048,8,e,t)}function K1(e,t){return gc(4,2,e,t)}function $1(e,t){return gc(4,4,e,t)}function q1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function J1(e,t,n){return n=n!=null?n.concat([e]):null,gc(4,4,q1.bind(null,t,e),n)}function zp(){}function ew(e,t){var n=Sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tw(e,t){var n=Sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&kp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function nw(e,t,n){return Vi&21?(Dn(n,t)||(n=o1(),Oe.lanes|=n,Qi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bt=!0),e.memoizedState=n)}function z_(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=qh.transition;qh.transition={};try{e(!1),t()}finally{he=n,qh.transition=r}}function rw(){return Sn().memoizedState}function I_(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},iw(e))ow(t,n);else if(n=M1(e,t,n,r),n!==null){var s=Rt();An(n,e,r,s),sw(n,t,r)}}function L_(e,t,n){var r=ai(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(iw(e))ow(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var u=t.lastRenderedState,h=l(u,n);if(s.hasEagerState=!0,s.eagerState=h,Dn(h,u)){var f=t.interleaved;f===null?(s.next=s,Sp(t)):(s.next=f.next,f.next=s),t.interleaved=s;return}}catch{}finally{}n=M1(e,t,s,r),n!==null&&(s=Rt(),An(n,e,r,s),sw(n,t,r))}}function iw(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function ow(e,t){cl=nc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}var rc={readContext:wn,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},N_={readContext:wn,useCallback:function(e,t){return rr().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:g0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fu(4194308,4,q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fu(4,2,e,t)},useMemo:function(e,t){var n=rr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=I_.bind(null,Oe,e),[r.memoizedState,e]},useRef:function(e){var t=rr();return e={current:e},t.memoizedState=e},useState:m0,useDebugValue:zp,useDeferredValue:function(e){return rr().memoizedState=e},useTransition:function(){var e=m0(!1),t=e[0];return e=z_.bind(null,e[1]),rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Oe,s=rr();if(ke){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),nt===null)throw Error(W(349));Vi&30||V1(r,t,n)}s.memoizedState=n;var l={value:n,getSnapshot:t};return s.queue=l,g0(G1.bind(null,r,l,e),[e]),r.flags|=2048,zl(9,Q1.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=rr(),t=nt.identifierPrefix;if(ke){var n=Er,r=xr;n=(r&~(1<<32-Mn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Tl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=R_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},O_={readContext:wn,useCallback:ew,useContext:wn,useEffect:Rp,useImperativeHandle:J1,useInsertionEffect:K1,useLayoutEffect:$1,useMemo:tw,useReducer:Jh,useRef:Z1,useState:function(){return Jh(Rl)},useDebugValue:zp,useDeferredValue:function(e){var t=Sn();return nw(t,Xe.memoizedState,e)},useTransition:function(){var e=Jh(Rl)[0],t=Sn().memoizedState;return[e,t]},useMutableSource:H1,useSyncExternalStore:U1,useId:rw,unstable_isNewReconciler:!1},F_={readContext:wn,useCallback:ew,useContext:wn,useEffect:Rp,useImperativeHandle:J1,useInsertionEffect:K1,useLayoutEffect:$1,useMemo:tw,useReducer:ef,useRef:Z1,useState:function(){return ef(Rl)},useDebugValue:zp,useDeferredValue:function(e){var t=Sn();return Xe===null?t.memoizedState=e:nw(t,Xe.memoizedState,e)},useTransition:function(){var e=ef(Rl)[0],t=Sn().memoizedState;return[e,t]},useMutableSource:H1,useSyncExternalStore:U1,useId:rw,unstable_isNewReconciler:!1};function Zo(e,t){try{var n="",r=t;do n+=c2(r),r=r.return;while(r);var s=n}catch(l){s=`
|
|
17
17
|
Error generating stack: `+l.message+`
|
|
18
|
-
`+l.stack}return{value:e,source:t,stack:s,digest:null}}function tf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var M_=typeof WeakMap=="function"?WeakMap:Map;function lw(e,t,n){n=_r(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oc||(oc=!0,Yf=r),Wf(e,t)},n}function aw(e,t,n){n=_r(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Wf(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Wf(e,t),typeof r!="function"&&(li===null?li=new Set([this]):li.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function v0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new M_;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Z_.bind(null,e,t,n),t.then(e,e))}function y0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function w0(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_r(-1,1),t.tag=2,si(n,t,1))),n.lanes|=1),e)}var A_=Rr.ReactCurrentOwner,Bt=!1;function Ct(e,t,n,r){t.child=e===null?j1(t,null,n,r):Xo(t,e.child,n,r)}function S0(e,t,n,r,s){n=n.render;var l=t.ref;return Ho(t,s),r=Cp(e,t,n,r,l,s),n=Tp(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Tr(e,t,s)):(ke&&n&&pp(t),t.flags|=1,Ct(e,t,r,s),t.child)}function x0(e,t,n,r,s){if(e===null){var l=n.type;return typeof l=="function"&&!Dp(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,uw(e,t,l,r,s)):(e=Wu(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var u=l.memoizedProps;if(n=n.compare,n=n!==null?n:xl,n(u,r)&&e.ref===t.ref)return Tr(e,t,s)}return t.flags|=1,e=ui(l,r),e.ref=t.ref,e.return=t,t.child=e}function uw(e,t,n,r,s){if(e!==null){var l=e.memoizedProps;if(xl(l,r)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=r=l,(e.lanes&s)!==0)e.flags&131072&&(Bt=!0);else return t.lanes=e.lanes,Tr(e,t,s)}return Bf(e,t,n,r,s)}function cw(e,t,n){var r=t.pendingProps,s=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(Do,Zt),Zt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ye(Do,Zt),Zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,ye(Do,Zt),Zt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,ye(Do,Zt),Zt|=r;return Ct(e,t,s,n),t.child}function dw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bf(e,t,n,r,s){var l=bt(n)?Hi:St.current;return l=Qo(t,l),Ho(t,s),n=Cp(e,t,n,r,l,s),r=Tp(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Tr(e,t,s)):(ke&&r&&pp(t),t.flags|=1,Ct(e,t,n,s),t.child)}function E0(e,t,n,r,s){if(bt(n)){var l=!0;Zu(t)}else l=!1;if(Ho(t,s),t.stateNode===null)Mu(e,t),W1(t,n,r),Df(t,n,r,s),r=!0;else if(e===null){var u=t.stateNode,h=t.memoizedProps;u.props=h;var f=u.context,g=n.contextType;typeof g=="object"&&g!==null?g=wn(g):(g=bt(n)?Hi:St.current,g=Qo(t,g));var m=n.getDerivedStateFromProps,S=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function";S||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==r||f!==g)&&f0(t,u,r,g),$r=!1;var E=t.memoizedState;u.state=E,ec(t,r,u,s),f=t.memoizedState,h!==r||E!==f||jt.current||$r?(typeof m=="function"&&(Af(t,n,m,r),f=t.memoizedState),(h=$r||h0(t,n,h,r,E,f,g))?(S||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),u.props=r,u.state=f,u.context=g,r=h):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,A1(e,t),h=t.memoizedProps,g=t.type===t.elementType?h:Nn(t.type,h),u.props=g,S=t.pendingProps,E=u.context,f=n.contextType,typeof f=="object"&&f!==null?f=wn(f):(f=bt(n)?Hi:St.current,f=Qo(t,f));var P=n.getDerivedStateFromProps;(m=typeof P=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==S||E!==f)&&f0(t,u,r,f),$r=!1,E=t.memoizedState,u.state=E,ec(t,r,u,s);var k=t.memoizedState;h!==S||E!==k||jt.current||$r?(typeof P=="function"&&(Af(t,n,P,r),k=t.memoizedState),(g=$r||h0(t,n,g,r,E,k,f)||!1)?(m||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,k,f),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,k,f)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),u.props=r,u.state=k,u.context=f,r=g):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),r=!1)}return jf(e,t,n,r,l,s)}function jf(e,t,n,r,s,l){dw(e,t);var u=(t.flags&128)!==0;if(!r&&!u)return s&&l0(t,n,!1),Tr(e,t,l);r=t.stateNode,A_.current=t;var h=u&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&u?(t.child=Xo(t,e.child,null,l),t.child=Xo(t,null,h,l)):Ct(e,t,h,l),t.memoizedState=r.state,s&&l0(t,n,!0),t.child}function hw(e){var t=e.stateNode;t.pendingContext?s0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&s0(e,t.context,!1),Ep(e,t.containerInfo)}function _0(e,t,n,r,s){return Go(),gp(s),t.flags|=256,Ct(e,t,n,r),t.child}var bf={dehydrated:null,treeContext:null,retryLane:0};function Hf(e){return{baseLanes:e,cachePool:null,transitions:null}}function fw(e,t,n){var r=t.pendingProps,s=Ne.current,l=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(s&2)!==0),h?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ye(Ne,s&1),e===null)return Ff(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(u=r.children,e=r.fallback,l?(r=t.mode,l=t.child,u={mode:"hidden",children:u},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=u):l=wc(u,r,0,null),e=bi(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Hf(n),t.memoizedState=bf,e):Ip(t,u));if(s=e.memoizedState,s!==null&&(h=s.dehydrated,h!==null))return D_(e,t,u,r,h,s,n);if(l){l=r.fallback,u=t.mode,s=e.child,h=s.sibling;var f={mode:"hidden",children:r.children};return!(u&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=ui(s,f),r.subtreeFlags=s.subtreeFlags&14680064),h!==null?l=ui(h,l):(l=bi(l,u,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,u=e.child.memoizedState,u=u===null?Hf(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},l.memoizedState=u,l.childLanes=e.childLanes&~n,t.memoizedState=bf,r}return l=e.child,e=l.sibling,r=ui(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ip(e,t){return t=wc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cu(e,t,n,r){return r!==null&&gp(r),Xo(t,e.child,null,n),e=Ip(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function D_(e,t,n,r,s,l,u){if(n)return t.flags&256?(t.flags&=-257,r=tf(Error(W(422))),Cu(e,t,u,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,s=t.mode,r=wc({mode:"visible",children:r.children},s,0,null),l=bi(l,s,u,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Xo(t,e.child,null,u),t.child.memoizedState=Hf(u),t.memoizedState=bf,l);if(!(t.mode&1))return Cu(e,t,u,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var h=r.dgst;return r=h,l=Error(W(419)),r=tf(l,r,void 0),Cu(e,t,u,r)}if(h=(u&e.childLanes)!==0,Bt||h){if(r=nt,r!==null){switch(u&-u){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|u)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,Cr(e,s),An(r,e,s,-1))}return Ap(),r=tf(Error(W(421))),Cu(e,t,u,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=K_.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,Kt=oi(s.nextSibling),$t=t,ke=!0,Fn=null,e!==null&&(mn[gn++]=xr,mn[gn++]=Er,mn[gn++]=Ui,xr=e.id,Er=e.overflow,Ui=t),t=Ip(t,r.children),t.flags|=4096,t)}function P0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mf(e.return,t,n)}function nf(e,t,n,r,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=s)}function pw(e,t,n){var r=t.pendingProps,s=r.revealOrder,l=r.tail;if(Ct(e,t,r.children,n),r=Ne.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&P0(e,n,t);else if(e.tag===19)P0(e,n,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}r&=1}if(ye(Ne,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&tc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),nf(t,!1,s,n,l);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&tc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}nf(t,!0,n,null,l);break;case"together":nf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function W_(e,t,n){switch(t.tag){case 3:hw(t),Go();break;case 5:b1(t);break;case 1:bt(t.type)&&Zu(t);break;case 4:Ep(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ye(qu,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ye(Ne,Ne.current&1),t.flags|=128,null):n&t.child.childLanes?fw(e,t,n):(ye(Ne,Ne.current&1),e=Tr(e,t,n),e!==null?e.sibling:null);ye(Ne,Ne.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pw(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ye(Ne,Ne.current),r)break;return null;case 22:case 23:return t.lanes=0,cw(e,t,n)}return Tr(e,t,n)}var mw,Uf,gw,vw;mw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uf=function(){};gw=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Bi(sr.current);var l=null;switch(n){case"input":s=df(e,s),r=df(e,r),l=[];break;case"select":s=Fe({},s,{value:void 0}),r=Fe({},r,{value:void 0}),l=[];break;case"textarea":s=pf(e,s),r=pf(e,r),l=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xu)}gf(n,r);var u;n=null;for(g in s)if(!r.hasOwnProperty(g)&&s.hasOwnProperty(g)&&s[g]!=null)if(g==="style"){var h=s[g];for(u in h)h.hasOwnProperty(u)&&(n||(n={}),n[u]="")}else g!=="dangerouslySetInnerHTML"&&g!=="children"&&g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(pl.hasOwnProperty(g)?l||(l=[]):(l=l||[]).push(g,null));for(g in r){var f=r[g];if(h=s?.[g],r.hasOwnProperty(g)&&f!==h&&(f!=null||h!=null))if(g==="style")if(h){for(u in h)!h.hasOwnProperty(u)||f&&f.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in f)f.hasOwnProperty(u)&&h[u]!==f[u]&&(n||(n={}),n[u]=f[u])}else n||(l||(l=[]),l.push(g,n)),n=f;else g==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,h=h?h.__html:void 0,f!=null&&h!==f&&(l=l||[]).push(g,f)):g==="children"?typeof f!="string"&&typeof f!="number"||(l=l||[]).push(g,""+f):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&(pl.hasOwnProperty(g)?(f!=null&&g==="onScroll"&&xe("scroll",e),l||h===f||(l=[])):(l=l||[]).push(g,f))}n&&(l=l||[]).push("style",n);var g=l;(t.updateQueue=g)&&(t.flags|=4)}};vw=function(e,t,n,r){n!==r&&(t.flags|=4)};function qs(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function B_(e,t,n){var r=t.pendingProps;switch(mp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return bt(t.type)&&Yu(),yt(t),null;case 3:return r=t.stateNode,Yo(),Ee(jt),Ee(St),Pp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Pu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fn!==null&&($f(Fn),Fn=null))),Uf(e,t),yt(t),null;case 5:_p(t);var s=Bi(Cl.current);if(n=t.type,e!==null&&t.stateNode!=null)gw(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return yt(t),null}if(e=Bi(sr.current),Pu(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[ir]=t,r[Pl]=l,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<il.length;s++)xe(il[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Ny(r,l),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},xe("invalid",r);break;case"textarea":Fy(r,l),xe("invalid",r)}gf(n,l),s=null;for(var u in l)if(l.hasOwnProperty(u)){var h=l[u];u==="children"?typeof h=="string"?r.textContent!==h&&(l.suppressHydrationWarning!==!0&&_u(r.textContent,h,e),s=["children",h]):typeof h=="number"&&r.textContent!==""+h&&(l.suppressHydrationWarning!==!0&&_u(r.textContent,h,e),s=["children",""+h]):pl.hasOwnProperty(u)&&h!=null&&u==="onScroll"&&xe("scroll",r)}switch(n){case"input":du(r),Oy(r,l,!0);break;case"textarea":du(r),My(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Xu)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{u=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=V0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[ir]=t,e[Pl]=r,mw(e,t,!1,!1),t.stateNode=e;e:{switch(u=vf(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<il.length;s++)xe(il[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":Ny(e,r),s=df(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Fe({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Fy(e,r),s=pf(e,r),xe("invalid",e);break;default:s=r}gf(n,s),h=s;for(l in h)if(h.hasOwnProperty(l)){var f=h[l];l==="style"?X0(e,f):l==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&Q0(e,f)):l==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&ml(e,f):typeof f=="number"&&ml(e,""+f):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(pl.hasOwnProperty(l)?f!=null&&l==="onScroll"&&xe("scroll",e):f!=null&&ep(e,l,f,u))}switch(n){case"input":du(e),Oy(e,r,!1);break;case"textarea":du(e),My(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ci(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Wo(e,!!r.multiple,l,!1):r.defaultValue!=null&&Wo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Xu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yt(t),null;case 6:if(e&&t.stateNode!=null)vw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=Bi(Cl.current),Bi(sr.current),Pu(t)){if(r=t.stateNode,n=t.memoizedProps,r[ir]=t,(l=r.nodeValue!==n)&&(e=$t,e!==null))switch(e.tag){case 3:_u(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_u(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ir]=t,t.stateNode=r}return yt(t),null;case 13:if(Ee(Ne),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&Kt!==null&&t.mode&1&&!(t.flags&128))F1(),Go(),t.flags|=98560,l=!1;else if(l=Pu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(W(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(W(317));l[ir]=t}else Go(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),l=!1}else Fn!==null&&($f(Fn),Fn=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?Ye===0&&(Ye=3):Ap())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return Yo(),Uf(e,t),e===null&&El(t.stateNode.containerInfo),yt(t),null;case 10:return wp(t.type._context),yt(t),null;case 17:return bt(t.type)&&Yu(),yt(t),null;case 19:if(Ee(Ne),l=t.memoizedState,l===null)return yt(t),null;if(r=(t.flags&128)!==0,u=l.rendering,u===null)if(r)qs(l,!1);else{if(Ye!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(u=tc(e),u!==null){for(t.flags|=128,qs(l,!1),r=u.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,u=l.alternate,u===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=u.childLanes,l.lanes=u.lanes,l.child=u.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=u.memoizedProps,l.memoizedState=u.memoizedState,l.updateQueue=u.updateQueue,l.type=u.type,e=u.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ye(Ne,Ne.current&1|2),t.child}e=e.sibling}l.tail!==null&&je()>Ko&&(t.flags|=128,r=!0,qs(l,!1),t.lanes=4194304)}else{if(!r)if(e=tc(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!ke)return yt(t),null}else 2*je()-l.renderingStartTime>Ko&&n!==1073741824&&(t.flags|=128,r=!0,qs(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(n=l.last,n!==null?n.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=je(),t.sibling=null,n=Ne.current,ye(Ne,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return Mp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function j_(e,t){switch(mp(t),t.tag){case 1:return bt(t.type)&&Yu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(),Ee(jt),Ee(St),Pp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _p(t),null;case 13:if(Ee(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Ne),null;case 4:return Yo(),null;case 10:return wp(t.type._context),null;case 22:case 23:return Mp(),null;case 24:return null;default:return null}}var Tu=!1,wt=!1,b_=typeof WeakSet=="function"?WeakSet:Set,G=null;function Ao(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function Vf(e,t,n){try{n()}catch(r){De(e,t,r)}}var k0=!1;function H_(e,t){if(Tf=Vu,e=x1(),fp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var u=0,h=-1,f=-1,g=0,m=0,S=e,E=null;t:for(;;){for(var P;S!==n||s!==0&&S.nodeType!==3||(h=u+s),S!==l||r!==0&&S.nodeType!==3||(f=u+r),S.nodeType===3&&(u+=S.nodeValue.length),(P=S.firstChild)!==null;)E=S,S=P;for(;;){if(S===e)break t;if(E===n&&++g===s&&(h=u),E===l&&++m===r&&(f=u),(P=S.nextSibling)!==null)break;S=E,E=S.parentNode}S=P}n=h===-1||f===-1?null:{start:h,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},Vu=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var R=k.memoizedProps,A=k.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?R:Nn(t.type,R),A);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(L){De(t,t.return,L)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return k=k0,k0=!1,k}function dl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Vf(t,n,l)}s=s.next}while(s!==r)}}function vc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function yw(e){var t=e.alternate;t!==null&&(e.alternate=null,yw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ir],delete t[Pl],delete t[Lf],delete t[P_],delete t[k_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ww(e){return e.tag===5||e.tag===3||e.tag===4}function C0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ww(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.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 Gf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xu));else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}function Xf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xf(e,t,n),e=e.sibling;e!==null;)Xf(e,t,n),e=e.sibling}var st=null,On=!1;function Zr(e,t,n){for(n=n.child;n!==null;)Sw(e,t,n),n=n.sibling}function Sw(e,t,n){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(uc,n)}catch{}switch(n.tag){case 5:wt||Ao(n,t);case 6:var r=st,s=On;st=null,Zr(e,t,n),st=r,On=s,st!==null&&(On?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(On?(e=st,n=n.stateNode,e.nodeType===8?Zh(e.parentNode,n):e.nodeType===1&&Zh(e,n),wl(e)):Zh(st,n.stateNode));break;case 4:r=st,s=On,st=n.stateNode.containerInfo,On=!0,Zr(e,t,n),st=r,On=s;break;case 0:case 11:case 14:case 15:if(!wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var l=s,u=l.destroy;l=l.tag,u!==void 0&&(l&2||l&4)&&Vf(n,t,u),s=s.next}while(s!==r)}Zr(e,t,n);break;case 1:if(!wt&&(Ao(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(h){De(n,t,h)}Zr(e,t,n);break;case 21:Zr(e,t,n);break;case 22:n.mode&1?(wt=(r=wt)||n.memoizedState!==null,Zr(e,t,n),wt=r):Zr(e,t,n);break;default:Zr(e,t,n)}}function T0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new b_),t.forEach(function(r){var s=$_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ln(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var l=e,u=t,h=u;e:for(;h!==null;){switch(h.tag){case 5:st=h.stateNode,On=!1;break e;case 3:st=h.stateNode.containerInfo,On=!0;break e;case 4:st=h.stateNode.containerInfo,On=!0;break e}h=h.return}if(st===null)throw Error(W(160));Sw(l,u,s),st=null,On=!1;var f=s.alternate;f!==null&&(f.return=null),s.return=null}catch(g){De(s,t,g)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)xw(t,e),t=t.sibling}function xw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ln(t,e),nr(e),r&4){try{dl(3,e,e.return),vc(3,e)}catch(R){De(e,e.return,R)}try{dl(5,e,e.return)}catch(R){De(e,e.return,R)}}break;case 1:Ln(t,e),nr(e),r&512&&n!==null&&Ao(n,n.return);break;case 5:if(Ln(t,e),nr(e),r&512&&n!==null&&Ao(n,n.return),e.flags&32){var s=e.stateNode;try{ml(s,"")}catch(R){De(e,e.return,R)}}if(r&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,u=n!==null?n.memoizedProps:l,h=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{h==="input"&&l.type==="radio"&&l.name!=null&&H0(s,l),vf(h,u);var g=vf(h,l);for(u=0;u<f.length;u+=2){var m=f[u],S=f[u+1];m==="style"?X0(s,S):m==="dangerouslySetInnerHTML"?Q0(s,S):m==="children"?ml(s,S):ep(s,m,S,g)}switch(h){case"input":hf(s,l);break;case"textarea":U0(s,l);break;case"select":var E=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var P=l.value;P!=null?Wo(s,!!l.multiple,P,!1):E!==!!l.multiple&&(l.defaultValue!=null?Wo(s,!!l.multiple,l.defaultValue,!0):Wo(s,!!l.multiple,l.multiple?[]:"",!1))}s[Pl]=l}catch(R){De(e,e.return,R)}}break;case 6:if(Ln(t,e),nr(e),r&4){if(e.stateNode===null)throw Error(W(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(R){De(e,e.return,R)}}break;case 3:if(Ln(t,e),nr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{wl(t.containerInfo)}catch(R){De(e,e.return,R)}break;case 4:Ln(t,e),nr(e);break;case 13:Ln(t,e),nr(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(Op=je())),r&4&&T0(e);break;case 22:if(m=n!==null&&n.memoizedState!==null,e.mode&1?(wt=(g=wt)||m,Ln(t,e),wt=g):Ln(t,e),nr(e),r&8192){if(g=e.memoizedState!==null,(e.stateNode.isHidden=g)&&!m&&e.mode&1)for(G=e,m=e.child;m!==null;){for(S=G=m;G!==null;){switch(E=G,P=E.child,E.tag){case 0:case 11:case 14:case 15:dl(4,E,E.return);break;case 1:Ao(E,E.return);var k=E.stateNode;if(typeof k.componentWillUnmount=="function"){r=E,n=E.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(R){De(r,n,R)}}break;case 5:Ao(E,E.return);break;case 22:if(E.memoizedState!==null){z0(S);continue}}P!==null?(P.return=E,G=P):z0(S)}m=m.sibling}e:for(m=null,S=e;;){if(S.tag===5){if(m===null){m=S;try{s=S.stateNode,g?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(h=S.stateNode,f=S.memoizedProps.style,u=f!=null&&f.hasOwnProperty("display")?f.display:null,h.style.display=G0("display",u))}catch(R){De(e,e.return,R)}}}else if(S.tag===6){if(m===null)try{S.stateNode.nodeValue=g?"":S.memoizedProps}catch(R){De(e,e.return,R)}}else if((S.tag!==22&&S.tag!==23||S.memoizedState===null||S===e)&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===e)break e;for(;S.sibling===null;){if(S.return===null||S.return===e)break e;m===S&&(m=null),S=S.return}m===S&&(m=null),S.sibling.return=S.return,S=S.sibling}}break;case 19:Ln(t,e),nr(e),r&4&&T0(e);break;case 21:break;default:Ln(t,e),nr(e)}}function nr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ww(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ml(s,""),r.flags&=-33);var l=C0(e);Xf(e,l,s);break;case 3:case 4:var u=r.stateNode.containerInfo,h=C0(e);Gf(e,h,u);break;default:throw Error(W(161))}}catch(f){De(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function U_(e,t,n){G=e,Ew(e,t,n)}function Ew(e,t,n){for(var r=(e.mode&1)!==0;G!==null;){var s=G,l=s.child;if(s.tag===22&&r){var u=s.memoizedState!==null||Tu;if(!u){var h=s.alternate,f=h!==null&&h.memoizedState!==null||wt;h=Tu;var g=wt;if(Tu=u,(wt=f)&&!g)for(G=s;G!==null;)u=G,f=u.child,u.tag===22&&u.memoizedState!==null?I0(s):f!==null?(f.return=u,G=f):I0(s);for(;l!==null;)G=l,Ew(l,t,n),l=l.sibling;G=s,Tu=h,wt=g}R0(e,t,n)}else s.subtreeFlags&8772&&l!==null?(l.return=s,G=l):R0(e,t,n)}}function R0(e){for(;G!==null;){var t=G;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:wt||vc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!wt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Nn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&d0(t,l,r);break;case 3:var u=t.updateQueue;if(u!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}d0(t,u,n)}break;case 5:var h=t.stateNode;if(n===null&&t.flags&4){n=h;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var g=t.alternate;if(g!==null){var m=g.memoizedState;if(m!==null){var S=m.dehydrated;S!==null&&wl(S)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}wt||t.flags&512&&Qf(t)}catch(E){De(t,t.return,E)}}if(t===e){G=null;break}if(n=t.sibling,n!==null){n.return=t.return,G=n;break}G=t.return}}function z0(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var n=t.sibling;if(n!==null){n.return=t.return,G=n;break}G=t.return}}function I0(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vc(4,t)}catch(f){De(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(f){De(t,s,f)}}var l=t.return;try{Qf(t)}catch(f){De(t,l,f)}break;case 5:var u=t.return;try{Qf(t)}catch(f){De(t,u,f)}}}catch(f){De(t,t.return,f)}if(t===e){G=null;break}var h=t.sibling;if(h!==null){h.return=t.return,G=h;break}G=t.return}}var V_=Math.ceil,ic=Rr.ReactCurrentDispatcher,Lp=Rr.ReactCurrentOwner,yn=Rr.ReactCurrentBatchConfig,ae=0,nt=null,He=null,lt=0,Zt=0,Do=fi(0),Ye=0,Il=null,Qi=0,yc=0,Np=0,hl=null,Wt=null,Op=0,Ko=1/0,wr=null,oc=!1,Yf=null,li=null,Ru=!1,ti=null,sc=0,fl=0,Zf=null,Au=-1,Du=0;function Tt(){return ae&6?je():Au!==-1?Au:Au=je()}function ai(e){return e.mode&1?ae&2&<!==0?lt&-lt:T_.transition!==null?(Du===0&&(Du=o1()),Du):(e=he,e!==0||(e=window.event,e=e===void 0?16:h1(e.type)),e):1}function An(e,t,n,r){if(50<fl)throw fl=0,Zf=null,Error(W(185));Ll(e,n,r),(!(ae&2)||e!==nt)&&(e===nt&&(!(ae&2)&&(yc|=n),Ye===4&&Jr(e,lt)),Ht(e,r),n===1&&ae===0&&!(t.mode&1)&&(Ko=je()+500,pc&&pi()))}function Ht(e,t){var n=e.callbackNode;z2(e,t);var r=Uu(e,e===nt?lt:0);if(r===0)n!==null&&Wy(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Wy(n),t===1)e.tag===0?C_(L0.bind(null,e)):L1(L0.bind(null,e)),E_(function(){!(ae&6)&&pi()}),n=null;else{switch(s1(r)){case 1:n=op;break;case 4:n=r1;break;case 16:n=Hu;break;case 536870912:n=i1;break;default:n=Hu}n=Iw(n,_w.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _w(e,t){if(Au=-1,Du=0,ae&6)throw Error(W(327));var n=e.callbackNode;if(Uo()&&e.callbackNode!==n)return null;var r=Uu(e,e===nt?lt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=lc(e,r);else{t=r;var s=ae;ae|=2;var l=kw();(nt!==e||lt!==t)&&(wr=null,Ko=je()+500,ji(e,t));do try{X_();break}catch(h){Pw(e,h)}while(!0);yp(),ic.current=l,ae=s,He!==null?t=0:(nt=null,lt=0,t=Ye)}if(t!==0){if(t===2&&(s=Ef(e),s!==0&&(r=s,t=Kf(e,s))),t===1)throw n=Il,ji(e,0),Jr(e,r),Ht(e,je()),n;if(t===6)Jr(e,r);else{if(s=e.current.alternate,!(r&30)&&!Q_(s)&&(t=lc(e,r),t===2&&(l=Ef(e),l!==0&&(r=l,t=Kf(e,l))),t===1))throw n=Il,ji(e,0),Jr(e,r),Ht(e,je()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Ai(e,Wt,wr);break;case 3:if(Jr(e,r),(r&130023424)===r&&(t=Op+500-je(),10<t)){if(Uu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Tt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=If(Ai.bind(null,e,Wt,wr),t);break}Ai(e,Wt,wr);break;case 4:if(Jr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var u=31-Mn(r);l=1<<u,u=t[u],u>s&&(s=u),r&=~l}if(r=s,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*V_(r/1960))-r,10<r){e.timeoutHandle=If(Ai.bind(null,e,Wt,wr),r);break}Ai(e,Wt,wr);break;case 5:Ai(e,Wt,wr);break;default:throw Error(W(329))}}}return Ht(e,je()),e.callbackNode===n?_w.bind(null,e):null}function Kf(e,t){var n=hl;return e.current.memoizedState.isDehydrated&&(ji(e,t).flags|=256),e=lc(e,t),e!==2&&(t=Wt,Wt=n,t!==null&&$f(t)),e}function $f(e){Wt===null?Wt=e:Wt.push.apply(Wt,e)}function Q_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],l=s.getSnapshot;s=s.value;try{if(!Dn(l(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Jr(e,t){for(t&=~Np,t&=~yc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mn(t),r=1<<n;e[n]=-1,t&=~r}}function L0(e){if(ae&6)throw Error(W(327));Uo();var t=Uu(e,0);if(!(t&1))return Ht(e,je()),null;var n=lc(e,t);if(e.tag!==0&&n===2){var r=Ef(e);r!==0&&(t=r,n=Kf(e,r))}if(n===1)throw n=Il,ji(e,0),Jr(e,t),Ht(e,je()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ai(e,Wt,wr),Ht(e,je()),null}function Fp(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Ko=je()+500,pc&&pi())}}function Gi(e){ti!==null&&ti.tag===0&&!(ae&6)&&Uo();var t=ae;ae|=1;var n=yn.transition,r=he;try{if(yn.transition=null,he=1,e)return e()}finally{he=r,yn.transition=n,ae=t,!(ae&6)&&pi()}}function Mp(){Zt=Do.current,Ee(Do)}function ji(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,x_(n)),He!==null)for(n=He.return;n!==null;){var r=n;switch(mp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yu();break;case 3:Yo(),Ee(jt),Ee(St),Pp();break;case 5:_p(r);break;case 4:Yo();break;case 13:Ee(Ne);break;case 19:Ee(Ne);break;case 10:wp(r.type._context);break;case 22:case 23:Mp()}n=n.return}if(nt=e,He=e=ui(e.current,null),lt=Zt=t,Ye=0,Il=null,Np=yc=Qi=0,Wt=hl=null,Wi!==null){for(t=0;t<Wi.length;t++)if(n=Wi[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,l=n.pending;if(l!==null){var u=l.next;l.next=s,r.next=u}n.pending=r}Wi=null}return e}function Pw(e,t){do{var n=He;try{if(yp(),Ou.current=rc,nc){for(var r=Oe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}nc=!1}if(Vi=0,tt=Xe=Oe=null,cl=!1,Tl=0,Lp.current=null,n===null||n.return===null){Ye=1,Il=t,He=null;break}e:{var l=e,u=n.return,h=n,f=t;if(t=lt,h.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var g=f,m=h,S=m.tag;if(!(m.mode&1)&&(S===0||S===11||S===15)){var E=m.alternate;E?(m.updateQueue=E.updateQueue,m.memoizedState=E.memoizedState,m.lanes=E.lanes):(m.updateQueue=null,m.memoizedState=null)}var P=y0(u);if(P!==null){P.flags&=-257,w0(P,u,h,l,t),P.mode&1&&v0(l,g,t),t=P,f=g;var k=t.updateQueue;if(k===null){var R=new Set;R.add(f),t.updateQueue=R}else k.add(f);break e}else{if(!(t&1)){v0(l,g,t),Ap();break e}f=Error(W(426))}}else if(ke&&h.mode&1){var A=y0(u);if(A!==null){!(A.flags&65536)&&(A.flags|=256),w0(A,u,h,l,t),gp(Zo(f,h));break e}}l=f=Zo(f,h),Ye!==4&&(Ye=2),hl===null?hl=[l]:hl.push(l),l=u;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var x=lw(l,f,t);c0(l,x);break e;case 1:h=f;var w=l.type,_=l.stateNode;if(!(l.flags&128)&&(typeof w.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(li===null||!li.has(_)))){l.flags|=65536,t&=-t,l.lanes|=t;var L=aw(l,h,t);c0(l,L);break e}}l=l.return}while(l!==null)}Tw(n)}catch(O){t=O,He===n&&n!==null&&(He=n=n.return);continue}break}while(!0)}function kw(){var e=ic.current;return ic.current=rc,e===null?rc:e}function Ap(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),nt===null||!(Qi&268435455)&&!(yc&268435455)||Jr(nt,lt)}function lc(e,t){var n=ae;ae|=2;var r=kw();(nt!==e||lt!==t)&&(wr=null,ji(e,t));do try{G_();break}catch(s){Pw(e,s)}while(!0);if(yp(),ae=n,ic.current=r,He!==null)throw Error(W(261));return nt=null,lt=0,Ye}function G_(){for(;He!==null;)Cw(He)}function X_(){for(;He!==null&&!S2();)Cw(He)}function Cw(e){var t=zw(e.alternate,e,Zt);e.memoizedProps=e.pendingProps,t===null?Tw(e):He=t,Lp.current=null}function Tw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=j_(n,t),n!==null){n.flags&=32767,He=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ye=6,He=null;return}}else if(n=B_(n,t,Zt),n!==null){He=n;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Ye===0&&(Ye=5)}function Ai(e,t,n){var r=he,s=yn.transition;try{yn.transition=null,he=1,Y_(e,t,n,r)}finally{yn.transition=s,he=r}return null}function Y_(e,t,n,r){do Uo();while(ti!==null);if(ae&6)throw Error(W(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(I2(e,l),e===nt&&(He=nt=null,lt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ru||(Ru=!0,Iw(Hu,function(){return Uo(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=yn.transition,yn.transition=null;var u=he;he=1;var h=ae;ae|=4,Lp.current=null,H_(e,n),xw(n,e),g_(Rf),Vu=!!Tf,Rf=Tf=null,e.current=n,U_(n,e,s),x2(),ae=h,he=u,yn.transition=l}else e.current=n;if(Ru&&(Ru=!1,ti=e,sc=s),l=e.pendingLanes,l===0&&(li=null),P2(n.stateNode,r),Ht(e,je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(oc)throw oc=!1,e=Yf,Yf=null,e;return sc&1&&e.tag!==0&&Uo(),l=e.pendingLanes,l&1?e===Zf?fl++:(fl=0,Zf=e):fl=0,pi(),null}function Uo(){if(ti!==null){var e=s1(sc),t=yn.transition,n=he;try{if(yn.transition=null,he=16>e?16:e,ti===null)var r=!1;else{if(e=ti,ti=null,sc=0,ae&6)throw Error(W(331));var s=ae;for(ae|=4,G=e.current;G!==null;){var l=G,u=l.child;if(G.flags&16){var h=l.deletions;if(h!==null){for(var f=0;f<h.length;f++){var g=h[f];for(G=g;G!==null;){var m=G;switch(m.tag){case 0:case 11:case 15:dl(8,m,l)}var S=m.child;if(S!==null)S.return=m,G=S;else for(;G!==null;){m=G;var E=m.sibling,P=m.return;if(yw(m),m===g){G=null;break}if(E!==null){E.return=P,G=E;break}G=P}}}var k=l.alternate;if(k!==null){var R=k.child;if(R!==null){k.child=null;do{var A=R.sibling;R.sibling=null,R=A}while(R!==null)}}G=l}}if(l.subtreeFlags&2064&&u!==null)u.return=l,G=u;else e:for(;G!==null;){if(l=G,l.flags&2048)switch(l.tag){case 0:case 11:case 15:dl(9,l,l.return)}var x=l.sibling;if(x!==null){x.return=l.return,G=x;break e}G=l.return}}var w=e.current;for(G=w;G!==null;){u=G;var _=u.child;if(u.subtreeFlags&2064&&_!==null)_.return=u,G=_;else e:for(u=w;G!==null;){if(h=G,h.flags&2048)try{switch(h.tag){case 0:case 11:case 15:vc(9,h)}}catch(O){De(h,h.return,O)}if(h===u){G=null;break e}var L=h.sibling;if(L!==null){L.return=h.return,G=L;break e}G=h.return}}if(ae=s,pi(),or&&typeof or.onPostCommitFiberRoot=="function")try{or.onPostCommitFiberRoot(uc,e)}catch{}r=!0}return r}finally{he=n,yn.transition=t}}return!1}function N0(e,t,n){t=Zo(n,t),t=lw(e,t,1),e=si(e,t,1),t=Tt(),e!==null&&(Ll(e,1,t),Ht(e,t))}function De(e,t,n){if(e.tag===3)N0(e,e,n);else for(;t!==null;){if(t.tag===3){N0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(li===null||!li.has(r))){e=Zo(n,e),e=aw(t,e,1),t=si(t,e,1),e=Tt(),t!==null&&(Ll(t,1,e),Ht(t,e));break}}t=t.return}}function Z_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&n,nt===e&&(lt&n)===n&&(Ye===4||Ye===3&&(lt&130023424)===lt&&500>je()-Op?ji(e,0):Np|=n),Ht(e,t)}function Rw(e,t){t===0&&(e.mode&1?(t=pu,pu<<=1,!(pu&130023424)&&(pu=4194304)):t=1);var n=Tt();e=Cr(e,t),e!==null&&(Ll(e,t,n),Ht(e,n))}function K_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rw(e,n)}function $_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),Rw(e,n)}var zw;zw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Bt=!1,W_(e,t,n);Bt=!!(e.flags&131072)}else Bt=!1,ke&&t.flags&1048576&&N1(t,$u,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mu(e,t),e=t.pendingProps;var s=Qo(t,St.current);Ho(t,n),s=Cp(null,t,r,e,s,n);var l=Tp();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bt(r)?(l=!0,Zu(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,xp(t),s.updater=mc,t.stateNode=s,s._reactInternals=t,Df(t,r,e,n),t=jf(null,t,r,!0,l,n)):(t.tag=0,ke&&l&&pp(t),Ct(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mu(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=J_(r),e=Nn(r,e),s){case 0:t=Bf(null,t,r,e,n);break e;case 1:t=E0(null,t,r,e,n);break e;case 11:t=S0(null,t,r,e,n);break e;case 14:t=x0(null,t,r,Nn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),Bf(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),E0(e,t,r,s,n);case 3:e:{if(hw(t),e===null)throw Error(W(387));r=t.pendingProps,l=t.memoizedState,s=l.element,A1(e,t),ec(t,r,null,n);var u=t.memoizedState;if(r=u.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=Zo(Error(W(423)),t),t=_0(e,t,r,n,s);break e}else if(r!==s){s=Zo(Error(W(424)),t),t=_0(e,t,r,n,s);break e}else for(Kt=oi(t.stateNode.containerInfo.firstChild),$t=t,ke=!0,Fn=null,n=j1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Go(),r===s){t=Tr(e,t,n);break e}Ct(e,t,r,n)}t=t.child}return t;case 5:return b1(t),e===null&&Ff(t),r=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,u=s.children,zf(r,s)?u=null:l!==null&&zf(r,l)&&(t.flags|=32),dw(e,t),Ct(e,t,u,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return fw(e,t,n);case 4:return Ep(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xo(t,null,r,n):Ct(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),S0(e,t,r,s,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,l=t.memoizedProps,u=s.value,ye(qu,r._currentValue),r._currentValue=u,l!==null)if(Dn(l.value,u)){if(l.children===s.children&&!jt.current){t=Tr(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var h=l.dependencies;if(h!==null){u=l.child;for(var f=h.firstContext;f!==null;){if(f.context===r){if(l.tag===1){f=_r(-1,n&-n),f.tag=2;var g=l.updateQueue;if(g!==null){g=g.shared;var m=g.pending;m===null?f.next=f:(f.next=m.next,m.next=f),g.pending=f}}l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),Mf(l.return,n,t),h.lanes|=n;break}f=f.next}}else if(l.tag===10)u=l.type===t.type?null:l.child;else if(l.tag===18){if(u=l.return,u===null)throw Error(W(341));u.lanes|=n,h=u.alternate,h!==null&&(h.lanes|=n),Mf(u,n,t),u=l.sibling}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===t){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}Ct(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ho(t,n),s=wn(s),r=r(s),t.flags|=1,Ct(e,t,r,n),t.child;case 14:return r=t.type,s=Nn(r,t.pendingProps),s=Nn(r.type,s),x0(e,t,r,s,n);case 15:return uw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),Mu(e,t),t.tag=1,bt(r)?(e=!0,Zu(t)):e=!1,Ho(t,n),W1(t,r,s),Df(t,r,s,n),jf(null,t,r,!0,e,n);case 19:return pw(e,t,n);case 22:return cw(e,t,n)}throw Error(W(156,t.tag))};function Iw(e,t){return n1(e,t)}function q_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,r){return new q_(e,t,n,r)}function Dp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function J_(e){if(typeof e=="function")return Dp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===np)return 11;if(e===rp)return 14}return 2}function ui(e,t){var n=e.alternate;return n===null?(n=vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wu(e,t,n,r,s,l){var u=2;if(r=e,typeof e=="function")Dp(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case To:return bi(n.children,s,l,t);case tp:u=8,s|=8;break;case lf:return e=vn(12,n,t,s|2),e.elementType=lf,e.lanes=l,e;case af:return e=vn(13,n,t,s),e.elementType=af,e.lanes=l,e;case uf:return e=vn(19,n,t,s),e.elementType=uf,e.lanes=l,e;case B0:return wc(n,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D0:u=10;break e;case W0:u=9;break e;case np:u=11;break e;case rp:u=14;break e;case Kr:u=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=vn(u,n,t,s),t.elementType=e,t.type=r,t.lanes=l,t}function bi(e,t,n,r){return e=vn(7,e,r,t),e.lanes=n,e}function wc(e,t,n,r){return e=vn(22,e,r,t),e.elementType=B0,e.lanes=n,e.stateNode={isHidden:!1},e}function rf(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function of(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eP(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bh(0),this.expirationTimes=bh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Wp(e,t,n,r,s,l,u,h,f){return e=new eP(e,t,n,h,f),t===1?(t=1,l===!0&&(t|=8)):t=0,l=vn(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},xp(l),e}function tP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Co,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Lw(e){if(!e)return di;e=e._reactInternals;e:{if(Yi(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(bt(n))return I1(e,n,t)}return t}function Nw(e,t,n,r,s,l,u,h,f){return e=Wp(n,r,!0,e,s,l,u,h,f),e.context=Lw(null),n=e.current,r=Tt(),s=ai(n),l=_r(r,s),l.callback=t??null,si(n,l,s),e.current.lanes=s,Ll(e,s,r),Ht(e,r),e}function Sc(e,t,n,r){var s=t.current,l=Tt(),u=ai(s);return n=Lw(n),t.context===null?t.context=n:t.pendingContext=n,t=_r(l,u),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=si(s,t,u),e!==null&&(An(e,s,u,l),Nu(e,s,u)),u}function ac(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function O0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Bp(e,t){O0(e,t),(e=e.alternate)&&O0(e,t)}function nP(){return null}var Ow=typeof reportError=="function"?reportError:function(e){console.error(e)};function jp(e){this._internalRoot=e}xc.prototype.render=jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Sc(e,t,null,null)};xc.prototype.unmount=jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){Sc(null,e,null,null)}),t[kr]=null}};function xc(e){this._internalRoot=e}xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=u1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qr.length&&t!==0&&t<qr[n].priority;n++);qr.splice(n,0,e),n===0&&d1(e)}};function bp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function F0(){}function rP(e,t,n,r,s){if(s){if(typeof r=="function"){var l=r;r=function(){var g=ac(u);l.call(g)}}var u=Nw(t,r,e,0,null,!1,!1,"",F0);return e._reactRootContainer=u,e[kr]=u.current,El(e.nodeType===8?e.parentNode:e),Gi(),u}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var h=r;r=function(){var g=ac(f);h.call(g)}}var f=Wp(e,0,!1,null,null,!1,!1,"",F0);return e._reactRootContainer=f,e[kr]=f.current,El(e.nodeType===8?e.parentNode:e),Gi(function(){Sc(t,f,n,r)}),f}function _c(e,t,n,r,s){var l=n._reactRootContainer;if(l){var u=l;if(typeof s=="function"){var h=s;s=function(){var f=ac(u);h.call(f)}}Sc(t,u,e,s)}else u=rP(n,t,e,s,r);return ac(u)}l1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=rl(t.pendingLanes);n!==0&&(sp(t,n|1),Ht(t,je()),!(ae&6)&&(Ko=je()+500,pi()))}break;case 13:Gi(function(){var r=Cr(e,1);if(r!==null){var s=Tt();An(r,e,1,s)}}),Bp(e,1)}};lp=function(e){if(e.tag===13){var t=Cr(e,134217728);if(t!==null){var n=Tt();An(t,e,134217728,n)}Bp(e,134217728)}};a1=function(e){if(e.tag===13){var t=ai(e),n=Cr(e,t);if(n!==null){var r=Tt();An(n,e,t,r)}Bp(e,t)}};u1=function(){return he};c1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};wf=function(e,t,n){switch(t){case"input":if(hf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=fc(r);if(!s)throw Error(W(90));b0(r),hf(r,s)}}}break;case"textarea":U0(e,n);break;case"select":t=n.value,t!=null&&Wo(e,!!n.multiple,t,!1)}};K0=Fp;$0=Gi;var iP={usingClientEntryPoint:!1,Events:[Ol,Lo,fc,Y0,Z0,Fp]},Js={findFiberByHostInstance:Di,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},oP={bundleType:Js.bundleType,version:Js.version,rendererPackageName:Js.rendererPackageName,rendererConfig:Js.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=e1(e),e===null?null:e.stateNode},findFiberByHostInstance:Js.findFiberByHostInstance||nP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(el=__REACT_DEVTOOLS_GLOBAL_HOOK__,!el.isDisabled&&el.supportsFiber))try{uc=el.inject(oP),or=el}catch{}var el;en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iP;en.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bp(t))throw Error(W(200));return tP(e,t,null,n)};en.createRoot=function(e,t){if(!bp(e))throw Error(W(299));var n=!1,r="",s=Ow;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Wp(e,1,!1,null,null,n,!1,r,s),e[kr]=t.current,El(e.nodeType===8?e.parentNode:e),new jp(t)};en.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=e1(t),e=e===null?null:e.stateNode,e};en.flushSync=function(e){return Gi(e)};en.hydrate=function(e,t,n){if(!Ec(t))throw Error(W(200));return _c(null,e,t,!0,n)};en.hydrateRoot=function(e,t,n){if(!bp(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,s=!1,l="",u=Ow;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),t=Nw(t,null,e,1,n??null,s,!1,l,u),e[kr]=t.current,El(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new xc(t)};en.render=function(e,t,n){if(!Ec(t))throw Error(W(200));return _c(null,e,t,!1,n)};en.unmountComponentAtNode=function(e){if(!Ec(e))throw Error(W(40));return e._reactRootContainer?(Gi(function(){_c(null,null,e,!1,function(){e._reactRootContainer=null,e[kr]=null})}),!0):!1};en.unstable_batchedUpdates=Fp;en.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ec(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return _c(e,t,n,!1,r)};en.version="18.2.0-next-9e3b772b8-20220608"});var Hp=mt((qz,Aw)=>{"use strict";function Mw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mw)}catch(e){console.error(e)}}Mw(),Aw.exports=Fw()});var Ww=mt(Up=>{"use strict";var Dw=Hp();Up.createRoot=Dw.createRoot,Up.hydrateRoot=Dw.hydrateRoot;var Jz});var nk={};aE(nk,{Atlas:()=>Fh,AtlasAuto:()=>i2,AtlasContext:()=>qn,BoundsContext:()=>Gr,Box:()=>Rn,BrowserEventManager:()=>Ni,CanvasRenderer:()=>Ls,CompositeRenderer:()=>Ri,CompositeResource:()=>Cs,DebugRenderer:()=>Ns,DrawBox:()=>o2,Geometry:()=>Ti,GridBuilder:()=>oh,HTMLPortal:()=>Pc,ImageService:()=>ZP,ImageTexture:()=>Vr,ModeContext:()=>$n,ModeProvider:()=>QE,OverlayRenderer:()=>Li,ReactAtlas:()=>So,RegionHighlight:()=>sP,ResizeWorldItem:()=>Xp,Runtime:()=>Kn,SingleImage:()=>Ge,StaticRenderer:()=>Vs,Text:()=>yr,TileSet:()=>Zp,TiledImage:()=>dn,WebGLRenderer:()=>bs,World:()=>hn,WorldObject:()=>Zn,Zone:()=>Jd,activateEvents:()=>Lh,applyProps:()=>Ih,bounceOut:()=>Rs,canDrag:()=>ek,createDefaultEventMap:()=>$d,defaultConfig:()=>Nv,defaultPreset:()=>Us,easingFunctions:()=>zn,fromImage:()=>cE,getId:()=>Kp,getTileFromCanvas:()=>yS,getTileFromImageService:()=>Oc,getTiles:()=>YP,getTilesFromManifest:()=>wS,mergeStyles:()=>tk,popmotionController:()=>Os,presets:()=>Oh,staticPreset:()=>Nh,supportedEventAttributes:()=>mo,supportedEventMap:()=>Tn,unmountComponentAtNode:()=>wo,useAfterFrame:()=>Mh,useAfterPaint:()=>KP,useAtlas:()=>Gs,useAtlasImage:()=>$P,useBeforeFrame:()=>qP,useCanvas:()=>Ah,useControlledAnnotationList:()=>JP,useFrame:()=>Fi,useMode:()=>Ms,useResizeWorldItem:()=>Gp,useRuntime:()=>ot,useWorldEvent:()=>kc});var mo=["onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onScroll","onWheel","onClick","onDragStart","onDragEnd","onDragEnter","onDragExit","onDrag","onDragOver"];function $d(){return mo.reduce((e,t)=>(e[t]=[],e),{})}var Tn=mo.reduce((e,t)=>(e[t.slice(2).toLowerCase()]=t,e[t]=t,e),{});var Ur=(e,t,n)=>{let r=e.length,s=n||V(r);for(let l=0;l<r;l++)s[l]=l%5===0?e[l+1]<t[3]&&e[l+3]>t[1]&&e[l+2]<t[4]&&e[l+4]>t[2]?1:0:e[l];return s};function V(e,t,n){return new Float32Array(e,t,n)}var Gg=(e,t,n)=>{let r=e[1]<=t[3]&&e[3]>=t[1]&&e[2]<=t[4]&&e[4]>=t[2],s=n||V(5);return r?(s[0]=1,s[1]=Math.max(e[1],t[1]),s[2]=Math.max(e[2],t[2]),s[3]=Math.min(e[3],t[3]),s[4]=Math.min(e[4],t[4]),s):(s[0]=0,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s)},Xg=e=>e.length/5;var At=(e,t,n)=>{let r=n||V(9);return r[0]=e[0]*t[0]+e[1]*t[3]+e[2]*t[6],r[1]=e[0]*t[1]+e[1]*t[4]+e[2]*t[7],r[2]=e[0]*t[2]+e[1]*t[5]+e[2]*t[8],r[3]=e[3]*t[0]+e[4]*t[3]+e[5]*t[6],r[4]=e[3]*t[1]+e[4]*t[4]+e[5]*t[7],r[5]=e[3]*t[2]+e[4]*t[5]+e[5]*t[8],r[6]=e[6]*t[0]+e[7]*t[3]+e[8]*t[6],r[7]=e[6]*t[1]+e[7]*t[4]+e[8]*t[7],r[8]=e[6]*t[2]+e[7]*t[5]+e[8]*t[8],r},ee=class e{constructor(t){this.index=0,this.length=t,this.points=V(this.length)}static grid(t=1,n=1){return new e(5*t*n)}static point(t,n){let r=V(5);return r[0]=1,r[1]=t,r[2]=n,r[3]=t,r[4]=n,r}static positionPair(t){let n=V(5);return n[0]=1,n[1]=t.x1,n[2]=t.y1,n[3]=t.x2,n[4]=t.y2,n}static projection(t){return e.singleBox(t.width,t.height,t.x,t.y)}static singleBox(t,n,r=0,s=0){let l=V(5);return l[0]=1,l[1]=r,l[2]=s,l[3]=t+r,l[4]=n+s,l}row(t){return t(this)}addPoints(t,n,r,s){return this.points[this.index]=1,this.points[1+this.index]=t,this.points[2+this.index]=n,this.points[3+this.index]=r,this.points[4+this.index]=s,this.index+=5,this}addBox(t,n,r,s){return this.addPoints(t,n,t+r,n+s),this}build(){return this.points}};var _t=(e,t)=>{let n=e.length;for(let r=0;r<n;r++)e[r]=r%5===0?t[6]*e[r+1]+t[7]*e[r+2]+t[8]*e[r]:r%5%2===1?t[0]*e[r]+t[1]*e[r+1]+t[2]:t[3]*e[r-1]+t[4]*e[r]+t[5];return e},Qt=e=>{let t=V(9);return t[0]=e,t[4]=e,t[8]=1,t},Re=(e,t)=>{let n=V(9);return n[0]=1,n[2]=e,n[4]=1,n[5]=t,n[8]=1,n},vr=(e,t,n)=>At(Re((1-e)*t,(1-e)*n),Qt(e)),Gt=(e,t,n)=>{let r=e.length,s=n&&n.length>=r?n.slice(0,r):V(r);for(let l=0;l<r;l++)s[l]=l%5===0?t[6]*e[l+1]+t[7]*e[l+2]+t[8]*e[l]:l%5%2===1?t[0]*e[l]+t[1]*e[l+1]+t[2]:t[3]*e[l-1]+t[4]*e[l]+t[5];return s};var Yg="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Yn=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=Yg[n[e]&63];return t};var Ae=class{constructor(){v(this,"__id");v(this,"__revision",0);v(this,"__host");v(this,"__onCreate");v(this,"__parent");v(this,"__owner",{value:void 0});v(this,"__state",{});v(this,"eventHandlers");v(this,"scale",1);v(this,"layers",[]);v(this,"time",[]);v(this,"_crop");v(this,"cropData");v(this,"id");v(this,"addEventListener",(t,n,r)=>{let s=Tn[t];if(!this.eventHandlers[s])throw new Error(`Unknown event ${s}`);this.eventHandlers[s].indexOf(n)===-1&&this.eventHandlers[s].push(n)});v(this,"removeEventListener",(t,n)=>{let r=Tn[t];if(!this.eventHandlers[r]){console.warn(`Unknown event ${r}`);return}this.eventHandlers[r].indexOf(n)!==-1&&(this.eventHandlers[r]=this.eventHandlers[r].filter(s=>s!==n))});this.id=this.__id=Yn(),this.eventHandlers=$d()}get crop(){return this._crop}set crop(t){this._crop=t}getObjectsAt(t){return[]}getAllPointsAt(t,n,r){return[]}getScheduledUpdates(t,n){return[]}dispatchEvent(t,n){let r=this.eventHandlers[t],s=r?r.length:0,l=!1;if(s)for(let u=0;u<s;u++)try{r[u](n),l=!0}catch(h){console.error(t,h)}return l}get x(){return this.points[1]}get y(){return this.points[2]}get width(){return this.points[3]-this.points[1]}get height(){return this.points[4]-this.points[2]}translate(t,n){_t(this.points,Re(t,n))}atScale(t){_t(this.points,vr(t,this.x,this.y)),this.scale*=t}transform(t){_t(this.points,t)}applyProps(t){this.__revision++}appendChild(t){}removeChild(t){}insertBefore(t,n){}hideInstance(){}};var Ge=class e extends Ae{constructor(n){super();v(this,"type","spacial-content");v(this,"id");v(this,"uri");v(this,"display");v(this,"points");v(this,"priority");v(this,"style",{opacity:1});if(!n)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:V(5)},this.points=V(5);else{let r=n.scale||1;this.id=n.id||n.uri,this.uri=n.uri,this.points=ee.singleBox(n.width,n.height,n.x,n.y),this.display={x:0,y:0,scale:r,width:n.width/r,height:n.height/r,points:ee.singleBox(n.width/r,n.height/r),rotation:n?.rotation}}}applyProps(n){let r=n.display?n.display.width:n.target.width,s=n.target.width/r;if(this.id=n.id||n.uri,this.uri=n.uri,this.points.set(ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y)),n.style&&typeof n.style.opacity<"u"&&(this.style.opacity=n.style.opacity),n.crop){this.cropData=n.crop;let l=ee.singleBox(n.crop.width,n.crop.height,n.crop.x,n.crop.y);_t(l,Re(-n.crop.x,-n.crop.y)),this.crop?this.crop.set(l):this.crop=V(l)}n.display?(this.display.scale=s,this.display.width=n.display.width,this.display.height=n.display.height,this.display.rotation=n.display.rotation,this.display.points=ee.singleBox(n.display.width,n.display.height)):(this.display.scale=s,this.display.width=n.target.width/s,this.display.height=n.target.height/s,this.display.points=ee.singleBox(n.target.width/s,n.target.height/s))}getAllPointsAt(n,r,s){return[[this,this.crop||this.points,r]]}static fromSvg(n,r,s,l){return e.fromImage("data:image/svg+xml;base64,"+btoa(n),r,s,l)}static fromImage(n,r,s,l){let u=new e;return u.applyProps({uri:n,id:l,display:s,target:r}),u}getImageUrl(){return this.uri}};var Vr=class extends Ae{constructor(n){super();v(this,"type","spacial-content");v(this,"id");v(this,"uri");v(this,"display");v(this,"points");v(this,"getTexture");if(this.getTexture=()=>({source:void 0,hash:-1}),!n)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:V(5)},this.points=V(5);else{let r=n.scale||1;this.id=n.id||n.uri,this.uri=n.uri,this.points=ee.singleBox(n.width,n.height),this.display={x:0,y:0,scale:r,width:n.width/r,height:n.height/r,points:r!==1?ee.singleBox(n.width/r,n.height/r):this.points}}}applyProps(n){let r=n.display?n.display.width:n.target.width,s=n.target.width/r;this.id=n.id,this.points.set(ee.singleBox(n.target.width,n.target.height)),this.display.scale=s,this.display.width=n.target.width/s,this.display.height=n.target.height/s,this.getTexture=n.getTexture,this.display.points=s!==1?ee.singleBox(n.target.width/s,n.target.height/s):this.points}getAllPointsAt(n,r,s){return[[this,this.points,r]]}};function Zg(e,t,n=1){let r=t.length;if(r===0)throw new Error("No resources passed in.");let s=0,l=1/0;for(let u=0;u<r&&!(!t[u]||!t[u].display);u++){let h=qd(t[u].display.scale,e/(n||1));h<l&&(l=h,s=u)}return s}function qd(e,t){return Math.abs(e-t)}function Ci(e,t){let n=qd(e.x,t.x),r=qd(e.y,t.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}function Kg(e){let t=e.length;return e.indexOf("/info.json")===t-10?e.slice(0,-10):e}function Ia(e,t,n){return Math.min(Math.max(e,t),n)}var dn=class e extends Ae{constructor(n){super();v(this,"id");v(this,"type","spacial-content");v(this,"display");v(this,"tileWidth");v(this,"style",{opacity:1});v(this,"points");v(this,"service");v(this,"format","jpg");v(this,"crop2");v(this,"version3");v(this,"tileUrl");this.tileUrl=Kg(n.url),this.id=n.id||`${this.tileUrl}--${n.scaleFactor}`,this.points=n.displayPoints?n.displayPoints:Gt(n.points,Qt(n.scaleFactor)),this.tileWidth=n.tileWidth,this.version3=n.version3,this.display={x:0,y:0,width:n.width/n.scaleFactor,height:n.height/n.scaleFactor,points:n.points,scale:n.scaleFactor},n.format&&(this.format=n.format)}applyProps(n){if(n.style&&typeof n.style.opacity<"u"&&(this.style.opacity=n.style.opacity),n.service!==this.service&&(this.service=n.service),n.format?this.format=n.format:this.format="jpg",typeof n.version3<"u"&&(this.version3=n.version3),n.crop){this.cropData=n.crop;let r=V([...this.points]),s=r.length/5,l=n.crop.x||0,u=n.crop.y||0,h=n.crop.x+n.crop.width,f=n.crop.y+n.crop.height;for(let g=0;g<s;g++){let m=g*5;r[m+1]<h&&r[m+3]>l&&r[m+2]<f&&r[m+4]>u?(r[m+1]=Ia(r[m+1],l,h),r[m+3]=Ia(r[m+3],l,h),r[m+2]=Ia(r[m+2],u,f),r[m+4]=Ia(r[m+4],u,f)):r[m]=0}_t(r,Re(-n.crop.x,-n.crop.y)),this.crop?this.crop.set(r):this.crop=r}}static fromTile(n,r,s,l,u,h,f,g){s.height=s.height?s.height:s.width;let m=f?Math.floor(r.width/l):Math.ceil(r.width/l),S=f?Math.floor(r.height/l):Math.ceil(r.height/l),E=Math.ceil(m/s.width),P=Math.ceil(S/s.height),k=ee.grid(E,P),R=ee.grid(E,P),A=u?u["@context"]?Array.isArray(u["@context"])?u["@context"]:[u["@context"]]:[]:[],x=typeof g<"u"?g:A.indexOf("http://iiif.io/api/image/3/context.json")!==-1;for(let _=0;_<P;_++)for(let L=0;L<E;L++){let O=L*s.width,z=_*s.height;R.addPoints(O*l,z*l,L===E-1?r.width:(O+s.width)*l,_===P-1?r.height:(z+s.height)*l),k.addPoints(O,z,L===E-1?m:O+s.width,_===P-1?S:z+s.height)}let w=new e({url:n,scaleFactor:l,points:k.build(),displayPoints:R.build(),width:r.width,height:r.height,tileWidth:s.width,format:h,version3:x});return w.applyProps({service:u}),w}getImageUrl(n){let r=this.points.slice(n*5,n*5+5),s=r[3]-r[1],l=r[4]-r[2],u=Math.ceil(s/this.display.scale),h=Math.ceil(l/this.display.scale),f=`${u>this.tileWidth?this.tileWidth:u},`;return this.version3&&(f+=`${h>this.tileWidth?this.tileWidth:h}`),`${this.tileUrl}/${r[1]},${r[2]},${s},${l}/${f}/0/default.${this.format||"jpg"}`}getAllPointsAt(n,r,s){let l=Ur(this.crop||this.points,n);return[[this,l,r]]}transform(n){_t(this.points,n)}getScheduledUpdates(n,r){return[]}};var La=class extends Ae{constructor(){super(...arguments);v(this,"type","spacial-content")}getAllPointsAt(n,r,s){return[[this,this.points,r]]}};var Cs=class extends La{constructor(n){super();v(this,"id");v(this,"display");v(this,"points");v(this,"images",[]);v(this,"allImages",[]);v(this,"scaleFactors",[]);v(this,"aggregateBuffer",V(9));v(this,"lazyLoader");v(this,"isFullyLoaded",!1);v(this,"maxScaleFactor",0);v(this,"renderOptions");v(this,"_scheduleSortByScales",!1);v(this,"_sortByScales",()=>{this._scheduleSortByScales=!1,this.allImages.sort((r,s)=>s.display.width-r.display.width),this.images=[];let n=.1;for(let r of this.allImages){if(r.display.width<this.renderOptions.minSize&&r.display.height<this.renderOptions.minSize&&!r.priority||r instanceof Ge&&(r.display.width>this.renderOptions.maxImageSize||r.display.height>this.renderOptions.maxImageSize)&&!r.priority)continue;if(Math.abs(r.display.scale-n)<.25||r.priority){let l=this.images.pop();l&&(l instanceof Ge||l.priority)?(r.priority&&this.images.push(r),this.images.push(l)):r&&this.images.push(r)}else r&&this.images.push(r);n=r.display.scale}this.images.length===0&&(this.images=[...this.allImages]),this.scaleFactors=this.images.map(r=>r.display.scale),this.maxScaleFactor=Math.max(...this.scaleFactors)});v(this,"loadFullResource",async()=>{if(!this.isFullyLoaded&&this.lazyLoader){this.isFullyLoaded=!0;let n=await this.lazyLoader();this.addImages(n)}});v(this,"fallback",[this.loadFullResource]);this.id=n.id,this.points=ee.singleBox(n.width,n.height),this.lazyLoader=n.loadFullImages,n.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:ee.singleBox(n.width,n.height),height:n.height,width:n.width,scale:1},this.renderOptions={renderSmallestFallback:!0,renderLayers:3,minSize:255,maxImageSize:2048,quality:1.5,...n.renderOptions||{}},this.addImages(n.images)}applyProps(n){typeof n.renderSmallestFallback<"u"&&n.renderSmallestFallback!==this.renderOptions.renderSmallestFallback&&(this.renderOptions.renderSmallestFallback=n.renderSmallestFallback),typeof n.renderLayers<"u"&&n.renderLayers!==this.renderOptions.renderLayers&&(this.renderOptions.renderLayers=n.renderLayers),typeof n.minSize<"u"&&n.minSize!==this.renderOptions.minSize&&(this.renderOptions.minSize=n.minSize),typeof n.maxImageSize<"u"&&n.maxImageSize!==this.renderOptions.maxImageSize&&(this.renderOptions.maxImageSize=n.maxImageSize),typeof n.quality<"u"&&n.quality!==this.renderOptions.quality&&(this.renderOptions.quality=n.quality)}appendChild(n){this.addImages([n])}removeChild(n){this.images.indexOf(n)!==-1&&(this.images=this.images.filter(r=>r!==n),this.sortByScales())}insertBefore(n,r){this.addImages([n])}hideInstance(){}addImages(n){for(let r of n)r.__parent=this,r.__owner=this.__owner;this.allImages.push(...n.filter(Boolean)),this.sortByScales()}sortByScales(){this._scheduleSortByScales=!0}getScheduledUpdates(n,r){return this._scheduleSortByScales?[this._sortByScales]:this.isFullyLoaded?[]:r>1/this.maxScaleFactor?this.fallback:[]}getAllPointsAt(n,r,s){if(this.images.length===0)return[];let l=Zg(1/(s||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),u=this.images.length,h=r?At(r,Re(this.x,this.y)):Re(this.x,this.y);if(l!==this.images.length-1&&this.images[l+1]){let f=[];for(let S=u-1;S>=l;S--)f.push(S);let g=f[0];this.renderOptions.renderLayers&&(f=f.slice(-Math.min(f.length,this.renderOptions.renderLayers))),this.renderOptions.renderSmallestFallback&&f.indexOf(g)===-1&&f.unshift(g);let m=[];for(let S=0;S<f.length;S++)m.push(...this.images[f[S]].getAllPointsAt(n,h,s));return m}return this.images[l].getAllPointsAt(n,h,s)}};function Na(e,t,n,r,s){let l=Math.PI/180*s,u=Math.cos(l),h=Math.sin(l),f=u*(n-e)+h*(r-t)+e,g=u*(r-t)-h*(n-e)+t;return[f,g]}var Zn=class e extends Ae{constructor(n,r){super();v(this,"id");v(this,"type","world-object");v(this,"scale");v(this,"layers");v(this,"points");v(this,"worldPoints");v(this,"intersectionBuffer",V(5));v(this,"aggregateBuffer",V(9));v(this,"invertedBuffer",V(9));v(this,"rotation",0);v(this,"filteredPointsBuffer");v(this,"_updatedList",[]);v(this,"geometry");let{x:s=0,y:l=0}=r||{};n?(this.id=n.id||"",this.scale=1,this.layers=n.layers,this.points=V([1,s,l,s+n.width,l+n.height]),this.worldPoints=V([1,s,l,s+n.width,l+n.height]),this.filteredPointsBuffer=V(n.layers.length*5)):(this.id="",this.scale=1,this.layers=[],this.points=V(5),this.worldPoints=V(5),this.filteredPointsBuffer=V(5))}static createWithProps(n){let r=new e;return r.applyProps(n),r}applyProps(n){let r=n.x||0,s=n.y||0;this.id=n.id;let l=typeof n.scale<"u"?n.scale:this.scale;this.points[0]=1,this.points[1]=r,this.points[2]=s,this.points[3]=r+n.width,this.points[4]=s+n.height,this.rotation=n.rotation||0,this.worldPoints[3]=this.worldPoints[1]+n.width,this.worldPoints[4]=this.worldPoints[2]+n.height,n.scale&&n.scale!==1&&this.atScale(l),this.scale=l}appendChild(n){n.points[0]===0&&n.points.set(this.points),n.__owner.value=this,this.addLayers([n])}removeChild(n){this.layers=this.layers.filter(r=>r!==n),this.filteredPointsBuffer=V(this.layers.length*5)}insertBefore(n,r){let s=this.layers.indexOf(r);if(s===-1||this.layers.indexOf(n)!==-1)return;let l=this.layers.slice(0,s),u=this.layers.slice(s);this.layers=[...l,n,...u]}hideInstance(){console.warn("hideInstance: not yet implemented")}getObjectsAt(n,r){if(this.rotation&&(n=this.applyRotation(n)),Ur(this.points,n,this.filteredPointsBuffer)[0]===0)return[];let l=this.layers.length,u=[];for(let h=0;h<l;h++){let f=this.layers[h];if(r&&f.isShape){let m=Gt(f.points,Re(this.x,this.y));if(!f.intersects([n[1]-m[1],n[2]-m[2]]))continue}if(Ur(Gt(f.points,Re(this.x,this.y)),n,this.filteredPointsBuffer)[0]!==0&&u.push(f),r){let m=f;u.push(...m.getObjectsAt(n,r))}}return u}applyRotation(n){if(this.rotation){let r={x:n[1],y:n[2]},s={x:n[1],y:n[4]},l={x:n[3],y:n[2]},u={x:n[3],y:n[4]},h=this.points[1]+(this.points[3]-this.points[1])/2,f=this.points[2]+(this.points[4]-this.points[2])/2,[g,m]=Na(h,f,r.x,r.y,this.rotation),[S,E]=Na(h,f,s.x,s.y,this.rotation),[P,k]=Na(h,f,l.x,l.y,this.rotation),[R,A]=Na(h,f,u.x,u.y,this.rotation),x=Math.min(g,S,P,R),w=Math.max(g,S,P,R),_=Math.min(m,E,k,A),L=Math.max(m,E,k,A);return V([n[0],x,_,w,L])}return n}getAllPointsAt(n,r,s){let l=At(Re(this.x,this.y),Qt(this.scale),this.aggregateBuffer);this.rotation&&(n=this.applyRotation(n));let u=Gg(n,this.points,this.intersectionBuffer),h=this.layers.length,f=[],g=Gt(u,At(Qt(1/this.scale),Re(-this.x,-this.y),this.invertedBuffer)),m=r?At(r,l,this.aggregateBuffer):l,S=s*this.scale;for(let E=0;E<h;E++)f.push(...this.layers[E].getAllPointsAt(g,m,S));return f}addLayers(n){let r=[];for(let s of n)this.layers.indexOf(s)===-1&&(r.push(s),s.points.length===5&&(s.points[1]<this.worldPoints[1]/this.scale||s.points[2]<this.worldPoints[2]/this.scale||s.points[3]>this.worldPoints[3]/this.scale||s.points[4]>this.worldPoints[4]/this.scale)&&(s.crop=s.crop||V([1,Math.max(this.worldPoints[1]/this.scale,s.points[1]),Math.max(this.worldPoints[2]/this.scale,s.points[2]),Math.min(this.worldPoints[3]/this.scale,s.points[3]),Math.min(this.worldPoints[4]/this.scale,s.points[4])])));this.layers=this.layers.concat(r),this.filteredPointsBuffer=V(this.layers.length*5)}getScheduledUpdates(n,r){let s=this.layers.length;this._updatedList=[];let l=r*this.scale;for(let u=0;u<s;u++){let h=this.layers[u].getScheduledUpdates(n,l);h&&this._updatedList.push(...h)}return this._updatedList}};var hn=class e extends Ae{constructor(n=0,r=0,s=100,l="left-to-right"){super();v(this,"id","world");v(this,"_width");v(this,"_height");v(this,"aspectRatio");v(this,"viewingDirection");v(this,"aggregateBuffer",V(9));v(this,"isDirty",!1);v(this,"zones",[]);v(this,"filteredPointsBuffer");v(this,"selectedZone");v(this,"triggerQueue",[]);v(this,"activatedEvents",[]);v(this,"_updatedList",[]);v(this,"translationBuffer",V(9));v(this,"needsRecalculate",!0);v(this,"emptyPaintables",[]);v(this,"renderOrder",[]);v(this,"points");v(this,"objects",[]);v(this,"subscriptions",[]);v(this,"_propagateEventTargets",[]);v(this,"_alreadyFlushed",[]);this._width=n,this._height=r,this.aspectRatio=Number.isNaN(n/r)?1:n/r,this.viewingDirection=l,this.points=V(s*5),this.filteredPointsBuffer=V(s*5)}get x(){return 0}get y(){return 0}get width(){return this._width}get height(){return this._height}static withProps(n){let r=new e;return r.applyProps(n),r}applyProps(n){typeof n.width<"u"&&typeof n.height<"u"&&(n.width!==this._width||n.height!==this._height)&&this.resize(n.width,n.height),n.viewingDirection!==this.viewingDirection&&(this.viewingDirection=n.viewingDirection,this.triggerRepaint())}propagateTouchEvent(n,r,s){let l=[];for(let u of s)if(u.x&&u.y){let h=ee.singleBox(1,1,u.x,u.y);l.push(this.getObjectsAt(h,!0).reverse())}return l.map(u=>this.propagateEvent(n,r,u,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(n,r,s,l,u={}){let h=ee.singleBox(1,1,s,l),f=this.getObjectsAt(h,!0).reverse();return this.propagateEvent(n,r,f,u)}propagateEvent(n,r,s,{bubbles:l=!1,cancelable:u=!1}={}){r.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let h=!1;r.stopPropagation=()=>{h=!0};let f=s.length;for(let S=f-1;S>=0;S--){this._propagateEventTargets.unshift(s[S][0]);let E=s[S][1].length;if(E)for(let P=0;P<E;P++)this._propagateEventTargets.unshift(s[S][1][P])}let g=this._propagateEventTargets.length,m=!1;for(let S=0;S<g&&(r.atlasTarget=this._propagateEventTargets[S],r.atlasWorld=this,m=this._propagateEventTargets[S].dispatchEvent(n,r)||m,!h);S++);return m&&this.triggerRepaint(),this._propagateEventTargets}appendChild(n){let r=this.appendWorldObject(n);this.renderOrder.push(r/5)}removeChild(n){let r=this.objects.indexOf(n);if(r===-1){for(let s of this.objects)if(s&&s.id===n.id){this.removeChild(s);return}return}this.objects[r]=null,this.renderOrder=this.renderOrder.filter(s=>s!==r),this.points[r*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(n,r){let s=this.objects.indexOf(r);if(s===-1)return;let l=this.appendWorldObject(n);this.renderOrder.splice(s-1,0,l/5)}hideInstance(){}asWorldObject(){return null}addZone(n){this.zones.push(n)}selectZone(n){if(typeof n=="string"){let r=this.zones.length;for(let s=0;s<r;s++)if(this.zones[s].id===n){this.selectedZone=s,this.trigger("zone-changed");return}}else this.zones[n]&&(this.selectedZone=n,this.trigger("zone-changed"))}deselectZone(){this.selectedZone=void 0}getActiveZone(){if(this.selectedZone)return this.zones[this.selectedZone]}hasActiveZone(){return typeof this.selectedZone<"u"}checkResizeInternalBuffer(){if(Xg(this.points)===this.objects.length){let n=this.points,r=V(this.points.length*2);r.set(n,0),this.points=r}}appendWorldObject(n){this.checkResizeInternalBuffer();let r=this.objects.length*5,s=n.points;return n.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),n.points[1]=s[1],n.points[2]=s[2],n.points[3]=s[3],n.points[4]=s[4],this.objects.push(n),this.filteredPointsBuffer=V(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),r}recalculateWorldSize(){let n=!1;if(this.needsRecalculate){let r=new Int32Array(this.objects.length),s=new Int32Array(this.objects.length),l=this.renderOrder.length;for(let f=0;f<l;f++){let g=this.renderOrder[f];this.objects[g]&&(r[f]=this.points[g*5+3],s[f]=this.points[g*5+4])}let u=Math.max(...r);u!==this._width&&(this._width=u,n=!0);let h=Math.max(...s);h!==this._height&&(this._height=h,n=!0),n&&this.trigger("recalculate-world-size",{width:u,height:h}),this.needsRecalculate=!1}return n}addObjectAt(n,r){r.width&&!r.height?r.height=r.width/n.width*n.height:r.height&&!r.width&&(r.width=r.height/n.height*n.width),(!r||!r.width||!r.height)&&(r.width=n.width,r.height=n.height);let{width:s,x:l,y:u}=r,h=s/n.width;this.checkResizeInternalBuffer(),this.points.set(ee.singleBox(n.width,n.height,0,0),this.objects.length*5);let f=new Zn(n);return f.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(f),this.scaleWorldObject(this.objects.length-1,h),this.translateWorldObject(this.objects.length-1,l,u),this.filteredPointsBuffer=V(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,f}scaleWorldObject(n,r){_t(this.points.subarray(n*5,n*5+5),vr(r,this.points[n*5+1],this.points[n*5+2]));let s=this.objects[n];s&&(s.atScale(r),this.triggerRepaint())}translateWorldObject(n,r,s){_t(this.points.subarray(n*5,n*5+5),Re(r,s));let l=this.objects[n];l&&(l.translate(r,s),this.triggerRepaint())}resize(n,r){return this._width=n,this._height=r,this.aspectRatio=n/r,this.triggerRepaint(),this}getObjects(){return this.objects}getPoints(){return this.points}getPointsFromViewer(n,r){let s=ee.singleBox(n.width,n.height,n.x,n.y);return this.getPointsAt(s,r,n.scale)}addLayoutSubscriber(n){return this.subscriptions.push(n),()=>{this.subscriptions.splice(this.subscriptions.indexOf(n),1)}}getScheduledUpdates(n,r){let s=Ur(this.points,n,this.filteredPointsBuffer),l=this.objects.length;this._updatedList=[];for(let u=0;u<l;u++)if(s[u*5]!==0){if(!this.objects[u])continue;this._updatedList.push(...this.objects[u].getScheduledUpdates(n,r))}return this._updatedList}getObjectsAt(n,r=!1){let s=this.getActiveZone(),l=Ur(this.points,n,this.filteredPointsBuffer),u=this.renderOrder.length,h=[];for(let f=0;f<u;f++){let g=this.renderOrder[f];if(l[g*5]!==0){let m=this.objects[g];if(!m||s&&s.objects.indexOf(m)===-1)continue;if(m.type!=="world-object"){h.push([m,[m]]);continue}r?h.push([m,m.getObjectsAt(n,r)]):h.push([m,this.emptyPaintables])}}return h}getPointsAt(n,r,s=1){let l=this.getObjectsAt(n),u=At(Qt(s),Re(-n[1],-n[2]),this.translationBuffer),h=r?At(r,u,this.aggregateBuffer):u,f=l.length,g=[];for(let m=0;m<f;m++)l[m]&&g.push(...l[m][0].getAllPointsAt(n,h,s));return g}flushSubscriptions(){if(this.triggerQueue.length){this._alreadyFlushed=[];let n=this.triggerQueue.length;for(let r=0;r<n;r++){if(this._alreadyFlushed.indexOf(this.triggerQueue[r][0])!==-1)continue;typeof this.triggerQueue[r][1]>"u"&&this._alreadyFlushed.push(this.triggerQueue[r][0]);let s=this.subscriptions.length;for(let l=0;l<s;l++)this.subscriptions[l].apply(null,this.triggerQueue[r])}this.triggerQueue=[]}}trigger(n,r){this.triggerQueue.push([n,r])}triggerEventActivation(){this.trigger("event-activation")}triggerRepaint(){this.trigger("repaint")}gotoRegion(n){this.trigger("goto-region",n)}goHome(n=!1){this.trigger("go-home",{immediate:n})}zoomTo(n,r,s){this.trigger("zoom-to",{point:r,factor:n,stream:s})}zoomIn(n){this.trigger("zoom-to",{point:n,factor:.5})}zoomOut(n){this.trigger("zoom-to",{point:n,factor:2})}constraintBounds(n){this.trigger("constrain-bounds",{immediate:n})}};function cE(e){let{src:t,target:n}=e,r=n?n.width:e.width,s=n?n.height:e.height;return new Zn({id:t,height:s,width:r,layers:[Ge.fromImage(t,{height:s,width:r},{width:e.width,height:e.height})]})}var dE={margin:0},Jd=class{constructor(t,n={}){v(this,"id");v(this,"config");v(this,"points");v(this,"objects");this.id=t.map(r=>r.id).join("$$"),this.config={...dE,...n},this.points=V(5),this.objects=t,this.recalculateBounds()}recalculateBounds(){this.points.set([1,Math.min(...this.objects.map(t=>t.points[1]))-this.config.margin,Math.min(...this.objects.map(t=>t.points[2]))-this.config.margin,Math.max(...this.objects.map(t=>t.points[3]))+this.config.margin,Math.max(...this.objects.map(t=>t.points[4]))+this.config.margin])}getPointsAt(t,n,r){return[]}};var Oa=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,Fa={},hE=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"],Rn=class extends Ae{constructor(){super();v(this,"id");v(this,"type","spacial-content");v(this,"points");v(this,"hoverEvents",!1);v(this,"activeEvents",!1);v(this,"display",{x:0,y:0,scale:1,width:-1,height:-1,points:V(5)});v(this,"_parsed",{border:{id:null,match:[]},outline:{id:null,match:[]}});v(this,"hovering");v(this,"pressing");v(this,"props",{});v(this,"addHover",()=>{this.hovering=!0,this.__revision++});v(this,"removeHover",()=>{this.hovering=!1,this.pressing=!1,this.__revision++});v(this,"addPress",()=>{this.pressing=!0,this.__revision++});v(this,"removePress",()=>{this.pressing=!1,this.__revision++});this.id=Yn(12),this.points=V(5)}getAllPointsAt(n,r){return[[this,this.points,r]]}applyProps(n={}){let r=!1;if(n.interactive!==this.props.interactive&&(r=!0,this.props.interactive=n.interactive),n.style){let s=n.border||n.style.border;if(s!==this._parsed.border.id)if(!s)this._parsed.border.id=null,this._parsed.border.match=[];else{let l=Fa[s]||Oa.exec(s)||Oa.exec(s);l&&(this._parsed.border.id=s,this._parsed.border.match=Fa[s]=l)}if(this._parsed.border.id&&(n.style.borderWidth=this._parsed.border.match[1],n.style.borderStyle="solid",n.style.borderColor=this._parsed.border.match[4]),n.style.outline!==this._parsed.outline.id)if(!n.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let l=Fa[n.style.outline]||Oa.exec(n.style.outline)||Oa.exec(n.style.outline);l&&(this._parsed.outline.id=n.style.outline,this._parsed.outline.match=Fa[n.style.outline]=l)}this._parsed.outline.id&&(n.style.outlineWidth=this._parsed.outline.match[1],n.style.outlineStyle="solid",n.style.outlineColor=this._parsed.outline.match[4]),this.props.style=n.style,n.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.backgroundColor,r=!0),n.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.style.background,r=!0);for(let l of hE)if(this.props.style[l]!==n.style[l]){r=!0;break}n.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=n.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),r=!0),n.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=n.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0)}n.href!==this.props.href&&(this.props.href=n.href,r=!0),n.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=n.hrefTarget,r=!0),n.title!==this.props.title&&(this.props.title=n.title,r=!0),n.className!==this.props.className&&(this.props.className=n.className,n.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0),n.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=n.relativeSize,r=!0),n.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=n.relativeStyle,r=!0),n.html!==this.props.html&&(this.props.html=n.html,r=!0),n.target&&(n.target.width!==this.display.width||n.target.height!==this.display.height||n.target.x!==this.points[1]||n.target.y!==this.points[2])&&(r=!0,this.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.width=n.target.width,this.display.height=n.target.height),r&&this.__revision++}};var yr=class extends Ae{constructor(){super();v(this,"type","spacial-content");v(this,"id");v(this,"points");v(this,"color","#000");v(this,"backgroundColor");v(this,"hovering");v(this,"pressing");v(this,"text","");v(this,"display",{x:0,y:0,scale:1,width:100,height:100,points:V(5)});v(this,"className");v(this,"html");v(this,"interactive",!1);v(this,"props",{font:"18px Arial, sans-serif",lineHeight:1,textAlign:"left",verticalAlign:"top",paddingX:0,paddingY:0,fitParent:!1,lineBreak:"auto",strokeText:!1,sizeToFill:!1,maxFontSizeToFill:void 0,allowNewLine:!0,justifyLines:!1,renderHDPI:!1,textDecoration:"none",interactive:!1,relativeSize:!1});this.id="",this.points=V(5)}getAllPointsAt(n,r){return[[this,this.points,r]]}applyProps({id:n,target:r,text:s,color:l,backgroundColor:u,fontSize:h=18,interactive:f,fontFamily:g="Arial, sans-serif",...m}){m.font=`${h}px ${g}`,this.interactive=f||!1,typeof s<"u"&&(this.text=s||""),l&&(this.color=l),u&&(this.backgroundColor=u),n&&(this.id=n),r&&(this.points=ee.singleBox(r.width,r.height,r.x,r.y),this.display.points=this.points,this.display.width=r.width,this.display.height=r.height),this.props={...this.props,...m},this.__revision++}};var ze=Math.pow,Ma=Math.sqrt,Ts=Math.sin,$g=Math.cos,zs=Math.PI,Da=1.70158,Aa=Da*1.525,qg=Da+1,Jg=2*zs/3,ev=2*zs/4.5,Rs=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},zn={linear:e=>e,easeInQuad:function(e){return e*e},easeOutQuad:function(e){return 1-(1-e)*(1-e)},easeInOutQuad:function(e){return e<.5?2*e*e:1-ze(-2*e+2,2)/2},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1-ze(1-e,3)},easeInOutCubic:function(e){return e<.5?4*e*e*e:1-ze(-2*e+2,3)/2},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1-ze(1-e,4)},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-ze(-2*e+2,4)/2},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1-ze(1-e,5)},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1-ze(-2*e+2,5)/2},easeInSine:function(e){return 1-$g(e*zs/2)},easeOutSine:function(e){return Ts(e*zs/2)},easeInOutSine:function(e){return-($g(zs*e)-1)/2},easeInExpo:function(e){return e===0?0:ze(2,10*e-10)},easeOutExpo:function(e){return e===1?1:1-ze(2,-10*e)},easeInOutExpo:function(e){return e===0?0:e===1?1:e<.5?ze(2,20*e-10)/2:(2-ze(2,-20*e+10))/2},easeInCirc:function(e){return 1-Ma(1-ze(e,2))},easeOutCirc:function(e){return Ma(1-ze(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-Ma(1-ze(2*e,2)))/2:(Ma(1-ze(-2*e+2,2))+1)/2},easeInBack:function(e){return qg*e*e*e-Da*e*e},easeOutBack:function(e){return 1+qg*ze(e-1,3)+Da*ze(e-1,2)},easeInOutBack:function(e){return e<.5?ze(2*e,2)*((Aa+1)*2*e-Aa)/2:(ze(2*e-2,2)*((Aa+1)*(e*2-2)+Aa)+2)/2},easeInElastic:function(e){return e===0?0:e===1?1:-ze(2,10*e-10)*Ts((e*10-10.75)*Jg)},easeOutElastic:function(e){return e===0?0:e===1?1:ze(2,-10*e)*Ts((e*10-.75)*Jg)+1},easeInOutElastic:function(e){return e===0?0:e===1?1:e<.5?-(ze(2,20*e-10)*Ts((20*e-11.125)*ev))/2:ze(2,-20*e+10)*Ts((20*e-11.125)*ev)/2+1},easeInBounce:function(e){return 1-Rs(1-e)},easeOutBounce:Rs,easeInOutBounce:function(e){return e<.5?(1-Rs(1-2*e))/2:(1+Rs(2*e-1))/2}};var Wa=class{constructor(t){v(this,"runtime");v(this,"pendingTransition");v(this,"lastZoomTo",null);v(this,"isConstraining",!1);v(this,"lastGoToRegion",null);this.runtime=t,this.pendingTransition={from:V(5),to:V(5),elapsed_time:0,done:!0,total_time:0,timingFunction:zn.easeInOutQuad,constrain:!1}}hasPending(){return!this.pendingTransition.done}getPendingTransition(){return this.pendingTransition}getPendingFrom(){return this.pendingTransition.from}customTransition(t){t(this.pendingTransition)}stopTransition(){this.pendingTransition.from=V(this.runtime.target),this.pendingTransition.to=V(this.runtime.target),this.pendingTransition.done=!0,this.pendingTransition.elapsed_time=0,this.pendingTransition.total_time=0}runTransition(t,n){if(!this.pendingTransition.done){let r=this.pendingTransition,s=r.total_time===0?0:(r.elapsed_time+n)/r.total_time,l=r.total_time===0?1:s===0?0:r.timingFunction(s);t[1]=r.from[1]+(r.to[1]-r.from[1])*l,t[2]=r.from[2]+(r.to[2]-r.from[2])*l,t[3]=r.from[3]+(r.to[3]-r.from[3])*l,t[4]=r.from[4]+(r.to[4]-r.from[4])*l,this.pendingTransition.elapsed_time+=n,this.pendingTransition.elapsed_time>=this.pendingTransition.total_time&&(this.pendingTransition.done=!0,this.pendingTransition.callback?.(),this.pendingTransition.constrain&&this.constrainBounds({transition:{duration:this.pendingTransition.total_time===0?0:500,easing:zn.easeOutExpo}}))}}resumeTransition(){this.lastZoomTo&&this.zoomTo(this.lastZoomTo.factor,this.lastZoomTo.options),this.isConstraining&&this.constrainBounds(),this.lastGoToRegion&&this.goToRegion(this.lastGoToRegion.target,this.lastGoToRegion.options)}zoomTo(t,n={}){let{origin:r,stream:s=!1,transition:l}=n;this.lastZoomTo={factor:t,options:n};let u=this.runtime.getZoomedPosition(t,{origin:r}),h=Math.abs(1-t);this.applyTransition(u,l,{duration:2e3*h,easing:zn.easeOutExpo,constrain:!0,callback:()=>{this.lastZoomTo=null}},{stream:!1})}constrainBounds({transition:t,panPadding:n=0}={}){this.isConstraining=!0;let[r,s]=this.runtime.constrainBounds(this.runtime.target,{panPadding:n});r&&(this.applyTransition(s,t,{duration:500,easing:zn.easeOutQuart,constrain:!1,callback:()=>{this.isConstraining=!1}}),this.runtime.updateNextFrame())}applyTransition(t,n,r,{stream:s}={}){this.pendingTransition.from=V(this.runtime.target),this.pendingTransition.to=t,s||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=typeof n?.duration<"u"?n.duration:typeof r?.duration<"u"?r.duration:1e3,this.pendingTransition.constrain=typeof n?.constrain<"u"?n.constrain:typeof r?.constrain<"u"?r.constrain:!1,this.pendingTransition.timingFunction=n?.easing||r?.easing||zn.easeInOutSine}goToRegion(t,{transition:n}={}){this.lastGoToRegion={target:t,options:{transition:n}};let r=this.runtime.clampRegion(t);this.applyTransition(ee.singleBox(r.width,r.height,r.x,r.y),n,{duration:1e3,easing:zn.easeOutExpo,constrain:!0,callback:()=>{this.lastGoToRegion=null}}),this.runtime.updateNextFrame()}};var MC=Number.MIN_VALUE+1,Kn=class{constructor(t,n,r,s=[],l){v(this,"id",Yn());v(this,"ready",!1);v(this,"renderer");v(this,"world");v(this,"target");v(this,"homePosition");v(this,"manualHomePosition");v(this,"manualFocalPosition");v(this,"focalPosition");v(this,"transitionManager");v(this,"aggregate");v(this,"transformBuffer",V(500));v(this,"lastTarget",V(5));v(this,"zoomBuffer",V(5));v(this,"logNextRender",!1);v(this,"pendingUpdate",!0);v(this,"isCommitting",!1);v(this,"firstRender",!0);v(this,"lastTime");v(this,"stopId");v(this,"mode","explore");v(this,"controllers",[]);v(this,"controllersRunning",!1);v(this,"controllerStopFunctions",[]);v(this,"maxScaleFactor",1);v(this,"_viewerToWorld",{x:0,y:0});v(this,"_lastGoodScale",1);v(this,"hooks",{useFrame:[],useBeforeFrame:[],useAfterPaint:[],useAfterFrame:[]});v(this,"fpsLimit");v(this,"options");v(this,"hookOptions",{filters:{grayscale:0,contrast:0,brightness:0,saturate:0,sepia:0,invert:0,hueRotate:0,blur:0}});v(this,"_viewport",{x:0,y:0,width:0,height:0});v(this,"setViewport",t=>{let n=Math.round(typeof t.x>"u"?this.target[1]:t.x),r=Math.round(typeof t.y>"u"?this.target[2]:t.y);t.width?this.target[3]=n+t.width:this.target[3]=this.target[3]-this.target[1]+n,t.height?this.target[4]=r+t.height:this.target[4]=this.target[4]-this.target[2]+r,Math.abs(this.target[1]-n)>.01&&(this.target[1]=n),Math.abs(this.target[2]-r)>.01&&(this.target[2]=r),this.pendingUpdate=!0});v(this,"render",t=>{let n=t-this.lastTime;if(this.isCommitting||this.fpsLimit&&n<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=t,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook("useFrame",n);let r=this.pendingUpdate,s=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,n),this.pendingUpdate=!0,this.updateControllerPosition()),!this.firstRender&&!r&&!s&&this.target[0]===this.lastTarget[0]&&this.target[1]===this.lastTarget[1]&&this.target[2]===this.lastTarget[2]&&this.target[3]===this.lastTarget[3]&&this.target[4]===this.lastTarget[4])return;this.hook("useBeforeFrame",n),this.renderer.beforeFrame(this.world,n,this.target,this.hookOptions);let l=this.getScaleFactor(),u=this.renderer.getPointsAt(this.world,this.target,this.aggregate,l),h=u.length;for(let m=0;m<h;m++){let S=u[m][0],E=u[m][1],P=u[m][2],k=P?Gt(E,P,this.transformBuffer):E;this.renderer.prepareLayer(S,S.__parent&&P?Gt(S.__parent.crop||S.__parent.points,P):k);let R=k.length/5;for(let A=0;A<R;A++){let x=A*5;k[x]!==0&&(this.renderer.paint(S,A,k[x+1],k[x+2],k[x+3]-k[x+1],k[x+4]-k[x+2]),this.hook("useAfterPaint",S))}this.renderer.finishLayer(S,E)}this.renderer.afterFrame(this.world,n,this.target,this.hookOptions),this.hook("useAfterFrame",n),this.lastTarget[0]=this.target[0],this.lastTarget[1]=this.target[1],this.lastTarget[2]=this.target[2],this.lastTarget[3]=this.target[3],this.lastTarget[4]=this.target[4],this.firstRender=!1,this.pendingUpdate=!1,this.logNextRender=!1,this.renderer.isReady()&&(this.ready=!0,this.world.trigger("ready")),this.world.flushSubscriptions();let f=this.world.getScheduledUpdates(this.target,l),g=f.length;if(g>0)for(let m=0;m<g;m++){let S=f[g-m-1]();S?S.then(()=>{this.pendingUpdate=!0}):this.pendingUpdate=!0}});this.renderer=t,this.world=n,this.options={maxOverZoom:1,maxUnderZoom:1,visibilityRatio:1.5,...l||{}},this.target=ee.projection(r),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=ee.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new Wa(this),this.aggregate=Qt(1),this.world.addLayoutSubscriber(u=>{u==="repaint"&&(this.pendingUpdate=!0),u==="recalculate-world-size"&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=s,this.render(this.lastTime),this.startControllers()}get x(){return this.target[1]}set x(t){this.target[1]=t}get y(){return this.target[2]}set y(t){this.target[2]=t}get x2(){return this.target[3]}set x2(t){this.target[3]=t}get y2(){return this.target[4]}set y2(t){this.target[4]=t}get width(){return this.target[3]-this.target[1]}set width(t){this.target[3]=this.target[1]+t}get height(){return this.target[4]-this.target[2]}set height(t){this.target[4]=this.target[2]=t}setHomePosition(t){this.homePosition.set(ee.projection(t||this.world)),this.pendingUpdate=!0}startControllers(){if(!this.controllersRunning){for(let t of this.controllers)this.controllerStopFunctions.push(t.start(this));this.controllersRunning=!0}}stopControllers(){if(this.controllersRunning){for(let t of this.controllerStopFunctions)t();this.controllersRunning=!1,this.controllerStopFunctions=[]}}updateControllerPosition(){for(let t of this.controllers)t.updatePosition(this.x,this.y,this.width,this.height)}triggerResize(){this.renderer.triggerResize&&this.renderer.triggerResize(),this.pendingUpdate=!0}addController(t){this.controllers.push(t),this.controllersRunning&&t.start(this),this.pendingUpdate=!0}cover(){return this.goHome({cover:!0})}getRendererScreenPosition(){return this.renderer.getRendererScreenPosition()}updateRendererScreenPosition(){this.pendingUpdate=!0,this.renderer.resize()}setOptions(t){this.options={...this.options,...t}}goHome(t={}){if(this.world.width<=0||this.world.height<=0)return;let n=this.getScaleFactor(),r=t.position?{x:t.position[1],y:t.position[2],width:t.position[3]-t.position[1],height:t.position[4]-t.position[2]}:{x:this.homePosition[1],y:this.homePosition[2],width:this.homePosition[3]-this.homePosition[1],height:this.homePosition[4]-this.homePosition[2]},s=this.width*n,l=this.height*n,u=r.width/s,h=r.height/l,f=s/l;if(t.cover?u>h:u<h){let g=f*r.height,m=(g-r.width)/2;this.target[1]=Math.round(-m+r.x),this.target[2]=Math.round(r.y),this.target[3]=Math.round(g-m+r.x),this.target[4]=Math.round(r.height+r.y)}else{let g=r.width/f,m=(g-r.height)/2;this.target[1]=Math.round(r.x),this.target[2]=Math.round(r.y-m),this.target[3]=Math.round(r.x+r.width),this.target[4]=Math.round(r.y+g-m)}this.constrainBounds(this.target),this.updateControllerPosition()}resize(t,n,r,s){this.transitionManager.hasPending()&&this.transitionManager.stopTransition(),this.updateFocalPosition(t-n,r-s);let l=n/t,u=s/r;this.target[3]=this.target[1]+(this.target[3]-this.target[1])*l,this.target[4]=this.target[2]+(this.target[4]-this.target[2])*u,this.goHome({position:this.focalPosition}),this.renderer.resize(n,s),this.pendingUpdate=!0,this.transitionManager.resumeTransition()}updateFocalPosition(t,n){if(!this.manualFocalPosition){let r=this.width,s=this.height,l=Math.min(r,s),u=0,h=0,f=this.x+u,g=this.y+h;if(r<s){let m=this.height-this.width;this.focalPosition=ee.projection({x:f,y:g+m/2,width:l-u*2,height:l-h*2}),this.pendingUpdate=!0}else{let m=this.width-this.height;this.focalPosition=ee.projection({x:f+m/2,y:g,width:l-u*2,height:l-h*2}),this.pendingUpdate=!0}}}getViewport(){return this._viewport.x=this.target[1],this._viewport.y=this.target[2],this._viewport.width=this.target[3]-this.target[1],this._viewport.height=this.target[4]-this.target[2],this._viewport}constrainBounds(t,{panPadding:n=0,ref:r=!1}={}){let{minX:s,maxX:l,minY:u,maxY:h}=this.getBounds({target:t,padding:n}),f=!1,g=r?t:V(t),m=Math.round(t[3]-t[1]),S=Math.round(t[4]-t[2]);return s>t[1]&&(f=!0,g[1]=s,g[3]=s+m),u>t[2]&&(f=!0,g[2]=u,g[4]=u+S),l<t[1]&&(f=!0,g[1]=l,g[3]=l+m),h<t[2]&&(f=!0,g[2]=h,g[4]=h+S),[f,g]}getBounds(t){let n=t.target||this.target,r=t.padding,s=this.options.visibilityRatio,l=Math.abs(1-s);if(this.world.hasActiveZone()){let w=this.world.getActiveZone();if(w){let _=n[3]-n[1]<w.points[3]-w.points[1],L=n[4]-n[2]<w.points[4]-w.points[2];return{minX:_?w.points[1]-r:w.points[1]+(w.points[3]-w.points[1])/2-(n[3]-n[1])/2,maxX:L?w.points[2]-r:w.points[2]+(w.points[4]-w.points[2])/2-(n[4]-n[2])/2,minY:_?w.points[3]+r:w.points[1]+(w.points[3]-w.points[1])/2-(n[3]-n[1])/2,maxY:L?w.points[4]+r:w.points[2]+(w.points[4]-w.points[2])/2-(n[4]-n[2])/2}}}let u=n[3]-n[1],h=this.world.width,f=-u*l,g=h-u-f,m=n[4]-n[2],S=this.world.height,E=-m*l,P=S-m-E,k=Math.round(Math.max(f,g)),R=Math.round(Math.min(f,g)),A=Math.round(Math.max(E,P)),x=Math.round(Math.min(E,P));return{minX:R,maxX:k,minY:x,maxY:A}}getScaleFactor(t=!1){let n=this.renderer.getScale(this.target[3]-this.target[1],this.target[4]-this.target[2],t);return n===0?this._lastGoodScale:(this._lastGoodScale=n,n)}getZoomedPosition(t,{origin:n,fromPos:r}){let s=r?{width:r[3]-r[1],height:r[4]-r[2]}:void 0,l=s?this.renderer.getScale(s.width,s.height):this.getScaleFactor(),u=s?s.width:this.width,h=s?s.height:this.height,f=this.getRendererScreenPosition()?.width,g=this.world.width,m=f?f/g:1,S=this.options.maxUnderZoom,E=Math.max(m||1,this.options.maxOverZoom),P=1/t,k=l*P;if(P<1){let x=u*l,w=h*l,_=this.world.width/x,L=this.world.height/w;if(_>L){let O=this.world.width*k,D=~~(u*l)*S;O<D&&(t=this.world.width*l/(u*l*S))}else{let O=this.world.height*k,D=~~(h*l)*S;O<D&&(t=this.world.height*l/(h*l*S))}}else k>E&&(t=l/E);let A=Gt(this.target,vr(t,n?n.x:this.target[1]+(this.target[3]-this.target[1])/2,n?n.y:this.target[2]+(this.target[4]-this.target[2])/2),this.zoomBuffer);return this.constrainBounds(A,{ref:!0,panPadding:100}),A}clampRegion({x:t,y:n,width:r,height:s,padding:l=0}){let u=this.width,h=this.height,f=r/u<s/h,g=t-l,m=n-l,S=r+l*2,E=s+l*2;if(f){let k=E/h*u;return{x:g-(k-S)/2,y:m,width:k,height:E}}let P=S/u*h;return{x:g,y:m-(P-E)/2,width:S,height:P}}viewerToWorld(t,n){let r=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+t/r,this._viewerToWorld.y=this.target[2]+n/r,this._viewerToWorld}worldToViewer(t,n,r,s){let l=ee.singleBox(r,s,t,n);return _t(l,At(Qt(this.getScaleFactor()),Re(-this.target[1],-this.target[2]))),{x:l[1],y:l[2],width:l[3]-l[1],height:l[4]-l[2],strand:l}}setScale(t,n){_t(this.target,vr(t,n?n.x:this.target[1]+(this.target[3]-this.target[1])/2,n?n.y:this.target[2]+(this.target[4]-this.target[2])/2)),this.pendingUpdate=!0}syncTo(t){let n=this.target;return this.target=t.target,this.pendingUpdate=!0,()=>{this.target=n}}stop(){return typeof this.stopId<"u"&&(window.cancelAnimationFrame(this.stopId),this.stopId=void 0),()=>{this.render(performance.now())}}reset(){this.renderer.reset()}selectZone(t){this.world.selectZone(t),this.pendingUpdate=!0}deselectZone(){this.world.deselectZone(),this.pendingUpdate=!0}hook(t,n){let r=this.hooks[t].length;if(r!==0)for(let s=0;s<r;s++)this.hooks[t][s](n)}registerHook(t,n){return this.hooks[t].push(n),()=>{this.hooks[t]=this.hooks[t].filter(r=>r!==n)}}updateNextFrame(){this.pendingUpdate=!0}};var Ba=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,ja={},fE=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"],Ti=class extends Ae{constructor(){super();v(this,"id");v(this,"type","spacial-content");v(this,"isShape",!0);v(this,"points");v(this,"hoverEvents",!1);v(this,"activeEvents",!1);v(this,"display",{x:0,y:0,scale:1,width:-1,height:-1,points:V(5)});v(this,"boundingBox",null);v(this,"_parsed",{border:{id:null,match:[]},outline:{id:null,match:[]}});v(this,"hovering");v(this,"pressing");v(this,"props",{});v(this,"shape",{type:"none"});v(this,"addHover",()=>{this.hovering=!0,this.__revision++});v(this,"removeHover",()=>{this.hovering=!1,this.pressing=!1,this.__revision++});v(this,"addPress",()=>{this.pressing=!0,this.__revision++});v(this,"removePress",()=>{this.pressing=!1,this.__revision++});this.id=Yn(12),this.points=V(5),this.shape={type:"none"}}updateBoundingBox(){if(this.shape.type==="none")return;let n=this.shape.points;if(this.shape.points.length>2){let r=Math.min(...n.map(h=>h[0])),s=Math.min(...n.map(h=>h[1])),l=Math.max(0,...n.map(h=>h[0])),u=Math.max(0,...n.map(h=>h[1]));this.boundingBox={x:r,y:s,width:l-r,height:u-s};return}this.boundingBox=null}intersects(n){if(!n||this.shape.type==="none")return!1;let[r,s]=n,l=this.shape.points,u=this.boundingBox;if(u||(this.updateBoundingBox(),u=this.boundingBox),!u||r<u.x||r>u.x+u.width||s<u.y||s>u.height+u.y)return!1;let h=!1;for(let f=0,g=l.length-1;f<l.length;g=f++)l[f][1]>s!=l[g][1]>s&&r<(l[g][0]-l[f][0])*(s-l[f][1])/(l[g][1]-l[f][1])+l[f][0]&&(h=!h);return h}getAllPointsAt(n,r){return n[3]-n[1]===1&&n[4]-n[2]===1?this.intersects([n[1],n[2]])?[[this,this.points,r]]:[]:[[this,this.points,r]]}applyProps(n={}){let r=!1;if(n.points)if(this.shape.type!=="polygon"||this.shape.points.length!==n.points.length)this.shape={type:"polygon",points:n.points,open:n.open},this.updateBoundingBox();else{let s=!1,l=n.points.length;for(let u=0;u<l;u++)if(n.points[u][0]!==this.shape.points[u][0]||n.points[u][1]!==this.shape.points[u][1]){s=!0;break}s&&(this.shape={type:"polygon",points:n.points,open:n.open},this.updateBoundingBox())}if(n.interactive!==this.props.interactive&&(r=!0,this.props.interactive=n.interactive),(n.open||n.open===!1)&&(r=!0,this.shape.open=n.open),n.style){let s=n.border||n.style.border;if(s!==this._parsed.border.id)if(!s)this._parsed.border.id=null,this._parsed.border.match=[];else{let l=ja[s]||Ba.exec(s)||Ba.exec(s);l&&(this._parsed.border.id=s,this._parsed.border.match=ja[s]=l)}if(this._parsed.border.id&&(n.style.borderWidth=this._parsed.border.match[1],n.style.borderStyle="solid",n.style.borderColor=this._parsed.border.match[4]),n.style.outline!==this._parsed.outline.id)if(!n.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let l=ja[n.style.outline]||Ba.exec(n.style.outline)||Ba.exec(n.style.outline);l&&(this._parsed.outline.id=n.style.outline,this._parsed.outline.match=ja[n.style.outline]=l)}this._parsed.outline.id&&(n.style.outlineWidth=this._parsed.outline.match[1],n.style.outlineStyle="solid",n.style.outlineColor=this._parsed.outline.match[4]),this.props.style=n.style,n.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.backgroundColor,r=!0),n.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.style.background,r=!0);for(let l of fE)if(this.props.style[l]!==n.style[l]){r=!0;break}n.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=n.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),r=!0),n.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=n.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0)}n.href!==this.props.href&&(this.props.href=n.href,r=!0),n.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=n.hrefTarget,r=!0),n.title!==this.props.title&&(this.props.title=n.title,r=!0),n.className!==this.props.className&&(this.props.className=n.className,n.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0),n.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=n.relativeSize,r=!0),n.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=n.relativeStyle,r=!0),n.html!==this.props.html&&(this.props.html=n.html,r=!0),n.target&&(n.target.width!==this.display.width||n.target.height!==this.display.height||n.target.x!==this.points[1]||n.target.y!==this.points[2])&&(r=!0,this.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.width=n.target.width,this.display.height=n.target.height),r&&this.__revision++}};var Is=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,pE=typeof AbortController=="function",ba=pE?AbortController:class{constructor(){this.signal=new tv}abort(t=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||t,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},mE=typeof AbortSignal=="function",gE=typeof ba.AbortSignal=="function",tv=mE?AbortSignal:gE?ba.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(t){t.type==="abort"&&(this.aborted=!0,this.onabort(t),this._listeners.forEach(n=>n(t),this))}onabort(){}addEventListener(t,n){t==="abort"&&this._listeners.push(n)}removeEventListener(t,n){t==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},rh=new Set,eh=(e,t)=>{let n=`LRU_CACHE_OPTION_${e}`;Ha(n)&&ih(n,`${e} option`,`options.${t}`,vo)},th=(e,t)=>{let n=`LRU_CACHE_METHOD_${e}`;if(Ha(n)){let{prototype:r}=vo,{get:s}=Object.getOwnPropertyDescriptor(r,e);ih(n,`${e} method`,`cache.${t}()`,s)}},vE=(e,t)=>{let n=`LRU_CACHE_PROPERTY_${e}`;if(Ha(n)){let{prototype:r}=vo,{get:s}=Object.getOwnPropertyDescriptor(r,e);ih(n,`${e} property`,`cache.${t}`,s)}},nv=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},Ha=e=>!rh.has(e),ih=(e,t,n,r)=>{rh.add(e);let s=`The ${t} is deprecated. Please use ${n} instead.`;nv(s,"DeprecationWarning",e,r)},Qr=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),rv=e=>Qr(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?go:null:null,go=class extends Array{constructor(t){super(t),this.fill(0)}},nh=class{constructor(t){if(t===0)return[];let n=rv(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},vo=class e{constructor(t={}){let{max:n=0,ttl:r,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:f,dispose:g,disposeAfter:m,noDisposeOnSet:S,noUpdateTTL:E,maxSize:P=0,maxEntrySize:k=0,sizeCalculation:R,fetchMethod:A,fetchContext:x,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:O,ignoreFetchAbort:z}=t,{length:D,maxAge:b,stale:q}=t instanceof e?{}:t;if(n!==0&&!Qr(n))throw new TypeError("max option must be a nonnegative integer");let M=n?rv(n):Array;if(!M)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=P,this.maxEntrySize=k||this.maxSize,this.sizeCalculation=R||D,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=A||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&x!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(n).fill(null),this.valList=new Array(n).fill(null),this.next=new M(n),this.prev=new M(n),this.head=0,this.tail=0,this.free=new nh(n),this.initialFill=1,this.size=0,typeof g=="function"&&(this.dispose=g),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!S,this.noUpdateTTL=!!E,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.maxSize!==0&&!Qr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Qr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!q,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=Qr(s)||s===0?s:1,this.ttlAutopurge=!!l,this.ttl=r||b||0,this.ttl){if(!Qr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let K="LRU_CACHE_UNBOUNDED";Ha(K)&&(rh.add(K),nv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",K,e))}q&&eh("stale","allowStale"),b&&eh("maxAge","ttl"),D&&eh("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new go(this.max),this.starts=new go(this.max),this.setItemTTL=(r,s,l=Is.now())=>{if(this.starts[r]=s!==0?l:0,this.ttls[r]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},s+1);u.unref&&u.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Is.now():0},this.statusTTL=(r,s)=>{r&&(r.ttl=this.ttls[s],r.start=this.starts[s],r.now=t||n(),r.remainingTTL=r.now+r.ttl-r.start)};let t=0,n=()=>{let r=Is.now();if(this.ttlResolution>0){t=r;let s=setTimeout(()=>t=0,this.ttlResolution);s.unref&&s.unref()}return r};this.getRemainingTTL=r=>{let s=this.keyMap.get(r);return s===void 0?0:this.ttls[s]===0||this.starts[s]===0?1/0:this.starts[s]+this.ttls[s]-(t||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||n())-this.starts[r]>this.ttls[r]}updateItemAge(t){}statusTTL(t,n){}setItemTTL(t,n,r){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new go(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,n,r,s)=>{if(this.isBackgroundFetch(n))return 0;if(!Qr(r))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(n,t),!Qr(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.addItemSize=(t,n,r)=>{if(this.sizes[t]=n,this.maxSize){let s=this.maxSize-this.sizes[t];for(;this.calculatedSize>s;)this.evict(!0)}this.calculatedSize+=this.sizes[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.calculatedSize)}}removeItemSize(t){}addItemSize(t,n){}requireSize(t,n,r,s){if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(t){return t!==void 0&&this.keyMap.get(this.keyList[t])===t}*entries(){for(let t of this.indexes())this.valList[t]!==void 0&&this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield[this.keyList[t],this.valList[t]])}*rentries(){for(let t of this.rindexes())this.valList[t]!==void 0&&this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield[this.keyList[t],this.valList[t]])}*keys(){for(let t of this.indexes())this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.keyList[t])}*rkeys(){for(let t of this.rindexes())this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.keyList[t])}*values(){for(let t of this.indexes())this.valList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.valList[t])}*rvalues(){for(let t of this.rindexes())this.valList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.valList[t])}[Symbol.iterator](){return this.entries()}find(t,n){for(let r of this.indexes()){let s=this.valList[r],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;if(l!==void 0&&t(l,this.keyList[r],this))return this.get(this.keyList[r],n)}}forEach(t,n=this){for(let r of this.indexes()){let s=this.valList[r],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;l!==void 0&&t.call(n,l,this.keyList[r],this)}}rforEach(t,n=this){for(let r of this.rindexes()){let s=this.valList[r],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;l!==void 0&&t.call(n,l,this.keyList[r],this)}}get prune(){return th("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(let n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),t=!0);return t}dump(){let t=[];for(let n of this.indexes({allowStale:!0})){let r=this.keyList[n],s=this.valList[n],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;if(l===void 0)continue;let u={value:l};if(this.ttls){u.ttl=this.ttls[n];let h=Is.now()-this.starts[n];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[n]),t.unshift([r,u])}return t}load(t){this.clear();for(let[n,r]of t){if(r.start){let s=Date.now()-r.start;r.start=Is.now()-s}this.set(n,r.value,r)}}dispose(t,n,r){}set(t,n,{ttl:r=this.ttl,start:s,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,status:g}={}){if(u=this.requireSize(t,n,u,h),this.maxEntrySize&&u>this.maxEntrySize)return g&&(g.set="miss",g.maxEntrySizeExceeded=!0),this.delete(t),this;let m=this.size===0?void 0:this.keyMap.get(t);if(m===void 0)m=this.newIndex(),this.keyList[m]=t,this.valList[m]=n,this.keyMap.set(t,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,u,g),g&&(g.set="add"),f=!1;else{this.moveToTail(m);let S=this.valList[m];if(n!==S){if(this.isBackgroundFetch(S)?S.__abortController.abort(new Error("replaced")):l||(this.dispose(S,t,"set"),this.disposeAfter&&this.disposed.push([S,t,"set"])),this.removeItemSize(m),this.valList[m]=n,this.addItemSize(m,u,g),g){g.set="replace";let E=S&&this.isBackgroundFetch(S)?S.__staleWhileFetching:S;E!==void 0&&(g.oldValue=E)}}else g&&(g.set="update")}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),f||this.setItemTTL(m,r,s),this.statusTTL(g,m),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let t=this.valList[this.head];return this.evict(!0),t}}evict(t){let n=this.head,r=this.keyList[n],s=this.valList[n];return this.isBackgroundFetch(s)?s.__abortController.abort(new Error("evicted")):(this.dispose(s,r,"evict"),this.disposeAfter&&this.disposed.push([s,r,"evict"])),this.removeItemSize(n),t&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(t,{updateAgeOnHas:n=this.updateAgeOnHas,status:r}={}){let s=this.keyMap.get(t);if(s!==void 0)if(this.isStale(s))r&&(r.has="stale",this.statusTTL(r,s));else return n&&this.updateItemAge(s),r&&(r.has="hit"),this.statusTTL(r,s),!0;else r&&(r.has="miss");return!1}peek(t,{allowStale:n=this.allowStale}={}){let r=this.keyMap.get(t);if(r!==void 0&&(n||!this.isStale(r))){let s=this.valList[r];return this.isBackgroundFetch(s)?s.__staleWhileFetching:s}}backgroundFetch(t,n,r,s){let l=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(l))return l;let u=new ba;r.signal&&r.signal.addEventListener("abort",()=>u.abort(r.signal.reason));let h={signal:u.signal,options:r,context:s},f=(P,k=!1)=>{let{aborted:R}=u.signal,A=r.ignoreFetchAbort&&P!==void 0;return r.status&&(R&&!k?(r.status.fetchAborted=!0,r.status.fetchError=u.signal.reason,A&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),R&&!A&&!k?m(u.signal.reason):(this.valList[n]===E&&(P===void 0?E.__staleWhileFetching?this.valList[n]=E.__staleWhileFetching:this.delete(t):(r.status&&(r.status.fetchUpdated=!0),this.set(t,P,h.options))),P)},g=P=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=P),m(P)),m=P=>{let{aborted:k}=u.signal,R=k&&r.allowStaleOnFetchAbort,A=R||r.allowStaleOnFetchRejection,x=A||r.noDeleteOnFetchRejection;if(this.valList[n]===E&&(!x||E.__staleWhileFetching===void 0?this.delete(t):R||(this.valList[n]=E.__staleWhileFetching)),A)return r.status&&E.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw P},S=(P,k)=>{this.fetchMethod(t,l,h).then(R=>P(R),k),u.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(P(),r.allowStaleOnFetchAbort&&(P=R=>f(R,!0)))})};r.status&&(r.status.fetchDispatched=!0);let E=new Promise(S).then(f,g);return E.__abortController=u,E.__staleWhileFetching=l,E.__returned=null,n===void 0?(this.set(t,E,{...h.options,status:void 0}),n=this.keyMap.get(t)):this.valList[n]=E,E}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:S=this.allowStaleOnFetchRejection,ignoreFetchAbort:E=this.ignoreFetchAbort,allowStaleOnFetchAbort:P=this.allowStaleOnFetchAbort,fetchContext:k=this.fetchContext,forceRefresh:R=!1,status:A,signal:x}={}){if(!this.fetchMethod)return A&&(A.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:A});let w={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:l,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:g,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:P,ignoreFetchAbort:E,status:A,signal:x},_=this.keyMap.get(t);if(_===void 0){A&&(A.fetch="miss");let L=this.backgroundFetch(t,_,w,k);return L.__returned=L}else{let L=this.valList[_];if(this.isBackgroundFetch(L)){let q=n&&L.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",q&&(A.returnedStale=!0)),q?L.__staleWhileFetching:L.__returned=L}let O=this.isStale(_);if(!R&&!O)return A&&(A.fetch="hit"),this.moveToTail(_),r&&this.updateItemAge(_),this.statusTTL(A,_),L;let z=this.backgroundFetch(t,_,w,k),D=z.__staleWhileFetching!==void 0,b=D&&n;return A&&(A.fetch=D&&O?"stale":"refresh",b&&O&&(A.returnedStale=!0)),b?z.__staleWhileFetching:z.__returned=z}}get(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:l}={}){let u=this.keyMap.get(t);if(u!==void 0){let h=this.valList[u],f=this.isBackgroundFetch(h);return this.statusTTL(l,u),this.isStale(u)?(l&&(l.get="stale"),f?(l&&(l.returnedStale=n&&h.__staleWhileFetching!==void 0),n?h.__staleWhileFetching:void 0):(s||this.delete(t),l&&(l.returnedStale=n),n?h:void 0)):(l&&(l.get="hit"),f?h.__staleWhileFetching:(this.moveToTail(u),r&&this.updateItemAge(u),h))}else l&&(l.get="miss")}connect(t,n){this.prev[n]=t,this.next[t]=n}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return th("del","delete"),this.delete}delete(t){let n=!1;if(this.size!==0){let r=this.keyMap.get(t);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);let s=this.valList[r];this.isBackgroundFetch(s)?s.__abortController.abort(new Error("deleted")):(this.dispose(s,t,"delete"),this.disposeAfter&&this.disposed.push([s,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(let t of this.rindexes({allowStale:!0})){let n=this.valList[t];if(this.isBackgroundFetch(n))n.__abortController.abort(new Error("deleted"));else{let r=this.keyList[t];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return th("reset","clear"),this.clear}get length(){return vE("length","size"),this.size}static get AbortController(){return ba}static get AbortSignal(){return tv}},iv=vo;var ov=/(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)?(-?[0-9]+(px|em)\s+|0\s+)?(.*)/g,sv={},yE=typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox"),Ua={};var Ls=class{constructor(t,n){v(this,"canvas");v(this,"ctx");v(this,"options");v(this,"imagesPending",0);v(this,"imagesLoaded",0);v(this,"imageIdsLoaded",[]);v(this,"frameIsRendering",!1);v(this,"pendingDrawCall",!1);v(this,"firstMeaningfulPaint",!1);v(this,"parallelTasks",8);v(this,"frameTasks",0);v(this,"loadingQueueOrdered",!0);v(this,"loadingQueue",[]);v(this,"currentTask",Promise.resolve());v(this,"tasksRunning",0);v(this,"stats");v(this,"averageJobTime",64);v(this,"lastKnownScale",1);v(this,"visible",[]);v(this,"previousVisible",[]);v(this,"rendererPosition");v(this,"dpi");v(this,"drawCalls",[]);v(this,"lastPaintedObject");v(this,"hostCache");v(this,"invalidated",[]);v(this,"_worker",()=>{if(this.loadingQueue.length){let t=this.loadingQueue.pop();t&&(this.tasksRunning++,this.frameTasks++,this.currentTask=t.task().then(()=>{this.tasksRunning--}).catch(()=>{this.tasksRunning--}))}});v(this,"_scheduled",0);v(this,"_doWork",()=>{this.loadingQueue.length===0&&this.tasksRunning===0&&this._scheduled&&(clearInterval(this._scheduled),this._scheduled=0);let t=this.parallelTasks||1;!this.firstMeaningfulPaint&&this.loadingQueue.length&&(t=this.loadingQueue.length);for(let n=0;n<=t;n++)this._worker()});this.canvas=t,this.rendererPosition=t.getBoundingClientRect(),this.ctx=t.getContext("2d",{alpha:!0}),this.ctx.imageSmoothingEnabled=!0,this.options=n||{},this.canvas.style.transition="opacity .3s",this.dpi=n?.dpi||1,this.hostCache=n?.lruCache?new iv({maxSize:1024*512*512,dispose:(r,s,l)=>{this.invalidated.push(s),r.width=0,r.height=0},sizeCalculation:(r,s)=>r.width*r.height}):{store:{},get(r){return this.store[r]},set(r,s){this.store[r]=s}}}getCanvasDims(){return{width:this.canvas.width/this.dpi,height:this.canvas.height/this.dpi}}resize(){this.rendererPosition=this.canvas.getBoundingClientRect()}isReady(){return this.firstMeaningfulPaint}afterFrame(t){if(this.clearTransform(),this.lastPaintedObject=void 0,this.frameIsRendering=!1,this.imagesPending=Math.max(0,this.imagesPending-this.imagesLoaded),this.imagesLoaded=0,this.loadingQueueOrdered||(this.loadingQueue=this.loadingQueue.sort((n,r)=>n.network&&n.scale===r.scale?r.distance-n.distance:n.scale<r.scale?-1:1),this.loadingQueueOrdered=!0),this.previousVisible=this.visible,this.pendingDrawCall=!!this.drawCalls.length,this.pendingDrawCall)for(let n=0;n<this.drawCalls.length;n++){let r=this.drawCalls.shift();r&&r()}this.doOffscreenWork(),this.options.debug&&this.stats&&this.stats.end()}doOffscreenWork(){this.frameTasks=0,this.loadingQueue.length&&(this._worker(),this.loadingQueue.length&&(this._scheduled||(this._scheduled=setInterval(this._doWork,0))))}getScale(t,n,r){if(Number.isNaN(t)||Number.isNaN(n))return this.lastKnownScale;let s=this.getCanvasDims(),l=s.width/t,u=s.height/n,h=(l<u?u:l)*(r&&this.dpi||1);return Number.isNaN(h)||(this.lastKnownScale=h),this.lastKnownScale}beforeFrame(t,n,r,s){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(n);let l=this.getCanvasDims();if(this.ctx.globalAlpha=1,this.ctx.fillStyle=this.canvas.dataset.background??"rgb(0, 0, 0)",this.ctx.fillRect(0,0,l.width,l.height),s.enableFilters&&(s.filters.brightness||s.filters.contrast||s.filters.grayscale||s.filters.invert||s.filters.sepia||s.filters.saturate||s.filters.hueRotate||s.filters.blur)){let u="";s.filters.brightness&&(u+=`brightness(${~~(100+s.filters.brightness*100)}%) `),s.filters.contrast&&(u+=`contrast(${~~(100+s.filters.contrast*100)}%) `),s.filters.grayscale&&(u+=`grayscale(${~~(s.filters.grayscale*100)}%) `),s.filters.invert&&(u+=`invert(${~~(s.filters.invert*100)}%) `),s.filters.sepia&&(u+=`sepia(${~~(s.filters.sepia*100)}%) `),s.filters.saturate&&(u+=`saturate(${~~(100+s.filters.saturate*100)}%) `),s.filters.hueRotate&&(u+=`hue-rotate(${s.filters.hueRotate}deg) `),s.filters.blur&&(u+=`blur(${s.filters.blur}px) `),this.ctx.filter=u}else this.ctx.filter="none"}applyTransform(t,n,r,s,l){let u=t.__owner.value;if(u&&u.rotation){this.ctx.save();let h=n+s/2,f=r+l/2;this.ctx.translate(h,f),this.ctx.rotate(u.rotation*Math.PI/180),this.ctx.translate(-h,-f),this.lastPaintedObject=u}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(t,n,r,s,l,u){let h=this.ctx.globalAlpha;if(t instanceof Ge||t instanceof dn){if(t.display.rotation){this.ctx.save();let m=r+l/2,S=s+u/2;t.crop&&(m-=t.crop[n*5+1],S-=t.crop[n*5+2]),this.ctx.translate(m,S),this.ctx.rotate(t.display.rotation*Math.PI/180),this.ctx.translate(-m,-S)}if(this.visible.push(t),typeof t.style&&t.style.opacity!=="undefined"){if(!t.style.opacity)return;this.ctx.globalAlpha=t.style.opacity}try{let m=t.__host.canvas,S=this.getCanvasDims();if((m.indices.indexOf(n)===-1||this.invalidated.indexOf(m.canvases[n])!==-1)&&this.schedulePaintToCanvas(m,t,n,Ci({x:r+l/2,y:s+l/2},{x:S.width/2,y:S.height/2})),!this.firstMeaningfulPaint)return;let E=this.hostCache.get(m.canvases[n]);if(E)if(t.crop&&t.cropData){if(t.crop[n*5]){let P=[t.crop[n*5+1]/t.display.scale-t.display.points[n*5+1],t.crop[n*5+2]/t.display.scale-t.display.points[n*5+2],1+(t.crop[n*5+3]-t.crop[n*5+1])/t.display.scale,1+(t.crop[n*5+4]-t.crop[n*5+2])/t.display.scale];P[0]+=t.cropData.x/t.display.scale,P[1]+=t.cropData.y/t.display.scale;let k=t.x*this.lastKnownScale,R=t.y*this.lastKnownScale,A=[r+k,s+R,l,u];A[0]+=k,A[1]+=R,this.ctx.drawImage(E,P[0],P[1],P[2],P[3],A[0],A[1],A[2]+1,A[3]+1)}}else yE?this.ctx.drawImage(E,0,0,t.display.points[n*5+3]-t.display.points[n*5+1],t.display.points[n*5+4]-t.display.points[n*5+2],r,s,l+1,u+1):this.ctx.drawImage(E,0,0,t.display.points[n*5+3]-t.display.points[n*5+1],t.display.points[n*5+4]-t.display.points[n*5+2],r,s,l+Number.MIN_VALUE+.5,u+Number.MIN_VALUE+.5)}catch{}t.display.rotation&&this.ctx.restore()}let f=t instanceof Rn&&this.options.box,g=t instanceof Ti&&this.options.polygon;if((f||g)&&!t.props.className&&!t.props.html&&!t.props.href){if(this.visible.push(t),t.props.style){let m=Object.assign({},t.props.style||{},t.hovering?t.props.hoverStyles:{},t.pressing?t.props.pressStyles:{}),S=t.props.relativeStyle?1:l/t.width;typeof m.opacity<"u"&&(this.ctx.globalAlpha=m.opacity);let E=0;typeof m.borderWidth<"u"&&(E=parseInt(m.borderWidth,10)*S);let P=0;typeof m.outlineWidth<"u"&&(P=parseInt(m.outlineWidth,10)*S);let k=0;if(typeof m.outlineOffset<"u"&&(k=parseInt(m.outlineOffset,10)*S),m.borderColor&&(this.ctx.strokeStyle=m.borderColor),m.boxShadow){let R=m.boxShadow.split(/,(?![^(]*\))/);for(let A of R){let x=sv[A]||ov.exec(A)||ov.exec(A);sv[A]=x,x&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(x[1])*this.dpi*S,this.ctx.shadowOffsetY=parseInt(x[3])*this.dpi*S,this.ctx.shadowBlur=parseInt(x[5])*this.dpi*S,this.ctx.shadowColor=x[9],this.ctx.fillStyle="rgba(0,0,0,1)",this.ctx.fillRect(r+E,s+E,l,u),this.ctx.restore())}}if(this.ctx.fillStyle=m.backgroundColor||"transparent",this.ctx.lineWidth=E,g){let R=t.shape,A=R.points||[],x=A.length;this.ctx.beginPath();for(let w=0;w<x;w++)this.ctx.lineTo(r+A[w][0]*this.lastKnownScale,s+A[w][1]*this.lastKnownScale);R.open||this.ctx.closePath(),E&&this.ctx.stroke(),R.open||this.ctx.fill()}else E&&this.ctx.strokeRect(r+E/2,s+E/2,l+E,u+E),this.ctx.fillRect(r+E,s+E,l,u);P&&(m.outlineColor&&(this.ctx.strokeStyle=m.outlineColor),this.ctx.lineWidth=P,this.ctx.strokeRect(r-P/2-k,s-P/2-k,l+E*2+P+k*2,u+E*2+P+k*2))}this.ctx.globalAlpha=h}}loadImage(t,n,r,s=!1){if(Ua[t]&&Ua[t].naturalWidth>0){n(Ua[t]);return}try{let l=!1;s||setTimeout(()=>{l||this.loadImage(t,n,r,!0)},3e3);let u=document.createElement("img");u.decoding="auto",u.onload=function(){l=!0,n(u),Ua[t]=u,u.onload=null},this.options.crossOrigin&&(u.crossOrigin="anonymous"),u.src=t,u.complete&&u.onload({}),u.width}catch(l){console.log("image error",l),r(l)}}schedulePaintToCanvas(t,n,r,s){this.imagesPending++,t.indices.push(r);let l=`${n.id}--${n.display.scale}-${r}`,u=this.invalidated.indexOf(l);u!==-1&&this.invalidated.splice(u,1),t.canvases[r]=l,n.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:l,scale:n.display.scale,network:!0,distance:s,task:()=>new Promise(h=>{if(this.visible.indexOf(n)===-1){this.imagesPending--,t.indices.splice(t.indices.indexOf(r),1),h();return}let f=n.getImageUrl(r);this.loadImage(f,g=>{this.loadingQueue.push({id:l,scale:n.display.scale,distance:s,task:()=>new Promise(m=>{this.imageIdsLoaded.includes(l)||(this.imagesLoaded++,this.imageIdsLoaded.push(l)),t.loaded.push(r),t.loaded.length===t.indices.length&&(t.loading=!1);let S=n.display.points.slice(r*5,r*5+5),E=document.createElement("canvas"),P=E.getContext("2d");E.width=S[3]-S[1],E.height=S[4]-S[2],this.hostCache.set(t.canvases[r],E),this.drawCalls.push(()=>{P.drawImage(g,0,0,S[3]-S[1],S[4]-S[2]),m()})})}),h()},g=>{this.imagesPending--,t.indices.splice(t.indices.indexOf(r),1),h()})})})}afterPaintLayer(t,n){}prepareLayer(t,n){if(t.__owner.value)if(t.cropData){let r=this.lastKnownScale*(1/t.display.scale);this.applyTransform(t,n[1],n[2],n[3]-n[1],n[4]-n[2])}else this.applyTransform(t,n[1],n[2],n[3]-n[1],n[4]-n[2]);(!t.__host||!t.__host.canvas)&&(t instanceof Ge||t instanceof dn)&&this.createImageHost(t)}finishLayer(){this.lastPaintedObject&&this.clearTransform()}createImageHost(t){t.__host=t.__host?t.__host:{},t.__host.canvas={canvas:void 0,canvases:[],indices:[],loaded:[],loading:!1}}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getViewportBounds(t,n,r){let s=t.getActiveZone();if(s){let l=n[3]-n[1]<s.points[3]-s.points[1],u=n[4]-n[2]<s.points[4]-s.points[2];return{x1:l?s.points[1]-r:s.points[1]+(s.points[3]-s.points[1])/2-(n[3]-n[1])/2,y1:u?s.points[2]-r:s.points[2]+(s.points[4]-s.points[2])/2-(n[4]-n[2])/2,x2:l?s.points[3]+r:s.points[1]+(s.points[3]-s.points[1])/2-(n[3]-n[1])/2,y2:u?s.points[4]+r:s.points[2]+(s.points[4]-s.points[2])/2-(n[4]-n[2])/2}}return null}pendingUpdate(){let t=!this.pendingDrawCall&&this.drawCalls.length===0&&this.imagesPending===0&&this.loadingQueue.length===0&&this.tasksRunning===0;return!t&&this.visible.length===0&&setTimeout(()=>{this.canvas.style.opacity="1",this.firstMeaningfulPaint=!0},500),!this.firstMeaningfulPaint&&t&&this.visible.length?(this.canvas.style.opacity="1",this.firstMeaningfulPaint=t,!0):this.options.debug?!0:!t}getRendererScreenPosition(){return this.rendererPosition}reset(){this.loadingQueue=[],this.drawCalls=[]}};var Ri=class{constructor(t){v(this,"renderers",[]);v(this,"length");for(let n of t)n&&this.renderers.push(n);this.length=this.renderers.length}afterFrame(t,n,r,s){for(let l=0;l<this.length;l++)this.renderers[l].afterFrame(t,n,r,s)}afterPaintLayer(t,n){for(let r=0;r<this.length;r++)this.renderers[r].afterPaintLayer(t,n)}beforeFrame(t,n,r,s){for(let l=0;l<this.length;l++)this.renderers[l].beforeFrame(t,n,r,s)}triggerResize(){for(let t=0;t<this.length;t++){let n=this.renderers[t];n.triggerResize&&n.triggerResize()}}getPointsAt(t,n,r,s){return this.renderers[0].getPointsAt(t,n,r,s)}getScale(t,n){return this.renderers[0].getScale(t,n)}getViewportBounds(t,n,r){return this.renderers[0].getViewportBounds(t,n,r)}getRendererScreenPosition(){return this.renderers[0].getRendererScreenPosition()}isReady(){for(let t=0;t<this.length;t++)if(!this.renderers[t].isReady())return!1;return!0}paint(t,n,r,s,l,u){for(let h=0;h<this.length;h++)this.renderers[h].paint(t,n,r,s,l,u)}pendingUpdate(){for(let t=0;t<this.length;t++)if(this.renderers[t].pendingUpdate())return!0;return!1}prepareLayer(t,n){for(let r=0;r<this.length;r++)this.renderers[r].prepareLayer(t,n)}finishLayer(t,n){for(let r=0;r<this.length;r++)this.renderers[r].finishLayer(t,n)}resize(t,n){for(let r=0;r<this.length;r++)this.renderers[r].resize(t,n)}reset(){for(let t=0;t<this.length;t++)this.renderers[t].reset()}};var Ns=class{constructor(t){v(this,"canvas");v(this,"context");v(this,"heightRatio",1);v(this,"widthRatio",1);v(this,"target",new Float32Array(5));v(this,"initialWidth");v(this,"initialHeight");v(this,"bounds");v(this,"aggregate");v(this,"delta",0);v(this,"renderNextFrame",!0);this.canvas=t,this.initialWidth=t.width,this.initialHeight=t.height,this.context=t.getContext("2d"),this.context.globalAlpha=.5,this.aggregate=Qt(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(t,n,r){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let s=this.initialWidth/t.width,l=this.initialHeight/t.height,u=this.widthRatio>this.heightRatio?s:l;if(this.target=r,this.bounds){let h=t.getPointsAt(this.bounds,this.aggregate,u);for(let[f,g]of h)if(f instanceof Ge&&f.__host.canvas){let m=g.length/5;for(let S=0;S<m;S++)if(f.__host.canvas.canvases[S]){let P={x1:g[S+1]*u,y1:g[S+2]*u,width:(g[S+3]-g[S+1])*u,height:(g[S+4]-g[S+2])*u}}}}t.getPoints().forEach((h,f,g)=>{if(f%5===0&&h){let m={x1:g[f+1]*u,y1:g[f+2]*u,x2:g[f+3]*u,y2:g[f+4]*u,width:(g[f+3]-g[f+1])*u,height:(g[f+4]-g[f+2])*u};this.context.strokeStyle="red",this.context.strokeRect(m.x1,m.y1,m.width,m.height)}}),r&&(this.context.strokeStyle="red",this.context.lineWidth=window.devicePixelRatio||1,this.context.strokeRect(r[1]*u,r[2]*u,(r[3]-r[1])*u,(r[4]-r[2])*u))}}getActiveZone(t){return null}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getScale(t,n){return 1}beforeFrame(t,n){this.bounds=ee.singleBox(t.width,t.height)}drawImage(){}afterPaintLayer(t,n){}paint(t,n,r,s,l,u){this.renderNextFrame=!0}prepareLayer(t){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(t,n,r){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}};var oh=class{constructor(){v(this,"autoWidth",!1);v(this,"autoHeight",!0);v(this,"width");v(this,"height");v(this,"world");v(this,"content",[]);v(this,"viewingDirection","left-to-right");v(this,"rows");v(this,"columns",4);v(this,"spacing",20);v(this,"reversed",!1);v(this,"padding",20);this.world=hn.withProps({width:0,height:0,viewingDirection:"left-to-right"}),this.width=0,this.height=0}setViewingDirection(t){this.viewingDirection=t}addContent(t){this.content.push(...t.map(n=>this.world.addObjectAt(n,{width:0,height:0,x:0,y:0})))}setWidth(t){this.width=t}setHeight(t){this.height=t}setSpacing(t){this.spacing=t}setPadding(t){this.padding=t}setRows(t){this.autoWidth=!0,this.rows=t}setColumns(t){this.autoHeight=!0,this.columns=t}recalculate(){if(this.height===0&&this.width===0||this.rows===0||this.columns===0)return;if(this.autoHeight&&!this.width)throw new Error("Cannot set auto height without setting a width");if(this.autoWidth&&!this.height)throw new Error("Cannot set auto width without setting a height");(this.viewingDirection==="left-to-right"||this.viewingDirection==="top-to-bottom")&&this.reversed&&(this.reversed=!1,this.content.reverse()),(this.viewingDirection==="right-to-left"||this.viewingDirection==="bottom-to-top")&&!this.reversed&&(this.reversed=!0,this.content.reverse());let t=this.content.length,n=()=>{if(this.autoWidth&&this.rows){let h=t>this.rows?this.rows:t;return{columns:Math.ceil(t/h),rows:h}}if(this.autoHeight&&this.columns){let h=t>this.columns?this.columns:t;return{columns:h,rows:Math.ceil(t/h)}}throw new Error("Something went wrong.")},{columns:r,rows:s}=n(),l=this.autoWidth?-1:this.width-this.padding*2,u=this.autoWidth?-1:(l-this.spacing*(r-1))/r;if(this.autoHeight&&!this.autoWidth){let h=0,f=this.padding;for(let g=0;g<s&&h!==t;g++){let m=0,S=[];for(let E=0;E<r;E++){let P=this.reversed?t-h:h;if(h===t)break;let k=this.content[P],R=k.width,A=k.width/k.height,x=u/A;S.push([h,u,x,u/R]),x>m&&(m=x),h++}for(let E=0;E<r&&S[E];E++){let P=this.world.getPoints(),k=S[E][0],R=S[E][1],A=S[E][2],x=S[E][3],w=this.padding+E*(this.spacing+R),_=f+(m-A)/2,L=this.reversed?t-k:k,O=P[L*5+1],z=P[L*5+2];this.world.scaleWorldObject(k,x),(O!==w||z!==_)&&this.world.translateWorldObject(L,w-O,_-z)}f+=m+this.spacing}this.height=f+this.padding,this.world.resize(this.width,this.height);return}this.autoWidth&&this.autoHeight,!this.autoWidth&&this.autoHeight}getWorld(){return this.world}};var Lv=Y(Tv(),1);function Rv(e){return{x:e[1],y:e[2],width:e[3]-e[1],height:e[4]-e[2]}}var zv="pan",Iv="scroll",_E="gesture",Nv={zoomOutFactor:.8,zoomInFactor:1.25,maxZoomFactor:1,minZoomFactor:.05,zoomDuration:300,zoomWheelConstant:20,zoomClamp:.6,panBounceStiffness:120,panBounceDamping:15,panTimeConstant:240,panPower:.1,nudgeDistance:100,panPadding:0,devicePixelRatio:1,enableWheel:!0,enableClickToZoom:!0,ignoreSingleFingerTouch:!1,enablePanOnWait:!1,requireMetaKeyForWheelZoom:!1,panOnWaitDelay:40,onPanInSketchMode:()=>{},parentElement:null},Os=(e={})=>({start:function(t){let{zoomWheelConstant:n,enableWheel:r,enableClickToZoom:s,ignoreSingleFingerTouch:l,enablePanOnWait:u,panOnWaitDelay:h,parentElement:f,requireMetaKeyForWheelZoom:g}={...Nv,...e},m={pointerStart:{x:0,y:0},isPressing:!1,mousemoveBuffer:V(5),multiTouch:{distance:0}};t.world.activatedEvents.push("onMouseUp","onMouseDown","onMouseMove","onTouchStart","onTouchEnd","onTouchMove");function S(){R=0,x="",_(),_(void 0,"notice"),A=0}function E(){t.world.constraintBounds(),S()}function P(M){if(M.which>1){m.isPressing=!1;return}t.mode==="explore"&&(M.preventDefault(),m.pointerStart.x=M.atlas.x,m.pointerStart.y=M.atlas.y,t.transitionManager.stopTransition(),m.isPressing=!0)}function k(){S(),m.isPressing&&(t.mode==="explore"&&t.world.constraintBounds(),m.isPressing=!1)}let R=0,A=0,x="";function w(M){if(t.mode==="explore"){if(M.atlasTouches.length===1&&(A=performance.now(),l==!1&&M.preventDefault(),m.pointerStart.x=M.atlasTouches[0].x,m.pointerStart.y=M.atlasTouches[0].y),M.atlasTouches.length===2){x=_E,M.preventDefault();let K=M.atlasTouches[0].x,se=M.atlasTouches[1].x;m.pointerStart.x=(K+se)/2;let Wn=M.atlasTouches[0].y,fe=M.atlasTouches[1].y;m.pointerStart.y=(Wn+fe)/2,R=Ci({x:M.touches[0].clientX,y:M.touches[0].clientY},{x:M.touches[1].clientX,y:M.touches[1].clientY})}t.transitionManager.stopTransition(),m.isPressing=!0}}function _(M,K="intent"){f&&(f.dataset[K]=M)}function L(M){let K=null,se=null,Wn=!1,fe=0;if(m.isPressing&&M.touches.length===2){let xt=M.touches[0].clientX,tn=M.touches[1].clientX;K=(xt+tn)/2;let Ir=M.touches[0].clientY,Lr=M.touches[1].clientY;se=(Ir+Lr)/2,fe=Ci({x:M.touches[0].clientX,y:M.touches[0].clientY},{x:M.touches[1].clientX,y:M.touches[1].clientY}),Wn=!0}if(_(x),m.isPressing&&M.touches.length===1){if(u&&(performance.now()-A<h&&x==""&&(x=Iv),x==""&&(x=zv)),_(x),x==""&&l==!0||x==Iv){_("require-two-finger","notice");return}let xt=M.touches[0];K=xt.clientX,se=xt.clientY}if(K!==null&&se!==null){let xt=t.getRendererScreenPosition();if(xt){let{x:tn,y:Ir}=t.viewerToWorld(K-xt.x,se-xt.y),Lr=fe&&R?fe/R:1;t.transitionManager.customTransition(j=>{j.from=V(t.target),j.to=Gt(j.from,At(Re(m.pointerStart.x-tn,m.pointerStart.y-Ir),vr(1/Lr,tn,Ir)),m.mousemoveBuffer),j.elapsed_time=0,j.total_time=0,j.timingFunction=zn.easeInOutExpo,j.done=!1})}R=fe}x==zv&&M.preventDefault()}function O(M){if(m.isPressing){let K=t.getRendererScreenPosition();if(K){let{x:se,y:Wn}=t.viewerToWorld(M.clientX-K.x,M.clientY-K.y);t.transitionManager.customTransition(fe=>{fe.from=V(t.target),fe.to=Gt(fe.from,Re(m.pointerStart.x-se,m.pointerStart.y-Wn),m.mousemoveBuffer),fe.elapsed_time=0,fe.total_time=0,fe.timingFunction=zn.easeInOutExpo,fe.done=!1})}}}function z(M){t.mode==="explore"&&t.world.zoomIn(M.atlas)}function D(M){let se=1+(0,Lv.default)(M).spinY/n;t.world.zoomTo(se,M.atlas,!0)}function b(M){return g&&M.metaKey==!1?(_("meta-required","notice"),M.stopPropagation(),!1):!0}t.world.addEventListener("mouseup",E),t.world.addEventListener("touchend",E),t.world.addEventListener("touchstart",w),t.world.addEventListener("mousedown",P),window.addEventListener("touchend",k),window.addEventListener("mouseup",k),window.addEventListener("mousemove",O),f&&f.addEventListener("touchmove",L),s&&(t.world.activatedEvents.push("onClick"),t.world.addEventListener("click",z)),r&&(t.world.activatedEvents.push("onWheel"),g&&f?.addEventListener("wheel",b,{passive:!0,capture:!0}),t.world.addEventListener("wheel",D));let q=t.world.addLayoutSubscriber((M,K)=>{if(M==="zone-changed"&&t.transitionManager.constrainBounds({transition:{duration:0}}),M==="zoom-to"&&K&&t.transitionManager.zoomTo(K.factor,{origin:K.point,stream:K.stream}),M==="go-home"){let se=K.immediate?{duration:0}:void 0;t.transitionManager.goToRegion(Rv(t.homePosition),{transition:se})}if(M==="goto-region"&&K){let se=K.immediate?{duration:0}:{};t.transitionManager.goToRegion(K,{transition:se})}M==="constrain-bounds"&&t.transitionManager.constrainBounds({transition:K?.immediate?{duration:0}:void 0})});return()=>{t.world.removeEventListener("mouseup",E),t.world.removeEventListener("touchend",E),t.world.removeEventListener("touchstart",w),t.world.removeEventListener("mousedown",P),window.removeEventListener("touchend",k),window.removeEventListener("mouseup",k),t.world.removeEventListener("mousemove",O),f&&(f.removeEventListener("touchmove",O),f.removeEventListener("wheel",b,{passive:!0,capture:!0})),s&&t.world.removeEventListener("click",z),r&&t.world.removeEventListener("wheel",D),q()}},updatePosition(){}});var Le=Y(le(),1);var qa=Y(le(),1),Yv=Y(Ie(),1),$n=qa.default.createContext("explore");$n.displayName="Mode";var Ms=()=>(0,qa.useContext)($n);function QE(e){return(0,Yv.jsx)($n.Provider,{value:e.mode,children:e.children})}var Xt=Y(le(),1);function Zv(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Ja({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let s=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)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");let[l,u]=(0,Xt.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),h=(0,Xt.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l,orientationHandler:null}),f=e?typeof e=="number"?e:e.scroll:null,g=e?typeof e=="number"?e:e.resize:null,m=(0,Xt.useRef)(!1);(0,Xt.useEffect)(()=>(m.current=!0,()=>void(m.current=!1)));let[S,E,P]=(0,Xt.useMemo)(()=>{let x=()=>{if(!h.current.element)return;let{left:w,top:_,width:L,height:O,bottom:z,right:D,x:b,y:q}=h.current.element.getBoundingClientRect(),M={left:w,top:_,width:L,height:O,bottom:z,right:D,x:b,y:q};h.current.element instanceof HTMLElement&&r&&(M.height=h.current.element.offsetHeight,M.width=h.current.element.offsetWidth),Object.freeze(M),m.current&&!ZE(h.current.lastBounds,M)&&u(h.current.lastBounds=M)};return[x,g?Zv(x,g):x,f?Zv(x,f):x]},[u,r,f,g]);function k(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",P,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function R(){h.current.element&&(h.current.resizeObserver=new s(P),h.current.resizeObserver.observe(h.current.element),t&&h.current.scrollContainers&&h.current.scrollContainers.forEach(x=>x.addEventListener("scroll",P,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{P()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}let A=x=>{!x||x===h.current.element||(k(),h.current.element=x,h.current.scrollContainers=Kv(x),R())};return XE(P,!!t),GE(E),(0,Xt.useEffect)(()=>{k(),R()},[t,P,E]),(0,Xt.useEffect)(()=>k,[]),[A,l,S]}function GE(e){(0,Xt.useEffect)(()=>{let t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function XE(e,t){(0,Xt.useEffect)(()=>{if(t){let n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Kv(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:s}=window.getComputedStyle(e);return[n,r,s].some(l=>l==="auto"||l==="scroll")&&t.push(e),[...t,...Kv(e.parentElement)]}var YE=["x","y","top","bottom","left","right","width","height"],ZE=(e,t)=>YE.every(n=>e[n]===t[n]);var wh=Y(le(),1),qn=wh.default.createContext(null);qn.displayName="Atlas";var Gr=wh.default.createContext(null);Gr.displayName="Bounds";var er=Y(le(),1);var py=Y(dy(),1);var Bs,$E=typeof performance=="object"&&typeof performance.now=="function";if($E){let e=performance;Bs=()=>e.now()}else{let e=Date,t=e.now();Bs=()=>e.now()-t}var my=Y(le(),1);var qE=16;function hy(e,t){e&&e.appendChild&&t&&e.appendChild(t)}function gy(e,t){e&&e.removeChild&&t&&e.removeChild(t)}function JE(e,t){return gy(e.world,t)}function e2(e,t,n){return vy(e.world,t,n)}function vy(e,t,n){e&&e instanceof Kn&&(e=e.world),e&&e.insertBefore&&e.insertBefore(t,n)}function Ih(e,t,n){if(n&&(e.applyProps&&e.applyProps(n),e instanceof Ae))for(let r of mo){let s=r.slice(2).toLowerCase();n[r]!==t[r]&&(t[r]&&e.removeEventListener(s,t[r]),e.addEventListener(s,n[r]))}}function Lh(e,t){let n=Object.keys(t),r=!1;for(let s of n)if(mo.indexOf(s)!==-1){let l=Tn[s];if(l){if(e.activatedEvents.indexOf(l)!==-1)continue;r=!0,e.activatedEvents.push(l)}}r&&e.triggerEventActivation()}var ou=new Map,fy={};function t2(e,{args:t=[],...n},r,s,l){if(!(r instanceof Kn)&&l){let f=g=>g.return?f(g.return):g.stateNode&&g.stateNode.containerInfo;r=f(l)}let u,h=r.world;switch(e){case"world":u=hn.withProps({width:n.width,height:n.height,viewingDirection:"left-to-right"}),u.activatedEvents=h.activatedEvents,u.eventHandlers=h.eventHandlers,u.subscriptions=h.subscriptions,u.triggerEventActivation(),h=u;break;case"box":u=new Rn;break;case"shape":u=new Ti;break;case"worldObject":case"world-object":u=new Zn;break;case"worldImage":case"world-image":u=new Ge;break;case"texture":u=new Vr;break;case"compositeImage":case"composite-image":u=new Cs({id:n.id,width:n.width,height:n.height,images:[],renderOptions:n.renderOptions});break;case"tiledImage":case"tiled-image":u=dn.fromTile(n.uri,n.display,n.tile,n.scaleFactor,void 0,n.format,n.useFloorCalc,n.version3);break;case"paragraph":u=new yr,u.text=n.children;break;default:return}return Lh(h,n),Ih(u,{},n),u}function n2(e,t){if(t instanceof hn)e.world=t;else if(t instanceof Zn)e.world.appendChild(t);else if(t)throw new Error("Invalid root")}var js=(0,py.default)({unstable_now:Bs,now:Bs,createInstance:t2,removeChild:gy,appendChild:hy,appendInitialChild:hy,insertBefore:vy,warnsIfNotActing:!0,supportsMutation:!0,isPrimaryRenderer:!1,scheduleTimeout:typeof setTimeout<"u"?setTimeout:void 0,cancelTimeout:typeof clearTimeout<"u"?clearTimeout:void 0,setTimeout:typeof setTimeout<"u"?setTimeout:void 0,clearTimeout:typeof clearTimeout<"u"?clearTimeout:void 0,noTimeout:-1,appendChildToContainer:n2,removeChildFromContainer:JE,createTextInstance(){},insertInContainerBefore:e2,prepareUpdate(e,t,n,r,s){return Lh(s.world,r),r},commitUpdate(e,t,n,r,s,l){e.applyProps&&t&&Ih(e,r,t)},finalizeInitialChildren(e){return e?.__handlers},getChildHostContext(){return fy},getRootHostContext(){return fy},prepareForCommit(e){return e.isCommitting=!0,null},preparePortalMount(){},hideInstance(e){e&&e.points&&(e.points[0]=0)},unhideInstance(e,t){e&&e.points&&(e.points[0]=1)},getPublicInstance(e){return e},hideTextInstance(){throw new Error("Text is not allowed in the react-three-fibre tree. You may have extraneous whitespace between components.")},resetAfterCommit(e){e.isCommitting=!1,e.pendingUpdate=!0,e.world&&e.world.needsRecalculate&&(e.world.recalculateWorldSize(),e.world.triggerRepaint())},shouldSetTextContent(){return!1},clearContainer(){return!1},supportsHydration:!1,supportsPersistence:!1,detachDeletedInstance(e){},afterActiveInstanceBlur(){},beforeActiveInstanceBlur(){},getCurrentEventPriority(){return console.log("getCurrentEventPriority"),qE},getInstanceFromNode(e){throw console.log("getInstanceFromNode",e),new Error("Not implemented")},getInstanceFromScope(e){throw console.log("getInstanceFromScope",e),new Error("Not implemented")},prepareScopeUpdate(e,t){throw console.log("prepareScopeUpdate",e,t),new Error("Not implemented")},logRecoverableError(){},requestPostPaintCallback(){}});js.injectIntoDevTools({bundleType:0,version:my.version,rendererPackageName:"@atlas-viewer/atlas"});function wo(e,t){let n=ou.get(e);n&&js.updateContainer(null,n,null,()=>{ou.delete(e),t&&t(e)})}var So={render(e,t){let n=ou.get(t);if(n)js.updateContainer(e,n,null);else{let r=js.createContainer(t,0,null,!1,null,"",()=>{},null);js.updateContainer(e,r,null),ou.set(t,r)}},unmountComponentAtNode(e,t){wo(e,t)}};var su=Y(le(),1),Yt=typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")?su.useLayoutEffect:su.useEffect;var xo=Y(Ie(),1),yy=er.default.memo(({children:e,setIsReady:t,onCreated:n,bounds:r,preset:s,mode:l="explore"})=>{let u=(0,er.useCallback)(function(f){let g=(0,er.useRef)(!1),m=()=>{t(!0)};return(0,er.useEffect)(()=>{if(s&&!g.current){s.runtime.goHome();let S=n&&n(s);return void(S&&S.then?S.then(m):m())}return()=>{}},[]),(0,er.useEffect)(()=>{g.current=!0},[]),f.children},[s]);return Yt(()=>{if(s){let h=s.runtime;l!==h.mode&&(h.mode=l),So.render((0,xo.jsx)(er.default.StrictMode,{children:(0,xo.jsx)(u,{children:(0,xo.jsx)(Gr.Provider,{value:r,children:(0,xo.jsx)($n.Provider,{value:l,children:(0,xo.jsx)(qn.Provider,{value:s,children:e})})})})}),h)}},[s,l,e]),Yt(()=>{if(s){let h=s.runtime;return()=>{So.unmountComponentAtNode(h)}}return()=>{}},[s]),null});var bs=class{constructor(t,n){v(this,"canvas");v(this,"gl");v(this,"program");v(this,"fragmentShader");v(this,"vertexShader");v(this,"rectBuffer");v(this,"fragmentShaderSource",`
|
|
18
|
+
`+l.stack}return{value:e,source:t,stack:s,digest:null}}function tf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Wf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var M_=typeof WeakMap=="function"?WeakMap:Map;function lw(e,t,n){n=_r(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oc||(oc=!0,Yf=r),Wf(e,t)},n}function aw(e,t,n){n=_r(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Wf(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Wf(e,t),typeof r!="function"&&(li===null?li=new Set([this]):li.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function v0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new M_;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Z_.bind(null,e,t,n),t.then(e,e))}function y0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function w0(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_r(-1,1),t.tag=2,si(n,t,1))),n.lanes|=1),e)}var A_=Rr.ReactCurrentOwner,Bt=!1;function Tt(e,t,n,r){t.child=e===null?j1(t,null,n,r):Xo(t,e.child,n,r)}function S0(e,t,n,r,s){n=n.render;var l=t.ref;return Ho(t,s),r=Cp(e,t,n,r,l,s),n=Tp(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Tr(e,t,s)):(ke&&n&&pp(t),t.flags|=1,Tt(e,t,r,s),t.child)}function x0(e,t,n,r,s){if(e===null){var l=n.type;return typeof l=="function"&&!Dp(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,uw(e,t,l,r,s)):(e=Wu(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var u=l.memoizedProps;if(n=n.compare,n=n!==null?n:xl,n(u,r)&&e.ref===t.ref)return Tr(e,t,s)}return t.flags|=1,e=ui(l,r),e.ref=t.ref,e.return=t,t.child=e}function uw(e,t,n,r,s){if(e!==null){var l=e.memoizedProps;if(xl(l,r)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=r=l,(e.lanes&s)!==0)e.flags&131072&&(Bt=!0);else return t.lanes=e.lanes,Tr(e,t,s)}return Bf(e,t,n,r,s)}function cw(e,t,n){var r=t.pendingProps,s=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(Do,Zt),Zt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(Do,Zt),Zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,ve(Do,Zt),Zt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,ve(Do,Zt),Zt|=r;return Tt(e,t,s,n),t.child}function dw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bf(e,t,n,r,s){var l=bt(n)?Hi:xt.current;return l=Qo(t,l),Ho(t,s),n=Cp(e,t,n,r,l,s),r=Tp(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Tr(e,t,s)):(ke&&r&&pp(t),t.flags|=1,Tt(e,t,n,s),t.child)}function E0(e,t,n,r,s){if(bt(n)){var l=!0;Zu(t)}else l=!1;if(Ho(t,s),t.stateNode===null)Mu(e,t),W1(t,n,r),Df(t,n,r,s),r=!0;else if(e===null){var u=t.stateNode,h=t.memoizedProps;u.props=h;var f=u.context,g=n.contextType;typeof g=="object"&&g!==null?g=wn(g):(g=bt(n)?Hi:xt.current,g=Qo(t,g));var m=n.getDerivedStateFromProps,S=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function";S||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==r||f!==g)&&f0(t,u,r,g),$r=!1;var E=t.memoizedState;u.state=E,ec(t,r,u,s),f=t.memoizedState,h!==r||E!==f||jt.current||$r?(typeof m=="function"&&(Af(t,n,m,r),f=t.memoizedState),(h=$r||h0(t,n,h,r,E,f,g))?(S||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),u.props=r,u.state=f,u.context=g,r=h):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,A1(e,t),h=t.memoizedProps,g=t.type===t.elementType?h:Nn(t.type,h),u.props=g,S=t.pendingProps,E=u.context,f=n.contextType,typeof f=="object"&&f!==null?f=wn(f):(f=bt(n)?Hi:xt.current,f=Qo(t,f));var P=n.getDerivedStateFromProps;(m=typeof P=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==S||E!==f)&&f0(t,u,r,f),$r=!1,E=t.memoizedState,u.state=E,ec(t,r,u,s);var k=t.memoizedState;h!==S||E!==k||jt.current||$r?(typeof P=="function"&&(Af(t,n,P,r),k=t.memoizedState),(g=$r||h0(t,n,g,r,E,k,f)||!1)?(m||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,k,f),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,k,f)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),u.props=r,u.state=k,u.context=f,r=g):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),r=!1)}return jf(e,t,n,r,l,s)}function jf(e,t,n,r,s,l){dw(e,t);var u=(t.flags&128)!==0;if(!r&&!u)return s&&l0(t,n,!1),Tr(e,t,l);r=t.stateNode,A_.current=t;var h=u&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&u?(t.child=Xo(t,e.child,null,l),t.child=Xo(t,null,h,l)):Tt(e,t,h,l),t.memoizedState=r.state,s&&l0(t,n,!0),t.child}function hw(e){var t=e.stateNode;t.pendingContext?s0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&s0(e,t.context,!1),Ep(e,t.containerInfo)}function _0(e,t,n,r,s){return Go(),gp(s),t.flags|=256,Tt(e,t,n,r),t.child}var bf={dehydrated:null,treeContext:null,retryLane:0};function Hf(e){return{baseLanes:e,cachePool:null,transitions:null}}function fw(e,t,n){var r=t.pendingProps,s=Ne.current,l=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(s&2)!==0),h?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ve(Ne,s&1),e===null)return Ff(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(u=r.children,e=r.fallback,l?(r=t.mode,l=t.child,u={mode:"hidden",children:u},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=u):l=wc(u,r,0,null),e=bi(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Hf(n),t.memoizedState=bf,e):Ip(t,u));if(s=e.memoizedState,s!==null&&(h=s.dehydrated,h!==null))return D_(e,t,u,r,h,s,n);if(l){l=r.fallback,u=t.mode,s=e.child,h=s.sibling;var f={mode:"hidden",children:r.children};return!(u&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=ui(s,f),r.subtreeFlags=s.subtreeFlags&14680064),h!==null?l=ui(h,l):(l=bi(l,u,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,u=e.child.memoizedState,u=u===null?Hf(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},l.memoizedState=u,l.childLanes=e.childLanes&~n,t.memoizedState=bf,r}return l=e.child,e=l.sibling,r=ui(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ip(e,t){return t=wc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cu(e,t,n,r){return r!==null&&gp(r),Xo(t,e.child,null,n),e=Ip(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function D_(e,t,n,r,s,l,u){if(n)return t.flags&256?(t.flags&=-257,r=tf(Error(W(422))),Cu(e,t,u,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,s=t.mode,r=wc({mode:"visible",children:r.children},s,0,null),l=bi(l,s,u,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Xo(t,e.child,null,u),t.child.memoizedState=Hf(u),t.memoizedState=bf,l);if(!(t.mode&1))return Cu(e,t,u,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var h=r.dgst;return r=h,l=Error(W(419)),r=tf(l,r,void 0),Cu(e,t,u,r)}if(h=(u&e.childLanes)!==0,Bt||h){if(r=nt,r!==null){switch(u&-u){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|u)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,Cr(e,s),An(r,e,s,-1))}return Ap(),r=tf(Error(W(421))),Cu(e,t,u,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=K_.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,Kt=oi(s.nextSibling),$t=t,ke=!0,Fn=null,e!==null&&(mn[gn++]=xr,mn[gn++]=Er,mn[gn++]=Ui,xr=e.id,Er=e.overflow,Ui=t),t=Ip(t,r.children),t.flags|=4096,t)}function P0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mf(e.return,t,n)}function nf(e,t,n,r,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=s)}function pw(e,t,n){var r=t.pendingProps,s=r.revealOrder,l=r.tail;if(Tt(e,t,r.children,n),r=Ne.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&P0(e,n,t);else if(e.tag===19)P0(e,n,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}r&=1}if(ve(Ne,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&tc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),nf(t,!1,s,n,l);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&tc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}nf(t,!0,n,null,l);break;case"together":nf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function W_(e,t,n){switch(t.tag){case 3:hw(t),Go();break;case 5:b1(t);break;case 1:bt(t.type)&&Zu(t);break;case 4:Ep(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ve(qu,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ve(Ne,Ne.current&1),t.flags|=128,null):n&t.child.childLanes?fw(e,t,n):(ve(Ne,Ne.current&1),e=Tr(e,t,n),e!==null?e.sibling:null);ve(Ne,Ne.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pw(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ve(Ne,Ne.current),r)break;return null;case 22:case 23:return t.lanes=0,cw(e,t,n)}return Tr(e,t,n)}var mw,Uf,gw,vw;mw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uf=function(){};gw=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Bi(sr.current);var l=null;switch(n){case"input":s=df(e,s),r=df(e,r),l=[];break;case"select":s=Fe({},s,{value:void 0}),r=Fe({},r,{value:void 0}),l=[];break;case"textarea":s=pf(e,s),r=pf(e,r),l=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xu)}gf(n,r);var u;n=null;for(g in s)if(!r.hasOwnProperty(g)&&s.hasOwnProperty(g)&&s[g]!=null)if(g==="style"){var h=s[g];for(u in h)h.hasOwnProperty(u)&&(n||(n={}),n[u]="")}else g!=="dangerouslySetInnerHTML"&&g!=="children"&&g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(pl.hasOwnProperty(g)?l||(l=[]):(l=l||[]).push(g,null));for(g in r){var f=r[g];if(h=s?.[g],r.hasOwnProperty(g)&&f!==h&&(f!=null||h!=null))if(g==="style")if(h){for(u in h)!h.hasOwnProperty(u)||f&&f.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in f)f.hasOwnProperty(u)&&h[u]!==f[u]&&(n||(n={}),n[u]=f[u])}else n||(l||(l=[]),l.push(g,n)),n=f;else g==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,h=h?h.__html:void 0,f!=null&&h!==f&&(l=l||[]).push(g,f)):g==="children"?typeof f!="string"&&typeof f!="number"||(l=l||[]).push(g,""+f):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&(pl.hasOwnProperty(g)?(f!=null&&g==="onScroll"&&xe("scroll",e),l||h===f||(l=[])):(l=l||[]).push(g,f))}n&&(l=l||[]).push("style",n);var g=l;(t.updateQueue=g)&&(t.flags|=4)}};vw=function(e,t,n,r){n!==r&&(t.flags|=4)};function qs(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function wt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function B_(e,t,n){var r=t.pendingProps;switch(mp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(t),null;case 1:return bt(t.type)&&Yu(),wt(t),null;case 3:return r=t.stateNode,Yo(),Ee(jt),Ee(xt),Pp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Pu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fn!==null&&($f(Fn),Fn=null))),Uf(e,t),wt(t),null;case 5:_p(t);var s=Bi(Cl.current);if(n=t.type,e!==null&&t.stateNode!=null)gw(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return wt(t),null}if(e=Bi(sr.current),Pu(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[ir]=t,r[Pl]=l,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<il.length;s++)xe(il[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Ny(r,l),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},xe("invalid",r);break;case"textarea":Fy(r,l),xe("invalid",r)}gf(n,l),s=null;for(var u in l)if(l.hasOwnProperty(u)){var h=l[u];u==="children"?typeof h=="string"?r.textContent!==h&&(l.suppressHydrationWarning!==!0&&_u(r.textContent,h,e),s=["children",h]):typeof h=="number"&&r.textContent!==""+h&&(l.suppressHydrationWarning!==!0&&_u(r.textContent,h,e),s=["children",""+h]):pl.hasOwnProperty(u)&&h!=null&&u==="onScroll"&&xe("scroll",r)}switch(n){case"input":du(r),Oy(r,l,!0);break;case"textarea":du(r),My(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Xu)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{u=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=V0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[ir]=t,e[Pl]=r,mw(e,t,!1,!1),t.stateNode=e;e:{switch(u=vf(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<il.length;s++)xe(il[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":Ny(e,r),s=df(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Fe({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Fy(e,r),s=pf(e,r),xe("invalid",e);break;default:s=r}gf(n,s),h=s;for(l in h)if(h.hasOwnProperty(l)){var f=h[l];l==="style"?X0(e,f):l==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&Q0(e,f)):l==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&ml(e,f):typeof f=="number"&&ml(e,""+f):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(pl.hasOwnProperty(l)?f!=null&&l==="onScroll"&&xe("scroll",e):f!=null&&ep(e,l,f,u))}switch(n){case"input":du(e),Oy(e,r,!1);break;case"textarea":du(e),My(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ci(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Wo(e,!!r.multiple,l,!1):r.defaultValue!=null&&Wo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Xu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wt(t),null;case 6:if(e&&t.stateNode!=null)vw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=Bi(Cl.current),Bi(sr.current),Pu(t)){if(r=t.stateNode,n=t.memoizedProps,r[ir]=t,(l=r.nodeValue!==n)&&(e=$t,e!==null))switch(e.tag){case 3:_u(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_u(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ir]=t,t.stateNode=r}return wt(t),null;case 13:if(Ee(Ne),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&Kt!==null&&t.mode&1&&!(t.flags&128))F1(),Go(),t.flags|=98560,l=!1;else if(l=Pu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(W(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(W(317));l[ir]=t}else Go(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;wt(t),l=!1}else Fn!==null&&($f(Fn),Fn=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?Ye===0&&(Ye=3):Ap())),t.updateQueue!==null&&(t.flags|=4),wt(t),null);case 4:return Yo(),Uf(e,t),e===null&&El(t.stateNode.containerInfo),wt(t),null;case 10:return wp(t.type._context),wt(t),null;case 17:return bt(t.type)&&Yu(),wt(t),null;case 19:if(Ee(Ne),l=t.memoizedState,l===null)return wt(t),null;if(r=(t.flags&128)!==0,u=l.rendering,u===null)if(r)qs(l,!1);else{if(Ye!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(u=tc(e),u!==null){for(t.flags|=128,qs(l,!1),r=u.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,u=l.alternate,u===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=u.childLanes,l.lanes=u.lanes,l.child=u.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=u.memoizedProps,l.memoizedState=u.memoizedState,l.updateQueue=u.updateQueue,l.type=u.type,e=u.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ve(Ne,Ne.current&1|2),t.child}e=e.sibling}l.tail!==null&&je()>Ko&&(t.flags|=128,r=!0,qs(l,!1),t.lanes=4194304)}else{if(!r)if(e=tc(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!ke)return wt(t),null}else 2*je()-l.renderingStartTime>Ko&&n!==1073741824&&(t.flags|=128,r=!0,qs(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(n=l.last,n!==null?n.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=je(),t.sibling=null,n=Ne.current,ve(Ne,r?n&1|2:n&1),t):(wt(t),null);case 22:case 23:return Mp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(wt(t),t.subtreeFlags&6&&(t.flags|=8192)):wt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function j_(e,t){switch(mp(t),t.tag){case 1:return bt(t.type)&&Yu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(),Ee(jt),Ee(xt),Pp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _p(t),null;case 13:if(Ee(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Ne),null;case 4:return Yo(),null;case 10:return wp(t.type._context),null;case 22:case 23:return Mp(),null;case 24:return null;default:return null}}var Tu=!1,St=!1,b_=typeof WeakSet=="function"?WeakSet:Set,G=null;function Ao(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function Vf(e,t,n){try{n()}catch(r){De(e,t,r)}}var k0=!1;function H_(e,t){if(Tf=Vu,e=x1(),fp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var u=0,h=-1,f=-1,g=0,m=0,S=e,E=null;t:for(;;){for(var P;S!==n||s!==0&&S.nodeType!==3||(h=u+s),S!==l||r!==0&&S.nodeType!==3||(f=u+r),S.nodeType===3&&(u+=S.nodeValue.length),(P=S.firstChild)!==null;)E=S,S=P;for(;;){if(S===e)break t;if(E===n&&++g===s&&(h=u),E===l&&++m===r&&(f=u),(P=S.nextSibling)!==null)break;S=E,E=S.parentNode}S=P}n=h===-1||f===-1?null:{start:h,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rf={focusedElem:e,selectionRange:n},Vu=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var R=k.memoizedProps,A=k.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?R:Nn(t.type,R),A);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(L){De(t,t.return,L)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return k=k0,k0=!1,k}function dl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Vf(t,n,l)}s=s.next}while(s!==r)}}function vc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function yw(e){var t=e.alternate;t!==null&&(e.alternate=null,yw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ir],delete t[Pl],delete t[Lf],delete t[P_],delete t[k_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ww(e){return e.tag===5||e.tag===3||e.tag===4}function C0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ww(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.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 Gf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xu));else if(r!==4&&(e=e.child,e!==null))for(Gf(e,t,n),e=e.sibling;e!==null;)Gf(e,t,n),e=e.sibling}function Xf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xf(e,t,n),e=e.sibling;e!==null;)Xf(e,t,n),e=e.sibling}var lt=null,On=!1;function Zr(e,t,n){for(n=n.child;n!==null;)Sw(e,t,n),n=n.sibling}function Sw(e,t,n){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(uc,n)}catch{}switch(n.tag){case 5:St||Ao(n,t);case 6:var r=lt,s=On;lt=null,Zr(e,t,n),lt=r,On=s,lt!==null&&(On?(e=lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):lt.removeChild(n.stateNode));break;case 18:lt!==null&&(On?(e=lt,n=n.stateNode,e.nodeType===8?Zh(e.parentNode,n):e.nodeType===1&&Zh(e,n),wl(e)):Zh(lt,n.stateNode));break;case 4:r=lt,s=On,lt=n.stateNode.containerInfo,On=!0,Zr(e,t,n),lt=r,On=s;break;case 0:case 11:case 14:case 15:if(!St&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var l=s,u=l.destroy;l=l.tag,u!==void 0&&(l&2||l&4)&&Vf(n,t,u),s=s.next}while(s!==r)}Zr(e,t,n);break;case 1:if(!St&&(Ao(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(h){De(n,t,h)}Zr(e,t,n);break;case 21:Zr(e,t,n);break;case 22:n.mode&1?(St=(r=St)||n.memoizedState!==null,Zr(e,t,n),St=r):Zr(e,t,n);break;default:Zr(e,t,n)}}function T0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new b_),t.forEach(function(r){var s=$_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ln(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var l=e,u=t,h=u;e:for(;h!==null;){switch(h.tag){case 5:lt=h.stateNode,On=!1;break e;case 3:lt=h.stateNode.containerInfo,On=!0;break e;case 4:lt=h.stateNode.containerInfo,On=!0;break e}h=h.return}if(lt===null)throw Error(W(160));Sw(l,u,s),lt=null,On=!1;var f=s.alternate;f!==null&&(f.return=null),s.return=null}catch(g){De(s,t,g)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)xw(t,e),t=t.sibling}function xw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ln(t,e),nr(e),r&4){try{dl(3,e,e.return),vc(3,e)}catch(R){De(e,e.return,R)}try{dl(5,e,e.return)}catch(R){De(e,e.return,R)}}break;case 1:Ln(t,e),nr(e),r&512&&n!==null&&Ao(n,n.return);break;case 5:if(Ln(t,e),nr(e),r&512&&n!==null&&Ao(n,n.return),e.flags&32){var s=e.stateNode;try{ml(s,"")}catch(R){De(e,e.return,R)}}if(r&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,u=n!==null?n.memoizedProps:l,h=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{h==="input"&&l.type==="radio"&&l.name!=null&&H0(s,l),vf(h,u);var g=vf(h,l);for(u=0;u<f.length;u+=2){var m=f[u],S=f[u+1];m==="style"?X0(s,S):m==="dangerouslySetInnerHTML"?Q0(s,S):m==="children"?ml(s,S):ep(s,m,S,g)}switch(h){case"input":hf(s,l);break;case"textarea":U0(s,l);break;case"select":var E=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var P=l.value;P!=null?Wo(s,!!l.multiple,P,!1):E!==!!l.multiple&&(l.defaultValue!=null?Wo(s,!!l.multiple,l.defaultValue,!0):Wo(s,!!l.multiple,l.multiple?[]:"",!1))}s[Pl]=l}catch(R){De(e,e.return,R)}}break;case 6:if(Ln(t,e),nr(e),r&4){if(e.stateNode===null)throw Error(W(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(R){De(e,e.return,R)}}break;case 3:if(Ln(t,e),nr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{wl(t.containerInfo)}catch(R){De(e,e.return,R)}break;case 4:Ln(t,e),nr(e);break;case 13:Ln(t,e),nr(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(Op=je())),r&4&&T0(e);break;case 22:if(m=n!==null&&n.memoizedState!==null,e.mode&1?(St=(g=St)||m,Ln(t,e),St=g):Ln(t,e),nr(e),r&8192){if(g=e.memoizedState!==null,(e.stateNode.isHidden=g)&&!m&&e.mode&1)for(G=e,m=e.child;m!==null;){for(S=G=m;G!==null;){switch(E=G,P=E.child,E.tag){case 0:case 11:case 14:case 15:dl(4,E,E.return);break;case 1:Ao(E,E.return);var k=E.stateNode;if(typeof k.componentWillUnmount=="function"){r=E,n=E.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(R){De(r,n,R)}}break;case 5:Ao(E,E.return);break;case 22:if(E.memoizedState!==null){z0(S);continue}}P!==null?(P.return=E,G=P):z0(S)}m=m.sibling}e:for(m=null,S=e;;){if(S.tag===5){if(m===null){m=S;try{s=S.stateNode,g?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(h=S.stateNode,f=S.memoizedProps.style,u=f!=null&&f.hasOwnProperty("display")?f.display:null,h.style.display=G0("display",u))}catch(R){De(e,e.return,R)}}}else if(S.tag===6){if(m===null)try{S.stateNode.nodeValue=g?"":S.memoizedProps}catch(R){De(e,e.return,R)}}else if((S.tag!==22&&S.tag!==23||S.memoizedState===null||S===e)&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===e)break e;for(;S.sibling===null;){if(S.return===null||S.return===e)break e;m===S&&(m=null),S=S.return}m===S&&(m=null),S.sibling.return=S.return,S=S.sibling}}break;case 19:Ln(t,e),nr(e),r&4&&T0(e);break;case 21:break;default:Ln(t,e),nr(e)}}function nr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ww(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ml(s,""),r.flags&=-33);var l=C0(e);Xf(e,l,s);break;case 3:case 4:var u=r.stateNode.containerInfo,h=C0(e);Gf(e,h,u);break;default:throw Error(W(161))}}catch(f){De(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function U_(e,t,n){G=e,Ew(e,t,n)}function Ew(e,t,n){for(var r=(e.mode&1)!==0;G!==null;){var s=G,l=s.child;if(s.tag===22&&r){var u=s.memoizedState!==null||Tu;if(!u){var h=s.alternate,f=h!==null&&h.memoizedState!==null||St;h=Tu;var g=St;if(Tu=u,(St=f)&&!g)for(G=s;G!==null;)u=G,f=u.child,u.tag===22&&u.memoizedState!==null?I0(s):f!==null?(f.return=u,G=f):I0(s);for(;l!==null;)G=l,Ew(l,t,n),l=l.sibling;G=s,Tu=h,St=g}R0(e,t,n)}else s.subtreeFlags&8772&&l!==null?(l.return=s,G=l):R0(e,t,n)}}function R0(e){for(;G!==null;){var t=G;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:St||vc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!St)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Nn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&d0(t,l,r);break;case 3:var u=t.updateQueue;if(u!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}d0(t,u,n)}break;case 5:var h=t.stateNode;if(n===null&&t.flags&4){n=h;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var g=t.alternate;if(g!==null){var m=g.memoizedState;if(m!==null){var S=m.dehydrated;S!==null&&wl(S)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}St||t.flags&512&&Qf(t)}catch(E){De(t,t.return,E)}}if(t===e){G=null;break}if(n=t.sibling,n!==null){n.return=t.return,G=n;break}G=t.return}}function z0(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var n=t.sibling;if(n!==null){n.return=t.return,G=n;break}G=t.return}}function I0(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vc(4,t)}catch(f){De(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(f){De(t,s,f)}}var l=t.return;try{Qf(t)}catch(f){De(t,l,f)}break;case 5:var u=t.return;try{Qf(t)}catch(f){De(t,u,f)}}}catch(f){De(t,t.return,f)}if(t===e){G=null;break}var h=t.sibling;if(h!==null){h.return=t.return,G=h;break}G=t.return}}var V_=Math.ceil,ic=Rr.ReactCurrentDispatcher,Lp=Rr.ReactCurrentOwner,yn=Rr.ReactCurrentBatchConfig,ae=0,nt=null,He=null,at=0,Zt=0,Do=fi(0),Ye=0,Il=null,Qi=0,yc=0,Np=0,hl=null,Wt=null,Op=0,Ko=1/0,wr=null,oc=!1,Yf=null,li=null,Ru=!1,ti=null,sc=0,fl=0,Zf=null,Au=-1,Du=0;function Rt(){return ae&6?je():Au!==-1?Au:Au=je()}function ai(e){return e.mode&1?ae&2&&at!==0?at&-at:T_.transition!==null?(Du===0&&(Du=o1()),Du):(e=he,e!==0||(e=window.event,e=e===void 0?16:h1(e.type)),e):1}function An(e,t,n,r){if(50<fl)throw fl=0,Zf=null,Error(W(185));Ll(e,n,r),(!(ae&2)||e!==nt)&&(e===nt&&(!(ae&2)&&(yc|=n),Ye===4&&Jr(e,at)),Ht(e,r),n===1&&ae===0&&!(t.mode&1)&&(Ko=je()+500,pc&&pi()))}function Ht(e,t){var n=e.callbackNode;z2(e,t);var r=Uu(e,e===nt?at:0);if(r===0)n!==null&&Wy(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Wy(n),t===1)e.tag===0?C_(L0.bind(null,e)):L1(L0.bind(null,e)),E_(function(){!(ae&6)&&pi()}),n=null;else{switch(s1(r)){case 1:n=op;break;case 4:n=r1;break;case 16:n=Hu;break;case 536870912:n=i1;break;default:n=Hu}n=Iw(n,_w.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _w(e,t){if(Au=-1,Du=0,ae&6)throw Error(W(327));var n=e.callbackNode;if(Uo()&&e.callbackNode!==n)return null;var r=Uu(e,e===nt?at:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=lc(e,r);else{t=r;var s=ae;ae|=2;var l=kw();(nt!==e||at!==t)&&(wr=null,Ko=je()+500,ji(e,t));do try{X_();break}catch(h){Pw(e,h)}while(!0);yp(),ic.current=l,ae=s,He!==null?t=0:(nt=null,at=0,t=Ye)}if(t!==0){if(t===2&&(s=Ef(e),s!==0&&(r=s,t=Kf(e,s))),t===1)throw n=Il,ji(e,0),Jr(e,r),Ht(e,je()),n;if(t===6)Jr(e,r);else{if(s=e.current.alternate,!(r&30)&&!Q_(s)&&(t=lc(e,r),t===2&&(l=Ef(e),l!==0&&(r=l,t=Kf(e,l))),t===1))throw n=Il,ji(e,0),Jr(e,r),Ht(e,je()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Ai(e,Wt,wr);break;case 3:if(Jr(e,r),(r&130023424)===r&&(t=Op+500-je(),10<t)){if(Uu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Rt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=If(Ai.bind(null,e,Wt,wr),t);break}Ai(e,Wt,wr);break;case 4:if(Jr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var u=31-Mn(r);l=1<<u,u=t[u],u>s&&(s=u),r&=~l}if(r=s,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*V_(r/1960))-r,10<r){e.timeoutHandle=If(Ai.bind(null,e,Wt,wr),r);break}Ai(e,Wt,wr);break;case 5:Ai(e,Wt,wr);break;default:throw Error(W(329))}}}return Ht(e,je()),e.callbackNode===n?_w.bind(null,e):null}function Kf(e,t){var n=hl;return e.current.memoizedState.isDehydrated&&(ji(e,t).flags|=256),e=lc(e,t),e!==2&&(t=Wt,Wt=n,t!==null&&$f(t)),e}function $f(e){Wt===null?Wt=e:Wt.push.apply(Wt,e)}function Q_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],l=s.getSnapshot;s=s.value;try{if(!Dn(l(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Jr(e,t){for(t&=~Np,t&=~yc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mn(t),r=1<<n;e[n]=-1,t&=~r}}function L0(e){if(ae&6)throw Error(W(327));Uo();var t=Uu(e,0);if(!(t&1))return Ht(e,je()),null;var n=lc(e,t);if(e.tag!==0&&n===2){var r=Ef(e);r!==0&&(t=r,n=Kf(e,r))}if(n===1)throw n=Il,ji(e,0),Jr(e,t),Ht(e,je()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ai(e,Wt,wr),Ht(e,je()),null}function Fp(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Ko=je()+500,pc&&pi())}}function Gi(e){ti!==null&&ti.tag===0&&!(ae&6)&&Uo();var t=ae;ae|=1;var n=yn.transition,r=he;try{if(yn.transition=null,he=1,e)return e()}finally{he=r,yn.transition=n,ae=t,!(ae&6)&&pi()}}function Mp(){Zt=Do.current,Ee(Do)}function ji(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,x_(n)),He!==null)for(n=He.return;n!==null;){var r=n;switch(mp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yu();break;case 3:Yo(),Ee(jt),Ee(xt),Pp();break;case 5:_p(r);break;case 4:Yo();break;case 13:Ee(Ne);break;case 19:Ee(Ne);break;case 10:wp(r.type._context);break;case 22:case 23:Mp()}n=n.return}if(nt=e,He=e=ui(e.current,null),at=Zt=t,Ye=0,Il=null,Np=yc=Qi=0,Wt=hl=null,Wi!==null){for(t=0;t<Wi.length;t++)if(n=Wi[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,l=n.pending;if(l!==null){var u=l.next;l.next=s,r.next=u}n.pending=r}Wi=null}return e}function Pw(e,t){do{var n=He;try{if(yp(),Ou.current=rc,nc){for(var r=Oe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}nc=!1}if(Vi=0,tt=Xe=Oe=null,cl=!1,Tl=0,Lp.current=null,n===null||n.return===null){Ye=1,Il=t,He=null;break}e:{var l=e,u=n.return,h=n,f=t;if(t=at,h.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var g=f,m=h,S=m.tag;if(!(m.mode&1)&&(S===0||S===11||S===15)){var E=m.alternate;E?(m.updateQueue=E.updateQueue,m.memoizedState=E.memoizedState,m.lanes=E.lanes):(m.updateQueue=null,m.memoizedState=null)}var P=y0(u);if(P!==null){P.flags&=-257,w0(P,u,h,l,t),P.mode&1&&v0(l,g,t),t=P,f=g;var k=t.updateQueue;if(k===null){var R=new Set;R.add(f),t.updateQueue=R}else k.add(f);break e}else{if(!(t&1)){v0(l,g,t),Ap();break e}f=Error(W(426))}}else if(ke&&h.mode&1){var A=y0(u);if(A!==null){!(A.flags&65536)&&(A.flags|=256),w0(A,u,h,l,t),gp(Zo(f,h));break e}}l=f=Zo(f,h),Ye!==4&&(Ye=2),hl===null?hl=[l]:hl.push(l),l=u;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var x=lw(l,f,t);c0(l,x);break e;case 1:h=f;var w=l.type,_=l.stateNode;if(!(l.flags&128)&&(typeof w.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(li===null||!li.has(_)))){l.flags|=65536,t&=-t,l.lanes|=t;var L=aw(l,h,t);c0(l,L);break e}}l=l.return}while(l!==null)}Tw(n)}catch(O){t=O,He===n&&n!==null&&(He=n=n.return);continue}break}while(!0)}function kw(){var e=ic.current;return ic.current=rc,e===null?rc:e}function Ap(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),nt===null||!(Qi&268435455)&&!(yc&268435455)||Jr(nt,at)}function lc(e,t){var n=ae;ae|=2;var r=kw();(nt!==e||at!==t)&&(wr=null,ji(e,t));do try{G_();break}catch(s){Pw(e,s)}while(!0);if(yp(),ae=n,ic.current=r,He!==null)throw Error(W(261));return nt=null,at=0,Ye}function G_(){for(;He!==null;)Cw(He)}function X_(){for(;He!==null&&!S2();)Cw(He)}function Cw(e){var t=zw(e.alternate,e,Zt);e.memoizedProps=e.pendingProps,t===null?Tw(e):He=t,Lp.current=null}function Tw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=j_(n,t),n!==null){n.flags&=32767,He=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ye=6,He=null;return}}else if(n=B_(n,t,Zt),n!==null){He=n;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Ye===0&&(Ye=5)}function Ai(e,t,n){var r=he,s=yn.transition;try{yn.transition=null,he=1,Y_(e,t,n,r)}finally{yn.transition=s,he=r}return null}function Y_(e,t,n,r){do Uo();while(ti!==null);if(ae&6)throw Error(W(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(I2(e,l),e===nt&&(He=nt=null,at=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ru||(Ru=!0,Iw(Hu,function(){return Uo(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=yn.transition,yn.transition=null;var u=he;he=1;var h=ae;ae|=4,Lp.current=null,H_(e,n),xw(n,e),g_(Rf),Vu=!!Tf,Rf=Tf=null,e.current=n,U_(n,e,s),x2(),ae=h,he=u,yn.transition=l}else e.current=n;if(Ru&&(Ru=!1,ti=e,sc=s),l=e.pendingLanes,l===0&&(li=null),P2(n.stateNode,r),Ht(e,je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(oc)throw oc=!1,e=Yf,Yf=null,e;return sc&1&&e.tag!==0&&Uo(),l=e.pendingLanes,l&1?e===Zf?fl++:(fl=0,Zf=e):fl=0,pi(),null}function Uo(){if(ti!==null){var e=s1(sc),t=yn.transition,n=he;try{if(yn.transition=null,he=16>e?16:e,ti===null)var r=!1;else{if(e=ti,ti=null,sc=0,ae&6)throw Error(W(331));var s=ae;for(ae|=4,G=e.current;G!==null;){var l=G,u=l.child;if(G.flags&16){var h=l.deletions;if(h!==null){for(var f=0;f<h.length;f++){var g=h[f];for(G=g;G!==null;){var m=G;switch(m.tag){case 0:case 11:case 15:dl(8,m,l)}var S=m.child;if(S!==null)S.return=m,G=S;else for(;G!==null;){m=G;var E=m.sibling,P=m.return;if(yw(m),m===g){G=null;break}if(E!==null){E.return=P,G=E;break}G=P}}}var k=l.alternate;if(k!==null){var R=k.child;if(R!==null){k.child=null;do{var A=R.sibling;R.sibling=null,R=A}while(R!==null)}}G=l}}if(l.subtreeFlags&2064&&u!==null)u.return=l,G=u;else e:for(;G!==null;){if(l=G,l.flags&2048)switch(l.tag){case 0:case 11:case 15:dl(9,l,l.return)}var x=l.sibling;if(x!==null){x.return=l.return,G=x;break e}G=l.return}}var w=e.current;for(G=w;G!==null;){u=G;var _=u.child;if(u.subtreeFlags&2064&&_!==null)_.return=u,G=_;else e:for(u=w;G!==null;){if(h=G,h.flags&2048)try{switch(h.tag){case 0:case 11:case 15:vc(9,h)}}catch(O){De(h,h.return,O)}if(h===u){G=null;break e}var L=h.sibling;if(L!==null){L.return=h.return,G=L;break e}G=h.return}}if(ae=s,pi(),or&&typeof or.onPostCommitFiberRoot=="function")try{or.onPostCommitFiberRoot(uc,e)}catch{}r=!0}return r}finally{he=n,yn.transition=t}}return!1}function N0(e,t,n){t=Zo(n,t),t=lw(e,t,1),e=si(e,t,1),t=Rt(),e!==null&&(Ll(e,1,t),Ht(e,t))}function De(e,t,n){if(e.tag===3)N0(e,e,n);else for(;t!==null;){if(t.tag===3){N0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(li===null||!li.has(r))){e=Zo(n,e),e=aw(t,e,1),t=si(t,e,1),e=Rt(),t!==null&&(Ll(t,1,e),Ht(t,e));break}}t=t.return}}function Z_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rt(),e.pingedLanes|=e.suspendedLanes&n,nt===e&&(at&n)===n&&(Ye===4||Ye===3&&(at&130023424)===at&&500>je()-Op?ji(e,0):Np|=n),Ht(e,t)}function Rw(e,t){t===0&&(e.mode&1?(t=pu,pu<<=1,!(pu&130023424)&&(pu=4194304)):t=1);var n=Rt();e=Cr(e,t),e!==null&&(Ll(e,t,n),Ht(e,n))}function K_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rw(e,n)}function $_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),Rw(e,n)}var zw;zw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)Bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Bt=!1,W_(e,t,n);Bt=!!(e.flags&131072)}else Bt=!1,ke&&t.flags&1048576&&N1(t,$u,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mu(e,t),e=t.pendingProps;var s=Qo(t,xt.current);Ho(t,n),s=Cp(null,t,r,e,s,n);var l=Tp();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bt(r)?(l=!0,Zu(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,xp(t),s.updater=mc,t.stateNode=s,s._reactInternals=t,Df(t,r,e,n),t=jf(null,t,r,!0,l,n)):(t.tag=0,ke&&l&&pp(t),Tt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mu(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=J_(r),e=Nn(r,e),s){case 0:t=Bf(null,t,r,e,n);break e;case 1:t=E0(null,t,r,e,n);break e;case 11:t=S0(null,t,r,e,n);break e;case 14:t=x0(null,t,r,Nn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),Bf(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),E0(e,t,r,s,n);case 3:e:{if(hw(t),e===null)throw Error(W(387));r=t.pendingProps,l=t.memoizedState,s=l.element,A1(e,t),ec(t,r,null,n);var u=t.memoizedState;if(r=u.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=Zo(Error(W(423)),t),t=_0(e,t,r,n,s);break e}else if(r!==s){s=Zo(Error(W(424)),t),t=_0(e,t,r,n,s);break e}else for(Kt=oi(t.stateNode.containerInfo.firstChild),$t=t,ke=!0,Fn=null,n=j1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Go(),r===s){t=Tr(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return b1(t),e===null&&Ff(t),r=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,u=s.children,zf(r,s)?u=null:l!==null&&zf(r,l)&&(t.flags|=32),dw(e,t),Tt(e,t,u,n),t.child;case 6:return e===null&&Ff(t),null;case 13:return fw(e,t,n);case 4:return Ep(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xo(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),S0(e,t,r,s,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,l=t.memoizedProps,u=s.value,ve(qu,r._currentValue),r._currentValue=u,l!==null)if(Dn(l.value,u)){if(l.children===s.children&&!jt.current){t=Tr(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var h=l.dependencies;if(h!==null){u=l.child;for(var f=h.firstContext;f!==null;){if(f.context===r){if(l.tag===1){f=_r(-1,n&-n),f.tag=2;var g=l.updateQueue;if(g!==null){g=g.shared;var m=g.pending;m===null?f.next=f:(f.next=m.next,m.next=f),g.pending=f}}l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),Mf(l.return,n,t),h.lanes|=n;break}f=f.next}}else if(l.tag===10)u=l.type===t.type?null:l.child;else if(l.tag===18){if(u=l.return,u===null)throw Error(W(341));u.lanes|=n,h=u.alternate,h!==null&&(h.lanes|=n),Mf(u,n,t),u=l.sibling}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===t){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}Tt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ho(t,n),s=wn(s),r=r(s),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,s=Nn(r,t.pendingProps),s=Nn(r.type,s),x0(e,t,r,s,n);case 15:return uw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),Mu(e,t),t.tag=1,bt(r)?(e=!0,Zu(t)):e=!1,Ho(t,n),W1(t,r,s),Df(t,r,s,n),jf(null,t,r,!0,e,n);case 19:return pw(e,t,n);case 22:return cw(e,t,n)}throw Error(W(156,t.tag))};function Iw(e,t){return n1(e,t)}function q_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,r){return new q_(e,t,n,r)}function Dp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function J_(e){if(typeof e=="function")return Dp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===np)return 11;if(e===rp)return 14}return 2}function ui(e,t){var n=e.alternate;return n===null?(n=vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wu(e,t,n,r,s,l){var u=2;if(r=e,typeof e=="function")Dp(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case To:return bi(n.children,s,l,t);case tp:u=8,s|=8;break;case lf:return e=vn(12,n,t,s|2),e.elementType=lf,e.lanes=l,e;case af:return e=vn(13,n,t,s),e.elementType=af,e.lanes=l,e;case uf:return e=vn(19,n,t,s),e.elementType=uf,e.lanes=l,e;case B0:return wc(n,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D0:u=10;break e;case W0:u=9;break e;case np:u=11;break e;case rp:u=14;break e;case Kr:u=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=vn(u,n,t,s),t.elementType=e,t.type=r,t.lanes=l,t}function bi(e,t,n,r){return e=vn(7,e,r,t),e.lanes=n,e}function wc(e,t,n,r){return e=vn(22,e,r,t),e.elementType=B0,e.lanes=n,e.stateNode={isHidden:!1},e}function rf(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function of(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function eP(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bh(0),this.expirationTimes=bh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Wp(e,t,n,r,s,l,u,h,f){return e=new eP(e,t,n,h,f),t===1?(t=1,l===!0&&(t|=8)):t=0,l=vn(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},xp(l),e}function tP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Co,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Lw(e){if(!e)return di;e=e._reactInternals;e:{if(Yi(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(bt(n))return I1(e,n,t)}return t}function Nw(e,t,n,r,s,l,u,h,f){return e=Wp(n,r,!0,e,s,l,u,h,f),e.context=Lw(null),n=e.current,r=Rt(),s=ai(n),l=_r(r,s),l.callback=t??null,si(n,l,s),e.current.lanes=s,Ll(e,s,r),Ht(e,r),e}function Sc(e,t,n,r){var s=t.current,l=Rt(),u=ai(s);return n=Lw(n),t.context===null?t.context=n:t.pendingContext=n,t=_r(l,u),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=si(s,t,u),e!==null&&(An(e,s,u,l),Nu(e,s,u)),u}function ac(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function O0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Bp(e,t){O0(e,t),(e=e.alternate)&&O0(e,t)}function nP(){return null}var Ow=typeof reportError=="function"?reportError:function(e){console.error(e)};function jp(e){this._internalRoot=e}xc.prototype.render=jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Sc(e,t,null,null)};xc.prototype.unmount=jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){Sc(null,e,null,null)}),t[kr]=null}};function xc(e){this._internalRoot=e}xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=u1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qr.length&&t!==0&&t<qr[n].priority;n++);qr.splice(n,0,e),n===0&&d1(e)}};function bp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function F0(){}function rP(e,t,n,r,s){if(s){if(typeof r=="function"){var l=r;r=function(){var g=ac(u);l.call(g)}}var u=Nw(t,r,e,0,null,!1,!1,"",F0);return e._reactRootContainer=u,e[kr]=u.current,El(e.nodeType===8?e.parentNode:e),Gi(),u}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var h=r;r=function(){var g=ac(f);h.call(g)}}var f=Wp(e,0,!1,null,null,!1,!1,"",F0);return e._reactRootContainer=f,e[kr]=f.current,El(e.nodeType===8?e.parentNode:e),Gi(function(){Sc(t,f,n,r)}),f}function _c(e,t,n,r,s){var l=n._reactRootContainer;if(l){var u=l;if(typeof s=="function"){var h=s;s=function(){var f=ac(u);h.call(f)}}Sc(t,u,e,s)}else u=rP(n,t,e,s,r);return ac(u)}l1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=rl(t.pendingLanes);n!==0&&(sp(t,n|1),Ht(t,je()),!(ae&6)&&(Ko=je()+500,pi()))}break;case 13:Gi(function(){var r=Cr(e,1);if(r!==null){var s=Rt();An(r,e,1,s)}}),Bp(e,1)}};lp=function(e){if(e.tag===13){var t=Cr(e,134217728);if(t!==null){var n=Rt();An(t,e,134217728,n)}Bp(e,134217728)}};a1=function(e){if(e.tag===13){var t=ai(e),n=Cr(e,t);if(n!==null){var r=Rt();An(n,e,t,r)}Bp(e,t)}};u1=function(){return he};c1=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};wf=function(e,t,n){switch(t){case"input":if(hf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=fc(r);if(!s)throw Error(W(90));b0(r),hf(r,s)}}}break;case"textarea":U0(e,n);break;case"select":t=n.value,t!=null&&Wo(e,!!n.multiple,t,!1)}};K0=Fp;$0=Gi;var iP={usingClientEntryPoint:!1,Events:[Ol,Lo,fc,Y0,Z0,Fp]},Js={findFiberByHostInstance:Di,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},oP={bundleType:Js.bundleType,version:Js.version,rendererPackageName:Js.rendererPackageName,rendererConfig:Js.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=e1(e),e===null?null:e.stateNode},findFiberByHostInstance:Js.findFiberByHostInstance||nP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(el=__REACT_DEVTOOLS_GLOBAL_HOOK__,!el.isDisabled&&el.supportsFiber))try{uc=el.inject(oP),or=el}catch{}var el;en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iP;en.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bp(t))throw Error(W(200));return tP(e,t,null,n)};en.createRoot=function(e,t){if(!bp(e))throw Error(W(299));var n=!1,r="",s=Ow;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Wp(e,1,!1,null,null,n,!1,r,s),e[kr]=t.current,El(e.nodeType===8?e.parentNode:e),new jp(t)};en.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=e1(t),e=e===null?null:e.stateNode,e};en.flushSync=function(e){return Gi(e)};en.hydrate=function(e,t,n){if(!Ec(t))throw Error(W(200));return _c(null,e,t,!0,n)};en.hydrateRoot=function(e,t,n){if(!bp(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,s=!1,l="",u=Ow;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),t=Nw(t,null,e,1,n??null,s,!1,l,u),e[kr]=t.current,El(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new xc(t)};en.render=function(e,t,n){if(!Ec(t))throw Error(W(200));return _c(null,e,t,!1,n)};en.unmountComponentAtNode=function(e){if(!Ec(e))throw Error(W(40));return e._reactRootContainer?(Gi(function(){_c(null,null,e,!1,function(){e._reactRootContainer=null,e[kr]=null})}),!0):!1};en.unstable_batchedUpdates=Fp;en.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ec(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return _c(e,t,n,!1,r)};en.version="18.2.0-next-9e3b772b8-20220608"});var Hp=gt((qz,Aw)=>{"use strict";function Mw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mw)}catch(e){console.error(e)}}Mw(),Aw.exports=Fw()});var Ww=gt(Up=>{"use strict";var Dw=Hp();Up.createRoot=Dw.createRoot,Up.hydrateRoot=Dw.hydrateRoot;var Jz});var nk={};aE(nk,{Atlas:()=>Fh,AtlasAuto:()=>i2,AtlasContext:()=>qn,BoundsContext:()=>Gr,Box:()=>Rn,BrowserEventManager:()=>Ni,CanvasRenderer:()=>Ls,CompositeRenderer:()=>Ri,CompositeResource:()=>Cs,DebugRenderer:()=>Ns,DrawBox:()=>o2,Geometry:()=>Ti,GridBuilder:()=>oh,HTMLPortal:()=>Pc,ImageService:()=>ZP,ImageTexture:()=>Vr,ModeContext:()=>$n,ModeProvider:()=>QE,OverlayRenderer:()=>Li,ReactAtlas:()=>So,RegionHighlight:()=>sP,ResizeWorldItem:()=>Xp,Runtime:()=>Kn,SingleImage:()=>Ge,StaticRenderer:()=>Vs,Text:()=>yr,TileSet:()=>Zp,TiledImage:()=>dn,WebGLRenderer:()=>bs,World:()=>hn,WorldObject:()=>Zn,Zone:()=>Jd,activateEvents:()=>Lh,applyProps:()=>Ih,bounceOut:()=>Rs,canDrag:()=>ek,createDefaultEventMap:()=>$d,defaultConfig:()=>Nv,defaultPreset:()=>Us,easingFunctions:()=>zn,fromImage:()=>cE,getId:()=>Kp,getTileFromCanvas:()=>yS,getTileFromImageService:()=>Oc,getTiles:()=>YP,getTilesFromManifest:()=>wS,mergeStyles:()=>tk,popmotionController:()=>Os,presets:()=>Oh,staticPreset:()=>Nh,supportedEventAttributes:()=>mo,supportedEventMap:()=>Tn,unmountComponentAtNode:()=>wo,useAfterFrame:()=>Mh,useAfterPaint:()=>KP,useAtlas:()=>Gs,useAtlasImage:()=>$P,useBeforeFrame:()=>qP,useCanvas:()=>Ah,useControlledAnnotationList:()=>JP,useFrame:()=>Fi,useMode:()=>Ms,useResizeWorldItem:()=>Gp,useRuntime:()=>st,useWorldEvent:()=>kc});var mo=["onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onScroll","onWheel","onClick","onDragStart","onDragEnd","onDragEnter","onDragExit","onDrag","onDragOver"];function $d(){return mo.reduce((e,t)=>(e[t]=[],e),{})}var Tn=mo.reduce((e,t)=>(e[t.slice(2).toLowerCase()]=t,e[t]=t,e),{});var Ur=(e,t,n)=>{let r=e.length,s=n||V(r);for(let l=0;l<r;l++)s[l]=l%5===0?e[l+1]<t[3]&&e[l+3]>t[1]&&e[l+2]<t[4]&&e[l+4]>t[2]?1:0:e[l];return s};function V(e,t,n){return new Float32Array(e,t,n)}var Gg=(e,t,n)=>{let r=e[1]<=t[3]&&e[3]>=t[1]&&e[2]<=t[4]&&e[4]>=t[2],s=n||V(5);return r?(s[0]=1,s[1]=Math.max(e[1],t[1]),s[2]=Math.max(e[2],t[2]),s[3]=Math.min(e[3],t[3]),s[4]=Math.min(e[4],t[4]),s):(s[0]=0,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s)},Xg=e=>e.length/5;var At=(e,t,n)=>{let r=n||V(9);return r[0]=e[0]*t[0]+e[1]*t[3]+e[2]*t[6],r[1]=e[0]*t[1]+e[1]*t[4]+e[2]*t[7],r[2]=e[0]*t[2]+e[1]*t[5]+e[2]*t[8],r[3]=e[3]*t[0]+e[4]*t[3]+e[5]*t[6],r[4]=e[3]*t[1]+e[4]*t[4]+e[5]*t[7],r[5]=e[3]*t[2]+e[4]*t[5]+e[5]*t[8],r[6]=e[6]*t[0]+e[7]*t[3]+e[8]*t[6],r[7]=e[6]*t[1]+e[7]*t[4]+e[8]*t[7],r[8]=e[6]*t[2]+e[7]*t[5]+e[8]*t[8],r},ee=class e{constructor(t){this.index=0,this.length=t,this.points=V(this.length)}static grid(t=1,n=1){return new e(5*t*n)}static point(t,n){let r=V(5);return r[0]=1,r[1]=t,r[2]=n,r[3]=t,r[4]=n,r}static positionPair(t){let n=V(5);return n[0]=1,n[1]=t.x1,n[2]=t.y1,n[3]=t.x2,n[4]=t.y2,n}static projection(t){return e.singleBox(t.width,t.height,t.x,t.y)}static singleBox(t,n,r=0,s=0){let l=V(5);return l[0]=1,l[1]=r,l[2]=s,l[3]=t+r,l[4]=n+s,l}row(t){return t(this)}addPoints(t,n,r,s){return this.points[this.index]=1,this.points[1+this.index]=t,this.points[2+this.index]=n,this.points[3+this.index]=r,this.points[4+this.index]=s,this.index+=5,this}addBox(t,n,r,s){return this.addPoints(t,n,t+r,n+s),this}build(){return this.points}};var Pt=(e,t)=>{let n=e.length;for(let r=0;r<n;r++)e[r]=r%5===0?t[6]*e[r+1]+t[7]*e[r+2]+t[8]*e[r]:r%5%2===1?t[0]*e[r]+t[1]*e[r+1]+t[2]:t[3]*e[r-1]+t[4]*e[r]+t[5];return e},Qt=e=>{let t=V(9);return t[0]=e,t[4]=e,t[8]=1,t},Re=(e,t)=>{let n=V(9);return n[0]=1,n[2]=e,n[4]=1,n[5]=t,n[8]=1,n},vr=(e,t,n)=>At(Re((1-e)*t,(1-e)*n),Qt(e)),Gt=(e,t,n)=>{let r=e.length,s=n&&n.length>=r?n.slice(0,r):V(r);for(let l=0;l<r;l++)s[l]=l%5===0?t[6]*e[l+1]+t[7]*e[l+2]+t[8]*e[l]:l%5%2===1?t[0]*e[l]+t[1]*e[l+1]+t[2]:t[3]*e[l-1]+t[4]*e[l]+t[5];return s};var Yg="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Yn=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=Yg[n[e]&63];return t};var Ae=class{constructor(){v(this,"__id");v(this,"__revision",0);v(this,"__host");v(this,"__onCreate");v(this,"__parent");v(this,"__owner",{value:void 0});v(this,"__state",{});v(this,"eventHandlers");v(this,"scale",1);v(this,"layers",[]);v(this,"time",[]);v(this,"_crop");v(this,"cropData");v(this,"id");v(this,"addEventListener",(t,n,r)=>{let s=Tn[t];if(!this.eventHandlers[s])throw new Error(`Unknown event ${s}`);this.eventHandlers[s].indexOf(n)===-1&&this.eventHandlers[s].push(n)});v(this,"removeEventListener",(t,n)=>{let r=Tn[t];if(!this.eventHandlers[r]){console.warn(`Unknown event ${r}`);return}this.eventHandlers[r].indexOf(n)!==-1&&(this.eventHandlers[r]=this.eventHandlers[r].filter(s=>s!==n))});this.id=this.__id=Yn(),this.eventHandlers=$d()}get crop(){return this._crop}set crop(t){this._crop=t}getObjectsAt(t){return[]}getAllPointsAt(t,n,r){return[]}getScheduledUpdates(t,n){return[]}dispatchEvent(t,n){let r=this.eventHandlers[t],s=r?r.length:0,l=!1;if(s)for(let u=0;u<s;u++)try{r[u](n),l=!0}catch(h){console.error(t,h)}return l}get x(){return this.points[1]}get y(){return this.points[2]}get width(){return this.points[3]-this.points[1]}get height(){return this.points[4]-this.points[2]}translate(t,n){Pt(this.points,Re(t,n))}atScale(t){Pt(this.points,vr(t,this.x,this.y)),this.scale*=t}transform(t){Pt(this.points,t)}applyProps(t){this.__revision++}appendChild(t){}removeChild(t){}insertBefore(t,n){}hideInstance(){}};var Ge=class e extends Ae{constructor(n){super();v(this,"type","spacial-content");v(this,"id");v(this,"uri");v(this,"display");v(this,"points");v(this,"priority");v(this,"style",{opacity:1});if(!n)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:V(5)},this.points=V(5);else{let r=n.scale||1;this.id=n.id||n.uri,this.uri=n.uri,this.points=ee.singleBox(n.width,n.height,n.x,n.y),this.display={x:0,y:0,scale:r,width:n.width/r,height:n.height/r,points:ee.singleBox(n.width/r,n.height/r),rotation:n?.rotation}}}applyProps(n){let r=n.display?n.display.width:n.target.width,s=n.target.width/r;if(this.id=n.id||n.uri,this.uri=n.uri,this.points.set(ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y)),n.style&&typeof n.style.opacity<"u"&&(this.style.opacity=n.style.opacity),n.crop){this.cropData=n.crop;let l=ee.singleBox(n.crop.width,n.crop.height,n.crop.x,n.crop.y);Pt(l,Re(-n.crop.x,-n.crop.y)),this.crop?this.crop.set(l):this.crop=V(l)}n.display?(this.display.scale=s,this.display.width=n.display.width,this.display.height=n.display.height,this.display.rotation=n.display.rotation,this.display.points=ee.singleBox(n.display.width,n.display.height)):(this.display.scale=s,this.display.width=n.target.width/s,this.display.height=n.target.height/s,this.display.points=ee.singleBox(n.target.width/s,n.target.height/s))}getAllPointsAt(n,r,s){return[[this,this.crop||this.points,r]]}static fromSvg(n,r,s,l){return e.fromImage("data:image/svg+xml;base64,"+btoa(n),r,s,l)}static fromImage(n,r,s,l){let u=new e;return u.applyProps({uri:n,id:l,display:s,target:r}),u}getImageUrl(){return this.uri}};var Vr=class extends Ae{constructor(n){super();v(this,"type","spacial-content");v(this,"id");v(this,"uri");v(this,"display");v(this,"points");v(this,"getTexture");if(this.getTexture=()=>({source:void 0,hash:-1}),!n)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:V(5)},this.points=V(5);else{let r=n.scale||1;this.id=n.id||n.uri,this.uri=n.uri,this.points=ee.singleBox(n.width,n.height),this.display={x:0,y:0,scale:r,width:n.width/r,height:n.height/r,points:r!==1?ee.singleBox(n.width/r,n.height/r):this.points}}}applyProps(n){let r=n.display?n.display.width:n.target.width,s=n.target.width/r;this.id=n.id,this.points.set(ee.singleBox(n.target.width,n.target.height)),this.display.scale=s,this.display.width=n.target.width/s,this.display.height=n.target.height/s,this.getTexture=n.getTexture,this.display.points=s!==1?ee.singleBox(n.target.width/s,n.target.height/s):this.points}getAllPointsAt(n,r,s){return[[this,this.points,r]]}};function Zg(e,t,n=1){let r=t.length;if(r===0)throw new Error("No resources passed in.");let s=0,l=1/0;for(let u=0;u<r&&!(!t[u]||!t[u].display);u++){let h=qd(t[u].display.scale,e/(n||1));h<l&&(l=h,s=u)}return s}function qd(e,t){return Math.abs(e-t)}function Ci(e,t){let n=qd(e.x,t.x),r=qd(e.y,t.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}function Kg(e){let t=e.length;return e.indexOf("/info.json")===t-10?e.slice(0,-10):e}function Ia(e,t,n){return Math.min(Math.max(e,t),n)}var dn=class e extends Ae{constructor(n){super();v(this,"id");v(this,"type","spacial-content");v(this,"display");v(this,"tileWidth");v(this,"style",{opacity:1});v(this,"points");v(this,"service");v(this,"format","jpg");v(this,"crop2");v(this,"version3");v(this,"tileUrl");this.tileUrl=Kg(n.url),this.id=n.id||`${this.tileUrl}--${n.scaleFactor}`,this.points=n.displayPoints?n.displayPoints:Gt(n.points,Qt(n.scaleFactor)),this.tileWidth=n.tileWidth,this.version3=n.version3,this.display={x:0,y:0,width:n.width/n.scaleFactor,height:n.height/n.scaleFactor,points:n.points,scale:n.scaleFactor},n.format&&(this.format=n.format)}applyProps(n){if(n.style&&typeof n.style.opacity<"u"&&(this.style.opacity=n.style.opacity),n.service!==this.service&&(this.service=n.service),n.format?this.format=n.format:this.format="jpg",typeof n.version3<"u"&&(this.version3=n.version3),n.crop){this.cropData=n.crop;let r=V([...this.points]),s=r.length/5,l=n.crop.x||0,u=n.crop.y||0,h=n.crop.x+n.crop.width,f=n.crop.y+n.crop.height;for(let g=0;g<s;g++){let m=g*5;r[m+1]<h&&r[m+3]>l&&r[m+2]<f&&r[m+4]>u?(r[m+1]=Ia(r[m+1],l,h),r[m+3]=Ia(r[m+3],l,h),r[m+2]=Ia(r[m+2],u,f),r[m+4]=Ia(r[m+4],u,f)):r[m]=0}Pt(r,Re(-n.crop.x,-n.crop.y)),this.crop?this.crop.set(r):this.crop=r}}static fromTile(n,r,s,l,u,h,f,g){s.height=s.height?s.height:s.width;let m=f?Math.floor(r.width/l):Math.ceil(r.width/l),S=f?Math.floor(r.height/l):Math.ceil(r.height/l),E=Math.ceil(m/s.width),P=Math.ceil(S/s.height),k=ee.grid(E,P),R=ee.grid(E,P),A=u?u["@context"]?Array.isArray(u["@context"])?u["@context"]:[u["@context"]]:[]:[],x=typeof g<"u"?g:A.indexOf("http://iiif.io/api/image/3/context.json")!==-1;for(let _=0;_<P;_++)for(let L=0;L<E;L++){let O=L*s.width,z=_*s.height;R.addPoints(O*l,z*l,L===E-1?r.width:(O+s.width)*l,_===P-1?r.height:(z+s.height)*l),k.addPoints(O,z,L===E-1?m:O+s.width,_===P-1?S:z+s.height)}let w=new e({url:n,scaleFactor:l,points:k.build(),displayPoints:R.build(),width:r.width,height:r.height,tileWidth:s.width,format:h,version3:x});return w.applyProps({service:u}),w}getImageUrl(n){let r=this.points.slice(n*5,n*5+5),s=r[3]-r[1],l=r[4]-r[2],u=Math.ceil(s/this.display.scale),h=Math.ceil(l/this.display.scale),f=`${u>this.tileWidth?this.tileWidth:u},`;return this.version3&&(f+=`${h>this.tileWidth?this.tileWidth:h}`),`${this.tileUrl}/${r[1]},${r[2]},${s},${l}/${f}/0/default.${this.format||"jpg"}`}getAllPointsAt(n,r,s){let l=Ur(this.crop||this.points,n);return[[this,l,r]]}transform(n){Pt(this.points,n)}getScheduledUpdates(n,r){return[]}};var La=class extends Ae{constructor(){super(...arguments);v(this,"type","spacial-content")}getAllPointsAt(n,r,s){return[[this,this.points,r]]}};var Cs=class extends La{constructor(n){super();v(this,"id");v(this,"display");v(this,"points");v(this,"images",[]);v(this,"allImages",[]);v(this,"scaleFactors",[]);v(this,"aggregateBuffer",V(9));v(this,"lazyLoader");v(this,"isFullyLoaded",!1);v(this,"maxScaleFactor",0);v(this,"renderOptions");v(this,"_scheduleSortByScales",!1);v(this,"_sortByScales",()=>{this._scheduleSortByScales=!1,this.allImages.sort((r,s)=>s.display.width-r.display.width),this.images=[];let n=.1;for(let r of this.allImages){if(r.display.width<this.renderOptions.minSize&&r.display.height<this.renderOptions.minSize&&!r.priority||r instanceof Ge&&(r.display.width>this.renderOptions.maxImageSize||r.display.height>this.renderOptions.maxImageSize)&&!r.priority)continue;if(Math.abs(r.display.scale-n)<.25||r.priority){let l=this.images.pop();l&&(l instanceof Ge||l.priority)?(r.priority&&this.images.push(r),this.images.push(l)):r&&this.images.push(r)}else r&&this.images.push(r);n=r.display.scale}this.images.length===0&&(this.images=[...this.allImages]),this.scaleFactors=this.images.map(r=>r.display.scale),this.maxScaleFactor=Math.max(...this.scaleFactors)});v(this,"loadFullResource",async()=>{if(!this.isFullyLoaded&&this.lazyLoader){this.isFullyLoaded=!0;let n=await this.lazyLoader();this.addImages(n)}});v(this,"fallback",[this.loadFullResource]);this.id=n.id,this.points=ee.singleBox(n.width,n.height),this.lazyLoader=n.loadFullImages,n.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:ee.singleBox(n.width,n.height),height:n.height,width:n.width,scale:1},this.renderOptions={renderSmallestFallback:!0,renderLayers:3,minSize:255,maxImageSize:2048,quality:1.5,...n.renderOptions||{}},this.addImages(n.images)}applyProps(n){typeof n.renderSmallestFallback<"u"&&n.renderSmallestFallback!==this.renderOptions.renderSmallestFallback&&(this.renderOptions.renderSmallestFallback=n.renderSmallestFallback),typeof n.renderLayers<"u"&&n.renderLayers!==this.renderOptions.renderLayers&&(this.renderOptions.renderLayers=n.renderLayers),typeof n.minSize<"u"&&n.minSize!==this.renderOptions.minSize&&(this.renderOptions.minSize=n.minSize),typeof n.maxImageSize<"u"&&n.maxImageSize!==this.renderOptions.maxImageSize&&(this.renderOptions.maxImageSize=n.maxImageSize),typeof n.quality<"u"&&n.quality!==this.renderOptions.quality&&(this.renderOptions.quality=n.quality)}appendChild(n){this.addImages([n])}removeChild(n){this.images.indexOf(n)!==-1&&(this.images=this.images.filter(r=>r!==n),this.sortByScales())}insertBefore(n,r){this.addImages([n])}hideInstance(){}addImages(n){for(let r of n)r.__parent=this,r.__owner=this.__owner;this.allImages.push(...n.filter(Boolean)),this.sortByScales()}sortByScales(){this._scheduleSortByScales=!0}getScheduledUpdates(n,r){return this._scheduleSortByScales?[this._sortByScales]:this.isFullyLoaded?[]:r>1/this.maxScaleFactor?this.fallback:[]}getAllPointsAt(n,r,s){if(this.images.length===0)return[];let l=Zg(1/(s||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),u=this.images.length,h=r?At(r,Re(this.x,this.y)):Re(this.x,this.y);if(l!==this.images.length-1&&this.images[l+1]){let f=[];for(let S=u-1;S>=l;S--)f.push(S);let g=f[0];this.renderOptions.renderLayers&&(f=f.slice(-Math.min(f.length,this.renderOptions.renderLayers))),this.renderOptions.renderSmallestFallback&&f.indexOf(g)===-1&&f.unshift(g);let m=[];for(let S=0;S<f.length;S++)m.push(...this.images[f[S]].getAllPointsAt(n,h,s));return m}return this.images[l].getAllPointsAt(n,h,s)}};function Na(e,t,n,r,s){let l=Math.PI/180*s,u=Math.cos(l),h=Math.sin(l),f=u*(n-e)+h*(r-t)+e,g=u*(r-t)-h*(n-e)+t;return[f,g]}var Zn=class e extends Ae{constructor(n,r){super();v(this,"id");v(this,"type","world-object");v(this,"scale");v(this,"layers");v(this,"points");v(this,"worldPoints");v(this,"intersectionBuffer",V(5));v(this,"aggregateBuffer",V(9));v(this,"invertedBuffer",V(9));v(this,"rotation",0);v(this,"filteredPointsBuffer");v(this,"_updatedList",[]);v(this,"geometry");let{x:s=0,y:l=0}=r||{};n?(this.id=n.id||"",this.scale=1,this.layers=n.layers,this.points=V([1,s,l,s+n.width,l+n.height]),this.worldPoints=V([1,s,l,s+n.width,l+n.height]),this.filteredPointsBuffer=V(n.layers.length*5)):(this.id="",this.scale=1,this.layers=[],this.points=V(5),this.worldPoints=V(5),this.filteredPointsBuffer=V(5))}static createWithProps(n){let r=new e;return r.applyProps(n),r}applyProps(n){let r=n.x||0,s=n.y||0;this.id=n.id;let l=typeof n.scale<"u"?n.scale:this.scale;this.points[0]=1,this.points[1]=r,this.points[2]=s,this.points[3]=r+n.width,this.points[4]=s+n.height,this.rotation=n.rotation||0,this.worldPoints[3]=this.worldPoints[1]+n.width,this.worldPoints[4]=this.worldPoints[2]+n.height,n.scale&&n.scale!==1&&this.atScale(l),this.scale=l}appendChild(n){n.points[0]===0&&n.points.set(this.points),n.__owner.value=this,this.addLayers([n])}removeChild(n){this.layers=this.layers.filter(r=>r!==n),this.filteredPointsBuffer=V(this.layers.length*5)}insertBefore(n,r){let s=this.layers.indexOf(r);if(s===-1||this.layers.indexOf(n)!==-1)return;let l=this.layers.slice(0,s),u=this.layers.slice(s);this.layers=[...l,n,...u]}hideInstance(){console.warn("hideInstance: not yet implemented")}getObjectsAt(n,r){if(this.rotation&&(n=this.applyRotation(n)),Ur(this.points,n,this.filteredPointsBuffer)[0]===0)return[];let l=this.layers.length,u=[];for(let h=0;h<l;h++){let f=this.layers[h];if(r&&f.isShape){let m=Gt(f.points,Re(this.x,this.y));if(!f.intersects([n[1]-m[1],n[2]-m[2]]))continue}if(Ur(Gt(f.points,Re(this.x,this.y)),n,this.filteredPointsBuffer)[0]!==0&&u.push(f),r){let m=f;u.push(...m.getObjectsAt(n,r))}}return u}applyRotation(n){if(this.rotation){let r={x:n[1],y:n[2]},s={x:n[1],y:n[4]},l={x:n[3],y:n[2]},u={x:n[3],y:n[4]},h=this.points[1]+(this.points[3]-this.points[1])/2,f=this.points[2]+(this.points[4]-this.points[2])/2,[g,m]=Na(h,f,r.x,r.y,this.rotation),[S,E]=Na(h,f,s.x,s.y,this.rotation),[P,k]=Na(h,f,l.x,l.y,this.rotation),[R,A]=Na(h,f,u.x,u.y,this.rotation),x=Math.min(g,S,P,R),w=Math.max(g,S,P,R),_=Math.min(m,E,k,A),L=Math.max(m,E,k,A);return V([n[0],x,_,w,L])}return n}getAllPointsAt(n,r,s){let l=At(Re(this.x,this.y),Qt(this.scale),this.aggregateBuffer);this.rotation&&(n=this.applyRotation(n));let u=Gg(n,this.points,this.intersectionBuffer),h=this.layers.length,f=[],g=Gt(u,At(Qt(1/this.scale),Re(-this.x,-this.y),this.invertedBuffer)),m=r?At(r,l,this.aggregateBuffer):l,S=s*this.scale;for(let E=0;E<h;E++)f.push(...this.layers[E].getAllPointsAt(g,m,S));return f}addLayers(n){let r=[];for(let s of n)this.layers.indexOf(s)===-1&&(r.push(s),s.points.length===5&&(s.points[1]<this.worldPoints[1]/this.scale||s.points[2]<this.worldPoints[2]/this.scale||s.points[3]>this.worldPoints[3]/this.scale||s.points[4]>this.worldPoints[4]/this.scale)&&(s.crop=s.crop||V([1,Math.max(this.worldPoints[1]/this.scale,s.points[1]),Math.max(this.worldPoints[2]/this.scale,s.points[2]),Math.min(this.worldPoints[3]/this.scale,s.points[3]),Math.min(this.worldPoints[4]/this.scale,s.points[4])])));this.layers=this.layers.concat(r),this.filteredPointsBuffer=V(this.layers.length*5)}getScheduledUpdates(n,r){let s=this.layers.length;this._updatedList=[];let l=r*this.scale;for(let u=0;u<s;u++){let h=this.layers[u].getScheduledUpdates(n,l);h&&this._updatedList.push(...h)}return this._updatedList}};var hn=class e extends Ae{constructor(n=0,r=0,s=100,l="left-to-right"){super();v(this,"id","world");v(this,"_width");v(this,"_height");v(this,"aspectRatio");v(this,"viewingDirection");v(this,"aggregateBuffer",V(9));v(this,"isDirty",!1);v(this,"zones",[]);v(this,"filteredPointsBuffer");v(this,"selectedZone");v(this,"triggerQueue",[]);v(this,"activatedEvents",[]);v(this,"_updatedList",[]);v(this,"translationBuffer",V(9));v(this,"needsRecalculate",!0);v(this,"emptyPaintables",[]);v(this,"renderOrder",[]);v(this,"points");v(this,"objects",[]);v(this,"subscriptions",[]);v(this,"_propagateEventTargets",[]);v(this,"_alreadyFlushed",[]);this._width=n,this._height=r,this.aspectRatio=Number.isNaN(n/r)?1:n/r,this.viewingDirection=l,this.points=V(s*5),this.filteredPointsBuffer=V(s*5)}get x(){return 0}get y(){return 0}get width(){return this._width}get height(){return this._height}static withProps(n){let r=new e;return r.applyProps(n),r}applyProps(n){typeof n.width<"u"&&typeof n.height<"u"&&(n.width!==this._width||n.height!==this._height)&&this.resize(n.width,n.height),n.viewingDirection!==this.viewingDirection&&(this.viewingDirection=n.viewingDirection,this.triggerRepaint())}propagateTouchEvent(n,r,s){let l=[];for(let u of s)if(u.x&&u.y){let h=ee.singleBox(1,1,u.x,u.y);l.push(this.getObjectsAt(h,!0).reverse())}return l.map(u=>this.propagateEvent(n,r,u,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(n,r,s,l,u={}){let h=ee.singleBox(1,1,s,l),f=this.getObjectsAt(h,!0).reverse();return this.propagateEvent(n,r,f,u)}propagateEvent(n,r,s,{bubbles:l=!1,cancelable:u=!1}={}){r.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let h=!1;r.stopPropagation=()=>{h=!0};let f=s.length;for(let S=f-1;S>=0;S--){this._propagateEventTargets.unshift(s[S][0]);let E=s[S][1].length;if(E)for(let P=0;P<E;P++)this._propagateEventTargets.unshift(s[S][1][P])}let g=this._propagateEventTargets.length,m=!1;for(let S=0;S<g&&(r.atlasTarget=this._propagateEventTargets[S],r.atlasWorld=this,m=this._propagateEventTargets[S].dispatchEvent(n,r)||m,!h);S++);return m&&this.triggerRepaint(),this._propagateEventTargets}appendChild(n){let r=this.appendWorldObject(n);this.renderOrder.push(r/5)}removeChild(n){let r=this.objects.indexOf(n);if(r===-1){for(let s of this.objects)if(s&&s.id===n.id){this.removeChild(s);return}return}this.objects[r]=null,this.renderOrder=this.renderOrder.filter(s=>s!==r),this.points[r*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(n,r){let s=this.objects.indexOf(r);if(s===-1)return;let l=this.appendWorldObject(n);this.renderOrder.splice(s-1,0,l/5)}hideInstance(){}asWorldObject(){return null}addZone(n){this.zones.push(n)}selectZone(n){if(typeof n=="string"){let r=this.zones.length;for(let s=0;s<r;s++)if(this.zones[s].id===n){this.selectedZone=s,this.trigger("zone-changed");return}}else this.zones[n]&&(this.selectedZone=n,this.trigger("zone-changed"))}deselectZone(){this.selectedZone=void 0}getActiveZone(){if(this.selectedZone)return this.zones[this.selectedZone]}hasActiveZone(){return typeof this.selectedZone<"u"}checkResizeInternalBuffer(){if(Xg(this.points)===this.objects.length){let n=this.points,r=V(this.points.length*2);r.set(n,0),this.points=r}}appendWorldObject(n){this.checkResizeInternalBuffer();let r=this.objects.length*5,s=n.points;return n.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),n.points[1]=s[1],n.points[2]=s[2],n.points[3]=s[3],n.points[4]=s[4],this.objects.push(n),this.filteredPointsBuffer=V(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),r}recalculateWorldSize(){let n=!1;if(this.needsRecalculate){let r=new Int32Array(this.objects.length),s=new Int32Array(this.objects.length),l=this.renderOrder.length;for(let f=0;f<l;f++){let g=this.renderOrder[f];this.objects[g]&&(r[f]=this.points[g*5+3],s[f]=this.points[g*5+4])}let u=Math.max(...r);u!==this._width&&(this._width=u,n=!0);let h=Math.max(...s);h!==this._height&&(this._height=h,n=!0),n&&this.trigger("recalculate-world-size",{width:u,height:h}),this.needsRecalculate=!1}return n}addObjectAt(n,r){r.width&&!r.height?r.height=r.width/n.width*n.height:r.height&&!r.width&&(r.width=r.height/n.height*n.width),(!r||!r.width||!r.height)&&(r.width=n.width,r.height=n.height);let{width:s,x:l,y:u}=r,h=s/n.width;this.checkResizeInternalBuffer(),this.points.set(ee.singleBox(n.width,n.height,0,0),this.objects.length*5);let f=new Zn(n);return f.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(f),this.scaleWorldObject(this.objects.length-1,h),this.translateWorldObject(this.objects.length-1,l,u),this.filteredPointsBuffer=V(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,f}scaleWorldObject(n,r){Pt(this.points.subarray(n*5,n*5+5),vr(r,this.points[n*5+1],this.points[n*5+2]));let s=this.objects[n];s&&(s.atScale(r),this.triggerRepaint())}translateWorldObject(n,r,s){Pt(this.points.subarray(n*5,n*5+5),Re(r,s));let l=this.objects[n];l&&(l.translate(r,s),this.triggerRepaint())}resize(n,r){return this._width=n,this._height=r,this.aspectRatio=n/r,this.triggerRepaint(),this}getObjects(){return this.objects}getPoints(){return this.points}getPointsFromViewer(n,r){let s=ee.singleBox(n.width,n.height,n.x,n.y);return this.getPointsAt(s,r,n.scale)}addLayoutSubscriber(n){return this.subscriptions.push(n),()=>{this.subscriptions.splice(this.subscriptions.indexOf(n),1)}}getScheduledUpdates(n,r){let s=Ur(this.points,n,this.filteredPointsBuffer),l=this.objects.length;this._updatedList=[];for(let u=0;u<l;u++)if(s[u*5]!==0){if(!this.objects[u])continue;this._updatedList.push(...this.objects[u].getScheduledUpdates(n,r))}return this._updatedList}getObjectsAt(n,r=!1){let s=this.getActiveZone(),l=Ur(this.points,n,this.filteredPointsBuffer),u=this.renderOrder.length,h=[];for(let f=0;f<u;f++){let g=this.renderOrder[f];if(l[g*5]!==0){let m=this.objects[g];if(!m||s&&s.objects.indexOf(m)===-1)continue;if(m.type!=="world-object"){h.push([m,[m]]);continue}r?h.push([m,m.getObjectsAt(n,r)]):h.push([m,this.emptyPaintables])}}return h}getPointsAt(n,r,s=1){let l=this.getObjectsAt(n),u=At(Qt(s),Re(-n[1],-n[2]),this.translationBuffer),h=r?At(r,u,this.aggregateBuffer):u,f=l.length,g=[];for(let m=0;m<f;m++)l[m]&&g.push(...l[m][0].getAllPointsAt(n,h,s));return g}flushSubscriptions(){if(this.triggerQueue.length){this._alreadyFlushed=[];let n=this.triggerQueue.length;for(let r=0;r<n;r++){if(this._alreadyFlushed.indexOf(this.triggerQueue[r][0])!==-1)continue;typeof this.triggerQueue[r][1]>"u"&&this._alreadyFlushed.push(this.triggerQueue[r][0]);let s=this.subscriptions.length;for(let l=0;l<s;l++)this.subscriptions[l].apply(null,this.triggerQueue[r])}this.triggerQueue=[]}}trigger(n,r){this.triggerQueue.push([n,r])}triggerEventActivation(){this.trigger("event-activation")}triggerRepaint(){this.trigger("repaint")}gotoRegion(n){this.trigger("goto-region",n)}goHome(n=!1){this.trigger("go-home",{immediate:n})}zoomTo(n,r,s){this.trigger("zoom-to",{point:r,factor:n,stream:s})}zoomIn(n){this.trigger("zoom-to",{point:n,factor:.5})}zoomOut(n){this.trigger("zoom-to",{point:n,factor:2})}constraintBounds(n){this.trigger("constrain-bounds",{immediate:n})}};function cE(e){let{src:t,target:n}=e,r=n?n.width:e.width,s=n?n.height:e.height;return new Zn({id:t,height:s,width:r,layers:[Ge.fromImage(t,{height:s,width:r},{width:e.width,height:e.height})]})}var dE={margin:0},Jd=class{constructor(t,n={}){v(this,"id");v(this,"config");v(this,"points");v(this,"objects");this.id=t.map(r=>r.id).join("$$"),this.config={...dE,...n},this.points=V(5),this.objects=t,this.recalculateBounds()}recalculateBounds(){this.points.set([1,Math.min(...this.objects.map(t=>t.points[1]))-this.config.margin,Math.min(...this.objects.map(t=>t.points[2]))-this.config.margin,Math.max(...this.objects.map(t=>t.points[3]))+this.config.margin,Math.max(...this.objects.map(t=>t.points[4]))+this.config.margin])}getPointsAt(t,n,r){return[]}};var Oa=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,Fa={},hE=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"],Rn=class extends Ae{constructor(){super();v(this,"id");v(this,"type","spacial-content");v(this,"points");v(this,"hoverEvents",!1);v(this,"activeEvents",!1);v(this,"display",{x:0,y:0,scale:1,width:-1,height:-1,points:V(5)});v(this,"_parsed",{border:{id:null,match:[]},outline:{id:null,match:[]}});v(this,"hovering");v(this,"pressing");v(this,"props",{});v(this,"addHover",()=>{this.hovering=!0,this.__revision++});v(this,"removeHover",()=>{this.hovering=!1,this.pressing=!1,this.__revision++});v(this,"addPress",()=>{this.pressing=!0,this.__revision++});v(this,"removePress",()=>{this.pressing=!1,this.__revision++});this.id=Yn(12),this.points=V(5)}getAllPointsAt(n,r){return[[this,this.points,r]]}applyProps(n={}){let r=!1;if(n.interactive!==this.props.interactive&&(r=!0,this.props.interactive=n.interactive),n.style){let s=n.border||n.style.border;if(s!==this._parsed.border.id)if(!s)this._parsed.border.id=null,this._parsed.border.match=[];else{let l=Fa[s]||Oa.exec(s)||Oa.exec(s);l&&(this._parsed.border.id=s,this._parsed.border.match=Fa[s]=l)}if(this._parsed.border.id&&(n.style.borderWidth=this._parsed.border.match[1],n.style.borderStyle="solid",n.style.borderColor=this._parsed.border.match[4]),n.style.outline!==this._parsed.outline.id)if(!n.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let l=Fa[n.style.outline]||Oa.exec(n.style.outline)||Oa.exec(n.style.outline);l&&(this._parsed.outline.id=n.style.outline,this._parsed.outline.match=Fa[n.style.outline]=l)}this._parsed.outline.id&&(n.style.outlineWidth=this._parsed.outline.match[1],n.style.outlineStyle="solid",n.style.outlineColor=this._parsed.outline.match[4]),this.props.style=n.style,n.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.backgroundColor,r=!0),n.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.style.background,r=!0);for(let l of hE)if(this.props.style[l]!==n.style[l]){r=!0;break}n.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=n.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),r=!0),n.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=n.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0)}n.href!==this.props.href&&(this.props.href=n.href,r=!0),n.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=n.hrefTarget,r=!0),n.title!==this.props.title&&(this.props.title=n.title,r=!0),n.className!==this.props.className&&(this.props.className=n.className,n.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0),n.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=n.relativeSize,r=!0),n.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=n.relativeStyle,r=!0),n.html!==this.props.html&&(this.props.html=n.html,r=!0),n.target&&(n.target.width!==this.display.width||n.target.height!==this.display.height||n.target.x!==this.points[1]||n.target.y!==this.points[2])&&(r=!0,this.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.width=n.target.width,this.display.height=n.target.height),r&&this.__revision++}};var yr=class extends Ae{constructor(){super();v(this,"type","spacial-content");v(this,"id");v(this,"points");v(this,"color","#000");v(this,"backgroundColor");v(this,"hovering");v(this,"pressing");v(this,"text","");v(this,"display",{x:0,y:0,scale:1,width:100,height:100,points:V(5)});v(this,"className");v(this,"html");v(this,"interactive",!1);v(this,"props",{font:"18px Arial, sans-serif",lineHeight:1,textAlign:"left",verticalAlign:"top",paddingX:0,paddingY:0,fitParent:!1,lineBreak:"auto",strokeText:!1,sizeToFill:!1,maxFontSizeToFill:void 0,allowNewLine:!0,justifyLines:!1,renderHDPI:!1,textDecoration:"none",interactive:!1,relativeSize:!1});this.id="",this.points=V(5)}getAllPointsAt(n,r){return[[this,this.points,r]]}applyProps({id:n,target:r,text:s,color:l,backgroundColor:u,fontSize:h=18,interactive:f,fontFamily:g="Arial, sans-serif",...m}){m.font=`${h}px ${g}`,this.interactive=f||!1,typeof s<"u"&&(this.text=s||""),l&&(this.color=l),u&&(this.backgroundColor=u),n&&(this.id=n),r&&(this.points=ee.singleBox(r.width,r.height,r.x,r.y),this.display.points=this.points,this.display.width=r.width,this.display.height=r.height),this.props={...this.props,...m},this.__revision++}};var ze=Math.pow,Ma=Math.sqrt,Ts=Math.sin,$g=Math.cos,zs=Math.PI,Da=1.70158,Aa=Da*1.525,qg=Da+1,Jg=2*zs/3,ev=2*zs/4.5,Rs=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},zn={linear:e=>e,easeInQuad:function(e){return e*e},easeOutQuad:function(e){return 1-(1-e)*(1-e)},easeInOutQuad:function(e){return e<.5?2*e*e:1-ze(-2*e+2,2)/2},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1-ze(1-e,3)},easeInOutCubic:function(e){return e<.5?4*e*e*e:1-ze(-2*e+2,3)/2},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1-ze(1-e,4)},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-ze(-2*e+2,4)/2},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1-ze(1-e,5)},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1-ze(-2*e+2,5)/2},easeInSine:function(e){return 1-$g(e*zs/2)},easeOutSine:function(e){return Ts(e*zs/2)},easeInOutSine:function(e){return-($g(zs*e)-1)/2},easeInExpo:function(e){return e===0?0:ze(2,10*e-10)},easeOutExpo:function(e){return e===1?1:1-ze(2,-10*e)},easeInOutExpo:function(e){return e===0?0:e===1?1:e<.5?ze(2,20*e-10)/2:(2-ze(2,-20*e+10))/2},easeInCirc:function(e){return 1-Ma(1-ze(e,2))},easeOutCirc:function(e){return Ma(1-ze(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-Ma(1-ze(2*e,2)))/2:(Ma(1-ze(-2*e+2,2))+1)/2},easeInBack:function(e){return qg*e*e*e-Da*e*e},easeOutBack:function(e){return 1+qg*ze(e-1,3)+Da*ze(e-1,2)},easeInOutBack:function(e){return e<.5?ze(2*e,2)*((Aa+1)*2*e-Aa)/2:(ze(2*e-2,2)*((Aa+1)*(e*2-2)+Aa)+2)/2},easeInElastic:function(e){return e===0?0:e===1?1:-ze(2,10*e-10)*Ts((e*10-10.75)*Jg)},easeOutElastic:function(e){return e===0?0:e===1?1:ze(2,-10*e)*Ts((e*10-.75)*Jg)+1},easeInOutElastic:function(e){return e===0?0:e===1?1:e<.5?-(ze(2,20*e-10)*Ts((20*e-11.125)*ev))/2:ze(2,-20*e+10)*Ts((20*e-11.125)*ev)/2+1},easeInBounce:function(e){return 1-Rs(1-e)},easeOutBounce:Rs,easeInOutBounce:function(e){return e<.5?(1-Rs(1-2*e))/2:(1+Rs(2*e-1))/2}};var Wa=class{constructor(t){v(this,"runtime");v(this,"pendingTransition");v(this,"lastZoomTo",null);v(this,"isConstraining",!1);v(this,"lastGoToRegion",null);this.runtime=t,this.pendingTransition={from:V(5),to:V(5),elapsed_time:0,done:!0,total_time:0,timingFunction:zn.easeInOutQuad,constrain:!1}}hasPending(){return!this.pendingTransition.done}getPendingTransition(){return this.pendingTransition}getPendingFrom(){return this.pendingTransition.from}customTransition(t){t(this.pendingTransition)}stopTransition(){this.pendingTransition.from=V(this.runtime.target),this.pendingTransition.to=V(this.runtime.target),this.pendingTransition.done=!0,this.pendingTransition.elapsed_time=0,this.pendingTransition.total_time=0}runTransition(t,n){if(!this.pendingTransition.done){let r=this.pendingTransition,s=r.total_time===0?0:(r.elapsed_time+n)/r.total_time,l=r.total_time===0?1:s===0?0:r.timingFunction(s);t[1]=r.from[1]+(r.to[1]-r.from[1])*l,t[2]=r.from[2]+(r.to[2]-r.from[2])*l,t[3]=r.from[3]+(r.to[3]-r.from[3])*l,t[4]=r.from[4]+(r.to[4]-r.from[4])*l,this.pendingTransition.elapsed_time+=n,this.pendingTransition.elapsed_time>=this.pendingTransition.total_time&&(this.pendingTransition.done=!0,this.pendingTransition.callback?.(),this.pendingTransition.constrain&&this.constrainBounds({transition:{duration:this.pendingTransition.total_time===0?0:500,easing:zn.easeOutExpo}}))}}resumeTransition(){this.lastZoomTo&&this.zoomTo(this.lastZoomTo.factor,this.lastZoomTo.options),this.isConstraining&&this.constrainBounds(),this.lastGoToRegion&&this.goToRegion(this.lastGoToRegion.target,this.lastGoToRegion.options)}zoomTo(t,n={}){let{origin:r,stream:s=!1,transition:l}=n;this.lastZoomTo={factor:t,options:n};let u=this.runtime.getZoomedPosition(t,{origin:r}),h=Math.abs(1-t);this.applyTransition(u,l,{duration:2e3*h,easing:zn.easeOutExpo,constrain:!0,callback:()=>{this.lastZoomTo=null}},{stream:!1})}constrainBounds({transition:t,panPadding:n=0}={}){this.isConstraining=!0;let[r,s]=this.runtime.constrainBounds(this.runtime.target,{panPadding:n});r&&(this.applyTransition(s,t,{duration:500,easing:zn.easeOutQuart,constrain:!1,callback:()=>{this.isConstraining=!1}}),this.runtime.updateNextFrame())}applyTransition(t,n,r,{stream:s}={}){this.pendingTransition.from=V(this.runtime.target),this.pendingTransition.to=t,s||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=typeof n?.duration<"u"?n.duration:typeof r?.duration<"u"?r.duration:1e3,this.pendingTransition.constrain=typeof n?.constrain<"u"?n.constrain:typeof r?.constrain<"u"?r.constrain:!1,this.pendingTransition.timingFunction=n?.easing||r?.easing||zn.easeInOutSine}goToRegion(t,{transition:n}={}){this.lastGoToRegion={target:t,options:{transition:n}};let r=this.runtime.clampRegion(t);this.applyTransition(ee.singleBox(r.width,r.height,r.x,r.y),n,{duration:1e3,easing:zn.easeOutExpo,constrain:!0,callback:()=>{this.lastGoToRegion=null}}),this.runtime.updateNextFrame()}};var MC=Number.MIN_VALUE+1,Kn=class{constructor(t,n,r,s=[],l){v(this,"id",Yn());v(this,"ready",!1);v(this,"renderer");v(this,"world");v(this,"target");v(this,"homePosition");v(this,"manualHomePosition");v(this,"manualFocalPosition");v(this,"focalPosition");v(this,"transitionManager");v(this,"aggregate");v(this,"transformBuffer",V(500));v(this,"lastTarget",V(5));v(this,"zoomBuffer",V(5));v(this,"logNextRender",!1);v(this,"pendingUpdate",!0);v(this,"isCommitting",!1);v(this,"firstRender",!0);v(this,"lastTime");v(this,"stopId");v(this,"mode","explore");v(this,"controllers",[]);v(this,"controllersRunning",!1);v(this,"controllerStopFunctions",[]);v(this,"maxScaleFactor",1);v(this,"_viewerToWorld",{x:0,y:0});v(this,"_lastGoodScale",1);v(this,"hooks",{useFrame:[],useBeforeFrame:[],useAfterPaint:[],useAfterFrame:[]});v(this,"fpsLimit");v(this,"options");v(this,"hookOptions",{filters:{grayscale:0,contrast:0,brightness:0,saturate:0,sepia:0,invert:0,hueRotate:0,blur:0}});v(this,"_viewport",{x:0,y:0,width:0,height:0});v(this,"setViewport",t=>{let n=Math.round(typeof t.x>"u"?this.target[1]:t.x),r=Math.round(typeof t.y>"u"?this.target[2]:t.y);t.width?this.target[3]=n+t.width:this.target[3]=this.target[3]-this.target[1]+n,t.height?this.target[4]=r+t.height:this.target[4]=this.target[4]-this.target[2]+r,Math.abs(this.target[1]-n)>.01&&(this.target[1]=n),Math.abs(this.target[2]-r)>.01&&(this.target[2]=r),this.pendingUpdate=!0});v(this,"render",t=>{let n=t-this.lastTime;if(this.isCommitting||this.fpsLimit&&n<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=t,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook("useFrame",n);let r=this.pendingUpdate,s=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,n),this.pendingUpdate=!0,this.updateControllerPosition()),!this.firstRender&&!r&&!s&&this.target[0]===this.lastTarget[0]&&this.target[1]===this.lastTarget[1]&&this.target[2]===this.lastTarget[2]&&this.target[3]===this.lastTarget[3]&&this.target[4]===this.lastTarget[4])return;this.hook("useBeforeFrame",n),this.renderer.beforeFrame(this.world,n,this.target,this.hookOptions);let l=this.getScaleFactor(),u=this.renderer.getPointsAt(this.world,this.target,this.aggregate,l),h=u.length;for(let m=0;m<h;m++){let S=u[m][0],E=u[m][1],P=u[m][2],k=P?Gt(E,P,this.transformBuffer):E;this.renderer.prepareLayer(S,S.__parent&&P?Gt(S.__parent.crop||S.__parent.points,P):k);let R=k.length/5;for(let A=0;A<R;A++){let x=A*5;k[x]!==0&&(this.renderer.paint(S,A,k[x+1],k[x+2],k[x+3]-k[x+1],k[x+4]-k[x+2]),this.hook("useAfterPaint",S))}this.renderer.finishLayer(S,E)}this.renderer.afterFrame(this.world,n,this.target,this.hookOptions),this.hook("useAfterFrame",n),this.lastTarget[0]=this.target[0],this.lastTarget[1]=this.target[1],this.lastTarget[2]=this.target[2],this.lastTarget[3]=this.target[3],this.lastTarget[4]=this.target[4],this.firstRender=!1,this.pendingUpdate=!1,this.logNextRender=!1,this.renderer.isReady()&&(this.ready=!0,this.world.trigger("ready")),this.world.flushSubscriptions();let f=this.world.getScheduledUpdates(this.target,l),g=f.length;if(g>0)for(let m=0;m<g;m++){let S=f[g-m-1]();S?S.then(()=>{this.pendingUpdate=!0}):this.pendingUpdate=!0}});this.renderer=t,this.world=n,this.options={maxOverZoom:1,maxUnderZoom:1,visibilityRatio:1.5,...l||{}},this.target=ee.projection(r),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=ee.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new Wa(this),this.aggregate=Qt(1),this.world.addLayoutSubscriber(u=>{u==="repaint"&&(this.pendingUpdate=!0),u==="recalculate-world-size"&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=s,this.render(this.lastTime),this.startControllers()}get x(){return this.target[1]}set x(t){this.target[1]=t}get y(){return this.target[2]}set y(t){this.target[2]=t}get x2(){return this.target[3]}set x2(t){this.target[3]=t}get y2(){return this.target[4]}set y2(t){this.target[4]=t}get width(){return this.target[3]-this.target[1]}set width(t){this.target[3]=this.target[1]+t}get height(){return this.target[4]-this.target[2]}set height(t){this.target[4]=this.target[2]=t}setHomePosition(t){this.homePosition.set(ee.projection(t||this.world)),this.pendingUpdate=!0}startControllers(){if(!this.controllersRunning){for(let t of this.controllers)this.controllerStopFunctions.push(t.start(this));this.controllersRunning=!0}}stopControllers(){if(this.controllersRunning){for(let t of this.controllerStopFunctions)t();this.controllersRunning=!1,this.controllerStopFunctions=[]}}updateControllerPosition(){for(let t of this.controllers)t.updatePosition(this.x,this.y,this.width,this.height)}triggerResize(){this.renderer.triggerResize&&this.renderer.triggerResize(),this.pendingUpdate=!0}addController(t){this.controllers.push(t),this.controllersRunning&&t.start(this),this.pendingUpdate=!0}cover(){return this.goHome({cover:!0})}getRendererScreenPosition(){return this.renderer.getRendererScreenPosition()}updateRendererScreenPosition(){this.pendingUpdate=!0,this.renderer.resize()}setOptions(t){this.options={...this.options,...t}}goHome(t={}){if(this.world.width<=0||this.world.height<=0)return;let n=this.getScaleFactor(),r=t.position?{x:t.position[1],y:t.position[2],width:t.position[3]-t.position[1],height:t.position[4]-t.position[2]}:{x:this.homePosition[1],y:this.homePosition[2],width:this.homePosition[3]-this.homePosition[1],height:this.homePosition[4]-this.homePosition[2]},s=this.width*n,l=this.height*n,u=r.width/s,h=r.height/l,f=s/l;if(t.cover?u>h:u<h){let g=f*r.height,m=(g-r.width)/2;this.target[1]=Math.round(-m+r.x),this.target[2]=Math.round(r.y),this.target[3]=Math.round(g-m+r.x),this.target[4]=Math.round(r.height+r.y)}else{let g=r.width/f,m=(g-r.height)/2;this.target[1]=Math.round(r.x),this.target[2]=Math.round(r.y-m),this.target[3]=Math.round(r.x+r.width),this.target[4]=Math.round(r.y+g-m)}this.constrainBounds(this.target),this.updateControllerPosition()}resize(t,n,r,s){this.transitionManager.hasPending()&&this.transitionManager.stopTransition(),this.updateFocalPosition(t-n,r-s);let l=n/t,u=s/r;this.target[3]=this.target[1]+(this.target[3]-this.target[1])*l,this.target[4]=this.target[2]+(this.target[4]-this.target[2])*u,this.goHome({position:this.focalPosition}),this.renderer.resize(n,s),this.pendingUpdate=!0,this.transitionManager.resumeTransition()}updateFocalPosition(t,n){if(!this.manualFocalPosition){let r=this.width,s=this.height,l=Math.min(r,s),u=0,h=0,f=this.x+u,g=this.y+h;if(r<s){let m=this.height-this.width;this.focalPosition=ee.projection({x:f,y:g+m/2,width:l-u*2,height:l-h*2}),this.pendingUpdate=!0}else{let m=this.width-this.height;this.focalPosition=ee.projection({x:f+m/2,y:g,width:l-u*2,height:l-h*2}),this.pendingUpdate=!0}}}getViewport(){return this._viewport.x=this.target[1],this._viewport.y=this.target[2],this._viewport.width=this.target[3]-this.target[1],this._viewport.height=this.target[4]-this.target[2],this._viewport}constrainBounds(t,{panPadding:n=0,ref:r=!1}={}){let{minX:s,maxX:l,minY:u,maxY:h}=this.getBounds({target:t,padding:n}),f=!1,g=r?t:V(t),m=Math.round(t[3]-t[1]),S=Math.round(t[4]-t[2]);return s>t[1]&&(f=!0,g[1]=s,g[3]=s+m),u>t[2]&&(f=!0,g[2]=u,g[4]=u+S),l<t[1]&&(f=!0,g[1]=l,g[3]=l+m),h<t[2]&&(f=!0,g[2]=h,g[4]=h+S),[f,g]}getBounds(t){let n=t.target||this.target,r=t.padding,s=this.options.visibilityRatio,l=Math.abs(1-s);if(this.world.hasActiveZone()){let w=this.world.getActiveZone();if(w){let _=n[3]-n[1]<w.points[3]-w.points[1],L=n[4]-n[2]<w.points[4]-w.points[2];return{minX:_?w.points[1]-r:w.points[1]+(w.points[3]-w.points[1])/2-(n[3]-n[1])/2,maxX:L?w.points[2]-r:w.points[2]+(w.points[4]-w.points[2])/2-(n[4]-n[2])/2,minY:_?w.points[3]+r:w.points[1]+(w.points[3]-w.points[1])/2-(n[3]-n[1])/2,maxY:L?w.points[4]+r:w.points[2]+(w.points[4]-w.points[2])/2-(n[4]-n[2])/2}}}let u=n[3]-n[1],h=this.world.width,f=-u*l,g=h-u-f,m=n[4]-n[2],S=this.world.height,E=-m*l,P=S-m-E,k=Math.round(Math.max(f,g)),R=Math.round(Math.min(f,g)),A=Math.round(Math.max(E,P)),x=Math.round(Math.min(E,P));return{minX:R,maxX:k,minY:x,maxY:A}}getScaleFactor(t=!1){let n=this.renderer.getScale(this.target[3]-this.target[1],this.target[4]-this.target[2],t);return n===0?this._lastGoodScale:(this._lastGoodScale=n,n)}getZoomedPosition(t,{origin:n,fromPos:r}){let s=r?{width:r[3]-r[1],height:r[4]-r[2]}:void 0,l=s?this.renderer.getScale(s.width,s.height):this.getScaleFactor(),u=s?s.width:this.width,h=s?s.height:this.height,f=this.getRendererScreenPosition()?.width,g=this.world.width,m=f?f/g:1,S=this.options.maxUnderZoom,E=Math.max(m||1,this.options.maxOverZoom),P=1/t,k=l*P;if(P<1){let x=u*l,w=h*l,_=this.world.width/x,L=this.world.height/w;if(_>L){let O=this.world.width*k,D=~~(u*l)*S;O<D&&(t=this.world.width*l/(u*l*S))}else{let O=this.world.height*k,D=~~(h*l)*S;O<D&&(t=this.world.height*l/(h*l*S))}}else k>E&&(t=l/E);let A=Gt(this.target,vr(t,n?n.x:this.target[1]+(this.target[3]-this.target[1])/2,n?n.y:this.target[2]+(this.target[4]-this.target[2])/2),this.zoomBuffer);return this.constrainBounds(A,{ref:!0,panPadding:100}),A}clampRegion({x:t,y:n,width:r,height:s,padding:l=0}){let u=this.width,h=this.height,f=r/u<s/h,g=t-l,m=n-l,S=r+l*2,E=s+l*2;if(f){let k=E/h*u;return{x:g-(k-S)/2,y:m,width:k,height:E}}let P=S/u*h;return{x:g,y:m-(P-E)/2,width:S,height:P}}viewerToWorld(t,n){let r=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+t/r,this._viewerToWorld.y=this.target[2]+n/r,this._viewerToWorld}worldToViewer(t,n,r,s){let l=ee.singleBox(r,s,t,n);return Pt(l,At(Qt(this.getScaleFactor()),Re(-this.target[1],-this.target[2]))),{x:l[1],y:l[2],width:l[3]-l[1],height:l[4]-l[2],strand:l}}setScale(t,n){Pt(this.target,vr(t,n?n.x:this.target[1]+(this.target[3]-this.target[1])/2,n?n.y:this.target[2]+(this.target[4]-this.target[2])/2)),this.pendingUpdate=!0}syncTo(t){let n=this.target;return this.target=t.target,this.pendingUpdate=!0,()=>{this.target=n}}stop(){return typeof this.stopId<"u"&&(window.cancelAnimationFrame(this.stopId),this.stopId=void 0),()=>{this.render(performance.now())}}reset(){this.renderer.reset()}selectZone(t){this.world.selectZone(t),this.pendingUpdate=!0}deselectZone(){this.world.deselectZone(),this.pendingUpdate=!0}hook(t,n){let r=this.hooks[t].length;if(r!==0)for(let s=0;s<r;s++)this.hooks[t][s](n)}registerHook(t,n){return this.hooks[t].push(n),()=>{this.hooks[t]=this.hooks[t].filter(r=>r!==n)}}updateNextFrame(){this.pendingUpdate=!0}};var Ba=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,ja={},fE=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"],Ti=class extends Ae{constructor(){super();v(this,"id");v(this,"type","spacial-content");v(this,"isShape",!0);v(this,"points");v(this,"hoverEvents",!1);v(this,"activeEvents",!1);v(this,"display",{x:0,y:0,scale:1,width:-1,height:-1,points:V(5)});v(this,"boundingBox",null);v(this,"_parsed",{border:{id:null,match:[]},outline:{id:null,match:[]}});v(this,"hovering");v(this,"pressing");v(this,"props",{});v(this,"shape",{type:"none"});v(this,"addHover",()=>{this.hovering=!0,this.__revision++});v(this,"removeHover",()=>{this.hovering=!1,this.pressing=!1,this.__revision++});v(this,"addPress",()=>{this.pressing=!0,this.__revision++});v(this,"removePress",()=>{this.pressing=!1,this.__revision++});this.id=Yn(12),this.points=V(5),this.shape={type:"none"}}updateBoundingBox(){if(this.shape.type==="none")return;let n=this.shape.points;if(this.shape.points.length>2){let r=Math.min(...n.map(h=>h[0])),s=Math.min(...n.map(h=>h[1])),l=Math.max(0,...n.map(h=>h[0])),u=Math.max(0,...n.map(h=>h[1]));this.boundingBox={x:r,y:s,width:l-r,height:u-s};return}this.boundingBox=null}intersects(n){if(!n||this.shape.type==="none")return!1;let[r,s]=n,l=this.shape.points,u=this.boundingBox;if(u||(this.updateBoundingBox(),u=this.boundingBox),!u||r<u.x||r>u.x+u.width||s<u.y||s>u.height+u.y)return!1;let h=!1;for(let f=0,g=l.length-1;f<l.length;g=f++)l[f][1]>s!=l[g][1]>s&&r<(l[g][0]-l[f][0])*(s-l[f][1])/(l[g][1]-l[f][1])+l[f][0]&&(h=!h);return h}getAllPointsAt(n,r){return n[3]-n[1]===1&&n[4]-n[2]===1?this.intersects([n[1],n[2]])?[[this,this.points,r]]:[]:[[this,this.points,r]]}applyProps(n={}){let r=!1;if(n.points)if(this.shape.type!=="polygon"||this.shape.points.length!==n.points.length)this.shape={type:"polygon",points:n.points,open:n.open},this.updateBoundingBox();else{let s=!1,l=n.points.length;for(let u=0;u<l;u++)if(n.points[u][0]!==this.shape.points[u][0]||n.points[u][1]!==this.shape.points[u][1]){s=!0;break}s&&(this.shape={type:"polygon",points:n.points,open:n.open},this.updateBoundingBox())}if(n.interactive!==this.props.interactive&&(r=!0,this.props.interactive=n.interactive),(n.open||n.open===!1)&&(r=!0,this.shape.open=n.open),n.style){let s=n.border||n.style.border;if(s!==this._parsed.border.id)if(!s)this._parsed.border.id=null,this._parsed.border.match=[];else{let l=ja[s]||Ba.exec(s)||Ba.exec(s);l&&(this._parsed.border.id=s,this._parsed.border.match=ja[s]=l)}if(this._parsed.border.id&&(n.style.borderWidth=this._parsed.border.match[1],n.style.borderStyle="solid",n.style.borderColor=this._parsed.border.match[4]),n.style.outline!==this._parsed.outline.id)if(!n.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{let l=ja[n.style.outline]||Ba.exec(n.style.outline)||Ba.exec(n.style.outline);l&&(this._parsed.outline.id=n.style.outline,this._parsed.outline.match=ja[n.style.outline]=l)}this._parsed.outline.id&&(n.style.outlineWidth=this._parsed.outline.match[1],n.style.outlineStyle="solid",n.style.outlineColor=this._parsed.outline.match[4]),this.props.style=n.style,n.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.backgroundColor,r=!0),n.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=n.style.background,r=!0);for(let l of fE)if(this.props.style[l]!==n.style[l]){r=!0;break}n.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=n.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),r=!0),n.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=n.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0)}n.href!==this.props.href&&(this.props.href=n.href,r=!0),n.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=n.hrefTarget,r=!0),n.title!==this.props.title&&(this.props.title=n.title,r=!0),n.className!==this.props.className&&(this.props.className=n.className,n.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),r=!0),n.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=n.relativeSize,r=!0),n.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=n.relativeStyle,r=!0),n.html!==this.props.html&&(this.props.html=n.html,r=!0),n.target&&(n.target.width!==this.display.width||n.target.height!==this.display.height||n.target.x!==this.points[1]||n.target.y!==this.points[2])&&(r=!0,this.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.points=ee.singleBox(n.target.width,n.target.height,n.target.x,n.target.y),this.display.width=n.target.width,this.display.height=n.target.height),r&&this.__revision++}};var Is=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,pE=typeof AbortController=="function",ba=pE?AbortController:class{constructor(){this.signal=new tv}abort(t=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||t,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},mE=typeof AbortSignal=="function",gE=typeof ba.AbortSignal=="function",tv=mE?AbortSignal:gE?ba.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(t){t.type==="abort"&&(this.aborted=!0,this.onabort(t),this._listeners.forEach(n=>n(t),this))}onabort(){}addEventListener(t,n){t==="abort"&&this._listeners.push(n)}removeEventListener(t,n){t==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},rh=new Set,eh=(e,t)=>{let n=`LRU_CACHE_OPTION_${e}`;Ha(n)&&ih(n,`${e} option`,`options.${t}`,vo)},th=(e,t)=>{let n=`LRU_CACHE_METHOD_${e}`;if(Ha(n)){let{prototype:r}=vo,{get:s}=Object.getOwnPropertyDescriptor(r,e);ih(n,`${e} method`,`cache.${t}()`,s)}},vE=(e,t)=>{let n=`LRU_CACHE_PROPERTY_${e}`;if(Ha(n)){let{prototype:r}=vo,{get:s}=Object.getOwnPropertyDescriptor(r,e);ih(n,`${e} property`,`cache.${t}`,s)}},nv=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},Ha=e=>!rh.has(e),ih=(e,t,n,r)=>{rh.add(e);let s=`The ${t} is deprecated. Please use ${n} instead.`;nv(s,"DeprecationWarning",e,r)},Qr=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),rv=e=>Qr(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?go:null:null,go=class extends Array{constructor(t){super(t),this.fill(0)}},nh=class{constructor(t){if(t===0)return[];let n=rv(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},vo=class e{constructor(t={}){let{max:n=0,ttl:r,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:f,dispose:g,disposeAfter:m,noDisposeOnSet:S,noUpdateTTL:E,maxSize:P=0,maxEntrySize:k=0,sizeCalculation:R,fetchMethod:A,fetchContext:x,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:O,ignoreFetchAbort:z}=t,{length:D,maxAge:b,stale:q}=t instanceof e?{}:t;if(n!==0&&!Qr(n))throw new TypeError("max option must be a nonnegative integer");let M=n?rv(n):Array;if(!M)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=P,this.maxEntrySize=k||this.maxSize,this.sizeCalculation=R||D,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=A||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&x!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(n).fill(null),this.valList=new Array(n).fill(null),this.next=new M(n),this.prev=new M(n),this.head=0,this.tail=0,this.free=new nh(n),this.initialFill=1,this.size=0,typeof g=="function"&&(this.dispose=g),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!S,this.noUpdateTTL=!!E,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.maxSize!==0&&!Qr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Qr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!q,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=Qr(s)||s===0?s:1,this.ttlAutopurge=!!l,this.ttl=r||b||0,this.ttl){if(!Qr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let K="LRU_CACHE_UNBOUNDED";Ha(K)&&(rh.add(K),nv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",K,e))}q&&eh("stale","allowStale"),b&&eh("maxAge","ttl"),D&&eh("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new go(this.max),this.starts=new go(this.max),this.setItemTTL=(r,s,l=Is.now())=>{if(this.starts[r]=s!==0?l:0,this.ttls[r]=s,s!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},s+1);u.unref&&u.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Is.now():0},this.statusTTL=(r,s)=>{r&&(r.ttl=this.ttls[s],r.start=this.starts[s],r.now=t||n(),r.remainingTTL=r.now+r.ttl-r.start)};let t=0,n=()=>{let r=Is.now();if(this.ttlResolution>0){t=r;let s=setTimeout(()=>t=0,this.ttlResolution);s.unref&&s.unref()}return r};this.getRemainingTTL=r=>{let s=this.keyMap.get(r);return s===void 0?0:this.ttls[s]===0||this.starts[s]===0?1/0:this.starts[s]+this.ttls[s]-(t||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||n())-this.starts[r]>this.ttls[r]}updateItemAge(t){}statusTTL(t,n){}setItemTTL(t,n,r){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new go(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,n,r,s)=>{if(this.isBackgroundFetch(n))return 0;if(!Qr(r))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(n,t),!Qr(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.addItemSize=(t,n,r)=>{if(this.sizes[t]=n,this.maxSize){let s=this.maxSize-this.sizes[t];for(;this.calculatedSize>s;)this.evict(!0)}this.calculatedSize+=this.sizes[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.calculatedSize)}}removeItemSize(t){}addItemSize(t,n){}requireSize(t,n,r,s){if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(t){return t!==void 0&&this.keyMap.get(this.keyList[t])===t}*entries(){for(let t of this.indexes())this.valList[t]!==void 0&&this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield[this.keyList[t],this.valList[t]])}*rentries(){for(let t of this.rindexes())this.valList[t]!==void 0&&this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield[this.keyList[t],this.valList[t]])}*keys(){for(let t of this.indexes())this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.keyList[t])}*rkeys(){for(let t of this.rindexes())this.keyList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.keyList[t])}*values(){for(let t of this.indexes())this.valList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.valList[t])}*rvalues(){for(let t of this.rindexes())this.valList[t]!==void 0&&!this.isBackgroundFetch(this.valList[t])&&(yield this.valList[t])}[Symbol.iterator](){return this.entries()}find(t,n){for(let r of this.indexes()){let s=this.valList[r],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;if(l!==void 0&&t(l,this.keyList[r],this))return this.get(this.keyList[r],n)}}forEach(t,n=this){for(let r of this.indexes()){let s=this.valList[r],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;l!==void 0&&t.call(n,l,this.keyList[r],this)}}rforEach(t,n=this){for(let r of this.rindexes()){let s=this.valList[r],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;l!==void 0&&t.call(n,l,this.keyList[r],this)}}get prune(){return th("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(let n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),t=!0);return t}dump(){let t=[];for(let n of this.indexes({allowStale:!0})){let r=this.keyList[n],s=this.valList[n],l=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;if(l===void 0)continue;let u={value:l};if(this.ttls){u.ttl=this.ttls[n];let h=Is.now()-this.starts[n];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[n]),t.unshift([r,u])}return t}load(t){this.clear();for(let[n,r]of t){if(r.start){let s=Date.now()-r.start;r.start=Is.now()-s}this.set(n,r.value,r)}}dispose(t,n,r){}set(t,n,{ttl:r=this.ttl,start:s,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,status:g}={}){if(u=this.requireSize(t,n,u,h),this.maxEntrySize&&u>this.maxEntrySize)return g&&(g.set="miss",g.maxEntrySizeExceeded=!0),this.delete(t),this;let m=this.size===0?void 0:this.keyMap.get(t);if(m===void 0)m=this.newIndex(),this.keyList[m]=t,this.valList[m]=n,this.keyMap.set(t,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,u,g),g&&(g.set="add"),f=!1;else{this.moveToTail(m);let S=this.valList[m];if(n!==S){if(this.isBackgroundFetch(S)?S.__abortController.abort(new Error("replaced")):l||(this.dispose(S,t,"set"),this.disposeAfter&&this.disposed.push([S,t,"set"])),this.removeItemSize(m),this.valList[m]=n,this.addItemSize(m,u,g),g){g.set="replace";let E=S&&this.isBackgroundFetch(S)?S.__staleWhileFetching:S;E!==void 0&&(g.oldValue=E)}}else g&&(g.set="update")}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),f||this.setItemTTL(m,r,s),this.statusTTL(g,m),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let t=this.valList[this.head];return this.evict(!0),t}}evict(t){let n=this.head,r=this.keyList[n],s=this.valList[n];return this.isBackgroundFetch(s)?s.__abortController.abort(new Error("evicted")):(this.dispose(s,r,"evict"),this.disposeAfter&&this.disposed.push([s,r,"evict"])),this.removeItemSize(n),t&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(t,{updateAgeOnHas:n=this.updateAgeOnHas,status:r}={}){let s=this.keyMap.get(t);if(s!==void 0)if(this.isStale(s))r&&(r.has="stale",this.statusTTL(r,s));else return n&&this.updateItemAge(s),r&&(r.has="hit"),this.statusTTL(r,s),!0;else r&&(r.has="miss");return!1}peek(t,{allowStale:n=this.allowStale}={}){let r=this.keyMap.get(t);if(r!==void 0&&(n||!this.isStale(r))){let s=this.valList[r];return this.isBackgroundFetch(s)?s.__staleWhileFetching:s}}backgroundFetch(t,n,r,s){let l=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(l))return l;let u=new ba;r.signal&&r.signal.addEventListener("abort",()=>u.abort(r.signal.reason));let h={signal:u.signal,options:r,context:s},f=(P,k=!1)=>{let{aborted:R}=u.signal,A=r.ignoreFetchAbort&&P!==void 0;return r.status&&(R&&!k?(r.status.fetchAborted=!0,r.status.fetchError=u.signal.reason,A&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),R&&!A&&!k?m(u.signal.reason):(this.valList[n]===E&&(P===void 0?E.__staleWhileFetching?this.valList[n]=E.__staleWhileFetching:this.delete(t):(r.status&&(r.status.fetchUpdated=!0),this.set(t,P,h.options))),P)},g=P=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=P),m(P)),m=P=>{let{aborted:k}=u.signal,R=k&&r.allowStaleOnFetchAbort,A=R||r.allowStaleOnFetchRejection,x=A||r.noDeleteOnFetchRejection;if(this.valList[n]===E&&(!x||E.__staleWhileFetching===void 0?this.delete(t):R||(this.valList[n]=E.__staleWhileFetching)),A)return r.status&&E.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw P},S=(P,k)=>{this.fetchMethod(t,l,h).then(R=>P(R),k),u.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(P(),r.allowStaleOnFetchAbort&&(P=R=>f(R,!0)))})};r.status&&(r.status.fetchDispatched=!0);let E=new Promise(S).then(f,g);return E.__abortController=u,E.__staleWhileFetching=l,E.__returned=null,n===void 0?(this.set(t,E,{...h.options,status:void 0}),n=this.keyMap.get(t)):this.valList[n]=E,E}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:S=this.allowStaleOnFetchRejection,ignoreFetchAbort:E=this.ignoreFetchAbort,allowStaleOnFetchAbort:P=this.allowStaleOnFetchAbort,fetchContext:k=this.fetchContext,forceRefresh:R=!1,status:A,signal:x}={}){if(!this.fetchMethod)return A&&(A.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:A});let w={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:l,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:g,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:P,ignoreFetchAbort:E,status:A,signal:x},_=this.keyMap.get(t);if(_===void 0){A&&(A.fetch="miss");let L=this.backgroundFetch(t,_,w,k);return L.__returned=L}else{let L=this.valList[_];if(this.isBackgroundFetch(L)){let q=n&&L.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",q&&(A.returnedStale=!0)),q?L.__staleWhileFetching:L.__returned=L}let O=this.isStale(_);if(!R&&!O)return A&&(A.fetch="hit"),this.moveToTail(_),r&&this.updateItemAge(_),this.statusTTL(A,_),L;let z=this.backgroundFetch(t,_,w,k),D=z.__staleWhileFetching!==void 0,b=D&&n;return A&&(A.fetch=D&&O?"stale":"refresh",b&&O&&(A.returnedStale=!0)),b?z.__staleWhileFetching:z.__returned=z}}get(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:l}={}){let u=this.keyMap.get(t);if(u!==void 0){let h=this.valList[u],f=this.isBackgroundFetch(h);return this.statusTTL(l,u),this.isStale(u)?(l&&(l.get="stale"),f?(l&&(l.returnedStale=n&&h.__staleWhileFetching!==void 0),n?h.__staleWhileFetching:void 0):(s||this.delete(t),l&&(l.returnedStale=n),n?h:void 0)):(l&&(l.get="hit"),f?h.__staleWhileFetching:(this.moveToTail(u),r&&this.updateItemAge(u),h))}else l&&(l.get="miss")}connect(t,n){this.prev[n]=t,this.next[t]=n}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return th("del","delete"),this.delete}delete(t){let n=!1;if(this.size!==0){let r=this.keyMap.get(t);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);let s=this.valList[r];this.isBackgroundFetch(s)?s.__abortController.abort(new Error("deleted")):(this.dispose(s,t,"delete"),this.disposeAfter&&this.disposed.push([s,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(let t of this.rindexes({allowStale:!0})){let n=this.valList[t];if(this.isBackgroundFetch(n))n.__abortController.abort(new Error("deleted"));else{let r=this.keyList[t];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return th("reset","clear"),this.clear}get length(){return vE("length","size"),this.size}static get AbortController(){return ba}static get AbortSignal(){return tv}},iv=vo;var ov=/(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)(-?[0-9]+(px|em)\s+|0\s+)?(-?[0-9]+(px|em)\s+|0\s+)?(.*)/g,sv={},yE=typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox"),Ua={};var Ls=class{constructor(t,n){v(this,"canvas");v(this,"ctx");v(this,"options");v(this,"imagesPending",0);v(this,"imagesLoaded",0);v(this,"imageIdsLoaded",[]);v(this,"frameIsRendering",!1);v(this,"pendingDrawCall",!1);v(this,"firstMeaningfulPaint",!1);v(this,"parallelTasks",8);v(this,"frameTasks",0);v(this,"loadingQueueOrdered",!0);v(this,"loadingQueue",[]);v(this,"currentTask",Promise.resolve());v(this,"tasksRunning",0);v(this,"stats");v(this,"averageJobTime",64);v(this,"lastKnownScale",1);v(this,"visible",[]);v(this,"previousVisible",[]);v(this,"rendererPosition");v(this,"dpi");v(this,"drawCalls",[]);v(this,"lastPaintedObject");v(this,"hostCache");v(this,"invalidated",[]);v(this,"_worker",()=>{if(this.loadingQueue.length){let t=this.loadingQueue.pop();t&&(this.tasksRunning++,this.frameTasks++,this.currentTask=t.task().then(()=>{this.tasksRunning--}).catch(()=>{this.tasksRunning--}))}});v(this,"_scheduled",0);v(this,"_doWork",()=>{this.loadingQueue.length===0&&this.tasksRunning===0&&this._scheduled&&(clearInterval(this._scheduled),this._scheduled=0);let t=this.parallelTasks||1;!this.firstMeaningfulPaint&&this.loadingQueue.length&&(t=this.loadingQueue.length);for(let n=0;n<=t;n++)this._worker()});this.canvas=t,this.rendererPosition=t.getBoundingClientRect(),this.ctx=t.getContext("2d",{alpha:!0}),this.ctx.imageSmoothingEnabled=!0,this.options=n||{},this.canvas.style.transition="opacity .3s",this.dpi=n?.dpi||1,this.hostCache=n?.lruCache?new iv({maxSize:1024*512*512,dispose:(r,s,l)=>{this.invalidated.push(s),r.width=0,r.height=0},sizeCalculation:(r,s)=>r.width*r.height}):{store:{},get(r){return this.store[r]},set(r,s){this.store[r]=s}}}getCanvasDims(){return{width:this.canvas.width/this.dpi,height:this.canvas.height/this.dpi}}resize(){this.rendererPosition=this.canvas.getBoundingClientRect()}isReady(){return this.firstMeaningfulPaint}afterFrame(t){if(this.clearTransform(),this.lastPaintedObject=void 0,this.frameIsRendering=!1,this.imagesPending=Math.max(0,this.imagesPending-this.imagesLoaded),this.imagesLoaded=0,this.loadingQueueOrdered||(this.loadingQueue=this.loadingQueue.sort((n,r)=>n.network&&n.scale===r.scale?r.distance-n.distance:n.scale<r.scale?-1:1),this.loadingQueueOrdered=!0),this.previousVisible=this.visible,this.pendingDrawCall=!!this.drawCalls.length,this.pendingDrawCall)for(let n=0;n<this.drawCalls.length;n++){let r=this.drawCalls.shift();r&&r()}this.doOffscreenWork(),this.options.debug&&this.stats&&this.stats.end()}doOffscreenWork(){this.frameTasks=0,this.loadingQueue.length&&(this._worker(),this.loadingQueue.length&&(this._scheduled||(this._scheduled=setInterval(this._doWork,0))))}getScale(t,n,r){if(Number.isNaN(t)||Number.isNaN(n))return this.lastKnownScale;let s=this.getCanvasDims(),l=s.width/t,u=s.height/n,h=(l<u?u:l)*(r&&this.dpi||1);return Number.isNaN(h)||(this.lastKnownScale=h),this.lastKnownScale}beforeFrame(t,n,r,s){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(n);let l=this.getCanvasDims();if(this.ctx.globalAlpha=1,this.ctx.fillStyle=this.canvas.dataset.background??"rgb(0, 0, 0)",this.ctx.fillRect(0,0,l.width,l.height),s.enableFilters&&(s.filters.brightness||s.filters.contrast||s.filters.grayscale||s.filters.invert||s.filters.sepia||s.filters.saturate||s.filters.hueRotate||s.filters.blur)){let u="";s.filters.brightness&&(u+=`brightness(${~~(100+s.filters.brightness*100)}%) `),s.filters.contrast&&(u+=`contrast(${~~(100+s.filters.contrast*100)}%) `),s.filters.grayscale&&(u+=`grayscale(${~~(s.filters.grayscale*100)}%) `),s.filters.invert&&(u+=`invert(${~~(s.filters.invert*100)}%) `),s.filters.sepia&&(u+=`sepia(${~~(s.filters.sepia*100)}%) `),s.filters.saturate&&(u+=`saturate(${~~(100+s.filters.saturate*100)}%) `),s.filters.hueRotate&&(u+=`hue-rotate(${s.filters.hueRotate}deg) `),s.filters.blur&&(u+=`blur(${s.filters.blur}px) `),this.ctx.filter=u}else this.ctx.filter="none"}applyTransform(t,n,r,s,l){let u=t.__owner.value;if(u&&u.rotation){this.ctx.save();let h=n+s/2,f=r+l/2;this.ctx.translate(h,f),this.ctx.rotate(u.rotation*Math.PI/180),this.ctx.translate(-h,-f),this.lastPaintedObject=u}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(t,n,r,s,l,u){let h=this.ctx.globalAlpha;if(t instanceof Ge||t instanceof dn){if(t.display.rotation){this.ctx.save();let m=r+l/2,S=s+u/2;t.crop&&(m-=t.crop[n*5+1],S-=t.crop[n*5+2]),this.ctx.translate(m,S),this.ctx.rotate(t.display.rotation*Math.PI/180),this.ctx.translate(-m,-S)}if(this.visible.push(t),typeof t.style&&t.style.opacity!=="undefined"){if(!t.style.opacity)return;this.ctx.globalAlpha=t.style.opacity}try{let m=t.__host.canvas,S=this.getCanvasDims();if((m.indices.indexOf(n)===-1||this.invalidated.indexOf(m.canvases[n])!==-1)&&this.schedulePaintToCanvas(m,t,n,Ci({x:r+l/2,y:s+l/2},{x:S.width/2,y:S.height/2})),!this.firstMeaningfulPaint)return;let E=this.hostCache.get(m.canvases[n]);if(E)if(t.crop&&t.cropData){if(t.crop[n*5]){let P=[t.crop[n*5+1]/t.display.scale-t.display.points[n*5+1],t.crop[n*5+2]/t.display.scale-t.display.points[n*5+2],1+(t.crop[n*5+3]-t.crop[n*5+1])/t.display.scale,1+(t.crop[n*5+4]-t.crop[n*5+2])/t.display.scale];P[0]+=t.cropData.x/t.display.scale,P[1]+=t.cropData.y/t.display.scale;let k=t.x*this.lastKnownScale,R=t.y*this.lastKnownScale,A=[r+k,s+R,l,u];A[0]+=k,A[1]+=R,this.ctx.drawImage(E,P[0],P[1],P[2],P[3],A[0],A[1],A[2]+1,A[3]+1)}}else yE?this.ctx.drawImage(E,0,0,t.display.points[n*5+3]-t.display.points[n*5+1],t.display.points[n*5+4]-t.display.points[n*5+2],r,s,l+1,u+1):this.ctx.drawImage(E,0,0,t.display.points[n*5+3]-t.display.points[n*5+1],t.display.points[n*5+4]-t.display.points[n*5+2],r,s,l+Number.MIN_VALUE+.5,u+Number.MIN_VALUE+.5)}catch{}t.display.rotation&&this.ctx.restore()}let f=t instanceof Rn&&this.options.box,g=t instanceof Ti&&this.options.polygon;if((f||g)&&!t.props.className&&!t.props.html&&!t.props.href){if(this.visible.push(t),t.props.style){let m=Object.assign({},t.props.style||{},t.hovering?t.props.hoverStyles:{},t.pressing?t.props.pressStyles:{}),S=t.props.relativeStyle?1:l/t.width;typeof m.opacity<"u"&&(this.ctx.globalAlpha=m.opacity);let E=0;typeof m.borderWidth<"u"&&(E=parseInt(m.borderWidth,10)*S);let P=0;typeof m.outlineWidth<"u"&&(P=parseInt(m.outlineWidth,10)*S);let k=0;if(typeof m.outlineOffset<"u"&&(k=parseInt(m.outlineOffset,10)*S),m.borderColor&&(this.ctx.strokeStyle=m.borderColor),m.boxShadow){let R=m.boxShadow.split(/,(?![^(]*\))/);for(let A of R){let x=sv[A]||ov.exec(A)||ov.exec(A);sv[A]=x,x&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(x[1])*this.dpi*S,this.ctx.shadowOffsetY=parseInt(x[3])*this.dpi*S,this.ctx.shadowBlur=parseInt(x[5])*this.dpi*S,this.ctx.shadowColor=x[9],this.ctx.fillStyle="rgba(0,0,0,1)",this.ctx.fillRect(r+E,s+E,l,u),this.ctx.restore())}}if(this.ctx.fillStyle=m.backgroundColor||"transparent",this.ctx.lineWidth=E,g){let R=t.shape,A=R.points||[],x=A.length;this.ctx.beginPath();for(let w=0;w<x;w++)this.ctx.lineTo(r+A[w][0]*this.lastKnownScale,s+A[w][1]*this.lastKnownScale);R.open||this.ctx.closePath(),E&&this.ctx.stroke(),R.open||this.ctx.fill()}else E&&this.ctx.strokeRect(r+E/2,s+E/2,l+E,u+E),this.ctx.fillRect(r+E,s+E,l,u);P&&(m.outlineColor&&(this.ctx.strokeStyle=m.outlineColor),this.ctx.lineWidth=P,this.ctx.strokeRect(r-P/2-k,s-P/2-k,l+E*2+P+k*2,u+E*2+P+k*2))}this.ctx.globalAlpha=h}}loadImage(t,n,r,s=!1){if(Ua[t]&&Ua[t].naturalWidth>0){n(Ua[t]);return}try{let l=!1;s||setTimeout(()=>{l||this.loadImage(t,n,r,!0)},3e3);let u=document.createElement("img");u.decoding="auto",u.onload=function(){l=!0,n(u),Ua[t]=u,u.onload=null},this.options.crossOrigin&&(u.crossOrigin="anonymous"),u.src=t,u.complete&&u.onload({}),u.width}catch(l){console.log("image error",l),r(l)}}schedulePaintToCanvas(t,n,r,s){this.imagesPending++,t.indices.push(r);let l=`${n.id}--${n.display.scale}-${r}`,u=this.invalidated.indexOf(l);u!==-1&&this.invalidated.splice(u,1),t.canvases[r]=l,n.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:l,scale:n.display.scale,network:!0,distance:s,task:()=>new Promise(h=>{if(this.visible.indexOf(n)===-1){this.imagesPending--,t.indices.splice(t.indices.indexOf(r),1),h();return}let f=n.getImageUrl(r);this.loadImage(f,g=>{this.loadingQueue.push({id:l,scale:n.display.scale,distance:s,task:()=>new Promise(m=>{this.imageIdsLoaded.includes(l)||(this.imagesLoaded++,this.imageIdsLoaded.push(l)),t.loaded.push(r),t.loaded.length===t.indices.length&&(t.loading=!1);let S=n.display.points.slice(r*5,r*5+5),E=document.createElement("canvas"),P=E.getContext("2d");E.width=S[3]-S[1],E.height=S[4]-S[2],this.hostCache.set(t.canvases[r],E),this.drawCalls.push(()=>{P.drawImage(g,0,0,S[3]-S[1],S[4]-S[2]),m()})})}),h()},g=>{this.imagesPending--,t.indices.splice(t.indices.indexOf(r),1),h()})})})}afterPaintLayer(t,n){}prepareLayer(t,n){if(t.__owner.value)if(t.cropData){let r=this.lastKnownScale*(1/t.display.scale);this.applyTransform(t,n[1],n[2],n[3]-n[1],n[4]-n[2])}else this.applyTransform(t,n[1],n[2],n[3]-n[1],n[4]-n[2]);(!t.__host||!t.__host.canvas)&&(t instanceof Ge||t instanceof dn)&&this.createImageHost(t)}finishLayer(){this.lastPaintedObject&&this.clearTransform()}createImageHost(t){t.__host=t.__host?t.__host:{},t.__host.canvas={canvas:void 0,canvases:[],indices:[],loaded:[],loading:!1}}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getViewportBounds(t,n,r){let s=t.getActiveZone();if(s){let l=n[3]-n[1]<s.points[3]-s.points[1],u=n[4]-n[2]<s.points[4]-s.points[2];return{x1:l?s.points[1]-r:s.points[1]+(s.points[3]-s.points[1])/2-(n[3]-n[1])/2,y1:u?s.points[2]-r:s.points[2]+(s.points[4]-s.points[2])/2-(n[4]-n[2])/2,x2:l?s.points[3]+r:s.points[1]+(s.points[3]-s.points[1])/2-(n[3]-n[1])/2,y2:u?s.points[4]+r:s.points[2]+(s.points[4]-s.points[2])/2-(n[4]-n[2])/2}}return null}pendingUpdate(){let t=!this.pendingDrawCall&&this.drawCalls.length===0&&this.imagesPending===0&&this.loadingQueue.length===0&&this.tasksRunning===0;return!t&&this.visible.length===0&&setTimeout(()=>{this.canvas.style.opacity="1",this.firstMeaningfulPaint=!0},500),!this.firstMeaningfulPaint&&t&&this.visible.length?(this.canvas.style.opacity="1",this.firstMeaningfulPaint=t,!0):this.options.debug?!0:!t}getRendererScreenPosition(){return this.rendererPosition}reset(){this.loadingQueue=[],this.drawCalls=[]}};var Ri=class{constructor(t){v(this,"renderers",[]);v(this,"length");for(let n of t)n&&this.renderers.push(n);this.length=this.renderers.length}afterFrame(t,n,r,s){for(let l=0;l<this.length;l++)this.renderers[l].afterFrame(t,n,r,s)}afterPaintLayer(t,n){for(let r=0;r<this.length;r++)this.renderers[r].afterPaintLayer(t,n)}beforeFrame(t,n,r,s){for(let l=0;l<this.length;l++)this.renderers[l].beforeFrame(t,n,r,s)}triggerResize(){for(let t=0;t<this.length;t++){let n=this.renderers[t];n.triggerResize&&n.triggerResize()}}getPointsAt(t,n,r,s){return this.renderers[0].getPointsAt(t,n,r,s)}getScale(t,n){return this.renderers[0].getScale(t,n)}getViewportBounds(t,n,r){return this.renderers[0].getViewportBounds(t,n,r)}getRendererScreenPosition(){return this.renderers[0].getRendererScreenPosition()}isReady(){for(let t=0;t<this.length;t++)if(!this.renderers[t].isReady())return!1;return!0}paint(t,n,r,s,l,u){for(let h=0;h<this.length;h++)this.renderers[h].paint(t,n,r,s,l,u)}pendingUpdate(){for(let t=0;t<this.length;t++)if(this.renderers[t].pendingUpdate())return!0;return!1}prepareLayer(t,n){for(let r=0;r<this.length;r++)this.renderers[r].prepareLayer(t,n)}finishLayer(t,n){for(let r=0;r<this.length;r++)this.renderers[r].finishLayer(t,n)}resize(t,n){for(let r=0;r<this.length;r++)this.renderers[r].resize(t,n)}reset(){for(let t=0;t<this.length;t++)this.renderers[t].reset()}};var Ns=class{constructor(t){v(this,"canvas");v(this,"context");v(this,"heightRatio",1);v(this,"widthRatio",1);v(this,"target",new Float32Array(5));v(this,"initialWidth");v(this,"initialHeight");v(this,"bounds");v(this,"aggregate");v(this,"delta",0);v(this,"renderNextFrame",!0);this.canvas=t,this.initialWidth=t.width,this.initialHeight=t.height,this.context=t.getContext("2d"),this.context.globalAlpha=.5,this.aggregate=Qt(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(t,n,r){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let s=this.initialWidth/t.width,l=this.initialHeight/t.height,u=this.widthRatio>this.heightRatio?s:l;if(this.target=r,this.bounds){let h=t.getPointsAt(this.bounds,this.aggregate,u);for(let[f,g]of h)if(f instanceof Ge&&f.__host.canvas){let m=g.length/5;for(let S=0;S<m;S++)if(f.__host.canvas.canvases[S]){let P={x1:g[S+1]*u,y1:g[S+2]*u,width:(g[S+3]-g[S+1])*u,height:(g[S+4]-g[S+2])*u}}}}t.getPoints().forEach((h,f,g)=>{if(f%5===0&&h){let m={x1:g[f+1]*u,y1:g[f+2]*u,x2:g[f+3]*u,y2:g[f+4]*u,width:(g[f+3]-g[f+1])*u,height:(g[f+4]-g[f+2])*u};this.context.strokeStyle="red",this.context.strokeRect(m.x1,m.y1,m.width,m.height)}}),r&&(this.context.strokeStyle="red",this.context.lineWidth=window.devicePixelRatio||1,this.context.strokeRect(r[1]*u,r[2]*u,(r[3]-r[1])*u,(r[4]-r[2])*u))}}getActiveZone(t){return null}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getScale(t,n){return 1}beforeFrame(t,n){this.bounds=ee.singleBox(t.width,t.height)}drawImage(){}afterPaintLayer(t,n){}paint(t,n,r,s,l,u){this.renderNextFrame=!0}prepareLayer(t){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(t,n,r){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}};var oh=class{constructor(){v(this,"autoWidth",!1);v(this,"autoHeight",!0);v(this,"width");v(this,"height");v(this,"world");v(this,"content",[]);v(this,"viewingDirection","left-to-right");v(this,"rows");v(this,"columns",4);v(this,"spacing",20);v(this,"reversed",!1);v(this,"padding",20);this.world=hn.withProps({width:0,height:0,viewingDirection:"left-to-right"}),this.width=0,this.height=0}setViewingDirection(t){this.viewingDirection=t}addContent(t){this.content.push(...t.map(n=>this.world.addObjectAt(n,{width:0,height:0,x:0,y:0})))}setWidth(t){this.width=t}setHeight(t){this.height=t}setSpacing(t){this.spacing=t}setPadding(t){this.padding=t}setRows(t){this.autoWidth=!0,this.rows=t}setColumns(t){this.autoHeight=!0,this.columns=t}recalculate(){if(this.height===0&&this.width===0||this.rows===0||this.columns===0)return;if(this.autoHeight&&!this.width)throw new Error("Cannot set auto height without setting a width");if(this.autoWidth&&!this.height)throw new Error("Cannot set auto width without setting a height");(this.viewingDirection==="left-to-right"||this.viewingDirection==="top-to-bottom")&&this.reversed&&(this.reversed=!1,this.content.reverse()),(this.viewingDirection==="right-to-left"||this.viewingDirection==="bottom-to-top")&&!this.reversed&&(this.reversed=!0,this.content.reverse());let t=this.content.length,n=()=>{if(this.autoWidth&&this.rows){let h=t>this.rows?this.rows:t;return{columns:Math.ceil(t/h),rows:h}}if(this.autoHeight&&this.columns){let h=t>this.columns?this.columns:t;return{columns:h,rows:Math.ceil(t/h)}}throw new Error("Something went wrong.")},{columns:r,rows:s}=n(),l=this.autoWidth?-1:this.width-this.padding*2,u=this.autoWidth?-1:(l-this.spacing*(r-1))/r;if(this.autoHeight&&!this.autoWidth){let h=0,f=this.padding;for(let g=0;g<s&&h!==t;g++){let m=0,S=[];for(let E=0;E<r;E++){let P=this.reversed?t-h:h;if(h===t)break;let k=this.content[P],R=k.width,A=k.width/k.height,x=u/A;S.push([h,u,x,u/R]),x>m&&(m=x),h++}for(let E=0;E<r&&S[E];E++){let P=this.world.getPoints(),k=S[E][0],R=S[E][1],A=S[E][2],x=S[E][3],w=this.padding+E*(this.spacing+R),_=f+(m-A)/2,L=this.reversed?t-k:k,O=P[L*5+1],z=P[L*5+2];this.world.scaleWorldObject(k,x),(O!==w||z!==_)&&this.world.translateWorldObject(L,w-O,_-z)}f+=m+this.spacing}this.height=f+this.padding,this.world.resize(this.width,this.height);return}this.autoWidth&&this.autoHeight,!this.autoWidth&&this.autoHeight}getWorld(){return this.world}};var Lv=Y(Tv(),1);function Rv(e){return{x:e[1],y:e[2],width:e[3]-e[1],height:e[4]-e[2]}}var zv="pan",Iv="scroll",_E="gesture",Nv={zoomOutFactor:.8,zoomInFactor:1.25,maxZoomFactor:1,minZoomFactor:.05,zoomDuration:300,zoomWheelConstant:20,zoomClamp:.6,panBounceStiffness:120,panBounceDamping:15,panTimeConstant:240,panPower:.1,nudgeDistance:100,panPadding:0,devicePixelRatio:1,enableWheel:!0,enableClickToZoom:!0,ignoreSingleFingerTouch:!1,enablePanOnWait:!1,requireMetaKeyForWheelZoom:!1,panOnWaitDelay:40,onPanInSketchMode:()=>{},parentElement:null},Os=(e={})=>({start:function(t){let{zoomWheelConstant:n,enableWheel:r,enableClickToZoom:s,ignoreSingleFingerTouch:l,enablePanOnWait:u,panOnWaitDelay:h,parentElement:f,requireMetaKeyForWheelZoom:g}={...Nv,...e},m={pointerStart:{x:0,y:0},isPressing:!1,mousemoveBuffer:V(5),multiTouch:{distance:0}};t.world.activatedEvents.push("onMouseUp","onMouseDown","onMouseMove","onTouchStart","onTouchEnd","onTouchMove");function S(){R=0,x="",_(),_(void 0,"notice"),A=0}function E(){t.world.constraintBounds(),S()}function P(M){if(M.which>1){m.isPressing=!1;return}t.mode==="explore"&&(M.preventDefault(),m.pointerStart.x=M.atlas.x,m.pointerStart.y=M.atlas.y,t.transitionManager.stopTransition(),m.isPressing=!0)}function k(){S(),m.isPressing&&(t.mode==="explore"&&t.world.constraintBounds(),m.isPressing=!1)}let R=0,A=0,x="";function w(M){if(t.mode==="explore"){if(M.atlasTouches.length===1&&(A=performance.now(),l==!1&&M.preventDefault(),m.pointerStart.x=M.atlasTouches[0].x,m.pointerStart.y=M.atlasTouches[0].y),M.atlasTouches.length===2){x=_E,M.preventDefault();let K=M.atlasTouches[0].x,se=M.atlasTouches[1].x;m.pointerStart.x=(K+se)/2;let Wn=M.atlasTouches[0].y,fe=M.atlasTouches[1].y;m.pointerStart.y=(Wn+fe)/2,R=Ci({x:M.touches[0].clientX,y:M.touches[0].clientY},{x:M.touches[1].clientX,y:M.touches[1].clientY})}t.transitionManager.stopTransition(),m.isPressing=!0}}function _(M,K="intent"){f&&(f.dataset[K]=M)}function L(M){let K=null,se=null,Wn=!1,fe=0;if(m.isPressing&&M.touches.length===2){let Et=M.touches[0].clientX,tn=M.touches[1].clientX;K=(Et+tn)/2;let Ir=M.touches[0].clientY,Lr=M.touches[1].clientY;se=(Ir+Lr)/2,fe=Ci({x:M.touches[0].clientX,y:M.touches[0].clientY},{x:M.touches[1].clientX,y:M.touches[1].clientY}),Wn=!0}if(_(x),m.isPressing&&M.touches.length===1){if(u&&(performance.now()-A<h&&x==""&&(x=Iv),x==""&&(x=zv)),_(x),x==""&&l==!0||x==Iv){_("require-two-finger","notice");return}let Et=M.touches[0];K=Et.clientX,se=Et.clientY}if(K!==null&&se!==null){let Et=t.getRendererScreenPosition();if(Et){let{x:tn,y:Ir}=t.viewerToWorld(K-Et.x,se-Et.y),Lr=fe&&R?fe/R:1;t.transitionManager.customTransition(j=>{j.from=V(t.target),j.to=Gt(j.from,At(Re(m.pointerStart.x-tn,m.pointerStart.y-Ir),vr(1/Lr,tn,Ir)),m.mousemoveBuffer),j.elapsed_time=0,j.total_time=0,j.timingFunction=zn.easeInOutExpo,j.done=!1})}R=fe}x==zv&&M.preventDefault()}function O(M){if(m.isPressing){let K=t.getRendererScreenPosition();if(K){let{x:se,y:Wn}=t.viewerToWorld(M.clientX-K.x,M.clientY-K.y);t.transitionManager.customTransition(fe=>{fe.from=V(t.target),fe.to=Gt(fe.from,Re(m.pointerStart.x-se,m.pointerStart.y-Wn),m.mousemoveBuffer),fe.elapsed_time=0,fe.total_time=0,fe.timingFunction=zn.easeInOutExpo,fe.done=!1})}}}function z(M){t.mode==="explore"&&t.world.zoomIn(M.atlas)}function D(M){let se=1+(0,Lv.default)(M).spinY/n;t.world.zoomTo(se,M.atlas,!0)}function b(M){return g&&M.metaKey==!1?(_("meta-required","notice"),M.stopPropagation(),!1):!0}t.world.addEventListener("mouseup",E),t.world.addEventListener("touchend",E),t.world.addEventListener("touchstart",w),t.world.addEventListener("mousedown",P),window.addEventListener("touchend",k),window.addEventListener("mouseup",k),window.addEventListener("mousemove",O),f&&f.addEventListener("touchmove",L),s&&(t.world.activatedEvents.push("onClick"),t.world.addEventListener("click",z)),r&&(t.world.activatedEvents.push("onWheel"),g&&f?.addEventListener("wheel",b,{passive:!0,capture:!0}),t.world.addEventListener("wheel",D));let q=t.world.addLayoutSubscriber((M,K)=>{if(M==="zone-changed"&&t.transitionManager.constrainBounds({transition:{duration:0}}),M==="zoom-to"&&K&&t.transitionManager.zoomTo(K.factor,{origin:K.point,stream:K.stream}),M==="go-home"){let se=K.immediate?{duration:0}:void 0;t.transitionManager.goToRegion(Rv(t.homePosition),{transition:se})}if(M==="goto-region"&&K){let se=K.immediate?{duration:0}:{};t.transitionManager.goToRegion(K,{transition:se})}M==="constrain-bounds"&&t.transitionManager.constrainBounds({transition:K?.immediate?{duration:0}:void 0})});return()=>{t.world.removeEventListener("mouseup",E),t.world.removeEventListener("touchend",E),t.world.removeEventListener("touchstart",w),t.world.removeEventListener("mousedown",P),window.removeEventListener("touchend",k),window.removeEventListener("mouseup",k),t.world.removeEventListener("mousemove",O),f&&(f.removeEventListener("touchmove",O),f.removeEventListener("wheel",b,{passive:!0,capture:!0})),s&&t.world.removeEventListener("click",z),r&&t.world.removeEventListener("wheel",D),q()}},updatePosition(){}});var Le=Y(le(),1);var qa=Y(le(),1),Yv=Y(Ie(),1),$n=qa.default.createContext("explore");$n.displayName="Mode";var Ms=()=>(0,qa.useContext)($n);function QE(e){return(0,Yv.jsx)($n.Provider,{value:e.mode,children:e.children})}var Xt=Y(le(),1);function Zv(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Ja({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let s=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)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");let[l,u]=(0,Xt.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),h=(0,Xt.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l,orientationHandler:null}),f=e?typeof e=="number"?e:e.scroll:null,g=e?typeof e=="number"?e:e.resize:null,m=(0,Xt.useRef)(!1);(0,Xt.useEffect)(()=>(m.current=!0,()=>void(m.current=!1)));let[S,E,P]=(0,Xt.useMemo)(()=>{let x=()=>{if(!h.current.element)return;let{left:w,top:_,width:L,height:O,bottom:z,right:D,x:b,y:q}=h.current.element.getBoundingClientRect(),M={left:w,top:_,width:L,height:O,bottom:z,right:D,x:b,y:q};h.current.element instanceof HTMLElement&&r&&(M.height=h.current.element.offsetHeight,M.width=h.current.element.offsetWidth),Object.freeze(M),m.current&&!ZE(h.current.lastBounds,M)&&u(h.current.lastBounds=M)};return[x,g?Zv(x,g):x,f?Zv(x,f):x]},[u,r,f,g]);function k(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",P,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function R(){h.current.element&&(h.current.resizeObserver=new s(P),h.current.resizeObserver.observe(h.current.element),t&&h.current.scrollContainers&&h.current.scrollContainers.forEach(x=>x.addEventListener("scroll",P,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{P()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}let A=x=>{!x||x===h.current.element||(k(),h.current.element=x,h.current.scrollContainers=Kv(x),R())};return XE(P,!!t),GE(E),(0,Xt.useEffect)(()=>{k(),R()},[t,P,E]),(0,Xt.useEffect)(()=>k,[]),[A,l,S]}function GE(e){(0,Xt.useEffect)(()=>{let t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function XE(e,t){(0,Xt.useEffect)(()=>{if(t){let n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Kv(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:s}=window.getComputedStyle(e);return[n,r,s].some(l=>l==="auto"||l==="scroll")&&t.push(e),[...t,...Kv(e.parentElement)]}var YE=["x","y","top","bottom","left","right","width","height"],ZE=(e,t)=>YE.every(n=>e[n]===t[n]);var wh=Y(le(),1),qn=wh.default.createContext(null);qn.displayName="Atlas";var Gr=wh.default.createContext(null);Gr.displayName="Bounds";var er=Y(le(),1);var py=Y(dy(),1);var Bs,$E=typeof performance=="object"&&typeof performance.now=="function";if($E){let e=performance;Bs=()=>e.now()}else{let e=Date,t=e.now();Bs=()=>e.now()-t}var my=Y(le(),1);var qE=16;function hy(e,t){e&&e.appendChild&&t&&e.appendChild(t)}function gy(e,t){e&&e.removeChild&&t&&e.removeChild(t)}function JE(e,t){return gy(e.world,t)}function e2(e,t,n){return vy(e.world,t,n)}function vy(e,t,n){e&&e instanceof Kn&&(e=e.world),e&&e.insertBefore&&e.insertBefore(t,n)}function Ih(e,t,n){if(n&&(e.applyProps&&e.applyProps(n),e instanceof Ae))for(let r of mo){let s=r.slice(2).toLowerCase();n[r]!==t[r]&&(t[r]&&e.removeEventListener(s,t[r]),e.addEventListener(s,n[r]))}}function Lh(e,t){let n=Object.keys(t),r=!1;for(let s of n)if(mo.indexOf(s)!==-1){let l=Tn[s];if(l){if(e.activatedEvents.indexOf(l)!==-1)continue;r=!0,e.activatedEvents.push(l)}}r&&e.triggerEventActivation()}var ou=new Map,fy={};function t2(e,{args:t=[],...n},r,s,l){if(!(r instanceof Kn)&&l){let f=g=>g.return?f(g.return):g.stateNode&&g.stateNode.containerInfo;r=f(l)}let u,h=r.world;switch(e){case"world":u=hn.withProps({width:n.width,height:n.height,viewingDirection:"left-to-right"}),u.activatedEvents=h.activatedEvents,u.eventHandlers=h.eventHandlers,u.subscriptions=h.subscriptions,u.triggerEventActivation(),h=u;break;case"box":u=new Rn;break;case"shape":u=new Ti;break;case"worldObject":case"world-object":u=new Zn;break;case"worldImage":case"world-image":u=new Ge;break;case"texture":u=new Vr;break;case"compositeImage":case"composite-image":u=new Cs({id:n.id,width:n.width,height:n.height,images:[],renderOptions:n.renderOptions});break;case"tiledImage":case"tiled-image":u=dn.fromTile(n.uri,n.display,n.tile,n.scaleFactor,void 0,n.format,n.useFloorCalc,n.version3);break;case"paragraph":u=new yr,u.text=n.children;break;default:return}return Lh(h,n),Ih(u,{},n),u}function n2(e,t){if(t instanceof hn)e.world=t;else if(t instanceof Zn)e.world.appendChild(t);else if(t)throw new Error("Invalid root")}var js=(0,py.default)({unstable_now:Bs,now:Bs,createInstance:t2,removeChild:gy,appendChild:hy,appendInitialChild:hy,insertBefore:vy,warnsIfNotActing:!0,supportsMutation:!0,isPrimaryRenderer:!1,scheduleTimeout:typeof setTimeout<"u"?setTimeout:void 0,cancelTimeout:typeof clearTimeout<"u"?clearTimeout:void 0,setTimeout:typeof setTimeout<"u"?setTimeout:void 0,clearTimeout:typeof clearTimeout<"u"?clearTimeout:void 0,noTimeout:-1,appendChildToContainer:n2,removeChildFromContainer:JE,createTextInstance(){},insertInContainerBefore:e2,prepareUpdate(e,t,n,r,s){return Lh(s.world,r),r},commitUpdate(e,t,n,r,s,l){e.applyProps&&t&&Ih(e,r,t)},finalizeInitialChildren(e){return e?.__handlers},getChildHostContext(){return fy},getRootHostContext(){return fy},prepareForCommit(e){return e.isCommitting=!0,null},preparePortalMount(){},hideInstance(e){e&&e.points&&(e.points[0]=0)},unhideInstance(e,t){e&&e.points&&(e.points[0]=1)},getPublicInstance(e){return e},hideTextInstance(){throw new Error("Text is not allowed in the react-three-fibre tree. You may have extraneous whitespace between components.")},resetAfterCommit(e){e.isCommitting=!1,e.pendingUpdate=!0,e.world&&e.world.needsRecalculate&&(e.world.recalculateWorldSize(),e.world.triggerRepaint())},shouldSetTextContent(){return!1},clearContainer(){return!1},supportsHydration:!1,supportsPersistence:!1,detachDeletedInstance(e){},afterActiveInstanceBlur(){},beforeActiveInstanceBlur(){},getCurrentEventPriority(){return console.log("getCurrentEventPriority"),qE},getInstanceFromNode(e){throw console.log("getInstanceFromNode",e),new Error("Not implemented")},getInstanceFromScope(e){throw console.log("getInstanceFromScope",e),new Error("Not implemented")},prepareScopeUpdate(e,t){throw console.log("prepareScopeUpdate",e,t),new Error("Not implemented")},logRecoverableError(){},requestPostPaintCallback(){}});js.injectIntoDevTools({bundleType:0,version:my.version,rendererPackageName:"@atlas-viewer/atlas"});function wo(e,t){let n=ou.get(e);n&&js.updateContainer(null,n,null,()=>{ou.delete(e),t&&t(e)})}var So={render(e,t){let n=ou.get(t);if(n)js.updateContainer(e,n,null);else{let r=js.createContainer(t,0,null,!1,null,"",()=>{},null);js.updateContainer(e,r,null),ou.set(t,r)}},unmountComponentAtNode(e,t){wo(e,t)}};var su=Y(le(),1),Yt=typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")?su.useLayoutEffect:su.useEffect;var xo=Y(Ie(),1),yy=er.default.memo(({children:e,setIsReady:t,onCreated:n,bounds:r,preset:s,mode:l="explore"})=>{let u=(0,er.useCallback)(function(f){let g=(0,er.useRef)(!1),m=()=>{t(!0)};return(0,er.useEffect)(()=>{if(s&&!g.current){s.runtime.goHome();let S=n&&n(s);return void(S&&S.then?S.then(m):m())}return()=>{}},[]),(0,er.useEffect)(()=>{g.current=!0},[]),f.children},[s]);return Yt(()=>{if(s){let h=s.runtime;l!==h.mode&&(h.mode=l),So.render((0,xo.jsx)(er.default.StrictMode,{children:(0,xo.jsx)(u,{children:(0,xo.jsx)(Gr.Provider,{value:r,children:(0,xo.jsx)($n.Provider,{value:l,children:(0,xo.jsx)(qn.Provider,{value:s,children:e})})})})}),h)}},[s,l,e]),Yt(()=>{if(s){let h=s.runtime;return()=>{So.unmountComponentAtNode(h)}}return()=>{}},[s]),null});var bs=class{constructor(t,n){v(this,"canvas");v(this,"gl");v(this,"program");v(this,"fragmentShader");v(this,"vertexShader");v(this,"rectBuffer");v(this,"fragmentShaderSource",`
|
|
19
19
|
precision mediump float;
|
|
20
20
|
|
|
21
21
|
uniform sampler2D u_image;
|
|
@@ -55,7 +55,7 @@ Error generating stack: `+l.message+`
|
|
|
55
55
|
transform-origin: 0px 0px;
|
|
56
56
|
`),interactive:this.stylesheet.addStylesheet("pointer-events: all"),nonInteractive:this.stylesheet.addStylesheet("pointer-events: none")},this.stylesheet.updateSheet()}createHtmlHost(t){if(this.htmlContainer&&(this.options.box||t.props.className||t.props.html||t.props.href)){let n=document.createElement(t.props.href?"a":"div");if(t.props.href){n.style.display="block",n.href=t.props.href;let r=t.props.hrefTarget||"_blank";n.target=r,r!=="_self"&&(n.rel="noopener noreferrer")}n.title=t.props.title||"",this.options.inlineStyles?(n.style.display="block",n.style.position="absolute",n.style.overflow="hidden",n.style.transformOrigin="0px 0px"):n.classList.add(this.classes.hostClassName),t.__host={element:n,revision:null,relative:!1},this.updateHtmlHost(t,t.width,t.height),t.__onCreate&&t.__onCreate()}}triggerResize(){this.options.triggerResize()}updateHtmlHost(t,n,r){if(t.__revision!==t.__host.revision){let s=t.__host.element,l=[this.classes.hostClassName];if(t.props.interactive?this.options.inlineStyles?s.style.pointerEvents="all":l.push(this.classes.interactive):this.options.inlineStyles?s.style.pointerEvents="none":l.push(this.classes.nonInteractive),t.props.href){s.style.display="block",s.href=t.props.href;let f=t.props.hrefTarget||"_blank";s.target=f,f!=="_self"?s.rel="noopener noreferrer":s.rel=""}else s.href&&s.removeAttribute("href");if(t.props.title&&(s.title=t.props.title||""),t.props.className&&(l.push(t.props.className),t.hovering&&l.push(`${t.props.className}--hover`),t.pressing&&l.push(`${t.props.className}--active`)),t.props.relativeStyle?(s.style.width=`${n||t.width}px`,s.style.height=`${r||t.height}px`):(s.style.width=`${t.width}px`,s.style.height=`${t.height}px`),t.props.style){Object.assign(s.style,t.props.style||{},t.hovering?t.props.hoverStyles||{}:{},t.pressing?t.props.pressStyles||{}:{});return}if(this.options.text&&t instanceof yr){t.text&&(s.innerText=t.text),t.backgroundColor&&(s.style.backgroundColor=t.backgroundColor),t.color&&(s.style.color=t.color),t.props.font&&(s.style.font=t.props.font),t.props.textAlign&&(s.style.textAlign=t.props.textAlign),t.__host.revision=t.__revision;let f=l.join(" ");s.className=f,s.part=f}t instanceof Rn&&(this.options.box||t.props.className||t.props.html)&&(t.props.backgroundColor&&(s.style.backgroundColor=t.props.backgroundColor),t.props.border!==s.style.border&&(s.style.border=t.props.border));let h=l.join(" ");s.className=h,s.part=h}}afterFrame(t,n,r){this.stylesheet.updateSheet();for(let s of this.previousVisible)this.visible.indexOf(s)===-1&&this.htmlContainer&&s.__id&&this.htmlIds.indexOf(s.__id)!==-1&&this.htmlContainer.removeChild(s.__host.element);this.previousVisible=this.visible}afterPaintLayer(t,n){}beforeFrame(t,n,r){this.stylesheet.clearClasses(),this.paintTx++,this.zIndex=0,this.visible=[]}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getScale(t,n){let r=this.rendererPosition.width/t,s=this.rendererPosition.height/n;return r<s?s:r}getViewportBounds(t,n,r){return null}isReady(){return!1}paint(t,n,r,s,l,u){if(this.zIndex++,(this.options.text&&t instanceof yr||t instanceof Rn&&(this.options.box||t.props.className||t.props.html))&&t.__host.tx!==this.paintTx&&(this.visible.push(t),t.__host.tx=this.paintTx,this.htmlContainer)){this.updateHtmlHost(t,l,u);let h=l/t.width,f=t.__host.element;f.style.zIndex=`${this.zIndex}`,t.props.relativeStyle?f.style.transform=`translate(${Math.round(r)}px, ${Math.round(s)}px)`:f.style.transform=`translate(${Math.round(r)}px, ${Math.round(s)}px) scale(${h})`,this.previousVisible.indexOf(t)===-1&&this.htmlContainer.appendChild(f),this.htmlIds.indexOf(t.__id)===-1&&this.htmlIds.push(t.__id)}}pendingUpdate(){return!1}prepareLayer(t){t.__host||(t instanceof yr||t instanceof Rn)&&this.createHtmlHost(t)}resize(t,n){typeof t<"u"&&typeof n<"u"&&(this.htmlContainer.style.width=`${t}px`,this.htmlContainer.style.height=`${n}px`),this.rendererPosition=this.htmlContainer.getBoundingClientRect()}getRendererScreenPosition(){return this.rendererPosition}finishLayer(){}reset(){}};var _o=class _o{constructor(t,n,r){v(this,"element");v(this,"runtime");v(this,"unsubscribe");v(this,"activatedEvents",[]);v(this,"eventHandlers",[]);v(this,"bounds");v(this,"listening");v(this,"pointerMoveEvent");v(this,"pointerEventState",{isClicking:!1,isDragging:!1,isPressed:!1,mousedOver:[],itemsBeingDragged:[],mouseDownStart:{x:0,y:0},lastTouches:[]});v(this,"options");v(this,"_realPointerMove",t=>{this.pointerMoveEvent=t});v(this,"onWheelEvent",t=>{t.preventDefault(),this.onPointerEvent(t)});v(this,"onTouchEvent",t=>{let n=Tn[t.type],r=[],s=t.touches.length;for(let l=0;l<s;l++){let u=t.touches.item(l);if(!u)continue;let{x:h,y:f}=this.runtime.viewerToWorld(u.clientX-this.bounds.left,u.clientY-this.bounds.top),g={id:u.identifier,x:h,y:f};r.push(g)}r.length&&this.assignToEvent(t,r[0].x,r[0].y),n!=="onTouchEnd"?(this.pointerEventState.lastTouches=r,t.atlasTouches=r,this.runtime.world.propagateTouchEvent(n,t,r)):(t.atlasTouches=[],this.runtime.world.propagateTouchEvent(n,t,this.pointerEventState.lastTouches),this.pointerEventState.lastTouches=[])});v(this,"onPointerEvent",t=>{let n=Tn[t.type];if(n&&this.runtime.world.activatedEvents.indexOf(n)!==-1){let{x:r,y:s}=this.runtime.viewerToWorld(t.clientX-this.bounds.left,t.clientY-this.bounds.top);this.assignToEvent(t,r,s),this.runtime.world.propagatePointerEvent(n,t,r,s)}});v(this,"onPointerDown",t=>{this.pointerEventState.isPressed=!0,this.pointerEventState.isClicking=!0,this.pointerEventState.mouseDownStart.x=t.clientX,this.pointerEventState.mouseDownStart.y=t.clientY,setTimeout(()=>{this.runtime&&(this.pointerEventState.isClicking=!1)},250),setTimeout(()=>{if(this.runtime&&this.pointerEventState.isPressed&&!this.pointerEventState.isDragging){let n=this.runtime.viewerToWorld(this.pointerEventState.mouseDownStart.x-this.bounds.left,this.pointerEventState.mouseDownStart.y-this.bounds.top);this.pointerEventState.isDragging=!0,this.pointerEventState.itemsBeingDragged=this.runtime.world.propagatePointerEvent("onDragStart",t,n.x,n.y)}},800),this.onPointerEvent(t)});v(this,"onPointerUp",t=>{if(this.pointerEventState.isClicking){let{x:n,y:r}=this.runtime.viewerToWorld(t.clientX-this.bounds.left,t.clientY-this.bounds.top);this.assignToEvent(t,n,r),this.runtime.world.propagatePointerEvent("onClick",t,n,r)}if(this.pointerEventState.isDragging){for(let n of this.pointerEventState.itemsBeingDragged)n.dispatchEvent("onDragEnd",t);this.pointerEventState.isDragging=!1}this.pointerEventState.isClicking=!1,this.pointerEventState.isPressed=!1,this.pointerEventState.itemsBeingDragged=[],this.onPointerEvent(t)});v(this,"onPointerMove",t=>{this.pointerMoveEvent=void 0;let{x:n,y:r}=this.runtime.viewerToWorld(t.clientX-this.bounds.left,t.clientY-this.bounds.top);if(Number.isNaN(n)||Number.isNaN(r))return;this.assignToEvent(t,n,r),this.runtime.world.propagatePointerEvent("onPointerMove",t,n,r);let s=this.runtime.world.propagatePointerEvent("onMouseMove",t,n,r),l=[],u=[];for(let h of s)l.push(h.id),u.push(h),this.pointerEventState.mousedOver.indexOf(h)===-1&&(h.dispatchEvent("onMouseEnter",t),h.dispatchEvent("onPointerEnter",t),h.dispatchEvent("onMouseOver",t),h.dispatchEvent("onPointerOver",t));for(let h of this.pointerEventState.mousedOver)l.indexOf(h.id)===-1&&(h.dispatchEvent("onMouseLeave",t),h.dispatchEvent("onPointerLeave",t),h.dispatchEvent("onMouseOut",t),h.dispatchEvent("onPointerOut",t));if(this.pointerEventState.isDragging)for(let h of this.pointerEventState.itemsBeingDragged)h.dispatchEvent("onDrag",t);if(this.pointerEventState.isPressed&&!this.pointerEventState.isDragging&&Ci(this.pointerEventState.mouseDownStart,{x:t.clientX,y:t.clientY})>50){let h=this.runtime.viewerToWorld(this.pointerEventState.mouseDownStart.x-this.bounds.left,this.pointerEventState.mouseDownStart.y-this.bounds.top);this.pointerEventState.isDragging=!0,this.pointerEventState.itemsBeingDragged=this.runtime.world.propagatePointerEvent("onDragStart",{...t,atlas:{x:h.x,y:h.y}},h.x,h.y)}this.pointerEventState.mousedOver=u});this.element=t,this.runtime=n,this.unsubscribe=n.world.addLayoutSubscriber(this.layoutSubscriber.bind(this)),this.bounds=t.getBoundingClientRect(),this.listening=!1,this.options={simulationRate:0,...r||{}};let s=0;n.registerHook("useFrame",l=>{s+=l,s>this.options.simulationRate&&this.pointerMoveEvent&&(s=0,n.updateNextFrame())}),n.registerHook("useBeforeFrame",()=>{this.pointerMoveEvent&&this.onPointerMove(this.pointerMoveEvent)}),this.activateEvents()}updateBounds(){this.bounds=this.element.getBoundingClientRect(),this.runtime.updateRendererScreenPosition()}layoutSubscriber(t){t==="event-activation"&&this.listening==!1&&this.activateEvents()}assignToEvent(t,n,r){_o.eventPool.atlas.x=n,_o.eventPool.atlas.y=r,t.atlas=_o.eventPool.atlas}activateEvents(){this.listening=!0,this.element.addEventListener("pointermove",this._realPointerMove),this.element.addEventListener("pointerup",this.onPointerUp),this.element.addEventListener("pointerdown",this.onPointerDown),this.element.addEventListener("mousedown",this.onPointerEvent),this.element.addEventListener("mouseup",this.onPointerEvent),this.element.addEventListener("pointercancel",this.onPointerEvent),this.element.addEventListener("wheel",this.onWheelEvent),this.element.addEventListener("touchstart",this.onTouchEvent),this.element.addEventListener("touchcancel",this.onTouchEvent),this.element.addEventListener("touchend",this.onTouchEvent),this.element.addEventListener("touchmove",this.onTouchEvent)}normalizeEventName(t){return t.startsWith("on")?t.slice(2).toLowerCase():t.toLowerCase()}stop(){this.listening=!1,this.element.removeEventListener("pointermove",this._realPointerMove),this.element.removeEventListener("pointerup",this.onPointerUp),this.element.removeEventListener("pointerdown",this.onPointerDown),this.element.removeEventListener("mousedown",this.onPointerEvent),this.element.removeEventListener("mouseup",this.onPointerEvent),this.element.removeEventListener("pointercancel",this.onPointerEvent),this.element.removeEventListener("wheel",this.onWheelEvent),this.element.removeEventListener("touchstart",this.onTouchEvent),this.element.removeEventListener("touchcancel",this.onTouchEvent),this.element.removeEventListener("touchend",this.onTouchEvent),this.element.removeEventListener("touchmove",this.onTouchEvent),this.unsubscribe();for(let[t,n]of this.eventHandlers)this.element.removeEventListener(this.normalizeEventName(t),n)}};v(_o,"eventPool",{atlas:{x:0,y:0}});var Ni=_o;function Us({interactive:e=!0,viewport:t,forceRefresh:n,canvasElement:r,overlayElement:s,controllerConfig:l,unstable_webglRenderer:u,dpi:h,debug:f,canvasBox:g=!0,polygon:m=!0,navigatorElement:S,runtimeOptions:E}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";let P=e?Os({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,parentElement:r,...l||{}}):void 0,k=new Ri([u?new bs(r,{dpi:h}):new Ls(r,{dpi:h,debug:f,box:g,polygon:m}),s?new Li(s,{box:u||!g,text:!0,triggerResize:n}):void 0,S?new Ns(S):void 0]),R=new Kn(k,new hn(1024,1024),t,P?[P]:[],E),A=new Ni(r,R);return{name:"default-preset",em:A,runtime:R,renderer:k,controller:P,canvas:r,navigator:S,unmount(){wo(R),R.stopControllers(),R.stop(),R.reset(),A&&A.stop()}}}var Yr=1+Number.MIN_VALUE,Vs=class{constructor(t,n){v(this,"container");v(this,"width");v(this,"height");v(this,"pending",!0);v(this,"options");v(this,"stylesheet");v(this,"zIndex",0);v(this,"lastKnownScale",1);v(this,"rendererPosition");v(this,"currentlyVisible",[]);v(this,"previouslyVisible",[]);this.container=t,this.rendererPosition=t.getBoundingClientRect();let{width:r,height:s}=this.rendererPosition;this.width=r,this.height=s,this.options={addPart:!1,setDraggableFalse:!1,imageClass:"",widthStylesheet:!1,sheetPrefix:"position-",background:"#000",...n||{}},this.stylesheet=new Eo({sheetPrefix:this.options.sheetPrefix}),this.container.classList.add(this.stylesheet.addStylesheet(`
|
|
57
57
|
background: ${this.options.background};
|
|
58
|
-
`)),this.options.widthStylesheet&&this.container.appendChild(this.stylesheet.getElement())}isReady(){return!0}resize(){this.rendererPosition=this.container.getBoundingClientRect(),this.width=this.rendererPosition.width,this.height=this.rendererPosition.height}getRendererScreenPosition(){return this.rendererPosition}afterFrame(t,n,r){this.stylesheet.updateSheet();for(let s of this.previouslyVisible)this.currentlyVisible.indexOf(s)===-1&&this.container.removeChild(s);for(let s of this.currentlyVisible)this.previouslyVisible.indexOf(s)===-1&&this.container.appendChild(s);this.previouslyVisible=this.currentlyVisible,this.currentlyVisible=[]}afterPaintLayer(t,n){}beforeFrame(t,n,r){this.stylesheet.clearClasses(),this.zIndex=0}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getScale(t,n){if(Number.isNaN(t)||Number.isNaN(n))return this.lastKnownScale;let r=this.width/t,s=this.height/n,l=r<s?s:r;return Number.isNaN(l)||(this.lastKnownScale=l),this.lastKnownScale}getViewportBounds(t,n,r){return null}createImage(){let t=document.createElement("img");return this.options.imageClass?(t.className=this.options.imageClass,this.options.addPart&&t.setAttribute("part",this.options.imageClass)):(t.style.position="absolute",t.style.pointerEvents="none",t.style.userSelect="none"),this.options.setDraggableFalse&&t.setAttribute("draggable","false"),t}paint(t,n,r,s,l,u){if(this.pending=!1,this.zIndex++,t instanceof Ge){if(!t.__host){let f=this.createImage();f.src=t.uri,t.__host=f,this.container.appendChild(t.__host)}let h=t.__host;this.currentlyVisible.push(h),h.style.zIndex=`${this.zIndex}`,h.style.opacity=`${t.style.opacity}`,this.options.widthStylesheet?h.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(l+Yr).toFixed(2)}px;height:${(u+Yr).toFixed(2)}px;`):(h.style.width=`${l+Yr}px`,h.style.height=`${u+Yr}px`),h.style.transform=`translate(${r}px, ${s}px)`}if(t instanceof dn){if(t.__host||(t.__host={images:[]}),!t.__host.images[n]){let f=t.getImageUrl(n),g=this.createImage();g.src=f,t.__host.images[n]=g,this.container.appendChild(g)}let h=t.__host.images[n];h.style.zIndex=`${this.zIndex}`,h.style.opacity=`${t.style.opacity}`,this.currentlyVisible.push(h),this.options.widthStylesheet?h.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(l+Yr).toFixed(2)}px;height:${(u+Yr).toFixed(2)}px;`):(h.style.width=`${l+Yr}px`,h.style.height=`${u+Yr}px`),h.style.transform=`translate(${r}px, ${s}px)`}}pendingUpdate(){return this.pending}prepareLayer(t){}finishLayer(t){}reset(){}};function Nh({interactive:e,viewport:t,forceRefresh:n,containerElement:r,overlayElement:s,controllerConfig:l}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";let u=e?Os({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,parentElement:r,...l||{}}):void 0,h=new Vs(r,{addPart:!1,setDraggableFalse:!1,imageClass:"atlas-static-image"}),f=s?new Ri([h,new Li(s,{box:!0,text:!0,triggerResize:n})]):h,g=new Kn(f,new hn(1024,1024),t,u?[u]:[]),m=new Ni(r,g);return{name:"static-preset",em:m,runtime:g,renderer:f,controller:u,container:r,overlay:s,unmount(){wo(g),g.stopControllers(),g.stop(),m&&m.stop()}}}var Oh={"default-preset":Us,"static-preset":Nh};var pn=Y(le(),1),r2={};function lu(e,t){let n=(0,pn.useRef)(),r=(0,pn.useRef)(),s=(0,pn.useRef)(),l=(0,pn.useRef)(),u=(0,pn.useRef)({width:t.width,height:t.height,didUpdate:!0}),[h="default-preset",f=r2]=Array.isArray(e)?e||[]:[e],[g,m]=(0,pn.useState)(null);(0,pn.useLayoutEffect)(()=>{let E=r.current,P=l.current,k=n.current,R=s.current,x=(Oh[h]||Us)({containerElement:P,canvasElement:E,overlayElement:k,navigatorElement:R,viewport:u.current,dpi:window.devicePixelRatio||1,forceRefresh:t.forceRefresh,unstable_webglRenderer:t.unstable_webglRenderer,...f||{}});return m(x),()=>{x&&(x.unmount(),E&&(E.height=0,E.width=0),k&&(k.innerHTML=""),R&&(R.height=0,R.width=0))}},[h,f]);let S=(0,pn.useMemo)(()=>({canvas:r,overlay:n,container:l,navigator:s}),[]);return[h,g,u,S]}var wy=Y(le(),1);function Sy(e){return(0,wy.useMemo)(()=>Hs(e),e)}var xy=Y(le(),1),Ey=Y(Ie(),1),Oi=xy.default.forwardRef((e,t)=>(0,Ey.jsx)("div",{...e,ref:t,part:e.className}));var kt=Y(Ie(),1),_y=["brightness","contrast","grayscale","hueRotate","invert","saturate","sepia","blur"],Fh=({htmlChildren:e,renderPreset:t,onCreated:n,mode:r="explore",resetWorldOnChange:s=!0,unstable_webglRenderer:l=!1,unstable_noReconciler:u=!1,hideInlineStyle:h=!1,controllerConfig:f,children:g,overlayStyle:m,containerStyle:S,enableNavigator:E,className:P,containerProps:k={},homePosition:R,homeOnResize:A,homeCover:x,background:w,runtimeOptions:_,debug:L,filters:O,...z})=>{let[D,b]=(0,Le.useState)(r),[q,M]=(0,Le.useState)(!1),K=(0,Le.useRef)(!1),se=(0,Le.useMemo)(()=>(typeof t=="string"&&(t=[t,{}]),L?t?[t[0],{debug:L,...t[1]||{}}]:["default-preset",{debug:L}]:t||"default-preset"),[t,L]),[Wn,fe,xt]=Ja({scroll:!0}),tn=(0,Le.useRef)(),Ir=$=>{tn.current=$,Wn($)},[Lr,j,Me,qi]=lu(se,{width:z.width,height:z.height,forceRefresh:xt,unstable_webglRenderer:l}),[es,ts]=(0,Le.useState)("");(0,Le.useEffect)(()=>{b(r)},[r]),(0,Le.useEffect)(()=>{j&&j.em&&j.em.updateBounds()},[j,fe]),(0,Le.useEffect)(()=>{j?.runtime.setOptions(_||{})},[_]),(0,Le.useEffect)(()=>{j&&j.runtime&&(j.runtime.mode=D),q&&j&&(j.ready=!0)},[j,q,D]),(0,Le.useEffect)(()=>{j&&(x||(j.runtime.manualHomePosition=!!R,j.runtime.setHomePosition(R)))},[j,x,R]),(0,Le.useEffect)(()=>{if(j){let $=j.runtime;$.resize(Me.current.width,z.width,Me.current.height,z.height),Me.current.width=z.width,Me.current.height=z.height,$.updateNextFrame(),Me.current.didUpdate=!0}},[j,z.width,z.height]),(0,Le.useEffect)(()=>{if(O&&j){let $=j.runtime,J=!1;$.hookOptions.enableFilters=!0;for(let me of _y)O[me]?O[me]!==j.runtime.hookOptions.filters[me]&&($.hookOptions.filters[me]=O[me],J=!0):$.hookOptions.filters[me]&&($.hookOptions.filters[me]=0,J=!0);J&&$.updateNextFrame()}else if(j){let $=j.runtime;for(let J of _y)$.hookOptions.filters[J]=0;$.hookOptions.enableFilters=!1,$.updateNextFrame()}},[j,O]),Yt(()=>{if(j&&(j.overlay&&(j.overlay.style.width=`${fe.width}px`,j.overlay.style.height=`${fe.height}px`),j.container&&(j.container.style.width=`${fe.width}px`,j.container.style.height=`${fe.height}px`),x)){let $=j.runtime.world.width,J=j.runtime.world.height,me=$/J,zt=Me.current.width,mi=Me.current.height,Bn=zt/mi;if(me>Bn){Bn=mi/zt,j.runtime.manualHomePosition=!0;let ur=($-J/Bn)/2;x==="start"&&(ur=0),x==="end"&&(ur=$-J/Bn),j.runtime.setHomePosition({x:ur,y:0,width:J/Bn,height:J})}else{let ur=(J-$/Bn)/2;x==="start"&&(ur=0),x==="end"&&(ur=J-$/Bn),j.runtime.manualHomePosition=!0,j.runtime.setHomePosition({x:0,y:ur,width:$,height:$/Bn})}A&&j.runtime.goHome({})}},[j,fe.height,fe.width,x]),Yt(()=>{let $=()=>{if(j){let J=j.runtime;Me.current.width!==z.width&&Me.current.height!==z.height&&(J.resize(Me.current.width,z.width,Me.current.height,z.height),Me.current.width=z.width,Me.current.height=z.height,J.updateNextFrame(),Me.current.didUpdate=!0)}};return window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[j,z.height,z.width]);let ns={width:120},Ji=()=>{if(j&&j.navigator){let $=j.runtime.world.height,J=j.runtime.world.width,me=window.devicePixelRatio||1,zt=ns.width,mi=ns.width/J*$;j.navigator.width=zt*me,j.navigator.height=mi*me,j.navigator.style.width=zt+"px",j.navigator.style.height=mi+"px"}};Yt(()=>{if(j){Ji();let $=j.runtime;return $.world.addLayoutSubscriber(J=>{J==="recalculate-world-size"&&(Ji(),$.resize(Me.current.width,z.width,Me.current.height,z.height))})}return()=>{}},[j,z.width,z.height]);let Dl=(0,Le.useCallback)(function(J){let me=()=>{M(!0)};return(0,Le.useEffect)(()=>{if(j){j.runtime.goHome();let zt=n&&n(j);return void(zt&&zt.then?zt.then(me):me())}else throw new Error("Invalid configuration - no runtime found")},[]),J.children},[j]);(0,Le.useEffect)(()=>{if(j){let $=j.runtime;if(s)return $.world.addLayoutSubscriber(J=>{J==="recalculate-world-size"&&$.goHome()})}return()=>{}},[j,s]),(0,Le.useEffect)(()=>j?j.runtime.registerHook("useBeforeFrame",()=>{if(Me.current.didUpdate&&j.canvas){let J=window.devicePixelRatio||1,me=Me.current.width,zt=Me.current.height;j.canvas.width=me*J,j.canvas.height=zt*J,j.canvas.style.width=me+"px",j.canvas.style.height=zt+"px",j.canvas.getContext("2d")?.scale(J,J),j&&j.em&&j.em.updateBounds(),Me.current.didUpdate=!1}}):()=>{},[j,s]),(0,Le.useEffect)(()=>{let $=()=>{j&&(b("sketch"),ts("mode-sketch")),window.removeEventListener("keyup",$)},J=me=>{if(me.code==="Space"&&j&&j.runtime.mode==="sketch"){if(me.target&&me.target.tagName&&me.target.tagName.toLowerCase()==="input")return;me.preventDefault(),b("explore"),ts("mode-explore"),window.addEventListener("keyup",$)}};return window.addEventListener("keydown",J),()=>{window.removeEventListener("keydown",J),window.removeEventListener("keyup",$)}},[j]),K.current=!0;let{height:Ac,width:nm,...rs}=z,Nr=Sy([z.width,z.height]),ut=!0;return se&&Array.isArray(se)&&se.length>1&&se[1].interactive===!1&&(ut=!1),w=w??"#000",tn.current&&(w=getComputedStyle(tn.current).getPropertyValue("--atlas-background")||w),(0,kt.jsxs)(Oi,{ref:Ir,className:["atlas",h?"":`atlas-width-${Nr}`,es,P,`atlas-${Lr}`].filter(Boolean).join(" ").trim(),style:{...S,...h?{}:{width:z.width,height:z.height}},children:[Lr==="static-preset"?(0,kt.jsx)(Oi,{className:"atlas-static-container",ref:qi.container,tabIndex:0,...k}):(0,kt.jsx)("canvas",{className:"atlas-canvas",part:"atlas-canvas",tabIndex:0,...rs,...k,ref:qi.canvas,"data-background":w}),(0,kt.jsx)(Oi,{className:["atlas-overlay",ut?"atlas-overlay--interactive":""].filter(Boolean).join(" ").trim(),style:{...m||{}},ref:qi.overlay,children:u?(0,kt.jsx)(Dl,{children:(0,kt.jsx)(Gr.Provider,{value:fe,children:(0,kt.jsx)($n.Provider,{value:D,children:(0,kt.jsx)(qn.Provider,{value:j,children:g})})})}):(0,kt.jsx)(yy,{bounds:fe,preset:j,mode:D,setIsReady:M,onCreated:n,children:g})}),E?(0,kt.jsx)(Oi,{className:"atlas-navigator",children:(0,kt.jsx)("canvas",{className:"atlas-navigator-canvas",part:"atlas-navigator-canvas",ref:qi.navigator})}):null,h?(0,kt.jsx)("style",{children:`.atlas-width-${Nr} { width: ${z.width}px; height: ${z.height}px; }`}):(0,kt.jsx)("style",{children:`
|
|
58
|
+
`)),this.options.widthStylesheet&&this.container.appendChild(this.stylesheet.getElement())}isReady(){return!0}resize(){this.rendererPosition=this.container.getBoundingClientRect(),this.width=this.rendererPosition.width,this.height=this.rendererPosition.height}getRendererScreenPosition(){return this.rendererPosition}afterFrame(t,n,r){this.stylesheet.updateSheet();for(let s of this.previouslyVisible)this.currentlyVisible.indexOf(s)===-1&&this.container.removeChild(s);for(let s of this.currentlyVisible)this.previouslyVisible.indexOf(s)===-1&&this.container.appendChild(s);this.previouslyVisible=this.currentlyVisible,this.currentlyVisible=[]}afterPaintLayer(t,n){}beforeFrame(t,n,r){this.stylesheet.clearClasses(),this.zIndex=0}getPointsAt(t,n,r,s){return t.getPointsAt(n,r,s)}getScale(t,n){if(Number.isNaN(t)||Number.isNaN(n))return this.lastKnownScale;let r=this.width/t,s=this.height/n,l=r<s?s:r;return Number.isNaN(l)||(this.lastKnownScale=l),this.lastKnownScale}getViewportBounds(t,n,r){return null}createImage(){let t=document.createElement("img");return this.options.imageClass?(t.className=this.options.imageClass,this.options.addPart&&t.setAttribute("part",this.options.imageClass)):(t.style.position="absolute",t.style.pointerEvents="none",t.style.userSelect="none"),this.options.setDraggableFalse&&t.setAttribute("draggable","false"),t}paint(t,n,r,s,l,u){if(this.pending=!1,this.zIndex++,t instanceof Ge){if(!t.__host){let f=this.createImage();f.src=t.uri,t.__host=f,this.container.appendChild(t.__host)}let h=t.__host;this.currentlyVisible.push(h),h.style.zIndex=`${this.zIndex}`,h.style.opacity=`${t.style.opacity}`,this.options.widthStylesheet?h.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(l+Yr).toFixed(2)}px;height:${(u+Yr).toFixed(2)}px;`):(h.style.width=`${l+Yr}px`,h.style.height=`${u+Yr}px`),h.style.transform=`translate(${r}px, ${s}px)`}if(t instanceof dn){if(t.__host||(t.__host={images:[]}),!t.__host.images[n]){let f=t.getImageUrl(n),g=this.createImage();g.src=f,t.__host.images[n]=g,this.container.appendChild(g)}let h=t.__host.images[n];h.style.zIndex=`${this.zIndex}`,h.style.opacity=`${t.style.opacity}`,this.currentlyVisible.push(h),this.options.widthStylesheet?h.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(l+Yr).toFixed(2)}px;height:${(u+Yr).toFixed(2)}px;`):(h.style.width=`${l+Yr}px`,h.style.height=`${u+Yr}px`),h.style.transform=`translate(${r}px, ${s}px)`}}pendingUpdate(){return this.pending}prepareLayer(t){}finishLayer(t){}reset(){}};function Nh({interactive:e,viewport:t,forceRefresh:n,containerElement:r,overlayElement:s,controllerConfig:l}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";let u=e?Os({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,parentElement:r,...l||{}}):void 0,h=new Vs(r,{addPart:!1,setDraggableFalse:!1,imageClass:"atlas-static-image"}),f=s?new Ri([h,new Li(s,{box:!0,text:!0,triggerResize:n})]):h,g=new Kn(f,new hn(1024,1024),t,u?[u]:[]),m=new Ni(r,g);return{name:"static-preset",em:m,runtime:g,renderer:f,controller:u,container:r,overlay:s,unmount(){wo(g),g.stopControllers(),g.stop(),m&&m.stop()}}}var Oh={"default-preset":Us,"static-preset":Nh};var pn=Y(le(),1),r2={};function lu(e,t){let n=(0,pn.useRef)(),r=(0,pn.useRef)(),s=(0,pn.useRef)(),l=(0,pn.useRef)(),u=(0,pn.useRef)({width:t.width,height:t.height,didUpdate:!0}),[h="default-preset",f=r2]=Array.isArray(e)?e||[]:[e],[g,m]=(0,pn.useState)(null);(0,pn.useLayoutEffect)(()=>{let E=r.current,P=l.current,k=n.current,R=s.current,x=(Oh[h]||Us)({containerElement:P,canvasElement:E,overlayElement:k,navigatorElement:R,viewport:u.current,dpi:window.devicePixelRatio||1,forceRefresh:t.forceRefresh,unstable_webglRenderer:t.unstable_webglRenderer,...f||{}});return m(x),()=>{x&&(x.unmount(),E&&(E.height=0,E.width=0),k&&(k.innerHTML=""),R&&(R.height=0,R.width=0))}},[h,f]);let S=(0,pn.useMemo)(()=>({canvas:r,overlay:n,container:l,navigator:s}),[]);return[h,g,u,S]}var wy=Y(le(),1);function Sy(e){return(0,wy.useMemo)(()=>Hs(e),e)}var xy=Y(le(),1),Ey=Y(Ie(),1),Oi=xy.default.forwardRef((e,t)=>(0,Ey.jsx)("div",{...e,ref:t,part:e.className}));var Ct=Y(Ie(),1),_y=["brightness","contrast","grayscale","hueRotate","invert","saturate","sepia","blur"],Fh=({htmlChildren:e,renderPreset:t,onCreated:n,mode:r="explore",resetWorldOnChange:s=!0,unstable_webglRenderer:l=!1,unstable_noReconciler:u=!1,hideInlineStyle:h=!1,controllerConfig:f,children:g,overlayStyle:m,containerStyle:S,enableNavigator:E,className:P,containerProps:k={},homePosition:R,homeOnResize:A,homeCover:x,background:w,runtimeOptions:_,debug:L,filters:O,...z})=>{let[D,b]=(0,Le.useState)(r),[q,M]=(0,Le.useState)(!1),K=(0,Le.useRef)(!1),se=(0,Le.useMemo)(()=>(typeof t=="string"&&(t=[t,{}]),L?t?[t[0],{debug:L,...t[1]||{}}]:["default-preset",{debug:L}]:t||"default-preset"),[t,L]),[Wn,fe,Et]=Ja({scroll:!0}),tn=(0,Le.useRef)(),Ir=$=>{tn.current=$,Wn($)},[Lr,j,Me,qi]=lu(se,{width:z.width,height:z.height,forceRefresh:Et,unstable_webglRenderer:l}),[es,ts]=(0,Le.useState)("");(0,Le.useEffect)(()=>{b(r)},[r]),(0,Le.useEffect)(()=>{j&&j.em&&j.em.updateBounds()},[j,fe]),(0,Le.useEffect)(()=>{j?.runtime.setOptions(_||{})},[_]),(0,Le.useEffect)(()=>{j&&j.runtime&&(j.runtime.mode=D),q&&j&&(j.ready=!0)},[j,q,D]),(0,Le.useEffect)(()=>{j&&(x||(j.runtime.manualHomePosition=!!R,j.runtime.setHomePosition(R)))},[j,x,R]),(0,Le.useEffect)(()=>{if(j){let $=j.runtime;$.resize(Me.current.width,z.width,Me.current.height,z.height),Me.current.width=z.width,Me.current.height=z.height,$.updateNextFrame(),Me.current.didUpdate=!0}},[j,z.width,z.height]),(0,Le.useEffect)(()=>{if(O&&j){let $=j.runtime,J=!1;$.hookOptions.enableFilters=!0;for(let ye of _y)O[ye]?O[ye]!==j.runtime.hookOptions.filters[ye]&&($.hookOptions.filters[ye]=O[ye],J=!0):$.hookOptions.filters[ye]&&($.hookOptions.filters[ye]=0,J=!0);J&&$.updateNextFrame()}else if(j){let $=j.runtime;for(let J of _y)$.hookOptions.filters[J]=0;$.hookOptions.enableFilters=!1,$.updateNextFrame()}},[j,O]),Yt(()=>{if(j&&(j.overlay&&(j.overlay.style.width=`${fe.width}px`,j.overlay.style.height=`${fe.height}px`),j.container&&(j.container.style.width=`${fe.width}px`,j.container.style.height=`${fe.height}px`),x)){let $=j.runtime.world.width,J=j.runtime.world.height,ye=$/J,rt=Me.current.width,mi=Me.current.height,Bn=rt/mi;if(ye>Bn){Bn=mi/rt,j.runtime.manualHomePosition=!0;let ur=($-J/Bn)/2;x==="start"&&(ur=0),x==="end"&&(ur=$-J/Bn),j.runtime.setHomePosition({x:ur,y:0,width:J/Bn,height:J})}else{let ur=(J-$/Bn)/2;x==="start"&&(ur=0),x==="end"&&(ur=J-$/Bn),j.runtime.manualHomePosition=!0,j.runtime.setHomePosition({x:0,y:ur,width:$,height:$/Bn})}A&&j.runtime.goHome({})}},[j,fe.height,fe.width,x]),Yt(()=>{let $=()=>{if(j){let J=j.runtime;Me.current.width!==z.width&&Me.current.height!==z.height&&(J.resize(Me.current.width,z.width,Me.current.height,z.height),Me.current.width=z.width,Me.current.height=z.height,J.updateNextFrame(),Me.current.didUpdate=!0)}};return window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[j,z.height,z.width]);let ns={width:120},Ji=()=>{if(j&&j.navigator){let $=j.runtime.world.height,J=j.runtime.world.width,ye=window.devicePixelRatio||1,rt=ns.width,mi=ns.width/J*$;j.navigator.width=rt*ye,j.navigator.height=mi*ye,j.navigator.style.width=rt+"px",j.navigator.style.height=mi+"px"}};Yt(()=>{if(j){Ji();let $=j.runtime;return $.world.addLayoutSubscriber(J=>{J==="recalculate-world-size"&&(Ji(),$.resize(Me.current.width,z.width,Me.current.height,z.height))})}return()=>{}},[j,z.width,z.height]);let Dl=(0,Le.useCallback)(function(J){let ye=()=>{M(!0)};return(0,Le.useEffect)(()=>{if(j){j.runtime.goHome();let rt=n&&n(j);return void(rt&&rt.then?rt.then(ye):ye())}else throw new Error("Invalid configuration - no runtime found")},[]),J.children},[j]);(0,Le.useEffect)(()=>{if(j){let $=j.runtime;if(s)return $.world.addLayoutSubscriber(J=>{J==="recalculate-world-size"&&$.goHome()})}return()=>{}},[j,s]),(0,Le.useEffect)(()=>j?j.runtime.registerHook("useBeforeFrame",()=>{if(Me.current.didUpdate&&j.canvas){let J=window.devicePixelRatio||1,ye=Me.current.width,rt=Me.current.height;j.canvas.width=ye*J,j.canvas.height=rt*J,j.canvas.style.width=ye+"px",j.canvas.style.height=rt+"px",j.canvas.getContext("2d")?.scale(J,J),j&&j.em&&j.em.updateBounds(),Me.current.didUpdate=!1}}):()=>{},[j,s]),(0,Le.useEffect)(()=>{let $=()=>{j&&(b("sketch"),ts("mode-sketch")),window.removeEventListener("keyup",$)},J=ye=>{if(ye.code==="Space"&&j&&j.runtime.mode==="sketch"){let rt=ye.target?.tagName?.toLowerCase();if(rt==="input"||rt==="textarea"||ye.target?.isContentEditable)return;ye.preventDefault(),b("explore"),ts("mode-explore"),window.addEventListener("keyup",$)}};return window.addEventListener("keydown",J),()=>{window.removeEventListener("keydown",J),window.removeEventListener("keyup",$)}},[j]),K.current=!0;let{height:Ac,width:nm,...rs}=z,Nr=Sy([z.width,z.height]),ct=!0;return se&&Array.isArray(se)&&se.length>1&&se[1].interactive===!1&&(ct=!1),w=w??"#000",tn.current&&(w=getComputedStyle(tn.current).getPropertyValue("--atlas-background")||w),(0,Ct.jsxs)(Oi,{ref:Ir,className:["atlas",h?"":`atlas-width-${Nr}`,es,P,`atlas-${Lr}`].filter(Boolean).join(" ").trim(),style:{...S,...h?{}:{width:z.width,height:z.height}},children:[Lr==="static-preset"?(0,Ct.jsx)(Oi,{className:"atlas-static-container",ref:qi.container,tabIndex:0,...k}):(0,Ct.jsx)("canvas",{className:"atlas-canvas",part:"atlas-canvas",tabIndex:0,...rs,...k,ref:qi.canvas,"data-background":w}),(0,Ct.jsx)(Oi,{className:["atlas-overlay",ct?"atlas-overlay--interactive":""].filter(Boolean).join(" ").trim(),style:{...m||{}},ref:qi.overlay,children:u?(0,Ct.jsx)(Dl,{children:(0,Ct.jsx)(Gr.Provider,{value:fe,children:(0,Ct.jsx)($n.Provider,{value:D,children:(0,Ct.jsx)(qn.Provider,{value:j,children:g})})})}):(0,Ct.jsx)(yy,{bounds:fe,preset:j,mode:D,setIsReady:M,onCreated:n,children:g})}),E?(0,Ct.jsx)(Oi,{className:"atlas-navigator",children:(0,Ct.jsx)("canvas",{className:"atlas-navigator-canvas",part:"atlas-navigator-canvas",ref:qi.navigator})}):null,h?(0,Ct.jsx)("style",{children:`.atlas-width-${Nr} { width: ${z.width}px; height: ${z.height}px; }`}):(0,Ct.jsx)("style",{children:`
|
|
59
59
|
.atlas { position: relative; display: flex; background: ${w}; z-index: var(--atlas-z-index, 10); -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
|
|
60
60
|
.atlas-width-${Nr} { width: ${z.width}px; height: ${z.height}px; }
|
|
61
61
|
.atlas-canvas { flex: 1 1 0px; }
|
|
@@ -76,7 +76,7 @@ Error generating stack: `+l.message+`
|
|
|
76
76
|
width: var(--atlas-container-width, ${f?`${f}px`:"100%"});
|
|
77
77
|
height: var(--atlas-container-height, ${Py(h||(t?m.height:512))})
|
|
78
78
|
}
|
|
79
|
-
`}),r.htmlChildren]})};var tr=Y(le(),1);var ky=Y(le(),1);var Gs=()=>(0,ky.useContext)(qn);var ot=()=>{let e=Gs();return e?e.runtime:void 0};var Cy=Y(le(),1),Mh=(e,t=[])=>{let n=ot();(0,Cy.useEffect)(()=>n?n.registerHook("useAfterFrame",e):()=>{},t)};var Ty=Y(le(),1),Fi=(e,t=[])=>{let n=ot();(0,Ty.useEffect)(()=>n?n.registerHook("useFrame",e):()=>{},t)};var Ah=()=>{let e=Gs();return e&&e.canvas?e.canvas:void 0};var Ry=Y(le(),1);function uu(){return(0,Ry.useContext)(Gr)}var o2=({onCreate:e})=>{let t=(0,tr.useRef)({x:0,y:0}),n=Ah(),r=uu(),s=ot(),[l,u]=(0,tr.useState)(),[h,f]=(0,tr.useState)(),g=Ms();return Fi(()=>{s&&l&&!h&&(s.pendingUpdate=!0)},[l,h]),Mh(()=>{if(l&&n&&s){let m=n.getContext("2d");if(m){let{x:S,y:E,width:P,height:k}=s.worldToViewer(l.x,l.y,(h?h.x:t.current.x)-l.x,(h?h.y:t.current.y)-l.y);m.lineWidth=h?3:1,m.strokeStyle="#fff",m.strokeRect(S,E,P,k),m.lineWidth=h?3:1,m.strokeStyle="#000",m.strokeRect(S+1,E+1,P-2,k-2)}}},[l,h]),(0,tr.useEffect)(()=>{let m=S=>{if(r&&s){let{x:E,y:P}=s.viewerToWorld(S.clientX-r.left,S.clientY-r.top);t.current.x=~~E,t.current.y=~~P}};return n?(n.addEventListener("mousemove",m),()=>n.removeEventListener("mousemove",m)):()=>{}},[r,n,s]),(0,tr.useEffect)(()=>{let m=S=>{g==="sketch"&&(u({x:Math.round(t.current.x),y:Math.round(t.current.y)}),f(void 0))};return n?(n.addEventListener("mousedown",m),()=>n.removeEventListener("mousedown",m)):()=>{}},[n,g]),(0,tr.useEffect)(()=>{let m=S=>{l&&!h&&f({x:Math.round(t.current.x),y:Math.round(t.current.y)})};return n?(n.addEventListener("mouseup",m),()=>n.removeEventListener("mouseup",m)):()=>{}},[n,l,h]),(0,tr.useEffect)(()=>{l&&h&&e({x:Math.min(l.x,h.x),y:Math.min(l.y,h.y),width:Math.abs(h.x-l.x),height:Math.abs(h.y-l.y)})},[l,e,h]),null};var lr=Y(le(),1);var Bw=Y(le(),1);async function jw(e,t,n){if(Bw.version.startsWith("18.")){let r=await Promise.resolve().then(()=>Y(Ww(),1)),s=r.default?r.default.createRoot:r.createRoot;n.current||(n.current=s(e)),n.current.render(t)}else if(typeof ReactDOM<"u"){let{render:r,unmountComponentAtNode:s}=ReactDOM;r(t,e),n.current={unmount(){s(e)}}}else{let r=await Promise.resolve().then(()=>Y(Hp(),1)),s=r.default?r.default.render:r.render,l=r.default?r.default.unmountComponentAtNode:r.unmountComponentAtNode;s(t,e),n.current={unmount(){l(e)}}}}var Vp=Y(Ie(),1),Pc=lr.default.forwardRef(({children:e,...t},n)=>{let r=(0,lr.useRef)(),s=ot(),l=(0,lr.useRef)(0),u=(0,lr.useRef)(),h=(0,lr.useRef)();return Fi(()=>{if(t.relative){let f=r.current;if(f&&s){let g=s.getScaleFactor();l.current!==g&&(l.current=g,f.style.transformOrigin="0 0",f.style.transform=`scale(${1/l.current})`,f.style.width=`${l.current*100}%`,f.style.height=`${l.current*100}%`,r.current&&u.current?.__owner.value?.rotation&&(f.style.transform=`scale(${1/l.current}) translate(50%, 50%) rotate(${u.current?.__owner.value?.rotation||0}deg) translate(-50%, -50%)`))}}},[t.relative]),(0,lr.useLayoutEffect)(()=>{let f=u.current;n&&f&&(typeof n=="function"?n(f):n.current=f);async function g(){if(f&&f.__host){let m=t.relative?(0,Vp.jsx)("div",{ref:r,children:e}):e;await jw(f.__host.element,m,h)}}f&&f.__host?g():f&&(f.__onCreate=g)},[n,e,u,t.relative]),(0,lr.useLayoutEffect)(()=>()=>{h.current&&setTimeout(()=>{h.current.unmount()},0)},[]),(0,Vp.jsx)("box",{html:!0,...t,ref:u})});Pc.displayName="HTMLPortal";var Uw=Y(le(),1);var ar=Y(le(),1);var Ze=Y(le(),1);var bw=Y(le(),1);var kc=(e,t,n=[])=>{let r=ot(),s=r?r.world:void 0;(0,bw.useEffect)(()=>{if(r){let l=t,u=Tn[e];r.world.activatedEvents.push(u);let h=u.slice(2).toLowerCase();return r.world.addEventListener(h,l),()=>{r.world.removeEventListener(h,l)}}return()=>{}},[s,e,...n])};function Qp(e,t){if(e===0)return[0,1];if(t===0)return[1,0];let n=Math.abs(e)/Math.abs(t);return[n,1-n]}var Cc=Y(le(),1);function Hw(){let e=(0,Cc.useRef)({ctrl:!1,shift:!1,alt:!1});return(0,Cc.useLayoutEffect)(()=>{function t(r){r.key==="Shift"&&(e.current.shift=!0),r.key==="Control"&&(e.current.ctrl=!0),r.key==="Alt"&&(e.current.alt=!0)}function n(r){r.key==="Shift"&&(e.current.shift=!1),r.key==="Control"&&(e.current.ctrl=!1),r.key==="Alt"&&(e.current.alt=!1)}return window.addEventListener("keydown",t),window.addEventListener("keyup",n),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",n)}},[]),e}var Gp=(e,t)=>{let n=Ms(),r=ot(),s=uu(),l=(0,Ze.useRef)(),u=(0,Ze.useRef)(null),h=(0,Ze.useRef)(),[f,g]=(0,Ze.useState)(!1),m=(0,Ze.useRef)(!1),S=(0,Ze.useRef)({north:0,south:0,east:0,west:0}),E=Hw(),P=(0,Ze.useCallback)(w=>_=>{if(m.current=!0,g(!0),s&&r){let{top:L,left:O}=s,z=r.viewerToWorld(_.pageX-O,_.pageY-L);h.current={x:z.x,y:z.y},l.current=w}},[s,r]),k=(0,Ze.useMemo)(()=>e.width/e.height,[e.width,e.height]),R=(0,Ze.useCallback)(w=>{if(!Math.abs(w.north-w.south+(w.east-w.west)))return;let L=-w.west+w.east,O=-w.north+w.south,z=e.width+L,D=e.height+O;if(z/D>=k){let q=D*k,M=z-q,[K,se]=Qp(w.east,w.west);w.west=w.west+M*se,w.east=w.east-M*K}else{let q=z/k,M=D-q,[K,se]=Qp(w.north,w.south);w.north=w.north+M*K,w.south=w.south-M*se}},[e.width,e.height,k]);Fi(()=>{h&&r&&r.updateNextFrame()}),(0,Ze.useEffect)(()=>{r&&r.updateNextFrame()},[r,f]);let A=(0,Ze.useCallback)(w=>{if(!r||!s||r.mode!=="sketch")return;let{top:_,left:L}=s,O=r.viewerToWorld(w.pageX-L,w.pageY-_),z=u.current,D=!e.maintainAspectRatio&&E.current.alt,b=!D&&E.current.shift&&l.current?.indexOf("-")!==-1;if((l.current==="translate"||l.current==="east"||l.current==="north-east"||l.current==="south-east")&&(S.current.east=O.x-(h.current?h.current.x:0),D&&(S.current.west=-S.current.east)),(l.current==="translate"||l.current==="west"||l.current==="north-west"||l.current==="south-west")&&(S.current.west=O.x-(h.current?h.current.x:0),D&&(S.current.east=-S.current.west)),(l.current==="translate"||l.current==="north"||l.current==="north-east"||l.current==="north-west")&&(S.current.north=O.y-(h.current?h.current.y:0),D&&(S.current.south=-S.current.north)),(l.current==="translate"||l.current==="south"||l.current==="south-west"||l.current==="south-east")&&(S.current.south=O.y-(h.current?h.current.y:0),D&&(S.current.north=-S.current.south)),(e.maintainAspectRatio||b)&&R(S.current),z){let q=S.current.west,M=S.current.north,K=e.width+S.current.east,se=e.height+S.current.south;z.points[1]=Math.min(q,K),z.points[2]=Math.min(M,se),z.points[3]=Math.max(q,K),z.points[4]=Math.max(M,se),r.updateNextFrame()}},[r,e.width,e.height,e.maintainAspectRatio,s]);kc("mousemove",A,[e.width,e.height,s]),kc("pointermove",A,[e.width,e.height,s]);let x=(0,Ze.useRef)();return(0,Ze.useEffect)(()=>{x.current=()=>{if(m.current){let w=S.current.west,_=S.current.north,L=e.width+S.current.east,O=e.height+S.current.south,z=Math.min(w,L),D=Math.min(_,O),b=Math.max(w,L),q=Math.max(_,O),M={x:(e.x||0)+z,y:(e.y||0)+D,width:b-z||1,height:q-D||1};e.maintainAspectRatio,t(M),l.current=void 0,h.current=void 0,S.current.east=0,S.current.west=0,S.current.north=0,S.current.south=0,m.current=!1,g(!1)}}},[t,e.height,e.width,e.x,e.y]),(0,Ze.useEffect)(()=>{let w=()=>{x.current&&x.current()};return window.addEventListener("pointerup",w),window.addEventListener("touchend",w),()=>{window.removeEventListener("pointerup",w),window.removeEventListener("touchend",w)}},[]),{portalRef:u,mode:n,mouseEvent:P,onPointerMoveCallback:A,isEditing:f}};var Ue=Y(Ie(),1);function Xp({handleSize:e,resizable:t,onSave:n,children:r,maintainAspectRatio:s,disableCardinalControls:l,...u}){let h=typeof e>"u"?s?10:8:e,{portalRef:f,mode:g,mouseEvent:m,isEditing:S}=Gp({x:u.x||0,y:u.y||0,width:u.width,height:u.height,maintainAspectRatio:s},n),E=(0,ar.useMemo)(()=>m("translate"),[m]),P=(0,ar.useMemo)(()=>m("east"),[m]),k=(0,ar.useMemo)(()=>m("west"),[m]),R=(0,ar.useMemo)(()=>m("south"),[m]),A=(0,ar.useMemo)(()=>m("north"),[m]),x=(0,ar.useMemo)(()=>m("south-east"),[m]),w=(0,ar.useMemo)(()=>m("south-west"),[m]),_=(0,ar.useMemo)(()=>m("north-east"),[m]),L=(0,ar.useMemo)(()=>m("north-west"),[m]),O=g==="sketch",z={zIndex:999,boxShadow:"0px 2px 3px 0 rgba(0,0,0,0.2)",border:"1px solid rgba(155,155,155,.7)",borderRadius:s||l?"50%":2,position:"absolute",background:"#fff",pointerEvents:S?"none":O?"initial":"none"};return(0,Ue.jsx)(Ue.Fragment,{children:(0,Ue.jsxs)("world-object",{...u,children:[r,O&&t?(0,Ue.jsx)(Pc,{ref:f,target:{x:0,y:0,height:u.height,width:u.width},relative:!0,interactive:!1,children:O&&t?(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)("div",{onMouseDown:E,onTouchStart:E,style:{display:"block",width:"100%",height:"100%",position:"relative",border:"1px solid rgba(155,155,155, .7)",boxSizing:"border-box",pointerEvents:S?"none":O?"initial":"none"}}),s?null:(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)("div",{title:"east",onTouchStart:P,onMouseDown:P,style:{...z,cursor:"e-resize",height:h*2,width:h,right:0,top:"50%",opacity:l?0:1,transform:`translate(${h/2}px, -${h}px)`}}),(0,Ue.jsx)("div",{title:"west",onMouseDown:k,style:{...z,cursor:"w-resize",position:"absolute",height:h*2,width:h,left:0,top:"50%",opacity:l?0:1,transform:`translate(-${h/2}px, -${h}px)`}}),(0,Ue.jsx)("div",{title:"north",onMouseDown:A,style:{...z,cursor:"n-resize",position:"absolute",height:h,width:h*2,left:"50%",top:0,opacity:l?0:1,transform:`translate(-${h}px, -${h/2}px)`}}),(0,Ue.jsx)("div",{title:"south",onMouseDown:R,style:{...z,cursor:"s-resize",position:"absolute",height:h,width:h*2,left:"50%",bottom:0,opacity:l?0:1,transform:`translate(-${h}px, ${h/2}px)`}})]}),(0,Ue.jsx)("div",{title:"north-east",onMouseDown:_,style:{...z,cursor:"ne-resize",position:"absolute",height:h,width:h,right:0,top:0,transform:`translate(${h/2}px, -${h/2}px)`}}),(0,Ue.jsx)("div",{title:"south-east",onMouseDown:x,style:{...z,cursor:"se-resize",position:"absolute",height:h,width:h,bottom:0,right:0,transform:`translate(${h/2}px, ${h/2}px)`}}),(0,Ue.jsx)("div",{title:"south-west",onMouseDown:w,style:{...z,cursor:"sw-resize",position:"absolute",height:h,width:h,bottom:0,left:0,transform:`translate(-${h/2}px, ${h/2}px)`}}),(0,Ue.jsx)("div",{title:"north-west",onMouseDown:L,style:{...z,cursor:"nw-resize",position:"absolute",height:h,width:h,top:0,left:0,transform:`translate(-${h/2}px, -${h/2}px)`}})]}):null}):null]})})}var Yp=Y(Ie(),1);function sP({interactive:e,region:t,onClick:n,onSave:r,maintainAspectRatio:s,disableCardinalControls:l,isEditing:u,rotation:h,style:f={backgroundColor:"rgba(0,0,0,.5)"}}){let g=(0,Uw.useCallback)(m=>{r({id:t.id,x:t.x,y:t.y,height:t.height,width:t.width,...m})},[r,t.id,t.x,t.y,t.height,t.width]);return(0,Yp.jsx)(Xp,{x:t.x,y:t.y,rotation:h,width:t.width,height:t.height,resizable:u,onSave:g,maintainAspectRatio:s,disableCardinalControls:l,children:(0,Yp.jsx)("box",{interactive:e,onClick:m=>{m.preventDefault(),m.stopPropagation(),n(t)},target:{x:0,y:0,width:t.width,height:t.height},style:f})})}var Tc=Y(le(),1),Zi=Y(Ie(),1),Zp=e=>{let t=e.width/(e.crop?.width||e.tiles.width),n=e.tiles.imageService.sizes||[],r=e.enableThumbnail,s=e.enableSizes,l=(0,Tc.useMemo)(()=>{let f=e.tiles.imageService.id||e.tiles.imageService["@id"];return f&&f.endsWith("/info.json")?f.slice(0,-1*10):f},[e.tiles.imageService.id]),u=(0,Tc.useMemo)(()=>{let f=e.tiles.imageService.tiles||[];if(!f.length){let g=e.width,m=[1],S=1;for(;Math.pow(2,S)<g;)S=S*2,m.push(S);return[]}return f},[e.tiles.imageService]),h=(0,Tc.useMemo)(()=>{let f=e.tiles.imageService;return(f?f["@context"]?Array.isArray(f["@context"])?f["@context"]:[f["@context"]]:[]:[]).indexOf("http://iiif.io/api/image/3/context.json")!==-1},[e.tiles.imageService.id]);return(0,Zi.jsx)("world-object",{rotation:e.rotation,scale:t,height:e.crop?.height||e.tiles.height,width:e.crop?.width||e.tiles.width,x:e.x,y:e.y,onClick:e.onClick,children:(0,Zi.jsxs)("composite-image",{id:e.tiles.imageService.id,width:e.crop?.width||e.tiles.width,height:e.crop?.height||e.tiles.height,crop:e.crop,renderOptions:e.renderOptions,children:[r&&e.tiles.thumbnail?(0,Zi.jsx)("world-image",{priority:!0,uri:e.tiles.thumbnail.id,target:{width:e.tiles.width,height:e.tiles.height},display:{width:e.tiles.thumbnail.width,height:e.tiles.thumbnail.height},crop:e.crop}):null,s&&n.map((f,g)=>(0,Zi.jsx)("world-image",{uri:`${l}/full/${f.width},${f.height}/0/default.jpg`,target:{width:e.tiles.width,height:e.tiles.height},display:{width:f.width,height:f.height},crop:e.crop},g)),u.map(f=>(f.scaleFactors||[]).map(g=>(0,Zi.jsx)("tiled-image",{uri:e.tiles.imageService.id,display:{width:e.tiles.width,height:e.tiles.height},tile:f,scaleFactor:g,crop:e.crop,version3:h},`${e.tiles.imageService.id}-tile-${g}`)))]},e.tiles.imageService.id)},e.tiles.imageService.id)};var Fc=Y(le(),1);function Kp(e){return e.id||e["@id"]}var lP=Object.defineProperty,aP=(e,t,n)=>t in e?lP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rc=(e,t,n)=>(aP(e,typeof t!="symbol"?t+"":t,n),n);function Ki(e){return e.endsWith("info.json")?e:e.endsWith("/")?`${e}info.json`:`${e}/info.json`}var uP="http://library.stanford.edu/iiif/image-api/compliance.html#level0",Xw="http://library.stanford.edu/iiif/image-api/compliance.html#level1",Yw="http://library.stanford.edu/iiif/image-api/compliance.html#level2",cP="http://library.stanford.edu/iiif/image-api/conformance.html#level0",Zw="http://library.stanford.edu/iiif/image-api/conformance.html#level1",Kw="http://library.stanford.edu/iiif/image-api/conformance.html#level2",dP="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",$w="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",qw="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",hP="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",Jw="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",eS="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",fP="http://iiif.io/api/image/1/level0.json",pP="http://iiif.io/api/image/1/profiles/level0.json",tS="http://iiif.io/api/image/1/level1.json",nS="http://iiif.io/api/image/1/profiles/level1.json",rS="http://iiif.io/api/image/1/level2.json",iS="http://iiif.io/api/image/1/profiles/level2.json",mP="http://iiif.io/api/image/2/level0.json",gP="http://iiif.io/api/image/2/profiles/level0.json",oS="http://iiif.io/api/image/2/level1.json",sS="http://iiif.io/api/image/2/profiles/level1.json",lS="http://iiif.io/api/image/2/level2.json",aS="http://iiif.io/api/image/2/profiles/level2.json",vP="level0",uS="level1",cS="level2",yP="http://iiif.io/api/image/2/level0",dS="http://iiif.io/api/image/2/level1",hS="http://iiif.io/api/image/2/level2",fS=[hS,Yw,Kw,qw,eS,rS,iS,lS,aS,cS],pS=[...fS,dS,Xw,Zw,$w,Jw,tS,nS,oS,sS,uS],wP=[yP,dS,hS,uP,Xw,Yw,cP,Zw,Kw,dP,$w,qw,hP,Jw,eS,fP,pP,tS,nS,rS,iS,mP,gP,oS,sS,lS,aS,vP,uS,cS];var SP={extraFormats:["jpg"],extraQualities:["default"],extraFeatures:["sizeByWhListed"]},xP={extraFormats:["jpg"],extraQualities:["default"],extraFeatures:["baseUriRedirect","cors","jsonldMediaType","regionByPx","regionSquare","sizeByWhListed","sizeByH","sizeByW","sizeByWh"]},EP={extraFormats:["jpg","png"],extraQualities:["default"],extraFeatures:["baseUriRedirect","cors","jsonldMediaType","regionByPct","regionByPx","regionSquare","rotationBy90s","sizeByWhListed","sizeByConfinedWh","sizeByH","sizeByPct","sizeByW","sizeByWh"]};function _P(e){return fS.indexOf(e)!==-1?EP:pS.indexOf(e)!==-1?xP:SP}function PP(e){let t=e?Array.isArray(e.profile)?e.profile:[e.profile]:[],n={extraQualities:[],extraFormats:[],extraFeatures:[]};for(let r of t)if(typeof r=="string"&&(r=_P(r)),!!r){if(r.formats)for(let s of r.formats)n.extraFormats.indexOf(s)===-1&&n.extraFormats.push(s);if(r.qualities)for(let s of r.qualities)n.extraQualities.indexOf(s)===-1&&n.extraQualities.push(s);if(r.supports)for(let s of r.supports)n.extraFeatures.indexOf(s)===-1&&n.extraFeatures.push(s);if(r.maxHeight&&(n.maxHeight=r.maxHeight),r.maxWidth&&(n.maxWidth=r.maxWidth),r.maxArea&&(n.maxArea=r.maxArea),r.extraFormats)for(let s of r.extraFormats)n.extraFormats.indexOf(s)===-1&&n.extraFormats.push(s);if(r.extraQualities)for(let s of r.extraQualities)n.extraQualities.indexOf(s)===-1&&n.extraQualities.push(s);if(r.extraFeatures)for(let s of r.extraFeatures)n.extraFeatures.indexOf(s)===-1&&n.extraFeatures.push(s);r.maxHeight&&(n.maxHeight=r.maxHeight),r.maxWidth&&(n.maxWidth=r.maxWidth),r.maxArea&&(n.maxArea=r.maxArea)}if(e.extraFormats)for(let r of e.extraFormats)n.extraFormats.indexOf(r)===-1&&n.extraFormats.push(r);if(e.extraFeatures)for(let r of e.extraFeatures)n.extraFeatures.indexOf(r)===-1&&n.extraFeatures.push(r);if(e.extraQualities)for(let r of e.extraQualities)n.extraQualities.indexOf(r)===-1&&n.extraQualities.push(r);return n}function kP(e){try{if(e==="full")return{full:!0};if(e==="square")return{square:!0};let t=e.startsWith("pct:"),n=e.substr(t?4:0).split(",").map(r=>parseFloat(r));return{x:n[0],y:n[1],w:n[2],h:n[3],percent:t}}catch{throw new Error("Expected 'full', 'square' or 'x,y,w,h'. Found "+e)}}function CP(e){let t={upscaled:!1,max:!1,confined:!1};if(e[0]==="^"&&(t.upscaled=!0,e=e.slice(1)),e==="max"||e==="full")return t.max=!0,t.serialiseAsFull=e==="full",t;if(e[0]==="!"&&(t.confined=!0,e=e.slice(1)),e[0]==="p")return t.percentScale=parseFloat(e.slice(4)),t;let n=e.split(",").map(r=>r.trim());return n.length&&typeof n[0]<"u"&&(n[0]!==""&&(t.width=parseInt(n[0],10)),typeof n[1]<"u"&&n[1]!==""?(t.height=parseInt(n[1],10),t.version=2):t.version=3),t}function TP(e){let t={angle:0};if(e[0]==="!"&&(t.mirror=!0,e=e.substr(1)),t.angle=parseFloat(e)%360,Number.isNaN(t.angle))throw new Error(`Invalid rotation ${e}`);return t}function RP(e,t=""){let n=e.match(/^(([a-zA-Z]+):\/\/([^/]+))?((.*)+)/);if(!n)throw new Error(`Invalid or unknown input ${e}`);let r=n[2],s=n[3],l=n[4];if(l[0]==="/"&&(l=l.substring(1)),t.length>0){if(t[0]==="/"&&(t=t.substring(1)),t!==l.substring(0,t.length))throw new Error(`Path does not start with prefix (path: ${l}, prefix: ${t})`);l=l.substring(t.length)}return{scheme:r,server:s,path:l,prefix:t}}function zP(e,t=""){let{path:n,scheme:r,server:s,prefix:l}=RP(e,t),u=(n||"").split("/").reverse(),[h,f,g,m,...S]=u,E=S.reverse().filter(Boolean).join("/");if(u.length===1||h==="")return{type:"base",scheme:r,server:s,prefix:l,identifier:E};if(h==="info.json"){let[,...k]=u;return{type:"info",scheme:r,server:s,prefix:l,identifier:k.reverse().filter(Boolean).join("/")}}let P=(h||"").split(".");if(typeof P[1]>"u"||typeof P[0]>"u"||typeof m>"u"||typeof g>"u"||typeof f>"u")throw new Error("Invalid image request");return{type:"image",scheme:r,server:s,prefix:l,identifier:E,originalPath:n,region:kP(m),size:CP(g),rotation:TP(f),quality:P[0],format:P[1]}}function IP(e){let t=zP(Ki(e.id));if(t.type!=="info")throw new Error("Invalid service URL");let n=PP(e);return{identifier:t.identifier,originalPath:"",server:t.server,prefix:t.prefix,scheme:t.scheme,type:"image",quality:n.extraQualities.indexOf("default")===-1?n.extraQualities[0]:"default",region:{full:!0},size:{max:!0,upscaled:!1,confined:!1},format:"jpg",rotation:{angle:0}}}function LP(e,t,n){let r=n.length,s=[];for(let l=0;l<r;l++){let u=n[l];if(u){let h=u.width;s.push(e/h)}}return s}function NP(e,t,n){let r=n.length,s=[];for(let l=0;l<r;l++){let u=n[l];u&&s.push({width:Math.floor(e/u),height:Math.floor(t/u)})}return s}function We(e){if(e["@id"])return e["@id"];if(e.id)return e.id}function Ic(e){if(!e||!e.profile||!We(e))return!1;let t=Array.isArray(e.profile)?e.profile:[e.profile];for(let n of t)if(typeof n=="string"&&wP.indexOf(n)!==-1)return!0;return!1}function OP(e){if(!Ic(e))return!1;let t=Array.isArray(e.profile)?e.profile:[e.profile];for(let n of t)if(typeof n=="string"){if(pS.indexOf(n)!==-1)return!0}else{let r=[...n.supports||[],...n.extraFeatures||[]];if(r.indexOf("regionByPx")!==-1&&(r.indexOf("sizeByW")!==-1||r.indexOf("sizeByWh")!==-1))return!0}return!1}function zc(e,t){if(t&&t.profile){let n=t.profile;if(n){let r=Array.isArray(n)?n:[n];return r.includes(`level${e}`)||r.includes(`http://iiif.io/api/image/2/level${e}.json`)||r.includes(`http://iiif.io/api/image/1/level${e}.json`)||r.includes(`http://iiif.io/api/image/1/profiles/level${e}.json`)}}return!1}function qp(e){return Ic(e)?zc(0,e)?0:zc(1,e)?1:zc(2,e)?2:null:null}function mS(e){return(e["@context"]?Array.isArray(e["@context"])?e["@context"]:[e["@context"]]:[]).indexOf("http://iiif.io/api/image/3/context.json")!==-1}function FP(e){if(!OP(e))return[];let t=[],n=Array.isArray(e.profile)?e.profile:[e.profile],r=n.length;for(let s=0;s<r;s++){let l=n[s];if(l&&typeof l!="string"&&(l.maxHeight||l.maxWidth))return[{id:We(e),type:"variable",minWidth:0,minHeight:0,maxHeight:l.maxHeight||l.maxWidth,maxWidth:l.maxWidth||l.maxHeight,level:qp(e),version:e["@context"]==="http://iiif.io/api/image/3/context.json"?3:2}]}if(e.tiles){let s=e.tiles.length;for(let l=0;l<s;l++){let u=e.tiles[l];u&&(u.height||u.width)&&t.push({id:We(e),type:"variable",minHeight:0,minWidth:0,maxHeight:u.height||u.width,maxWidth:u.width,level:qp(e),version:mS(e)?3:2})}}return t}function Vw(e){let t=/^.*\/(full)\/(((\d+),(\d+)?)|max)\/(\d+)\/default\.(jpg|png|jpeg)$/,n=e.match(t);if(n&&n[4]&&n[5]){let r=n[1],s=parseInt(n[4],10),l=parseInt(n[5],10),u=n[7];if((r==="max"||r==="full")&&s&&l&&u)return{type:"fixed",id:e,height:l,width:s}}return{type:"unknown",id:e}}function MP(e){if(e["@type"])return e["@type"];if(e.type)return e.type}function Lc(e){if(typeof e=="string")return Vw(e);let t=MP(e);if(t!=="Image"&&t!=="sc:Image")return null;let n=e,r=We(n);return r?r&&n.width&&n.height?{id:r,type:"fixed",width:n.width,height:n.height,unsafe:!0}:Vw(r):null}function AP(e){return Ic(e)?(e&&e.sizes?e.sizes:[]).map(t=>({id:We(e),type:"fixed-service",height:t.height,width:t.width,level:qp(e),version:mS(e)?3:2})):[]}function Qw(e){let t=[],n=e.length;for(let r=0;r<n;r++){let s=e[r];if(!s)continue;let l=AP(s);l.length&&t.push(...l);let u=FP(s);u.length&&t.push(...u)}return t}function gS(e){let t=e.service?Array.isArray(e.service)?e.service:[e.service]:[],n=t.length,r=[];for(let s=0;s<n;s++)Ic(t[s])&&r.push(t[s]);return r}function DP(e,t=!0,n){let r=[],s=Lc(e);if(s===null)return r;let l=e;if(r.push(s),t&&l&&l.width&&l.height){let u=[],h=gS(l);for(let f of h){let g={id:We(f),width:l.width,height:l.height};if(n.canLoadSync(g)){let m=n.loadServiceSync(g);m&&(m.height||(m.height=l.height),m.width||(m.width=l.width),u.push(...Qw([m])))}}if(u.length)return r.push(...u),r}return l.service&&r.push(...Qw(l.service)),r}function WP({x:e=0,y:t=0,w:n,h:r,full:s,square:l,percent:u}){if(s)return"full";if(l)return"square";if(typeof n>"u"||typeof r>"u")throw new Error("RegionParameter: invalid region");let h=`${e},${t},${n},${r}`;return u?`pct:${h}`:h}function BP({max:e,percentScale:t,upscaled:n,confined:r,width:s,height:l,serialiseAsFull:u,version:h}){let f=[];return n&&f.push("^"),e?(f.push(u?"full":"max"),f.join("")):(r&&f.push("!"),t&&f.push(`pct:${t}`),s&&f.push(`${s}`),f.push(","),l&&h===3&&f.push(`${l}`),f.join(""))}function jP(e){return`${e.mirror?"!":""}${(e.angle||0)%360}`}function bP(e,t){let n=e.prefix.startsWith("/")?e.prefix.substr(1):e.prefix,r=`${e.scheme}://${e.server}/${n?`${n}/`:""}${e.identifier}`;if(e.type==="base")return r;if(e.type==="info")return`${r}/info.json`;let{size:s}=e,{region:l,rotation:u,format:h,quality:f}=e;if(t){let g=t["@context"]?Array.isArray(t["@context"])?t["@context"]:[t["@context"]]:[],m=g.indexOf("http://iiif.io/api/image/2/context.json")!==-1,S=g.indexOf("http://iiif.io/api/image/3/context.json")!==-1;if((s.width===t.width&&!s.height||s.height===t.height&&!s.width||s.width===t.width&&s.height===t.height)&&(s={...s,max:!0}),m&&(s.max&&!s.serialiseAsFull&&(s={...s,serialiseAsFull:!0}),!s.max&&s.width&&s.height&&(s={...s,height:void 0}),s={...s,version:2}),S){if(s.max&&s.serialiseAsFull&&(s={...s,serialiseAsFull:!1}),s.width&&!s.height&&t.width&&t.height){let E=t.height/t.width;s={...s,height:Math.ceil(s.width*E)}}s={...s,version:3}}}return[r,WP(l),BP(s),jP(u),`${f}.${h}`].filter(Boolean).join("/")}function $p(e,t,n){let r=IP({"@context":e.version===3?"http://iiif.io/api/image/3/context.json":"http://iiif.io/api/image/2/context.json",id:Ki(We(e)),profile:e.level===null||typeof e.level>"u"?"level0":`level${e.level}`,type:e.version===3?"ImageService3":"ImageService2"});if(r.type!=="image")throw new Error("Invalid service");return r.size.max=!1,r.size.width=t,r.size.height=n,{id:bP(r),type:"fixed",width:t,height:n||e.height/(e.width||1)*t,unsafe:e.width>t}}function Jo(e){let t=e.replace(/(https?:\/\/)?(www.)?/i,"");return t.indexOf("/")!==-1?t.split("/")[0]:t}function HP(e,t,n){let r=e.width?e.width:e.maxWidth;return n.height<=e.maxHeight&&n.width<=e.maxWidth&&n.height>=e.minHeight&&n.width>=e.minWidth&&(!t||Math.abs(n.width-r)<Math.abs(t.width-r))}function UP(e,t){let n=[],r=Object.assign({unsafeImageService:!1,atAnyCost:!0,fallback:!0,minHeight:64,minWidth:64,maxHeight:1/0,maxWidth:1/0,returnAllOptions:!1,preferFixedSize:!1,allowUnsafe:!1,explain:!1,height:0,width:0},e),s=(m,S=0)=>r.explain?n.push(new Array(S).fill(0).map(E=>" ").join("")+m().trim()):void 0,l=[],u=[],h=null;s(()=>`Using configuration: ${JSON.stringify(r,null,2)}`);let f=(m,S)=>{if(s(()=>"Swapping choice",3),HP(r,S,m)){if(r.preferFixedSize&&m.unsafe){s(()=>`We found an image that was marked as unsafe, but it was the best size. (${m.id})`,4),u.push(m);return}r.returnAllOptions&&S&&u.push(S),s(()=>`We found a new image that was the best size. (${m.id})`,4),h=m}else r.returnAllOptions&&u.push(m)};s(()=>`The input shows we have ${t.length} list(s) of candidates to choose from.`);let g=t.length;for(let m=0;m<g;m++){let S=t[m]();s(()=>`Candidate group ${m}: ${JSON.stringify(S,null,2)}`,1);let E=S.length;s(()=>`Checking candidate list number ${m} and found ${E} potential ways of creating image(s)`,1);for(let P=0;P<E;P++){let k=S[P];if(s(()=>`-> Checking candidate ${P}`,1),k.type==="unknown"&&r.atAnyCost&&(s(()=>`We've found an unknown image type, adding this to the "last resort" list`,2),l.push(k)),k.type==="fixed"&&(k.unsafe?(s(()=>`We've found an unsafe fixed image type, adding this to the "last resort" list`,2),l.push(k)):(s(()=>"We've found a fixed size image, checking if it matches the request",2),f(k,h))),k.type==="fixed-service")if(r.unsafeImageService){s(()=>"Checking for an image from the tile source, without calculating the right height and width (unsafeImageService)",2);let R=$p(k,r.width,r.height);f(R,h)}else{s(()=>"Checking for an image from the tile source 3",2);let R=$p(k,k.width,k.height);f(R,h)}if(k.type==="variable"&&k.maxWidth){let R=$p({id:k.id,type:"fixed-service",width:k.maxWidth,height:k.maxWidth,level:k.level,version:k.version},k.maxWidth);f(R,h)}}if(h&&!r.returnAllOptions){if(h.unsafe||r.allowUnsafe)continue;s(()=>`We found a match in choice list number ${m}, no searching any more`);break}}return r.atAnyCost&&u.length===0?(s(()=>h?`We found an image! ${h.id} of type ${h.type}`:'We found no images, but "atAnyCost" is set, so returning that'),{best:h||l[0]||null,fallback:l.slice(1),log:n}):r.returnAllOptions?(s(()=>"Returning all options that we have found"),{best:(r.atAnyCost?h||u[0]||l[0]:h||u[0])||null,fallback:[...u,...l],log:n}):(s(()=>"Returning the best image that we found, and a fallback"),{best:h||u[0]||null,fallback:h?u:u.slice(1),log:n})}function VP(e,t,n){let r=e>t?e:t,s=n.length,l=[];for(let u=0;u<s;u++){let h=n[u];if(!h||h.scaleFactors.length===0)continue;let f=h.scaleFactors[0];if(!f)continue;let g=r/f,m=[f];for(;g>=h.width;)f=f*2,m.push(f),g=g/2;l.push({...h,scaleFactors:m})}return l}function QP(e,t){if(e.length!==t.length)return!1;if(e.length===0&&t.length===0)return!0;let n=e.length,r=!0;for(let l=0;l<n;l++){let u=e[l],h=t[l];if(u.width!==h.width||u.height!==h.height){r=!1;break}}if(r)return!0;let s=0;for(let l=0;l<n;l++)for(let u=0;u<n;u++)if(e[l].width===t[u].width&&e[l].height===t[u].height){s++;break}return s===n}function Gw(e){return zc(0,e)}var Ml=class{constructor(e={}){Rc(this,"config",{verificationsRequired:1,approximateServices:!1,enableFetching:!0,disableThrottling:!1}),Rc(this,"fetchingCount",0),Rc(this,"imageServices",{}),Rc(this,"knownImageServers",{}),this.config=Object.assign(this.config,e)}setConfig(e){Object.assign(this.config,e)}sample(e,t,n=!0){let r=Jo(We(e)),s=Ki(We(e)),l=this.knownImageServers[r];return this.imageServices[s]=Object.assign(e,{real:!0}),!l&&e.tiles&&!Gw(e)?(this.knownImageServers[r]={verifications:0,malformed:!1,root:r,preLoaded:n,sampledId:We(e),verified:!1,server:null,result:{context:e["@context"]||[],sampledProfile:e.profile,resourceServiceRatio:t&&e.height?t.height/e.height:1,sampledSizes:e.sizes||[],sizeRatios:LP(e.width,e.height,e.sizes||[]),sampledTiles:e.tiles||[]}},!0):this.verify(e)}preLoad(e,t=!0){this.knownImageServers[e.root]=e,t&&(this.knownImageServers[e.root].malformed=!1,this.knownImageServers[e.root].verifications=this.config.verificationsRequired)}predict(e,t=!1,n=!1){let r=e?.source,s=Jo(We(e)),l=this.knownImageServers[s],u=Ki(We(e));return this.imageServices[u]?this.imageServices[u]||null:!this.config.approximateServices||!l||!l.result||!(r?.height||e.height)||!(r?.width||e.width)||!n&&(l.malformed||l.verifications<this.config.verificationsRequired)||Gw(e.source)?null:(this.imageServices[u]||(this.imageServices[u]={"@context":l.result.context,"@id":We(e),id:We(e),protocol:"http://iiif.io/api/image",tiles:r?.tiles||VP(e.width,e.height,l.result.sampledTiles),sizes:r?.sizes||NP(Math.round(e.width/l.result.resourceServiceRatio),Math.round(e.height/l.result.resourceServiceRatio),l.result.sizeRatios),profile:r?.profile||l.result.sampledProfile,height:r?.height||e.height,width:r?.width||e.width,real:!1}),this.imageServices[u]||null)}async getThumbnailFromResource(e,t,n=!0,r=[]){let s=e?await this.getImageCandidates(e,n):[];return UP(t,[()=>r,()=>s])}async getImageCandidates(e,t=!0){let n=e;if(t&&n&&n.height&&n.width){let r=gS(n);for(let s of r){let l={id:We(s),width:s.width?s.width:n.width,height:s.height?s.height:n.height,source:s};await this.loadService(l)}}return DP(e,t,this)}async verify(e){let t=this.predict(e,!1,!0),n=await this.fetchService(We(e));if(!t)return!1;let r=t.height===n.height&&t.width===n.width&&t["@context"]===n["@context"]&&QP(t.sizes||[],n.sizes||[]);if(r){let s=Jo(We(e)),l=this.knownImageServers[s];l&&(l.verifications+=1,l.verifications>=this.config.verificationsRequired&&(l.verified=!0))}return r}canLoadSync(e){let t=typeof e=="string"?e:We(e),n=Ki(t);if(this.imageServices[n])return!0;let r=this.knownImageServers[Jo(t)];return!!(r&&!r.malformed&&r.verifications>=this.config.verificationsRequired)}async markAsMalformed(e){return this.knownImageServers[Jo(We(e))].malformed=!0,this.loadService(e,!0)}async fetchService(e,t=!1){let n=Ki(e),r=this.imageServices[n];if(r&&(!t||r.real))return r;if(!this.config.enableFetching)throw new Error("Fetching is not enabled");let s=await this.fetch(n).then(l=>l.json());return!s.id&&s["@id"]&&(s.id=s["@id"]),s.id!==e&&(s.id=e,s["@id"]&&(s["@id"]=e)),this.imageServices[n]=Object.assign(s,{real:!0}),this.imageServices[n]}async fetch(e,t){return fetch(e,t)}async loadService(e,t=!1){if(!this.config.disableThrottling){let s=!0;for(;s;)if(this.fetchingCount>=this.config.verificationsRequired)await new Promise(l=>setTimeout(l,500));else{s=!1;break}}let n=this.knownImageServers[Jo(We(e))];if(n&&!n.malformed&&!t){await n.result;let s=this.loadServiceSync(e);if(s)return s}this.fetchingCount++;let r=await this.fetchService(We(e),t);return this.fetchingCount--,r.real&&this.sample(r,e),r}loadServiceSync(e){let t=Ki(We(e));return this.imageServices[t]?this.imageServices[t]:this.config.approximateServices?this.predict(e):null}},AI=new Ml;var Nc={},Jp={get(e){return e},setMetaValue([e,t,n],r){let s=Jp.getResourceMeta(e,t),l=s?s[n]:void 0,u=typeof r=="function"?r(l):r;Nc[e]={...Nc[e]||{},[t]:{...(Nc[e]||{})[t]||{},[n]:u}}},getResourceMeta:(e,t)=>{let n=Nc[e];if(n)return t?n[t]:n}};var vS=new Ml;function em(e=Jp,t={}){let n=t.imageServiceLoader||vS;async function r(s,l,u=!1,h=[],f){let g=()=>n.getThumbnailFromResource(void 0,l,u,h);if(!s)return await n.getThumbnailFromResource(void 0,l,u,h);if(typeof s=="string"){let E=Lc(s);return E&&h.push(E),await n.getThumbnailFromResource(void 0,l,u,h)}let m=e.get(s,{skipSelfReturn:!1});if(typeof m=="string")return{best:Lc(m),fallback:[],log:[]};if(!m)return await g();switch(await(async E=>{if(E&&E.thumbnail&&E.thumbnail.length){let P=e.get(E.thumbnail[0]),k=await n.getImageCandidates(P,u);k&&k.length&&h.push(...k)}})(m),m.type){case"Annotation":{let E=Array.isArray(m.body)?m.body:[m.body],P=e.get(E[0]);return f&&!P.width&&(P.width=f.width,P.height=f.height),await n.getThumbnailFromResource(P,l,u,h)}case"Canvas":{let E=m;return r(E.items[0],l,u,h,{width:E.width,height:E.height})}case"AnnotationPage":return r(m.items[0],l,u,h,f);case"Choice":{let E=m;return!E.items||E.items[0]?await g():r(E.items[0],l,u,h,f)}case"Collection":{let P=m.items[0];return P?r(P,l,u,h,f):await g()}case"Manifest":{let P=m.items[0];return P?r(P,l,u,h,f):await g()}case"SpecificResource":case"Image":case"Dataset":case"Sound":case"Text":case"TextualBody":case"Video":return f&&!m.width&&(m.width=f.width,m.height=f.height),n.getThumbnailFromResource(m,l,u,h)}return await g()}return{getBestThumbnailAtSize:r}}function GP(){return typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function XP(){let e=GP();if(typeof e.IIIF_VAULT<"u")return e.IIIF_VAULT;if(typeof e.IIIFVault>"u")throw new Error("Vault not found");return e.IIIF_VAULT=new e.IIIFVault.Vault,e.IIIF_VAULT}var $i={};function Al(){return $i.helper||($i.vault=XP(),$i.loader=new Ml,$i.helper=em($i.vault,{imageServiceLoader:$i.loader})),$i}async function Oc(e,t,n){let{loader:r}=Al(),s=await r.loadService({id:e,width:t,height:n});return{id:Kp(s),width:t,height:n,imageService:s,thumbnail:void 0}}async function yS(e,t=512){let{vault:n,loader:r,helper:s}=Al(),l=[];for(let u of e.items)for(let h of n.get(u).items){let g=n.get(n.get(h).body[0]).service[0],m=await Oc(g.id,e.width,e.height),{best:S}=await s.getBestThumbnailAtSize(n,r,e,{maxHeight:t,maxWidth:t},!0);S&&(m.thumbnail=S),l.push(m)}return l}async function wS(e){let{vault:t}=Al(),n=[];for(let r of e.items){let s=t.get(r);n.push(...await yS(s))}return n}async function YP(e){try{let{vault:t}=Al(),n=await t.loadManifest(e);return n?wS(n):[]}catch(t){return console.log("ERR",t),[]}}var tm=Y(Ie(),1),ZP=e=>{let[t,n]=(0,Fc.useState)();return(0,Fc.useEffect)(()=>{Oc(e.id,e.width,e.height).then(r=>{n(r)})},[e.height,e.id,e.width]),(0,tm.jsx)("world-object",{x:e.x||0,y:e.y||0,width:e.width,height:e.height,scale:e.scale,children:t?(0,tm.jsx)(Zp,{tiles:t,x:e.x,y:e.y,width:e.crop?.width||e.width,height:e.crop?.height||e.height,rotation:e.rotation,crop:e.crop,enableSizes:e.enableSizes,enableThumbnail:e.enableThumbnail,renderOptions:e.renderOptions,children:e.children}):null})};var SS=Y(le(),1),KP=(e,t=[])=>{let n=ot();(0,SS.useEffect)(()=>n?n.registerHook("useAfterPaint",e):()=>{},t)};var Ke=Y(le(),1);var Mc=Y(Ie(),1),$P=(e,{onCreated:t,resetWorldOnChange:n=!0,mode:r="explore",cover:s,containerRef:l,...u})=>{let[h,f]=(0,Ke.useState)(!1),[g,m]=(0,Ke.useState)(void 0),[S,E]=(0,Ke.useState)(void 0),P=(0,Ke.useRef)(),k=(0,Ke.useRef)(),R=(0,Ke.useMemo)(()=>({width:u.width,height:u.height}),[u.width,u.height]),[A,x,w,_]=lu(void 0,{width:u.width,height:u.height});Yt(()=>{let O=document.createElement("canvas");O.height=R.height,O.width=R.width,P.current=O},[]),Yt(()=>{let O=P.current;O&&(O.height=R.height,O.width=R.width)},[R.width,R.height]),(0,Ke.useEffect)(()=>x?x.runtime.registerHook("useAfterFrame",()=>{if(P.current)try{m(P.current.toDataURL())}catch(z){z instanceof Error&&E(z.message)}}):()=>{},[]),(0,Ke.useEffect)(()=>x?x.runtime.world.addLayoutSubscriber(z=>{z==="ready"&&f(!0)}):()=>{},[]),(0,Ke.useEffect)(()=>{x&&x.em&&x.em.updateBounds()},[R]),(0,Ke.useEffect)(()=>{x&&(x.runtime.mode=r)},[r]),(0,Ke.useEffect)(()=>{if(x){let O=x.runtime;O.resize(w.current.width,u.width,w.current.height,u.height),s?O.cover():O.goHome(),w.current.width=u.width,w.current.height=u.height,O.updateNextFrame()}},[u.width,u.height]),Yt(()=>{let O=k.current;O&&(O.style.width=`${R.width}px`,O.style.height=`${R.height}px`,O.style.pointerEvents="none",O.style.overflow="hidden")},[R.height,R.width]),Yt(()=>{let O=()=>{if(x&&x.runtime){let z=x.runtime;z.resize(w.current.width,u.width,w.current.height,u.height),w.current.width=u.width,w.current.height=u.height,z.updateNextFrame()}};return window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[x,u.height,u.width]);let L=(0,Ke.useCallback)(function(z){let D=()=>{x&&(x.ready=!0)};return(0,Ke.useEffect)(()=>{if(x){let b=t&&t(x);return void(b&&b.then?b.then(D):D())}return()=>{}},[]),z.children},[x]);return(0,Ke.useEffect)(()=>{if(x&&x.runtime){let O=x.runtime;if(n)return O.world.addLayoutSubscriber(z=>{z==="recalculate-world-size"&&O.goHome({cover:s})})}return()=>{}},[x,s,n]),Yt(()=>{x&&So.render((0,Mc.jsx)(L,{children:(0,Mc.jsx)($n.Provider,{value:r,children:(0,Mc.jsx)(qn.Provider,{value:x,children:e})})}),x.runtime)},[x,r,e]),{loading:!g&&h,uri:g,imageError:S}};var xS=Y(le(),1),qP=(e,t=[])=>{let n=ot();(0,xS.useEffect)(()=>n?n.registerHook("useBeforeFrame",e):()=>{},t)};var zr=Y(le(),1);var JP=(e=[])=>{let[t,n]=(0,zr.useState)(e),[r,s]=(0,zr.useState)(!1),[l,u]=(0,zr.useState)(),h=(0,zr.useCallback)(()=>{s(!0),u(void 0)},[]),f=(0,zr.useCallback)(E=>{s(!0),u(E)},[]),g=E=>{n(P=>P.map(k=>k.id===E.id?E:k))},m=(0,zr.useCallback)(E=>{let P=Yn();n(k=>[...k,{id:P,...E}]),s(!1),u(void 0)},[]),S=(0,zr.useCallback)(()=>{s(!1),u(void 0)},[]);return{isEditing:r,onDeselect:S,selectedAnnotation:l,onCreateNewAnnotation:m,annotations:t,onUpdateAnnotation:g,setIsEditing:s,setSelectedAnnotation:u,editAnnotation:f,addNewAnnotation:h}};function ek(e){return e.current==="sketch"}function tk(e,t){return e?t?{...e,...t||{},":hover":e[":hover"]?Object.assign(e[":hover"]||{},t[":hover"]||{}):t[":hover"],":active":e[":active"]?Object.assign(e[":active"]||{},t[":active"]||{}):t[":hover"]}:e:t}return uE(nk);})();
|
|
79
|
+
`}),r.htmlChildren]})};var tr=Y(le(),1);var ky=Y(le(),1);var Gs=()=>(0,ky.useContext)(qn);var st=()=>{let e=Gs();return e?e.runtime:void 0};var Cy=Y(le(),1),Mh=(e,t=[])=>{let n=st();(0,Cy.useEffect)(()=>n?n.registerHook("useAfterFrame",e):()=>{},t)};var Ty=Y(le(),1),Fi=(e,t=[])=>{let n=st();(0,Ty.useEffect)(()=>n?n.registerHook("useFrame",e):()=>{},t)};var Ah=()=>{let e=Gs();return e&&e.canvas?e.canvas:void 0};var Ry=Y(le(),1);function uu(){return(0,Ry.useContext)(Gr)}var o2=({onCreate:e})=>{let t=(0,tr.useRef)({x:0,y:0}),n=Ah(),r=uu(),s=st(),[l,u]=(0,tr.useState)(),[h,f]=(0,tr.useState)(),g=Ms();return Fi(()=>{s&&l&&!h&&(s.pendingUpdate=!0)},[l,h]),Mh(()=>{if(l&&n&&s){let m=n.getContext("2d");if(m){let{x:S,y:E,width:P,height:k}=s.worldToViewer(l.x,l.y,(h?h.x:t.current.x)-l.x,(h?h.y:t.current.y)-l.y);m.lineWidth=h?3:1,m.strokeStyle="#fff",m.strokeRect(S,E,P,k),m.lineWidth=h?3:1,m.strokeStyle="#000",m.strokeRect(S+1,E+1,P-2,k-2)}}},[l,h]),(0,tr.useEffect)(()=>{let m=S=>{if(r&&s){let{x:E,y:P}=s.viewerToWorld(S.clientX-r.left,S.clientY-r.top);t.current.x=~~E,t.current.y=~~P}};return n?(n.addEventListener("mousemove",m),()=>n.removeEventListener("mousemove",m)):()=>{}},[r,n,s]),(0,tr.useEffect)(()=>{let m=S=>{g==="sketch"&&(u({x:Math.round(t.current.x),y:Math.round(t.current.y)}),f(void 0))};return n?(n.addEventListener("mousedown",m),()=>n.removeEventListener("mousedown",m)):()=>{}},[n,g]),(0,tr.useEffect)(()=>{let m=S=>{l&&!h&&f({x:Math.round(t.current.x),y:Math.round(t.current.y)})};return n?(n.addEventListener("mouseup",m),()=>n.removeEventListener("mouseup",m)):()=>{}},[n,l,h]),(0,tr.useEffect)(()=>{l&&h&&e({x:Math.min(l.x,h.x),y:Math.min(l.y,h.y),width:Math.abs(h.x-l.x),height:Math.abs(h.y-l.y)})},[l,e,h]),null};var lr=Y(le(),1);var Bw=Y(le(),1);async function jw(e,t,n){if(Bw.version.startsWith("18.")){let r=await Promise.resolve().then(()=>Y(Ww(),1)),s=r.default?r.default.createRoot:r.createRoot;n.current||(n.current=s(e)),n.current.render(t)}else if(typeof ReactDOM<"u"){let{render:r,unmountComponentAtNode:s}=ReactDOM;r(t,e),n.current={unmount(){s(e)}}}else{let r=await Promise.resolve().then(()=>Y(Hp(),1)),s=r.default?r.default.render:r.render,l=r.default?r.default.unmountComponentAtNode:r.unmountComponentAtNode;s(t,e),n.current={unmount(){l(e)}}}}var Vp=Y(Ie(),1),Pc=lr.default.forwardRef(({children:e,...t},n)=>{let r=(0,lr.useRef)(),s=st(),l=(0,lr.useRef)(0),u=(0,lr.useRef)(),h=(0,lr.useRef)();return Fi(()=>{if(t.relative){let f=r.current;if(f&&s){let g=s.getScaleFactor();l.current!==g&&(l.current=g,f.style.transformOrigin="0 0",f.style.transform=`scale(${1/l.current})`,f.style.width=`${l.current*100}%`,f.style.height=`${l.current*100}%`,r.current&&u.current?.__owner.value?.rotation&&(f.style.transform=`scale(${1/l.current}) translate(50%, 50%) rotate(${u.current?.__owner.value?.rotation||0}deg) translate(-50%, -50%)`))}}},[t.relative]),(0,lr.useLayoutEffect)(()=>{let f=u.current;n&&f&&(typeof n=="function"?n(f):n.current=f);async function g(){if(f&&f.__host){let m=t.relative?(0,Vp.jsx)("div",{ref:r,children:e}):e;await jw(f.__host.element,m,h)}}f&&f.__host?g():f&&(f.__onCreate=g)},[n,e,u,t.relative]),(0,lr.useLayoutEffect)(()=>()=>{h.current&&setTimeout(()=>{h.current.unmount()},0)},[]),(0,Vp.jsx)("box",{html:!0,...t,ref:u})});Pc.displayName="HTMLPortal";var Uw=Y(le(),1);var ar=Y(le(),1);var Ze=Y(le(),1);var bw=Y(le(),1);var kc=(e,t,n=[])=>{let r=st(),s=r?r.world:void 0;(0,bw.useEffect)(()=>{if(r){let l=t,u=Tn[e];r.world.activatedEvents.push(u);let h=u.slice(2).toLowerCase();return r.world.addEventListener(h,l),()=>{r.world.removeEventListener(h,l)}}return()=>{}},[s,e,...n])};function Qp(e,t){if(e===0)return[0,1];if(t===0)return[1,0];let n=Math.abs(e)/Math.abs(t);return[n,1-n]}var Cc=Y(le(),1);function Hw(){let e=(0,Cc.useRef)({ctrl:!1,shift:!1,alt:!1});return(0,Cc.useLayoutEffect)(()=>{function t(r){r.key==="Shift"&&(e.current.shift=!0),r.key==="Control"&&(e.current.ctrl=!0),r.key==="Alt"&&(e.current.alt=!0)}function n(r){r.key==="Shift"&&(e.current.shift=!1),r.key==="Control"&&(e.current.ctrl=!1),r.key==="Alt"&&(e.current.alt=!1)}return window.addEventListener("keydown",t),window.addEventListener("keyup",n),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",n)}},[]),e}var Gp=(e,t)=>{let n=Ms(),r=st(),s=uu(),l=(0,Ze.useRef)(),u=(0,Ze.useRef)(null),h=(0,Ze.useRef)(),[f,g]=(0,Ze.useState)(!1),m=(0,Ze.useRef)(!1),S=(0,Ze.useRef)({north:0,south:0,east:0,west:0}),E=Hw(),P=(0,Ze.useCallback)(w=>_=>{if(m.current=!0,g(!0),s&&r){let{top:L,left:O}=s,z=r.viewerToWorld(_.pageX-O,_.pageY-L);h.current={x:z.x,y:z.y},l.current=w}},[s,r]),k=(0,Ze.useMemo)(()=>e.width/e.height,[e.width,e.height]),R=(0,Ze.useCallback)(w=>{if(!Math.abs(w.north-w.south+(w.east-w.west)))return;let L=-w.west+w.east,O=-w.north+w.south,z=e.width+L,D=e.height+O;if(z/D>=k){let q=D*k,M=z-q,[K,se]=Qp(w.east,w.west);w.west=w.west+M*se,w.east=w.east-M*K}else{let q=z/k,M=D-q,[K,se]=Qp(w.north,w.south);w.north=w.north+M*K,w.south=w.south-M*se}},[e.width,e.height,k]);Fi(()=>{h&&r&&r.updateNextFrame()}),(0,Ze.useEffect)(()=>{r&&r.updateNextFrame()},[r,f]);let A=(0,Ze.useCallback)(w=>{if(!r||!s||r.mode!=="sketch")return;let{top:_,left:L}=s,O=r.viewerToWorld(w.pageX-L,w.pageY-_),z=u.current,D=!e.maintainAspectRatio&&E.current.alt,b=!D&&E.current.shift&&l.current?.indexOf("-")!==-1;if((l.current==="translate"||l.current==="east"||l.current==="north-east"||l.current==="south-east")&&(S.current.east=O.x-(h.current?h.current.x:0),D&&(S.current.west=-S.current.east)),(l.current==="translate"||l.current==="west"||l.current==="north-west"||l.current==="south-west")&&(S.current.west=O.x-(h.current?h.current.x:0),D&&(S.current.east=-S.current.west)),(l.current==="translate"||l.current==="north"||l.current==="north-east"||l.current==="north-west")&&(S.current.north=O.y-(h.current?h.current.y:0),D&&(S.current.south=-S.current.north)),(l.current==="translate"||l.current==="south"||l.current==="south-west"||l.current==="south-east")&&(S.current.south=O.y-(h.current?h.current.y:0),D&&(S.current.north=-S.current.south)),(e.maintainAspectRatio||b)&&R(S.current),z){let q=S.current.west,M=S.current.north,K=e.width+S.current.east,se=e.height+S.current.south;z.points[1]=Math.min(q,K),z.points[2]=Math.min(M,se),z.points[3]=Math.max(q,K),z.points[4]=Math.max(M,se),r.updateNextFrame()}},[r,e.width,e.height,e.maintainAspectRatio,s]);kc("mousemove",A,[e.width,e.height,s]),kc("pointermove",A,[e.width,e.height,s]);let x=(0,Ze.useRef)();return(0,Ze.useEffect)(()=>{x.current=()=>{if(m.current){let w=S.current.west,_=S.current.north,L=e.width+S.current.east,O=e.height+S.current.south,z=Math.min(w,L),D=Math.min(_,O),b=Math.max(w,L),q=Math.max(_,O),M={x:(e.x||0)+z,y:(e.y||0)+D,width:b-z||1,height:q-D||1};e.maintainAspectRatio,t(M),l.current=void 0,h.current=void 0,S.current.east=0,S.current.west=0,S.current.north=0,S.current.south=0,m.current=!1,g(!1)}}},[t,e.height,e.width,e.x,e.y]),(0,Ze.useEffect)(()=>{let w=()=>{x.current&&x.current()};return window.addEventListener("pointerup",w),window.addEventListener("touchend",w),()=>{window.removeEventListener("pointerup",w),window.removeEventListener("touchend",w)}},[]),{portalRef:u,mode:n,mouseEvent:P,onPointerMoveCallback:A,isEditing:f}};var Ue=Y(Ie(),1);function Xp({handleSize:e,resizable:t,onSave:n,children:r,maintainAspectRatio:s,disableCardinalControls:l,...u}){let h=typeof e>"u"?s?10:8:e,{portalRef:f,mode:g,mouseEvent:m,isEditing:S}=Gp({x:u.x||0,y:u.y||0,width:u.width,height:u.height,maintainAspectRatio:s},n),E=(0,ar.useMemo)(()=>m("translate"),[m]),P=(0,ar.useMemo)(()=>m("east"),[m]),k=(0,ar.useMemo)(()=>m("west"),[m]),R=(0,ar.useMemo)(()=>m("south"),[m]),A=(0,ar.useMemo)(()=>m("north"),[m]),x=(0,ar.useMemo)(()=>m("south-east"),[m]),w=(0,ar.useMemo)(()=>m("south-west"),[m]),_=(0,ar.useMemo)(()=>m("north-east"),[m]),L=(0,ar.useMemo)(()=>m("north-west"),[m]),O=g==="sketch",z={zIndex:999,boxShadow:"0px 2px 3px 0 rgba(0,0,0,0.2)",border:"1px solid rgba(155,155,155,.7)",borderRadius:s||l?"50%":2,position:"absolute",background:"#fff",pointerEvents:S?"none":O?"initial":"none"};return(0,Ue.jsx)(Ue.Fragment,{children:(0,Ue.jsxs)("world-object",{...u,children:[r,O&&t?(0,Ue.jsx)(Pc,{ref:f,target:{x:0,y:0,height:u.height,width:u.width},relative:!0,interactive:!1,children:O&&t?(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)("div",{onMouseDown:E,onTouchStart:E,style:{display:"block",width:"100%",height:"100%",position:"relative",border:"1px solid rgba(155,155,155, .7)",boxSizing:"border-box",pointerEvents:S?"none":O?"initial":"none"}}),s?null:(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)("div",{title:"east",onTouchStart:P,onMouseDown:P,style:{...z,cursor:"e-resize",height:h*2,width:h,right:0,top:"50%",opacity:l?0:1,transform:`translate(${h/2}px, -${h}px)`}}),(0,Ue.jsx)("div",{title:"west",onMouseDown:k,style:{...z,cursor:"w-resize",position:"absolute",height:h*2,width:h,left:0,top:"50%",opacity:l?0:1,transform:`translate(-${h/2}px, -${h}px)`}}),(0,Ue.jsx)("div",{title:"north",onMouseDown:A,style:{...z,cursor:"n-resize",position:"absolute",height:h,width:h*2,left:"50%",top:0,opacity:l?0:1,transform:`translate(-${h}px, -${h/2}px)`}}),(0,Ue.jsx)("div",{title:"south",onMouseDown:R,style:{...z,cursor:"s-resize",position:"absolute",height:h,width:h*2,left:"50%",bottom:0,opacity:l?0:1,transform:`translate(-${h}px, ${h/2}px)`}})]}),(0,Ue.jsx)("div",{title:"north-east",onMouseDown:_,style:{...z,cursor:"ne-resize",position:"absolute",height:h,width:h,right:0,top:0,transform:`translate(${h/2}px, -${h/2}px)`}}),(0,Ue.jsx)("div",{title:"south-east",onMouseDown:x,style:{...z,cursor:"se-resize",position:"absolute",height:h,width:h,bottom:0,right:0,transform:`translate(${h/2}px, ${h/2}px)`}}),(0,Ue.jsx)("div",{title:"south-west",onMouseDown:w,style:{...z,cursor:"sw-resize",position:"absolute",height:h,width:h,bottom:0,left:0,transform:`translate(-${h/2}px, ${h/2}px)`}}),(0,Ue.jsx)("div",{title:"north-west",onMouseDown:L,style:{...z,cursor:"nw-resize",position:"absolute",height:h,width:h,top:0,left:0,transform:`translate(-${h/2}px, -${h/2}px)`}})]}):null}):null]})})}var Yp=Y(Ie(),1);function sP({interactive:e,region:t,onClick:n,onSave:r,maintainAspectRatio:s,disableCardinalControls:l,isEditing:u,rotation:h,style:f={backgroundColor:"rgba(0,0,0,.5)"}}){let g=(0,Uw.useCallback)(m=>{r({id:t.id,x:t.x,y:t.y,height:t.height,width:t.width,...m})},[r,t.id,t.x,t.y,t.height,t.width]);return(0,Yp.jsx)(Xp,{x:t.x,y:t.y,rotation:h,width:t.width,height:t.height,resizable:u,onSave:g,maintainAspectRatio:s,disableCardinalControls:l,children:(0,Yp.jsx)("box",{interactive:e,onClick:m=>{m.preventDefault(),m.stopPropagation(),n(t)},target:{x:0,y:0,width:t.width,height:t.height},style:f})})}var Tc=Y(le(),1),Zi=Y(Ie(),1),Zp=e=>{let t=e.width/(e.crop?.width||e.tiles.width),n=e.tiles.imageService.sizes||[],r=e.enableThumbnail,s=e.enableSizes,l=(0,Tc.useMemo)(()=>{let f=e.tiles.imageService.id||e.tiles.imageService["@id"];return f&&f.endsWith("/info.json")?f.slice(0,-1*10):f},[e.tiles.imageService.id]),u=(0,Tc.useMemo)(()=>{let f=e.tiles.imageService.tiles||[];if(!f.length){let g=e.width,m=[1],S=1;for(;Math.pow(2,S)<g;)S=S*2,m.push(S);return[]}return f},[e.tiles.imageService]),h=(0,Tc.useMemo)(()=>{let f=e.tiles.imageService;return(f?f["@context"]?Array.isArray(f["@context"])?f["@context"]:[f["@context"]]:[]:[]).indexOf("http://iiif.io/api/image/3/context.json")!==-1},[e.tiles.imageService.id]);return(0,Zi.jsx)("world-object",{rotation:e.rotation,scale:t,height:e.crop?.height||e.tiles.height,width:e.crop?.width||e.tiles.width,x:e.x,y:e.y,onClick:e.onClick,children:(0,Zi.jsxs)("composite-image",{id:e.tiles.imageService.id,width:e.crop?.width||e.tiles.width,height:e.crop?.height||e.tiles.height,crop:e.crop,renderOptions:e.renderOptions,children:[r&&e.tiles.thumbnail?(0,Zi.jsx)("world-image",{priority:!0,uri:e.tiles.thumbnail.id,target:{width:e.tiles.width,height:e.tiles.height},display:{width:e.tiles.thumbnail.width,height:e.tiles.thumbnail.height},crop:e.crop}):null,s&&n.map((f,g)=>(0,Zi.jsx)("world-image",{uri:`${l}/full/${f.width},${f.height}/0/default.jpg`,target:{width:e.tiles.width,height:e.tiles.height},display:{width:f.width,height:f.height},crop:e.crop},g)),u.map(f=>(f.scaleFactors||[]).map(g=>(0,Zi.jsx)("tiled-image",{uri:e.tiles.imageService.id,display:{width:e.tiles.width,height:e.tiles.height},tile:f,scaleFactor:g,crop:e.crop,version3:h},`${e.tiles.imageService.id}-tile-${g}`)))]},e.tiles.imageService.id)},e.tiles.imageService.id)};var Fc=Y(le(),1);function Kp(e){return e.id||e["@id"]}var lP=Object.defineProperty,aP=(e,t,n)=>t in e?lP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rc=(e,t,n)=>(aP(e,typeof t!="symbol"?t+"":t,n),n);function Ki(e){return e.endsWith("info.json")?e:e.endsWith("/")?`${e}info.json`:`${e}/info.json`}var uP="http://library.stanford.edu/iiif/image-api/compliance.html#level0",Xw="http://library.stanford.edu/iiif/image-api/compliance.html#level1",Yw="http://library.stanford.edu/iiif/image-api/compliance.html#level2",cP="http://library.stanford.edu/iiif/image-api/conformance.html#level0",Zw="http://library.stanford.edu/iiif/image-api/conformance.html#level1",Kw="http://library.stanford.edu/iiif/image-api/conformance.html#level2",dP="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",$w="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",qw="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",hP="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",Jw="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",eS="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",fP="http://iiif.io/api/image/1/level0.json",pP="http://iiif.io/api/image/1/profiles/level0.json",tS="http://iiif.io/api/image/1/level1.json",nS="http://iiif.io/api/image/1/profiles/level1.json",rS="http://iiif.io/api/image/1/level2.json",iS="http://iiif.io/api/image/1/profiles/level2.json",mP="http://iiif.io/api/image/2/level0.json",gP="http://iiif.io/api/image/2/profiles/level0.json",oS="http://iiif.io/api/image/2/level1.json",sS="http://iiif.io/api/image/2/profiles/level1.json",lS="http://iiif.io/api/image/2/level2.json",aS="http://iiif.io/api/image/2/profiles/level2.json",vP="level0",uS="level1",cS="level2",yP="http://iiif.io/api/image/2/level0",dS="http://iiif.io/api/image/2/level1",hS="http://iiif.io/api/image/2/level2",fS=[hS,Yw,Kw,qw,eS,rS,iS,lS,aS,cS],pS=[...fS,dS,Xw,Zw,$w,Jw,tS,nS,oS,sS,uS],wP=[yP,dS,hS,uP,Xw,Yw,cP,Zw,Kw,dP,$w,qw,hP,Jw,eS,fP,pP,tS,nS,rS,iS,mP,gP,oS,sS,lS,aS,vP,uS,cS];var SP={extraFormats:["jpg"],extraQualities:["default"],extraFeatures:["sizeByWhListed"]},xP={extraFormats:["jpg"],extraQualities:["default"],extraFeatures:["baseUriRedirect","cors","jsonldMediaType","regionByPx","regionSquare","sizeByWhListed","sizeByH","sizeByW","sizeByWh"]},EP={extraFormats:["jpg","png"],extraQualities:["default"],extraFeatures:["baseUriRedirect","cors","jsonldMediaType","regionByPct","regionByPx","regionSquare","rotationBy90s","sizeByWhListed","sizeByConfinedWh","sizeByH","sizeByPct","sizeByW","sizeByWh"]};function _P(e){return fS.indexOf(e)!==-1?EP:pS.indexOf(e)!==-1?xP:SP}function PP(e){let t=e?Array.isArray(e.profile)?e.profile:[e.profile]:[],n={extraQualities:[],extraFormats:[],extraFeatures:[]};for(let r of t)if(typeof r=="string"&&(r=_P(r)),!!r){if(r.formats)for(let s of r.formats)n.extraFormats.indexOf(s)===-1&&n.extraFormats.push(s);if(r.qualities)for(let s of r.qualities)n.extraQualities.indexOf(s)===-1&&n.extraQualities.push(s);if(r.supports)for(let s of r.supports)n.extraFeatures.indexOf(s)===-1&&n.extraFeatures.push(s);if(r.maxHeight&&(n.maxHeight=r.maxHeight),r.maxWidth&&(n.maxWidth=r.maxWidth),r.maxArea&&(n.maxArea=r.maxArea),r.extraFormats)for(let s of r.extraFormats)n.extraFormats.indexOf(s)===-1&&n.extraFormats.push(s);if(r.extraQualities)for(let s of r.extraQualities)n.extraQualities.indexOf(s)===-1&&n.extraQualities.push(s);if(r.extraFeatures)for(let s of r.extraFeatures)n.extraFeatures.indexOf(s)===-1&&n.extraFeatures.push(s);r.maxHeight&&(n.maxHeight=r.maxHeight),r.maxWidth&&(n.maxWidth=r.maxWidth),r.maxArea&&(n.maxArea=r.maxArea)}if(e.extraFormats)for(let r of e.extraFormats)n.extraFormats.indexOf(r)===-1&&n.extraFormats.push(r);if(e.extraFeatures)for(let r of e.extraFeatures)n.extraFeatures.indexOf(r)===-1&&n.extraFeatures.push(r);if(e.extraQualities)for(let r of e.extraQualities)n.extraQualities.indexOf(r)===-1&&n.extraQualities.push(r);return n}function kP(e){try{if(e==="full")return{full:!0};if(e==="square")return{square:!0};let t=e.startsWith("pct:"),n=e.substr(t?4:0).split(",").map(r=>parseFloat(r));return{x:n[0],y:n[1],w:n[2],h:n[3],percent:t}}catch{throw new Error("Expected 'full', 'square' or 'x,y,w,h'. Found "+e)}}function CP(e){let t={upscaled:!1,max:!1,confined:!1};if(e[0]==="^"&&(t.upscaled=!0,e=e.slice(1)),e==="max"||e==="full")return t.max=!0,t.serialiseAsFull=e==="full",t;if(e[0]==="!"&&(t.confined=!0,e=e.slice(1)),e[0]==="p")return t.percentScale=parseFloat(e.slice(4)),t;let n=e.split(",").map(r=>r.trim());return n.length&&typeof n[0]<"u"&&(n[0]!==""&&(t.width=parseInt(n[0],10)),typeof n[1]<"u"&&n[1]!==""?(t.height=parseInt(n[1],10),t.version=2):t.version=3),t}function TP(e){let t={angle:0};if(e[0]==="!"&&(t.mirror=!0,e=e.substr(1)),t.angle=parseFloat(e)%360,Number.isNaN(t.angle))throw new Error(`Invalid rotation ${e}`);return t}function RP(e,t=""){let n=e.match(/^(([a-zA-Z]+):\/\/([^/]+))?((.*)+)/);if(!n)throw new Error(`Invalid or unknown input ${e}`);let r=n[2],s=n[3],l=n[4];if(l[0]==="/"&&(l=l.substring(1)),t.length>0){if(t[0]==="/"&&(t=t.substring(1)),t!==l.substring(0,t.length))throw new Error(`Path does not start with prefix (path: ${l}, prefix: ${t})`);l=l.substring(t.length)}return{scheme:r,server:s,path:l,prefix:t}}function zP(e,t=""){let{path:n,scheme:r,server:s,prefix:l}=RP(e,t),u=(n||"").split("/").reverse(),[h,f,g,m,...S]=u,E=S.reverse().filter(Boolean).join("/");if(u.length===1||h==="")return{type:"base",scheme:r,server:s,prefix:l,identifier:E};if(h==="info.json"){let[,...k]=u;return{type:"info",scheme:r,server:s,prefix:l,identifier:k.reverse().filter(Boolean).join("/")}}let P=(h||"").split(".");if(typeof P[1]>"u"||typeof P[0]>"u"||typeof m>"u"||typeof g>"u"||typeof f>"u")throw new Error("Invalid image request");return{type:"image",scheme:r,server:s,prefix:l,identifier:E,originalPath:n,region:kP(m),size:CP(g),rotation:TP(f),quality:P[0],format:P[1]}}function IP(e){let t=zP(Ki(e.id));if(t.type!=="info")throw new Error("Invalid service URL");let n=PP(e);return{identifier:t.identifier,originalPath:"",server:t.server,prefix:t.prefix,scheme:t.scheme,type:"image",quality:n.extraQualities.indexOf("default")===-1?n.extraQualities[0]:"default",region:{full:!0},size:{max:!0,upscaled:!1,confined:!1},format:"jpg",rotation:{angle:0}}}function LP(e,t,n){let r=n.length,s=[];for(let l=0;l<r;l++){let u=n[l];if(u){let h=u.width;s.push(e/h)}}return s}function NP(e,t,n){let r=n.length,s=[];for(let l=0;l<r;l++){let u=n[l];u&&s.push({width:Math.floor(e/u),height:Math.floor(t/u)})}return s}function We(e){if(e["@id"])return e["@id"];if(e.id)return e.id}function Ic(e){if(!e||!e.profile||!We(e))return!1;let t=Array.isArray(e.profile)?e.profile:[e.profile];for(let n of t)if(typeof n=="string"&&wP.indexOf(n)!==-1)return!0;return!1}function OP(e){if(!Ic(e))return!1;let t=Array.isArray(e.profile)?e.profile:[e.profile];for(let n of t)if(typeof n=="string"){if(pS.indexOf(n)!==-1)return!0}else{let r=[...n.supports||[],...n.extraFeatures||[]];if(r.indexOf("regionByPx")!==-1&&(r.indexOf("sizeByW")!==-1||r.indexOf("sizeByWh")!==-1))return!0}return!1}function zc(e,t){if(t&&t.profile){let n=t.profile;if(n){let r=Array.isArray(n)?n:[n];return r.includes(`level${e}`)||r.includes(`http://iiif.io/api/image/2/level${e}.json`)||r.includes(`http://iiif.io/api/image/1/level${e}.json`)||r.includes(`http://iiif.io/api/image/1/profiles/level${e}.json`)}}return!1}function qp(e){return Ic(e)?zc(0,e)?0:zc(1,e)?1:zc(2,e)?2:null:null}function mS(e){return(e["@context"]?Array.isArray(e["@context"])?e["@context"]:[e["@context"]]:[]).indexOf("http://iiif.io/api/image/3/context.json")!==-1}function FP(e){if(!OP(e))return[];let t=[],n=Array.isArray(e.profile)?e.profile:[e.profile],r=n.length;for(let s=0;s<r;s++){let l=n[s];if(l&&typeof l!="string"&&(l.maxHeight||l.maxWidth))return[{id:We(e),type:"variable",minWidth:0,minHeight:0,maxHeight:l.maxHeight||l.maxWidth,maxWidth:l.maxWidth||l.maxHeight,level:qp(e),version:e["@context"]==="http://iiif.io/api/image/3/context.json"?3:2}]}if(e.tiles){let s=e.tiles.length;for(let l=0;l<s;l++){let u=e.tiles[l];u&&(u.height||u.width)&&t.push({id:We(e),type:"variable",minHeight:0,minWidth:0,maxHeight:u.height||u.width,maxWidth:u.width,level:qp(e),version:mS(e)?3:2})}}return t}function Vw(e){let t=/^.*\/(full)\/(((\d+),(\d+)?)|max)\/(\d+)\/default\.(jpg|png|jpeg)$/,n=e.match(t);if(n&&n[4]&&n[5]){let r=n[1],s=parseInt(n[4],10),l=parseInt(n[5],10),u=n[7];if((r==="max"||r==="full")&&s&&l&&u)return{type:"fixed",id:e,height:l,width:s}}return{type:"unknown",id:e}}function MP(e){if(e["@type"])return e["@type"];if(e.type)return e.type}function Lc(e){if(typeof e=="string")return Vw(e);let t=MP(e);if(t!=="Image"&&t!=="sc:Image")return null;let n=e,r=We(n);return r?r&&n.width&&n.height?{id:r,type:"fixed",width:n.width,height:n.height,unsafe:!0}:Vw(r):null}function AP(e){return Ic(e)?(e&&e.sizes?e.sizes:[]).map(t=>({id:We(e),type:"fixed-service",height:t.height,width:t.width,level:qp(e),version:mS(e)?3:2})):[]}function Qw(e){let t=[],n=e.length;for(let r=0;r<n;r++){let s=e[r];if(!s)continue;let l=AP(s);l.length&&t.push(...l);let u=FP(s);u.length&&t.push(...u)}return t}function gS(e){let t=e.service?Array.isArray(e.service)?e.service:[e.service]:[],n=t.length,r=[];for(let s=0;s<n;s++)Ic(t[s])&&r.push(t[s]);return r}function DP(e,t=!0,n){let r=[],s=Lc(e);if(s===null)return r;let l=e;if(r.push(s),t&&l&&l.width&&l.height){let u=[],h=gS(l);for(let f of h){let g={id:We(f),width:l.width,height:l.height};if(n.canLoadSync(g)){let m=n.loadServiceSync(g);m&&(m.height||(m.height=l.height),m.width||(m.width=l.width),u.push(...Qw([m])))}}if(u.length)return r.push(...u),r}return l.service&&r.push(...Qw(l.service)),r}function WP({x:e=0,y:t=0,w:n,h:r,full:s,square:l,percent:u}){if(s)return"full";if(l)return"square";if(typeof n>"u"||typeof r>"u")throw new Error("RegionParameter: invalid region");let h=`${e},${t},${n},${r}`;return u?`pct:${h}`:h}function BP({max:e,percentScale:t,upscaled:n,confined:r,width:s,height:l,serialiseAsFull:u,version:h}){let f=[];return n&&f.push("^"),e?(f.push(u?"full":"max"),f.join("")):(r&&f.push("!"),t&&f.push(`pct:${t}`),s&&f.push(`${s}`),f.push(","),l&&h===3&&f.push(`${l}`),f.join(""))}function jP(e){return`${e.mirror?"!":""}${(e.angle||0)%360}`}function bP(e,t){let n=e.prefix.startsWith("/")?e.prefix.substr(1):e.prefix,r=`${e.scheme}://${e.server}/${n?`${n}/`:""}${e.identifier}`;if(e.type==="base")return r;if(e.type==="info")return`${r}/info.json`;let{size:s}=e,{region:l,rotation:u,format:h,quality:f}=e;if(t){let g=t["@context"]?Array.isArray(t["@context"])?t["@context"]:[t["@context"]]:[],m=g.indexOf("http://iiif.io/api/image/2/context.json")!==-1,S=g.indexOf("http://iiif.io/api/image/3/context.json")!==-1;if((s.width===t.width&&!s.height||s.height===t.height&&!s.width||s.width===t.width&&s.height===t.height)&&(s={...s,max:!0}),m&&(s.max&&!s.serialiseAsFull&&(s={...s,serialiseAsFull:!0}),!s.max&&s.width&&s.height&&(s={...s,height:void 0}),s={...s,version:2}),S){if(s.max&&s.serialiseAsFull&&(s={...s,serialiseAsFull:!1}),s.width&&!s.height&&t.width&&t.height){let E=t.height/t.width;s={...s,height:Math.ceil(s.width*E)}}s={...s,version:3}}}return[r,WP(l),BP(s),jP(u),`${f}.${h}`].filter(Boolean).join("/")}function $p(e,t,n){let r=IP({"@context":e.version===3?"http://iiif.io/api/image/3/context.json":"http://iiif.io/api/image/2/context.json",id:Ki(We(e)),profile:e.level===null||typeof e.level>"u"?"level0":`level${e.level}`,type:e.version===3?"ImageService3":"ImageService2"});if(r.type!=="image")throw new Error("Invalid service");return r.size.max=!1,r.size.width=t,r.size.height=n,{id:bP(r),type:"fixed",width:t,height:n||e.height/(e.width||1)*t,unsafe:e.width>t}}function Jo(e){let t=e.replace(/(https?:\/\/)?(www.)?/i,"");return t.indexOf("/")!==-1?t.split("/")[0]:t}function HP(e,t,n){let r=e.width?e.width:e.maxWidth;return n.height<=e.maxHeight&&n.width<=e.maxWidth&&n.height>=e.minHeight&&n.width>=e.minWidth&&(!t||Math.abs(n.width-r)<Math.abs(t.width-r))}function UP(e,t){let n=[],r=Object.assign({unsafeImageService:!1,atAnyCost:!0,fallback:!0,minHeight:64,minWidth:64,maxHeight:1/0,maxWidth:1/0,returnAllOptions:!1,preferFixedSize:!1,allowUnsafe:!1,explain:!1,height:0,width:0},e),s=(m,S=0)=>r.explain?n.push(new Array(S).fill(0).map(E=>" ").join("")+m().trim()):void 0,l=[],u=[],h=null;s(()=>`Using configuration: ${JSON.stringify(r,null,2)}`);let f=(m,S)=>{if(s(()=>"Swapping choice",3),HP(r,S,m)){if(r.preferFixedSize&&m.unsafe){s(()=>`We found an image that was marked as unsafe, but it was the best size. (${m.id})`,4),u.push(m);return}r.returnAllOptions&&S&&u.push(S),s(()=>`We found a new image that was the best size. (${m.id})`,4),h=m}else r.returnAllOptions&&u.push(m)};s(()=>`The input shows we have ${t.length} list(s) of candidates to choose from.`);let g=t.length;for(let m=0;m<g;m++){let S=t[m]();s(()=>`Candidate group ${m}: ${JSON.stringify(S,null,2)}`,1);let E=S.length;s(()=>`Checking candidate list number ${m} and found ${E} potential ways of creating image(s)`,1);for(let P=0;P<E;P++){let k=S[P];if(s(()=>`-> Checking candidate ${P}`,1),k.type==="unknown"&&r.atAnyCost&&(s(()=>`We've found an unknown image type, adding this to the "last resort" list`,2),l.push(k)),k.type==="fixed"&&(k.unsafe?(s(()=>`We've found an unsafe fixed image type, adding this to the "last resort" list`,2),l.push(k)):(s(()=>"We've found a fixed size image, checking if it matches the request",2),f(k,h))),k.type==="fixed-service")if(r.unsafeImageService){s(()=>"Checking for an image from the tile source, without calculating the right height and width (unsafeImageService)",2);let R=$p(k,r.width,r.height);f(R,h)}else{s(()=>"Checking for an image from the tile source 3",2);let R=$p(k,k.width,k.height);f(R,h)}if(k.type==="variable"&&k.maxWidth){let R=$p({id:k.id,type:"fixed-service",width:k.maxWidth,height:k.maxWidth,level:k.level,version:k.version},k.maxWidth);f(R,h)}}if(h&&!r.returnAllOptions){if(h.unsafe||r.allowUnsafe)continue;s(()=>`We found a match in choice list number ${m}, no searching any more`);break}}return r.atAnyCost&&u.length===0?(s(()=>h?`We found an image! ${h.id} of type ${h.type}`:'We found no images, but "atAnyCost" is set, so returning that'),{best:h||l[0]||null,fallback:l.slice(1),log:n}):r.returnAllOptions?(s(()=>"Returning all options that we have found"),{best:(r.atAnyCost?h||u[0]||l[0]:h||u[0])||null,fallback:[...u,...l],log:n}):(s(()=>"Returning the best image that we found, and a fallback"),{best:h||u[0]||null,fallback:h?u:u.slice(1),log:n})}function VP(e,t,n){let r=e>t?e:t,s=n.length,l=[];for(let u=0;u<s;u++){let h=n[u];if(!h||h.scaleFactors.length===0)continue;let f=h.scaleFactors[0];if(!f)continue;let g=r/f,m=[f];for(;g>=h.width;)f=f*2,m.push(f),g=g/2;l.push({...h,scaleFactors:m})}return l}function QP(e,t){if(e.length!==t.length)return!1;if(e.length===0&&t.length===0)return!0;let n=e.length,r=!0;for(let l=0;l<n;l++){let u=e[l],h=t[l];if(u.width!==h.width||u.height!==h.height){r=!1;break}}if(r)return!0;let s=0;for(let l=0;l<n;l++)for(let u=0;u<n;u++)if(e[l].width===t[u].width&&e[l].height===t[u].height){s++;break}return s===n}function Gw(e){return zc(0,e)}var Ml=class{constructor(e={}){Rc(this,"config",{verificationsRequired:1,approximateServices:!1,enableFetching:!0,disableThrottling:!1}),Rc(this,"fetchingCount",0),Rc(this,"imageServices",{}),Rc(this,"knownImageServers",{}),this.config=Object.assign(this.config,e)}setConfig(e){Object.assign(this.config,e)}sample(e,t,n=!0){let r=Jo(We(e)),s=Ki(We(e)),l=this.knownImageServers[r];return this.imageServices[s]=Object.assign(e,{real:!0}),!l&&e.tiles&&!Gw(e)?(this.knownImageServers[r]={verifications:0,malformed:!1,root:r,preLoaded:n,sampledId:We(e),verified:!1,server:null,result:{context:e["@context"]||[],sampledProfile:e.profile,resourceServiceRatio:t&&e.height?t.height/e.height:1,sampledSizes:e.sizes||[],sizeRatios:LP(e.width,e.height,e.sizes||[]),sampledTiles:e.tiles||[]}},!0):this.verify(e)}preLoad(e,t=!0){this.knownImageServers[e.root]=e,t&&(this.knownImageServers[e.root].malformed=!1,this.knownImageServers[e.root].verifications=this.config.verificationsRequired)}predict(e,t=!1,n=!1){let r=e?.source,s=Jo(We(e)),l=this.knownImageServers[s],u=Ki(We(e));return this.imageServices[u]?this.imageServices[u]||null:!this.config.approximateServices||!l||!l.result||!(r?.height||e.height)||!(r?.width||e.width)||!n&&(l.malformed||l.verifications<this.config.verificationsRequired)||Gw(e.source)?null:(this.imageServices[u]||(this.imageServices[u]={"@context":l.result.context,"@id":We(e),id:We(e),protocol:"http://iiif.io/api/image",tiles:r?.tiles||VP(e.width,e.height,l.result.sampledTiles),sizes:r?.sizes||NP(Math.round(e.width/l.result.resourceServiceRatio),Math.round(e.height/l.result.resourceServiceRatio),l.result.sizeRatios),profile:r?.profile||l.result.sampledProfile,height:r?.height||e.height,width:r?.width||e.width,real:!1}),this.imageServices[u]||null)}async getThumbnailFromResource(e,t,n=!0,r=[]){let s=e?await this.getImageCandidates(e,n):[];return UP(t,[()=>r,()=>s])}async getImageCandidates(e,t=!0){let n=e;if(t&&n&&n.height&&n.width){let r=gS(n);for(let s of r){let l={id:We(s),width:s.width?s.width:n.width,height:s.height?s.height:n.height,source:s};await this.loadService(l)}}return DP(e,t,this)}async verify(e){let t=this.predict(e,!1,!0),n=await this.fetchService(We(e));if(!t)return!1;let r=t.height===n.height&&t.width===n.width&&t["@context"]===n["@context"]&&QP(t.sizes||[],n.sizes||[]);if(r){let s=Jo(We(e)),l=this.knownImageServers[s];l&&(l.verifications+=1,l.verifications>=this.config.verificationsRequired&&(l.verified=!0))}return r}canLoadSync(e){let t=typeof e=="string"?e:We(e),n=Ki(t);if(this.imageServices[n])return!0;let r=this.knownImageServers[Jo(t)];return!!(r&&!r.malformed&&r.verifications>=this.config.verificationsRequired)}async markAsMalformed(e){return this.knownImageServers[Jo(We(e))].malformed=!0,this.loadService(e,!0)}async fetchService(e,t=!1){let n=Ki(e),r=this.imageServices[n];if(r&&(!t||r.real))return r;if(!this.config.enableFetching)throw new Error("Fetching is not enabled");let s=await this.fetch(n).then(l=>l.json());return!s.id&&s["@id"]&&(s.id=s["@id"]),s.id!==e&&(s.id=e,s["@id"]&&(s["@id"]=e)),this.imageServices[n]=Object.assign(s,{real:!0}),this.imageServices[n]}async fetch(e,t){return fetch(e,t)}async loadService(e,t=!1){if(!this.config.disableThrottling){let s=!0;for(;s;)if(this.fetchingCount>=this.config.verificationsRequired)await new Promise(l=>setTimeout(l,500));else{s=!1;break}}let n=this.knownImageServers[Jo(We(e))];if(n&&!n.malformed&&!t){await n.result;let s=this.loadServiceSync(e);if(s)return s}this.fetchingCount++;let r=await this.fetchService(We(e),t);return this.fetchingCount--,r.real&&this.sample(r,e),r}loadServiceSync(e){let t=Ki(We(e));return this.imageServices[t]?this.imageServices[t]:this.config.approximateServices?this.predict(e):null}},AI=new Ml;var Nc={},Jp={get(e){return e},setMetaValue([e,t,n],r){let s=Jp.getResourceMeta(e,t),l=s?s[n]:void 0,u=typeof r=="function"?r(l):r;Nc[e]={...Nc[e]||{},[t]:{...(Nc[e]||{})[t]||{},[n]:u}}},getResourceMeta:(e,t)=>{let n=Nc[e];if(n)return t?n[t]:n}};var vS=new Ml;function em(e=Jp,t={}){let n=t.imageServiceLoader||vS;async function r(s,l,u=!1,h=[],f){let g=()=>n.getThumbnailFromResource(void 0,l,u,h);if(!s)return await n.getThumbnailFromResource(void 0,l,u,h);if(typeof s=="string"){let E=Lc(s);return E&&h.push(E),await n.getThumbnailFromResource(void 0,l,u,h)}let m=e.get(s,{skipSelfReturn:!1});if(typeof m=="string")return{best:Lc(m),fallback:[],log:[]};if(!m)return await g();switch(await(async E=>{if(E&&E.thumbnail&&E.thumbnail.length){let P=e.get(E.thumbnail[0]),k=await n.getImageCandidates(P,u);k&&k.length&&h.push(...k)}})(m),m.type){case"Annotation":{let E=Array.isArray(m.body)?m.body:[m.body],P=e.get(E[0]);return f&&!P.width&&(P.width=f.width,P.height=f.height),await n.getThumbnailFromResource(P,l,u,h)}case"Canvas":{let E=m;return r(E.items[0],l,u,h,{width:E.width,height:E.height})}case"AnnotationPage":return r(m.items[0],l,u,h,f);case"Choice":{let E=m;return!E.items||E.items[0]?await g():r(E.items[0],l,u,h,f)}case"Collection":{let P=m.items[0];return P?r(P,l,u,h,f):await g()}case"Manifest":{let P=m.items[0];return P?r(P,l,u,h,f):await g()}case"SpecificResource":case"Image":case"Dataset":case"Sound":case"Text":case"TextualBody":case"Video":return f&&!m.width&&(m.width=f.width,m.height=f.height),n.getThumbnailFromResource(m,l,u,h)}return await g()}return{getBestThumbnailAtSize:r}}function GP(){return typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function XP(){let e=GP();if(typeof e.IIIF_VAULT<"u")return e.IIIF_VAULT;if(typeof e.IIIFVault>"u")throw new Error("Vault not found");return e.IIIF_VAULT=new e.IIIFVault.Vault,e.IIIF_VAULT}var $i={};function Al(){return $i.helper||($i.vault=XP(),$i.loader=new Ml,$i.helper=em($i.vault,{imageServiceLoader:$i.loader})),$i}async function Oc(e,t,n){let{loader:r}=Al(),s=await r.loadService({id:e,width:t,height:n});return{id:Kp(s),width:t,height:n,imageService:s,thumbnail:void 0}}async function yS(e,t=512){let{vault:n,loader:r,helper:s}=Al(),l=[];for(let u of e.items)for(let h of n.get(u).items){let g=n.get(n.get(h).body[0]).service[0],m=await Oc(g.id,e.width,e.height),{best:S}=await s.getBestThumbnailAtSize(n,r,e,{maxHeight:t,maxWidth:t},!0);S&&(m.thumbnail=S),l.push(m)}return l}async function wS(e){let{vault:t}=Al(),n=[];for(let r of e.items){let s=t.get(r);n.push(...await yS(s))}return n}async function YP(e){try{let{vault:t}=Al(),n=await t.loadManifest(e);return n?wS(n):[]}catch(t){return console.log("ERR",t),[]}}var tm=Y(Ie(),1),ZP=e=>{let[t,n]=(0,Fc.useState)();return(0,Fc.useEffect)(()=>{Oc(e.id,e.width,e.height).then(r=>{n(r)})},[e.height,e.id,e.width]),(0,tm.jsx)("world-object",{x:e.x||0,y:e.y||0,width:e.width,height:e.height,scale:e.scale,children:t?(0,tm.jsx)(Zp,{tiles:t,x:e.x,y:e.y,width:e.crop?.width||e.width,height:e.crop?.height||e.height,rotation:e.rotation,crop:e.crop,enableSizes:e.enableSizes,enableThumbnail:e.enableThumbnail,renderOptions:e.renderOptions,children:e.children}):null})};var SS=Y(le(),1),KP=(e,t=[])=>{let n=st();(0,SS.useEffect)(()=>n?n.registerHook("useAfterPaint",e):()=>{},t)};var Ke=Y(le(),1);var Mc=Y(Ie(),1),$P=(e,{onCreated:t,resetWorldOnChange:n=!0,mode:r="explore",cover:s,containerRef:l,...u})=>{let[h,f]=(0,Ke.useState)(!1),[g,m]=(0,Ke.useState)(void 0),[S,E]=(0,Ke.useState)(void 0),P=(0,Ke.useRef)(),k=(0,Ke.useRef)(),R=(0,Ke.useMemo)(()=>({width:u.width,height:u.height}),[u.width,u.height]),[A,x,w,_]=lu(void 0,{width:u.width,height:u.height});Yt(()=>{let O=document.createElement("canvas");O.height=R.height,O.width=R.width,P.current=O},[]),Yt(()=>{let O=P.current;O&&(O.height=R.height,O.width=R.width)},[R.width,R.height]),(0,Ke.useEffect)(()=>x?x.runtime.registerHook("useAfterFrame",()=>{if(P.current)try{m(P.current.toDataURL())}catch(z){z instanceof Error&&E(z.message)}}):()=>{},[]),(0,Ke.useEffect)(()=>x?x.runtime.world.addLayoutSubscriber(z=>{z==="ready"&&f(!0)}):()=>{},[]),(0,Ke.useEffect)(()=>{x&&x.em&&x.em.updateBounds()},[R]),(0,Ke.useEffect)(()=>{x&&(x.runtime.mode=r)},[r]),(0,Ke.useEffect)(()=>{if(x){let O=x.runtime;O.resize(w.current.width,u.width,w.current.height,u.height),s?O.cover():O.goHome(),w.current.width=u.width,w.current.height=u.height,O.updateNextFrame()}},[u.width,u.height]),Yt(()=>{let O=k.current;O&&(O.style.width=`${R.width}px`,O.style.height=`${R.height}px`,O.style.pointerEvents="none",O.style.overflow="hidden")},[R.height,R.width]),Yt(()=>{let O=()=>{if(x&&x.runtime){let z=x.runtime;z.resize(w.current.width,u.width,w.current.height,u.height),w.current.width=u.width,w.current.height=u.height,z.updateNextFrame()}};return window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[x,u.height,u.width]);let L=(0,Ke.useCallback)(function(z){let D=()=>{x&&(x.ready=!0)};return(0,Ke.useEffect)(()=>{if(x){let b=t&&t(x);return void(b&&b.then?b.then(D):D())}return()=>{}},[]),z.children},[x]);return(0,Ke.useEffect)(()=>{if(x&&x.runtime){let O=x.runtime;if(n)return O.world.addLayoutSubscriber(z=>{z==="recalculate-world-size"&&O.goHome({cover:s})})}return()=>{}},[x,s,n]),Yt(()=>{x&&So.render((0,Mc.jsx)(L,{children:(0,Mc.jsx)($n.Provider,{value:r,children:(0,Mc.jsx)(qn.Provider,{value:x,children:e})})}),x.runtime)},[x,r,e]),{loading:!g&&h,uri:g,imageError:S}};var xS=Y(le(),1),qP=(e,t=[])=>{let n=st();(0,xS.useEffect)(()=>n?n.registerHook("useBeforeFrame",e):()=>{},t)};var zr=Y(le(),1);var JP=(e=[])=>{let[t,n]=(0,zr.useState)(e),[r,s]=(0,zr.useState)(!1),[l,u]=(0,zr.useState)(),h=(0,zr.useCallback)(()=>{s(!0),u(void 0)},[]),f=(0,zr.useCallback)(E=>{s(!0),u(E)},[]),g=E=>{n(P=>P.map(k=>k.id===E.id?E:k))},m=(0,zr.useCallback)(E=>{let P=Yn();n(k=>[...k,{id:P,...E}]),s(!1),u(void 0)},[]),S=(0,zr.useCallback)(()=>{s(!1),u(void 0)},[]);return{isEditing:r,onDeselect:S,selectedAnnotation:l,onCreateNewAnnotation:m,annotations:t,onUpdateAnnotation:g,setIsEditing:s,setSelectedAnnotation:u,editAnnotation:f,addNewAnnotation:h}};function ek(e){return e.current==="sketch"}function tk(e,t){return e?t?{...e,...t||{},":hover":e[":hover"]?Object.assign(e[":hover"]||{},t[":hover"]||{}):t[":hover"],":active":e[":active"]?Object.assign(e[":active"]||{},t[":active"]||{}):t[":hover"]}:e:t}return uE(nk);})();
|
|
80
80
|
/*! Bundled license information:
|
|
81
81
|
|
|
82
82
|
normalize-wheel/src/isEventSupported.js:
|