react-iiif-vault 1.0.5 → 1.0.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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(fe,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom"),require("@iiif/helpers/vault"),require("@atlas-viewer/iiif-image-api")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@iiif/helpers/vault","@atlas-viewer/iiif-image-api"],C):(fe=typeof globalThis<"u"?globalThis:fe||self,C(fe.ReactIIIFVault={},fe.React,fe.ReactDOM,fe.IIIFVault,fe.IIIFImageApi))})(this,function(fe,C,vg,cf,ka){"use strict";function Ix(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function Fx(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(r,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ae=Ix(C);function Bx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gh={exports:{}},wu={};/**
1
+ (function(de,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom"),require("@iiif/helpers/vault"),require("@atlas-viewer/iiif-image-api")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@iiif/helpers/vault","@atlas-viewer/iiif-image-api"],C):(de=typeof globalThis<"u"?globalThis:de||self,C(de.ReactIIIFVault={},de.React,de.ReactDOM,de.IIIFVault,de.IIIFImageApi))})(this,function(de,C,vg,cf,ka){"use strict";function Ix(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function Fx(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(r,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ae=Ix(C);function Bx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gh={exports:{}},wu={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var mg;function Hx(){return mg||(mg=1,process.env.NODE_ENV!=="production"&&function(){var t=C,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),v=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),M=Symbol.iterator,_="@@iterator";function L(U){if(U===null||typeof U!="object")return null;var de=M&&U[M]||U[_];return typeof de=="function"?de:null}var k=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(U){{for(var de=arguments.length,we=new Array(de>1?de-1:0),Qe=1;Qe<de;Qe++)we[Qe-1]=arguments[Qe];I("error",U,we)}}function I(U,de,we){{var Qe=k.ReactDebugCurrentFrame,Et=Qe.getStackAddendum();Et!==""&&(de+="%s",we=we.concat([Et]));var At=we.map(function(vt){return String(vt)});At.unshift("Warning: "+de),Function.prototype.apply.call(console[U],console,At)}}var q=!1,te=!1,H=!1,J=!1,re=!1,$;$=Symbol.for("react.module.reference");function se(U){return!!(typeof U=="string"||typeof U=="function"||U===r||U===c||re||U===o||U===x||U===m||J||U===P||q||te||H||typeof U=="object"&&U!==null&&(U.$$typeof===A||U.$$typeof===w||U.$$typeof===h||U.$$typeof===v||U.$$typeof===g||U.$$typeof===$||U.getModuleId!==void 0))}function ge(U,de,we){var Qe=U.displayName;if(Qe)return Qe;var Et=de.displayName||de.name||"";return Et!==""?we+"("+Et+")":we}function Ce(U){return U.displayName||"Context"}function me(U){if(U==null)return null;if(typeof U.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof U=="function")return U.displayName||U.name||null;if(typeof U=="string")return U;switch(U){case r:return"Fragment";case n:return"Portal";case c:return"Profiler";case o:return"StrictMode";case x:return"Suspense";case m:return"SuspenseList"}if(typeof U=="object")switch(U.$$typeof){case v:var de=U;return Ce(de)+".Consumer";case h:var we=U;return Ce(we._context)+".Provider";case g:return ge(U,U.render,"ForwardRef");case w:var Qe=U.displayName||null;return Qe!==null?Qe:me(U.type)||"Memo";case A:{var Et=U,At=Et._payload,vt=Et._init;try{return me(vt(At))}catch{return null}}}return null}var Ie=Object.assign,_e=0,Ye,gt,Z,Ue,dt,pe,je;function He(){}He.__reactDisabledLog=!0;function ut(){{if(_e===0){Ye=console.log,gt=console.info,Z=console.warn,Ue=console.error,dt=console.group,pe=console.groupCollapsed,je=console.groupEnd;var U={configurable:!0,enumerable:!0,value:He,writable:!0};Object.defineProperties(console,{info:U,log:U,warn:U,error:U,group:U,groupCollapsed:U,groupEnd:U})}_e++}}function pt(){{if(_e--,_e===0){var U={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ie({},U,{value:Ye}),info:Ie({},U,{value:gt}),warn:Ie({},U,{value:Z}),error:Ie({},U,{value:Ue}),group:Ie({},U,{value:dt}),groupCollapsed:Ie({},U,{value:pe}),groupEnd:Ie({},U,{value:je})})}_e<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var vn=k.ReactCurrentDispatcher,Kt;function xt(U,de,we){{if(Kt===void 0)try{throw Error()}catch(Et){var Qe=Et.stack.trim().match(/\n( *(at )?)/);Kt=Qe&&Qe[1]||""}return`
10
- `+Kt+U}}var ct=!1,Ge;{var nt=typeof WeakMap=="function"?WeakMap:Map;Ge=new nt}function Ze(U,de){if(!U||ct)return"";{var we=Ge.get(U);if(we!==void 0)return we}var Qe;ct=!0;var Et=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var At;At=vn.current,vn.current=null,ut();try{if(de){var vt=function(){throw Error()};if(Object.defineProperty(vt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(vt,[])}catch(mt){Qe=mt}Reflect.construct(U,[],vt)}else{try{vt.call()}catch(mt){Qe=mt}U.call(vt.prototype)}}else{try{throw Error()}catch(mt){Qe=mt}U()}}catch(mt){if(mt&&Qe&&typeof mt.stack=="string"){for(var ot=mt.stack.split(`
11
- `),yn=Qe.stack.split(`
12
- `),Ut=ot.length-1,Ht=yn.length-1;Ut>=1&&Ht>=0&&ot[Ut]!==yn[Ht];)Ht--;for(;Ut>=1&&Ht>=0;Ut--,Ht--)if(ot[Ut]!==yn[Ht]){if(Ut!==1||Ht!==1)do if(Ut--,Ht--,Ht<0||ot[Ut]!==yn[Ht]){var zn=`
13
- `+ot[Ut].replace(" at new "," at ");return U.displayName&&zn.includes("<anonymous>")&&(zn=zn.replace("<anonymous>",U.displayName)),typeof U=="function"&&Ge.set(U,zn),zn}while(Ut>=1&&Ht>=0);break}}}finally{ct=!1,vn.current=At,pt(),Error.prepareStackTrace=Et}var Zn=U?U.displayName||U.name:"",zi=Zn?xt(Zn):"";return typeof U=="function"&&Ge.set(U,zi),zi}function ht(U,de,we){return Ze(U,!1)}function ft(U){var de=U.prototype;return!!(de&&de.isReactComponent)}function mn(U,de,we){if(U==null)return"";if(typeof U=="function")return Ze(U,ft(U));if(typeof U=="string")return xt(U);switch(U){case x:return xt("Suspense");case m:return xt("SuspenseList")}if(typeof U=="object")switch(U.$$typeof){case g:return ht(U.render);case w:return mn(U.type,de,we);case A:{var Qe=U,Et=Qe._payload,At=Qe._init;try{return mn(At(Et),de,we)}catch{}}}return""}var Qt=Object.prototype.hasOwnProperty,Gi={},j=k.ReactDebugCurrentFrame;function z(U){if(U){var de=U._owner,we=mn(U.type,U._source,de?de.type:null);j.setExtraStackFrame(we)}else j.setExtraStackFrame(null)}function G(U,de,we,Qe,Et){{var At=Function.call.bind(Qt);for(var vt in U)if(At(U,vt)){var ot=void 0;try{if(typeof U[vt]!="function"){var yn=Error((Qe||"React class")+": "+we+" type `"+vt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof U[vt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw yn.name="Invariant Violation",yn}ot=U[vt](de,vt,Qe,we,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ut){ot=Ut}ot&&!(ot instanceof Error)&&(z(Et),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Qe||"React class",we,vt,typeof ot),z(null)),ot instanceof Error&&!(ot.message in Gi)&&(Gi[ot.message]=!0,z(Et),O("Failed %s type: %s",we,ot.message),z(null))}}}var Se=Array.isArray;function st(U){return Se(U)}function Ve(U){{var de=typeof Symbol=="function"&&Symbol.toStringTag,we=de&&U[Symbol.toStringTag]||U.constructor.name||"Object";return we}}function gn(U){try{return ki(U),!1}catch{return!0}}function ki(U){return""+U}function be(U){if(gn(U))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(U)),ki(U)}var at=k.ReactCurrentOwner,ui={key:!0,ref:!0,__self:!0,__source:!0},Dt,et,Te;Te={};function Pe(U){if(Qt.call(U,"ref")){var de=Object.getOwnPropertyDescriptor(U,"ref").get;if(de&&de.isReactWarning)return!1}return U.ref!==void 0}function rt(U){if(Qt.call(U,"key")){var de=Object.getOwnPropertyDescriptor(U,"key").get;if(de&&de.isReactWarning)return!1}return U.key!==void 0}function Lt(U,de){if(typeof U.ref=="string"&&at.current&&de&&at.current.stateNode!==de){var we=me(at.current.type);Te[we]||(O('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',me(at.current.type),U.ref),Te[we]=!0)}}function tt(U,de){{var we=function(){Dt||(Dt=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",de))};we.isReactWarning=!0,Object.defineProperty(U,"key",{get:we,configurable:!0})}}function an(U,de){{var we=function(){et||(et=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",de))};we.isReactWarning=!0,Object.defineProperty(U,"ref",{get:we,configurable:!0})}}var Zt=function(U,de,we,Qe,Et,At,vt){var ot={$$typeof:e,type:U,key:de,ref:we,props:vt,_owner:At};return ot._store={},Object.defineProperty(ot._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ot,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.defineProperty(ot,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Et}),Object.freeze&&(Object.freeze(ot.props),Object.freeze(ot)),ot};function Fn(U,de,we,Qe,Et){{var At,vt={},ot=null,yn=null;we!==void 0&&(be(we),ot=""+we),rt(de)&&(be(de.key),ot=""+de.key),Pe(de)&&(yn=de.ref,Lt(de,Et));for(At in de)Qt.call(de,At)&&!ui.hasOwnProperty(At)&&(vt[At]=de[At]);if(U&&U.defaultProps){var Ut=U.defaultProps;for(At in Ut)vt[At]===void 0&&(vt[At]=Ut[At])}if(ot||yn){var Ht=typeof U=="function"?U.displayName||U.name||"Unknown":U;ot&&tt(vt,Ht),yn&&an(vt,Ht)}return Zt(U,ot,yn,Et,Qe,at.current,vt)}}var nn=k.ReactCurrentOwner,bi=k.ReactDebugCurrentFrame;function qr(U){if(U){var de=U._owner,we=mn(U.type,U._source,de?de.type:null);bi.setExtraStackFrame(we)}else bi.setExtraStackFrame(null)}var Ha;Ha=!1;function Va(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function Yr(){{if(nn.current){var U=me(nn.current.type);if(U)return`
9
+ */var mg;function Hx(){return mg||(mg=1,process.env.NODE_ENV!=="production"&&function(){var t=C,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),v=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),M=Symbol.iterator,_="@@iterator";function L(U){if(U===null||typeof U!="object")return null;var he=M&&U[M]||U[_];return typeof he=="function"?he:null}var P=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(U){{for(var he=arguments.length,we=new Array(he>1?he-1:0),Ke=1;Ke<he;Ke++)we[Ke-1]=arguments[Ke];H("error",U,we)}}function H(U,he,we){{var Ke=P.ReactDebugCurrentFrame,xt=Ke.getStackAddendum();xt!==""&&(he+="%s",we=we.concat([xt]));var At=we.map(function(pt){return String(pt)});At.unshift("Warning: "+he),Function.prototype.apply.call(console[U],console,At)}}var q=!1,Q=!1,B=!1,J=!1,ie=!1,$;$=Symbol.for("react.module.reference");function re(U){return!!(typeof U=="string"||typeof U=="function"||U===r||U===c||ie||U===o||U===x||U===m||J||U===k||q||Q||B||typeof U=="object"&&U!==null&&(U.$$typeof===A||U.$$typeof===w||U.$$typeof===h||U.$$typeof===v||U.$$typeof===g||U.$$typeof===$||U.getModuleId!==void 0))}function me(U,he,we){var Ke=U.displayName;if(Ke)return Ke;var xt=he.displayName||he.name||"";return xt!==""?we+"("+xt+")":we}function Re(U){return U.displayName||"Context"}function Se(U){if(U==null)return null;if(typeof U.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof U=="function")return U.displayName||U.name||null;if(typeof U=="string")return U;switch(U){case r:return"Fragment";case n:return"Portal";case c:return"Profiler";case o:return"StrictMode";case x:return"Suspense";case m:return"SuspenseList"}if(typeof U=="object")switch(U.$$typeof){case v:var he=U;return Re(he)+".Consumer";case h:var we=U;return Re(we._context)+".Provider";case g:return me(U,U.render,"ForwardRef");case w:var Ke=U.displayName||null;return Ke!==null?Ke:Se(U.type)||"Memo";case A:{var xt=U,At=xt._payload,pt=xt._init;try{return Se(pt(At))}catch{return null}}}return null}var Fe=Object.assign,ke=0,Xe,ft,Te,it,ue,se,je;function qe(){}qe.__reactDisabledLog=!0;function ct(){{if(ke===0){Xe=console.log,ft=console.info,Te=console.warn,it=console.error,ue=console.group,se=console.groupCollapsed,je=console.groupEnd;var U={configurable:!0,enumerable:!0,value:qe,writable:!0};Object.defineProperties(console,{info:U,log:U,warn:U,error:U,group:U,groupCollapsed:U,groupEnd:U})}ke++}}function dt(){{if(ke--,ke===0){var U={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Fe({},U,{value:Xe}),info:Fe({},U,{value:ft}),warn:Fe({},U,{value:Te}),error:Fe({},U,{value:it}),group:Fe({},U,{value:ue}),groupCollapsed:Fe({},U,{value:se}),groupEnd:Fe({},U,{value:je})})}ke<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var rn=P.ReactCurrentDispatcher,Xt;function wt(U,he,we){{if(Xt===void 0)try{throw Error()}catch(xt){var Ke=xt.stack.trim().match(/\n( *(at )?)/);Xt=Ke&&Ke[1]||""}return`
10
+ `+Xt+U}}var ht=!1,Ut;{var jt=typeof WeakMap=="function"?WeakMap:Map;Ut=new jt}function Ie(U,he){if(!U||ht)return"";{var we=Ut.get(U);if(we!==void 0)return we}var Ke;ht=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var At;At=rn.current,rn.current=null,ct();try{if(he){var pt=function(){throw Error()};if(Object.defineProperty(pt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pt,[])}catch(vt){Ke=vt}Reflect.construct(U,[],pt)}else{try{pt.call()}catch(vt){Ke=vt}U.call(pt.prototype)}}else{try{throw Error()}catch(vt){Ke=vt}U()}}catch(vt){if(vt&&Ke&&typeof vt.stack=="string"){for(var lt=vt.stack.split(`
11
+ `),yn=Ke.stack.split(`
12
+ `),It=lt.length-1,Vt=yn.length-1;It>=1&&Vt>=0&&lt[It]!==yn[Vt];)Vt--;for(;It>=1&&Vt>=0;It--,Vt--)if(lt[It]!==yn[Vt]){if(It!==1||Vt!==1)do if(It--,Vt--,Vt<0||lt[It]!==yn[Vt]){var Nn=`
13
+ `+lt[It].replace(" at new "," at ");return U.displayName&&Nn.includes("<anonymous>")&&(Nn=Nn.replace("<anonymous>",U.displayName)),typeof U=="function"&&Ut.set(U,Nn),Nn}while(It>=1&&Vt>=0);break}}}finally{ht=!1,rn.current=At,dt(),Error.prepareStackTrace=xt}var Jn=U?U.displayName||U.name:"",Ni=Jn?wt(Jn):"";return typeof U=="function"&&Ut.set(U,Ni),Ni}function We(U,he,we){return Ie(U,!1)}function Qe(U){var he=U.prototype;return!!(he&&he.isReactComponent)}function St(U,he,we){if(U==null)return"";if(typeof U=="function")return Ie(U,Qe(U));if(typeof U=="string")return wt(U);switch(U){case x:return wt("Suspense");case m:return wt("SuspenseList")}if(typeof U=="object")switch(U.$$typeof){case g:return We(U.render);case w:return St(U.type,he,we);case A:{var Ke=U,xt=Ke._payload,At=Ke._init;try{return St(At(xt),he,we)}catch{}}}return""}var bt=Object.prototype.hasOwnProperty,zn={},j=P.ReactDebugCurrentFrame;function z(U){if(U){var he=U._owner,we=St(U.type,U._source,he?he.type:null);j.setExtraStackFrame(we)}else j.setExtraStackFrame(null)}function X(U,he,we,Ke,xt){{var At=Function.call.bind(bt);for(var pt in U)if(At(U,pt)){var lt=void 0;try{if(typeof U[pt]!="function"){var yn=Error((Ke||"React class")+": "+we+" type `"+pt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof U[pt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw yn.name="Invariant Violation",yn}lt=U[pt](he,pt,Ke,we,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(It){lt=It}lt&&!(lt instanceof Error)&&(z(xt),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ke||"React class",we,pt,typeof lt),z(null)),lt instanceof Error&&!(lt.message in zn)&&(zn[lt.message]=!0,z(xt),O("Failed %s type: %s",we,lt.message),z(null))}}}var ye=Array.isArray;function at(U){return ye(U)}function Ve(U){{var he=typeof Symbol=="function"&&Symbol.toStringTag,we=he&&U[Symbol.toStringTag]||U.constructor.name||"Object";return we}}function gn(U){try{return zi(U),!1}catch{return!0}}function zi(U){return""+U}function be(U){if(gn(U))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(U)),zi(U)}var ot=P.ReactCurrentOwner,ci={key:!0,ref:!0,__self:!0,__source:!0},Dt,tt,Ce;Ce={};function ze(U){if(bt.call(U,"ref")){var he=Object.getOwnPropertyDescriptor(U,"ref").get;if(he&&he.isReactWarning)return!1}return U.ref!==void 0}function st(U){if(bt.call(U,"key")){var he=Object.getOwnPropertyDescriptor(U,"key").get;if(he&&he.isReactWarning)return!1}return U.key!==void 0}function Lt(U,he){if(typeof U.ref=="string"&&ot.current&&he&&ot.current.stateNode!==he){var we=Se(ot.current.type);Ce[we]||(O('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Se(ot.current.type),U.ref),Ce[we]=!0)}}function nt(U,he){{var we=function(){Dt||(Dt=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",he))};we.isReactWarning=!0,Object.defineProperty(U,"key",{get:we,configurable:!0})}}function ln(U,he){{var we=function(){tt||(tt=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",he))};we.isReactWarning=!0,Object.defineProperty(U,"ref",{get:we,configurable:!0})}}var Jt=function(U,he,we,Ke,xt,At,pt){var lt={$$typeof:e,type:U,key:he,ref:we,props:pt,_owner:At};return lt._store={},Object.defineProperty(lt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(lt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ke}),Object.defineProperty(lt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(lt.props),Object.freeze(lt)),lt};function Bn(U,he,we,Ke,xt){{var At,pt={},lt=null,yn=null;we!==void 0&&(be(we),lt=""+we),st(he)&&(be(he.key),lt=""+he.key),ze(he)&&(yn=he.ref,Lt(he,xt));for(At in he)bt.call(he,At)&&!ci.hasOwnProperty(At)&&(pt[At]=he[At]);if(U&&U.defaultProps){var It=U.defaultProps;for(At in It)pt[At]===void 0&&(pt[At]=It[At])}if(lt||yn){var Vt=typeof U=="function"?U.displayName||U.name||"Unknown":U;lt&&nt(pt,Vt),yn&&ln(pt,Vt)}return Jt(U,lt,yn,xt,Ke,ot.current,pt)}}var sn=P.ReactCurrentOwner,xi=P.ReactDebugCurrentFrame;function qr(U){if(U){var he=U._owner,we=St(U.type,U._source,he?he.type:null);xi.setExtraStackFrame(we)}else xi.setExtraStackFrame(null)}var Ha;Ha=!1;function Wa(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function Yr(){{if(sn.current){var U=Se(sn.current.type);if(U)return`
14
14
 
15
- Check the render method of \``+U+"`."}return""}}function xi(U){{if(U!==void 0){var de=U.fileName.replace(/^.*[\\\/]/,""),we=U.lineNumber;return`
15
+ Check the render method of \``+U+"`."}return""}}function Ei(U){{if(U!==void 0){var he=U.fileName.replace(/^.*[\\\/]/,""),we=U.lineNumber;return`
16
16
 
17
- Check your code at `+de+":"+we+"."}return""}}var ia={};function Wa(U){{var de=Yr();if(!de){var we=typeof U=="string"?U:U.displayName||U.name;we&&(de=`
17
+ Check your code at `+he+":"+we+"."}return""}}var ia={};function Va(U){{var he=Yr();if(!he){var we=typeof U=="string"?U:U.displayName||U.name;we&&(he=`
18
18
 
19
- Check the top-level render call using <`+we+">.")}return de}}function ws(U,de){{if(!U._store||U._store.validated||U.key!=null)return;U._store.validated=!0;var we=Wa(de);if(ia[we])return;ia[we]=!0;var Qe="";U&&U._owner&&U._owner!==nn.current&&(Qe=" It was passed a child from "+me(U._owner.type)+"."),qr(U),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',we,Qe),qr(null)}}function Xi(U,de){{if(typeof U!="object")return;if(st(U))for(var we=0;we<U.length;we++){var Qe=U[we];Va(Qe)&&ws(Qe,de)}else if(Va(U))U._store&&(U._store.validated=!0);else if(U){var Et=L(U);if(typeof Et=="function"&&Et!==U.entries)for(var At=Et.call(U),vt;!(vt=At.next()).done;)Va(vt.value)&&ws(vt.value,de)}}}function vl(U){{var de=U.type;if(de==null||typeof de=="string")return;var we;if(typeof de=="function")we=de.propTypes;else if(typeof de=="object"&&(de.$$typeof===g||de.$$typeof===w))we=de.propTypes;else return;if(we){var Qe=me(de);G(we,U.props,"prop",Qe,U)}else if(de.PropTypes!==void 0&&!Ha){Ha=!0;var Et=me(de);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Et||"Unknown")}typeof de.getDefaultProps=="function"&&!de.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ml(U){{for(var de=Object.keys(U.props),we=0;we<de.length;we++){var Qe=de[we];if(Qe!=="children"&&Qe!=="key"){qr(U),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Qe),qr(null);break}}U.ref!==null&&(qr(U),O("Invalid attribute `ref` supplied to `React.Fragment`."),qr(null))}}function Qr(U,de,we,Qe,Et,At){{var vt=se(U);if(!vt){var ot="";(U===void 0||typeof U=="object"&&U!==null&&Object.keys(U).length===0)&&(ot+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var yn=xi(Et);yn?ot+=yn:ot+=Yr();var Ut;U===null?Ut="null":st(U)?Ut="array":U!==void 0&&U.$$typeof===e?(Ut="<"+(me(U.type)||"Unknown")+" />",ot=" Did you accidentally export a JSX literal instead of a component?"):Ut=typeof U,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ut,ot)}var Ht=Fn(U,de,we,Et,At);if(Ht==null)return Ht;if(vt){var zn=de.children;if(zn!==void 0)if(Qe)if(st(zn)){for(var Zn=0;Zn<zn.length;Zn++)Xi(zn[Zn],U);Object.freeze&&Object.freeze(zn)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Xi(zn,U)}return U===r?ml(Ht):vl(Ht),Ht}}function Ju(U,de,we){return Qr(U,de,we,!0)}function ec(U,de,we){return Qr(U,de,we,!1)}var gl=ec,yl=Ju;wu.Fragment=r,wu.jsx=gl,wu.jsxs=yl}()),wu}var Tu={};/**
19
+ Check the top-level render call using <`+we+">.")}return he}}function ws(U,he){{if(!U._store||U._store.validated||U.key!=null)return;U._store.validated=!0;var we=Va(he);if(ia[we])return;ia[we]=!0;var Ke="";U&&U._owner&&U._owner!==sn.current&&(Ke=" It was passed a child from "+Se(U._owner.type)+"."),qr(U),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',we,Ke),qr(null)}}function Xi(U,he){{if(typeof U!="object")return;if(at(U))for(var we=0;we<U.length;we++){var Ke=U[we];Wa(Ke)&&ws(Ke,he)}else if(Wa(U))U._store&&(U._store.validated=!0);else if(U){var xt=L(U);if(typeof xt=="function"&&xt!==U.entries)for(var At=xt.call(U),pt;!(pt=At.next()).done;)Wa(pt.value)&&ws(pt.value,he)}}}function vl(U){{var he=U.type;if(he==null||typeof he=="string")return;var we;if(typeof he=="function")we=he.propTypes;else if(typeof he=="object"&&(he.$$typeof===g||he.$$typeof===w))we=he.propTypes;else return;if(we){var Ke=Se(he);X(we,U.props,"prop",Ke,U)}else if(he.PropTypes!==void 0&&!Ha){Ha=!0;var xt=Se(he);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof he.getDefaultProps=="function"&&!he.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ml(U){{for(var he=Object.keys(U.props),we=0;we<he.length;we++){var Ke=he[we];if(Ke!=="children"&&Ke!=="key"){qr(U),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ke),qr(null);break}}U.ref!==null&&(qr(U),O("Invalid attribute `ref` supplied to `React.Fragment`."),qr(null))}}function Qr(U,he,we,Ke,xt,At){{var pt=re(U);if(!pt){var lt="";(U===void 0||typeof U=="object"&&U!==null&&Object.keys(U).length===0)&&(lt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var yn=Ei(xt);yn?lt+=yn:lt+=Yr();var It;U===null?It="null":at(U)?It="array":U!==void 0&&U.$$typeof===e?(It="<"+(Se(U.type)||"Unknown")+" />",lt=" Did you accidentally export a JSX literal instead of a component?"):It=typeof U,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",It,lt)}var Vt=Bn(U,he,we,xt,At);if(Vt==null)return Vt;if(pt){var Nn=he.children;if(Nn!==void 0)if(Ke)if(at(Nn)){for(var Jn=0;Jn<Nn.length;Jn++)Xi(Nn[Jn],U);Object.freeze&&Object.freeze(Nn)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Xi(Nn,U)}return U===r?ml(Vt):vl(Vt),Vt}}function Ju(U,he,we){return Qr(U,he,we,!0)}function ec(U,he,we){return Qr(U,he,we,!1)}var gl=ec,yl=Ju;wu.Fragment=r,wu.jsx=gl,wu.jsxs=yl}()),wu}var Tu={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,7 +24,7 @@ Check the top-level render call using <`+we+">.")}return de}}function ws(U,de){{
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var gg;function Vx(){if(gg)return Tu;gg=1;var t=C,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function h(v,g,x){var m,w={},A=null,P=null;x!==void 0&&(A=""+x),g.key!==void 0&&(A=""+g.key),g.ref!==void 0&&(P=g.ref);for(m in g)r.call(g,m)&&!c.hasOwnProperty(m)&&(w[m]=g[m]);if(v&&v.defaultProps)for(m in g=v.defaultProps,g)w[m]===void 0&&(w[m]=g[m]);return{$$typeof:e,type:v,key:A,ref:P,props:w,_owner:o.current}}return Tu.Fragment=n,Tu.jsx=h,Tu.jsxs=h,Tu}process.env.NODE_ENV==="production"?Gh.exports=Vx():Gh.exports=Hx();var le=Gh.exports,Xh={exports:{}},ff={exports:{}};/*
27
+ */var gg;function Wx(){if(gg)return Tu;gg=1;var t=C,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function h(v,g,x){var m,w={},A=null,k=null;x!==void 0&&(A=""+x),g.key!==void 0&&(A=""+g.key),g.ref!==void 0&&(k=g.ref);for(m in g)r.call(g,m)&&!c.hasOwnProperty(m)&&(w[m]=g[m]);if(v&&v.defaultProps)for(m in g=v.defaultProps,g)w[m]===void 0&&(w[m]=g[m]);return{$$typeof:e,type:v,key:A,ref:k,props:w,_owner:o.current}}return Tu.Fragment=n,Tu.jsx=h,Tu.jsxs=h,Tu}process.env.NODE_ENV==="production"?Gh.exports=Wx():Gh.exports=Hx();var le=Gh.exports,Xh={exports:{}},ff={exports:{}};/*
28
28
  object-assign
29
29
  (c) Sindre Sorhus
30
30
  @license MIT
@@ -35,21 +35,21 @@ object-assign
35
35
  *
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
- */var bg;function Wx(){return bg||(bg=1,function(t){process.env.NODE_ENV!=="production"&&function(){var e=!1,n=!1,r,o,c,h,v=typeof performance=="object"&&typeof performance.now=="function";if(v){var g=performance;t.unstable_now=function(){return g.now()}}else{var x=Date,m=x.now();t.unstable_now=function(){return x.now()-m}}if(typeof window>"u"||typeof MessageChannel!="function"){var w=null,A=null,P=function(){if(w!==null)try{var Te=t.unstable_now(),Pe=!0;w(Pe,Te),w=null}catch(rt){throw setTimeout(P,0),rt}};r=function(Te){w!==null?setTimeout(r,0,Te):(w=Te,setTimeout(P,0))},o=function(Te,Pe){A=setTimeout(Te,Pe)},c=function(){clearTimeout(A)},t.unstable_shouldYield=function(){return!1},h=t.unstable_forceFrameRate=function(){}}else{var M=window.setTimeout,_=window.clearTimeout;if(typeof console<"u"){var L=window.requestAnimationFrame,k=window.cancelAnimationFrame;typeof L!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof k!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var O=!1,I=null,q=-1,te=5,H=0;t.unstable_shouldYield=function(){return t.unstable_now()>=H},h=function(){},t.unstable_forceFrameRate=function(Te){if(Te<0||Te>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Te>0?te=Math.floor(1e3/Te):te=5};var J=function(){if(I!==null){var Te=t.unstable_now();H=Te+te;var Pe=!0;try{var rt=I(Pe,Te);rt?$.postMessage(null):(O=!1,I=null)}catch(Lt){throw $.postMessage(null),Lt}}else O=!1},re=new MessageChannel,$=re.port2;re.port1.onmessage=J,r=function(Te){I=Te,O||(O=!0,$.postMessage(null))},o=function(Te,Pe){q=M(function(){Te(t.unstable_now())},Pe)},c=function(){_(q),q=-1}}function se(Te,Pe){var rt=Te.length;Te.push(Pe),me(Te,Pe,rt)}function ge(Te){var Pe=Te[0];return Pe===void 0?null:Pe}function Ce(Te){var Pe=Te[0];if(Pe!==void 0){var rt=Te.pop();return rt!==Pe&&(Te[0]=rt,Ie(Te,rt,0)),Pe}else return null}function me(Te,Pe,rt){for(var Lt=rt;;){var tt=Lt-1>>>1,an=Te[tt];if(an!==void 0&&_e(an,Pe)>0)Te[tt]=Pe,Te[Lt]=an,Lt=tt;else return}}function Ie(Te,Pe,rt){for(var Lt=rt,tt=Te.length;Lt<tt;){var an=(Lt+1)*2-1,Zt=Te[an],Fn=an+1,nn=Te[Fn];if(Zt!==void 0&&_e(Zt,Pe)<0)nn!==void 0&&_e(nn,Zt)<0?(Te[Lt]=nn,Te[Fn]=Pe,Lt=Fn):(Te[Lt]=Zt,Te[an]=Pe,Lt=an);else if(nn!==void 0&&_e(nn,Pe)<0)Te[Lt]=nn,Te[Fn]=Pe,Lt=Fn;else return}}function _e(Te,Pe){var rt=Te.sortIndex-Pe.sortIndex;return rt!==0?rt:Te.id-Pe.id}var Ye=1,gt=2,Z=3,Ue=4,dt=5;function pe(Te,Pe){}var je=1073741823,He=-1,ut=250,pt=5e3,vn=1e4,Kt=je,xt=[],ct=[],Ge=1,nt=null,Ze=Z,ht=!1,ft=!1,mn=!1;function Qt(Te){for(var Pe=ge(ct);Pe!==null;){if(Pe.callback===null)Ce(ct);else if(Pe.startTime<=Te)Ce(ct),Pe.sortIndex=Pe.expirationTime,se(xt,Pe);else return;Pe=ge(ct)}}function Gi(Te){if(mn=!1,Qt(Te),!ft)if(ge(xt)!==null)ft=!0,r(j);else{var Pe=ge(ct);Pe!==null&&o(Gi,Pe.startTime-Te)}}function j(Te,Pe){ft=!1,mn&&(mn=!1,c()),ht=!0;var rt=Ze;try{var Lt;if(!n)return z(Te,Pe)}finally{nt=null,Ze=rt,ht=!1}}function z(Te,Pe){var rt=Pe;for(Qt(rt),nt=ge(xt);nt!==null&&!e&&!(nt.expirationTime>rt&&(!Te||t.unstable_shouldYield()));){var Lt=nt.callback;if(typeof Lt=="function"){nt.callback=null,Ze=nt.priorityLevel;var tt=nt.expirationTime<=rt,an=Lt(tt);rt=t.unstable_now(),typeof an=="function"?nt.callback=an:nt===ge(xt)&&Ce(xt),Qt(rt)}else Ce(xt);nt=ge(xt)}if(nt!==null)return!0;var Zt=ge(ct);return Zt!==null&&o(Gi,Zt.startTime-rt),!1}function G(Te,Pe){switch(Te){case Ye:case gt:case Z:case Ue:case dt:break;default:Te=Z}var rt=Ze;Ze=Te;try{return Pe()}finally{Ze=rt}}function Se(Te){var Pe;switch(Ze){case Ye:case gt:case Z:Pe=Z;break;default:Pe=Ze;break}var rt=Ze;Ze=Pe;try{return Te()}finally{Ze=rt}}function st(Te){var Pe=Ze;return function(){var rt=Ze;Ze=Pe;try{return Te.apply(this,arguments)}finally{Ze=rt}}}function Ve(Te,Pe,rt){var Lt=t.unstable_now(),tt;if(typeof rt=="object"&&rt!==null){var an=rt.delay;typeof an=="number"&&an>0?tt=Lt+an:tt=Lt}else tt=Lt;var Zt;switch(Te){case Ye:Zt=He;break;case gt:Zt=ut;break;case dt:Zt=Kt;break;case Ue:Zt=vn;break;case Z:default:Zt=pt;break}var Fn=tt+Zt,nn={id:Ge++,callback:Pe,priorityLevel:Te,startTime:tt,expirationTime:Fn,sortIndex:-1};return tt>Lt?(nn.sortIndex=tt,se(ct,nn),ge(xt)===null&&nn===ge(ct)&&(mn?c():mn=!0,o(Gi,tt-Lt))):(nn.sortIndex=Fn,se(xt,nn),!ft&&!ht&&(ft=!0,r(j))),nn}function gn(){}function ki(){!ft&&!ht&&(ft=!0,r(j))}function be(){return ge(xt)}function at(Te){Te.callback=null}function ui(){return Ze}var Dt=h,et=null;t.unstable_IdlePriority=dt,t.unstable_ImmediatePriority=Ye,t.unstable_LowPriority=Ue,t.unstable_NormalPriority=Z,t.unstable_Profiling=et,t.unstable_UserBlockingPriority=gt,t.unstable_cancelCallback=at,t.unstable_continueExecution=ki,t.unstable_getCurrentPriorityLevel=ui,t.unstable_getFirstCallbackNode=be,t.unstable_next=Se,t.unstable_pauseExecution=gn,t.unstable_requestPaint=Dt,t.unstable_runWithPriority=G,t.unstable_scheduleCallback=Ve,t.unstable_wrapCallback=st}()}(Zh)),Zh}var Jh={};/** @license React v0.20.2
38
+ */var bg;function Vx(){return bg||(bg=1,function(t){process.env.NODE_ENV!=="production"&&function(){var e=!1,n=!1,r,o,c,h,v=typeof performance=="object"&&typeof performance.now=="function";if(v){var g=performance;t.unstable_now=function(){return g.now()}}else{var x=Date,m=x.now();t.unstable_now=function(){return x.now()-m}}if(typeof window>"u"||typeof MessageChannel!="function"){var w=null,A=null,k=function(){if(w!==null)try{var Ce=t.unstable_now(),ze=!0;w(ze,Ce),w=null}catch(st){throw setTimeout(k,0),st}};r=function(Ce){w!==null?setTimeout(r,0,Ce):(w=Ce,setTimeout(k,0))},o=function(Ce,ze){A=setTimeout(Ce,ze)},c=function(){clearTimeout(A)},t.unstable_shouldYield=function(){return!1},h=t.unstable_forceFrameRate=function(){}}else{var M=window.setTimeout,_=window.clearTimeout;if(typeof console<"u"){var L=window.requestAnimationFrame,P=window.cancelAnimationFrame;typeof L!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof P!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var O=!1,H=null,q=-1,Q=5,B=0;t.unstable_shouldYield=function(){return t.unstable_now()>=B},h=function(){},t.unstable_forceFrameRate=function(Ce){if(Ce<0||Ce>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Ce>0?Q=Math.floor(1e3/Ce):Q=5};var J=function(){if(H!==null){var Ce=t.unstable_now();B=Ce+Q;var ze=!0;try{var st=H(ze,Ce);st?$.postMessage(null):(O=!1,H=null)}catch(Lt){throw $.postMessage(null),Lt}}else O=!1},ie=new MessageChannel,$=ie.port2;ie.port1.onmessage=J,r=function(Ce){H=Ce,O||(O=!0,$.postMessage(null))},o=function(Ce,ze){q=M(function(){Ce(t.unstable_now())},ze)},c=function(){_(q),q=-1}}function re(Ce,ze){var st=Ce.length;Ce.push(ze),Se(Ce,ze,st)}function me(Ce){var ze=Ce[0];return ze===void 0?null:ze}function Re(Ce){var ze=Ce[0];if(ze!==void 0){var st=Ce.pop();return st!==ze&&(Ce[0]=st,Fe(Ce,st,0)),ze}else return null}function Se(Ce,ze,st){for(var Lt=st;;){var nt=Lt-1>>>1,ln=Ce[nt];if(ln!==void 0&&ke(ln,ze)>0)Ce[nt]=ze,Ce[Lt]=ln,Lt=nt;else return}}function Fe(Ce,ze,st){for(var Lt=st,nt=Ce.length;Lt<nt;){var ln=(Lt+1)*2-1,Jt=Ce[ln],Bn=ln+1,sn=Ce[Bn];if(Jt!==void 0&&ke(Jt,ze)<0)sn!==void 0&&ke(sn,Jt)<0?(Ce[Lt]=sn,Ce[Bn]=ze,Lt=Bn):(Ce[Lt]=Jt,Ce[ln]=ze,Lt=ln);else if(sn!==void 0&&ke(sn,ze)<0)Ce[Lt]=sn,Ce[Bn]=ze,Lt=Bn;else return}}function ke(Ce,ze){var st=Ce.sortIndex-ze.sortIndex;return st!==0?st:Ce.id-ze.id}var Xe=1,ft=2,Te=3,it=4,ue=5;function se(Ce,ze){}var je=1073741823,qe=-1,ct=250,dt=5e3,rn=1e4,Xt=je,wt=[],ht=[],Ut=1,jt=null,Ie=Te,We=!1,Qe=!1,St=!1;function bt(Ce){for(var ze=me(ht);ze!==null;){if(ze.callback===null)Re(ht);else if(ze.startTime<=Ce)Re(ht),ze.sortIndex=ze.expirationTime,re(wt,ze);else return;ze=me(ht)}}function zn(Ce){if(St=!1,bt(Ce),!Qe)if(me(wt)!==null)Qe=!0,r(j);else{var ze=me(ht);ze!==null&&o(zn,ze.startTime-Ce)}}function j(Ce,ze){Qe=!1,St&&(St=!1,c()),We=!0;var st=Ie;try{var Lt;if(!n)return z(Ce,ze)}finally{jt=null,Ie=st,We=!1}}function z(Ce,ze){var st=ze;for(bt(st),jt=me(wt);jt!==null&&!e&&!(jt.expirationTime>st&&(!Ce||t.unstable_shouldYield()));){var Lt=jt.callback;if(typeof Lt=="function"){jt.callback=null,Ie=jt.priorityLevel;var nt=jt.expirationTime<=st,ln=Lt(nt);st=t.unstable_now(),typeof ln=="function"?jt.callback=ln:jt===me(wt)&&Re(wt),bt(st)}else Re(wt);jt=me(wt)}if(jt!==null)return!0;var Jt=me(ht);return Jt!==null&&o(zn,Jt.startTime-st),!1}function X(Ce,ze){switch(Ce){case Xe:case ft:case Te:case it:case ue:break;default:Ce=Te}var st=Ie;Ie=Ce;try{return ze()}finally{Ie=st}}function ye(Ce){var ze;switch(Ie){case Xe:case ft:case Te:ze=Te;break;default:ze=Ie;break}var st=Ie;Ie=ze;try{return Ce()}finally{Ie=st}}function at(Ce){var ze=Ie;return function(){var st=Ie;Ie=ze;try{return Ce.apply(this,arguments)}finally{Ie=st}}}function Ve(Ce,ze,st){var Lt=t.unstable_now(),nt;if(typeof st=="object"&&st!==null){var ln=st.delay;typeof ln=="number"&&ln>0?nt=Lt+ln:nt=Lt}else nt=Lt;var Jt;switch(Ce){case Xe:Jt=qe;break;case ft:Jt=ct;break;case ue:Jt=Xt;break;case it:Jt=rn;break;case Te:default:Jt=dt;break}var Bn=nt+Jt,sn={id:Ut++,callback:ze,priorityLevel:Ce,startTime:nt,expirationTime:Bn,sortIndex:-1};return nt>Lt?(sn.sortIndex=nt,re(ht,sn),me(wt)===null&&sn===me(ht)&&(St?c():St=!0,o(zn,nt-Lt))):(sn.sortIndex=Bn,re(wt,sn),!Qe&&!We&&(Qe=!0,r(j))),sn}function gn(){}function zi(){!Qe&&!We&&(Qe=!0,r(j))}function be(){return me(wt)}function ot(Ce){Ce.callback=null}function ci(){return Ie}var Dt=h,tt=null;t.unstable_IdlePriority=ue,t.unstable_ImmediatePriority=Xe,t.unstable_LowPriority=it,t.unstable_NormalPriority=Te,t.unstable_Profiling=tt,t.unstable_UserBlockingPriority=ft,t.unstable_cancelCallback=ot,t.unstable_continueExecution=zi,t.unstable_getCurrentPriorityLevel=ci,t.unstable_getFirstCallbackNode=be,t.unstable_next=ye,t.unstable_pauseExecution=gn,t.unstable_requestPaint=Dt,t.unstable_runWithPriority=X,t.unstable_scheduleCallback=Ve,t.unstable_wrapCallback=at}()}(Zh)),Zh}var Jh={};/** @license React v0.20.2
39
39
  * scheduler.production.min.js
40
40
  *
41
41
  * Copyright (c) Facebook, Inc. and its affiliates.
42
42
  *
43
43
  * This source code is licensed under the MIT license found in the
44
44
  * LICENSE file in the root directory of this source tree.
45
- */var xg;function $x(){return xg||(xg=1,function(t){var e,n,r,o;if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var h=Date,v=h.now();t.unstable_now=function(){return h.now()-v}}if(typeof window>"u"||typeof MessageChannel!="function"){var g=null,x=null,m=function(){if(g!==null)try{var pe=t.unstable_now();g(!0,pe),g=null}catch(je){throw setTimeout(m,0),je}};e=function(pe){g!==null?setTimeout(e,0,pe):(g=pe,setTimeout(m,0))},n=function(pe,je){x=setTimeout(pe,je)},r=function(){clearTimeout(x)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var w=window.setTimeout,A=window.clearTimeout;if(typeof console<"u"){var P=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof P!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var M=!1,_=null,L=-1,k=5,O=0;t.unstable_shouldYield=function(){return t.unstable_now()>=O},o=function(){},t.unstable_forceFrameRate=function(pe){0>pe||125<pe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<pe?Math.floor(1e3/pe):5};var I=new MessageChannel,q=I.port2;I.port1.onmessage=function(){if(_!==null){var pe=t.unstable_now();O=pe+k;try{_(!0,pe)?q.postMessage(null):(M=!1,_=null)}catch(je){throw q.postMessage(null),je}}else M=!1},e=function(pe){_=pe,M||(M=!0,q.postMessage(null))},n=function(pe,je){L=w(function(){pe(t.unstable_now())},je)},r=function(){A(L),L=-1}}function te(pe,je){var He=pe.length;pe.push(je);e:for(;;){var ut=He-1>>>1,pt=pe[ut];if(pt!==void 0&&0<re(pt,je))pe[ut]=je,pe[He]=pt,He=ut;else break e}}function H(pe){return pe=pe[0],pe===void 0?null:pe}function J(pe){var je=pe[0];if(je!==void 0){var He=pe.pop();if(He!==je){pe[0]=He;e:for(var ut=0,pt=pe.length;ut<pt;){var vn=2*(ut+1)-1,Kt=pe[vn],xt=vn+1,ct=pe[xt];if(Kt!==void 0&&0>re(Kt,He))ct!==void 0&&0>re(ct,Kt)?(pe[ut]=ct,pe[xt]=He,ut=xt):(pe[ut]=Kt,pe[vn]=He,ut=vn);else if(ct!==void 0&&0>re(ct,He))pe[ut]=ct,pe[xt]=He,ut=xt;else break e}}return je}return null}function re(pe,je){var He=pe.sortIndex-je.sortIndex;return He!==0?He:pe.id-je.id}var $=[],se=[],ge=1,Ce=null,me=3,Ie=!1,_e=!1,Ye=!1;function gt(pe){for(var je=H(se);je!==null;){if(je.callback===null)J(se);else if(je.startTime<=pe)J(se),je.sortIndex=je.expirationTime,te($,je);else break;je=H(se)}}function Z(pe){if(Ye=!1,gt(pe),!_e)if(H($)!==null)_e=!0,e(Ue);else{var je=H(se);je!==null&&n(Z,je.startTime-pe)}}function Ue(pe,je){_e=!1,Ye&&(Ye=!1,r()),Ie=!0;var He=me;try{for(gt(je),Ce=H($);Ce!==null&&(!(Ce.expirationTime>je)||pe&&!t.unstable_shouldYield());){var ut=Ce.callback;if(typeof ut=="function"){Ce.callback=null,me=Ce.priorityLevel;var pt=ut(Ce.expirationTime<=je);je=t.unstable_now(),typeof pt=="function"?Ce.callback=pt:Ce===H($)&&J($),gt(je)}else J($);Ce=H($)}if(Ce!==null)var vn=!0;else{var Kt=H(se);Kt!==null&&n(Z,Kt.startTime-je),vn=!1}return vn}finally{Ce=null,me=He,Ie=!1}}var dt=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(pe){pe.callback=null},t.unstable_continueExecution=function(){_e||Ie||(_e=!0,e(Ue))},t.unstable_getCurrentPriorityLevel=function(){return me},t.unstable_getFirstCallbackNode=function(){return H($)},t.unstable_next=function(pe){switch(me){case 1:case 2:case 3:var je=3;break;default:je=me}var He=me;me=je;try{return pe()}finally{me=He}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=dt,t.unstable_runWithPriority=function(pe,je){switch(pe){case 1:case 2:case 3:case 4:case 5:break;default:pe=3}var He=me;me=pe;try{return je()}finally{me=He}},t.unstable_scheduleCallback=function(pe,je,He){var ut=t.unstable_now();switch(typeof He=="object"&&He!==null?(He=He.delay,He=typeof He=="number"&&0<He?ut+He:ut):He=ut,pe){case 1:var pt=-1;break;case 2:pt=250;break;case 5:pt=1073741823;break;case 4:pt=1e4;break;default:pt=5e3}return pt=He+pt,pe={id:ge++,callback:je,priorityLevel:pe,startTime:He,expirationTime:pt,sortIndex:-1},He>ut?(pe.sortIndex=He,te(se,pe),H($)===null&&pe===H(se)&&(Ye?r():Ye=!0,n(Z,He-ut))):(pe.sortIndex=pt,te($,pe),_e||Ie||(_e=!0,e(Ue))),pe},t.unstable_wrapCallback=function(pe){var je=me;return function(){var He=me;me=je;try{return pe.apply(this,arguments)}finally{me=He}}}}(Jh)),Jh}var Eg;function wg(){return Eg||(Eg=1,process.env.NODE_ENV==="production"?df.exports=$x():df.exports=Wx()),df.exports}var hf={exports:{}},ep={};/** @license React v0.20.2
45
+ */var xg;function $x(){return xg||(xg=1,function(t){var e,n,r,o;if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var h=Date,v=h.now();t.unstable_now=function(){return h.now()-v}}if(typeof window>"u"||typeof MessageChannel!="function"){var g=null,x=null,m=function(){if(g!==null)try{var se=t.unstable_now();g(!0,se),g=null}catch(je){throw setTimeout(m,0),je}};e=function(se){g!==null?setTimeout(e,0,se):(g=se,setTimeout(m,0))},n=function(se,je){x=setTimeout(se,je)},r=function(){clearTimeout(x)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var w=window.setTimeout,A=window.clearTimeout;if(typeof console<"u"){var k=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof k!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var M=!1,_=null,L=-1,P=5,O=0;t.unstable_shouldYield=function(){return t.unstable_now()>=O},o=function(){},t.unstable_forceFrameRate=function(se){0>se||125<se?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<se?Math.floor(1e3/se):5};var H=new MessageChannel,q=H.port2;H.port1.onmessage=function(){if(_!==null){var se=t.unstable_now();O=se+P;try{_(!0,se)?q.postMessage(null):(M=!1,_=null)}catch(je){throw q.postMessage(null),je}}else M=!1},e=function(se){_=se,M||(M=!0,q.postMessage(null))},n=function(se,je){L=w(function(){se(t.unstable_now())},je)},r=function(){A(L),L=-1}}function Q(se,je){var qe=se.length;se.push(je);e:for(;;){var ct=qe-1>>>1,dt=se[ct];if(dt!==void 0&&0<ie(dt,je))se[ct]=je,se[qe]=dt,qe=ct;else break e}}function B(se){return se=se[0],se===void 0?null:se}function J(se){var je=se[0];if(je!==void 0){var qe=se.pop();if(qe!==je){se[0]=qe;e:for(var ct=0,dt=se.length;ct<dt;){var rn=2*(ct+1)-1,Xt=se[rn],wt=rn+1,ht=se[wt];if(Xt!==void 0&&0>ie(Xt,qe))ht!==void 0&&0>ie(ht,Xt)?(se[ct]=ht,se[wt]=qe,ct=wt):(se[ct]=Xt,se[rn]=qe,ct=rn);else if(ht!==void 0&&0>ie(ht,qe))se[ct]=ht,se[wt]=qe,ct=wt;else break e}}return je}return null}function ie(se,je){var qe=se.sortIndex-je.sortIndex;return qe!==0?qe:se.id-je.id}var $=[],re=[],me=1,Re=null,Se=3,Fe=!1,ke=!1,Xe=!1;function ft(se){for(var je=B(re);je!==null;){if(je.callback===null)J(re);else if(je.startTime<=se)J(re),je.sortIndex=je.expirationTime,Q($,je);else break;je=B(re)}}function Te(se){if(Xe=!1,ft(se),!ke)if(B($)!==null)ke=!0,e(it);else{var je=B(re);je!==null&&n(Te,je.startTime-se)}}function it(se,je){ke=!1,Xe&&(Xe=!1,r()),Fe=!0;var qe=Se;try{for(ft(je),Re=B($);Re!==null&&(!(Re.expirationTime>je)||se&&!t.unstable_shouldYield());){var ct=Re.callback;if(typeof ct=="function"){Re.callback=null,Se=Re.priorityLevel;var dt=ct(Re.expirationTime<=je);je=t.unstable_now(),typeof dt=="function"?Re.callback=dt:Re===B($)&&J($),ft(je)}else J($);Re=B($)}if(Re!==null)var rn=!0;else{var Xt=B(re);Xt!==null&&n(Te,Xt.startTime-je),rn=!1}return rn}finally{Re=null,Se=qe,Fe=!1}}var ue=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(se){se.callback=null},t.unstable_continueExecution=function(){ke||Fe||(ke=!0,e(it))},t.unstable_getCurrentPriorityLevel=function(){return Se},t.unstable_getFirstCallbackNode=function(){return B($)},t.unstable_next=function(se){switch(Se){case 1:case 2:case 3:var je=3;break;default:je=Se}var qe=Se;Se=je;try{return se()}finally{Se=qe}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=ue,t.unstable_runWithPriority=function(se,je){switch(se){case 1:case 2:case 3:case 4:case 5:break;default:se=3}var qe=Se;Se=se;try{return je()}finally{Se=qe}},t.unstable_scheduleCallback=function(se,je,qe){var ct=t.unstable_now();switch(typeof qe=="object"&&qe!==null?(qe=qe.delay,qe=typeof qe=="number"&&0<qe?ct+qe:ct):qe=ct,se){case 1:var dt=-1;break;case 2:dt=250;break;case 5:dt=1073741823;break;case 4:dt=1e4;break;default:dt=5e3}return dt=qe+dt,se={id:me++,callback:je,priorityLevel:se,startTime:qe,expirationTime:dt,sortIndex:-1},qe>ct?(se.sortIndex=qe,Q(re,se),B($)===null&&se===B(re)&&(Xe?r():Xe=!0,n(Te,qe-ct))):(se.sortIndex=dt,Q($,se),ke||Fe||(ke=!0,e(it))),se},t.unstable_wrapCallback=function(se){var je=Se;return function(){var qe=Se;Se=je;try{return se.apply(this,arguments)}finally{Se=qe}}}}(Jh)),Jh}var Eg;function wg(){return Eg||(Eg=1,process.env.NODE_ENV==="production"?df.exports=$x():df.exports=Vx()),df.exports}var hf={exports:{}},ep={};/** @license React v0.20.2
46
46
  * scheduler-tracing.development.js
47
47
  *
48
48
  * Copyright (c) Facebook, Inc. and its affiliates.
49
49
  *
50
50
  * This source code is licensed under the MIT license found in the
51
51
  * LICENSE file in the root directory of this source tree.
52
- */var Tg;function qx(){return Tg||(Tg=1,function(t){process.env.NODE_ENV!=="production"&&function(){var e=0,n=0,r=0;t.__interactionsRef=null,t.__subscriberRef=null,t.__interactionsRef={current:new Set},t.__subscriberRef={current:null};function o(O){var I=t.__interactionsRef.current;t.__interactionsRef.current=new Set;try{return O()}finally{t.__interactionsRef.current=I}}function c(){return t.__interactionsRef.current}function h(){return++r}function v(O,I,q){var te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,H={__count:1,id:n++,name:O,timestamp:I},J=t.__interactionsRef.current,re=new Set(J);re.add(H),t.__interactionsRef.current=re;var $=t.__subscriberRef.current,se;try{$!==null&&$.onInteractionTraced(H)}finally{try{$!==null&&$.onWorkStarted(re,te)}finally{try{se=q()}finally{t.__interactionsRef.current=J;try{$!==null&&$.onWorkStopped(re,te)}finally{H.__count--,$!==null&&H.__count===0&&$.onInteractionScheduledWorkCompleted(H)}}}}return se}function g(O){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,q=t.__interactionsRef.current,te=t.__subscriberRef.current;te!==null&&te.onWorkScheduled(q,I),q.forEach(function(re){re.__count++});var H=!1;function J(){var re=t.__interactionsRef.current;t.__interactionsRef.current=q,te=t.__subscriberRef.current;try{var $;try{te!==null&&te.onWorkStarted(q,I)}finally{try{$=O.apply(void 0,arguments)}finally{t.__interactionsRef.current=re,te!==null&&te.onWorkStopped(q,I)}}return $}finally{H||(H=!0,q.forEach(function(se){se.__count--,te!==null&&se.__count===0&&te.onInteractionScheduledWorkCompleted(se)}))}}return J.cancel=function(){te=t.__subscriberRef.current;try{te!==null&&te.onWorkCanceled(q,I)}finally{q.forEach(function($){$.__count--,te&&$.__count===0&&te.onInteractionScheduledWorkCompleted($)})}},J}var x=null;x=new Set;function m(O){x.add(O),x.size===1&&(t.__subscriberRef.current={onInteractionScheduledWorkCompleted:P,onInteractionTraced:A,onWorkCanceled:k,onWorkScheduled:M,onWorkStarted:_,onWorkStopped:L})}function w(O){x.delete(O),x.size===0&&(t.__subscriberRef.current=null)}function A(O){var I=!1,q=null;if(x.forEach(function(te){try{te.onInteractionTraced(O)}catch(H){I||(I=!0,q=H)}}),I)throw q}function P(O){var I=!1,q=null;if(x.forEach(function(te){try{te.onInteractionScheduledWorkCompleted(O)}catch(H){I||(I=!0,q=H)}}),I)throw q}function M(O,I){var q=!1,te=null;if(x.forEach(function(H){try{H.onWorkScheduled(O,I)}catch(J){q||(q=!0,te=J)}}),q)throw te}function _(O,I){var q=!1,te=null;if(x.forEach(function(H){try{H.onWorkStarted(O,I)}catch(J){q||(q=!0,te=J)}}),q)throw te}function L(O,I){var q=!1,te=null;if(x.forEach(function(H){try{H.onWorkStopped(O,I)}catch(J){q||(q=!0,te=J)}}),q)throw te}function k(O,I){var q=!1,te=null;if(x.forEach(function(H){try{H.onWorkCanceled(O,I)}catch(J){q||(q=!0,te=J)}}),q)throw te}t.unstable_clear=o,t.unstable_getCurrent=c,t.unstable_getThreadID=h,t.unstable_subscribe=m,t.unstable_trace=v,t.unstable_unsubscribe=w,t.unstable_wrap=g}()}(ep)),ep}var br={};/** @license React v0.20.2
52
+ */var Tg;function qx(){return Tg||(Tg=1,function(t){process.env.NODE_ENV!=="production"&&function(){var e=0,n=0,r=0;t.__interactionsRef=null,t.__subscriberRef=null,t.__interactionsRef={current:new Set},t.__subscriberRef={current:null};function o(O){var H=t.__interactionsRef.current;t.__interactionsRef.current=new Set;try{return O()}finally{t.__interactionsRef.current=H}}function c(){return t.__interactionsRef.current}function h(){return++r}function v(O,H,q){var Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,B={__count:1,id:n++,name:O,timestamp:H},J=t.__interactionsRef.current,ie=new Set(J);ie.add(B),t.__interactionsRef.current=ie;var $=t.__subscriberRef.current,re;try{$!==null&&$.onInteractionTraced(B)}finally{try{$!==null&&$.onWorkStarted(ie,Q)}finally{try{re=q()}finally{t.__interactionsRef.current=J;try{$!==null&&$.onWorkStopped(ie,Q)}finally{B.__count--,$!==null&&B.__count===0&&$.onInteractionScheduledWorkCompleted(B)}}}}return re}function g(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,q=t.__interactionsRef.current,Q=t.__subscriberRef.current;Q!==null&&Q.onWorkScheduled(q,H),q.forEach(function(ie){ie.__count++});var B=!1;function J(){var ie=t.__interactionsRef.current;t.__interactionsRef.current=q,Q=t.__subscriberRef.current;try{var $;try{Q!==null&&Q.onWorkStarted(q,H)}finally{try{$=O.apply(void 0,arguments)}finally{t.__interactionsRef.current=ie,Q!==null&&Q.onWorkStopped(q,H)}}return $}finally{B||(B=!0,q.forEach(function(re){re.__count--,Q!==null&&re.__count===0&&Q.onInteractionScheduledWorkCompleted(re)}))}}return J.cancel=function(){Q=t.__subscriberRef.current;try{Q!==null&&Q.onWorkCanceled(q,H)}finally{q.forEach(function($){$.__count--,Q&&$.__count===0&&Q.onInteractionScheduledWorkCompleted($)})}},J}var x=null;x=new Set;function m(O){x.add(O),x.size===1&&(t.__subscriberRef.current={onInteractionScheduledWorkCompleted:k,onInteractionTraced:A,onWorkCanceled:P,onWorkScheduled:M,onWorkStarted:_,onWorkStopped:L})}function w(O){x.delete(O),x.size===0&&(t.__subscriberRef.current=null)}function A(O){var H=!1,q=null;if(x.forEach(function(Q){try{Q.onInteractionTraced(O)}catch(B){H||(H=!0,q=B)}}),H)throw q}function k(O){var H=!1,q=null;if(x.forEach(function(Q){try{Q.onInteractionScheduledWorkCompleted(O)}catch(B){H||(H=!0,q=B)}}),H)throw q}function M(O,H){var q=!1,Q=null;if(x.forEach(function(B){try{B.onWorkScheduled(O,H)}catch(J){q||(q=!0,Q=J)}}),q)throw Q}function _(O,H){var q=!1,Q=null;if(x.forEach(function(B){try{B.onWorkStarted(O,H)}catch(J){q||(q=!0,Q=J)}}),q)throw Q}function L(O,H){var q=!1,Q=null;if(x.forEach(function(B){try{B.onWorkStopped(O,H)}catch(J){q||(q=!0,Q=J)}}),q)throw Q}function P(O,H){var q=!1,Q=null;if(x.forEach(function(B){try{B.onWorkCanceled(O,H)}catch(J){q||(q=!0,Q=J)}}),q)throw Q}t.unstable_clear=o,t.unstable_getCurrent=c,t.unstable_getThreadID=h,t.unstable_subscribe=m,t.unstable_trace=v,t.unstable_unsubscribe=w,t.unstable_wrap=g}()}(ep)),ep}var br={};/** @license React v0.20.2
53
53
  * scheduler-tracing.production.min.js
54
54
  *
55
55
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -63,13 +63,13 @@ object-assign
63
63
  *
64
64
  * This source code is licensed under the MIT license found in the
65
65
  * LICENSE file in the root directory of this source tree.
66
- */ff.exports;var Ag;function Gx(){return Ag||(Ag=1,function(t){process.env.NODE_ENV!=="production"&&(t.exports=function(n){var r={},o=C,c=Sg(),h=wg(),v=Qx(),g=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(i){{for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];w("warn",i,u)}}function m(i){{for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];w("error",i,u)}}function w(i,s,u){{var d=g.ReactDebugCurrentFrame,p=d.getStackAddendum();p!==""&&(s+="%s",u=u.concat([p]));var S=u.map(function(E){return""+E});S.unshift("Warning: "+s),Function.prototype.apply.call(console[i],console,S)}}var A=0,P=1,M=2,_=3,L=4,k=5,O=6,I=7,q=8,te=9,H=10,J=11,re=12,$=13,se=14,ge=15,Ce=16,me=17,Ie=18,_e=19,Ye=20,gt=21,Z=22,Ue=23,dt=24;function pe(i){return i._reactInternals}function je(i,s){i._reactInternals=s}var He=60103,ut=60106,pt=60107,vn=60108,Kt=60114,xt=60109,ct=60110,Ge=60112,nt=60113,Ze=60120,ht=60115,ft=60116,mn=60121,Qt=60119,Gi=60129,j=60130,z=60131;if(typeof Symbol=="function"&&Symbol.for){var G=Symbol.for;He=G("react.element"),ut=G("react.portal"),pt=G("react.fragment"),vn=G("react.strict_mode"),Kt=G("react.profiler"),xt=G("react.provider"),ct=G("react.context"),Ge=G("react.forward_ref"),nt=G("react.suspense"),Ze=G("react.suspense_list"),ht=G("react.memo"),ft=G("react.lazy"),mn=G("react.block"),G("react.server.block"),G("react.fundamental"),Qt=G("react.scope"),G("react.opaque.id"),Gi=G("react.debug_trace_mode"),j=G("react.offscreen"),z=G("react.legacy_hidden")}var Se=typeof Symbol=="function"&&Symbol.iterator,st="@@iterator";function Ve(i){if(i===null||typeof i!="object")return null;var s=Se&&i[Se]||i[st];return typeof s=="function"?s:null}function gn(i,s,u){var d=s.displayName||s.name||"";return i.displayName||(d!==""?u+"("+d+")":u)}function ki(i){return i.displayName||"Context"}function be(i){if(i==null)return null;if(typeof i.tag=="number"&&m("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case pt:return"Fragment";case ut:return"Portal";case Kt:return"Profiler";case vn:return"StrictMode";case nt:return"Suspense";case Ze:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ct:var s=i;return ki(s)+".Consumer";case xt:var u=i;return ki(u._context)+".Provider";case Ge:return gn(i,i.render,"ForwardRef");case ht:return be(i.type);case mn:return be(i._render);case ft:{var d=i,p=d._payload,S=d._init;try{return be(S(p))}catch{return null}}}return null}var at=0,ui=1,Dt=2,et=4,Te=6,Pe=8,rt=16,Lt=32,tt=64,an=128,Zt=256,Fn=512,nn=8192,bi=1024,qr=1028,Ha=932,Va=2047,Yr=2048,xi=4096,ia=16384,Wa=!0,ws=!1,Xi=!1,vl=!1,ml=g.ReactCurrentOwner;function Qr(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{var d=s;do s=d,(s.flags&(Dt|bi))!==at&&(u=s.return),d=s.return;while(d)}return s.tag===_?u:null}function Ju(i){return Qr(i)===i}function ec(i){{var s=ml.current;if(s!==null&&s.tag===P){var u=s,d=u.stateNode;d._warnedAboutRefsInRender||m("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",be(u.type)||"A component"),d._warnedAboutRefsInRender=!0}}var p=pe(i);return p?Qr(p)===p:!1}function gl(i){if(Qr(i)!==i)throw Error("Unable to find node on an unmounted component.")}function yl(i){var s=i.alternate;if(!s){var u=Qr(i);if(u===null)throw Error("Unable to find node on an unmounted component.");return u!==i?null:i}for(var d=i,p=s;;){var S=d.return;if(S===null)break;var E=S.alternate;if(E===null){var R=S.return;if(R!==null){d=p=R;continue}break}if(S.child===E.child){for(var D=S.child;D;){if(D===d)return gl(S),i;if(D===p)return gl(S),s;D=D.sibling}throw Error("Unable to find node on an unmounted component.")}if(d.return!==p.return)d=S,p=E;else{for(var F=!1,W=S.child;W;){if(W===d){F=!0,d=S,p=E;break}if(W===p){F=!0,p=S,d=E;break}W=W.sibling}if(!F){for(W=E.child;W;){if(W===d){F=!0,d=E,p=S;break}if(W===p){F=!0,p=E,d=S;break}W=W.sibling}if(!F)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(d.alternate!==p)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(d.tag!==_)throw Error("Unable to find node on an unmounted component.");return d.stateNode.current===d?i:s}function U(i){var s=yl(i);if(!s)return null;for(var u=s;;){if(u.tag===k||u.tag===O)return u;if(u.child){u.child.return=u,u=u.child;continue}if(u===s)return null;for(;!u.sibling;){if(!u.return||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function de(i){var s=yl(i);if(!s)return null;for(var u=s;;){if(u.tag===k||u.tag===O||ws)return u;if(u.child&&u.tag!==L){u.child.return=u,u=u.child;continue}if(u===s)return null;for(;!u.sibling;){if(!u.return||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function we(i,s){for(var u=s,d=i.alternate;u!==null;){if(u===i||u===d)return!0;u=u.return}return!1}var Qe=n.getPublicInstance,Et=n.getRootHostContext,At=n.getChildHostContext,vt=n.prepareForCommit,ot=n.resetAfterCommit,yn=n.createInstance,Ut=n.appendInitialChild,Ht=n.finalizeInitialChildren,zn=n.prepareUpdate,Zn=n.shouldSetTextContent,zi=n.createTextInstance,mt=n.scheduleTimeout,on=n.cancelTimeout,ur=n.noTimeout;n.now;var ln=n.isPrimaryRenderer,Bn=n.warnsIfNotActing,Nn=n.supportsMutation,cr=n.supportsPersistence,Jt=n.supportsHydration;n.getFundamentalComponentInstance,n.mountFundamentalComponent,n.shouldUpdateFundamentalComponent;var Sl=n.getInstanceFromNode;n.isOpaqueHydratingObject;var Sd=n.makeOpaqueHydratingObject;n.makeClientId;var bd=n.makeClientIdInDEV,$a=n.beforeActiveInstanceBlur,xd=n.afterActiveInstanceBlur,tc=n.preparePortalMount;n.preparePortalMount,n.getInstanceFromScope;var Ni=n.supportsTestSelectors,ov=n.findFiberRoot,bl=n.getBoundingRect,Vt=n.getTextContent,Ki=n.isHiddenSubtree,lv=n.matchAccessibilityRole,uv=n.setFocusIfFocusable,qa=n.setupIntersectionObserver,Ed=n.appendChild,xl=n.appendChildToContainer,ra=n.commitTextUpdate,nc=n.commitMount,El=n.commitUpdate,Gr=n.insertBefore,cv=n.insertInContainerBefore,fv=n.removeChild,dv=n.removeChildFromContainer,wd=n.resetTextContent,ic=n.hideInstance,rc=n.hideTextInstance,hv=n.unhideInstance,Td=n.unhideTextInstance;n.updateFundamentalComponent,n.unmountFundamentalComponent;var Ya=n.clearContainer,pv=n.cloneInstance,Qa=n.createContainerChildSet,sc=n.appendChildToContainerChildSet,Cd=n.finalizeContainerChildren,ac=n.replaceContainerChildren,oc=n.cloneHiddenInstance,wl=n.cloneHiddenTextInstance;n.cloneInstance;var vv=n.canHydrateInstance,Tr=n.canHydrateTextInstance;n.canHydrateSuspenseInstance;var Tl=n.isSuspenseInstancePending,lc=n.isSuspenseInstanceFallback;n.registerSuspenseInstanceRetry;var Cl=n.getNextHydratableSibling,On=n.getFirstHydratableChild,sa=n.hydrateInstance,Rd=n.hydrateTextInstance;n.hydrateSuspenseInstance;var Cr=n.getNextHydratableInstanceAfterSuspenseInstance,aa=n.commitHydratedContainer,_i=n.commitHydratedSuspenseInstance;n.clearSuspenseBoundary,n.clearSuspenseBoundaryFromContainer;var Ad=n.didNotMatchHydratedContainerTextInstance,mv=n.didNotMatchHydratedTextInstance,gv=n.didNotHydrateContainerInstance,Ui=n.didNotHydrateInstance,yv=n.didNotFindHydratableContainerInstance,Rl=n.didNotFindHydratableContainerTextInstance,Sv=n.didNotFindHydratableContainerSuspenseInstance,Zi=n.didNotFindHydratableInstance,Al=n.didNotFindHydratableTextInstance,Ml=n.didNotFindHydratableSuspenseInstance,fr=0,Ga,Ol,uc,Dl,cc,Ts,Ei;function Rr(){}Rr.__reactDisabledLog=!0;function ji(){{if(fr===0){Ga=console.log,Ol=console.info,uc=console.warn,Dl=console.error,cc=console.group,Ts=console.groupCollapsed,Ei=console.groupEnd;var i={configurable:!0,enumerable:!0,value:Rr,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}fr++}}function Ji(){{if(fr--,fr===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:c({},i,{value:Ga}),info:c({},i,{value:Ol}),warn:c({},i,{value:uc}),error:c({},i,{value:Dl}),group:c({},i,{value:cc}),groupCollapsed:c({},i,{value:Ts}),groupEnd:c({},i,{value:Ei})})}fr<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var dr=g.ReactCurrentDispatcher,hr;function Ar(i,s,u){{if(hr===void 0)try{throw Error()}catch(p){var d=p.stack.trim().match(/\n( *(at )?)/);hr=d&&d[1]||""}return`
67
- `+hr+i}}var Cs=!1,Xa;{var Md=typeof WeakMap=="function"?WeakMap:Map;Xa=new Md}function oa(i,s){if(!i||Cs)return"";{var u=Xa.get(i);if(u!==void 0)return u}var d;Cs=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var S;S=dr.current,dr.current=null,ji();try{if(s){var E=function(){throw Error()};if(Object.defineProperty(E.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(E,[])}catch(ye){d=ye}Reflect.construct(i,[],E)}else{try{E.call()}catch(ye){d=ye}i.call(E.prototype)}}else{try{throw Error()}catch(ye){d=ye}i()}}catch(ye){if(ye&&d&&typeof ye.stack=="string"){for(var R=ye.stack.split(`
66
+ */ff.exports;var Ag;function Gx(){return Ag||(Ag=1,function(t){process.env.NODE_ENV!=="production"&&(t.exports=function(n){var r={},o=C,c=Sg(),h=wg(),v=Qx(),g=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(i){{for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];w("warn",i,u)}}function m(i){{for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];w("error",i,u)}}function w(i,s,u){{var d=g.ReactDebugCurrentFrame,p=d.getStackAddendum();p!==""&&(s+="%s",u=u.concat([p]));var S=u.map(function(E){return""+E});S.unshift("Warning: "+s),Function.prototype.apply.call(console[i],console,S)}}var A=0,k=1,M=2,_=3,L=4,P=5,O=6,H=7,q=8,Q=9,B=10,J=11,ie=12,$=13,re=14,me=15,Re=16,Se=17,Fe=18,ke=19,Xe=20,ft=21,Te=22,it=23,ue=24;function se(i){return i._reactInternals}function je(i,s){i._reactInternals=s}var qe=60103,ct=60106,dt=60107,rn=60108,Xt=60114,wt=60109,ht=60110,Ut=60112,jt=60113,Ie=60120,We=60115,Qe=60116,St=60121,bt=60119,zn=60129,j=60130,z=60131;if(typeof Symbol=="function"&&Symbol.for){var X=Symbol.for;qe=X("react.element"),ct=X("react.portal"),dt=X("react.fragment"),rn=X("react.strict_mode"),Xt=X("react.profiler"),wt=X("react.provider"),ht=X("react.context"),Ut=X("react.forward_ref"),jt=X("react.suspense"),Ie=X("react.suspense_list"),We=X("react.memo"),Qe=X("react.lazy"),St=X("react.block"),X("react.server.block"),X("react.fundamental"),bt=X("react.scope"),X("react.opaque.id"),zn=X("react.debug_trace_mode"),j=X("react.offscreen"),z=X("react.legacy_hidden")}var ye=typeof Symbol=="function"&&Symbol.iterator,at="@@iterator";function Ve(i){if(i===null||typeof i!="object")return null;var s=ye&&i[ye]||i[at];return typeof s=="function"?s:null}function gn(i,s,u){var d=s.displayName||s.name||"";return i.displayName||(d!==""?u+"("+d+")":u)}function zi(i){return i.displayName||"Context"}function be(i){if(i==null)return null;if(typeof i.tag=="number"&&m("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case dt:return"Fragment";case ct:return"Portal";case Xt:return"Profiler";case rn:return"StrictMode";case jt:return"Suspense";case Ie:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ht:var s=i;return zi(s)+".Consumer";case wt:var u=i;return zi(u._context)+".Provider";case Ut:return gn(i,i.render,"ForwardRef");case We:return be(i.type);case St:return be(i._render);case Qe:{var d=i,p=d._payload,S=d._init;try{return be(S(p))}catch{return null}}}return null}var ot=0,ci=1,Dt=2,tt=4,Ce=6,ze=8,st=16,Lt=32,nt=64,ln=128,Jt=256,Bn=512,sn=8192,xi=1024,qr=1028,Ha=932,Wa=2047,Yr=2048,Ei=4096,ia=16384,Va=!0,ws=!1,Xi=!1,vl=!1,ml=g.ReactCurrentOwner;function Qr(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{var d=s;do s=d,(s.flags&(Dt|xi))!==ot&&(u=s.return),d=s.return;while(d)}return s.tag===_?u:null}function Ju(i){return Qr(i)===i}function ec(i){{var s=ml.current;if(s!==null&&s.tag===k){var u=s,d=u.stateNode;d._warnedAboutRefsInRender||m("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",be(u.type)||"A component"),d._warnedAboutRefsInRender=!0}}var p=se(i);return p?Qr(p)===p:!1}function gl(i){if(Qr(i)!==i)throw Error("Unable to find node on an unmounted component.")}function yl(i){var s=i.alternate;if(!s){var u=Qr(i);if(u===null)throw Error("Unable to find node on an unmounted component.");return u!==i?null:i}for(var d=i,p=s;;){var S=d.return;if(S===null)break;var E=S.alternate;if(E===null){var R=S.return;if(R!==null){d=p=R;continue}break}if(S.child===E.child){for(var D=S.child;D;){if(D===d)return gl(S),i;if(D===p)return gl(S),s;D=D.sibling}throw Error("Unable to find node on an unmounted component.")}if(d.return!==p.return)d=S,p=E;else{for(var I=!1,V=S.child;V;){if(V===d){I=!0,d=S,p=E;break}if(V===p){I=!0,p=S,d=E;break}V=V.sibling}if(!I){for(V=E.child;V;){if(V===d){I=!0,d=E,p=S;break}if(V===p){I=!0,p=E,d=S;break}V=V.sibling}if(!I)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(d.alternate!==p)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(d.tag!==_)throw Error("Unable to find node on an unmounted component.");return d.stateNode.current===d?i:s}function U(i){var s=yl(i);if(!s)return null;for(var u=s;;){if(u.tag===P||u.tag===O)return u;if(u.child){u.child.return=u,u=u.child;continue}if(u===s)return null;for(;!u.sibling;){if(!u.return||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function he(i){var s=yl(i);if(!s)return null;for(var u=s;;){if(u.tag===P||u.tag===O||ws)return u;if(u.child&&u.tag!==L){u.child.return=u,u=u.child;continue}if(u===s)return null;for(;!u.sibling;){if(!u.return||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function we(i,s){for(var u=s,d=i.alternate;u!==null;){if(u===i||u===d)return!0;u=u.return}return!1}var Ke=n.getPublicInstance,xt=n.getRootHostContext,At=n.getChildHostContext,pt=n.prepareForCommit,lt=n.resetAfterCommit,yn=n.createInstance,It=n.appendInitialChild,Vt=n.finalizeInitialChildren,Nn=n.prepareUpdate,Jn=n.shouldSetTextContent,Ni=n.createTextInstance,vt=n.scheduleTimeout,un=n.cancelTimeout,ur=n.noTimeout;n.now;var cn=n.isPrimaryRenderer,Hn=n.warnsIfNotActing,_n=n.supportsMutation,cr=n.supportsPersistence,en=n.supportsHydration;n.getFundamentalComponentInstance,n.mountFundamentalComponent,n.shouldUpdateFundamentalComponent;var Sl=n.getInstanceFromNode;n.isOpaqueHydratingObject;var Sd=n.makeOpaqueHydratingObject;n.makeClientId;var bd=n.makeClientIdInDEV,$a=n.beforeActiveInstanceBlur,xd=n.afterActiveInstanceBlur,tc=n.preparePortalMount;n.preparePortalMount,n.getInstanceFromScope;var _i=n.supportsTestSelectors,ov=n.findFiberRoot,bl=n.getBoundingRect,$t=n.getTextContent,Ki=n.isHiddenSubtree,lv=n.matchAccessibilityRole,uv=n.setFocusIfFocusable,qa=n.setupIntersectionObserver,Ed=n.appendChild,xl=n.appendChildToContainer,ra=n.commitTextUpdate,nc=n.commitMount,El=n.commitUpdate,Gr=n.insertBefore,cv=n.insertInContainerBefore,fv=n.removeChild,dv=n.removeChildFromContainer,wd=n.resetTextContent,ic=n.hideInstance,rc=n.hideTextInstance,hv=n.unhideInstance,Td=n.unhideTextInstance;n.updateFundamentalComponent,n.unmountFundamentalComponent;var Ya=n.clearContainer,pv=n.cloneInstance,Qa=n.createContainerChildSet,sc=n.appendChildToContainerChildSet,Cd=n.finalizeContainerChildren,ac=n.replaceContainerChildren,oc=n.cloneHiddenInstance,wl=n.cloneHiddenTextInstance;n.cloneInstance;var vv=n.canHydrateInstance,Tr=n.canHydrateTextInstance;n.canHydrateSuspenseInstance;var Tl=n.isSuspenseInstancePending,lc=n.isSuspenseInstanceFallback;n.registerSuspenseInstanceRetry;var Cl=n.getNextHydratableSibling,On=n.getFirstHydratableChild,sa=n.hydrateInstance,Rd=n.hydrateTextInstance;n.hydrateSuspenseInstance;var Cr=n.getNextHydratableInstanceAfterSuspenseInstance,aa=n.commitHydratedContainer,Ui=n.commitHydratedSuspenseInstance;n.clearSuspenseBoundary,n.clearSuspenseBoundaryFromContainer;var Ad=n.didNotMatchHydratedContainerTextInstance,mv=n.didNotMatchHydratedTextInstance,gv=n.didNotHydrateContainerInstance,ji=n.didNotHydrateInstance,yv=n.didNotFindHydratableContainerInstance,Rl=n.didNotFindHydratableContainerTextInstance,Sv=n.didNotFindHydratableContainerSuspenseInstance,Zi=n.didNotFindHydratableInstance,Al=n.didNotFindHydratableTextInstance,Ml=n.didNotFindHydratableSuspenseInstance,fr=0,Ga,Ol,uc,Dl,cc,Ts,wi;function Rr(){}Rr.__reactDisabledLog=!0;function Ii(){{if(fr===0){Ga=console.log,Ol=console.info,uc=console.warn,Dl=console.error,cc=console.group,Ts=console.groupCollapsed,wi=console.groupEnd;var i={configurable:!0,enumerable:!0,value:Rr,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}fr++}}function Ji(){{if(fr--,fr===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:c({},i,{value:Ga}),info:c({},i,{value:Ol}),warn:c({},i,{value:uc}),error:c({},i,{value:Dl}),group:c({},i,{value:cc}),groupCollapsed:c({},i,{value:Ts}),groupEnd:c({},i,{value:wi})})}fr<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var dr=g.ReactCurrentDispatcher,hr;function Ar(i,s,u){{if(hr===void 0)try{throw Error()}catch(p){var d=p.stack.trim().match(/\n( *(at )?)/);hr=d&&d[1]||""}return`
67
+ `+hr+i}}var Cs=!1,Xa;{var Md=typeof WeakMap=="function"?WeakMap:Map;Xa=new Md}function oa(i,s){if(!i||Cs)return"";{var u=Xa.get(i);if(u!==void 0)return u}var d;Cs=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var S;S=dr.current,dr.current=null,Ii();try{if(s){var E=function(){throw Error()};if(Object.defineProperty(E.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(E,[])}catch(ge){d=ge}Reflect.construct(i,[],E)}else{try{E.call()}catch(ge){d=ge}i.call(E.prototype)}}else{try{throw Error()}catch(ge){d=ge}i()}}catch(ge){if(ge&&d&&typeof ge.stack=="string"){for(var R=ge.stack.split(`
68
68
  `),D=d.stack.split(`
69
- `),F=R.length-1,W=D.length-1;F>=1&&W>=0&&R[F]!==D[W];)W--;for(;F>=1&&W>=0;F--,W--)if(R[F]!==D[W]){if(F!==1||W!==1)do if(F--,W--,W<0||R[F]!==D[W]){var X=`
70
- `+R[F].replace(" at new "," at ");return typeof i=="function"&&Xa.set(i,X),X}while(F>=1&&W>=0);break}}}finally{Cs=!1,dr.current=S,Ji(),Error.prepareStackTrace=p}var ee=i?i.displayName||i.name:"",he=ee?Ar(ee):"";return typeof i=="function"&&Xa.set(i,he),he}function Ll(i,s,u){return oa(i,!0)}function la(i,s,u){return oa(i,!1)}function Od(i){var s=i.prototype;return!!(s&&s.isReactComponent)}function Pl(i,s,u){if(i==null)return"";if(typeof i=="function")return oa(i,Od(i));if(typeof i=="string")return Ar(i);switch(i){case nt:return Ar("Suspense");case Ze:return Ar("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case Ge:return la(i.render);case ht:return Pl(i.type,s,u);case mn:return la(i._render);case ft:{var d=i,p=d._payload,S=d._init;try{return Pl(S(p),s,u)}catch{}}}return""}var kl={},Ka=g.ReactDebugCurrentFrame;function Xr(i){if(i){var s=i._owner,u=Pl(i.type,i._source,s?s.type:null);Ka.setExtraStackFrame(u)}else Ka.setExtraStackFrame(null)}function ci(i,s,u,d,p){{var S=Function.call.bind(Object.prototype.hasOwnProperty);for(var E in i)if(S(i,E)){var R=void 0;try{if(typeof i[E]!="function"){var D=Error((d||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}R=i[E](s,E,d,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){R=F}R&&!(R instanceof Error)&&(Xr(p),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",u,E,typeof R),Xr(null)),R instanceof Error&&!(R.message in kl)&&(kl[R.message]=!0,Xr(p),m("Failed %s type: %s",u,R.message),Xr(null))}}}var zl=[],Rs;Rs=[];var pr=-1;function Ii(i){return{current:i}}function jt(i,s){if(pr<0){m("Unexpected pop.");return}s!==Rs[pr]&&m("Unexpected Fiber popped."),i.current=zl[pr],zl[pr]=null,Rs[pr]=null,pr--}function Sn(i,s,u){pr++,zl[pr]=i.current,Rs[pr]=u,i.current=s}var Kr;Kr={};var un={};Object.freeze(un);var er=Ii(un),Jn=Ii(!1),Nl=un;function Zr(i,s,u){return u&&Hn(s)?Nl:er.current}function rn(i,s,u){{var d=i.stateNode;d.__reactInternalMemoizedUnmaskedChildContext=s,d.__reactInternalMemoizedMaskedChildContext=u}}function Mr(i,s){{var u=i.type,d=u.contextTypes;if(!d)return un;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var S={};for(var E in d)S[E]=s[E];{var R=be(u)||"Unknown";ci(d,S,"context",R)}return p&&rn(i,s,S),S}}function Fi(){return Jn.current}function Hn(i){{var s=i.childContextTypes;return s!=null}}function wi(i){jt(Jn,i),jt(er,i)}function _l(i){jt(Jn,i),jt(er,i)}function fc(i,s,u){{if(er.current!==un)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Sn(er,s,i),Sn(Jn,u,i)}}function Ul(i,s,u){{var d=i.stateNode,p=s.childContextTypes;if(typeof d.getChildContext!="function"){{var S=be(s)||"Unknown";Kr[S]||(Kr[S]=!0,m("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",S,S))}return u}var E=d.getChildContext();for(var R in E)if(!(R in p))throw Error((be(s)||"Unknown")+'.getChildContext(): key "'+R+'" is not defined in childContextTypes.');{var D=be(s)||"Unknown";ci(p,E,"child context",D)}return c({},u,E)}}function Za(i){{var s=i.stateNode,u=s&&s.__reactInternalMemoizedMergedChildContext||un;return Nl=er.current,Sn(er,u,i),Sn(Jn,Jn.current,i),!0}}function Ja(i,s,u){{var d=i.stateNode;if(!d)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(u){var p=Ul(i,s,Nl);d.__reactInternalMemoizedMergedChildContext=p,jt(Jn,i),jt(er,i),Sn(er,p,i),Sn(Jn,u,i)}else jt(Jn,i),Sn(Jn,u,i)}}function dc(i){{if(!(Ju(i)&&i.tag===P))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var s=i;do{switch(s.tag){case _:return s.stateNode.context;case P:{var u=s.type;if(Hn(u))return s.stateNode.__reactInternalMemoizedMergedChildContext;break}}s=s.return}while(s!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var As=0,jl=1,ua=2,ei=null,fi=null,Wt=!1,Vn=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function _n(i){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var s=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(s.isDisabled)return!0;if(!s.supportsFiber)return m("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{ei=s.inject(i),fi=s}catch(u){m("React instrumentation encountered an error: %s.",u)}return!0}function Il(i,s){if(fi&&typeof fi.onScheduleFiberRoot=="function")try{fi.onScheduleFiberRoot(ei,i,s)}catch(u){Wt||(Wt=!0,m("React instrumentation encountered an error: %s",u))}}function eo(i,s){if(fi&&typeof fi.onCommitFiberRoot=="function")try{var u=(i.current.flags&tt)===tt;Wa&&fi.onCommitFiberRoot(ei,i,s,u)}catch(d){Wt||(Wt=!0,m("React instrumentation encountered an error: %s",d))}}function di(i){if(fi&&typeof fi.onCommitFiberUnmount=="function")try{fi.onCommitFiberUnmount(ei,i)}catch(s){Wt||(Wt=!0,m("React instrumentation encountered an error: %s",s))}}var hc=h.unstable_now;if(!(v.__interactionsRef!=null&&v.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var Fl=99,Jr=98,es=97,vr=96,ca=95,to=90;hc();var Ms=15,no=14,pc=13,ts=12,io=11,Os=10,ro=9,Or=8,Bl=7,so=6,fa=5,vc=4,mc=3,ao=2,Hl=1,Dr=0,Dd=31,ue=0,Wn=0,Tt=1,oo=2,Vl=4,Wl=24,Ld=32,Bi=192,ti=256,$l=3584,gc=4096,Ds=4186112,da=62914560,Ls=33554432,lo=67108864,yc=134217727,ql=134217728,Yl=805306368,Ti=1073741824,sn=-1,Sc=Dr;function bc(){return Sc}function xc(i){Sc=i}var It=Or;function Lr(i){if((Tt&i)!==ue)return It=Ms,Tt;if((oo&i)!==ue)return It=no,oo;if((Vl&i)!==ue)return It=pc,Vl;var s=Wl&i;if(s!==ue)return It=ts,s;if((i&Ld)!==ue)return It=io,Ld;var u=Bi&i;if(u!==ue)return It=Os,u;if((i&ti)!==ue)return It=ro,ti;var d=$l&i;if(d!==ue)return It=Or,d;if((i&gc)!==ue)return It=Bl,gc;var p=Ds&i;if(p!==ue)return It=so,p;var S=da&i;if(S!==ue)return It=fa,S;if(i&lo)return It=vc,lo;if((i&ql)!==ue)return It=mc,ql;var E=Yl&i;return E!==ue?(It=ao,E):(Ti&i)!==ue?(It=Hl,Ti):(m("Should have found matching lanes. This is a bug in React."),It=Or,i)}function Pd(i){switch(i){case Fl:return Ms;case Jr:return Os;case es:case vr:return Or;case ca:return ao;default:return Dr}}function Pr(i){switch(i){case Ms:case no:return Fl;case pc:case ts:case io:case Os:return Jr;case ro:case Or:case Bl:case so:case vc:case fa:return es;case mc:case ao:case Hl:return ca;case Dr:return to;default:throw Error("Invalid update priority: "+i+". This is a bug in React.")}}function hi(i,s){var u=i.pendingLanes;if(u===ue)return It=Dr,ue;var d=ue,p=Dr,S=i.expiredLanes,E=i.suspendedLanes,R=i.pingedLanes;if(S!==ue)d=S,p=It=Ms;else{var D=u&yc;if(D!==ue){var F=D&~E;if(F!==ue)d=Lr(F),p=It;else{var W=D&R;W!==ue&&(d=Lr(W),p=It)}}else{var X=u&~E;X!==ue?(d=Lr(X),p=It):R!==ue&&(d=Lr(R),p=It)}}if(d===ue)return ue;if(d=u&Ud(d),s!==ue&&s!==d&&(s&E)===ue){Lr(s);var ee=It;if(p<=ee)return s;It=p}var he=i.entangledLanes;if(he!==ue)for(var ye=i.entanglements,Ee=d&he;Ee>0;){var Xe=ns(Ee),St=1<<Xe;d|=ye[Xe],Ee&=~St}return d}function uo(i,s){for(var u=i.eventTimes,d=sn;s>0;){var p=ns(s),S=1<<p,E=u[p];E>d&&(d=E),s&=~S}return d}function co(i,s){Lr(i);var u=It;return u>=Os?s+250:u>=so?s+5e3:sn}function Ql(i,s){for(var u=i.pendingLanes,d=i.suspendedLanes,p=i.pingedLanes,S=i.expirationTimes,E=u;E>0;){var R=ns(E),D=1<<R,F=S[R];F===sn?((D&d)===ue||(D&p)!==ue)&&(S[R]=co(D,s)):F<=s&&(i.expiredLanes|=D),E&=~D}}function Gl(i){return Lr(i.pendingLanes)}function Ec(i){var s=i.pendingLanes&~Ti;return s!==ue?s:s&Ti?Ti:ue}function fo(){return It}function kd(i){return(i&yc)!==ue}function zd(i){return(i&da)===i}function wc(i){return(i&Ds)===i}function ha(i,s){switch(i){case Dr:break;case Ms:return Tt;case no:return oo;case ts:{var u=ni(Wl&~s);return u===Wn?ha(Os,s):u}case Os:{var d=ni(Bi&~s);return d===Wn?ha(Or,s):d}case Or:{var p=ni($l&~s);return p===Wn&&(p=ni(Ds&~s),p===Wn&&(p=ni($l))),p}case so:case fa:break;case ao:var S=ni(Yl&~s);return S===Wn&&(S=ni(Yl)),S}throw Error("Invalid update priority: "+i+". This is a bug in React.")}function bv(i,s){var u=ni(Ds&~s);return u===Wn&&(u=ni(Ds&~i),u===Wn&&(u=ni(Ds))),u}function Nd(i){var s=ni(da&~i);return s===Wn&&(s=ni(da)),s}function _d(i){return i&-i}function xv(i){var s=31-mo(i);return s<0?ue:1<<s}function Ud(i){return(xv(i)<<1)-1}function ni(i){return _d(i)}function ns(i){return 31-mo(i)}function Ev(i){return ns(i)}function Un(i,s){return(i&s)!==ue}function is(i,s){return(i&s)===s}function Ct(i,s){return i|s}function ho(i,s){return i&~s}function wv(i){return i}function jd(i,s){return i!==Wn&&i<s?i:s}function po(i){for(var s=[],u=0;u<Dd;u++)s.push(i);return s}function pa(i,s,u){i.pendingLanes|=s;var d=s-1;i.suspendedLanes&=d,i.pingedLanes&=d;var p=i.eventTimes,S=Ev(s);p[S]=u}function Id(i,s){i.suspendedLanes|=s,i.pingedLanes&=~s;for(var u=i.expirationTimes,d=s;d>0;){var p=ns(d),S=1<<p;u[p]=sn,d&=~S}}function Xl(i,s,u){i.pingedLanes|=i.suspendedLanes&s}function Fd(i,s){i.expiredLanes|=s&i.pendingLanes}function Kl(i){i.expiredLanes|=Wl&i.pendingLanes}function Tv(i){return(i&Wl)!==ue}function vo(i,s){i.mutableReadLanes|=s&i.pendingLanes}function Zl(i,s){var u=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s;for(var d=i.entanglements,p=i.eventTimes,S=i.expirationTimes,E=u;E>0;){var R=ns(E),D=1<<R;d[R]=ue,p[R]=sn,S[R]=sn,E&=~D}}function Jl(i,s){i.entangledLanes|=s;for(var u=i.entanglements,d=s;d>0;){var p=ns(d),S=1<<p;u[p]|=s,d&=~S}}var mo=Math.clz32?Math.clz32:Tc,eu=Math.log,go=Math.LN2;function Tc(i){return i===0?32:31-(eu(i)/go|0)|0}var Cc=h.unstable_runWithPriority,yo=h.unstable_scheduleCallback,Rc=h.unstable_cancelCallback,Ac=h.unstable_shouldYield,So=h.unstable_requestPaint,Mc=h.unstable_now,Cv=h.unstable_getCurrentPriorityLevel,Ps=h.unstable_ImmediatePriority,tu=h.unstable_UserBlockingPriority,nu=h.unstable_NormalPriority,qe=h.unstable_LowPriority,$n=h.unstable_IdlePriority;if(!(v.__interactionsRef!=null&&v.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var bn={},zt=99,Ci=98,Hi=97,Dn=96,bo=95,rs=90,xo=Ac,va=So!==void 0?So:function(){},tr=null,ma=null,Eo=!1,iu=Mc(),en=iu<1e4?Mc:function(){return Mc()-iu};function Oe(){switch(Cv()){case Ps:return zt;case tu:return Ci;case nu:return Hi;case qe:return Dn;case $n:return bo;default:throw Error("Unknown priority level.")}}function wo(i){switch(i){case zt:return Ps;case Ci:return tu;case Hi:return nu;case Dn:return qe;case bo:return $n;default:throw Error("Unknown priority level.")}}function nr(i,s){var u=wo(i);return Cc(u,s)}function jn(i,s,u){var d=wo(i);return yo(d,s,u)}function ss(i){return tr===null?(tr=[i],ma=yo(Ps,ru)):tr.push(i),bn}function ga(i){i!==bn&&Rc(i)}function qn(){if(ma!==null){var i=ma;ma=null,Rc(i)}ru()}function ru(){if(!Eo&&tr!==null){Eo=!0;var i=0;try{var s=!0,u=tr;nr(zt,function(){for(;i<u.length;i++){var d=u[i];do d=d(s);while(d!==null)}}),tr=null}catch(d){throw tr!==null&&(tr=tr.slice(i+1)),yo(Ps,qn),d}finally{Eo=!1}}}var $t=0,Mt=1,Ln=2,kr=4,Yn=8,zr=16,su=g.ReactCurrentBatchConfig,To=0;function Co(){return su.transition}function pi(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Cn=typeof Object.is=="function"?Object.is:pi,Nr=Object.prototype.hasOwnProperty;function ks(i,s){if(Cn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),d=Object.keys(s);if(u.length!==d.length)return!1;for(var p=0;p<u.length;p++)if(!Nr.call(s,u[p])||!Cn(i[u[p]],s[u[p]]))return!1;return!0}function Ri(i){switch(i._debugOwner&&i._debugOwner.type,i._debugSource,i.tag){case k:return Ar(i.type);case Ce:return Ar("Lazy");case $:return Ar("Suspense");case _e:return Ar("SuspenseList");case A:case M:case ge:return la(i.type);case J:return la(i.type.render);case Z:return la(i.type._render);case P:return Ll(i.type);default:return""}}function Oc(i){try{var s="",u=i;do s+=Ri(u),u=u.return;while(u);return s}catch(d){return`
69
+ `),I=R.length-1,V=D.length-1;I>=1&&V>=0&&R[I]!==D[V];)V--;for(;I>=1&&V>=0;I--,V--)if(R[I]!==D[V]){if(I!==1||V!==1)do if(I--,V--,V<0||R[I]!==D[V]){var K=`
70
+ `+R[I].replace(" at new "," at ");return typeof i=="function"&&Xa.set(i,K),K}while(I>=1&&V>=0);break}}}finally{Cs=!1,dr.current=S,Ji(),Error.prepareStackTrace=p}var ee=i?i.displayName||i.name:"",pe=ee?Ar(ee):"";return typeof i=="function"&&Xa.set(i,pe),pe}function Ll(i,s,u){return oa(i,!0)}function la(i,s,u){return oa(i,!1)}function Od(i){var s=i.prototype;return!!(s&&s.isReactComponent)}function Pl(i,s,u){if(i==null)return"";if(typeof i=="function")return oa(i,Od(i));if(typeof i=="string")return Ar(i);switch(i){case jt:return Ar("Suspense");case Ie:return Ar("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case Ut:return la(i.render);case We:return Pl(i.type,s,u);case St:return la(i._render);case Qe:{var d=i,p=d._payload,S=d._init;try{return Pl(S(p),s,u)}catch{}}}return""}var kl={},Ka=g.ReactDebugCurrentFrame;function Xr(i){if(i){var s=i._owner,u=Pl(i.type,i._source,s?s.type:null);Ka.setExtraStackFrame(u)}else Ka.setExtraStackFrame(null)}function fi(i,s,u,d,p){{var S=Function.call.bind(Object.prototype.hasOwnProperty);for(var E in i)if(S(i,E)){var R=void 0;try{if(typeof i[E]!="function"){var D=Error((d||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}R=i[E](s,E,d,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(I){R=I}R&&!(R instanceof Error)&&(Xr(p),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",u,E,typeof R),Xr(null)),R instanceof Error&&!(R.message in kl)&&(kl[R.message]=!0,Xr(p),m("Failed %s type: %s",u,R.message),Xr(null))}}}var zl=[],Rs;Rs=[];var pr=-1;function Fi(i){return{current:i}}function Ft(i,s){if(pr<0){m("Unexpected pop.");return}s!==Rs[pr]&&m("Unexpected Fiber popped."),i.current=zl[pr],zl[pr]=null,Rs[pr]=null,pr--}function Sn(i,s,u){pr++,zl[pr]=i.current,Rs[pr]=u,i.current=s}var Kr;Kr={};var fn={};Object.freeze(fn);var er=Fi(fn),ei=Fi(!1),Nl=fn;function Zr(i,s,u){return u&&Wn(s)?Nl:er.current}function an(i,s,u){{var d=i.stateNode;d.__reactInternalMemoizedUnmaskedChildContext=s,d.__reactInternalMemoizedMaskedChildContext=u}}function Mr(i,s){{var u=i.type,d=u.contextTypes;if(!d)return fn;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var S={};for(var E in d)S[E]=s[E];{var R=be(u)||"Unknown";fi(d,S,"context",R)}return p&&an(i,s,S),S}}function Bi(){return ei.current}function Wn(i){{var s=i.childContextTypes;return s!=null}}function Ti(i){Ft(ei,i),Ft(er,i)}function _l(i){Ft(ei,i),Ft(er,i)}function fc(i,s,u){{if(er.current!==fn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Sn(er,s,i),Sn(ei,u,i)}}function Ul(i,s,u){{var d=i.stateNode,p=s.childContextTypes;if(typeof d.getChildContext!="function"){{var S=be(s)||"Unknown";Kr[S]||(Kr[S]=!0,m("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",S,S))}return u}var E=d.getChildContext();for(var R in E)if(!(R in p))throw Error((be(s)||"Unknown")+'.getChildContext(): key "'+R+'" is not defined in childContextTypes.');{var D=be(s)||"Unknown";fi(p,E,"child context",D)}return c({},u,E)}}function Za(i){{var s=i.stateNode,u=s&&s.__reactInternalMemoizedMergedChildContext||fn;return Nl=er.current,Sn(er,u,i),Sn(ei,ei.current,i),!0}}function Ja(i,s,u){{var d=i.stateNode;if(!d)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(u){var p=Ul(i,s,Nl);d.__reactInternalMemoizedMergedChildContext=p,Ft(ei,i),Ft(er,i),Sn(er,p,i),Sn(ei,u,i)}else Ft(ei,i),Sn(ei,u,i)}}function dc(i){{if(!(Ju(i)&&i.tag===k))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var s=i;do{switch(s.tag){case _:return s.stateNode.context;case k:{var u=s.type;if(Wn(u))return s.stateNode.__reactInternalMemoizedMergedChildContext;break}}s=s.return}while(s!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var As=0,jl=1,ua=2,ti=null,di=null,qt=!1,Vn=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function Un(i){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var s=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(s.isDisabled)return!0;if(!s.supportsFiber)return m("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{ti=s.inject(i),di=s}catch(u){m("React instrumentation encountered an error: %s.",u)}return!0}function Il(i,s){if(di&&typeof di.onScheduleFiberRoot=="function")try{di.onScheduleFiberRoot(ti,i,s)}catch(u){qt||(qt=!0,m("React instrumentation encountered an error: %s",u))}}function eo(i,s){if(di&&typeof di.onCommitFiberRoot=="function")try{var u=(i.current.flags&nt)===nt;Va&&di.onCommitFiberRoot(ti,i,s,u)}catch(d){qt||(qt=!0,m("React instrumentation encountered an error: %s",d))}}function hi(i){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount(ti,i)}catch(s){qt||(qt=!0,m("React instrumentation encountered an error: %s",s))}}var hc=h.unstable_now;if(!(v.__interactionsRef!=null&&v.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var Fl=99,Jr=98,es=97,vr=96,ca=95,to=90;hc();var Ms=15,no=14,pc=13,ts=12,io=11,Os=10,ro=9,Or=8,Bl=7,so=6,fa=5,vc=4,mc=3,ao=2,Hl=1,Dr=0,Dd=31,ce=0,$n=0,Tt=1,oo=2,Wl=4,Vl=24,Ld=32,Hi=192,ni=256,$l=3584,gc=4096,Ds=4186112,da=62914560,Ls=33554432,lo=67108864,yc=134217727,ql=134217728,Yl=805306368,Ci=1073741824,on=-1,Sc=Dr;function bc(){return Sc}function xc(i){Sc=i}var Bt=Or;function Lr(i){if((Tt&i)!==ce)return Bt=Ms,Tt;if((oo&i)!==ce)return Bt=no,oo;if((Wl&i)!==ce)return Bt=pc,Wl;var s=Vl&i;if(s!==ce)return Bt=ts,s;if((i&Ld)!==ce)return Bt=io,Ld;var u=Hi&i;if(u!==ce)return Bt=Os,u;if((i&ni)!==ce)return Bt=ro,ni;var d=$l&i;if(d!==ce)return Bt=Or,d;if((i&gc)!==ce)return Bt=Bl,gc;var p=Ds&i;if(p!==ce)return Bt=so,p;var S=da&i;if(S!==ce)return Bt=fa,S;if(i&lo)return Bt=vc,lo;if((i&ql)!==ce)return Bt=mc,ql;var E=Yl&i;return E!==ce?(Bt=ao,E):(Ci&i)!==ce?(Bt=Hl,Ci):(m("Should have found matching lanes. This is a bug in React."),Bt=Or,i)}function Pd(i){switch(i){case Fl:return Ms;case Jr:return Os;case es:case vr:return Or;case ca:return ao;default:return Dr}}function Pr(i){switch(i){case Ms:case no:return Fl;case pc:case ts:case io:case Os:return Jr;case ro:case Or:case Bl:case so:case vc:case fa:return es;case mc:case ao:case Hl:return ca;case Dr:return to;default:throw Error("Invalid update priority: "+i+". This is a bug in React.")}}function pi(i,s){var u=i.pendingLanes;if(u===ce)return Bt=Dr,ce;var d=ce,p=Dr,S=i.expiredLanes,E=i.suspendedLanes,R=i.pingedLanes;if(S!==ce)d=S,p=Bt=Ms;else{var D=u&yc;if(D!==ce){var I=D&~E;if(I!==ce)d=Lr(I),p=Bt;else{var V=D&R;V!==ce&&(d=Lr(V),p=Bt)}}else{var K=u&~E;K!==ce?(d=Lr(K),p=Bt):R!==ce&&(d=Lr(R),p=Bt)}}if(d===ce)return ce;if(d=u&Ud(d),s!==ce&&s!==d&&(s&E)===ce){Lr(s);var ee=Bt;if(p<=ee)return s;Bt=p}var pe=i.entangledLanes;if(pe!==ce)for(var ge=i.entanglements,Ee=d&pe;Ee>0;){var Ze=ns(Ee),gt=1<<Ze;d|=ge[Ze],Ee&=~gt}return d}function uo(i,s){for(var u=i.eventTimes,d=on;s>0;){var p=ns(s),S=1<<p,E=u[p];E>d&&(d=E),s&=~S}return d}function co(i,s){Lr(i);var u=Bt;return u>=Os?s+250:u>=so?s+5e3:on}function Ql(i,s){for(var u=i.pendingLanes,d=i.suspendedLanes,p=i.pingedLanes,S=i.expirationTimes,E=u;E>0;){var R=ns(E),D=1<<R,I=S[R];I===on?((D&d)===ce||(D&p)!==ce)&&(S[R]=co(D,s)):I<=s&&(i.expiredLanes|=D),E&=~D}}function Gl(i){return Lr(i.pendingLanes)}function Ec(i){var s=i.pendingLanes&~Ci;return s!==ce?s:s&Ci?Ci:ce}function fo(){return Bt}function kd(i){return(i&yc)!==ce}function zd(i){return(i&da)===i}function wc(i){return(i&Ds)===i}function ha(i,s){switch(i){case Dr:break;case Ms:return Tt;case no:return oo;case ts:{var u=ii(Vl&~s);return u===$n?ha(Os,s):u}case Os:{var d=ii(Hi&~s);return d===$n?ha(Or,s):d}case Or:{var p=ii($l&~s);return p===$n&&(p=ii(Ds&~s),p===$n&&(p=ii($l))),p}case so:case fa:break;case ao:var S=ii(Yl&~s);return S===$n&&(S=ii(Yl)),S}throw Error("Invalid update priority: "+i+". This is a bug in React.")}function bv(i,s){var u=ii(Ds&~s);return u===$n&&(u=ii(Ds&~i),u===$n&&(u=ii(Ds))),u}function Nd(i){var s=ii(da&~i);return s===$n&&(s=ii(da)),s}function _d(i){return i&-i}function xv(i){var s=31-mo(i);return s<0?ce:1<<s}function Ud(i){return(xv(i)<<1)-1}function ii(i){return _d(i)}function ns(i){return 31-mo(i)}function Ev(i){return ns(i)}function jn(i,s){return(i&s)!==ce}function is(i,s){return(i&s)===s}function Ct(i,s){return i|s}function ho(i,s){return i&~s}function wv(i){return i}function jd(i,s){return i!==$n&&i<s?i:s}function po(i){for(var s=[],u=0;u<Dd;u++)s.push(i);return s}function pa(i,s,u){i.pendingLanes|=s;var d=s-1;i.suspendedLanes&=d,i.pingedLanes&=d;var p=i.eventTimes,S=Ev(s);p[S]=u}function Id(i,s){i.suspendedLanes|=s,i.pingedLanes&=~s;for(var u=i.expirationTimes,d=s;d>0;){var p=ns(d),S=1<<p;u[p]=on,d&=~S}}function Xl(i,s,u){i.pingedLanes|=i.suspendedLanes&s}function Fd(i,s){i.expiredLanes|=s&i.pendingLanes}function Kl(i){i.expiredLanes|=Vl&i.pendingLanes}function Tv(i){return(i&Vl)!==ce}function vo(i,s){i.mutableReadLanes|=s&i.pendingLanes}function Zl(i,s){var u=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s;for(var d=i.entanglements,p=i.eventTimes,S=i.expirationTimes,E=u;E>0;){var R=ns(E),D=1<<R;d[R]=ce,p[R]=on,S[R]=on,E&=~D}}function Jl(i,s){i.entangledLanes|=s;for(var u=i.entanglements,d=s;d>0;){var p=ns(d),S=1<<p;u[p]|=s,d&=~S}}var mo=Math.clz32?Math.clz32:Tc,eu=Math.log,go=Math.LN2;function Tc(i){return i===0?32:31-(eu(i)/go|0)|0}var Cc=h.unstable_runWithPriority,yo=h.unstable_scheduleCallback,Rc=h.unstable_cancelCallback,Ac=h.unstable_shouldYield,So=h.unstable_requestPaint,Mc=h.unstable_now,Cv=h.unstable_getCurrentPriorityLevel,Ps=h.unstable_ImmediatePriority,tu=h.unstable_UserBlockingPriority,nu=h.unstable_NormalPriority,Ge=h.unstable_LowPriority,qn=h.unstable_IdlePriority;if(!(v.__interactionsRef!=null&&v.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var bn={},zt=99,Ri=98,Wi=97,Dn=96,bo=95,rs=90,xo=Ac,va=So!==void 0?So:function(){},tr=null,ma=null,Eo=!1,iu=Mc(),tn=iu<1e4?Mc:function(){return Mc()-iu};function De(){switch(Cv()){case Ps:return zt;case tu:return Ri;case nu:return Wi;case Ge:return Dn;case qn:return bo;default:throw Error("Unknown priority level.")}}function wo(i){switch(i){case zt:return Ps;case Ri:return tu;case Wi:return nu;case Dn:return Ge;case bo:return qn;default:throw Error("Unknown priority level.")}}function nr(i,s){var u=wo(i);return Cc(u,s)}function In(i,s,u){var d=wo(i);return yo(d,s,u)}function ss(i){return tr===null?(tr=[i],ma=yo(Ps,ru)):tr.push(i),bn}function ga(i){i!==bn&&Rc(i)}function Yn(){if(ma!==null){var i=ma;ma=null,Rc(i)}ru()}function ru(){if(!Eo&&tr!==null){Eo=!0;var i=0;try{var s=!0,u=tr;nr(zt,function(){for(;i<u.length;i++){var d=u[i];do d=d(s);while(d!==null)}}),tr=null}catch(d){throw tr!==null&&(tr=tr.slice(i+1)),yo(Ps,Yn),d}finally{Eo=!1}}}var Yt=0,Mt=1,Ln=2,kr=4,Qn=8,zr=16,su=g.ReactCurrentBatchConfig,To=0;function Co(){return su.transition}function vi(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Cn=typeof Object.is=="function"?Object.is:vi,Nr=Object.prototype.hasOwnProperty;function ks(i,s){if(Cn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),d=Object.keys(s);if(u.length!==d.length)return!1;for(var p=0;p<u.length;p++)if(!Nr.call(s,u[p])||!Cn(i[u[p]],s[u[p]]))return!1;return!0}function Ai(i){switch(i._debugOwner&&i._debugOwner.type,i._debugSource,i.tag){case P:return Ar(i.type);case Re:return Ar("Lazy");case $:return Ar("Suspense");case ke:return Ar("SuspenseList");case A:case M:case me:return la(i.type);case J:return la(i.type.render);case Te:return la(i.type._render);case k:return Ll(i.type);default:return""}}function Oc(i){try{var s="",u=i;do s+=Ai(u),u=u.return;while(u);return s}catch(d){return`
71
71
  Error generating stack: `+d.message+`
72
- `+d.stack}}var zs=g.ReactDebugCurrentFrame,Qn=null,ya=!1;function Bd(){{if(Qn===null)return null;var i=Qn._debugOwner;if(i!==null&&typeof i<"u")return be(i.type)}return null}function Hd(){return Qn===null?"":Oc(Qn)}function In(){zs.getCurrentStack=null,Qn=null,ya=!1}function xn(i){zs.getCurrentStack=Hd,Qn=i,ya=!1}function ii(i){ya=i}function Vd(){return ya}var Vi={recordUnsafeLifecycleWarnings:function(i,s){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(i,s){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var Ro=function(i){for(var s=null,u=i;u!==null;)u.mode&Mt&&(s=u),u=u.return;return s},Ns=function(i){var s=[];return i.forEach(function(u){s.push(u)}),s.sort().join(", ")},Ao=[],Sa=[],ba=[],ir=[],Mo=[],Oo=[],ri=new Set;Vi.recordUnsafeLifecycleWarnings=function(i,s){ri.has(i.type)||(typeof s.componentWillMount=="function"&&s.componentWillMount.__suppressDeprecationWarning!==!0&&Ao.push(i),i.mode&Mt&&typeof s.UNSAFE_componentWillMount=="function"&&Sa.push(i),typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&ba.push(i),i.mode&Mt&&typeof s.UNSAFE_componentWillReceiveProps=="function"&&ir.push(i),typeof s.componentWillUpdate=="function"&&s.componentWillUpdate.__suppressDeprecationWarning!==!0&&Mo.push(i),i.mode&Mt&&typeof s.UNSAFE_componentWillUpdate=="function"&&Oo.push(i))},Vi.flushPendingUnsafeLifecycleWarnings=function(){var i=new Set;Ao.length>0&&(Ao.forEach(function(ee){i.add(be(ee.type)||"Component"),ri.add(ee.type)}),Ao=[]);var s=new Set;Sa.length>0&&(Sa.forEach(function(ee){s.add(be(ee.type)||"Component"),ri.add(ee.type)}),Sa=[]);var u=new Set;ba.length>0&&(ba.forEach(function(ee){u.add(be(ee.type)||"Component"),ri.add(ee.type)}),ba=[]);var d=new Set;ir.length>0&&(ir.forEach(function(ee){d.add(be(ee.type)||"Component"),ri.add(ee.type)}),ir=[]);var p=new Set;Mo.length>0&&(Mo.forEach(function(ee){p.add(be(ee.type)||"Component"),ri.add(ee.type)}),Mo=[]);var S=new Set;if(Oo.length>0&&(Oo.forEach(function(ee){S.add(be(ee.type)||"Component"),ri.add(ee.type)}),Oo=[]),s.size>0){var E=Ns(s);m(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
72
+ `+d.stack}}var zs=g.ReactDebugCurrentFrame,Gn=null,ya=!1;function Bd(){{if(Gn===null)return null;var i=Gn._debugOwner;if(i!==null&&typeof i<"u")return be(i.type)}return null}function Hd(){return Gn===null?"":Oc(Gn)}function Fn(){zs.getCurrentStack=null,Gn=null,ya=!1}function xn(i){zs.getCurrentStack=Hd,Gn=i,ya=!1}function ri(i){ya=i}function Wd(){return ya}var Vi={recordUnsafeLifecycleWarnings:function(i,s){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(i,s){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var Ro=function(i){for(var s=null,u=i;u!==null;)u.mode&Mt&&(s=u),u=u.return;return s},Ns=function(i){var s=[];return i.forEach(function(u){s.push(u)}),s.sort().join(", ")},Ao=[],Sa=[],ba=[],ir=[],Mo=[],Oo=[],si=new Set;Vi.recordUnsafeLifecycleWarnings=function(i,s){si.has(i.type)||(typeof s.componentWillMount=="function"&&s.componentWillMount.__suppressDeprecationWarning!==!0&&Ao.push(i),i.mode&Mt&&typeof s.UNSAFE_componentWillMount=="function"&&Sa.push(i),typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&ba.push(i),i.mode&Mt&&typeof s.UNSAFE_componentWillReceiveProps=="function"&&ir.push(i),typeof s.componentWillUpdate=="function"&&s.componentWillUpdate.__suppressDeprecationWarning!==!0&&Mo.push(i),i.mode&Mt&&typeof s.UNSAFE_componentWillUpdate=="function"&&Oo.push(i))},Vi.flushPendingUnsafeLifecycleWarnings=function(){var i=new Set;Ao.length>0&&(Ao.forEach(function(ee){i.add(be(ee.type)||"Component"),si.add(ee.type)}),Ao=[]);var s=new Set;Sa.length>0&&(Sa.forEach(function(ee){s.add(be(ee.type)||"Component"),si.add(ee.type)}),Sa=[]);var u=new Set;ba.length>0&&(ba.forEach(function(ee){u.add(be(ee.type)||"Component"),si.add(ee.type)}),ba=[]);var d=new Set;ir.length>0&&(ir.forEach(function(ee){d.add(be(ee.type)||"Component"),si.add(ee.type)}),ir=[]);var p=new Set;Mo.length>0&&(Mo.forEach(function(ee){p.add(be(ee.type)||"Component"),si.add(ee.type)}),Mo=[]);var S=new Set;if(Oo.length>0&&(Oo.forEach(function(ee){S.add(be(ee.type)||"Component"),si.add(ee.type)}),Oo=[]),s.size>0){var E=Ns(s);m(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
73
73
 
74
74
  * Move code with side effects to componentDidMount, and set initial state in the constructor.
75
75
 
@@ -82,62 +82,62 @@ Please update the following components: %s`,R)}if(S.size>0){var D=Ns(S);m(`Using
82
82
 
83
83
  * Move data fetching code or side effects to componentDidUpdate.
84
84
 
85
- Please update the following components: %s`,D)}if(i.size>0){var F=Ns(i);x(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
85
+ Please update the following components: %s`,D)}if(i.size>0){var I=Ns(i);x(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
86
86
 
87
87
  * Move code with side effects to componentDidMount, and set initial state in the constructor.
88
88
  * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
89
89
 
90
- Please update the following components: %s`,F)}if(u.size>0){var W=Ns(u);x(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
90
+ Please update the following components: %s`,I)}if(u.size>0){var V=Ns(u);x(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
91
91
 
92
92
  * Move data fetching code or side effects to componentDidUpdate.
93
93
  * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
94
94
  * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
95
95
 
96
- Please update the following components: %s`,W)}if(p.size>0){var X=Ns(p);x(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
96
+ Please update the following components: %s`,V)}if(p.size>0){var K=Ns(p);x(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
97
97
 
98
98
  * Move data fetching code or side effects to componentDidUpdate.
99
99
  * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
100
100
 
101
- Please update the following components: %s`,X)}};var au=new Map,Dc=new Set;Vi.recordLegacyContextWarning=function(i,s){var u=Ro(i);if(u===null){m("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Dc.has(i.type)){var d=au.get(u);(i.type.contextTypes!=null||i.type.childContextTypes!=null||s!==null&&typeof s.getChildContext=="function")&&(d===void 0&&(d=[],au.set(u,d)),d.push(i))}},Vi.flushLegacyContextWarning=function(){au.forEach(function(i,s){if(i.length!==0){var u=i[0],d=new Set;i.forEach(function(S){d.add(be(S.type)||"Component"),Dc.add(S.type)});var p=Ns(d);try{xn(u),m(`Legacy context API has been detected within a strict-mode tree.
101
+ Please update the following components: %s`,K)}};var au=new Map,Dc=new Set;Vi.recordLegacyContextWarning=function(i,s){var u=Ro(i);if(u===null){m("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Dc.has(i.type)){var d=au.get(u);(i.type.contextTypes!=null||i.type.childContextTypes!=null||s!==null&&typeof s.getChildContext=="function")&&(d===void 0&&(d=[],au.set(u,d)),d.push(i))}},Vi.flushLegacyContextWarning=function(){au.forEach(function(i,s){if(i.length!==0){var u=i[0],d=new Set;i.forEach(function(S){d.add(be(S.type)||"Component"),Dc.add(S.type)});var p=Ns(d);try{xn(u),m(`Legacy context API has been detected within a strict-mode tree.
102
102
 
103
103
  The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
104
104
 
105
105
  Please update the following components: %s
106
106
 
107
- Learn more about this warning here: https://reactjs.org/link/legacy-context`,p)}finally{In()}}})},Vi.discardPendingWarnings=function(){Ao=[],Sa=[],ba=[],ir=[],Mo=[],Oo=[],au=new Map}}function rr(i,s){if(i&&i.defaultProps){var u=c({},s),d=i.defaultProps;for(var p in d)u[p]===void 0&&(u[p]=d[p]);return u}return s}var Do=1073741823,sr=Ii(null),Lo;Lo={};var ou=null,_s=null,Us=null,xa=!1;function Po(){ou=null,_s=null,Us=null,xa=!1}function lu(){xa=!0}function Lc(){xa=!1}function ko(i,s){var u=i.type._context;ln?(Sn(sr,u._currentValue,i),u._currentValue=s,u._currentRenderer!==void 0&&u._currentRenderer!==null&&u._currentRenderer!==Lo&&m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer=Lo):(Sn(sr,u._currentValue2,i),u._currentValue2=s,u._currentRenderer2!==void 0&&u._currentRenderer2!==null&&u._currentRenderer2!==Lo&&m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer2=Lo)}function uu(i){var s=sr.current;jt(sr,i);var u=i.type._context;ln?u._currentValue=s:u._currentValue2=s}function Rv(i,s,u){if(Cn(u,s))return 0;var d=typeof i._calculateChangedBits=="function"?i._calculateChangedBits(u,s):Do;return(d&Do)!==d&&m("calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",d),d|0}function Ai(i,s){for(var u=i;u!==null;){var d=u.alternate;if(!is(u.childLanes,s))u.childLanes=Ct(u.childLanes,s),d!==null&&(d.childLanes=Ct(d.childLanes,s));else if(d!==null&&!is(d.childLanes,s))d.childLanes=Ct(d.childLanes,s);else break;u=u.return}}function Pc(i,s,u,d){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var S=void 0,E=p.dependencies;if(E!==null){S=p.child;for(var R=E.firstContext;R!==null;){if(R.context===s&&R.observedBits&u){if(p.tag===P){var D=as(sn,ni(d));D.tag=wa,os(p,D)}p.lanes=Ct(p.lanes,d);var F=p.alternate;F!==null&&(F.lanes=Ct(F.lanes,d)),Ai(p.return,d),E.lanes=Ct(E.lanes,d);break}R=R.next}}else p.tag===H?S=p.type===i.type?null:p.child:S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===i){S=null;break}var W=S.sibling;if(W!==null){W.return=S.return,S=W;break}S=S.return}p=S}}function Ea(i,s){ou=i,_s=null,Us=null;var u=i.dependencies;if(u!==null){var d=u.firstContext;d!==null&&(Un(u.lanes,s)&&xm(),u.firstContext=null)}}function Ft(i,s){if(xa&&m("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Us!==i){if(!(s===!1||s===0)){var u;typeof s!="number"||s===Do?(Us=i,u=Do):u=s;var d={context:i,observedBits:u,next:null};if(_s===null){if(ou===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");_s=d,ou.dependencies={lanes:ue,firstContext:d,responders:null}}else _s=_s.next=d}}return ln?i._currentValue:i._currentValue2}var zo=0,js=1,wa=2,No=3,Ta=!1,kc,_o;kc=!1,_o=null;function cu(i){var s={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null};i.updateQueue=s}function Uo(i,s){var u=s.updateQueue,d=i.updateQueue;if(u===d){var p={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects};s.updateQueue=p}}function as(i,s){var u={eventTime:i,lane:s,tag:zo,payload:null,callback:null,next:null};return u}function os(i,s){var u=i.updateQueue;if(u!==null){var d=u.shared,p=d.pending;p===null?s.next=s:(s.next=p.next,p.next=s),d.pending=s,_o===d&&!kc&&(m("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),kc=!0)}}function a(i,s){var u=i.updateQueue,d=i.alternate;if(d!==null){var p=d.updateQueue;if(u===p){var S=null,E=null,R=u.firstBaseUpdate;if(R!==null){var D=R;do{var F={eventTime:D.eventTime,lane:D.lane,tag:D.tag,payload:D.payload,callback:D.callback,next:null};E===null?S=E=F:(E.next=F,E=F),D=D.next}while(D!==null);E===null?S=E=s:(E.next=s,E=s)}else S=E=s;u={baseState:p.baseState,firstBaseUpdate:S,lastBaseUpdate:E,shared:p.shared,effects:p.effects},i.updateQueue=u;return}}var W=u.lastBaseUpdate;W===null?u.firstBaseUpdate=s:W.next=s,u.lastBaseUpdate=s}function l(i,s,u,d,p,S){switch(u.tag){case js:{var E=u.payload;if(typeof E=="function"){lu();var R=E.call(S,d,p);{if(i.mode&Mt){ji();try{E.call(S,d,p)}finally{Ji()}}Lc()}return R}return E}case No:i.flags=i.flags&~xi|tt;case zo:{var D=u.payload,F;if(typeof D=="function"){lu(),F=D.call(S,d,p);{if(i.mode&Mt){ji();try{D.call(S,d,p)}finally{Ji()}}Lc()}}else F=D;return F==null?d:c({},d,F)}case wa:return Ta=!0,d}return d}function f(i,s,u,d){var p=i.updateQueue;Ta=!1,_o=p.shared;var S=p.firstBaseUpdate,E=p.lastBaseUpdate,R=p.shared.pending;if(R!==null){p.shared.pending=null;var D=R,F=D.next;D.next=null,E===null?S=F:E.next=F,E=D;var W=i.alternate;if(W!==null){var X=W.updateQueue,ee=X.lastBaseUpdate;ee!==E&&(ee===null?X.firstBaseUpdate=F:ee.next=F,X.lastBaseUpdate=D)}}if(S!==null){var he=p.baseState,ye=ue,Ee=null,Xe=null,St=null,it=S;do{var Xt=it.lane,Tn=it.eventTime;if(is(d,Xt)){if(St!==null){var oe={eventTime:Tn,lane:Wn,tag:it.tag,payload:it.payload,callback:it.callback,next:null};St=St.next=oe}he=l(i,p,it,he,s,u);var Y=it.callback;if(Y!==null){i.flags|=Lt;var ve=p.effects;ve===null?p.effects=[it]:ve.push(it)}}else{var K={eventTime:Tn,lane:Xt,tag:it.tag,payload:it.payload,callback:it.callback,next:null};St===null?(Xe=St=K,Ee=he):St=St.next=K,ye=Ct(ye,Xt)}if(it=it.next,it===null){if(R=p.shared.pending,R===null)break;var De=R,ze=De.next;De.next=null,it=ze,p.lastBaseUpdate=De,p.shared.pending=null}}while(!0);St===null&&(Ee=he),p.baseState=Ee,p.firstBaseUpdate=Xe,p.lastBaseUpdate=St,Ym(ye),i.lanes=ye,i.memoizedState=he}_o=null}function y(i,s){if(typeof i!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+i);i.call(s)}function b(){Ta=!1}function T(){return Ta}function N(i,s,u){var d=s.effects;if(s.effects=null,d!==null)for(var p=0;p<d.length;p++){var S=d[p],E=S.callback;E!==null&&(S.callback=null,y(E,u))}}var B={},ne=Array.isArray,xe=new o.Component().refs,Fe,Ke,Ae,Pt,qt,Mi,Q,V,ie,Re;{Fe=new Set,Ke=new Set,Ae=new Set,Pt=new Set,V=new Set,qt=new Set,ie=new Set,Re=new Set;var Be=new Set;Q=function(i,s){if(!(i===null||typeof i=="function")){var u=s+"_"+i;Be.has(u)||(Be.add(u),m("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",s,i))}},Mi=function(i,s){if(s===void 0){var u=be(i)||"Component";qt.has(u)||(qt.add(u),m("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",u))}},Object.defineProperty(B,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(B)}function kt(i,s,u,d){var p=i.memoizedState;if(i.mode&Mt){ji();try{u(d,p)}finally{Ji()}}var S=u(d,p);Mi(s,S);var E=S==null?p:c({},p,S);if(i.memoizedState=E,i.lanes===ue){var R=i.updateQueue;R.baseState=E}}var Je={isMounted:ec,enqueueSetState:function(i,s,u){var d=pe(i),p=Yi(),S=Oa(d),E=as(p,S);E.payload=s,u!=null&&(Q(u,"setState"),E.callback=u),os(d,E),ai(d,S,p)},enqueueReplaceState:function(i,s,u){var d=pe(i),p=Yi(),S=Oa(d),E=as(p,S);E.tag=js,E.payload=s,u!=null&&(Q(u,"replaceState"),E.callback=u),os(d,E),ai(d,S,p)},enqueueForceUpdate:function(i,s){var u=pe(i),d=Yi(),p=Oa(u),S=as(d,p);S.tag=wa,s!=null&&(Q(s,"forceUpdate"),S.callback=s),os(u,S),ai(u,p,d)}};function Rt(i,s,u,d,p,S,E){var R=i.stateNode;if(typeof R.shouldComponentUpdate=="function"){if(i.mode&Mt){ji();try{R.shouldComponentUpdate(d,S,E)}finally{Ji()}}var D=R.shouldComponentUpdate(d,S,E);return D===void 0&&m("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",be(s)||"Component"),D}return s.prototype&&s.prototype.isPureReactComponent?!ks(u,d)||!ks(p,S):!0}function En(i,s,u){var d=i.stateNode;{var p=be(s)||"Component",S=d.render;S||(s.prototype&&typeof s.prototype.render=="function"?m("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",p):m("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",p)),d.getInitialState&&!d.getInitialState.isReactClassApproved&&!d.state&&m("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",p),d.getDefaultProps&&!d.getDefaultProps.isReactClassApproved&&m("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",p),d.propTypes&&m("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",p),d.contextType&&m("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",p),d.contextTypes&&m("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",p),s.contextType&&s.contextTypes&&!ie.has(s)&&(ie.add(s),m("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",p)),typeof d.componentShouldUpdate=="function"&&m("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",p),s.prototype&&s.prototype.isPureReactComponent&&typeof d.shouldComponentUpdate<"u"&&m("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",be(s)||"A pure component"),typeof d.componentDidUnmount=="function"&&m("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",p),typeof d.componentDidReceiveProps=="function"&&m("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",p),typeof d.componentWillRecieveProps=="function"&&m("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",p),typeof d.UNSAFE_componentWillRecieveProps=="function"&&m("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",p);var E=d.props!==u;d.props!==void 0&&E&&m("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",p,p),d.defaultProps&&m("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",p,p),typeof d.getSnapshotBeforeUpdate=="function"&&typeof d.componentDidUpdate!="function"&&!Ae.has(s)&&(Ae.add(s),m("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",be(s))),typeof d.getDerivedStateFromProps=="function"&&m("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof d.getDerivedStateFromError=="function"&&m("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof s.getSnapshotBeforeUpdate=="function"&&m("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",p);var R=d.state;R&&(typeof R!="object"||ne(R))&&m("%s.state: must be set to an object or null",p),typeof d.getChildContext=="function"&&typeof s.childContextTypes!="object"&&m("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",p)}}function yt(i,s){s.updater=Je,i.stateNode=s,je(s,i),s._reactInternalInstance=B}function _r(i,s,u){var d=!1,p=un,S=un,E=s.contextType;if("contextType"in s){var R=E===null||E!==void 0&&E.$$typeof===ct&&E._context===void 0;if(!R&&!Re.has(s)){Re.add(s);var D="";E===void 0?D=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof E!="object"?D=" However, it is set to a "+typeof E+".":E.$$typeof===xt?D=" Did you accidentally pass the Context.Provider instead?":E._context!==void 0?D=" Did you accidentally pass the Context.Consumer instead?":D=" However, it is set to an object with keys {"+Object.keys(E).join(", ")+"}.",m("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",be(s)||"Component",D)}}if(typeof E=="object"&&E!==null)S=Ft(E);else{p=Zr(i,s,!0);var F=s.contextTypes;d=F!=null,S=d?Mr(i,p):un}if(i.mode&Mt){ji();try{new s(u,S)}finally{Ji()}}var W=new s(u,S),X=i.memoizedState=W.state!==null&&W.state!==void 0?W.state:null;yt(i,W);{if(typeof s.getDerivedStateFromProps=="function"&&X===null){var ee=be(s)||"Component";Ke.has(ee)||(Ke.add(ee),m("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",ee,W.state===null?"null":"undefined",ee))}if(typeof s.getDerivedStateFromProps=="function"||typeof W.getSnapshotBeforeUpdate=="function"){var he=null,ye=null,Ee=null;if(typeof W.componentWillMount=="function"&&W.componentWillMount.__suppressDeprecationWarning!==!0?he="componentWillMount":typeof W.UNSAFE_componentWillMount=="function"&&(he="UNSAFE_componentWillMount"),typeof W.componentWillReceiveProps=="function"&&W.componentWillReceiveProps.__suppressDeprecationWarning!==!0?ye="componentWillReceiveProps":typeof W.UNSAFE_componentWillReceiveProps=="function"&&(ye="UNSAFE_componentWillReceiveProps"),typeof W.componentWillUpdate=="function"&&W.componentWillUpdate.__suppressDeprecationWarning!==!0?Ee="componentWillUpdate":typeof W.UNSAFE_componentWillUpdate=="function"&&(Ee="UNSAFE_componentWillUpdate"),he!==null||ye!==null||Ee!==null){var Xe=be(s)||"Component",St=typeof s.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Pt.has(Xe)||(Pt.add(Xe),m(`Unsafe legacy lifecycles will not be called for components using new component APIs.
107
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,p)}finally{Fn()}}})},Vi.discardPendingWarnings=function(){Ao=[],Sa=[],ba=[],ir=[],Mo=[],Oo=[],au=new Map}}function rr(i,s){if(i&&i.defaultProps){var u=c({},s),d=i.defaultProps;for(var p in d)u[p]===void 0&&(u[p]=d[p]);return u}return s}var Do=1073741823,sr=Fi(null),Lo;Lo={};var ou=null,_s=null,Us=null,xa=!1;function Po(){ou=null,_s=null,Us=null,xa=!1}function lu(){xa=!0}function Lc(){xa=!1}function ko(i,s){var u=i.type._context;cn?(Sn(sr,u._currentValue,i),u._currentValue=s,u._currentRenderer!==void 0&&u._currentRenderer!==null&&u._currentRenderer!==Lo&&m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer=Lo):(Sn(sr,u._currentValue2,i),u._currentValue2=s,u._currentRenderer2!==void 0&&u._currentRenderer2!==null&&u._currentRenderer2!==Lo&&m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer2=Lo)}function uu(i){var s=sr.current;Ft(sr,i);var u=i.type._context;cn?u._currentValue=s:u._currentValue2=s}function Rv(i,s,u){if(Cn(u,s))return 0;var d=typeof i._calculateChangedBits=="function"?i._calculateChangedBits(u,s):Do;return(d&Do)!==d&&m("calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",d),d|0}function Mi(i,s){for(var u=i;u!==null;){var d=u.alternate;if(!is(u.childLanes,s))u.childLanes=Ct(u.childLanes,s),d!==null&&(d.childLanes=Ct(d.childLanes,s));else if(d!==null&&!is(d.childLanes,s))d.childLanes=Ct(d.childLanes,s);else break;u=u.return}}function Pc(i,s,u,d){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var S=void 0,E=p.dependencies;if(E!==null){S=p.child;for(var R=E.firstContext;R!==null;){if(R.context===s&&R.observedBits&u){if(p.tag===k){var D=as(on,ii(d));D.tag=wa,os(p,D)}p.lanes=Ct(p.lanes,d);var I=p.alternate;I!==null&&(I.lanes=Ct(I.lanes,d)),Mi(p.return,d),E.lanes=Ct(E.lanes,d);break}R=R.next}}else p.tag===B?S=p.type===i.type?null:p.child:S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===i){S=null;break}var V=S.sibling;if(V!==null){V.return=S.return,S=V;break}S=S.return}p=S}}function Ea(i,s){ou=i,_s=null,Us=null;var u=i.dependencies;if(u!==null){var d=u.firstContext;d!==null&&(jn(u.lanes,s)&&xm(),u.firstContext=null)}}function Ht(i,s){if(xa&&m("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Us!==i){if(!(s===!1||s===0)){var u;typeof s!="number"||s===Do?(Us=i,u=Do):u=s;var d={context:i,observedBits:u,next:null};if(_s===null){if(ou===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");_s=d,ou.dependencies={lanes:ce,firstContext:d,responders:null}}else _s=_s.next=d}}return cn?i._currentValue:i._currentValue2}var zo=0,js=1,wa=2,No=3,Ta=!1,kc,_o;kc=!1,_o=null;function cu(i){var s={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null};i.updateQueue=s}function Uo(i,s){var u=s.updateQueue,d=i.updateQueue;if(u===d){var p={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects};s.updateQueue=p}}function as(i,s){var u={eventTime:i,lane:s,tag:zo,payload:null,callback:null,next:null};return u}function os(i,s){var u=i.updateQueue;if(u!==null){var d=u.shared,p=d.pending;p===null?s.next=s:(s.next=p.next,p.next=s),d.pending=s,_o===d&&!kc&&(m("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),kc=!0)}}function a(i,s){var u=i.updateQueue,d=i.alternate;if(d!==null){var p=d.updateQueue;if(u===p){var S=null,E=null,R=u.firstBaseUpdate;if(R!==null){var D=R;do{var I={eventTime:D.eventTime,lane:D.lane,tag:D.tag,payload:D.payload,callback:D.callback,next:null};E===null?S=E=I:(E.next=I,E=I),D=D.next}while(D!==null);E===null?S=E=s:(E.next=s,E=s)}else S=E=s;u={baseState:p.baseState,firstBaseUpdate:S,lastBaseUpdate:E,shared:p.shared,effects:p.effects},i.updateQueue=u;return}}var V=u.lastBaseUpdate;V===null?u.firstBaseUpdate=s:V.next=s,u.lastBaseUpdate=s}function l(i,s,u,d,p,S){switch(u.tag){case js:{var E=u.payload;if(typeof E=="function"){lu();var R=E.call(S,d,p);{if(i.mode&Mt){Ii();try{E.call(S,d,p)}finally{Ji()}}Lc()}return R}return E}case No:i.flags=i.flags&~Ei|nt;case zo:{var D=u.payload,I;if(typeof D=="function"){lu(),I=D.call(S,d,p);{if(i.mode&Mt){Ii();try{D.call(S,d,p)}finally{Ji()}}Lc()}}else I=D;return I==null?d:c({},d,I)}case wa:return Ta=!0,d}return d}function f(i,s,u,d){var p=i.updateQueue;Ta=!1,_o=p.shared;var S=p.firstBaseUpdate,E=p.lastBaseUpdate,R=p.shared.pending;if(R!==null){p.shared.pending=null;var D=R,I=D.next;D.next=null,E===null?S=I:E.next=I,E=D;var V=i.alternate;if(V!==null){var K=V.updateQueue,ee=K.lastBaseUpdate;ee!==E&&(ee===null?K.firstBaseUpdate=I:ee.next=I,K.lastBaseUpdate=D)}}if(S!==null){var pe=p.baseState,ge=ce,Ee=null,Ze=null,gt=null,rt=S;do{var Zt=rt.lane,Tn=rt.eventTime;if(is(d,Zt)){if(gt!==null){var oe={eventTime:Tn,lane:$n,tag:rt.tag,payload:rt.payload,callback:rt.callback,next:null};gt=gt.next=oe}pe=l(i,p,rt,pe,s,u);var Y=rt.callback;if(Y!==null){i.flags|=Lt;var ve=p.effects;ve===null?p.effects=[rt]:ve.push(rt)}}else{var Z={eventTime:Tn,lane:Zt,tag:rt.tag,payload:rt.payload,callback:rt.callback,next:null};gt===null?(Ze=gt=Z,Ee=pe):gt=gt.next=Z,ge=Ct(ge,Zt)}if(rt=rt.next,rt===null){if(R=p.shared.pending,R===null)break;var Le=R,_e=Le.next;Le.next=null,rt=_e,p.lastBaseUpdate=Le,p.shared.pending=null}}while(!0);gt===null&&(Ee=pe),p.baseState=Ee,p.firstBaseUpdate=Ze,p.lastBaseUpdate=gt,Ym(ge),i.lanes=ge,i.memoizedState=pe}_o=null}function y(i,s){if(typeof i!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+i);i.call(s)}function b(){Ta=!1}function T(){return Ta}function N(i,s,u){var d=s.effects;if(s.effects=null,d!==null)for(var p=0;p<d.length;p++){var S=d[p],E=S.callback;E!==null&&(S.callback=null,y(E,u))}}var F={},te=Array.isArray,xe=new o.Component().refs,Be,Je,Me,Pt,Qt,Oi,G,W,ne,Ae;{Be=new Set,Je=new Set,Me=new Set,Pt=new Set,W=new Set,Qt=new Set,ne=new Set,Ae=new Set;var He=new Set;G=function(i,s){if(!(i===null||typeof i=="function")){var u=s+"_"+i;He.has(u)||(He.add(u),m("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",s,i))}},Oi=function(i,s){if(s===void 0){var u=be(i)||"Component";Qt.has(u)||(Qt.add(u),m("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",u))}},Object.defineProperty(F,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(F)}function kt(i,s,u,d){var p=i.memoizedState;if(i.mode&Mt){Ii();try{u(d,p)}finally{Ji()}}var S=u(d,p);Oi(s,S);var E=S==null?p:c({},p,S);if(i.memoizedState=E,i.lanes===ce){var R=i.updateQueue;R.baseState=E}}var et={isMounted:ec,enqueueSetState:function(i,s,u){var d=se(i),p=Qi(),S=Oa(d),E=as(p,S);E.payload=s,u!=null&&(G(u,"setState"),E.callback=u),os(d,E),oi(d,S,p)},enqueueReplaceState:function(i,s,u){var d=se(i),p=Qi(),S=Oa(d),E=as(p,S);E.tag=js,E.payload=s,u!=null&&(G(u,"replaceState"),E.callback=u),os(d,E),oi(d,S,p)},enqueueForceUpdate:function(i,s){var u=se(i),d=Qi(),p=Oa(u),S=as(d,p);S.tag=wa,s!=null&&(G(s,"forceUpdate"),S.callback=s),os(u,S),oi(u,p,d)}};function Rt(i,s,u,d,p,S,E){var R=i.stateNode;if(typeof R.shouldComponentUpdate=="function"){if(i.mode&Mt){Ii();try{R.shouldComponentUpdate(d,S,E)}finally{Ji()}}var D=R.shouldComponentUpdate(d,S,E);return D===void 0&&m("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",be(s)||"Component"),D}return s.prototype&&s.prototype.isPureReactComponent?!ks(u,d)||!ks(p,S):!0}function En(i,s,u){var d=i.stateNode;{var p=be(s)||"Component",S=d.render;S||(s.prototype&&typeof s.prototype.render=="function"?m("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",p):m("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",p)),d.getInitialState&&!d.getInitialState.isReactClassApproved&&!d.state&&m("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",p),d.getDefaultProps&&!d.getDefaultProps.isReactClassApproved&&m("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",p),d.propTypes&&m("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",p),d.contextType&&m("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",p),d.contextTypes&&m("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",p),s.contextType&&s.contextTypes&&!ne.has(s)&&(ne.add(s),m("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",p)),typeof d.componentShouldUpdate=="function"&&m("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",p),s.prototype&&s.prototype.isPureReactComponent&&typeof d.shouldComponentUpdate<"u"&&m("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",be(s)||"A pure component"),typeof d.componentDidUnmount=="function"&&m("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",p),typeof d.componentDidReceiveProps=="function"&&m("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",p),typeof d.componentWillRecieveProps=="function"&&m("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",p),typeof d.UNSAFE_componentWillRecieveProps=="function"&&m("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",p);var E=d.props!==u;d.props!==void 0&&E&&m("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",p,p),d.defaultProps&&m("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",p,p),typeof d.getSnapshotBeforeUpdate=="function"&&typeof d.componentDidUpdate!="function"&&!Me.has(s)&&(Me.add(s),m("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",be(s))),typeof d.getDerivedStateFromProps=="function"&&m("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof d.getDerivedStateFromError=="function"&&m("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",p),typeof s.getSnapshotBeforeUpdate=="function"&&m("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",p);var R=d.state;R&&(typeof R!="object"||te(R))&&m("%s.state: must be set to an object or null",p),typeof d.getChildContext=="function"&&typeof s.childContextTypes!="object"&&m("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",p)}}function mt(i,s){s.updater=et,i.stateNode=s,je(s,i),s._reactInternalInstance=F}function _r(i,s,u){var d=!1,p=fn,S=fn,E=s.contextType;if("contextType"in s){var R=E===null||E!==void 0&&E.$$typeof===ht&&E._context===void 0;if(!R&&!Ae.has(s)){Ae.add(s);var D="";E===void 0?D=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof E!="object"?D=" However, it is set to a "+typeof E+".":E.$$typeof===wt?D=" Did you accidentally pass the Context.Provider instead?":E._context!==void 0?D=" Did you accidentally pass the Context.Consumer instead?":D=" However, it is set to an object with keys {"+Object.keys(E).join(", ")+"}.",m("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",be(s)||"Component",D)}}if(typeof E=="object"&&E!==null)S=Ht(E);else{p=Zr(i,s,!0);var I=s.contextTypes;d=I!=null,S=d?Mr(i,p):fn}if(i.mode&Mt){Ii();try{new s(u,S)}finally{Ji()}}var V=new s(u,S),K=i.memoizedState=V.state!==null&&V.state!==void 0?V.state:null;mt(i,V);{if(typeof s.getDerivedStateFromProps=="function"&&K===null){var ee=be(s)||"Component";Je.has(ee)||(Je.add(ee),m("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",ee,V.state===null?"null":"undefined",ee))}if(typeof s.getDerivedStateFromProps=="function"||typeof V.getSnapshotBeforeUpdate=="function"){var pe=null,ge=null,Ee=null;if(typeof V.componentWillMount=="function"&&V.componentWillMount.__suppressDeprecationWarning!==!0?pe="componentWillMount":typeof V.UNSAFE_componentWillMount=="function"&&(pe="UNSAFE_componentWillMount"),typeof V.componentWillReceiveProps=="function"&&V.componentWillReceiveProps.__suppressDeprecationWarning!==!0?ge="componentWillReceiveProps":typeof V.UNSAFE_componentWillReceiveProps=="function"&&(ge="UNSAFE_componentWillReceiveProps"),typeof V.componentWillUpdate=="function"&&V.componentWillUpdate.__suppressDeprecationWarning!==!0?Ee="componentWillUpdate":typeof V.UNSAFE_componentWillUpdate=="function"&&(Ee="UNSAFE_componentWillUpdate"),pe!==null||ge!==null||Ee!==null){var Ze=be(s)||"Component",gt=typeof s.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Pt.has(Ze)||(Pt.add(Ze),m(`Unsafe legacy lifecycles will not be called for components using new component APIs.
108
108
 
109
109
  %s uses %s but also contains the following legacy lifecycles:%s%s%s
110
110
 
111
111
  The above lifecycles should be removed. Learn more about this warning here:
112
- https://reactjs.org/link/unsafe-component-lifecycles`,Xe,St,he!==null?`
113
- `+he:"",ye!==null?`
114
- `+ye:"",Ee!==null?`
115
- `+Ee:""))}}}return d&&rn(i,p,S),W}function Av(i,s){var u=s.state;typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),u!==s.state&&(m("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",be(i.type)||"Component"),Je.enqueueReplaceState(s,s.state,null))}function DS(i,s,u,d){var p=s.state;if(typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==p){{var S=be(i.type)||"Component";Fe.has(S)||(Fe.add(S),m("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",S))}Je.enqueueReplaceState(s,s.state,null)}}function Mv(i,s,u,d){En(i,s,u);var p=i.stateNode;p.props=u,p.state=i.memoizedState,p.refs=xe,cu(i);var S=s.contextType;if(typeof S=="object"&&S!==null)p.context=Ft(S);else{var E=Zr(i,s,!0);p.context=Mr(i,E)}{if(p.state===u){var R=be(s)||"Component";V.has(R)||(V.add(R),m("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",R))}i.mode&Mt&&Vi.recordLegacyContextWarning(i,p),Vi.recordUnsafeLifecycleWarnings(i,p)}f(i,u,p,d),p.state=i.memoizedState;var D=s.getDerivedStateFromProps;typeof D=="function"&&(kt(i,s,D,u),p.state=i.memoizedState),typeof s.getDerivedStateFromProps!="function"&&typeof p.getSnapshotBeforeUpdate!="function"&&(typeof p.UNSAFE_componentWillMount=="function"||typeof p.componentWillMount=="function")&&(Av(i,p),f(i,u,p,d),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=et)}function fO(i,s,u,d){var p=i.stateNode,S=i.memoizedProps;p.props=S;var E=p.context,R=s.contextType,D=un;if(typeof R=="object"&&R!==null)D=Ft(R);else{var F=Zr(i,s,!0);D=Mr(i,F)}var W=s.getDerivedStateFromProps,X=typeof W=="function"||typeof p.getSnapshotBeforeUpdate=="function";!X&&(typeof p.UNSAFE_componentWillReceiveProps=="function"||typeof p.componentWillReceiveProps=="function")&&(S!==u||E!==D)&&DS(i,p,u,D),b();var ee=i.memoizedState,he=p.state=ee;if(f(i,u,p,d),he=i.memoizedState,S===u&&ee===he&&!Fi()&&!T())return typeof p.componentDidMount=="function"&&(i.flags|=et),!1;typeof W=="function"&&(kt(i,s,W,u),he=i.memoizedState);var ye=T()||Rt(i,s,S,u,ee,he,D);return ye?(!X&&(typeof p.UNSAFE_componentWillMount=="function"||typeof p.componentWillMount=="function")&&(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=et)):(typeof p.componentDidMount=="function"&&(i.flags|=et),i.memoizedProps=u,i.memoizedState=he),p.props=u,p.state=he,p.context=D,ye}function dO(i,s,u,d,p){var S=s.stateNode;Uo(i,s);var E=s.memoizedProps,R=s.type===s.elementType?E:rr(s.type,E);S.props=R;var D=s.pendingProps,F=S.context,W=u.contextType,X=un;if(typeof W=="object"&&W!==null)X=Ft(W);else{var ee=Zr(s,u,!0);X=Mr(s,ee)}var he=u.getDerivedStateFromProps,ye=typeof he=="function"||typeof S.getSnapshotBeforeUpdate=="function";!ye&&(typeof S.UNSAFE_componentWillReceiveProps=="function"||typeof S.componentWillReceiveProps=="function")&&(E!==D||F!==X)&&DS(s,S,d,X),b();var Ee=s.memoizedState,Xe=S.state=Ee;if(f(s,d,S,p),Xe=s.memoizedState,E===D&&Ee===Xe&&!Fi()&&!T())return typeof S.componentDidUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=et),typeof S.getSnapshotBeforeUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=Zt),!1;typeof he=="function"&&(kt(s,u,he,d),Xe=s.memoizedState);var St=T()||Rt(s,u,R,d,Ee,Xe,X);return St?(!ye&&(typeof S.UNSAFE_componentWillUpdate=="function"||typeof S.componentWillUpdate=="function")&&(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(d,Xe,X),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(d,Xe,X)),typeof S.componentDidUpdate=="function"&&(s.flags|=et),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=Zt)):(typeof S.componentDidUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=et),typeof S.getSnapshotBeforeUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=Zt),s.memoizedProps=d,s.memoizedState=Xe),S.props=d,S.state=Xe,S.context=X,St}var Ov,Dv,Lv,Pv,kv,LS=function(i,s){};Ov=!1,Dv=!1,Lv={},Pv={},kv={},LS=function(i,s){if(!(i===null||typeof i!="object")&&!(!i._store||i._store.validated||i.key!=null)){if(typeof i._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");i._store.validated=!0;var u=be(s.type)||"Component";Pv[u]||(Pv[u]=!0,m('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var Wd=Array.isArray;function zc(i,s,u){var d=u.ref;if(d!==null&&typeof d!="function"&&typeof d!="object"){if((i.mode&Mt||vl)&&!(u._owner&&u._self&&u._owner.stateNode!==u._self)){var p=be(i.type)||"Component";Lv[p]||(m('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d),Lv[p]=!0)}if(u._owner){var S=u._owner,E;if(S){var R=S;if(R.tag!==P)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");E=R.stateNode}if(!E)throw Error("Missing owner for string ref "+d+". This error is likely caused by a bug in React. Please file an issue.");var D=""+d;if(s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===D)return s.ref;var F=function(W){var X=E.refs;X===xe&&(X=E.refs={}),W===null?delete X[D]:X[D]=W};return F._stringRef=D,F}else{if(typeof d!="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!u._owner)throw Error("Element ref was specified as a string ("+d+`) but no owner was set. This could happen for one of the following reasons:
112
+ https://reactjs.org/link/unsafe-component-lifecycles`,Ze,gt,pe!==null?`
113
+ `+pe:"",ge!==null?`
114
+ `+ge:"",Ee!==null?`
115
+ `+Ee:""))}}}return d&&an(i,p,S),V}function Av(i,s){var u=s.state;typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),u!==s.state&&(m("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",be(i.type)||"Component"),et.enqueueReplaceState(s,s.state,null))}function DS(i,s,u,d){var p=s.state;if(typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==p){{var S=be(i.type)||"Component";Be.has(S)||(Be.add(S),m("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",S))}et.enqueueReplaceState(s,s.state,null)}}function Mv(i,s,u,d){En(i,s,u);var p=i.stateNode;p.props=u,p.state=i.memoizedState,p.refs=xe,cu(i);var S=s.contextType;if(typeof S=="object"&&S!==null)p.context=Ht(S);else{var E=Zr(i,s,!0);p.context=Mr(i,E)}{if(p.state===u){var R=be(s)||"Component";W.has(R)||(W.add(R),m("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",R))}i.mode&Mt&&Vi.recordLegacyContextWarning(i,p),Vi.recordUnsafeLifecycleWarnings(i,p)}f(i,u,p,d),p.state=i.memoizedState;var D=s.getDerivedStateFromProps;typeof D=="function"&&(kt(i,s,D,u),p.state=i.memoizedState),typeof s.getDerivedStateFromProps!="function"&&typeof p.getSnapshotBeforeUpdate!="function"&&(typeof p.UNSAFE_componentWillMount=="function"||typeof p.componentWillMount=="function")&&(Av(i,p),f(i,u,p,d),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=tt)}function fO(i,s,u,d){var p=i.stateNode,S=i.memoizedProps;p.props=S;var E=p.context,R=s.contextType,D=fn;if(typeof R=="object"&&R!==null)D=Ht(R);else{var I=Zr(i,s,!0);D=Mr(i,I)}var V=s.getDerivedStateFromProps,K=typeof V=="function"||typeof p.getSnapshotBeforeUpdate=="function";!K&&(typeof p.UNSAFE_componentWillReceiveProps=="function"||typeof p.componentWillReceiveProps=="function")&&(S!==u||E!==D)&&DS(i,p,u,D),b();var ee=i.memoizedState,pe=p.state=ee;if(f(i,u,p,d),pe=i.memoizedState,S===u&&ee===pe&&!Bi()&&!T())return typeof p.componentDidMount=="function"&&(i.flags|=tt),!1;typeof V=="function"&&(kt(i,s,V,u),pe=i.memoizedState);var ge=T()||Rt(i,s,S,u,ee,pe,D);return ge?(!K&&(typeof p.UNSAFE_componentWillMount=="function"||typeof p.componentWillMount=="function")&&(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=tt)):(typeof p.componentDidMount=="function"&&(i.flags|=tt),i.memoizedProps=u,i.memoizedState=pe),p.props=u,p.state=pe,p.context=D,ge}function dO(i,s,u,d,p){var S=s.stateNode;Uo(i,s);var E=s.memoizedProps,R=s.type===s.elementType?E:rr(s.type,E);S.props=R;var D=s.pendingProps,I=S.context,V=u.contextType,K=fn;if(typeof V=="object"&&V!==null)K=Ht(V);else{var ee=Zr(s,u,!0);K=Mr(s,ee)}var pe=u.getDerivedStateFromProps,ge=typeof pe=="function"||typeof S.getSnapshotBeforeUpdate=="function";!ge&&(typeof S.UNSAFE_componentWillReceiveProps=="function"||typeof S.componentWillReceiveProps=="function")&&(E!==D||I!==K)&&DS(s,S,d,K),b();var Ee=s.memoizedState,Ze=S.state=Ee;if(f(s,d,S,p),Ze=s.memoizedState,E===D&&Ee===Ze&&!Bi()&&!T())return typeof S.componentDidUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=tt),typeof S.getSnapshotBeforeUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=Jt),!1;typeof pe=="function"&&(kt(s,u,pe,d),Ze=s.memoizedState);var gt=T()||Rt(s,u,R,d,Ee,Ze,K);return gt?(!ge&&(typeof S.UNSAFE_componentWillUpdate=="function"||typeof S.componentWillUpdate=="function")&&(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(d,Ze,K),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(d,Ze,K)),typeof S.componentDidUpdate=="function"&&(s.flags|=tt),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=Jt)):(typeof S.componentDidUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=tt),typeof S.getSnapshotBeforeUpdate=="function"&&(E!==i.memoizedProps||Ee!==i.memoizedState)&&(s.flags|=Jt),s.memoizedProps=d,s.memoizedState=Ze),S.props=d,S.state=Ze,S.context=K,gt}var Ov,Dv,Lv,Pv,kv,LS=function(i,s){};Ov=!1,Dv=!1,Lv={},Pv={},kv={},LS=function(i,s){if(!(i===null||typeof i!="object")&&!(!i._store||i._store.validated||i.key!=null)){if(typeof i._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");i._store.validated=!0;var u=be(s.type)||"Component";Pv[u]||(Pv[u]=!0,m('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var Vd=Array.isArray;function zc(i,s,u){var d=u.ref;if(d!==null&&typeof d!="function"&&typeof d!="object"){if((i.mode&Mt||vl)&&!(u._owner&&u._self&&u._owner.stateNode!==u._self)){var p=be(i.type)||"Component";Lv[p]||(m('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d),Lv[p]=!0)}if(u._owner){var S=u._owner,E;if(S){var R=S;if(R.tag!==k)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");E=R.stateNode}if(!E)throw Error("Missing owner for string ref "+d+". This error is likely caused by a bug in React. Please file an issue.");var D=""+d;if(s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===D)return s.ref;var I=function(V){var K=E.refs;K===xe&&(K=E.refs={}),V===null?delete K[D]:K[D]=V};return I._stringRef=D,I}else{if(typeof d!="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!u._owner)throw Error("Element ref was specified as a string ("+d+`) but no owner was set. This could happen for one of the following reasons:
116
116
  1. You may be adding a ref to a function component
117
117
  2. You may be adding a ref to a component that was not created inside a component's render method
118
118
  3. You have multiple copies of React loaded
119
- See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return d}function $d(i,s){if(i.type!=="textarea")throw Error("Objects are not valid as a React child (found: "+(Object.prototype.toString.call(s)==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}function qd(i){{var s=be(i.type)||"Component";if(kv[s])return;kv[s]=!0,m("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function PS(i){function s(K,oe){if(i){var Y=K.lastEffect;Y!==null?(Y.nextEffect=oe,K.lastEffect=oe):K.firstEffect=K.lastEffect=oe,oe.nextEffect=null,oe.flags=Pe}}function u(K,oe){if(!i)return null;for(var Y=oe;Y!==null;)s(K,Y),Y=Y.sibling;return null}function d(K,oe){for(var Y=new Map,ve=oe;ve!==null;)ve.key!==null?Y.set(ve.key,ve):Y.set(ve.index,ve),ve=ve.sibling;return Y}function p(K,oe){var Y=Zo(K,oe);return Y.index=0,Y.sibling=null,Y}function S(K,oe,Y){if(K.index=Y,!i)return oe;var ve=K.alternate;if(ve!==null){var De=ve.index;return De<oe?(K.flags=Dt,oe):De}else return K.flags=Dt,oe}function E(K){return i&&K.alternate===null&&(K.flags=Dt),K}function R(K,oe,Y,ve){if(oe===null||oe.tag!==O){var De=ug(Y,K.mode,ve);return De.return=K,De}else{var ze=p(oe,Y);return ze.return=K,ze}}function D(K,oe,Y,ve){if(oe!==null&&(oe.elementType===Y.type||gx(oe,Y))){var De=p(oe,Y.props);return De.ref=zc(K,oe,Y),De.return=K,De._debugSource=Y._source,De._debugOwner=Y._owner,De}var ze=og(Y,K.mode,ve);return ze.ref=zc(K,oe,Y),ze.return=K,ze}function F(K,oe,Y,ve){if(oe===null||oe.tag!==L||oe.stateNode.containerInfo!==Y.containerInfo||oe.stateNode.implementation!==Y.implementation){var De=cg(Y,K.mode,ve);return De.return=K,De}else{var ze=p(oe,Y.children||[]);return ze.return=K,ze}}function W(K,oe,Y,ve,De){if(oe===null||oe.tag!==I){var ze=Jo(Y,K.mode,ve,De);return ze.return=K,ze}else{var bt=p(oe,Y);return bt.return=K,bt}}function X(K,oe,Y){if(typeof oe=="string"||typeof oe=="number"){var ve=ug(""+oe,K.mode,Y);return ve.return=K,ve}if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case He:{var De=og(oe,K.mode,Y);return De.ref=zc(K,null,oe),De.return=K,De}case ut:{var ze=cg(oe,K.mode,Y);return ze.return=K,ze}}if(Wd(oe)||Ve(oe)){var bt=Jo(oe,K.mode,Y,null);return bt.return=K,bt}$d(K,oe)}return typeof oe=="function"&&qd(K),null}function ee(K,oe,Y,ve){var De=oe!==null?oe.key:null;if(typeof Y=="string"||typeof Y=="number")return De!==null?null:R(K,oe,""+Y,ve);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case He:return Y.key===De?Y.type===pt?W(K,oe,Y.props.children,ve,De):D(K,oe,Y,ve):null;case ut:return Y.key===De?F(K,oe,Y,ve):null}if(Wd(Y)||Ve(Y))return De!==null?null:W(K,oe,Y,ve,null);$d(K,Y)}return typeof Y=="function"&&qd(K),null}function he(K,oe,Y,ve,De){if(typeof ve=="string"||typeof ve=="number"){var ze=K.get(Y)||null;return R(oe,ze,""+ve,De)}if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case He:{var bt=K.get(ve.key===null?Y:ve.key)||null;return ve.type===pt?W(oe,bt,ve.props.children,De,ve.key):D(oe,bt,ve,De)}case ut:{var tn=K.get(ve.key===null?Y:ve.key)||null;return F(oe,tn,ve,De)}}if(Wd(ve)||Ve(ve)){var fn=K.get(Y)||null;return W(oe,fn,ve,De,null)}$d(oe,ve)}return typeof ve=="function"&&qd(oe),null}function ye(K,oe,Y){{if(typeof K!="object"||K===null)return oe;switch(K.$$typeof){case He:case ut:LS(K,Y);var ve=K.key;if(typeof ve!="string")break;if(oe===null){oe=new Set,oe.add(ve);break}if(!oe.has(ve)){oe.add(ve);break}m("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",ve);break}}return oe}function Ee(K,oe,Y,ve){for(var De=null,ze=0;ze<Y.length;ze++){var bt=Y[ze];De=ye(bt,De,K)}for(var tn=null,fn=null,Nt=oe,Pn=0,Ot=0,dn=null;Nt!==null&&Ot<Y.length;Ot++){Nt.index>Ot?(dn=Nt,Nt=null):dn=Nt.sibling;var Xn=ee(K,Nt,Y[Ot],ve);if(Xn===null){Nt===null&&(Nt=dn);break}i&&Nt&&Xn.alternate===null&&s(K,Nt),Pn=S(Xn,Pn,Ot),fn===null?tn=Xn:fn.sibling=Xn,fn=Xn,Nt=dn}if(Ot===Y.length)return u(K,Nt),tn;if(Nt===null){for(;Ot<Y.length;Ot++){var Rn=X(K,Y[Ot],ve);Rn!==null&&(Pn=S(Rn,Pn,Ot),fn===null?tn=Rn:fn.sibling=Rn,fn=Rn)}return tn}for(var ds=d(K,Nt);Ot<Y.length;Ot++){var An=he(ds,K,Ot,Y[Ot],ve);An!==null&&(i&&An.alternate!==null&&ds.delete(An.key===null?Ot:An.key),Pn=S(An,Pn,Ot),fn===null?tn=An:fn.sibling=An,fn=An)}return i&&ds.forEach(function(hs){return s(K,hs)}),tn}function Xe(K,oe,Y,ve){var De=Ve(Y);if(typeof De!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&Y[Symbol.toStringTag]==="Generator"&&(Dv||m("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Dv=!0),Y.entries===De&&(Ov||m("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ov=!0);var ze=De.call(Y);if(ze)for(var bt=null,tn=ze.next();!tn.done;tn=ze.next()){var fn=tn.value;bt=ye(fn,bt,K)}}var Nt=De.call(Y);if(Nt==null)throw Error("An iterable object provided no iterator.");for(var Pn=null,Ot=null,dn=oe,Xn=0,Rn=0,ds=null,An=Nt.next();dn!==null&&!An.done;Rn++,An=Nt.next()){dn.index>Rn?(ds=dn,dn=null):ds=dn.sibling;var hs=ee(K,dn,An.value,ve);if(hs===null){dn===null&&(dn=ds);break}i&&dn&&hs.alternate===null&&s(K,dn),Xn=S(hs,Xn,Rn),Ot===null?Pn=hs:Ot.sibling=hs,Ot=hs,dn=ds}if(An.done)return u(K,dn),Pn;if(dn===null){for(;!An.done;Rn++,An=Nt.next()){var el=X(K,An.value,ve);el!==null&&(Xn=S(el,Xn,Rn),Ot===null?Pn=el:Ot.sibling=el,Ot=el)}return Pn}for(var pg=d(K,dn);!An.done;Rn++,An=Nt.next()){var Pa=he(pg,K,Rn,An.value,ve);Pa!==null&&(i&&Pa.alternate!==null&&pg.delete(Pa.key===null?Rn:Pa.key),Xn=S(Pa,Xn,Rn),Ot===null?Pn=Pa:Ot.sibling=Pa,Ot=Pa)}return i&&pg.forEach(function(hP){return s(K,hP)}),Pn}function St(K,oe,Y,ve){if(oe!==null&&oe.tag===O){u(K,oe.sibling);var De=p(oe,Y);return De.return=K,De}u(K,oe);var ze=ug(Y,K.mode,ve);return ze.return=K,ze}function it(K,oe,Y,ve){for(var De=Y.key,ze=oe;ze!==null;){if(ze.key===De){switch(ze.tag){case I:{if(Y.type===pt){u(K,ze.sibling);var bt=p(ze,Y.props.children);return bt.return=K,bt._debugSource=Y._source,bt._debugOwner=Y._owner,bt}break}case Z:default:{if(ze.elementType===Y.type||gx(ze,Y)){u(K,ze.sibling);var tn=p(ze,Y.props);return tn.ref=zc(K,ze,Y),tn.return=K,tn._debugSource=Y._source,tn._debugOwner=Y._owner,tn}break}}u(K,ze);break}else s(K,ze);ze=ze.sibling}if(Y.type===pt){var fn=Jo(Y.props.children,K.mode,ve,Y.key);return fn.return=K,fn}else{var Nt=og(Y,K.mode,ve);return Nt.ref=zc(K,oe,Y),Nt.return=K,Nt}}function Xt(K,oe,Y,ve){for(var De=Y.key,ze=oe;ze!==null;){if(ze.key===De)if(ze.tag===L&&ze.stateNode.containerInfo===Y.containerInfo&&ze.stateNode.implementation===Y.implementation){u(K,ze.sibling);var bt=p(ze,Y.children||[]);return bt.return=K,bt}else{u(K,ze);break}else s(K,ze);ze=ze.sibling}var tn=cg(Y,K.mode,ve);return tn.return=K,tn}function Tn(K,oe,Y,ve){var De=typeof Y=="object"&&Y!==null&&Y.type===pt&&Y.key===null;De&&(Y=Y.props.children);var ze=typeof Y=="object"&&Y!==null;if(ze)switch(Y.$$typeof){case He:return E(it(K,oe,Y,ve));case ut:return E(Xt(K,oe,Y,ve))}if(typeof Y=="string"||typeof Y=="number")return E(St(K,oe,""+Y,ve));if(Wd(Y))return Ee(K,oe,Y,ve);if(Ve(Y))return Xe(K,oe,Y,ve);if(ze&&$d(K,Y),typeof Y=="function"&&qd(K),typeof Y>"u"&&!De)switch(K.tag){case P:{var bt=K.stateNode;if(bt.render._isMockFunction)break}case Z:case A:case J:case ge:throw Error((be(K.type)||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}return u(K,oe)}return Tn}var Yd=PS(!0),kS=PS(!1);function hO(i,s){if(!(i===null||s.child===i.child))throw Error("Resuming work not yet implemented.");if(s.child!==null){var u=s.child,d=Zo(u,u.pendingProps);for(s.child=d,d.return=s;u.sibling!==null;)u=u.sibling,d=d.sibling=Zo(u,u.pendingProps),d.return=s;d.sibling=null}}function pO(i,s){for(var u=i.child;u!==null;)BL(u,s),u=u.sibling}var Nc={},Ca=Ii(Nc),_c=Ii(Nc),Qd=Ii(Nc);function Gd(i){if(i===Nc)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return i}function zv(){var i=Gd(Qd.current);return i}function Nv(i,s){Sn(Qd,s,i),Sn(_c,i,i),Sn(Ca,Nc,i);var u=Et(s);jt(Ca,i),Sn(Ca,u,i)}function fu(i){jt(Ca,i),jt(_c,i),jt(Qd,i)}function Uc(){var i=Gd(Ca.current);return i}function zS(i){var s=Gd(Qd.current),u=Gd(Ca.current),d=At(u,i.type,s);u!==d&&(Sn(_c,i,i),Sn(Ca,d,i))}function _v(i){_c.current===i&&(jt(Ca,i),jt(_c,i))}var vO=0,NS=1,Uv=1,jc=2,Ur=Ii(vO);function Xd(i,s){return(i&s)!==0}function Ic(i){return i&NS}function jv(i,s){return i&NS|s}function mO(i,s){return i|s}function jo(i,s){Sn(Ur,s,i)}function du(i){jt(Ur,i)}function gO(i,s){var u=i.memoizedState;if(u!==null)return u.dehydrated!==null;var d=i.memoizedProps;return d.fallback===void 0?!1:d.unstable_avoidThisFallback!==!0?!0:!s}function Kd(i){for(var s=i;s!==null;){if(s.tag===$){var u=s.memoizedState;if(u!==null){var d=u.dehydrated;if(d===null||Tl(d)||lc(d))return s}}else if(s.tag===_e&&s.memoizedProps.revealOrder!==void 0){var p=(s.flags&tt)!==at;if(p)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)return null;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Iv=0,Io=1,Fo=2,Fc=4,mr=null,Bo=null,Ra=!1;function yO(i){if(!Jt)return!1;var s=i.stateNode.containerInfo;return Bo=On(s),mr=i,Ra=!0,!0}function _S(i,s){switch(i.tag){case _:gv(i.stateNode.containerInfo,s);break;case k:Ui(i.type,i.memoizedProps,i.stateNode,s);break}var u=YL();u.stateNode=s,u.return=i,u.flags=Pe,i.lastEffect!==null?(i.lastEffect.nextEffect=u,i.lastEffect=u):i.firstEffect=i.lastEffect=u}function US(i,s){switch(s.flags=s.flags&~bi|Dt,i.tag){case _:{var u=i.stateNode.containerInfo;switch(s.tag){case k:var d=s.type,p=s.pendingProps;yv(u,d,p);break;case O:var S=s.pendingProps;Rl(u,S);break;case $:Sv(u);break}break}case k:{var E=i.type,R=i.memoizedProps,D=i.stateNode;switch(s.tag){case k:var F=s.type,W=s.pendingProps;Zi(E,R,D,F,W);break;case O:var X=s.pendingProps;Al(E,R,D,X);break;case $:Ml(E,R,D);break}break}default:return}}function jS(i,s){switch(i.tag){case k:{var u=i.type,d=i.pendingProps,p=vv(s,u,d);return p!==null?(i.stateNode=p,!0):!1}case O:{var S=i.pendingProps,E=Tr(s,S);return E!==null?(i.stateNode=E,!0):!1}case $:return!1;default:return!1}}function Fv(i){if(Ra){var s=Bo;if(!s){US(mr,i),Ra=!1,mr=i;return}var u=s;if(!jS(i,s)){if(s=Cl(u),!s||!jS(i,s)){US(mr,i),Ra=!1,mr=i;return}_S(mr,u)}mr=i,Bo=On(s)}}function SO(i,s,u){if(!Jt)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var d=i.stateNode,p=sa(d,i.type,i.memoizedProps,s,u,i);return i.updateQueue=p,p!==null}function bO(i){if(!Jt)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var s=i.stateNode,u=i.memoizedProps,d=Rd(s,u,i);if(d){var p=mr;if(p!==null)switch(p.tag){case _:{var S=p.stateNode.containerInfo;Ad(S,s,u);break}case k:{var E=p.type,R=p.memoizedProps,D=p.stateNode;mv(E,R,D,s,u);break}}}return d}function xO(i){if(!Jt)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var s=i.memoizedState,u=s!==null?s.dehydrated:null;if(!u)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return Cr(u)}function IS(i){for(var s=i.return;s!==null&&s.tag!==k&&s.tag!==_&&s.tag!==$;)s=s.return;mr=s}function Zd(i){if(!Jt||i!==mr)return!1;if(!Ra)return IS(i),Ra=!0,!1;var s=i.type;if(i.tag!==k||s!=="head"&&s!=="body"&&!Zn(s,i.memoizedProps))for(var u=Bo;u;)_S(i,u),u=Cl(u);return IS(i),i.tag===$?Bo=xO(i):Bo=mr?Cl(i.stateNode):null,!0}function Bv(){Jt&&(mr=null,Bo=null,Ra=!1)}function Hv(){return Ra}var Bc=[],Hc;Hc={};function EO(i){Bc.push(i)}function Vv(){for(var i=0;i<Bc.length;i++){var s=Bc[i];ln?s._workInProgressVersionPrimary=null:s._workInProgressVersionSecondary=null}Bc.length=0}function wO(i){return ln?i._workInProgressVersionPrimary:i._workInProgressVersionSecondary}function FS(i,s){ln?i._workInProgressVersionPrimary=s:i._workInProgressVersionSecondary=s,Bc.push(i)}function TO(i){ln?i._currentPrimaryRenderer==null?i._currentPrimaryRenderer=Hc:i._currentPrimaryRenderer!==Hc&&m("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported."):i._currentSecondaryRenderer==null?i._currentSecondaryRenderer=Hc:i._currentSecondaryRenderer!==Hc&&m("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported.")}var Me=g.ReactCurrentDispatcher,gr=g.ReactCurrentBatchConfig,Wv,$v;$v={},Wv=new Set;var Vc=ue,Gt=null,vi=null,Gn=null,Jd=!1,Wc=!1,CO=25,ce=null,yr=null,Aa=-1,qv=!1;function Yt(){{var i=ce;yr===null?yr=[i]:yr.push(i)}}function Le(){{var i=ce;yr!==null&&(Aa++,yr[Aa]!==i&&RO(i))}}function $c(i){i!=null&&!Array.isArray(i)&&m("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ce,typeof i)}function RO(i){{var s=be(Gt.type);if(!Wv.has(s)&&(Wv.add(s),yr!==null)){for(var u="",d=30,p=0;p<=Aa;p++){for(var S=yr[p],E=p===Aa?i:S,R=p+1+". "+S;R.length<d;)R+=" ";R+=E+`
119
+ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return d}function $d(i,s){if(i.type!=="textarea")throw Error("Objects are not valid as a React child (found: "+(Object.prototype.toString.call(s)==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}function qd(i){{var s=be(i.type)||"Component";if(kv[s])return;kv[s]=!0,m("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function PS(i){function s(Z,oe){if(i){var Y=Z.lastEffect;Y!==null?(Y.nextEffect=oe,Z.lastEffect=oe):Z.firstEffect=Z.lastEffect=oe,oe.nextEffect=null,oe.flags=ze}}function u(Z,oe){if(!i)return null;for(var Y=oe;Y!==null;)s(Z,Y),Y=Y.sibling;return null}function d(Z,oe){for(var Y=new Map,ve=oe;ve!==null;)ve.key!==null?Y.set(ve.key,ve):Y.set(ve.index,ve),ve=ve.sibling;return Y}function p(Z,oe){var Y=Zo(Z,oe);return Y.index=0,Y.sibling=null,Y}function S(Z,oe,Y){if(Z.index=Y,!i)return oe;var ve=Z.alternate;if(ve!==null){var Le=ve.index;return Le<oe?(Z.flags=Dt,oe):Le}else return Z.flags=Dt,oe}function E(Z){return i&&Z.alternate===null&&(Z.flags=Dt),Z}function R(Z,oe,Y,ve){if(oe===null||oe.tag!==O){var Le=ug(Y,Z.mode,ve);return Le.return=Z,Le}else{var _e=p(oe,Y);return _e.return=Z,_e}}function D(Z,oe,Y,ve){if(oe!==null&&(oe.elementType===Y.type||gx(oe,Y))){var Le=p(oe,Y.props);return Le.ref=zc(Z,oe,Y),Le.return=Z,Le._debugSource=Y._source,Le._debugOwner=Y._owner,Le}var _e=og(Y,Z.mode,ve);return _e.ref=zc(Z,oe,Y),_e.return=Z,_e}function I(Z,oe,Y,ve){if(oe===null||oe.tag!==L||oe.stateNode.containerInfo!==Y.containerInfo||oe.stateNode.implementation!==Y.implementation){var Le=cg(Y,Z.mode,ve);return Le.return=Z,Le}else{var _e=p(oe,Y.children||[]);return _e.return=Z,_e}}function V(Z,oe,Y,ve,Le){if(oe===null||oe.tag!==H){var _e=Jo(Y,Z.mode,ve,Le);return _e.return=Z,_e}else{var yt=p(oe,Y);return yt.return=Z,yt}}function K(Z,oe,Y){if(typeof oe=="string"||typeof oe=="number"){var ve=ug(""+oe,Z.mode,Y);return ve.return=Z,ve}if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case qe:{var Le=og(oe,Z.mode,Y);return Le.ref=zc(Z,null,oe),Le.return=Z,Le}case ct:{var _e=cg(oe,Z.mode,Y);return _e.return=Z,_e}}if(Vd(oe)||Ve(oe)){var yt=Jo(oe,Z.mode,Y,null);return yt.return=Z,yt}$d(Z,oe)}return typeof oe=="function"&&qd(Z),null}function ee(Z,oe,Y,ve){var Le=oe!==null?oe.key:null;if(typeof Y=="string"||typeof Y=="number")return Le!==null?null:R(Z,oe,""+Y,ve);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case qe:return Y.key===Le?Y.type===dt?V(Z,oe,Y.props.children,ve,Le):D(Z,oe,Y,ve):null;case ct:return Y.key===Le?I(Z,oe,Y,ve):null}if(Vd(Y)||Ve(Y))return Le!==null?null:V(Z,oe,Y,ve,null);$d(Z,Y)}return typeof Y=="function"&&qd(Z),null}function pe(Z,oe,Y,ve,Le){if(typeof ve=="string"||typeof ve=="number"){var _e=Z.get(Y)||null;return R(oe,_e,""+ve,Le)}if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case qe:{var yt=Z.get(ve.key===null?Y:ve.key)||null;return ve.type===dt?V(oe,yt,ve.props.children,Le,ve.key):D(oe,yt,ve,Le)}case ct:{var nn=Z.get(ve.key===null?Y:ve.key)||null;return I(oe,nn,ve,Le)}}if(Vd(ve)||Ve(ve)){var hn=Z.get(Y)||null;return V(oe,hn,ve,Le,null)}$d(oe,ve)}return typeof ve=="function"&&qd(oe),null}function ge(Z,oe,Y){{if(typeof Z!="object"||Z===null)return oe;switch(Z.$$typeof){case qe:case ct:LS(Z,Y);var ve=Z.key;if(typeof ve!="string")break;if(oe===null){oe=new Set,oe.add(ve);break}if(!oe.has(ve)){oe.add(ve);break}m("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",ve);break}}return oe}function Ee(Z,oe,Y,ve){for(var Le=null,_e=0;_e<Y.length;_e++){var yt=Y[_e];Le=ge(yt,Le,Z)}for(var nn=null,hn=null,Nt=oe,Pn=0,Ot=0,pn=null;Nt!==null&&Ot<Y.length;Ot++){Nt.index>Ot?(pn=Nt,Nt=null):pn=Nt.sibling;var Kn=ee(Z,Nt,Y[Ot],ve);if(Kn===null){Nt===null&&(Nt=pn);break}i&&Nt&&Kn.alternate===null&&s(Z,Nt),Pn=S(Kn,Pn,Ot),hn===null?nn=Kn:hn.sibling=Kn,hn=Kn,Nt=pn}if(Ot===Y.length)return u(Z,Nt),nn;if(Nt===null){for(;Ot<Y.length;Ot++){var Rn=K(Z,Y[Ot],ve);Rn!==null&&(Pn=S(Rn,Pn,Ot),hn===null?nn=Rn:hn.sibling=Rn,hn=Rn)}return nn}for(var ds=d(Z,Nt);Ot<Y.length;Ot++){var An=pe(ds,Z,Ot,Y[Ot],ve);An!==null&&(i&&An.alternate!==null&&ds.delete(An.key===null?Ot:An.key),Pn=S(An,Pn,Ot),hn===null?nn=An:hn.sibling=An,hn=An)}return i&&ds.forEach(function(hs){return s(Z,hs)}),nn}function Ze(Z,oe,Y,ve){var Le=Ve(Y);if(typeof Le!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&Y[Symbol.toStringTag]==="Generator"&&(Dv||m("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Dv=!0),Y.entries===Le&&(Ov||m("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ov=!0);var _e=Le.call(Y);if(_e)for(var yt=null,nn=_e.next();!nn.done;nn=_e.next()){var hn=nn.value;yt=ge(hn,yt,Z)}}var Nt=Le.call(Y);if(Nt==null)throw Error("An iterable object provided no iterator.");for(var Pn=null,Ot=null,pn=oe,Kn=0,Rn=0,ds=null,An=Nt.next();pn!==null&&!An.done;Rn++,An=Nt.next()){pn.index>Rn?(ds=pn,pn=null):ds=pn.sibling;var hs=ee(Z,pn,An.value,ve);if(hs===null){pn===null&&(pn=ds);break}i&&pn&&hs.alternate===null&&s(Z,pn),Kn=S(hs,Kn,Rn),Ot===null?Pn=hs:Ot.sibling=hs,Ot=hs,pn=ds}if(An.done)return u(Z,pn),Pn;if(pn===null){for(;!An.done;Rn++,An=Nt.next()){var el=K(Z,An.value,ve);el!==null&&(Kn=S(el,Kn,Rn),Ot===null?Pn=el:Ot.sibling=el,Ot=el)}return Pn}for(var pg=d(Z,pn);!An.done;Rn++,An=Nt.next()){var Pa=pe(pg,Z,Rn,An.value,ve);Pa!==null&&(i&&Pa.alternate!==null&&pg.delete(Pa.key===null?Rn:Pa.key),Kn=S(Pa,Kn,Rn),Ot===null?Pn=Pa:Ot.sibling=Pa,Ot=Pa)}return i&&pg.forEach(function(hP){return s(Z,hP)}),Pn}function gt(Z,oe,Y,ve){if(oe!==null&&oe.tag===O){u(Z,oe.sibling);var Le=p(oe,Y);return Le.return=Z,Le}u(Z,oe);var _e=ug(Y,Z.mode,ve);return _e.return=Z,_e}function rt(Z,oe,Y,ve){for(var Le=Y.key,_e=oe;_e!==null;){if(_e.key===Le){switch(_e.tag){case H:{if(Y.type===dt){u(Z,_e.sibling);var yt=p(_e,Y.props.children);return yt.return=Z,yt._debugSource=Y._source,yt._debugOwner=Y._owner,yt}break}case Te:default:{if(_e.elementType===Y.type||gx(_e,Y)){u(Z,_e.sibling);var nn=p(_e,Y.props);return nn.ref=zc(Z,_e,Y),nn.return=Z,nn._debugSource=Y._source,nn._debugOwner=Y._owner,nn}break}}u(Z,_e);break}else s(Z,_e);_e=_e.sibling}if(Y.type===dt){var hn=Jo(Y.props.children,Z.mode,ve,Y.key);return hn.return=Z,hn}else{var Nt=og(Y,Z.mode,ve);return Nt.ref=zc(Z,oe,Y),Nt.return=Z,Nt}}function Zt(Z,oe,Y,ve){for(var Le=Y.key,_e=oe;_e!==null;){if(_e.key===Le)if(_e.tag===L&&_e.stateNode.containerInfo===Y.containerInfo&&_e.stateNode.implementation===Y.implementation){u(Z,_e.sibling);var yt=p(_e,Y.children||[]);return yt.return=Z,yt}else{u(Z,_e);break}else s(Z,_e);_e=_e.sibling}var nn=cg(Y,Z.mode,ve);return nn.return=Z,nn}function Tn(Z,oe,Y,ve){var Le=typeof Y=="object"&&Y!==null&&Y.type===dt&&Y.key===null;Le&&(Y=Y.props.children);var _e=typeof Y=="object"&&Y!==null;if(_e)switch(Y.$$typeof){case qe:return E(rt(Z,oe,Y,ve));case ct:return E(Zt(Z,oe,Y,ve))}if(typeof Y=="string"||typeof Y=="number")return E(gt(Z,oe,""+Y,ve));if(Vd(Y))return Ee(Z,oe,Y,ve);if(Ve(Y))return Ze(Z,oe,Y,ve);if(_e&&$d(Z,Y),typeof Y=="function"&&qd(Z),typeof Y>"u"&&!Le)switch(Z.tag){case k:{var yt=Z.stateNode;if(yt.render._isMockFunction)break}case Te:case A:case J:case me:throw Error((be(Z.type)||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}return u(Z,oe)}return Tn}var Yd=PS(!0),kS=PS(!1);function hO(i,s){if(!(i===null||s.child===i.child))throw Error("Resuming work not yet implemented.");if(s.child!==null){var u=s.child,d=Zo(u,u.pendingProps);for(s.child=d,d.return=s;u.sibling!==null;)u=u.sibling,d=d.sibling=Zo(u,u.pendingProps),d.return=s;d.sibling=null}}function pO(i,s){for(var u=i.child;u!==null;)BL(u,s),u=u.sibling}var Nc={},Ca=Fi(Nc),_c=Fi(Nc),Qd=Fi(Nc);function Gd(i){if(i===Nc)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return i}function zv(){var i=Gd(Qd.current);return i}function Nv(i,s){Sn(Qd,s,i),Sn(_c,i,i),Sn(Ca,Nc,i);var u=xt(s);Ft(Ca,i),Sn(Ca,u,i)}function fu(i){Ft(Ca,i),Ft(_c,i),Ft(Qd,i)}function Uc(){var i=Gd(Ca.current);return i}function zS(i){var s=Gd(Qd.current),u=Gd(Ca.current),d=At(u,i.type,s);u!==d&&(Sn(_c,i,i),Sn(Ca,d,i))}function _v(i){_c.current===i&&(Ft(Ca,i),Ft(_c,i))}var vO=0,NS=1,Uv=1,jc=2,Ur=Fi(vO);function Xd(i,s){return(i&s)!==0}function Ic(i){return i&NS}function jv(i,s){return i&NS|s}function mO(i,s){return i|s}function jo(i,s){Sn(Ur,s,i)}function du(i){Ft(Ur,i)}function gO(i,s){var u=i.memoizedState;if(u!==null)return u.dehydrated!==null;var d=i.memoizedProps;return d.fallback===void 0?!1:d.unstable_avoidThisFallback!==!0?!0:!s}function Kd(i){for(var s=i;s!==null;){if(s.tag===$){var u=s.memoizedState;if(u!==null){var d=u.dehydrated;if(d===null||Tl(d)||lc(d))return s}}else if(s.tag===ke&&s.memoizedProps.revealOrder!==void 0){var p=(s.flags&nt)!==ot;if(p)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)return null;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Iv=0,Io=1,Fo=2,Fc=4,mr=null,Bo=null,Ra=!1;function yO(i){if(!en)return!1;var s=i.stateNode.containerInfo;return Bo=On(s),mr=i,Ra=!0,!0}function _S(i,s){switch(i.tag){case _:gv(i.stateNode.containerInfo,s);break;case P:ji(i.type,i.memoizedProps,i.stateNode,s);break}var u=YL();u.stateNode=s,u.return=i,u.flags=ze,i.lastEffect!==null?(i.lastEffect.nextEffect=u,i.lastEffect=u):i.firstEffect=i.lastEffect=u}function US(i,s){switch(s.flags=s.flags&~xi|Dt,i.tag){case _:{var u=i.stateNode.containerInfo;switch(s.tag){case P:var d=s.type,p=s.pendingProps;yv(u,d,p);break;case O:var S=s.pendingProps;Rl(u,S);break;case $:Sv(u);break}break}case P:{var E=i.type,R=i.memoizedProps,D=i.stateNode;switch(s.tag){case P:var I=s.type,V=s.pendingProps;Zi(E,R,D,I,V);break;case O:var K=s.pendingProps;Al(E,R,D,K);break;case $:Ml(E,R,D);break}break}default:return}}function jS(i,s){switch(i.tag){case P:{var u=i.type,d=i.pendingProps,p=vv(s,u,d);return p!==null?(i.stateNode=p,!0):!1}case O:{var S=i.pendingProps,E=Tr(s,S);return E!==null?(i.stateNode=E,!0):!1}case $:return!1;default:return!1}}function Fv(i){if(Ra){var s=Bo;if(!s){US(mr,i),Ra=!1,mr=i;return}var u=s;if(!jS(i,s)){if(s=Cl(u),!s||!jS(i,s)){US(mr,i),Ra=!1,mr=i;return}_S(mr,u)}mr=i,Bo=On(s)}}function SO(i,s,u){if(!en)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var d=i.stateNode,p=sa(d,i.type,i.memoizedProps,s,u,i);return i.updateQueue=p,p!==null}function bO(i){if(!en)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var s=i.stateNode,u=i.memoizedProps,d=Rd(s,u,i);if(d){var p=mr;if(p!==null)switch(p.tag){case _:{var S=p.stateNode.containerInfo;Ad(S,s,u);break}case P:{var E=p.type,R=p.memoizedProps,D=p.stateNode;mv(E,R,D,s,u);break}}}return d}function xO(i){if(!en)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var s=i.memoizedState,u=s!==null?s.dehydrated:null;if(!u)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return Cr(u)}function IS(i){for(var s=i.return;s!==null&&s.tag!==P&&s.tag!==_&&s.tag!==$;)s=s.return;mr=s}function Zd(i){if(!en||i!==mr)return!1;if(!Ra)return IS(i),Ra=!0,!1;var s=i.type;if(i.tag!==P||s!=="head"&&s!=="body"&&!Jn(s,i.memoizedProps))for(var u=Bo;u;)_S(i,u),u=Cl(u);return IS(i),i.tag===$?Bo=xO(i):Bo=mr?Cl(i.stateNode):null,!0}function Bv(){en&&(mr=null,Bo=null,Ra=!1)}function Hv(){return Ra}var Bc=[],Hc;Hc={};function EO(i){Bc.push(i)}function Wv(){for(var i=0;i<Bc.length;i++){var s=Bc[i];cn?s._workInProgressVersionPrimary=null:s._workInProgressVersionSecondary=null}Bc.length=0}function wO(i){return cn?i._workInProgressVersionPrimary:i._workInProgressVersionSecondary}function FS(i,s){cn?i._workInProgressVersionPrimary=s:i._workInProgressVersionSecondary=s,Bc.push(i)}function TO(i){cn?i._currentPrimaryRenderer==null?i._currentPrimaryRenderer=Hc:i._currentPrimaryRenderer!==Hc&&m("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported."):i._currentSecondaryRenderer==null?i._currentSecondaryRenderer=Hc:i._currentSecondaryRenderer!==Hc&&m("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported.")}var Oe=g.ReactCurrentDispatcher,gr=g.ReactCurrentBatchConfig,Vv,$v;$v={},Vv=new Set;var Wc=ce,Kt=null,mi=null,Xn=null,Jd=!1,Vc=!1,CO=25,fe=null,yr=null,Aa=-1,qv=!1;function Gt(){{var i=fe;yr===null?yr=[i]:yr.push(i)}}function Pe(){{var i=fe;yr!==null&&(Aa++,yr[Aa]!==i&&RO(i))}}function $c(i){i!=null&&!Array.isArray(i)&&m("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",fe,typeof i)}function RO(i){{var s=be(Kt.type);if(!Vv.has(s)&&(Vv.add(s),yr!==null)){for(var u="",d=30,p=0;p<=Aa;p++){for(var S=yr[p],E=p===Aa?i:S,R=p+1+". "+S;R.length<d;)R+=" ";R+=E+`
120
120
  `,u+=R}m(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
121
121
 
122
122
  Previous render Next render
123
123
  ------------------------------------------------------
124
124
  %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125
- `,s,u)}}}function Wi(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
125
+ `,s,u)}}}function $i(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
126
126
  1. You might have mismatching versions of React and the renderer (such as React DOM)
127
127
  2. You might be breaking the Rules of Hooks
128
128
  3. You might have more than one copy of React in the same app
129
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Yv(i,s){if(qv)return!1;if(s===null)return m("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",ce),!1;i.length!==s.length&&m(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
129
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Yv(i,s){if(qv)return!1;if(s===null)return m("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",fe),!1;i.length!==s.length&&m(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
130
130
 
131
131
  Previous: %s
132
- Incoming: %s`,ce,"["+s.join(", ")+"]","["+i.join(", ")+"]");for(var u=0;u<s.length&&u<i.length;u++)if(!Cn(i[u],s[u]))return!1;return!0}function hu(i,s,u,d,p,S){Vc=S,Gt=s,yr=i!==null?i._debugHookTypes:null,Aa=-1,qv=i!==null&&i.type!==s.type,s.memoizedState=null,s.updateQueue=null,s.lanes=ue,i!==null&&i.memoizedState!==null?Me.current=tb:yr!==null?Me.current=eb:Me.current=JS;var E=u(d,p);if(Wc){var R=0;do{if(Wc=!1,!(R<CO))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");R+=1,qv=!1,vi=null,Gn=null,s.updateQueue=null,Aa=-1,Me.current=nb,E=u(d,p)}while(Wc)}Me.current=fh,s._debugHookTypes=yr;var D=vi!==null&&vi.next!==null;if(Vc=ue,Gt=null,vi=null,Gn=null,ce=null,yr=null,Aa=-1,Jd=!1,D)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return E}function BS(i,s,u){s.updateQueue=i.updateQueue,s.flags&=~(Fn|et),i.lanes=ho(i.lanes,u)}function HS(){if(Me.current=fh,Jd){for(var i=Gt.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Jd=!1}Vc=ue,Gt=null,vi=null,Gn=null,yr=null,Aa=-1,ce=null,ch=!1,Wc=!1}function Ho(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gn===null?Gt.memoizedState=Gn=i:Gn=Gn.next=i,Gn}function Vo(){var i;if(vi===null){var s=Gt.alternate;s!==null?i=s.memoizedState:i=null}else i=vi.next;var u;if(Gn===null?u=Gt.memoizedState:u=Gn.next,u!==null)Gn=u,u=Gn.next,vi=i;else{if(i===null)throw Error("Rendered more hooks than during the previous render.");vi=i;var d={memoizedState:vi.memoizedState,baseState:vi.baseState,baseQueue:vi.baseQueue,queue:vi.queue,next:null};Gn===null?Gt.memoizedState=Gn=d:Gn=Gn.next=d}return Gn}function AO(){return{lastEffect:null}}function eh(i,s){return typeof s=="function"?s(i):s}function Qv(i,s,u){var d=Ho(),p;u!==void 0?p=u(s):p=s,d.memoizedState=d.baseState=p;var S=d.queue={pending:null,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},E=S.dispatch=om.bind(null,Gt,S);return[d.memoizedState,E]}function Gv(i,s,u){var d=Vo(),p=d.queue;if(p===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");p.lastRenderedReducer=i;var S=vi,E=S.baseQueue,R=p.pending;if(R!==null){if(E!==null){var D=E.next,F=R.next;E.next=F,R.next=D}S.baseQueue!==E&&m("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),S.baseQueue=E=R,p.pending=null}if(E!==null){var W=E.next,X=S.baseState,ee=null,he=null,ye=null,Ee=W;do{var Xe=Ee.lane;if(is(Vc,Xe)){if(ye!==null){var it={lane:Wn,action:Ee.action,eagerReducer:Ee.eagerReducer,eagerState:Ee.eagerState,next:null};ye=ye.next=it}if(Ee.eagerReducer===i)X=Ee.eagerState;else{var Xt=Ee.action;X=i(X,Xt)}}else{var St={lane:Xe,action:Ee.action,eagerReducer:Ee.eagerReducer,eagerState:Ee.eagerState,next:null};ye===null?(he=ye=St,ee=X):ye=ye.next=St,Gt.lanes=Ct(Gt.lanes,Xe),Ym(Xe)}Ee=Ee.next}while(Ee!==null&&Ee!==W);ye===null?ee=X:ye.next=he,Cn(X,d.memoizedState)||xm(),d.memoizedState=X,d.baseState=ee,d.baseQueue=ye,p.lastRenderedState=X}var Tn=p.dispatch;return[d.memoizedState,Tn]}function Xv(i,s,u){var d=Vo(),p=d.queue;if(p===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");p.lastRenderedReducer=i;var S=p.dispatch,E=p.pending,R=d.memoizedState;if(E!==null){p.pending=null;var D=E.next,F=D;do{var W=F.action;R=i(R,W),F=F.next}while(F!==D);Cn(R,d.memoizedState)||xm(),d.memoizedState=R,d.baseQueue===null&&(d.baseState=R),p.lastRenderedState=R}return[R,S]}function VS(i,s,u){TO(s);var d=s._getVersion,p=d(s._source),S=!1,E=wO(s);if(E!==null?S=E===p:(S=is(Vc,i.mutableReadLanes),S&&FS(s,p)),S){var R=u(s._source);return typeof R=="function"&&m("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),R}else throw EO(s),Error("Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.")}function WS(i,s,u,d){var p=HD();if(p===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");var S=s._getVersion,E=S(s._source),R=Me.current,D=R.useState(function(){return VS(p,s,u)}),F=D[0],W=D[1],X=F,ee=Gn,he=i.memoizedState,ye=he.refs,Ee=ye.getSnapshot,Xe=he.source,St=he.subscribe,it=Gt;if(i.memoizedState={refs:ye,source:s,subscribe:d},R.useEffect(function(){ye.getSnapshot=u,ye.setSnapshot=W;var Tn=S(s._source);if(!Cn(E,Tn)){var K=u(s._source);if(typeof K=="function"&&m("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),!Cn(X,K)){W(K);var oe=Oa(it);vo(p,oe)}Jl(p,p.mutableReadLanes)}},[u,s,d]),R.useEffect(function(){var Tn=function(){var oe=ye.getSnapshot,Y=ye.setSnapshot;try{Y(oe(s._source));var ve=Oa(it);vo(p,ve)}catch(De){Y(function(){throw De})}},K=d(s._source,Tn);return typeof K!="function"&&m("Mutable source subscribe function must return an unsubscribe function."),K},[s,d]),!Cn(Ee,u)||!Cn(Xe,s)||!Cn(St,d)){var Xt={pending:null,dispatch:null,lastRenderedReducer:eh,lastRenderedState:X};Xt.dispatch=W=om.bind(null,Gt,Xt),ee.queue=Xt,ee.baseQueue=null,X=VS(p,s,u),ee.memoizedState=ee.baseState=X}return X}function Kv(i,s,u){var d=Ho();return d.memoizedState={refs:{getSnapshot:s,setSnapshot:null},source:i,subscribe:u},WS(d,i,s,u)}function th(i,s,u){var d=Vo();return WS(d,i,s,u)}function Wo(i){var s=Ho();typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i;var u=s.queue={pending:null,dispatch:null,lastRenderedReducer:eh,lastRenderedState:i},d=u.dispatch=om.bind(null,Gt,u);return[s.memoizedState,d]}function qc(i){return Gv(eh)}function Yc(i){return Xv(eh)}function nh(i,s,u,d){var p={tag:i,create:s,destroy:u,deps:d,next:null},S=Gt.updateQueue;if(S===null)S=AO(),Gt.updateQueue=S,S.lastEffect=p.next=p;else{var E=S.lastEffect;if(E===null)S.lastEffect=p.next=p;else{var R=E.next;E.next=p,p.next=R,S.lastEffect=p}}return p}function ih(i){var s=Ho(),u={current:i};return Object.seal(u),s.memoizedState=u,u}function pu(i){var s=Vo();return s.memoizedState}function Zv(i,s,u,d){var p=Ho(),S=d===void 0?null:d;Gt.flags|=i,p.memoizedState=nh(Io|s,u,void 0,S)}function Jv(i,s,u,d){var p=Vo(),S=d===void 0?null:d,E=void 0;if(vi!==null){var R=vi.memoizedState;if(E=R.destroy,S!==null){var D=R.deps;if(Yv(S,D)){nh(s,u,E,S);return}}}Gt.flags|=i,p.memoizedState=nh(Io|s,u,E,S)}function rh(i,s){return typeof jest<"u"&&lx(Gt),Zv(et|Fn,Fc,i,s)}function vu(i,s){return typeof jest<"u"&&lx(Gt),Jv(et|Fn,Fc,i,s)}function em(i,s){return Zv(et,Fo,i,s)}function sh(i,s){return Jv(et,Fo,i,s)}function $S(i,s){if(typeof s=="function"){var u=s,d=i();return u(d),function(){u(null)}}else if(s!=null){var p=s;p.hasOwnProperty("current")||m("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(p).join(", ")+"}");var S=i();return p.current=S,function(){p.current=null}}}function tm(i,s,u){typeof s!="function"&&m("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",s!==null?typeof s:"null");var d=u!=null?u.concat([i]):null;return Zv(et,Fo,$S.bind(null,s,i),d)}function ah(i,s,u){typeof s!="function"&&m("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",s!==null?typeof s:"null");var d=u!=null?u.concat([i]):null;return Jv(et,Fo,$S.bind(null,s,i),d)}function MO(i,s){}var oh=MO;function nm(i,s){var u=Ho(),d=s===void 0?null:s;return u.memoizedState=[i,d],i}function lh(i,s){var u=Vo(),d=s===void 0?null:s,p=u.memoizedState;if(p!==null&&d!==null){var S=p[1];if(Yv(d,S))return p[0]}return u.memoizedState=[i,d],i}function im(i,s){var u=Ho(),d=s===void 0?null:s,p=i();return u.memoizedState=[p,d],p}function uh(i,s){var u=Vo(),d=s===void 0?null:s,p=u.memoizedState;if(p!==null&&d!==null){var S=p[1];if(Yv(d,S))return p[0]}var E=i();return u.memoizedState=[E,d],E}function rm(i){var s=Wo(i),u=s[0],d=s[1];return rh(function(){var p=gr.transition;gr.transition=1;try{d(i)}finally{gr.transition=p}},[i]),u}function qS(i){var s=qc(),u=s[0],d=s[1];return vu(function(){var p=gr.transition;gr.transition=1;try{d(i)}finally{gr.transition=p}},[i]),u}function YS(i){var s=Yc(),u=s[0],d=s[1];return vu(function(){var p=gr.transition;gr.transition=1;try{d(i)}finally{gr.transition=p}},[i]),u}function OO(i,s){var u=Oe();nr(u<Ci?Ci:u,function(){i(!0)}),nr(u>Hi?Hi:u,function(){var d=gr.transition;gr.transition=1;try{i(!1),s()}finally{gr.transition=d}})}function sm(){var i=Wo(!1),s=i[0],u=i[1],d=OO.bind(null,u);return ih(d),[d,s]}function QS(){var i=qc(),s=i[0],u=pu(),d=u.current;return[d,s]}function GS(){var i=Yc(),s=i[0],u=pu(),d=u.current;return[d,s]}var ch=!1;function DO(){return ch}function XS(i){{var s=be(i.type)||"Unknown";Vd()&&!$v[s]&&(m("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly."),$v[s]=!0)}}function am(){var i=bd.bind(null,XS.bind(null,Gt));if(Hv()){var s=!1,u=Gt,d=function(){throw s||(s=!0,ch=!0,S(i()),ch=!1,XS(u)),Error("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.")},p=Sd(d),S=Wo(p)[1];return(Gt.mode&Ln)===$t&&(Gt.flags|=et|Fn,nh(Io|Fc,function(){S(i())},void 0,null)),p}else{var E=i();return Wo(E),E}}function KS(){var i=qc()[0];return i}function ZS(){var i=Yc()[0];return i}function om(i,s,u){typeof arguments[3]=="function"&&m("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var d=Yi(),p=Oa(i),S={lane:p,action:u,eagerReducer:null,eagerState:null,next:null},E=s.pending;E===null?S.next=S:(S.next=E.next,E.next=S),s.pending=S;var R=i.alternate;if(i===Gt||R!==null&&R===Gt)Wc=Jd=!0;else{if(i.lanes===ue&&(R===null||R.lanes===ue)){var D=s.lastRenderedReducer;if(D!==null){var F;F=Me.current,Me.current=jr;try{var W=s.lastRenderedState,X=D(W,u);if(S.eagerReducer=D,S.eagerState=X,Cn(X,W))return}catch{}finally{Me.current=F}}}typeof jest<"u"&&(ox(i),ML(i)),ai(i,p,d)}}var fh={readContext:Ft,useCallback:Wi,useContext:Wi,useEffect:Wi,useImperativeHandle:Wi,useLayoutEffect:Wi,useMemo:Wi,useReducer:Wi,useRef:Wi,useState:Wi,useDebugValue:Wi,useDeferredValue:Wi,useTransition:Wi,useMutableSource:Wi,useOpaqueIdentifier:Wi,unstable_isNewReconciler:Xi},JS=null,eb=null,tb=null,nb=null,ls=null,jr=null,dh=null;{var lm=function(){m("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},lt=function(){m("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};JS={readContext:function(i,s){return Ft(i,s)},useCallback:function(i,s){return ce="useCallback",Yt(),$c(s),nm(i,s)},useContext:function(i,s){return ce="useContext",Yt(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",Yt(),$c(s),rh(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",Yt(),$c(u),tm(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",Yt(),$c(s),em(i,s)},useMemo:function(i,s){ce="useMemo",Yt(),$c(s);var u=Me.current;Me.current=ls;try{return im(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",Yt();var d=Me.current;Me.current=ls;try{return Qv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",Yt(),ih(i)},useState:function(i){ce="useState",Yt();var s=Me.current;Me.current=ls;try{return Wo(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",Yt(),void 0},useDeferredValue:function(i){return ce="useDeferredValue",Yt(),rm(i)},useTransition:function(){return ce="useTransition",Yt(),sm()},useMutableSource:function(i,s,u){return ce="useMutableSource",Yt(),Kv(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",Yt(),am()},unstable_isNewReconciler:Xi},eb={readContext:function(i,s){return Ft(i,s)},useCallback:function(i,s){return ce="useCallback",Le(),nm(i,s)},useContext:function(i,s){return ce="useContext",Le(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",Le(),rh(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",Le(),tm(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",Le(),em(i,s)},useMemo:function(i,s){ce="useMemo",Le();var u=Me.current;Me.current=ls;try{return im(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",Le();var d=Me.current;Me.current=ls;try{return Qv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",Le(),ih(i)},useState:function(i){ce="useState",Le();var s=Me.current;Me.current=ls;try{return Wo(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",Le(),void 0},useDeferredValue:function(i){return ce="useDeferredValue",Le(),rm(i)},useTransition:function(){return ce="useTransition",Le(),sm()},useMutableSource:function(i,s,u){return ce="useMutableSource",Le(),Kv(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",Le(),am()},unstable_isNewReconciler:Xi},tb={readContext:function(i,s){return Ft(i,s)},useCallback:function(i,s){return ce="useCallback",Le(),lh(i,s)},useContext:function(i,s){return ce="useContext",Le(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",Le(),vu(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",Le(),ah(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",Le(),sh(i,s)},useMemo:function(i,s){ce="useMemo",Le();var u=Me.current;Me.current=jr;try{return uh(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",Le();var d=Me.current;Me.current=jr;try{return Gv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",Le(),pu()},useState:function(i){ce="useState",Le();var s=Me.current;Me.current=jr;try{return qc(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",Le(),oh()},useDeferredValue:function(i){return ce="useDeferredValue",Le(),qS(i)},useTransition:function(){return ce="useTransition",Le(),QS()},useMutableSource:function(i,s,u){return ce="useMutableSource",Le(),th(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",Le(),KS()},unstable_isNewReconciler:Xi},nb={readContext:function(i,s){return Ft(i,s)},useCallback:function(i,s){return ce="useCallback",Le(),lh(i,s)},useContext:function(i,s){return ce="useContext",Le(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",Le(),vu(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",Le(),ah(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",Le(),sh(i,s)},useMemo:function(i,s){ce="useMemo",Le();var u=Me.current;Me.current=dh;try{return uh(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",Le();var d=Me.current;Me.current=dh;try{return Xv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",Le(),pu()},useState:function(i){ce="useState",Le();var s=Me.current;Me.current=dh;try{return Yc(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",Le(),oh()},useDeferredValue:function(i){return ce="useDeferredValue",Le(),YS(i)},useTransition:function(){return ce="useTransition",Le(),GS()},useMutableSource:function(i,s,u){return ce="useMutableSource",Le(),th(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",Le(),ZS()},unstable_isNewReconciler:Xi},ls={readContext:function(i,s){return lm(),Ft(i,s)},useCallback:function(i,s){return ce="useCallback",lt(),Yt(),nm(i,s)},useContext:function(i,s){return ce="useContext",lt(),Yt(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",lt(),Yt(),rh(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",lt(),Yt(),tm(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",lt(),Yt(),em(i,s)},useMemo:function(i,s){ce="useMemo",lt(),Yt();var u=Me.current;Me.current=ls;try{return im(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",lt(),Yt();var d=Me.current;Me.current=ls;try{return Qv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",lt(),Yt(),ih(i)},useState:function(i){ce="useState",lt(),Yt();var s=Me.current;Me.current=ls;try{return Wo(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",lt(),Yt(),void 0},useDeferredValue:function(i){return ce="useDeferredValue",lt(),Yt(),rm(i)},useTransition:function(){return ce="useTransition",lt(),Yt(),sm()},useMutableSource:function(i,s,u){return ce="useMutableSource",lt(),Yt(),Kv(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",lt(),Yt(),am()},unstable_isNewReconciler:Xi},jr={readContext:function(i,s){return lm(),Ft(i,s)},useCallback:function(i,s){return ce="useCallback",lt(),Le(),lh(i,s)},useContext:function(i,s){return ce="useContext",lt(),Le(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",lt(),Le(),vu(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",lt(),Le(),ah(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",lt(),Le(),sh(i,s)},useMemo:function(i,s){ce="useMemo",lt(),Le();var u=Me.current;Me.current=jr;try{return uh(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",lt(),Le();var d=Me.current;Me.current=jr;try{return Gv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",lt(),Le(),pu()},useState:function(i){ce="useState",lt(),Le();var s=Me.current;Me.current=jr;try{return qc(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",lt(),Le(),oh()},useDeferredValue:function(i){return ce="useDeferredValue",lt(),Le(),qS(i)},useTransition:function(){return ce="useTransition",lt(),Le(),QS()},useMutableSource:function(i,s,u){return ce="useMutableSource",lt(),Le(),th(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",lt(),Le(),KS()},unstable_isNewReconciler:Xi},dh={readContext:function(i,s){return lm(),Ft(i,s)},useCallback:function(i,s){return ce="useCallback",lt(),Le(),lh(i,s)},useContext:function(i,s){return ce="useContext",lt(),Le(),Ft(i,s)},useEffect:function(i,s){return ce="useEffect",lt(),Le(),vu(i,s)},useImperativeHandle:function(i,s,u){return ce="useImperativeHandle",lt(),Le(),ah(i,s,u)},useLayoutEffect:function(i,s){return ce="useLayoutEffect",lt(),Le(),sh(i,s)},useMemo:function(i,s){ce="useMemo",lt(),Le();var u=Me.current;Me.current=jr;try{return uh(i,s)}finally{Me.current=u}},useReducer:function(i,s,u){ce="useReducer",lt(),Le();var d=Me.current;Me.current=jr;try{return Xv(i,s,u)}finally{Me.current=d}},useRef:function(i){return ce="useRef",lt(),Le(),pu()},useState:function(i){ce="useState",lt(),Le();var s=Me.current;Me.current=jr;try{return Yc(i)}finally{Me.current=s}},useDebugValue:function(i,s){return ce="useDebugValue",lt(),Le(),oh()},useDeferredValue:function(i){return ce="useDeferredValue",lt(),Le(),YS(i)},useTransition:function(){return ce="useTransition",lt(),Le(),GS()},useMutableSource:function(i,s,u){return ce="useMutableSource",lt(),Le(),th(i,s,u)},useOpaqueIdentifier:function(){return ce="useOpaqueIdentifier",lt(),Le(),ZS()},unstable_isNewReconciler:Xi}}var hh=h.unstable_now,ib=0,Qc=-1;function LO(){return ib}function rb(){ib=hh()}function um(i){Qc=hh(),i.actualStartTime<0&&(i.actualStartTime=hh())}function sb(i){Qc=-1}function ph(i,s){if(Qc>=0){var u=hh()-Qc;i.actualDuration+=u,s&&(i.selfBaseDuration=u),Qc=-1}}function cm(i){for(var s=i.child;s;)i.actualDuration+=s.actualDuration,s=s.sibling}var Gc=g.ReactCurrentOwner,us=!1,fm,Xc,dm,hm,pm,$o,vm,vh;fm={},Xc={},dm={},hm={},pm={},$o=!1,vm={},vh={};function $i(i,s,u,d){i===null?s.child=kS(s,null,u,d):s.child=Yd(s,i.child,u,d)}function PO(i,s,u,d){s.child=Yd(s,i.child,null,d),s.child=Yd(s,null,u,d)}function ab(i,s,u,d,p){if(s.type!==s.elementType){var S=u.propTypes;S&&ci(S,d,"prop",be(u))}var E=u.render,R=s.ref,D;Ea(s,p);{if(Gc.current=s,ii(!0),D=hu(i,s,E,d,R,p),s.mode&Mt){ji();try{D=hu(i,s,E,d,R,p)}finally{Ji()}}ii(!1)}return i!==null&&!us?(BS(i,s,p),Is(i,s,p)):(s.flags|=ui,$i(i,s,D,p),s.child)}function ob(i,s,u,d,p,S){if(i===null){var E=u.type;if(IL(E)&&u.compare===null&&u.defaultProps===void 0){var R=E;return R=Eu(E),s.tag=ge,s.type=R,Sm(s,E),lb(i,s,R,d,p,S)}{var D=E.propTypes;D&&ci(D,d,"prop",be(E))}var F=ag(u.type,null,d,s,s.mode,S);return F.ref=s.ref,F.return=s,s.child=F,F}{var W=u.type,X=W.propTypes;X&&ci(X,d,"prop",be(W))}var ee=i.child;if(!Un(p,S)){var he=ee.memoizedProps,ye=u.compare;if(ye=ye!==null?ye:ks,ye(he,d)&&i.ref===s.ref)return Is(i,s,S)}s.flags|=ui;var Ee=Zo(ee,d);return Ee.ref=s.ref,Ee.return=s,s.child=Ee,Ee}function lb(i,s,u,d,p,S){if(s.type!==s.elementType){var E=s.elementType;if(E.$$typeof===ft){var R=E,D=R._payload,F=R._init;try{E=F(D)}catch{E=null}var W=E&&E.propTypes;W&&ci(W,d,"prop",be(E))}}if(i!==null){var X=i.memoizedProps;if(ks(X,d)&&i.ref===s.ref&&s.type===i.type)if(us=!1,Un(S,p))(i.flags&ia)!==at&&(us=!0);else return s.lanes=i.lanes,Is(i,s,S)}return gm(i,s,u,d,S)}function mm(i,s,u){var d=s.pendingProps,p=d.children,S=i!==null?i.memoizedState:null;if(d.mode==="hidden"||d.mode==="unstable-defer-without-hiding")if((s.mode&kr)===$t){var E={baseLanes:ue};s.memoizedState=E,Hh(s,u)}else if(Un(u,Ti)){var W={baseLanes:ue};s.memoizedState=W;var X=S!==null?S.baseLanes:u;Hh(s,X)}else{var R;if(S!==null){var D=S.baseLanes;R=Ct(D,u)}else R=u;Yh(Ti),s.lanes=s.childLanes=Ti;var F={baseLanes:R};return s.memoizedState=F,Hh(s,R),null}else{var ee;S!==null?(ee=Ct(S.baseLanes,u),s.memoizedState=null):ee=u,Hh(s,ee)}return $i(i,s,p,u),s.child}var kO=mm;function zO(i,s,u){var d=s.pendingProps;return $i(i,s,d,u),s.child}function NO(i,s,u){var d=s.pendingProps.children;return $i(i,s,d,u),s.child}function _O(i,s,u){{s.flags|=et;var d=s.stateNode;d.effectDuration=0,d.passiveEffectDuration=0}var p=s.pendingProps,S=p.children;return $i(i,s,S,u),s.child}function ub(i,s){var u=s.ref;(i===null&&u!==null||i!==null&&i.ref!==u)&&(s.flags|=an)}function gm(i,s,u,d,p){if(s.type!==s.elementType){var S=u.propTypes;S&&ci(S,d,"prop",be(u))}var E;{var R=Zr(s,u,!0);E=Mr(s,R)}var D;Ea(s,p);{if(Gc.current=s,ii(!0),D=hu(i,s,u,d,E,p),s.mode&Mt){ji();try{D=hu(i,s,u,d,E,p)}finally{Ji()}}ii(!1)}return i!==null&&!us?(BS(i,s,p),Is(i,s,p)):(s.flags|=ui,$i(i,s,D,p),s.child)}function cb(i,s,u,d,p){if(s.type!==s.elementType){var S=u.propTypes;S&&ci(S,d,"prop",be(u))}var E;Hn(u)?(E=!0,Za(s)):E=!1,Ea(s,p);var R=s.stateNode,D;R===null?(i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt),_r(s,u,d),Mv(s,u,d,p),D=!0):i===null?D=fO(s,u,d,p):D=dO(i,s,u,d,p);var F=ym(i,s,u,D,E,p);{var W=s.stateNode;D&&W.props!==d&&($o||m("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",be(s.type)||"a component"),$o=!0)}return F}function ym(i,s,u,d,p,S){ub(i,s);var E=(s.flags&tt)!==at;if(!d&&!E)return p&&Ja(s,u,!1),Is(i,s,S);var R=s.stateNode;Gc.current=s;var D;if(E&&typeof u.getDerivedStateFromError!="function")D=null,sb();else{if(ii(!0),D=R.render(),s.mode&Mt){ji();try{R.render()}finally{Ji()}}ii(!1)}return s.flags|=ui,i!==null&&E?PO(i,s,D,S):$i(i,s,D,S),s.memoizedState=R.state,p&&Ja(s,u,!0),s.child}function fb(i){var s=i.stateNode;s.pendingContext?fc(i,s.pendingContext,s.pendingContext!==s.context):s.context&&fc(i,s.context,!1),Nv(i,s.containerInfo)}function UO(i,s,u){fb(s);var d=s.updateQueue;if(!(i!==null&&d!==null))throw Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var p=s.pendingProps,S=s.memoizedState,E=S!==null?S.element:null;Uo(i,s),f(s,p,null,u);var R=s.memoizedState,D=R.element;if(D===E)return Bv(),Is(i,s,u);var F=s.stateNode;if(F.hydrate&&yO(s)){if(Jt){var W=F.mutableSourceEagerHydrationData;if(W!=null)for(var X=0;X<W.length;X+=2){var ee=W[X],he=W[X+1];FS(ee,he)}}var ye=kS(s,null,D,u);s.child=ye;for(var Ee=ye;Ee;)Ee.flags=Ee.flags&~Dt|bi,Ee=Ee.sibling}else $i(i,s,D,u),Bv();return s.child}function jO(i,s,u){zS(s),i===null&&Fv(s);var d=s.type,p=s.pendingProps,S=i!==null?i.memoizedProps:null,E=p.children,R=Zn(d,p);return R?E=null:S!==null&&Zn(d,S)&&(s.flags|=rt),ub(i,s),$i(i,s,E,u),s.child}function IO(i,s){return i===null&&Fv(s),null}function FO(i,s,u,d,p){i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt);var S=s.pendingProps,E=u,R=E._payload,D=E._init,F=D(R);s.type=F;var W=s.tag=FL(F),X=rr(F,S),ee;switch(W){case A:return Sm(s,F),s.type=F=Eu(F),ee=gm(null,s,F,X,p),ee;case P:return s.type=F=eg(F),ee=cb(null,s,F,X,p),ee;case J:return s.type=F=tg(F),ee=ab(null,s,F,X,p),ee;case se:{if(s.type!==s.elementType){var he=F.propTypes;he&&ci(he,X,"prop",be(F))}return ee=ob(null,s,F,rr(F.type,X),d,p),ee}}var ye="";throw F!==null&&typeof F=="object"&&F.$$typeof===ft&&(ye=" Did you wrap a component in React.lazy() more than once?"),Error("Element type is invalid. Received a promise that resolves to: "+F+". Lazy element type must resolve to a class or function."+ye)}function BO(i,s,u,d,p){i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt),s.tag=P;var S;return Hn(u)?(S=!0,Za(s)):S=!1,Ea(s,p),_r(s,u,d),Mv(s,u,d,p),ym(null,s,u,!0,S,p)}function HO(i,s,u,d){i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt);var p=s.pendingProps,S;{var E=Zr(s,u,!1);S=Mr(s,E)}Ea(s,d);var R;{if(u.prototype&&typeof u.prototype.render=="function"){var D=be(u)||"Unknown";fm[D]||(m("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",D,D),fm[D]=!0)}s.mode&Mt&&Vi.recordLegacyContextWarning(s,null),ii(!0),Gc.current=s,R=hu(null,s,u,p,S,d),ii(!1)}if(s.flags|=ui,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){var F=be(u)||"Unknown";Xc[F]||(m("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",F,F,F),Xc[F]=!0)}if(typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){{var W=be(u)||"Unknown";Xc[W]||(m("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",W,W,W),Xc[W]=!0)}s.tag=P,s.memoizedState=null,s.updateQueue=null;var X=!1;Hn(u)?(X=!0,Za(s)):X=!1,s.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,cu(s);var ee=u.getDerivedStateFromProps;return typeof ee=="function"&&kt(s,u,ee,p),yt(s,R),Mv(s,u,p,d),ym(null,s,u,!0,X,d)}else{if(s.tag=A,s.mode&Mt){ji();try{R=hu(null,s,u,p,S,d)}finally{Ji()}}return $i(null,s,R,d),Sm(s,u),s.child}}function Sm(i,s){{if(s&&s.childContextTypes&&m("%s(...): childContextTypes cannot be defined on a function component.",s.displayName||s.name||"Component"),i.ref!==null){var u="",d=Bd();d&&(u+=`
132
+ Incoming: %s`,fe,"["+s.join(", ")+"]","["+i.join(", ")+"]");for(var u=0;u<s.length&&u<i.length;u++)if(!Cn(i[u],s[u]))return!1;return!0}function hu(i,s,u,d,p,S){Wc=S,Kt=s,yr=i!==null?i._debugHookTypes:null,Aa=-1,qv=i!==null&&i.type!==s.type,s.memoizedState=null,s.updateQueue=null,s.lanes=ce,i!==null&&i.memoizedState!==null?Oe.current=tb:yr!==null?Oe.current=eb:Oe.current=JS;var E=u(d,p);if(Vc){var R=0;do{if(Vc=!1,!(R<CO))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");R+=1,qv=!1,mi=null,Xn=null,s.updateQueue=null,Aa=-1,Oe.current=nb,E=u(d,p)}while(Vc)}Oe.current=fh,s._debugHookTypes=yr;var D=mi!==null&&mi.next!==null;if(Wc=ce,Kt=null,mi=null,Xn=null,fe=null,yr=null,Aa=-1,Jd=!1,D)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return E}function BS(i,s,u){s.updateQueue=i.updateQueue,s.flags&=~(Bn|tt),i.lanes=ho(i.lanes,u)}function HS(){if(Oe.current=fh,Jd){for(var i=Kt.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Jd=!1}Wc=ce,Kt=null,mi=null,Xn=null,yr=null,Aa=-1,fe=null,ch=!1,Vc=!1}function Ho(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xn===null?Kt.memoizedState=Xn=i:Xn=Xn.next=i,Xn}function Wo(){var i;if(mi===null){var s=Kt.alternate;s!==null?i=s.memoizedState:i=null}else i=mi.next;var u;if(Xn===null?u=Kt.memoizedState:u=Xn.next,u!==null)Xn=u,u=Xn.next,mi=i;else{if(i===null)throw Error("Rendered more hooks than during the previous render.");mi=i;var d={memoizedState:mi.memoizedState,baseState:mi.baseState,baseQueue:mi.baseQueue,queue:mi.queue,next:null};Xn===null?Kt.memoizedState=Xn=d:Xn=Xn.next=d}return Xn}function AO(){return{lastEffect:null}}function eh(i,s){return typeof s=="function"?s(i):s}function Qv(i,s,u){var d=Ho(),p;u!==void 0?p=u(s):p=s,d.memoizedState=d.baseState=p;var S=d.queue={pending:null,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},E=S.dispatch=om.bind(null,Kt,S);return[d.memoizedState,E]}function Gv(i,s,u){var d=Wo(),p=d.queue;if(p===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");p.lastRenderedReducer=i;var S=mi,E=S.baseQueue,R=p.pending;if(R!==null){if(E!==null){var D=E.next,I=R.next;E.next=I,R.next=D}S.baseQueue!==E&&m("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),S.baseQueue=E=R,p.pending=null}if(E!==null){var V=E.next,K=S.baseState,ee=null,pe=null,ge=null,Ee=V;do{var Ze=Ee.lane;if(is(Wc,Ze)){if(ge!==null){var rt={lane:$n,action:Ee.action,eagerReducer:Ee.eagerReducer,eagerState:Ee.eagerState,next:null};ge=ge.next=rt}if(Ee.eagerReducer===i)K=Ee.eagerState;else{var Zt=Ee.action;K=i(K,Zt)}}else{var gt={lane:Ze,action:Ee.action,eagerReducer:Ee.eagerReducer,eagerState:Ee.eagerState,next:null};ge===null?(pe=ge=gt,ee=K):ge=ge.next=gt,Kt.lanes=Ct(Kt.lanes,Ze),Ym(Ze)}Ee=Ee.next}while(Ee!==null&&Ee!==V);ge===null?ee=K:ge.next=pe,Cn(K,d.memoizedState)||xm(),d.memoizedState=K,d.baseState=ee,d.baseQueue=ge,p.lastRenderedState=K}var Tn=p.dispatch;return[d.memoizedState,Tn]}function Xv(i,s,u){var d=Wo(),p=d.queue;if(p===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");p.lastRenderedReducer=i;var S=p.dispatch,E=p.pending,R=d.memoizedState;if(E!==null){p.pending=null;var D=E.next,I=D;do{var V=I.action;R=i(R,V),I=I.next}while(I!==D);Cn(R,d.memoizedState)||xm(),d.memoizedState=R,d.baseQueue===null&&(d.baseState=R),p.lastRenderedState=R}return[R,S]}function WS(i,s,u){TO(s);var d=s._getVersion,p=d(s._source),S=!1,E=wO(s);if(E!==null?S=E===p:(S=is(Wc,i.mutableReadLanes),S&&FS(s,p)),S){var R=u(s._source);return typeof R=="function"&&m("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),R}else throw EO(s),Error("Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.")}function VS(i,s,u,d){var p=HD();if(p===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");var S=s._getVersion,E=S(s._source),R=Oe.current,D=R.useState(function(){return WS(p,s,u)}),I=D[0],V=D[1],K=I,ee=Xn,pe=i.memoizedState,ge=pe.refs,Ee=ge.getSnapshot,Ze=pe.source,gt=pe.subscribe,rt=Kt;if(i.memoizedState={refs:ge,source:s,subscribe:d},R.useEffect(function(){ge.getSnapshot=u,ge.setSnapshot=V;var Tn=S(s._source);if(!Cn(E,Tn)){var Z=u(s._source);if(typeof Z=="function"&&m("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),!Cn(K,Z)){V(Z);var oe=Oa(rt);vo(p,oe)}Jl(p,p.mutableReadLanes)}},[u,s,d]),R.useEffect(function(){var Tn=function(){var oe=ge.getSnapshot,Y=ge.setSnapshot;try{Y(oe(s._source));var ve=Oa(rt);vo(p,ve)}catch(Le){Y(function(){throw Le})}},Z=d(s._source,Tn);return typeof Z!="function"&&m("Mutable source subscribe function must return an unsubscribe function."),Z},[s,d]),!Cn(Ee,u)||!Cn(Ze,s)||!Cn(gt,d)){var Zt={pending:null,dispatch:null,lastRenderedReducer:eh,lastRenderedState:K};Zt.dispatch=V=om.bind(null,Kt,Zt),ee.queue=Zt,ee.baseQueue=null,K=WS(p,s,u),ee.memoizedState=ee.baseState=K}return K}function Kv(i,s,u){var d=Ho();return d.memoizedState={refs:{getSnapshot:s,setSnapshot:null},source:i,subscribe:u},VS(d,i,s,u)}function th(i,s,u){var d=Wo();return VS(d,i,s,u)}function Vo(i){var s=Ho();typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i;var u=s.queue={pending:null,dispatch:null,lastRenderedReducer:eh,lastRenderedState:i},d=u.dispatch=om.bind(null,Kt,u);return[s.memoizedState,d]}function qc(i){return Gv(eh)}function Yc(i){return Xv(eh)}function nh(i,s,u,d){var p={tag:i,create:s,destroy:u,deps:d,next:null},S=Kt.updateQueue;if(S===null)S=AO(),Kt.updateQueue=S,S.lastEffect=p.next=p;else{var E=S.lastEffect;if(E===null)S.lastEffect=p.next=p;else{var R=E.next;E.next=p,p.next=R,S.lastEffect=p}}return p}function ih(i){var s=Ho(),u={current:i};return Object.seal(u),s.memoizedState=u,u}function pu(i){var s=Wo();return s.memoizedState}function Zv(i,s,u,d){var p=Ho(),S=d===void 0?null:d;Kt.flags|=i,p.memoizedState=nh(Io|s,u,void 0,S)}function Jv(i,s,u,d){var p=Wo(),S=d===void 0?null:d,E=void 0;if(mi!==null){var R=mi.memoizedState;if(E=R.destroy,S!==null){var D=R.deps;if(Yv(S,D)){nh(s,u,E,S);return}}}Kt.flags|=i,p.memoizedState=nh(Io|s,u,E,S)}function rh(i,s){return typeof jest<"u"&&lx(Kt),Zv(tt|Bn,Fc,i,s)}function vu(i,s){return typeof jest<"u"&&lx(Kt),Jv(tt|Bn,Fc,i,s)}function em(i,s){return Zv(tt,Fo,i,s)}function sh(i,s){return Jv(tt,Fo,i,s)}function $S(i,s){if(typeof s=="function"){var u=s,d=i();return u(d),function(){u(null)}}else if(s!=null){var p=s;p.hasOwnProperty("current")||m("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(p).join(", ")+"}");var S=i();return p.current=S,function(){p.current=null}}}function tm(i,s,u){typeof s!="function"&&m("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",s!==null?typeof s:"null");var d=u!=null?u.concat([i]):null;return Zv(tt,Fo,$S.bind(null,s,i),d)}function ah(i,s,u){typeof s!="function"&&m("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",s!==null?typeof s:"null");var d=u!=null?u.concat([i]):null;return Jv(tt,Fo,$S.bind(null,s,i),d)}function MO(i,s){}var oh=MO;function nm(i,s){var u=Ho(),d=s===void 0?null:s;return u.memoizedState=[i,d],i}function lh(i,s){var u=Wo(),d=s===void 0?null:s,p=u.memoizedState;if(p!==null&&d!==null){var S=p[1];if(Yv(d,S))return p[0]}return u.memoizedState=[i,d],i}function im(i,s){var u=Ho(),d=s===void 0?null:s,p=i();return u.memoizedState=[p,d],p}function uh(i,s){var u=Wo(),d=s===void 0?null:s,p=u.memoizedState;if(p!==null&&d!==null){var S=p[1];if(Yv(d,S))return p[0]}var E=i();return u.memoizedState=[E,d],E}function rm(i){var s=Vo(i),u=s[0],d=s[1];return rh(function(){var p=gr.transition;gr.transition=1;try{d(i)}finally{gr.transition=p}},[i]),u}function qS(i){var s=qc(),u=s[0],d=s[1];return vu(function(){var p=gr.transition;gr.transition=1;try{d(i)}finally{gr.transition=p}},[i]),u}function YS(i){var s=Yc(),u=s[0],d=s[1];return vu(function(){var p=gr.transition;gr.transition=1;try{d(i)}finally{gr.transition=p}},[i]),u}function OO(i,s){var u=De();nr(u<Ri?Ri:u,function(){i(!0)}),nr(u>Wi?Wi:u,function(){var d=gr.transition;gr.transition=1;try{i(!1),s()}finally{gr.transition=d}})}function sm(){var i=Vo(!1),s=i[0],u=i[1],d=OO.bind(null,u);return ih(d),[d,s]}function QS(){var i=qc(),s=i[0],u=pu(),d=u.current;return[d,s]}function GS(){var i=Yc(),s=i[0],u=pu(),d=u.current;return[d,s]}var ch=!1;function DO(){return ch}function XS(i){{var s=be(i.type)||"Unknown";Wd()&&!$v[s]&&(m("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly."),$v[s]=!0)}}function am(){var i=bd.bind(null,XS.bind(null,Kt));if(Hv()){var s=!1,u=Kt,d=function(){throw s||(s=!0,ch=!0,S(i()),ch=!1,XS(u)),Error("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.")},p=Sd(d),S=Vo(p)[1];return(Kt.mode&Ln)===Yt&&(Kt.flags|=tt|Bn,nh(Io|Fc,function(){S(i())},void 0,null)),p}else{var E=i();return Vo(E),E}}function KS(){var i=qc()[0];return i}function ZS(){var i=Yc()[0];return i}function om(i,s,u){typeof arguments[3]=="function"&&m("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var d=Qi(),p=Oa(i),S={lane:p,action:u,eagerReducer:null,eagerState:null,next:null},E=s.pending;E===null?S.next=S:(S.next=E.next,E.next=S),s.pending=S;var R=i.alternate;if(i===Kt||R!==null&&R===Kt)Vc=Jd=!0;else{if(i.lanes===ce&&(R===null||R.lanes===ce)){var D=s.lastRenderedReducer;if(D!==null){var I;I=Oe.current,Oe.current=jr;try{var V=s.lastRenderedState,K=D(V,u);if(S.eagerReducer=D,S.eagerState=K,Cn(K,V))return}catch{}finally{Oe.current=I}}}typeof jest<"u"&&(ox(i),ML(i)),oi(i,p,d)}}var fh={readContext:Ht,useCallback:$i,useContext:$i,useEffect:$i,useImperativeHandle:$i,useLayoutEffect:$i,useMemo:$i,useReducer:$i,useRef:$i,useState:$i,useDebugValue:$i,useDeferredValue:$i,useTransition:$i,useMutableSource:$i,useOpaqueIdentifier:$i,unstable_isNewReconciler:Xi},JS=null,eb=null,tb=null,nb=null,ls=null,jr=null,dh=null;{var lm=function(){m("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},ut=function(){m("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};JS={readContext:function(i,s){return Ht(i,s)},useCallback:function(i,s){return fe="useCallback",Gt(),$c(s),nm(i,s)},useContext:function(i,s){return fe="useContext",Gt(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",Gt(),$c(s),rh(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",Gt(),$c(u),tm(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",Gt(),$c(s),em(i,s)},useMemo:function(i,s){fe="useMemo",Gt(),$c(s);var u=Oe.current;Oe.current=ls;try{return im(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",Gt();var d=Oe.current;Oe.current=ls;try{return Qv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",Gt(),ih(i)},useState:function(i){fe="useState",Gt();var s=Oe.current;Oe.current=ls;try{return Vo(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",Gt(),void 0},useDeferredValue:function(i){return fe="useDeferredValue",Gt(),rm(i)},useTransition:function(){return fe="useTransition",Gt(),sm()},useMutableSource:function(i,s,u){return fe="useMutableSource",Gt(),Kv(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",Gt(),am()},unstable_isNewReconciler:Xi},eb={readContext:function(i,s){return Ht(i,s)},useCallback:function(i,s){return fe="useCallback",Pe(),nm(i,s)},useContext:function(i,s){return fe="useContext",Pe(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",Pe(),rh(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",Pe(),tm(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",Pe(),em(i,s)},useMemo:function(i,s){fe="useMemo",Pe();var u=Oe.current;Oe.current=ls;try{return im(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",Pe();var d=Oe.current;Oe.current=ls;try{return Qv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",Pe(),ih(i)},useState:function(i){fe="useState",Pe();var s=Oe.current;Oe.current=ls;try{return Vo(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",Pe(),void 0},useDeferredValue:function(i){return fe="useDeferredValue",Pe(),rm(i)},useTransition:function(){return fe="useTransition",Pe(),sm()},useMutableSource:function(i,s,u){return fe="useMutableSource",Pe(),Kv(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",Pe(),am()},unstable_isNewReconciler:Xi},tb={readContext:function(i,s){return Ht(i,s)},useCallback:function(i,s){return fe="useCallback",Pe(),lh(i,s)},useContext:function(i,s){return fe="useContext",Pe(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",Pe(),vu(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",Pe(),ah(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",Pe(),sh(i,s)},useMemo:function(i,s){fe="useMemo",Pe();var u=Oe.current;Oe.current=jr;try{return uh(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",Pe();var d=Oe.current;Oe.current=jr;try{return Gv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",Pe(),pu()},useState:function(i){fe="useState",Pe();var s=Oe.current;Oe.current=jr;try{return qc(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",Pe(),oh()},useDeferredValue:function(i){return fe="useDeferredValue",Pe(),qS(i)},useTransition:function(){return fe="useTransition",Pe(),QS()},useMutableSource:function(i,s,u){return fe="useMutableSource",Pe(),th(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",Pe(),KS()},unstable_isNewReconciler:Xi},nb={readContext:function(i,s){return Ht(i,s)},useCallback:function(i,s){return fe="useCallback",Pe(),lh(i,s)},useContext:function(i,s){return fe="useContext",Pe(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",Pe(),vu(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",Pe(),ah(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",Pe(),sh(i,s)},useMemo:function(i,s){fe="useMemo",Pe();var u=Oe.current;Oe.current=dh;try{return uh(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",Pe();var d=Oe.current;Oe.current=dh;try{return Xv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",Pe(),pu()},useState:function(i){fe="useState",Pe();var s=Oe.current;Oe.current=dh;try{return Yc(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",Pe(),oh()},useDeferredValue:function(i){return fe="useDeferredValue",Pe(),YS(i)},useTransition:function(){return fe="useTransition",Pe(),GS()},useMutableSource:function(i,s,u){return fe="useMutableSource",Pe(),th(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",Pe(),ZS()},unstable_isNewReconciler:Xi},ls={readContext:function(i,s){return lm(),Ht(i,s)},useCallback:function(i,s){return fe="useCallback",ut(),Gt(),nm(i,s)},useContext:function(i,s){return fe="useContext",ut(),Gt(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",ut(),Gt(),rh(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",ut(),Gt(),tm(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",ut(),Gt(),em(i,s)},useMemo:function(i,s){fe="useMemo",ut(),Gt();var u=Oe.current;Oe.current=ls;try{return im(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",ut(),Gt();var d=Oe.current;Oe.current=ls;try{return Qv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",ut(),Gt(),ih(i)},useState:function(i){fe="useState",ut(),Gt();var s=Oe.current;Oe.current=ls;try{return Vo(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",ut(),Gt(),void 0},useDeferredValue:function(i){return fe="useDeferredValue",ut(),Gt(),rm(i)},useTransition:function(){return fe="useTransition",ut(),Gt(),sm()},useMutableSource:function(i,s,u){return fe="useMutableSource",ut(),Gt(),Kv(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",ut(),Gt(),am()},unstable_isNewReconciler:Xi},jr={readContext:function(i,s){return lm(),Ht(i,s)},useCallback:function(i,s){return fe="useCallback",ut(),Pe(),lh(i,s)},useContext:function(i,s){return fe="useContext",ut(),Pe(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",ut(),Pe(),vu(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",ut(),Pe(),ah(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",ut(),Pe(),sh(i,s)},useMemo:function(i,s){fe="useMemo",ut(),Pe();var u=Oe.current;Oe.current=jr;try{return uh(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",ut(),Pe();var d=Oe.current;Oe.current=jr;try{return Gv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",ut(),Pe(),pu()},useState:function(i){fe="useState",ut(),Pe();var s=Oe.current;Oe.current=jr;try{return qc(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",ut(),Pe(),oh()},useDeferredValue:function(i){return fe="useDeferredValue",ut(),Pe(),qS(i)},useTransition:function(){return fe="useTransition",ut(),Pe(),QS()},useMutableSource:function(i,s,u){return fe="useMutableSource",ut(),Pe(),th(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",ut(),Pe(),KS()},unstable_isNewReconciler:Xi},dh={readContext:function(i,s){return lm(),Ht(i,s)},useCallback:function(i,s){return fe="useCallback",ut(),Pe(),lh(i,s)},useContext:function(i,s){return fe="useContext",ut(),Pe(),Ht(i,s)},useEffect:function(i,s){return fe="useEffect",ut(),Pe(),vu(i,s)},useImperativeHandle:function(i,s,u){return fe="useImperativeHandle",ut(),Pe(),ah(i,s,u)},useLayoutEffect:function(i,s){return fe="useLayoutEffect",ut(),Pe(),sh(i,s)},useMemo:function(i,s){fe="useMemo",ut(),Pe();var u=Oe.current;Oe.current=jr;try{return uh(i,s)}finally{Oe.current=u}},useReducer:function(i,s,u){fe="useReducer",ut(),Pe();var d=Oe.current;Oe.current=jr;try{return Xv(i,s,u)}finally{Oe.current=d}},useRef:function(i){return fe="useRef",ut(),Pe(),pu()},useState:function(i){fe="useState",ut(),Pe();var s=Oe.current;Oe.current=jr;try{return Yc(i)}finally{Oe.current=s}},useDebugValue:function(i,s){return fe="useDebugValue",ut(),Pe(),oh()},useDeferredValue:function(i){return fe="useDeferredValue",ut(),Pe(),YS(i)},useTransition:function(){return fe="useTransition",ut(),Pe(),GS()},useMutableSource:function(i,s,u){return fe="useMutableSource",ut(),Pe(),th(i,s,u)},useOpaqueIdentifier:function(){return fe="useOpaqueIdentifier",ut(),Pe(),ZS()},unstable_isNewReconciler:Xi}}var hh=h.unstable_now,ib=0,Qc=-1;function LO(){return ib}function rb(){ib=hh()}function um(i){Qc=hh(),i.actualStartTime<0&&(i.actualStartTime=hh())}function sb(i){Qc=-1}function ph(i,s){if(Qc>=0){var u=hh()-Qc;i.actualDuration+=u,s&&(i.selfBaseDuration=u),Qc=-1}}function cm(i){for(var s=i.child;s;)i.actualDuration+=s.actualDuration,s=s.sibling}var Gc=g.ReactCurrentOwner,us=!1,fm,Xc,dm,hm,pm,$o,vm,vh;fm={},Xc={},dm={},hm={},pm={},$o=!1,vm={},vh={};function qi(i,s,u,d){i===null?s.child=kS(s,null,u,d):s.child=Yd(s,i.child,u,d)}function PO(i,s,u,d){s.child=Yd(s,i.child,null,d),s.child=Yd(s,null,u,d)}function ab(i,s,u,d,p){if(s.type!==s.elementType){var S=u.propTypes;S&&fi(S,d,"prop",be(u))}var E=u.render,R=s.ref,D;Ea(s,p);{if(Gc.current=s,ri(!0),D=hu(i,s,E,d,R,p),s.mode&Mt){Ii();try{D=hu(i,s,E,d,R,p)}finally{Ji()}}ri(!1)}return i!==null&&!us?(BS(i,s,p),Is(i,s,p)):(s.flags|=ci,qi(i,s,D,p),s.child)}function ob(i,s,u,d,p,S){if(i===null){var E=u.type;if(IL(E)&&u.compare===null&&u.defaultProps===void 0){var R=E;return R=Eu(E),s.tag=me,s.type=R,Sm(s,E),lb(i,s,R,d,p,S)}{var D=E.propTypes;D&&fi(D,d,"prop",be(E))}var I=ag(u.type,null,d,s,s.mode,S);return I.ref=s.ref,I.return=s,s.child=I,I}{var V=u.type,K=V.propTypes;K&&fi(K,d,"prop",be(V))}var ee=i.child;if(!jn(p,S)){var pe=ee.memoizedProps,ge=u.compare;if(ge=ge!==null?ge:ks,ge(pe,d)&&i.ref===s.ref)return Is(i,s,S)}s.flags|=ci;var Ee=Zo(ee,d);return Ee.ref=s.ref,Ee.return=s,s.child=Ee,Ee}function lb(i,s,u,d,p,S){if(s.type!==s.elementType){var E=s.elementType;if(E.$$typeof===Qe){var R=E,D=R._payload,I=R._init;try{E=I(D)}catch{E=null}var V=E&&E.propTypes;V&&fi(V,d,"prop",be(E))}}if(i!==null){var K=i.memoizedProps;if(ks(K,d)&&i.ref===s.ref&&s.type===i.type)if(us=!1,jn(S,p))(i.flags&ia)!==ot&&(us=!0);else return s.lanes=i.lanes,Is(i,s,S)}return gm(i,s,u,d,S)}function mm(i,s,u){var d=s.pendingProps,p=d.children,S=i!==null?i.memoizedState:null;if(d.mode==="hidden"||d.mode==="unstable-defer-without-hiding")if((s.mode&kr)===Yt){var E={baseLanes:ce};s.memoizedState=E,Hh(s,u)}else if(jn(u,Ci)){var V={baseLanes:ce};s.memoizedState=V;var K=S!==null?S.baseLanes:u;Hh(s,K)}else{var R;if(S!==null){var D=S.baseLanes;R=Ct(D,u)}else R=u;Yh(Ci),s.lanes=s.childLanes=Ci;var I={baseLanes:R};return s.memoizedState=I,Hh(s,R),null}else{var ee;S!==null?(ee=Ct(S.baseLanes,u),s.memoizedState=null):ee=u,Hh(s,ee)}return qi(i,s,p,u),s.child}var kO=mm;function zO(i,s,u){var d=s.pendingProps;return qi(i,s,d,u),s.child}function NO(i,s,u){var d=s.pendingProps.children;return qi(i,s,d,u),s.child}function _O(i,s,u){{s.flags|=tt;var d=s.stateNode;d.effectDuration=0,d.passiveEffectDuration=0}var p=s.pendingProps,S=p.children;return qi(i,s,S,u),s.child}function ub(i,s){var u=s.ref;(i===null&&u!==null||i!==null&&i.ref!==u)&&(s.flags|=ln)}function gm(i,s,u,d,p){if(s.type!==s.elementType){var S=u.propTypes;S&&fi(S,d,"prop",be(u))}var E;{var R=Zr(s,u,!0);E=Mr(s,R)}var D;Ea(s,p);{if(Gc.current=s,ri(!0),D=hu(i,s,u,d,E,p),s.mode&Mt){Ii();try{D=hu(i,s,u,d,E,p)}finally{Ji()}}ri(!1)}return i!==null&&!us?(BS(i,s,p),Is(i,s,p)):(s.flags|=ci,qi(i,s,D,p),s.child)}function cb(i,s,u,d,p){if(s.type!==s.elementType){var S=u.propTypes;S&&fi(S,d,"prop",be(u))}var E;Wn(u)?(E=!0,Za(s)):E=!1,Ea(s,p);var R=s.stateNode,D;R===null?(i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt),_r(s,u,d),Mv(s,u,d,p),D=!0):i===null?D=fO(s,u,d,p):D=dO(i,s,u,d,p);var I=ym(i,s,u,D,E,p);{var V=s.stateNode;D&&V.props!==d&&($o||m("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",be(s.type)||"a component"),$o=!0)}return I}function ym(i,s,u,d,p,S){ub(i,s);var E=(s.flags&nt)!==ot;if(!d&&!E)return p&&Ja(s,u,!1),Is(i,s,S);var R=s.stateNode;Gc.current=s;var D;if(E&&typeof u.getDerivedStateFromError!="function")D=null,sb();else{if(ri(!0),D=R.render(),s.mode&Mt){Ii();try{R.render()}finally{Ji()}}ri(!1)}return s.flags|=ci,i!==null&&E?PO(i,s,D,S):qi(i,s,D,S),s.memoizedState=R.state,p&&Ja(s,u,!0),s.child}function fb(i){var s=i.stateNode;s.pendingContext?fc(i,s.pendingContext,s.pendingContext!==s.context):s.context&&fc(i,s.context,!1),Nv(i,s.containerInfo)}function UO(i,s,u){fb(s);var d=s.updateQueue;if(!(i!==null&&d!==null))throw Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var p=s.pendingProps,S=s.memoizedState,E=S!==null?S.element:null;Uo(i,s),f(s,p,null,u);var R=s.memoizedState,D=R.element;if(D===E)return Bv(),Is(i,s,u);var I=s.stateNode;if(I.hydrate&&yO(s)){if(en){var V=I.mutableSourceEagerHydrationData;if(V!=null)for(var K=0;K<V.length;K+=2){var ee=V[K],pe=V[K+1];FS(ee,pe)}}var ge=kS(s,null,D,u);s.child=ge;for(var Ee=ge;Ee;)Ee.flags=Ee.flags&~Dt|xi,Ee=Ee.sibling}else qi(i,s,D,u),Bv();return s.child}function jO(i,s,u){zS(s),i===null&&Fv(s);var d=s.type,p=s.pendingProps,S=i!==null?i.memoizedProps:null,E=p.children,R=Jn(d,p);return R?E=null:S!==null&&Jn(d,S)&&(s.flags|=st),ub(i,s),qi(i,s,E,u),s.child}function IO(i,s){return i===null&&Fv(s),null}function FO(i,s,u,d,p){i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt);var S=s.pendingProps,E=u,R=E._payload,D=E._init,I=D(R);s.type=I;var V=s.tag=FL(I),K=rr(I,S),ee;switch(V){case A:return Sm(s,I),s.type=I=Eu(I),ee=gm(null,s,I,K,p),ee;case k:return s.type=I=eg(I),ee=cb(null,s,I,K,p),ee;case J:return s.type=I=tg(I),ee=ab(null,s,I,K,p),ee;case re:{if(s.type!==s.elementType){var pe=I.propTypes;pe&&fi(pe,K,"prop",be(I))}return ee=ob(null,s,I,rr(I.type,K),d,p),ee}}var ge="";throw I!==null&&typeof I=="object"&&I.$$typeof===Qe&&(ge=" Did you wrap a component in React.lazy() more than once?"),Error("Element type is invalid. Received a promise that resolves to: "+I+". Lazy element type must resolve to a class or function."+ge)}function BO(i,s,u,d,p){i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt),s.tag=k;var S;return Wn(u)?(S=!0,Za(s)):S=!1,Ea(s,p),_r(s,u,d),Mv(s,u,d,p),ym(null,s,u,!0,S,p)}function HO(i,s,u,d){i!==null&&(i.alternate=null,s.alternate=null,s.flags|=Dt);var p=s.pendingProps,S;{var E=Zr(s,u,!1);S=Mr(s,E)}Ea(s,d);var R;{if(u.prototype&&typeof u.prototype.render=="function"){var D=be(u)||"Unknown";fm[D]||(m("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",D,D),fm[D]=!0)}s.mode&Mt&&Vi.recordLegacyContextWarning(s,null),ri(!0),Gc.current=s,R=hu(null,s,u,p,S,d),ri(!1)}if(s.flags|=ci,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){var I=be(u)||"Unknown";Xc[I]||(m("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",I,I,I),Xc[I]=!0)}if(typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0){{var V=be(u)||"Unknown";Xc[V]||(m("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",V,V,V),Xc[V]=!0)}s.tag=k,s.memoizedState=null,s.updateQueue=null;var K=!1;Wn(u)?(K=!0,Za(s)):K=!1,s.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,cu(s);var ee=u.getDerivedStateFromProps;return typeof ee=="function"&&kt(s,u,ee,p),mt(s,R),Mv(s,u,p,d),ym(null,s,u,!0,K,d)}else{if(s.tag=A,s.mode&Mt){Ii();try{R=hu(null,s,u,p,S,d)}finally{Ji()}}return qi(null,s,R,d),Sm(s,u),s.child}}function Sm(i,s){{if(s&&s.childContextTypes&&m("%s(...): childContextTypes cannot be defined on a function component.",s.displayName||s.name||"Component"),i.ref!==null){var u="",d=Bd();d&&(u+=`
133
133
 
134
- Check the render method of \``+d+"`.");var p=d||i._debugID||"",S=i._debugSource;S&&(p=S.fileName+":"+S.lineNumber),pm[p]||(pm[p]=!0,m("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",u))}if(typeof s.getDerivedStateFromProps=="function"){var E=be(s)||"Unknown";hm[E]||(m("%s: Function components do not support getDerivedStateFromProps.",E),hm[E]=!0)}if(typeof s.contextType=="object"&&s.contextType!==null){var R=be(s)||"Unknown";dm[R]||(m("%s: Function components do not support contextType.",R),dm[R]=!0)}}}var mh={dehydrated:null,retryLane:Wn};function gh(i){return{baseLanes:i}}function db(i,s){return{baseLanes:Ct(i.baseLanes,s)}}function VO(i,s,u,d){if(s!==null){var p=s.memoizedState;if(p===null)return!1}return Xd(i,jc)}function hb(i,s){return ho(i.childLanes,s)}function pb(i,s,u){var d=s.pendingProps;Tx(s)&&(s.flags|=tt);var p=Ur.current,S=!1,E=(s.flags&tt)!==at;if(E||VO(p,i)?(S=!0,s.flags&=~tt):(i===null||i.memoizedState!==null)&&d.fallback!==void 0&&d.unstable_avoidThisFallback!==!0&&(p=mO(p,Uv)),p=Ic(p),jo(s,p),i===null){d.fallback!==void 0&&Fv(s);var R=d.children,D=d.fallback;if(S){var F=vb(s,R,D,u),W=s.child;return W.memoizedState=gh(u),s.memoizedState=mh,F}else if(typeof d.unstable_expectedLoadTime=="number"){var X=vb(s,R,D,u),ee=s.child;return ee.memoizedState=gh(u),s.memoizedState=mh,s.lanes=Ls,Yh(Ls),X}else return WO(s,R,u)}else{var he=i.memoizedState;if(he!==null)if(S){var ye=d.fallback,Ee=d.children,Xe=yb(i,s,Ee,ye,u),St=s.child,it=i.child.memoizedState;return St.memoizedState=it===null?gh(u):db(it,u),St.childLanes=hb(i,u),s.memoizedState=mh,Xe}else{var Xt=d.children,Tn=gb(i,s,Xt,u);return s.memoizedState=null,Tn}else if(S){var K=d.fallback,oe=d.children,Y=yb(i,s,oe,K,u),ve=s.child,De=i.child.memoizedState;return ve.memoizedState=De===null?gh(u):db(De,u),ve.childLanes=hb(i,u),s.memoizedState=mh,Y}else{var ze=d.children,bt=gb(i,s,ze,u);return s.memoizedState=null,bt}}}function WO(i,s,u){var d=i.mode,p={mode:"visible",children:s},S=lg(p,d,u,null);return S.return=i,i.child=S,S}function vb(i,s,u,d){var p=i.mode,S=i.child,E={mode:"hidden",children:s},R,D;return(p&Ln)===$t&&S!==null?(R=S,R.childLanes=ue,R.pendingProps=E,i.mode&Yn&&(R.actualDuration=0,R.actualStartTime=-1,R.selfBaseDuration=0,R.treeBaseDuration=0),D=Jo(u,p,d,null)):(R=lg(E,p,ue,null),D=Jo(u,p,d,null)),R.return=i,D.return=i,R.sibling=D,i.child=R,D}function mb(i,s){return Zo(i,s)}function gb(i,s,u,d){var p=i.child,S=p.sibling,E=mb(p,{mode:"visible",children:u});return(s.mode&Ln)===$t&&(E.lanes=d),E.return=s,E.sibling=null,S!==null&&(S.nextEffect=null,S.flags=Pe,s.firstEffect=s.lastEffect=S),s.child=E,E}function yb(i,s,u,d,p){var S=s.mode,E=i.child,R=E.sibling,D={mode:"hidden",children:u},F;if((S&Ln)===$t&&s.child!==E){var W=s.child;F=W,F.childLanes=ue,F.pendingProps=D,s.mode&Yn&&(F.actualDuration=0,F.actualStartTime=-1,F.selfBaseDuration=E.selfBaseDuration,F.treeBaseDuration=E.treeBaseDuration);var X=F.lastEffect;X!==null?(s.firstEffect=F.firstEffect,s.lastEffect=X,X.nextEffect=null):s.firstEffect=s.lastEffect=null}else F=mb(E,D);var ee;return R!==null?ee=Zo(R,d):(ee=Jo(d,S,p,null),ee.flags|=Dt),ee.return=s,F.return=s,F.sibling=ee,s.child=F,ee}function Sb(i,s){i.lanes=Ct(i.lanes,s);var u=i.alternate;u!==null&&(u.lanes=Ct(u.lanes,s)),Ai(i.return,s)}function $O(i,s,u){for(var d=s;d!==null;){if(d.tag===$){var p=d.memoizedState;p!==null&&Sb(d,u)}else if(d.tag===_e)Sb(d,u);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===i)return;for(;d.sibling===null;){if(d.return===null||d.return===i)return;d=d.return}d.sibling.return=d.return,d=d.sibling}}function qO(i){for(var s=i,u=null;s!==null;){var d=s.alternate;d!==null&&Kd(d)===null&&(u=s),s=s.sibling}return u}function YO(i){if(i!==void 0&&i!=="forwards"&&i!=="backwards"&&i!=="together"&&!vm[i])if(vm[i]=!0,typeof i=="string")switch(i.toLowerCase()){case"together":case"forwards":case"backwards":{m('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',i,i.toLowerCase());break}case"forward":case"backward":{m('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',i,i.toLowerCase());break}default:m('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',i);break}else m('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',i)}function QO(i,s){i!==void 0&&!vh[i]&&(i!=="collapsed"&&i!=="hidden"?(vh[i]=!0,m('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',i)):s!=="forwards"&&s!=="backwards"&&(vh[i]=!0,m('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',i)))}function bb(i,s){{var u=Array.isArray(i),d=!u&&typeof Ve(i)=="function";if(u||d){var p=u?"array":"iterable";return m("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",p,s,p),!1}}return!0}function GO(i,s){if((s==="forwards"||s==="backwards")&&i!==void 0&&i!==null&&i!==!1)if(Array.isArray(i)){for(var u=0;u<i.length;u++)if(!bb(i[u],u))return}else{var d=Ve(i);if(typeof d=="function"){var p=d.call(i);if(p)for(var S=p.next(),E=0;!S.done;S=p.next()){if(!bb(S.value,E))return;E++}}else m('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',s)}}function bm(i,s,u,d,p,S){var E=i.memoizedState;E===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:p,lastEffect:S}:(E.isBackwards=s,E.rendering=null,E.renderingStartTime=0,E.last=d,E.tail=u,E.tailMode=p,E.lastEffect=S)}function xb(i,s,u){var d=s.pendingProps,p=d.revealOrder,S=d.tail,E=d.children;YO(p),QO(S,p),GO(E,p),$i(i,s,E,u);var R=Ur.current,D=Xd(R,jc);if(D)R=jv(R,jc),s.flags|=tt;else{var F=i!==null&&(i.flags&tt)!==at;F&&$O(s,s.child,u),R=Ic(R)}if(jo(s,R),(s.mode&Ln)===$t)s.memoizedState=null;else switch(p){case"forwards":{var W=qO(s.child),X;W===null?(X=s.child,s.child=null):(X=W.sibling,W.sibling=null),bm(s,!1,X,W,S,s.lastEffect);break}case"backwards":{var ee=null,he=s.child;for(s.child=null;he!==null;){var ye=he.alternate;if(ye!==null&&Kd(ye)===null){s.child=he;break}var Ee=he.sibling;he.sibling=ee,ee=he,he=Ee}bm(s,!0,ee,null,S,s.lastEffect);break}case"together":{bm(s,!1,null,null,void 0,s.lastEffect);break}default:s.memoizedState=null}return s.child}function XO(i,s,u){Nv(s,s.stateNode.containerInfo);var d=s.pendingProps;return i===null?s.child=Yd(s,null,d,u):$i(i,s,d,u),s.child}var Eb=!1;function KO(i,s,u){var d=s.type,p=d._context,S=s.pendingProps,E=s.memoizedProps,R=S.value;{"value"in S||Eb||(Eb=!0,m("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var D=s.type.propTypes;D&&ci(D,S,"prop","Context.Provider")}if(ko(s,R),E!==null){var F=E.value,W=Rv(p,R,F);if(W===0){if(E.children===S.children&&!Fi())return Is(i,s,u)}else Pc(s,p,W,u)}var X=S.children;return $i(i,s,X,u),s.child}var wb=!1;function ZO(i,s,u){var d=s.type;d._context===void 0?d!==d.Consumer&&(wb||(wb=!0,m("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):d=d._context;var p=s.pendingProps,S=p.children;typeof S!="function"&&m("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Ea(s,u);var E=Ft(d,p.unstable_observedBits),R;return Gc.current=s,ii(!0),R=S(E),ii(!1),s.flags|=ui,$i(i,s,R,u),s.child}function xm(){us=!0}function Is(i,s,u){return i!==null&&(s.dependencies=i.dependencies),sb(),Ym(s.lanes),Un(u,s.childLanes)?(hO(i,s),s.child):null}function JO(i,s,u){{var d=s.return;if(d===null)throw new Error("Cannot swap the root fiber.");if(i.alternate=null,s.alternate=null,u.index=s.index,u.sibling=s.sibling,u.return=s.return,u.ref=s.ref,s===d.child)d.child=u;else{var p=d.child;if(p===null)throw new Error("Expected parent to have a child.");for(;p.sibling!==s;)if(p=p.sibling,p===null)throw new Error("Expected to find the previous sibling.");p.sibling=u}var S=d.lastEffect;return S!==null?(S.nextEffect=i,d.lastEffect=i):d.firstEffect=d.lastEffect=i,i.nextEffect=null,i.flags=Pe,u.flags|=Dt,u}}function Tb(i,s,u){var d=s.lanes;if(s._debugNeedsRemount&&i!==null)return JO(i,s,ag(s.type,s.key,s.pendingProps,s._debugOwner||null,s.mode,s.lanes));if(i!==null){var p=i.memoizedProps,S=s.pendingProps;if(p!==S||Fi()||s.type!==i.type)us=!0;else if(Un(u,d))(i.flags&ia)!==at?us=!0:us=!1;else{switch(us=!1,s.tag){case _:fb(s),Bv();break;case k:zS(s);break;case P:{var E=s.type;Hn(E)&&Za(s);break}case L:Nv(s,s.stateNode.containerInfo);break;case H:{var R=s.memoizedProps.value;ko(s,R);break}case re:{var D=Un(u,s.childLanes);D&&(s.flags|=et);var F=s.stateNode;F.effectDuration=0,F.passiveEffectDuration=0}break;case $:{var W=s.memoizedState;if(W!==null){var X=s.child,ee=X.childLanes;if(Un(u,ee))return pb(i,s,u);jo(s,Ic(Ur.current));var he=Is(i,s,u);return he!==null?he.sibling:null}else jo(s,Ic(Ur.current));break}case _e:{var ye=(i.flags&tt)!==at,Ee=Un(u,s.childLanes);if(ye){if(Ee)return xb(i,s,u);s.flags|=tt}var Xe=s.memoizedState;if(Xe!==null&&(Xe.rendering=null,Xe.tail=null,Xe.lastEffect=null),jo(s,Ur.current),Ee)break;return null}case Ue:case dt:return s.lanes=ue,mm(i,s,u)}return Is(i,s,u)}}else us=!1;switch(s.lanes=ue,s.tag){case M:return HO(i,s,s.type,u);case Ce:{var St=s.elementType;return FO(i,s,St,d,u)}case A:{var it=s.type,Xt=s.pendingProps,Tn=s.elementType===it?Xt:rr(it,Xt);return gm(i,s,it,Tn,u)}case P:{var K=s.type,oe=s.pendingProps,Y=s.elementType===K?oe:rr(K,oe);return cb(i,s,K,Y,u)}case _:return UO(i,s,u);case k:return jO(i,s,u);case O:return IO(i,s);case $:return pb(i,s,u);case L:return XO(i,s,u);case J:{var ve=s.type,De=s.pendingProps,ze=s.elementType===ve?De:rr(ve,De);return ab(i,s,ve,ze,u)}case I:return zO(i,s,u);case q:return NO(i,s,u);case re:return _O(i,s,u);case H:return KO(i,s,u);case te:return ZO(i,s,u);case se:{var bt=s.type,tn=s.pendingProps,fn=rr(bt,tn);if(s.type!==s.elementType){var Nt=bt.propTypes;Nt&&ci(Nt,fn,"prop",be(bt))}return fn=rr(bt.type,fn),ob(i,s,bt,fn,d,u)}case ge:return lb(i,s,s.type,s.pendingProps,d,u);case me:{var Pn=s.type,Ot=s.pendingProps,dn=s.elementType===Pn?Ot:rr(Pn,Ot);return BO(i,s,Pn,dn,u)}case _e:return xb(i,s,u);case Ye:break;case gt:break;case Z:break;case Ue:return mm(i,s,u);case dt:return kO(i,s,u)}throw Error("Unknown unit of work tag ("+s.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function cs(i){i.flags|=et}function Cb(i){i.flags|=an}var Kc,Zc,yh,Sh;if(Nn)Kc=function(i,s,u,d){for(var p=s.child;p!==null;){if(p.tag===k||p.tag===O)Ut(i,p.stateNode);else if(p.tag!==L){if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p===s)return;for(;p.sibling===null;){if(p.return===null||p.return===s)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},Zc=function(i){},yh=function(i,s,u,d,p){var S=i.memoizedProps;if(S!==d){var E=s.stateNode,R=Uc(),D=zn(E,u,S,d,p,R);s.updateQueue=D,D&&cs(s)}},Sh=function(i,s,u,d){u!==d&&cs(s)};else if(cr){Kc=function(i,s,u,d){for(var p=s.child;p!==null;){if(p.tag===k){var S=p.stateNode;if(u&&d){var E=p.memoizedProps,R=p.type;S=oc(S,R,E,p)}Ut(i,S)}else if(p.tag===O){var D=p.stateNode;if(u&&d){var F=p.memoizedProps;D=wl(D,F,p)}Ut(i,D)}else if(p.tag!==L){if(p.tag===$){if((p.flags&et)!==at){var W=p.memoizedState!==null;if(W){var X=p.child;if(X!==null){X.child!==null&&(X.child.return=X,Kc(i,X,!0,W));var ee=X.sibling;if(ee!==null){ee.return=p,p=ee;continue}}}}if(p.child!==null){p.child.return=p,p=p.child;continue}}else if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p=p,p===s)return;for(;p.sibling===null;){if(p.return===null||p.return===s)return;p=p.return}p.sibling.return=p.return,p=p.sibling}};var Rb=function(i,s,u,d){for(var p=s.child;p!==null;){if(p.tag===k){var S=p.stateNode;if(u&&d){var E=p.memoizedProps,R=p.type;S=oc(S,R,E,p)}sc(i,S)}else if(p.tag===O){var D=p.stateNode;if(u&&d){var F=p.memoizedProps;D=wl(D,F,p)}sc(i,D)}else if(p.tag!==L){if(p.tag===$){if((p.flags&et)!==at){var W=p.memoizedState!==null;if(W){var X=p.child;if(X!==null){X.child!==null&&(X.child.return=X,Rb(i,X,!0,W));var ee=X.sibling;if(ee!==null){ee.return=p,p=ee;continue}}}}if(p.child!==null){p.child.return=p,p=p.child;continue}}else if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p=p,p===s)return;for(;p.sibling===null;){if(p.return===null||p.return===s)return;p=p.return}p.sibling.return=p.return,p=p.sibling}};Zc=function(i){var s=i.stateNode,u=i.firstEffect===null;if(!u){var d=s.containerInfo,p=Qa(d);Rb(p,i,!1,!1),s.pendingChildren=p,cs(i),Cd(d,p)}},yh=function(i,s,u,d,p){var S=i.stateNode,E=i.memoizedProps,R=s.firstEffect===null;if(R&&E===d){s.stateNode=S;return}var D=s.stateNode,F=Uc(),W=null;if(E!==d&&(W=zn(D,u,E,d,p,F)),R&&W===null){s.stateNode=S;return}var X=pv(S,W,u,E,d,s,R,D);Ht(X,u,d,p,F)&&cs(s),s.stateNode=X,R?cs(s):Kc(X,s,!1,!1)},Sh=function(i,s,u,d){if(u!==d){var p=zv(),S=Uc();s.stateNode=zi(d,p,S,s),cs(s)}else s.stateNode=i.stateNode}}else Zc=function(i){},yh=function(i,s,u,d,p){},Sh=function(i,s,u,d){};function Jc(i,s){if(!Hv())switch(i.tailMode){case"hidden":{for(var u=i.tail,d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?i.tail=null:d.sibling=null;break}case"collapsed":{for(var p=i.tail,S=null;p!==null;)p.alternate!==null&&(S=p),p=p.sibling;S===null?!s&&i.tail!==null?i.tail.sibling=null:i.tail=null:S.sibling=null;break}}}function Ab(i,s,u){var d=s.pendingProps;switch(s.tag){case M:case Ce:case ge:case A:case J:case I:case q:case re:case te:case se:return null;case P:{var p=s.type;return Hn(p)&&wi(s),null}case _:{fu(s),_l(s),Vv();var S=s.stateNode;if(S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),i===null||i.child===null){var E=Zd(s);E?cs(s):S.hydrate||(s.flags|=Zt)}return Zc(s),null}case k:{_v(s);var R=zv(),D=s.type;if(i!==null&&s.stateNode!=null)yh(i,s,D,d,R),i.ref!==s.ref&&Cb(s);else{if(!d){if(s.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return null}var F=Uc(),W=Zd(s);if(W)SO(s,R,F)&&cs(s);else{var X=yn(D,d,R,F,s);Kc(X,s,!1,!1),s.stateNode=X,Ht(X,D,d,R,F)&&cs(s)}s.ref!==null&&Cb(s)}return null}case O:{var ee=d;if(i&&s.stateNode!=null){var he=i.memoizedProps;Sh(i,s,he,ee)}else{if(typeof ee!="string"&&s.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var ye=zv(),Ee=Uc(),Xe=Zd(s);Xe?bO(s)&&cs(s):s.stateNode=zi(ee,ye,Ee,s)}return null}case $:{du(s);var St=s.memoizedState;if((s.flags&tt)!==at)return s.lanes=u,(s.mode&Yn)!==$t&&cm(s),s;var it=St!==null,Xt=!1;if(i===null)s.memoizedProps.fallback!==void 0&&Zd(s);else{var Tn=i.memoizedState;Xt=Tn!==null}if(it&&!Xt&&(s.mode&Ln)!==$t){var K=i===null&&s.memoizedProps.unstable_avoidThisFallback!==!0;K||Xd(Ur.current,Uv)?eL():tL()}return cr&&it&&(s.flags|=et),Nn&&(it||Xt)&&(s.flags|=et),null}case L:return fu(s),Zc(s),i===null&&tc(s.stateNode.containerInfo),null;case H:return uu(s),null;case me:{var oe=s.type;return Hn(oe)&&wi(s),null}case _e:{du(s);var Y=s.memoizedState;if(Y===null)return null;var ve=(s.flags&tt)!==at,De=Y.rendering;if(De===null)if(ve)Jc(Y,!1);else{var ze=iL()&&(i===null||(i.flags&tt)===at);if(!ze)for(var bt=s.child;bt!==null;){var tn=Kd(bt);if(tn!==null){ve=!0,s.flags|=tt,Jc(Y,!1);var fn=tn.updateQueue;return fn!==null&&(s.updateQueue=fn,s.flags|=et),Y.lastEffect===null&&(s.firstEffect=null),s.lastEffect=Y.lastEffect,pO(s,u),jo(s,jv(Ur.current,jc)),s.child}bt=bt.sibling}Y.tail!==null&&en()>Gb()&&(s.flags|=tt,ve=!0,Jc(Y,!1),s.lanes=Ls,Yh(Ls))}else{if(!ve){var Nt=Kd(De);if(Nt!==null){s.flags|=tt,ve=!0;var Pn=Nt.updateQueue;if(Pn!==null&&(s.updateQueue=Pn,s.flags|=et),Jc(Y,!0),Y.tail===null&&Y.tailMode==="hidden"&&!De.alternate&&!Hv()){var Ot=s.lastEffect=Y.lastEffect;return Ot!==null&&(Ot.nextEffect=null),null}}else en()*2-Y.renderingStartTime>Gb()&&u!==Ti&&(s.flags|=tt,ve=!0,Jc(Y,!1),s.lanes=Ls,Yh(Ls))}if(Y.isBackwards)De.sibling=s.child,s.child=De;else{var dn=Y.last;dn!==null?dn.sibling=De:s.child=De,Y.last=De}}if(Y.tail!==null){var Xn=Y.tail;Y.rendering=Xn,Y.tail=Xn.sibling,Y.lastEffect=s.lastEffect,Y.renderingStartTime=en(),Xn.sibling=null;var Rn=Ur.current;return ve?Rn=jv(Rn,jc):Rn=Ic(Rn),jo(s,Rn),Xn}return null}case Ye:break;case gt:break;case Z:break;case Ue:case dt:{if(qm(s),i!==null){var ds=s.memoizedState,An=i.memoizedState,hs=An!==null,el=ds!==null;hs!==el&&d.mode!=="unstable-defer-without-hiding"&&(s.flags|=et)}return null}}throw Error("Unknown unit of work tag ("+s.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function eD(i,s){switch(i.tag){case P:{var u=i.type;Hn(u)&&wi(i);var d=i.flags;return d&xi?(i.flags=d&~xi|tt,(i.mode&Yn)!==$t&&cm(i),i):null}case _:{fu(i),_l(i),Vv();var p=i.flags;if((p&tt)!==at)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return i.flags=p&~xi|tt,i}case k:return _v(i),null;case $:{du(i);var S=i.flags;return S&xi?(i.flags=S&~xi|tt,(i.mode&Yn)!==$t&&cm(i),i):null}case _e:return du(i),null;case L:return fu(i),null;case H:return uu(i),null;case Ue:case dt:return qm(i),null;default:return null}}function Mb(i){switch(i.tag){case P:{var s=i.type.childContextTypes;s!=null&&wi(i);break}case _:{fu(i),_l(i),Vv();break}case k:{_v(i);break}case L:fu(i);break;case $:du(i);break;case _e:du(i);break;case H:uu(i);break;case Ue:case dt:qm(i);break}}function Em(i,s){return{value:i,source:s,stack:Oc(s)}}function tD(i,s){return!0}function wm(i,s){try{var u=tD(i,s);if(u===!1)return;var d=s.value,p=s.source,S=s.stack,E=S!==null?S:"";if(d!=null&&d._suppressLogging){if(i.tag===P)return;console.error(d)}var R=p?be(p.type):null,D=R?"The above error occurred in the <"+R+"> component:":"The above error occurred in one of your React components:",F,W=be(i.type);W?F="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+W+"."):F=`Consider adding an error boundary to your tree to customize error handling behavior.
135
- Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;var X=D+`
134
+ Check the render method of \``+d+"`.");var p=d||i._debugID||"",S=i._debugSource;S&&(p=S.fileName+":"+S.lineNumber),pm[p]||(pm[p]=!0,m("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",u))}if(typeof s.getDerivedStateFromProps=="function"){var E=be(s)||"Unknown";hm[E]||(m("%s: Function components do not support getDerivedStateFromProps.",E),hm[E]=!0)}if(typeof s.contextType=="object"&&s.contextType!==null){var R=be(s)||"Unknown";dm[R]||(m("%s: Function components do not support contextType.",R),dm[R]=!0)}}}var mh={dehydrated:null,retryLane:$n};function gh(i){return{baseLanes:i}}function db(i,s){return{baseLanes:Ct(i.baseLanes,s)}}function WO(i,s,u,d){if(s!==null){var p=s.memoizedState;if(p===null)return!1}return Xd(i,jc)}function hb(i,s){return ho(i.childLanes,s)}function pb(i,s,u){var d=s.pendingProps;Tx(s)&&(s.flags|=nt);var p=Ur.current,S=!1,E=(s.flags&nt)!==ot;if(E||WO(p,i)?(S=!0,s.flags&=~nt):(i===null||i.memoizedState!==null)&&d.fallback!==void 0&&d.unstable_avoidThisFallback!==!0&&(p=mO(p,Uv)),p=Ic(p),jo(s,p),i===null){d.fallback!==void 0&&Fv(s);var R=d.children,D=d.fallback;if(S){var I=vb(s,R,D,u),V=s.child;return V.memoizedState=gh(u),s.memoizedState=mh,I}else if(typeof d.unstable_expectedLoadTime=="number"){var K=vb(s,R,D,u),ee=s.child;return ee.memoizedState=gh(u),s.memoizedState=mh,s.lanes=Ls,Yh(Ls),K}else return VO(s,R,u)}else{var pe=i.memoizedState;if(pe!==null)if(S){var ge=d.fallback,Ee=d.children,Ze=yb(i,s,Ee,ge,u),gt=s.child,rt=i.child.memoizedState;return gt.memoizedState=rt===null?gh(u):db(rt,u),gt.childLanes=hb(i,u),s.memoizedState=mh,Ze}else{var Zt=d.children,Tn=gb(i,s,Zt,u);return s.memoizedState=null,Tn}else if(S){var Z=d.fallback,oe=d.children,Y=yb(i,s,oe,Z,u),ve=s.child,Le=i.child.memoizedState;return ve.memoizedState=Le===null?gh(u):db(Le,u),ve.childLanes=hb(i,u),s.memoizedState=mh,Y}else{var _e=d.children,yt=gb(i,s,_e,u);return s.memoizedState=null,yt}}}function VO(i,s,u){var d=i.mode,p={mode:"visible",children:s},S=lg(p,d,u,null);return S.return=i,i.child=S,S}function vb(i,s,u,d){var p=i.mode,S=i.child,E={mode:"hidden",children:s},R,D;return(p&Ln)===Yt&&S!==null?(R=S,R.childLanes=ce,R.pendingProps=E,i.mode&Qn&&(R.actualDuration=0,R.actualStartTime=-1,R.selfBaseDuration=0,R.treeBaseDuration=0),D=Jo(u,p,d,null)):(R=lg(E,p,ce,null),D=Jo(u,p,d,null)),R.return=i,D.return=i,R.sibling=D,i.child=R,D}function mb(i,s){return Zo(i,s)}function gb(i,s,u,d){var p=i.child,S=p.sibling,E=mb(p,{mode:"visible",children:u});return(s.mode&Ln)===Yt&&(E.lanes=d),E.return=s,E.sibling=null,S!==null&&(S.nextEffect=null,S.flags=ze,s.firstEffect=s.lastEffect=S),s.child=E,E}function yb(i,s,u,d,p){var S=s.mode,E=i.child,R=E.sibling,D={mode:"hidden",children:u},I;if((S&Ln)===Yt&&s.child!==E){var V=s.child;I=V,I.childLanes=ce,I.pendingProps=D,s.mode&Qn&&(I.actualDuration=0,I.actualStartTime=-1,I.selfBaseDuration=E.selfBaseDuration,I.treeBaseDuration=E.treeBaseDuration);var K=I.lastEffect;K!==null?(s.firstEffect=I.firstEffect,s.lastEffect=K,K.nextEffect=null):s.firstEffect=s.lastEffect=null}else I=mb(E,D);var ee;return R!==null?ee=Zo(R,d):(ee=Jo(d,S,p,null),ee.flags|=Dt),ee.return=s,I.return=s,I.sibling=ee,s.child=I,ee}function Sb(i,s){i.lanes=Ct(i.lanes,s);var u=i.alternate;u!==null&&(u.lanes=Ct(u.lanes,s)),Mi(i.return,s)}function $O(i,s,u){for(var d=s;d!==null;){if(d.tag===$){var p=d.memoizedState;p!==null&&Sb(d,u)}else if(d.tag===ke)Sb(d,u);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===i)return;for(;d.sibling===null;){if(d.return===null||d.return===i)return;d=d.return}d.sibling.return=d.return,d=d.sibling}}function qO(i){for(var s=i,u=null;s!==null;){var d=s.alternate;d!==null&&Kd(d)===null&&(u=s),s=s.sibling}return u}function YO(i){if(i!==void 0&&i!=="forwards"&&i!=="backwards"&&i!=="together"&&!vm[i])if(vm[i]=!0,typeof i=="string")switch(i.toLowerCase()){case"together":case"forwards":case"backwards":{m('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',i,i.toLowerCase());break}case"forward":case"backward":{m('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',i,i.toLowerCase());break}default:m('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',i);break}else m('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',i)}function QO(i,s){i!==void 0&&!vh[i]&&(i!=="collapsed"&&i!=="hidden"?(vh[i]=!0,m('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',i)):s!=="forwards"&&s!=="backwards"&&(vh[i]=!0,m('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',i)))}function bb(i,s){{var u=Array.isArray(i),d=!u&&typeof Ve(i)=="function";if(u||d){var p=u?"array":"iterable";return m("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",p,s,p),!1}}return!0}function GO(i,s){if((s==="forwards"||s==="backwards")&&i!==void 0&&i!==null&&i!==!1)if(Array.isArray(i)){for(var u=0;u<i.length;u++)if(!bb(i[u],u))return}else{var d=Ve(i);if(typeof d=="function"){var p=d.call(i);if(p)for(var S=p.next(),E=0;!S.done;S=p.next()){if(!bb(S.value,E))return;E++}}else m('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',s)}}function bm(i,s,u,d,p,S){var E=i.memoizedState;E===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:p,lastEffect:S}:(E.isBackwards=s,E.rendering=null,E.renderingStartTime=0,E.last=d,E.tail=u,E.tailMode=p,E.lastEffect=S)}function xb(i,s,u){var d=s.pendingProps,p=d.revealOrder,S=d.tail,E=d.children;YO(p),QO(S,p),GO(E,p),qi(i,s,E,u);var R=Ur.current,D=Xd(R,jc);if(D)R=jv(R,jc),s.flags|=nt;else{var I=i!==null&&(i.flags&nt)!==ot;I&&$O(s,s.child,u),R=Ic(R)}if(jo(s,R),(s.mode&Ln)===Yt)s.memoizedState=null;else switch(p){case"forwards":{var V=qO(s.child),K;V===null?(K=s.child,s.child=null):(K=V.sibling,V.sibling=null),bm(s,!1,K,V,S,s.lastEffect);break}case"backwards":{var ee=null,pe=s.child;for(s.child=null;pe!==null;){var ge=pe.alternate;if(ge!==null&&Kd(ge)===null){s.child=pe;break}var Ee=pe.sibling;pe.sibling=ee,ee=pe,pe=Ee}bm(s,!0,ee,null,S,s.lastEffect);break}case"together":{bm(s,!1,null,null,void 0,s.lastEffect);break}default:s.memoizedState=null}return s.child}function XO(i,s,u){Nv(s,s.stateNode.containerInfo);var d=s.pendingProps;return i===null?s.child=Yd(s,null,d,u):qi(i,s,d,u),s.child}var Eb=!1;function KO(i,s,u){var d=s.type,p=d._context,S=s.pendingProps,E=s.memoizedProps,R=S.value;{"value"in S||Eb||(Eb=!0,m("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var D=s.type.propTypes;D&&fi(D,S,"prop","Context.Provider")}if(ko(s,R),E!==null){var I=E.value,V=Rv(p,R,I);if(V===0){if(E.children===S.children&&!Bi())return Is(i,s,u)}else Pc(s,p,V,u)}var K=S.children;return qi(i,s,K,u),s.child}var wb=!1;function ZO(i,s,u){var d=s.type;d._context===void 0?d!==d.Consumer&&(wb||(wb=!0,m("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):d=d._context;var p=s.pendingProps,S=p.children;typeof S!="function"&&m("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Ea(s,u);var E=Ht(d,p.unstable_observedBits),R;return Gc.current=s,ri(!0),R=S(E),ri(!1),s.flags|=ci,qi(i,s,R,u),s.child}function xm(){us=!0}function Is(i,s,u){return i!==null&&(s.dependencies=i.dependencies),sb(),Ym(s.lanes),jn(u,s.childLanes)?(hO(i,s),s.child):null}function JO(i,s,u){{var d=s.return;if(d===null)throw new Error("Cannot swap the root fiber.");if(i.alternate=null,s.alternate=null,u.index=s.index,u.sibling=s.sibling,u.return=s.return,u.ref=s.ref,s===d.child)d.child=u;else{var p=d.child;if(p===null)throw new Error("Expected parent to have a child.");for(;p.sibling!==s;)if(p=p.sibling,p===null)throw new Error("Expected to find the previous sibling.");p.sibling=u}var S=d.lastEffect;return S!==null?(S.nextEffect=i,d.lastEffect=i):d.firstEffect=d.lastEffect=i,i.nextEffect=null,i.flags=ze,u.flags|=Dt,u}}function Tb(i,s,u){var d=s.lanes;if(s._debugNeedsRemount&&i!==null)return JO(i,s,ag(s.type,s.key,s.pendingProps,s._debugOwner||null,s.mode,s.lanes));if(i!==null){var p=i.memoizedProps,S=s.pendingProps;if(p!==S||Bi()||s.type!==i.type)us=!0;else if(jn(u,d))(i.flags&ia)!==ot?us=!0:us=!1;else{switch(us=!1,s.tag){case _:fb(s),Bv();break;case P:zS(s);break;case k:{var E=s.type;Wn(E)&&Za(s);break}case L:Nv(s,s.stateNode.containerInfo);break;case B:{var R=s.memoizedProps.value;ko(s,R);break}case ie:{var D=jn(u,s.childLanes);D&&(s.flags|=tt);var I=s.stateNode;I.effectDuration=0,I.passiveEffectDuration=0}break;case $:{var V=s.memoizedState;if(V!==null){var K=s.child,ee=K.childLanes;if(jn(u,ee))return pb(i,s,u);jo(s,Ic(Ur.current));var pe=Is(i,s,u);return pe!==null?pe.sibling:null}else jo(s,Ic(Ur.current));break}case ke:{var ge=(i.flags&nt)!==ot,Ee=jn(u,s.childLanes);if(ge){if(Ee)return xb(i,s,u);s.flags|=nt}var Ze=s.memoizedState;if(Ze!==null&&(Ze.rendering=null,Ze.tail=null,Ze.lastEffect=null),jo(s,Ur.current),Ee)break;return null}case it:case ue:return s.lanes=ce,mm(i,s,u)}return Is(i,s,u)}}else us=!1;switch(s.lanes=ce,s.tag){case M:return HO(i,s,s.type,u);case Re:{var gt=s.elementType;return FO(i,s,gt,d,u)}case A:{var rt=s.type,Zt=s.pendingProps,Tn=s.elementType===rt?Zt:rr(rt,Zt);return gm(i,s,rt,Tn,u)}case k:{var Z=s.type,oe=s.pendingProps,Y=s.elementType===Z?oe:rr(Z,oe);return cb(i,s,Z,Y,u)}case _:return UO(i,s,u);case P:return jO(i,s,u);case O:return IO(i,s);case $:return pb(i,s,u);case L:return XO(i,s,u);case J:{var ve=s.type,Le=s.pendingProps,_e=s.elementType===ve?Le:rr(ve,Le);return ab(i,s,ve,_e,u)}case H:return zO(i,s,u);case q:return NO(i,s,u);case ie:return _O(i,s,u);case B:return KO(i,s,u);case Q:return ZO(i,s,u);case re:{var yt=s.type,nn=s.pendingProps,hn=rr(yt,nn);if(s.type!==s.elementType){var Nt=yt.propTypes;Nt&&fi(Nt,hn,"prop",be(yt))}return hn=rr(yt.type,hn),ob(i,s,yt,hn,d,u)}case me:return lb(i,s,s.type,s.pendingProps,d,u);case Se:{var Pn=s.type,Ot=s.pendingProps,pn=s.elementType===Pn?Ot:rr(Pn,Ot);return BO(i,s,Pn,pn,u)}case ke:return xb(i,s,u);case Xe:break;case ft:break;case Te:break;case it:return mm(i,s,u);case ue:return kO(i,s,u)}throw Error("Unknown unit of work tag ("+s.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function cs(i){i.flags|=tt}function Cb(i){i.flags|=ln}var Kc,Zc,yh,Sh;if(_n)Kc=function(i,s,u,d){for(var p=s.child;p!==null;){if(p.tag===P||p.tag===O)It(i,p.stateNode);else if(p.tag!==L){if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p===s)return;for(;p.sibling===null;){if(p.return===null||p.return===s)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},Zc=function(i){},yh=function(i,s,u,d,p){var S=i.memoizedProps;if(S!==d){var E=s.stateNode,R=Uc(),D=Nn(E,u,S,d,p,R);s.updateQueue=D,D&&cs(s)}},Sh=function(i,s,u,d){u!==d&&cs(s)};else if(cr){Kc=function(i,s,u,d){for(var p=s.child;p!==null;){if(p.tag===P){var S=p.stateNode;if(u&&d){var E=p.memoizedProps,R=p.type;S=oc(S,R,E,p)}It(i,S)}else if(p.tag===O){var D=p.stateNode;if(u&&d){var I=p.memoizedProps;D=wl(D,I,p)}It(i,D)}else if(p.tag!==L){if(p.tag===$){if((p.flags&tt)!==ot){var V=p.memoizedState!==null;if(V){var K=p.child;if(K!==null){K.child!==null&&(K.child.return=K,Kc(i,K,!0,V));var ee=K.sibling;if(ee!==null){ee.return=p,p=ee;continue}}}}if(p.child!==null){p.child.return=p,p=p.child;continue}}else if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p=p,p===s)return;for(;p.sibling===null;){if(p.return===null||p.return===s)return;p=p.return}p.sibling.return=p.return,p=p.sibling}};var Rb=function(i,s,u,d){for(var p=s.child;p!==null;){if(p.tag===P){var S=p.stateNode;if(u&&d){var E=p.memoizedProps,R=p.type;S=oc(S,R,E,p)}sc(i,S)}else if(p.tag===O){var D=p.stateNode;if(u&&d){var I=p.memoizedProps;D=wl(D,I,p)}sc(i,D)}else if(p.tag!==L){if(p.tag===$){if((p.flags&tt)!==ot){var V=p.memoizedState!==null;if(V){var K=p.child;if(K!==null){K.child!==null&&(K.child.return=K,Rb(i,K,!0,V));var ee=K.sibling;if(ee!==null){ee.return=p,p=ee;continue}}}}if(p.child!==null){p.child.return=p,p=p.child;continue}}else if(p.child!==null){p.child.return=p,p=p.child;continue}}if(p=p,p===s)return;for(;p.sibling===null;){if(p.return===null||p.return===s)return;p=p.return}p.sibling.return=p.return,p=p.sibling}};Zc=function(i){var s=i.stateNode,u=i.firstEffect===null;if(!u){var d=s.containerInfo,p=Qa(d);Rb(p,i,!1,!1),s.pendingChildren=p,cs(i),Cd(d,p)}},yh=function(i,s,u,d,p){var S=i.stateNode,E=i.memoizedProps,R=s.firstEffect===null;if(R&&E===d){s.stateNode=S;return}var D=s.stateNode,I=Uc(),V=null;if(E!==d&&(V=Nn(D,u,E,d,p,I)),R&&V===null){s.stateNode=S;return}var K=pv(S,V,u,E,d,s,R,D);Vt(K,u,d,p,I)&&cs(s),s.stateNode=K,R?cs(s):Kc(K,s,!1,!1)},Sh=function(i,s,u,d){if(u!==d){var p=zv(),S=Uc();s.stateNode=Ni(d,p,S,s),cs(s)}else s.stateNode=i.stateNode}}else Zc=function(i){},yh=function(i,s,u,d,p){},Sh=function(i,s,u,d){};function Jc(i,s){if(!Hv())switch(i.tailMode){case"hidden":{for(var u=i.tail,d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?i.tail=null:d.sibling=null;break}case"collapsed":{for(var p=i.tail,S=null;p!==null;)p.alternate!==null&&(S=p),p=p.sibling;S===null?!s&&i.tail!==null?i.tail.sibling=null:i.tail=null:S.sibling=null;break}}}function Ab(i,s,u){var d=s.pendingProps;switch(s.tag){case M:case Re:case me:case A:case J:case H:case q:case ie:case Q:case re:return null;case k:{var p=s.type;return Wn(p)&&Ti(s),null}case _:{fu(s),_l(s),Wv();var S=s.stateNode;if(S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),i===null||i.child===null){var E=Zd(s);E?cs(s):S.hydrate||(s.flags|=Jt)}return Zc(s),null}case P:{_v(s);var R=zv(),D=s.type;if(i!==null&&s.stateNode!=null)yh(i,s,D,d,R),i.ref!==s.ref&&Cb(s);else{if(!d){if(s.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return null}var I=Uc(),V=Zd(s);if(V)SO(s,R,I)&&cs(s);else{var K=yn(D,d,R,I,s);Kc(K,s,!1,!1),s.stateNode=K,Vt(K,D,d,R,I)&&cs(s)}s.ref!==null&&Cb(s)}return null}case O:{var ee=d;if(i&&s.stateNode!=null){var pe=i.memoizedProps;Sh(i,s,pe,ee)}else{if(typeof ee!="string"&&s.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var ge=zv(),Ee=Uc(),Ze=Zd(s);Ze?bO(s)&&cs(s):s.stateNode=Ni(ee,ge,Ee,s)}return null}case $:{du(s);var gt=s.memoizedState;if((s.flags&nt)!==ot)return s.lanes=u,(s.mode&Qn)!==Yt&&cm(s),s;var rt=gt!==null,Zt=!1;if(i===null)s.memoizedProps.fallback!==void 0&&Zd(s);else{var Tn=i.memoizedState;Zt=Tn!==null}if(rt&&!Zt&&(s.mode&Ln)!==Yt){var Z=i===null&&s.memoizedProps.unstable_avoidThisFallback!==!0;Z||Xd(Ur.current,Uv)?eL():tL()}return cr&&rt&&(s.flags|=tt),_n&&(rt||Zt)&&(s.flags|=tt),null}case L:return fu(s),Zc(s),i===null&&tc(s.stateNode.containerInfo),null;case B:return uu(s),null;case Se:{var oe=s.type;return Wn(oe)&&Ti(s),null}case ke:{du(s);var Y=s.memoizedState;if(Y===null)return null;var ve=(s.flags&nt)!==ot,Le=Y.rendering;if(Le===null)if(ve)Jc(Y,!1);else{var _e=iL()&&(i===null||(i.flags&nt)===ot);if(!_e)for(var yt=s.child;yt!==null;){var nn=Kd(yt);if(nn!==null){ve=!0,s.flags|=nt,Jc(Y,!1);var hn=nn.updateQueue;return hn!==null&&(s.updateQueue=hn,s.flags|=tt),Y.lastEffect===null&&(s.firstEffect=null),s.lastEffect=Y.lastEffect,pO(s,u),jo(s,jv(Ur.current,jc)),s.child}yt=yt.sibling}Y.tail!==null&&tn()>Gb()&&(s.flags|=nt,ve=!0,Jc(Y,!1),s.lanes=Ls,Yh(Ls))}else{if(!ve){var Nt=Kd(Le);if(Nt!==null){s.flags|=nt,ve=!0;var Pn=Nt.updateQueue;if(Pn!==null&&(s.updateQueue=Pn,s.flags|=tt),Jc(Y,!0),Y.tail===null&&Y.tailMode==="hidden"&&!Le.alternate&&!Hv()){var Ot=s.lastEffect=Y.lastEffect;return Ot!==null&&(Ot.nextEffect=null),null}}else tn()*2-Y.renderingStartTime>Gb()&&u!==Ci&&(s.flags|=nt,ve=!0,Jc(Y,!1),s.lanes=Ls,Yh(Ls))}if(Y.isBackwards)Le.sibling=s.child,s.child=Le;else{var pn=Y.last;pn!==null?pn.sibling=Le:s.child=Le,Y.last=Le}}if(Y.tail!==null){var Kn=Y.tail;Y.rendering=Kn,Y.tail=Kn.sibling,Y.lastEffect=s.lastEffect,Y.renderingStartTime=tn(),Kn.sibling=null;var Rn=Ur.current;return ve?Rn=jv(Rn,jc):Rn=Ic(Rn),jo(s,Rn),Kn}return null}case Xe:break;case ft:break;case Te:break;case it:case ue:{if(qm(s),i!==null){var ds=s.memoizedState,An=i.memoizedState,hs=An!==null,el=ds!==null;hs!==el&&d.mode!=="unstable-defer-without-hiding"&&(s.flags|=tt)}return null}}throw Error("Unknown unit of work tag ("+s.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function eD(i,s){switch(i.tag){case k:{var u=i.type;Wn(u)&&Ti(i);var d=i.flags;return d&Ei?(i.flags=d&~Ei|nt,(i.mode&Qn)!==Yt&&cm(i),i):null}case _:{fu(i),_l(i),Wv();var p=i.flags;if((p&nt)!==ot)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return i.flags=p&~Ei|nt,i}case P:return _v(i),null;case $:{du(i);var S=i.flags;return S&Ei?(i.flags=S&~Ei|nt,(i.mode&Qn)!==Yt&&cm(i),i):null}case ke:return du(i),null;case L:return fu(i),null;case B:return uu(i),null;case it:case ue:return qm(i),null;default:return null}}function Mb(i){switch(i.tag){case k:{var s=i.type.childContextTypes;s!=null&&Ti(i);break}case _:{fu(i),_l(i),Wv();break}case P:{_v(i);break}case L:fu(i);break;case $:du(i);break;case ke:du(i);break;case B:uu(i);break;case it:case ue:qm(i);break}}function Em(i,s){return{value:i,source:s,stack:Oc(s)}}function tD(i,s){return!0}function wm(i,s){try{var u=tD(i,s);if(u===!1)return;var d=s.value,p=s.source,S=s.stack,E=S!==null?S:"";if(d!=null&&d._suppressLogging){if(i.tag===k)return;console.error(d)}var R=p?be(p.type):null,D=R?"The above error occurred in the <"+R+"> component:":"The above error occurred in one of your React components:",I,V=be(i.type);V?I="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+V+"."):I=`Consider adding an error boundary to your tree to customize error handling behavior.
135
+ Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;var K=D+`
136
136
  `+E+`
137
137
 
138
- `+(""+F);console.error(X)}catch(ee){setTimeout(function(){throw ee})}}var nD=typeof WeakMap=="function"?WeakMap:Map;function Ob(i,s,u){var d=as(sn,u);d.tag=No,d.payload={element:null};var p=s.value;return d.callback=function(){gL(p),wm(i,s)},d}function Db(i,s,u){var d=as(sn,u);d.tag=No;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var S=s.value;d.payload=function(){return wm(i,s),p(S)}}var E=i.stateNode;return E!==null&&typeof E.componentDidCatch=="function"?d.callback=function(){yx(i),typeof p!="function"&&(vL(this),wm(i,s));var D=s.value,F=s.stack;this.componentDidCatch(D,{componentStack:F!==null?F:""}),typeof p!="function"&&(Un(i.lanes,Tt)||m("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",be(i.type)||"Unknown"))}:d.callback=function(){yx(i)},d}function iD(i,s,u){var d=i.pingCache,p;if(d===null?(d=i.pingCache=new nD,p=new Set,d.set(s,p)):(p=d.get(s),p===void 0&&(p=new Set,d.set(s,p))),!p.has(u)){p.add(u);var S=yL.bind(null,i,s,u);s.then(S,S)}}function rD(i,s,u,d,p){if(u.flags|=Yr,u.firstEffect=u.lastEffect=null,d!==null&&typeof d=="object"&&typeof d.then=="function"){var S=d;if((u.mode&Ln)===$t){var E=u.alternate;E?(u.updateQueue=E.updateQueue,u.memoizedState=E.memoizedState,u.lanes=E.lanes):(u.updateQueue=null,u.memoizedState=null)}var R=Xd(Ur.current,Uv),D=s;do{if(D.tag===$&&gO(D,R)){var F=D.updateQueue;if(F===null){var W=new Set;W.add(S),D.updateQueue=W}else F.add(S);if((D.mode&Ln)===$t){if(D.flags|=tt,u.flags|=ia,u.flags&=~(Ha|Yr),u.tag===P){var X=u.alternate;if(X===null)u.tag=me;else{var ee=as(sn,Tt);ee.tag=wa,os(u,ee)}}u.lanes=Ct(u.lanes,Tt);return}iD(i,S,p),D.flags|=xi,D.lanes=p;return}D=D.return}while(D!==null);d=new Error((be(u.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
138
+ `+(""+I);console.error(K)}catch(ee){setTimeout(function(){throw ee})}}var nD=typeof WeakMap=="function"?WeakMap:Map;function Ob(i,s,u){var d=as(on,u);d.tag=No,d.payload={element:null};var p=s.value;return d.callback=function(){gL(p),wm(i,s)},d}function Db(i,s,u){var d=as(on,u);d.tag=No;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var S=s.value;d.payload=function(){return wm(i,s),p(S)}}var E=i.stateNode;return E!==null&&typeof E.componentDidCatch=="function"?d.callback=function(){yx(i),typeof p!="function"&&(vL(this),wm(i,s));var D=s.value,I=s.stack;this.componentDidCatch(D,{componentStack:I!==null?I:""}),typeof p!="function"&&(jn(i.lanes,Tt)||m("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",be(i.type)||"Unknown"))}:d.callback=function(){yx(i)},d}function iD(i,s,u){var d=i.pingCache,p;if(d===null?(d=i.pingCache=new nD,p=new Set,d.set(s,p)):(p=d.get(s),p===void 0&&(p=new Set,d.set(s,p))),!p.has(u)){p.add(u);var S=yL.bind(null,i,s,u);s.then(S,S)}}function rD(i,s,u,d,p){if(u.flags|=Yr,u.firstEffect=u.lastEffect=null,d!==null&&typeof d=="object"&&typeof d.then=="function"){var S=d;if((u.mode&Ln)===Yt){var E=u.alternate;E?(u.updateQueue=E.updateQueue,u.memoizedState=E.memoizedState,u.lanes=E.lanes):(u.updateQueue=null,u.memoizedState=null)}var R=Xd(Ur.current,Uv),D=s;do{if(D.tag===$&&gO(D,R)){var I=D.updateQueue;if(I===null){var V=new Set;V.add(S),D.updateQueue=V}else I.add(S);if((D.mode&Ln)===Yt){if(D.flags|=nt,u.flags|=ia,u.flags&=~(Ha|Yr),u.tag===k){var K=u.alternate;if(K===null)u.tag=Se;else{var ee=as(on,Tt);ee.tag=wa,os(u,ee)}}u.lanes=Ct(u.lanes,Tt);return}iD(i,S,p),D.flags|=Ei,D.lanes=p;return}D=D.return}while(D!==null);d=new Error((be(u.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
139
139
 
140
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}nL(),d=Em(d,u);var he=s;do{switch(he.tag){case _:{var ye=d;he.flags|=xi;var Ee=ni(p);he.lanes=Ct(he.lanes,Ee);var Xe=Ob(he,ye,Ee);a(he,Xe);return}case P:var St=d,it=he.type,Xt=he.stateNode;if((he.flags&tt)===at&&(typeof it.getDerivedStateFromError=="function"||Xt!==null&&typeof Xt.componentDidCatch=="function"&&!Qm(Xt))){he.flags|=xi;var Tn=ni(p);he.lanes=Ct(he.lanes,Tn);var K=Db(he,St,Tn);a(he,K);return}break}he=he.return}while(he!==null)}function Lb(i,s,u,d,p,S,E,R,D){var F=Array.prototype.slice.call(arguments,3);try{s.apply(u,F)}catch(W){this.onError(W)}}var Pb=Lb;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Tm=document.createElement("react");Pb=function(s,u,d,p,S,E,R,D,F){if(!(typeof document<"u"))throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var W=document.createEvent("Event"),X=!1,ee=!0,he=window.event,ye=Object.getOwnPropertyDescriptor(window,"event");function Ee(){Tm.removeEventListener(oe,St,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=he)}var Xe=Array.prototype.slice.call(arguments,3);function St(){X=!0,Ee(),u.apply(d,Xe),ee=!1}var it,Xt=!1,Tn=!1;function K(Y){if(it=Y.error,Xt=!0,it===null&&Y.colno===0&&Y.lineno===0&&(Tn=!0),Y.defaultPrevented&&it!=null&&typeof it=="object")try{it._suppressLogging=!0}catch{}}var oe="react-"+(s||"invokeguardedcallback");if(window.addEventListener("error",K),Tm.addEventListener(oe,St,!1),W.initEvent(oe,!1,!1),Tm.dispatchEvent(W),ye&&Object.defineProperty(window,"event",ye),X&&ee&&(Xt?Tn&&(it=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):it=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(it)),window.removeEventListener("error",K),!X)return Ee(),Lb.apply(this,arguments)}}var sD=Pb,ef=!1,bh=null,aD={onError:function(i){ef=!0,bh=i}};function Fs(i,s,u,d,p,S,E,R,D){ef=!1,bh=null,sD.apply(aD,arguments)}function Bs(){return ef}function Hs(){if(ef){var i=bh;return ef=!1,bh=null,i}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var kb=null;kb=new Set;var oD=typeof WeakSet=="function"?WeakSet:Set,lD=function(i,s){s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()};function uD(i,s){if(Fs(null,lD,null,i,s),Bs()){var u=Hs();Da(i,u)}}function zb(i){var s=i.ref;if(s!==null)if(typeof s=="function"){if(Fs(null,s,null,null),Bs()){var u=Hs();Da(i,u)}}else s.current=null}function cD(i,s){if(Fs(null,s,null),Bs()){var u=Hs();Da(i,u)}}function fD(i,s){switch(s.tag){case A:case J:case ge:case Z:return;case P:{if(s.flags&Zt&&i!==null){var u=i.memoizedProps,d=i.memoizedState,p=s.stateNode;s.type===s.elementType&&!$o&&(p.props!==s.memoizedProps&&m("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(s.type)||"instance"),p.state!==s.memoizedState&&m("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(s.type)||"instance"));var S=p.getSnapshotBeforeUpdate(s.elementType===s.type?u:rr(s.type,u),d);{var E=kb;S===void 0&&!E.has(s.type)&&(E.add(s.type),m("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",be(s.type)))}p.__reactInternalSnapshotBeforeUpdate=S}return}case _:{if(Nn&&s.flags&Zt){var R=s.stateNode;Ya(R.containerInfo)}return}case k:case O:case L:case me:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Nb(i,s){var u=s.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var p=d.next,S=p;do{if((S.tag&i)===i){var E=S.destroy;S.destroy=void 0,E!==void 0&&E()}S=S.next}while(S!==p)}}function dD(i,s){var u=s.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var p=d.next,S=p;do{if((S.tag&i)===i){var E=S.create;S.destroy=E();{var R=S.destroy;if(R!==void 0&&typeof R!="function"){var D=void 0;R===null?D=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof R.then=="function"?D=`
140
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}nL(),d=Em(d,u);var pe=s;do{switch(pe.tag){case _:{var ge=d;pe.flags|=Ei;var Ee=ii(p);pe.lanes=Ct(pe.lanes,Ee);var Ze=Ob(pe,ge,Ee);a(pe,Ze);return}case k:var gt=d,rt=pe.type,Zt=pe.stateNode;if((pe.flags&nt)===ot&&(typeof rt.getDerivedStateFromError=="function"||Zt!==null&&typeof Zt.componentDidCatch=="function"&&!Qm(Zt))){pe.flags|=Ei;var Tn=ii(p);pe.lanes=Ct(pe.lanes,Tn);var Z=Db(pe,gt,Tn);a(pe,Z);return}break}pe=pe.return}while(pe!==null)}function Lb(i,s,u,d,p,S,E,R,D){var I=Array.prototype.slice.call(arguments,3);try{s.apply(u,I)}catch(V){this.onError(V)}}var Pb=Lb;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Tm=document.createElement("react");Pb=function(s,u,d,p,S,E,R,D,I){if(!(typeof document<"u"))throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var V=document.createEvent("Event"),K=!1,ee=!0,pe=window.event,ge=Object.getOwnPropertyDescriptor(window,"event");function Ee(){Tm.removeEventListener(oe,gt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=pe)}var Ze=Array.prototype.slice.call(arguments,3);function gt(){K=!0,Ee(),u.apply(d,Ze),ee=!1}var rt,Zt=!1,Tn=!1;function Z(Y){if(rt=Y.error,Zt=!0,rt===null&&Y.colno===0&&Y.lineno===0&&(Tn=!0),Y.defaultPrevented&&rt!=null&&typeof rt=="object")try{rt._suppressLogging=!0}catch{}}var oe="react-"+(s||"invokeguardedcallback");if(window.addEventListener("error",Z),Tm.addEventListener(oe,gt,!1),V.initEvent(oe,!1,!1),Tm.dispatchEvent(V),ge&&Object.defineProperty(window,"event",ge),K&&ee&&(Zt?Tn&&(rt=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):rt=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(rt)),window.removeEventListener("error",Z),!K)return Ee(),Lb.apply(this,arguments)}}var sD=Pb,ef=!1,bh=null,aD={onError:function(i){ef=!0,bh=i}};function Fs(i,s,u,d,p,S,E,R,D){ef=!1,bh=null,sD.apply(aD,arguments)}function Bs(){return ef}function Hs(){if(ef){var i=bh;return ef=!1,bh=null,i}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var kb=null;kb=new Set;var oD=typeof WeakSet=="function"?WeakSet:Set,lD=function(i,s){s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()};function uD(i,s){if(Fs(null,lD,null,i,s),Bs()){var u=Hs();Da(i,u)}}function zb(i){var s=i.ref;if(s!==null)if(typeof s=="function"){if(Fs(null,s,null,null),Bs()){var u=Hs();Da(i,u)}}else s.current=null}function cD(i,s){if(Fs(null,s,null),Bs()){var u=Hs();Da(i,u)}}function fD(i,s){switch(s.tag){case A:case J:case me:case Te:return;case k:{if(s.flags&Jt&&i!==null){var u=i.memoizedProps,d=i.memoizedState,p=s.stateNode;s.type===s.elementType&&!$o&&(p.props!==s.memoizedProps&&m("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(s.type)||"instance"),p.state!==s.memoizedState&&m("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(s.type)||"instance"));var S=p.getSnapshotBeforeUpdate(s.elementType===s.type?u:rr(s.type,u),d);{var E=kb;S===void 0&&!E.has(s.type)&&(E.add(s.type),m("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",be(s.type)))}p.__reactInternalSnapshotBeforeUpdate=S}return}case _:{if(_n&&s.flags&Jt){var R=s.stateNode;Ya(R.containerInfo)}return}case P:case O:case L:case Se:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Nb(i,s){var u=s.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var p=d.next,S=p;do{if((S.tag&i)===i){var E=S.destroy;S.destroy=void 0,E!==void 0&&E()}S=S.next}while(S!==p)}}function dD(i,s){var u=s.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var p=d.next,S=p;do{if((S.tag&i)===i){var E=S.create;S.destroy=E();{var R=S.destroy;if(R!==void 0&&typeof R!="function"){var D=void 0;R===null?D=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof R.then=="function"?D=`
141
141
 
142
142
  It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
143
143
 
@@ -150,11 +150,11 @@ useEffect(() => {
150
150
  fetchData();
151
151
  }, [someId]); // Or [] if effect doesn't need props or state
152
152
 
153
- Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:D=" You returned: "+R,m("An effect function must not return anything besides a function, which is used for clean-up.%s",D)}}}S=S.next}while(S!==p)}}function hD(i){var s=i.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var d=u.next,p=d;do{var S=p,E=S.next,R=S.tag;(R&Fc)!==Iv&&(R&Io)!==Iv&&(ix(i,p),dL(i,p)),p=E}while(p!==d)}}function pD(i,s,u,d){switch(u.tag){case A:case J:case ge:case Z:{dD(Fo|Io,u),hD(u);return}case P:{var p=u.stateNode;if(u.flags&et)if(s===null)u.type===u.elementType&&!$o&&(p.props!==u.memoizedProps&&m("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(u.type)||"instance"),p.state!==u.memoizedState&&m("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(u.type)||"instance")),p.componentDidMount();else{var S=u.elementType===u.type?s.memoizedProps:rr(u.type,s.memoizedProps),E=s.memoizedState;u.type===u.elementType&&!$o&&(p.props!==u.memoizedProps&&m("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(u.type)||"instance"),p.state!==u.memoizedState&&m("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(u.type)||"instance")),p.componentDidUpdate(S,E,p.__reactInternalSnapshotBeforeUpdate)}var R=u.updateQueue;R!==null&&(u.type===u.elementType&&!$o&&(p.props!==u.memoizedProps&&m("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(u.type)||"instance"),p.state!==u.memoizedState&&m("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(u.type)||"instance")),N(u,R,p));return}case _:{var D=u.updateQueue;if(D!==null){var F=null;if(u.child!==null)switch(u.child.tag){case k:F=Qe(u.child.stateNode);break;case P:F=u.child.stateNode;break}N(u,D,F)}return}case k:{var W=u.stateNode;if(s===null&&u.flags&et){var X=u.type,ee=u.memoizedProps;nc(W,X,ee,u)}return}case O:return;case L:return;case re:{{var he=u.memoizedProps;he.onCommit;var ye=he.onRender;u.stateNode.effectDuration;var Ee=LO();typeof ye=="function"&&ye(u.memoizedProps.id,s===null?"mount":"update",u.actualDuration,u.treeBaseDuration,u.actualStartTime,Ee,i.memoizedInteractions)}return}case $:{ED(i,u);return}case _e:case me:case Ye:case gt:case Ue:case dt:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function _b(i,s){if(Nn)for(var u=i;;){if(u.tag===k){var d=u.stateNode;s?ic(d):hv(u.stateNode,u.memoizedProps)}else if(u.tag===O){var p=u.stateNode;s?rc(p):Td(p,u.memoizedProps)}else if(!((u.tag===Ue||u.tag===dt)&&u.memoizedState!==null&&u!==i)){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===i)return;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}}function vD(i){var s=i.ref;if(s!==null){var u=i.stateNode,d;switch(i.tag){case k:d=Qe(u);break;default:d=u}typeof s=="function"?s(d):(s.hasOwnProperty("current")||m("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",be(i.type)),s.current=d)}}function mD(i){var s=i.ref;s!==null&&(typeof s=="function"?s(null):s.current=null)}function Ub(i,s,u){switch(di(s),s.tag){case A:case J:case se:case ge:case Z:{var d=s.updateQueue;if(d!==null){var p=d.lastEffect;if(p!==null){var S=p.next,E=S;do{var R=E,D=R.destroy,F=R.tag;D!==void 0&&((F&Fc)!==Iv?ix(s,E):cD(s,D)),E=E.next}while(E!==S)}}return}case P:{zb(s);var W=s.stateNode;typeof W.componentWillUnmount=="function"&&uD(s,W);return}case k:{zb(s);return}case L:{Nn?Hb(i,s):cr&&gD(s);return}case Ye:return;case Ie:return;case gt:return}}function jb(i,s,u){for(var d=s;;){if(Ub(i,d),d.child!==null&&(!Nn||d.tag!==L)){d.child.return=d,d=d.child;continue}if(d===s)return;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}}function Ib(i){i.alternate=null,i.child=null,i.dependencies=null,i.firstEffect=null,i.lastEffect=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.return=null,i.updateQueue=null,i._debugOwner=null}function gD(i){if(cr){var s=i.stateNode,u=s.containerInfo,d=Qa(u);ac(u,d)}}function yD(i){if(cr){switch(i.tag){case P:case k:case O:case Ye:return;case _:case L:{var s=i.stateNode,u=s.containerInfo,d=s.pendingChildren;ac(u,d);return}}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function SD(i){for(var s=i.return;s!==null;){if(Fb(s))return s;s=s.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function Fb(i){return i.tag===k||i.tag===_||i.tag===L}function bD(i){var s=i;e:for(;;){for(;s.sibling===null;){if(s.return===null||Fb(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==k&&s.tag!==O&&s.tag!==Ie;){if(s.flags&Dt||s.child===null||s.tag===L)continue e;s.child.return=s,s=s.child}if(!(s.flags&Dt))return s.stateNode}}function Bb(i){if(Nn){var s=SD(i),u,d,p=s.stateNode;switch(s.tag){case k:u=p,d=!1;break;case _:u=p.containerInfo,d=!0;break;case L:u=p.containerInfo,d=!0;break;case Ye:default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}s.flags&rt&&(wd(u),s.flags&=~rt);var S=bD(i);d?Cm(i,S,u):Rm(i,S,u)}}function Cm(i,s,u){var d=i.tag,p=d===k||d===O;if(p||ws){var S=p?i.stateNode:i.stateNode.instance;s?cv(u,S,s):xl(u,S)}else if(d!==L){var E=i.child;if(E!==null){Cm(E,s,u);for(var R=E.sibling;R!==null;)Cm(R,s,u),R=R.sibling}}}function Rm(i,s,u){var d=i.tag,p=d===k||d===O;if(p||ws){var S=p?i.stateNode:i.stateNode.instance;s?Gr(u,S,s):Ed(u,S)}else if(d!==L){var E=i.child;if(E!==null){Rm(E,s,u);for(var R=E.sibling;R!==null;)Rm(R,s,u),R=R.sibling}}}function Hb(i,s,u){for(var d=s,p=!1,S,E;;){if(!p){var R=d.return;e:for(;;){if(R===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");var D=R.stateNode;switch(R.tag){case k:S=D,E=!1;break e;case _:S=D.containerInfo,E=!0;break e;case L:S=D.containerInfo,E=!0;break e}R=R.return}p=!0}if(d.tag===k||d.tag===O)jb(i,d),E?dv(S,d.stateNode):fv(S,d.stateNode);else if(d.tag===L){if(d.child!==null){S=d.stateNode.containerInfo,E=!0,d.child.return=d,d=d.child;continue}}else if(Ub(i,d),d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)return;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return,d.tag===L&&(p=!1)}d.sibling.return=d.return,d=d.sibling}}function xD(i,s,u){Nn?Hb(i,s):jb(i,s);var d=s.alternate;Ib(s),d!==null&&Ib(d)}function Am(i,s){if(!Nn){switch(s.tag){case A:case J:case se:case ge:case Z:{Nb(Fo|Io,s);return}case re:return;case $:{Vb(s),xh(s);return}case _e:{xh(s);return}case _:{if(Jt){var u=s.stateNode;u.hydrate&&(u.hydrate=!1,aa(u.containerInfo))}break}case Ue:case dt:return}yD(s);return}switch(s.tag){case A:case J:case se:case ge:case Z:{Nb(Fo|Io,s);return}case P:return;case k:{var d=s.stateNode;if(d!=null){var p=s.memoizedProps,S=i!==null?i.memoizedProps:p,E=s.type,R=s.updateQueue;s.updateQueue=null,R!==null&&El(d,R,E,S,p,s)}return}case O:{if(s.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var D=s.stateNode,F=s.memoizedProps,W=i!==null?i.memoizedProps:F;ra(D,W,F);return}case _:{if(Jt){var X=s.stateNode;X.hydrate&&(X.hydrate=!1,aa(X.containerInfo))}return}case re:return;case $:{Vb(s),xh(s);return}case _e:{xh(s);return}case me:return;case Ye:break;case gt:break;case Ue:case dt:{var ee=s.memoizedState,he=ee!==null;_b(s,he);return}}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Vb(i){var s=i.memoizedState;if(s!==null&&(JD(),Nn)){var u=i.child;_b(u,!0)}}function ED(i,s){if(Jt){var u=s.memoizedState;if(u===null){var d=s.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var S=p.dehydrated;S!==null&&_i(S)}}}}}function xh(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var u=i.stateNode;u===null&&(u=i.stateNode=new oD),s.forEach(function(d){var p=bL.bind(null,i,d);u.has(d)||(d.__reactDoNotTraceInteractions!==!0&&(p=v.unstable_wrap(p)),u.add(d),d.then(p,p))})}}function wD(i,s){if(i!==null){var u=i.memoizedState;if(u===null||u.dehydrated!==null){var d=s.memoizedState;return d!==null&&d.dehydrated===null}}return!1}function TD(i){Nn&&wd(i.stateNode)}var Eh=0,wh=1,Th=2,Ch=3,Rh=4;if(typeof Symbol=="function"&&Symbol.for){var tf=Symbol.for;Eh=tf("selector.component"),wh=tf("selector.has_pseudo_class"),Th=tf("selector.role"),Ch=tf("selector.test_id"),Rh=tf("selector.text")}function CD(i){return{$$typeof:Eh,value:i}}function RD(i){return{$$typeof:wh,value:i}}function AD(i){return{$$typeof:Th,value:i}}function MD(i){return{$$typeof:Rh,value:i}}function OD(i){return{$$typeof:Ch,value:i}}function Mm(i){var s=Sl(i);if(s!=null){if(typeof s.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return s}else{var u=ov(i);if(u===null)throw Error("Could not find React container within specified host subtree.");return u.stateNode.current}}function Om(i,s){switch(s.$$typeof){case Eh:if(i.type===s.value)return!0;break;case wh:return DD(i,s.value);case Th:if(i.tag===k){var u=i.stateNode;if(lv(u,s.value))return!0}break;case Rh:if(i.tag===k||i.tag===O){var d=Vt(i);if(d!==null&&d.indexOf(s.value)>=0)return!0}break;case Ch:if(i.tag===k){var p=i.memoizedProps["data-testname"];if(typeof p=="string"&&p.toLowerCase()===s.value.toLowerCase())return!0}break;default:throw Error("Invalid selector type "+s+" specified.")}return!1}function Dm(i){switch(i.$$typeof){case Eh:var s=be(i.value)||"Unknown";return"<"+s+">";case wh:return":has("+(Dm(i)||"")+")";case Th:return'[role="'+i.value+'"]';case Rh:return'"'+i.value+'"';case Ch:return'[data-testname="'+i.value+'"]';default:throw Error("Invalid selector type "+i+" specified.")}}function Wb(i,s){for(var u=[],d=[i,0],p=0;p<d.length;){var S=d[p++],E=d[p++],R=s[E];if(!(S.tag===k&&Ki(S))){for(;R!=null&&Om(S,R);)E++,R=s[E];if(E===s.length)u.push(S);else for(var D=S.child;D!==null;)d.push(D,E),D=D.sibling}}return u}function DD(i,s){for(var u=[i,0],d=0;d<u.length;){var p=u[d++],S=u[d++],E=s[S];if(!(p.tag===k&&Ki(p))){for(;E!=null&&Om(p,E);)S++,E=s[S];if(S===s.length)return!0;for(var R=p.child;R!==null;)u.push(R,S),R=R.sibling}}return!1}function Ah(i,s){if(!Ni)throw Error("Test selector API is not supported by this renderer.");for(var u=Mm(i),d=Wb(u,s),p=[],S=Array.from(d),E=0;E<S.length;){var R=S[E++];if(R.tag===k){if(Ki(R))continue;p.push(R.stateNode)}else for(var D=R.child;D!==null;)S.push(D),D=D.sibling}return p}function LD(i,s){if(!Ni)throw Error("Test selector API is not supported by this renderer.");for(var u=Mm(i),d=0,p=[],S=[u,0],E=0;E<S.length;){var R=S[E++],D=S[E++],F=s[D];if(!(R.tag===k&&Ki(R))&&(Om(R,F)&&(p.push(Dm(F)),D++,D>d&&(d=D)),D<s.length))for(var W=R.child;W!==null;)S.push(W,D),W=W.sibling}if(d<s.length){for(var X=[],ee=d;ee<s.length;ee++)X.push(Dm(s[ee]));return`findAllNodes was able to match part of the selector:
153
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:D=" You returned: "+R,m("An effect function must not return anything besides a function, which is used for clean-up.%s",D)}}}S=S.next}while(S!==p)}}function hD(i){var s=i.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var d=u.next,p=d;do{var S=p,E=S.next,R=S.tag;(R&Fc)!==Iv&&(R&Io)!==Iv&&(ix(i,p),dL(i,p)),p=E}while(p!==d)}}function pD(i,s,u,d){switch(u.tag){case A:case J:case me:case Te:{dD(Fo|Io,u),hD(u);return}case k:{var p=u.stateNode;if(u.flags&tt)if(s===null)u.type===u.elementType&&!$o&&(p.props!==u.memoizedProps&&m("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(u.type)||"instance"),p.state!==u.memoizedState&&m("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(u.type)||"instance")),p.componentDidMount();else{var S=u.elementType===u.type?s.memoizedProps:rr(u.type,s.memoizedProps),E=s.memoizedState;u.type===u.elementType&&!$o&&(p.props!==u.memoizedProps&&m("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(u.type)||"instance"),p.state!==u.memoizedState&&m("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(u.type)||"instance")),p.componentDidUpdate(S,E,p.__reactInternalSnapshotBeforeUpdate)}var R=u.updateQueue;R!==null&&(u.type===u.elementType&&!$o&&(p.props!==u.memoizedProps&&m("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",be(u.type)||"instance"),p.state!==u.memoizedState&&m("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",be(u.type)||"instance")),N(u,R,p));return}case _:{var D=u.updateQueue;if(D!==null){var I=null;if(u.child!==null)switch(u.child.tag){case P:I=Ke(u.child.stateNode);break;case k:I=u.child.stateNode;break}N(u,D,I)}return}case P:{var V=u.stateNode;if(s===null&&u.flags&tt){var K=u.type,ee=u.memoizedProps;nc(V,K,ee,u)}return}case O:return;case L:return;case ie:{{var pe=u.memoizedProps;pe.onCommit;var ge=pe.onRender;u.stateNode.effectDuration;var Ee=LO();typeof ge=="function"&&ge(u.memoizedProps.id,s===null?"mount":"update",u.actualDuration,u.treeBaseDuration,u.actualStartTime,Ee,i.memoizedInteractions)}return}case $:{ED(i,u);return}case ke:case Se:case Xe:case ft:case it:case ue:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function _b(i,s){if(_n)for(var u=i;;){if(u.tag===P){var d=u.stateNode;s?ic(d):hv(u.stateNode,u.memoizedProps)}else if(u.tag===O){var p=u.stateNode;s?rc(p):Td(p,u.memoizedProps)}else if(!((u.tag===it||u.tag===ue)&&u.memoizedState!==null&&u!==i)){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===i)return;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}}function vD(i){var s=i.ref;if(s!==null){var u=i.stateNode,d;switch(i.tag){case P:d=Ke(u);break;default:d=u}typeof s=="function"?s(d):(s.hasOwnProperty("current")||m("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",be(i.type)),s.current=d)}}function mD(i){var s=i.ref;s!==null&&(typeof s=="function"?s(null):s.current=null)}function Ub(i,s,u){switch(hi(s),s.tag){case A:case J:case re:case me:case Te:{var d=s.updateQueue;if(d!==null){var p=d.lastEffect;if(p!==null){var S=p.next,E=S;do{var R=E,D=R.destroy,I=R.tag;D!==void 0&&((I&Fc)!==Iv?ix(s,E):cD(s,D)),E=E.next}while(E!==S)}}return}case k:{zb(s);var V=s.stateNode;typeof V.componentWillUnmount=="function"&&uD(s,V);return}case P:{zb(s);return}case L:{_n?Hb(i,s):cr&&gD(s);return}case Xe:return;case Fe:return;case ft:return}}function jb(i,s,u){for(var d=s;;){if(Ub(i,d),d.child!==null&&(!_n||d.tag!==L)){d.child.return=d,d=d.child;continue}if(d===s)return;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}}function Ib(i){i.alternate=null,i.child=null,i.dependencies=null,i.firstEffect=null,i.lastEffect=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.return=null,i.updateQueue=null,i._debugOwner=null}function gD(i){if(cr){var s=i.stateNode,u=s.containerInfo,d=Qa(u);ac(u,d)}}function yD(i){if(cr){switch(i.tag){case k:case P:case O:case Xe:return;case _:case L:{var s=i.stateNode,u=s.containerInfo,d=s.pendingChildren;ac(u,d);return}}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function SD(i){for(var s=i.return;s!==null;){if(Fb(s))return s;s=s.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function Fb(i){return i.tag===P||i.tag===_||i.tag===L}function bD(i){var s=i;e:for(;;){for(;s.sibling===null;){if(s.return===null||Fb(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==P&&s.tag!==O&&s.tag!==Fe;){if(s.flags&Dt||s.child===null||s.tag===L)continue e;s.child.return=s,s=s.child}if(!(s.flags&Dt))return s.stateNode}}function Bb(i){if(_n){var s=SD(i),u,d,p=s.stateNode;switch(s.tag){case P:u=p,d=!1;break;case _:u=p.containerInfo,d=!0;break;case L:u=p.containerInfo,d=!0;break;case Xe:default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}s.flags&st&&(wd(u),s.flags&=~st);var S=bD(i);d?Cm(i,S,u):Rm(i,S,u)}}function Cm(i,s,u){var d=i.tag,p=d===P||d===O;if(p||ws){var S=p?i.stateNode:i.stateNode.instance;s?cv(u,S,s):xl(u,S)}else if(d!==L){var E=i.child;if(E!==null){Cm(E,s,u);for(var R=E.sibling;R!==null;)Cm(R,s,u),R=R.sibling}}}function Rm(i,s,u){var d=i.tag,p=d===P||d===O;if(p||ws){var S=p?i.stateNode:i.stateNode.instance;s?Gr(u,S,s):Ed(u,S)}else if(d!==L){var E=i.child;if(E!==null){Rm(E,s,u);for(var R=E.sibling;R!==null;)Rm(R,s,u),R=R.sibling}}}function Hb(i,s,u){for(var d=s,p=!1,S,E;;){if(!p){var R=d.return;e:for(;;){if(R===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");var D=R.stateNode;switch(R.tag){case P:S=D,E=!1;break e;case _:S=D.containerInfo,E=!0;break e;case L:S=D.containerInfo,E=!0;break e}R=R.return}p=!0}if(d.tag===P||d.tag===O)jb(i,d),E?dv(S,d.stateNode):fv(S,d.stateNode);else if(d.tag===L){if(d.child!==null){S=d.stateNode.containerInfo,E=!0,d.child.return=d,d=d.child;continue}}else if(Ub(i,d),d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)return;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return,d.tag===L&&(p=!1)}d.sibling.return=d.return,d=d.sibling}}function xD(i,s,u){_n?Hb(i,s):jb(i,s);var d=s.alternate;Ib(s),d!==null&&Ib(d)}function Am(i,s){if(!_n){switch(s.tag){case A:case J:case re:case me:case Te:{Nb(Fo|Io,s);return}case ie:return;case $:{Wb(s),xh(s);return}case ke:{xh(s);return}case _:{if(en){var u=s.stateNode;u.hydrate&&(u.hydrate=!1,aa(u.containerInfo))}break}case it:case ue:return}yD(s);return}switch(s.tag){case A:case J:case re:case me:case Te:{Nb(Fo|Io,s);return}case k:return;case P:{var d=s.stateNode;if(d!=null){var p=s.memoizedProps,S=i!==null?i.memoizedProps:p,E=s.type,R=s.updateQueue;s.updateQueue=null,R!==null&&El(d,R,E,S,p,s)}return}case O:{if(s.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var D=s.stateNode,I=s.memoizedProps,V=i!==null?i.memoizedProps:I;ra(D,V,I);return}case _:{if(en){var K=s.stateNode;K.hydrate&&(K.hydrate=!1,aa(K.containerInfo))}return}case ie:return;case $:{Wb(s),xh(s);return}case ke:{xh(s);return}case Se:return;case Xe:break;case ft:break;case it:case ue:{var ee=s.memoizedState,pe=ee!==null;_b(s,pe);return}}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Wb(i){var s=i.memoizedState;if(s!==null&&(JD(),_n)){var u=i.child;_b(u,!0)}}function ED(i,s){if(en){var u=s.memoizedState;if(u===null){var d=s.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var S=p.dehydrated;S!==null&&Ui(S)}}}}}function xh(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var u=i.stateNode;u===null&&(u=i.stateNode=new oD),s.forEach(function(d){var p=bL.bind(null,i,d);u.has(d)||(d.__reactDoNotTraceInteractions!==!0&&(p=v.unstable_wrap(p)),u.add(d),d.then(p,p))})}}function wD(i,s){if(i!==null){var u=i.memoizedState;if(u===null||u.dehydrated!==null){var d=s.memoizedState;return d!==null&&d.dehydrated===null}}return!1}function TD(i){_n&&wd(i.stateNode)}var Eh=0,wh=1,Th=2,Ch=3,Rh=4;if(typeof Symbol=="function"&&Symbol.for){var tf=Symbol.for;Eh=tf("selector.component"),wh=tf("selector.has_pseudo_class"),Th=tf("selector.role"),Ch=tf("selector.test_id"),Rh=tf("selector.text")}function CD(i){return{$$typeof:Eh,value:i}}function RD(i){return{$$typeof:wh,value:i}}function AD(i){return{$$typeof:Th,value:i}}function MD(i){return{$$typeof:Rh,value:i}}function OD(i){return{$$typeof:Ch,value:i}}function Mm(i){var s=Sl(i);if(s!=null){if(typeof s.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return s}else{var u=ov(i);if(u===null)throw Error("Could not find React container within specified host subtree.");return u.stateNode.current}}function Om(i,s){switch(s.$$typeof){case Eh:if(i.type===s.value)return!0;break;case wh:return DD(i,s.value);case Th:if(i.tag===P){var u=i.stateNode;if(lv(u,s.value))return!0}break;case Rh:if(i.tag===P||i.tag===O){var d=$t(i);if(d!==null&&d.indexOf(s.value)>=0)return!0}break;case Ch:if(i.tag===P){var p=i.memoizedProps["data-testname"];if(typeof p=="string"&&p.toLowerCase()===s.value.toLowerCase())return!0}break;default:throw Error("Invalid selector type "+s+" specified.")}return!1}function Dm(i){switch(i.$$typeof){case Eh:var s=be(i.value)||"Unknown";return"<"+s+">";case wh:return":has("+(Dm(i)||"")+")";case Th:return'[role="'+i.value+'"]';case Rh:return'"'+i.value+'"';case Ch:return'[data-testname="'+i.value+'"]';default:throw Error("Invalid selector type "+i+" specified.")}}function Vb(i,s){for(var u=[],d=[i,0],p=0;p<d.length;){var S=d[p++],E=d[p++],R=s[E];if(!(S.tag===P&&Ki(S))){for(;R!=null&&Om(S,R);)E++,R=s[E];if(E===s.length)u.push(S);else for(var D=S.child;D!==null;)d.push(D,E),D=D.sibling}}return u}function DD(i,s){for(var u=[i,0],d=0;d<u.length;){var p=u[d++],S=u[d++],E=s[S];if(!(p.tag===P&&Ki(p))){for(;E!=null&&Om(p,E);)S++,E=s[S];if(S===s.length)return!0;for(var R=p.child;R!==null;)u.push(R,S),R=R.sibling}}return!1}function Ah(i,s){if(!_i)throw Error("Test selector API is not supported by this renderer.");for(var u=Mm(i),d=Vb(u,s),p=[],S=Array.from(d),E=0;E<S.length;){var R=S[E++];if(R.tag===P){if(Ki(R))continue;p.push(R.stateNode)}else for(var D=R.child;D!==null;)S.push(D),D=D.sibling}return p}function LD(i,s){if(!_i)throw Error("Test selector API is not supported by this renderer.");for(var u=Mm(i),d=0,p=[],S=[u,0],E=0;E<S.length;){var R=S[E++],D=S[E++],I=s[D];if(!(R.tag===P&&Ki(R))&&(Om(R,I)&&(p.push(Dm(I)),D++,D>d&&(d=D)),D<s.length))for(var V=R.child;V!==null;)S.push(V,D),V=V.sibling}if(d<s.length){for(var K=[],ee=d;ee<s.length;ee++)K.push(Dm(s[ee]));return`findAllNodes was able to match part of the selector:
154
154
  `+(" "+p.join(" > ")+`
155
155
 
156
156
  `)+`No matching component was found for:
157
- `+(" "+X.join(" > "))}return null}function PD(i,s){if(!Ni)throw Error("Test selector API is not supported by this renderer.");for(var u=Ah(i,s),d=[],p=0;p<u.length;p++)d.push(bl(u[p]));for(var S=d.length-1;S>0;S--)for(var E=d[S],R=E.x,D=R+E.width,F=E.y,W=F+E.height,X=S-1;X>=0;X--)if(S!==X){var ee=d[X],he=ee.x,ye=he+ee.width,Ee=ee.y,Xe=Ee+ee.height;if(R>=he&&F>=Ee&&D<=ye&&W<=Xe){d.splice(S,1);break}else if(R===he&&E.width===ee.width&&!(Xe<F)&&!(Ee>W)){Ee>F&&(ee.height+=Ee-F,ee.y=F),Xe<W&&(ee.height=W-Ee),d.splice(S,1);break}else if(F===Ee&&E.height===ee.height&&!(ye<R)&&!(he>D)){he>R&&(ee.width+=he-R,ee.x=R),ye<D&&(ee.width=D-he),d.splice(S,1);break}}return d}function kD(i,s){if(!Ni)throw Error("Test selector API is not supported by this renderer.");for(var u=Mm(i),d=Wb(u,s),p=Array.from(d),S=0;S<p.length;){var E=p[S++];if(!Ki(E)){if(E.tag===k){var R=E.stateNode;if(uv(R))return!0}for(var D=E.child;D!==null;)p.push(D),D=D.sibling}}return!1}var Mh=[];function zD(){Ni&&Mh.forEach(function(i){return i()})}function ND(i,s,u,d){if(!Ni)throw Error("Test selector API is not supported by this renderer.");var p=Ah(i,s),S=qa(p,u,d),E=S.disconnect,R=S.observe,D=S.unobserve,F=function(){var W=Ah(i,s);p.forEach(function(X){W.indexOf(X)<0&&D(X)}),W.forEach(function(X){p.indexOf(X)<0&&R(X)})};return Mh.push(F),{disconnect:function(){var W=Mh.indexOf(F);W>=0&&Mh.splice(W,1),E()}}}var $b=!1,Oh=null;function _D(i){if(Oh===null)try{var s=("require"+Math.random()).slice(0,7),u=t&&t[s];Oh=u.call(t,"timers").setImmediate}catch{Oh=function(p){$b===!1&&($b=!0,typeof MessageChannel>"u"&&m("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var S=new MessageChannel;S.port1.onmessage=p,S.port2.postMessage(void 0)}}return Oh(i)}var UD=Math.ceil,Lm=g.ReactCurrentDispatcher,Pm=g.ReactCurrentOwner,mu=g.IsSomeRendererActing,cn=0,nf=1,jD=2,km=4,zm=8,qi=16,Ir=32,qb=64,Vs=0,Dh=1,Lh=2,Ph=3,kh=4,Nm=5,$e=cn,Oi=null,wn=null,Di=ue,fs=ue,_m=Ii(ue),si=Vs,zh=null,qo=ue,Nh=ue,Yo=ue,_h=ue,Um=null,jm=0,Yb=500,Qb=1/0,ID=500;function Ma(){Qb=en()+ID}function Gb(){return Qb}var ke=null,Uh=!1,Im=null,gu=null,Ws=!1,yu=null,rf=rs,Fm=ue,Bm=[],Hm=[],$s=null,FD=50,sf=0,Vm=null,BD=50,jh=0,Qo=null,af=sn,qs=ue,Ih=ue,Wm=!1,of=null,lf=!1;function HD(){return Oi}function Yi(){return($e&(qi|Ir))!==cn?en():(af!==sn||(af=en()),af)}function Oa(i){var s=i.mode;if((s&Ln)===$t)return Tt;if((s&kr)===$t)return Oe()===zt?Tt:oo;qs===ue&&(qs=qo);var u=Co()!==To;if(u)return Ih!==ue&&(Ih=Um!==null?Um.pendingLanes:ue),bv(qs,Ih);var d=Oe(),p;if(($e&km)!==cn&&d===Ci)p=ha(ts,qs);else{var S=Pd(d);p=ha(S,qs)}return p}function VD(i){var s=i.mode;return(s&Ln)===$t?Tt:(s&kr)===$t?Oe()===zt?Tt:oo:(qs===ue&&(qs=qo),Nd(qs))}function ai(i,s,u){EL(),RL(i);var d=Fh(i,s);if(d===null)return TL(i),null;pa(d,s,u),d===Oi&&(Yo=Ct(Yo,s),si===kh&&Su(d,Di));var p=Oe();s===Tt?($e&zm)!==cn&&($e&(qi|Ir))===cn?(La(d,s),$m(d)):(ar(d,u),La(d,s),$e===cn&&(Ma(),qn())):(($e&km)!==cn&&(p===Ci||p===zt)&&($s===null?$s=new Set([d]):$s.add(d)),ar(d,u),La(d,s)),Um=d}function Fh(i,s){i.lanes=Ct(i.lanes,s);var u=i.alternate;u!==null&&(u.lanes=Ct(u.lanes,s)),u===null&&(i.flags&(Dt|bi))!==at&&sx(i);for(var d=i,p=i.return;p!==null;)p.childLanes=Ct(p.childLanes,s),u=p.alternate,u!==null?u.childLanes=Ct(u.childLanes,s):(p.flags&(Dt|bi))!==at&&sx(i),d=p,p=p.return;if(d.tag===_){var S=d.stateNode;return S}else return null}function ar(i,s){var u=i.callbackNode;Ql(i,s);var d=hi(i,i===Oi?Di:ue),p=fo();if(d===ue){u!==null&&(ga(u),i.callbackNode=null,i.callbackPriority=Dr);return}if(u!==null){var S=i.callbackPriority;if(S===p)return;ga(u)}var E;if(p===Ms)E=ss($m.bind(null,i));else if(p===no)E=jn(zt,$m.bind(null,i));else{var R=Pr(p);E=jn(R,Xb.bind(null,i))}i.callbackPriority=p,i.callbackNode=E}function Xb(i){if(af=sn,qs=ue,Ih=ue,($e&(qi|Ir))!==cn)throw Error("Should not already be working.");var s=i.callbackNode,u=Fr();if(u&&i.callbackNode!==s)return null;var d=hi(i,i===Oi?Di:ue);if(d===ue)return null;var p=sL(i,d);if(Un(qo,Yo))bu(i,ue);else if(p!==Vs){if(p===Lh&&($e|=qb,i.hydrate&&(i.hydrate=!1,Ya(i.containerInfo)),d=Ec(i),d!==ue&&(p=uf(i,d))),p===Dh){var S=zh;throw bu(i,ue),Su(i,d),ar(i,en()),S}var E=i.current.alternate;i.finishedWork=E,i.finishedLanes=d,WD(i,p,d)}return ar(i,en()),i.callbackNode===s?Xb.bind(null,i):null}function WD(i,s,u){switch(s){case Vs:case Dh:throw Error("Root did not complete. This is a bug in React.");case Lh:{Go(i);break}case Ph:{if(Su(i,u),zd(u)&&!hx()){var d=jm+Yb-en();if(d>10){var p=hi(i,ue);if(p!==ue)break;var S=i.suspendedLanes;if(!is(S,u)){Yi(),Xl(i,S);break}i.timeoutHandle=mt(Go.bind(null,i),d);break}}Go(i);break}case kh:{if(Su(i,u),wc(u))break;if(!hx()){var E=uo(i,u),R=E,D=en()-R,F=xL(D)-D;if(F>10){i.timeoutHandle=mt(Go.bind(null,i),F);break}}Go(i);break}case Nm:{Go(i);break}default:throw Error("Unknown root exit status.")}}function Su(i,s){s=ho(s,_h),s=ho(s,Yo),Id(i,s)}function $m(i){if(($e&(qi|Ir))!==cn)throw Error("Should not already be working.");Fr();var s,u;if(i===Oi&&Un(i.expiredLanes,Di)?(s=Di,u=uf(i,s),Un(qo,Yo)&&(s=hi(i,s),u=uf(i,s))):(s=hi(i,ue),u=uf(i,s)),i.tag!==As&&u===Lh&&($e|=qb,i.hydrate&&(i.hydrate=!1,Ya(i.containerInfo)),s=Ec(i),s!==ue&&(u=uf(i,s))),u===Dh){var d=zh;throw bu(i,ue),Su(i,s),ar(i,en()),d}var p=i.current.alternate;return i.finishedWork=p,i.finishedLanes=s,Go(i),ar(i,en()),null}function $D(i,s){Fd(i,s),ar(i,en()),($e&(qi|Ir))===cn&&(Ma(),qn())}function qD(){if(($e&(nf|qi|Ir))!==cn){($e&qi)!==cn&&m("unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}QD(),Fr()}function YD(i){return nr(Hi,i)}function QD(){if($s!==null){var i=$s;$s=null,i.forEach(function(s){Kl(s),ar(s,en())})}qn()}function Kb(i,s){var u=$e;$e|=nf;try{return i(s)}finally{$e=u,$e===cn&&(Ma(),qn())}}function GD(i,s){var u=$e;$e|=jD;try{return i(s)}finally{$e=u,$e===cn&&(Ma(),qn())}}function XD(i,s,u,d,p){var S=$e;$e|=km;try{return nr(Ci,i.bind(null,s,u,d,p))}finally{$e=S,$e===cn&&(Ma(),qn())}}function KD(i,s){var u=$e;$e&=~nf,$e|=zm;try{return i(s)}finally{$e=u,$e===cn&&(Ma(),qn())}}function Bh(i,s){var u=$e;if((u&(qi|Ir))!==cn)return m("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),i(s);$e|=nf;try{return i?nr(zt,i.bind(null,s)):void 0}finally{$e=u,qn()}}function ZD(i){var s=$e;$e|=nf;try{nr(zt,i)}finally{$e=s,$e===cn&&(Ma(),qn())}}function Hh(i,s){Sn(_m,fs,i),fs=Ct(fs,s),qo=Ct(qo,s)}function qm(i){fs=_m.current,jt(_m,i)}function bu(i,s){i.finishedWork=null,i.finishedLanes=ue;var u=i.timeoutHandle;if(u!==ur&&(i.timeoutHandle=ur,on(u)),wn!==null)for(var d=wn.return;d!==null;)Mb(d),d=d.return;Oi=i,wn=Zo(i.current,null),Di=fs=qo=s,si=Vs,zh=null,Nh=ue,Yo=ue,_h=ue,Qo=null,Vi.discardPendingWarnings()}function Zb(i,s){do{var u=wn;try{if(Po(),HS(),In(),Pm.current=null,u===null||u.return===null){si=Dh,zh=s,wn=null;return}Wa&&u.mode&Yn&&ph(u,!0),rD(i,u.return,u,s,Di),nx(u)}catch(d){s=d,wn===u&&u!==null?(u=u.return,wn=u):u=wn;continue}return}while(!0)}function Jb(){var i=Lm.current;return Lm.current=fh,i===null?fh:i}function ex(i){Lm.current=i}function Vh(i){{var s=v.__interactionsRef.current;return v.__interactionsRef.current=i.memoizedInteractions,s}}function Wh(i){v.__interactionsRef.current=i}function JD(){jm=en()}function Ym(i){Nh=Ct(i,Nh)}function eL(){si===Vs&&(si=Ph)}function tL(){(si===Vs||si===Ph)&&(si=kh),Oi!==null&&(kd(Nh)||kd(Yo))&&Su(Oi,Di)}function nL(){si!==Nm&&(si=Lh)}function iL(){return si===Vs}function uf(i,s){var u=$e;$e|=qi;var d=Jb();(Oi!==i||Di!==s)&&(bu(i,s),fx(i,s));var p=Vh(i);do try{rL();break}catch(S){Zb(i,S)}while(!0);if(Po(),Wh(p),$e=u,ex(d),wn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Oi=null,Di=ue,si}function rL(){for(;wn!==null;)tx(wn)}function sL(i,s){var u=$e;$e|=qi;var d=Jb();(Oi!==i||Di!==s)&&(Ma(),bu(i,s),fx(i,s));var p=Vh(i);do try{aL();break}catch(S){Zb(i,S)}while(!0);return Po(),Wh(p),ex(d),$e=u,wn!==null?Vs:(Oi=null,Di=ue,si)}function aL(){for(;wn!==null&&!xo();)tx(wn)}function tx(i){var s=i.alternate;xn(i);var u;(i.mode&Yn)!==$t?(um(i),u=Gm(s,i,fs),ph(i,!0)):u=Gm(s,i,fs),In(),i.memoizedProps=i.pendingProps,u===null?nx(i):wn=u,Pm.current=null}function nx(i){var s=i;do{var u=s.alternate,d=s.return;if((s.flags&Yr)===at){xn(s);var p=void 0;if((s.mode&Yn)===$t?p=Ab(u,s,fs):(um(s),p=Ab(u,s,fs),ph(s,!1)),In(),p!==null){wn=p;return}if(oL(s),d!==null&&(d.flags&Yr)===at){d.firstEffect===null&&(d.firstEffect=s.firstEffect),s.lastEffect!==null&&(d.lastEffect!==null&&(d.lastEffect.nextEffect=s.firstEffect),d.lastEffect=s.lastEffect);var S=s.flags;S>ui&&(d.lastEffect!==null?d.lastEffect.nextEffect=s:d.firstEffect=s,d.lastEffect=s)}}else{var E=eD(s);if(E!==null){E.flags&=Va,wn=E;return}if((s.mode&Yn)!==$t){ph(s,!1);for(var R=s.actualDuration,D=s.child;D!==null;)R+=D.actualDuration,D=D.sibling;s.actualDuration=R}d!==null&&(d.firstEffect=d.lastEffect=null,d.flags|=Yr)}var F=s.sibling;if(F!==null){wn=F;return}s=d,wn=s}while(s!==null);si===Vs&&(si=Nm)}function oL(i){if(!((i.tag===dt||i.tag===Ue)&&i.memoizedState!==null&&!Un(fs,Ti)&&(i.mode&kr)!==ue)){var s=ue;if((i.mode&Yn)!==$t){for(var u=i.actualDuration,d=i.selfBaseDuration,p=i.alternate===null||i.child!==i.alternate.child,S=i.child;S!==null;)s=Ct(s,Ct(S.lanes,S.childLanes)),p&&(u+=S.actualDuration),d+=S.treeBaseDuration,S=S.sibling;var E=i.tag===$&&i.memoizedState!==null;if(E){var R=i.child;R!==null&&(d-=R.treeBaseDuration)}i.actualDuration=u,i.treeBaseDuration=d}else for(var D=i.child;D!==null;)s=Ct(s,Ct(D.lanes,D.childLanes)),D=D.sibling;i.childLanes=s}}function Go(i){var s=Oe();return nr(zt,lL.bind(null,i,s)),null}function lL(i,s){do Fr();while(yu!==null);if(wL(),($e&(qi|Ir))!==cn)throw Error("Should not already be working.");var u=i.finishedWork,d=i.finishedLanes;if(u===null)return null;if(i.finishedWork=null,i.finishedLanes=ue,u===i.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");i.callbackNode=null;var p=Ct(u.lanes,u.childLanes);Zl(i,p),$s!==null&&!Tv(p)&&$s.has(i)&&$s.delete(i),i===Oi&&(Oi=null,wn=null,Di=ue);var S;if(u.flags>ui?u.lastEffect!==null?(u.lastEffect.nextEffect=u,S=u.firstEffect):S=u:S=u.firstEffect,S!==null){var E=$e;$e|=Ir;var R=Vh(i);Pm.current=null,of=vt(i.containerInfo),lf=!1,ke=S;do if(Fs(null,uL,null),Bs()){if(ke===null)throw Error("Should be working on an effect.");var D=Hs();Da(ke,D),ke=ke.nextEffect}while(ke!==null);of=null,rb(),ke=S;do if(Fs(null,cL,null,i,s),Bs()){if(ke===null)throw Error("Should be working on an effect.");var F=Hs();Da(ke,F),ke=ke.nextEffect}while(ke!==null);lf&&xd(),ot(i.containerInfo),i.current=u,ke=S;do if(Fs(null,fL,null,i,d),Bs()){if(ke===null)throw Error("Should be working on an effect.");var W=Hs();Da(ke,W),ke=ke.nextEffect}while(ke!==null);ke=null,va(),Wh(R),$e=E}else i.current=u,rb();var X=Ws;if(Ws)Ws=!1,yu=i,Fm=d,rf=s;else for(ke=S;ke!==null;){var ee=ke.nextEffect;ke.nextEffect=null,ke.flags&Pe&&mx(ke),ke=ee}if(p=i.pendingLanes,p!==ue){if(Qo!==null){var he=Qo;Qo=null;for(var ye=0;ye<he.length;ye++)cx(i,he[ye],i.memoizedInteractions)}La(i,p)}else gu=null;if(X||dx(i,d),p===Tt?i===Vm?sf++:(sf=0,Vm=i):sf=0,eo(u.stateNode,s),zD(),ar(i,en()),Uh){Uh=!1;var Ee=Im;throw Im=null,Ee}return($e&zm)!==cn||qn(),null}function uL(){for(;ke!==null;){var i=ke.alternate;!lf&&of!==null&&((ke.flags&Pe)!==at?we(ke,of)&&(lf=!0,$a()):ke.tag===$&&wD(i,ke)&&we(ke,of)&&(lf=!0,$a()));var s=ke.flags;(s&Zt)!==at&&(xn(ke),fD(i,ke),In()),(s&Fn)!==at&&(Ws||(Ws=!0,jn(Hi,function(){return Fr(),null}))),ke=ke.nextEffect}}function cL(i,s){for(;ke!==null;){xn(ke);var u=ke.flags;if(u&rt&&TD(ke),u&an){var d=ke.alternate;d!==null&&mD(d)}var p=u&(Dt|et|Pe|bi);switch(p){case Dt:{Bb(ke),ke.flags&=~Dt;break}case Te:{Bb(ke),ke.flags&=~Dt;var S=ke.alternate;Am(S,ke);break}case bi:{ke.flags&=~bi;break}case qr:{ke.flags&=~bi;var E=ke.alternate;Am(E,ke);break}case et:{var R=ke.alternate;Am(R,ke);break}case Pe:{xD(i,ke);break}}In(),ke=ke.nextEffect}}function fL(i,s){for(;ke!==null;){xn(ke);var u=ke.flags;if(u&(et|Lt)){var d=ke.alternate;pD(i,d,ke)}u&an&&vD(ke),In(),ke=ke.nextEffect}}function Fr(){if(rf!==rs){var i=rf>Hi?Hi:rf;return rf=rs,nr(i,pL)}return!1}function dL(i,s){Bm.push(s,i),Ws||(Ws=!0,jn(Hi,function(){return Fr(),null}))}function ix(i,s){Hm.push(s,i);{i.flags|=nn;var u=i.alternate;u!==null&&(u.flags|=nn)}Ws||(Ws=!0,jn(Hi,function(){return Fr(),null}))}function hL(i){var s=i.create;i.destroy=s()}function pL(){if(yu===null)return!1;var i=yu,s=Fm;if(yu=null,Fm=ue,($e&(qi|Ir))!==cn)throw Error("Cannot flush passive effects while already rendering.");Wm=!0;var u=$e;$e|=Ir;var d=Vh(i),p=Hm;Hm=[];for(var S=0;S<p.length;S+=2){var E=p[S],R=p[S+1],D=E.destroy;E.destroy=void 0;{R.flags&=~nn;var F=R.alternate;F!==null&&(F.flags&=~nn)}if(typeof D=="function"){if(xn(R),Fs(null,D,null),Bs()){if(R===null)throw Error("Should be working on an effect.");var W=Hs();Da(R,W)}In()}}var X=Bm;Bm=[];for(var ee=0;ee<X.length;ee+=2){var he=X[ee],ye=X[ee+1];{if(xn(ye),Fs(null,hL,null,he),Bs()){if(ye===null)throw Error("Should be working on an effect.");var Ee=Hs();Da(ye,Ee)}In()}}for(var Xe=i.current.firstEffect;Xe!==null;){var St=Xe.nextEffect;Xe.nextEffect=null,Xe.flags&Pe&&mx(Xe),Xe=St}return Wh(d),dx(i,s),Wm=!1,$e=u,qn(),jh=yu===null?0:jh+1,!0}function Qm(i){return gu!==null&&gu.has(i)}function vL(i){gu===null?gu=new Set([i]):gu.add(i)}function mL(i){Uh||(Uh=!0,Im=i)}var gL=mL;function rx(i,s,u){var d=Em(u,s),p=Ob(i,d,Tt);os(i,p);var S=Yi(),E=Fh(i,Tt);E!==null&&(pa(E,Tt,S),ar(E,S),La(E,Tt))}function Da(i,s){if(i.tag===_){rx(i,i,s);return}for(var u=i.return;u!==null;){if(u.tag===_){rx(u,i,s);return}else if(u.tag===P){var d=u.type,p=u.stateNode;if(typeof d.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&!Qm(p)){var S=Em(s,i),E=Db(u,S,Tt);os(u,E);var R=Yi(),D=Fh(u,Tt);if(D!==null)pa(D,Tt,R),ar(D,R),La(D,Tt);else if(typeof p.componentDidCatch=="function"&&!Qm(p))try{p.componentDidCatch(s,S)}catch{}return}}u=u.return}}function yL(i,s,u){var d=i.pingCache;d!==null&&d.delete(s);var p=Yi();Xl(i,u),Oi===i&&is(Di,u)&&(si===kh||si===Ph&&zd(Di)&&en()-jm<Yb?bu(i,ue):_h=Ct(_h,u)),ar(i,p),La(i,u)}function SL(i,s){s===Wn&&(s=VD(i));var u=Yi(),d=Fh(i,s);d!==null&&(pa(d,s,u),ar(d,u),La(d,s))}function bL(i,s){var u=Wn,d;d=i.stateNode,d!==null&&d.delete(s),SL(i,u)}function xL(i){return i<120?120:i<480?480:i<1080?1080:i<1920?1920:i<3e3?3e3:i<4320?4320:UD(i/1960)*1960}function EL(){if(sf>FD)throw sf=0,Vm=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");jh>BD&&(jh=0,m("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function wL(){Vi.flushLegacyContextWarning(),Vi.flushPendingUnsafeLifecycleWarnings()}var $h=null;function sx(i){{if(($e&qi)!==cn||!(i.mode&(Ln|kr)))return;var s=i.tag;if(s!==M&&s!==_&&s!==P&&s!==A&&s!==J&&s!==se&&s!==ge&&s!==Z)return;var u=be(i.type)||"ReactComponent";if($h!==null){if($h.has(u))return;$h.add(u)}else $h=new Set([u]);var d=Qn;try{xn(i),m("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{d?xn(i):In()}}}var qh=null;function TL(i){{var s=i.tag;if(s!==_&&s!==P&&s!==A&&s!==J&&s!==se&&s!==ge&&s!==Z||(i.flags&nn)!==at)return;var u=be(i.type)||"ReactComponent";if(qh!==null){if(qh.has(u))return;qh.add(u)}else qh=new Set([u]);if(!Wm){var d=Qn;try{xn(i),m("Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.",s===P?"the componentWillUnmount method":"a useEffect cleanup function")}finally{d?xn(i):In()}}}}var Gm;{var CL=null;Gm=function(i,s,u){var d=bx(CL,s);try{return Tb(i,s,u)}catch(S){if(S!==null&&typeof S=="object"&&typeof S.then=="function")throw S;if(Po(),HS(),Mb(s),bx(s,d),s.mode&Yn&&um(s),Fs(null,Tb,null,i,s,u),Bs()){var p=Hs();throw p}else throw S}}}var ax=!1,Xm;Xm=new Set;function RL(i){if(ya&&($e&qi)!==cn&&!DO())switch(i.tag){case A:case J:case ge:{var s=wn&&be(wn.type)||"Unknown",u=s;if(!Xm.has(u)){Xm.add(u);var d=be(i.type)||"Unknown";m("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",d,s,s)}break}case P:{ax||(m("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),ax=!0);break}}}var Xo={current:!1};function ox(i){if(Bn===!0&&mu.current===!0&&Xo.current!==!0){var s=Qn;try{xn(i),m(`It looks like you're using the wrong act() around your test interactions.
157
+ `+(" "+K.join(" > "))}return null}function PD(i,s){if(!_i)throw Error("Test selector API is not supported by this renderer.");for(var u=Ah(i,s),d=[],p=0;p<u.length;p++)d.push(bl(u[p]));for(var S=d.length-1;S>0;S--)for(var E=d[S],R=E.x,D=R+E.width,I=E.y,V=I+E.height,K=S-1;K>=0;K--)if(S!==K){var ee=d[K],pe=ee.x,ge=pe+ee.width,Ee=ee.y,Ze=Ee+ee.height;if(R>=pe&&I>=Ee&&D<=ge&&V<=Ze){d.splice(S,1);break}else if(R===pe&&E.width===ee.width&&!(Ze<I)&&!(Ee>V)){Ee>I&&(ee.height+=Ee-I,ee.y=I),Ze<V&&(ee.height=V-Ee),d.splice(S,1);break}else if(I===Ee&&E.height===ee.height&&!(ge<R)&&!(pe>D)){pe>R&&(ee.width+=pe-R,ee.x=R),ge<D&&(ee.width=D-pe),d.splice(S,1);break}}return d}function kD(i,s){if(!_i)throw Error("Test selector API is not supported by this renderer.");for(var u=Mm(i),d=Vb(u,s),p=Array.from(d),S=0;S<p.length;){var E=p[S++];if(!Ki(E)){if(E.tag===P){var R=E.stateNode;if(uv(R))return!0}for(var D=E.child;D!==null;)p.push(D),D=D.sibling}}return!1}var Mh=[];function zD(){_i&&Mh.forEach(function(i){return i()})}function ND(i,s,u,d){if(!_i)throw Error("Test selector API is not supported by this renderer.");var p=Ah(i,s),S=qa(p,u,d),E=S.disconnect,R=S.observe,D=S.unobserve,I=function(){var V=Ah(i,s);p.forEach(function(K){V.indexOf(K)<0&&D(K)}),V.forEach(function(K){p.indexOf(K)<0&&R(K)})};return Mh.push(I),{disconnect:function(){var V=Mh.indexOf(I);V>=0&&Mh.splice(V,1),E()}}}var $b=!1,Oh=null;function _D(i){if(Oh===null)try{var s=("require"+Math.random()).slice(0,7),u=t&&t[s];Oh=u.call(t,"timers").setImmediate}catch{Oh=function(p){$b===!1&&($b=!0,typeof MessageChannel>"u"&&m("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var S=new MessageChannel;S.port1.onmessage=p,S.port2.postMessage(void 0)}}return Oh(i)}var UD=Math.ceil,Lm=g.ReactCurrentDispatcher,Pm=g.ReactCurrentOwner,mu=g.IsSomeRendererActing,dn=0,nf=1,jD=2,km=4,zm=8,Yi=16,Ir=32,qb=64,Ws=0,Dh=1,Lh=2,Ph=3,kh=4,Nm=5,Ye=dn,Di=null,wn=null,Li=ce,fs=ce,_m=Fi(ce),ai=Ws,zh=null,qo=ce,Nh=ce,Yo=ce,_h=ce,Um=null,jm=0,Yb=500,Qb=1/0,ID=500;function Ma(){Qb=tn()+ID}function Gb(){return Qb}var Ne=null,Uh=!1,Im=null,gu=null,Vs=!1,yu=null,rf=rs,Fm=ce,Bm=[],Hm=[],$s=null,FD=50,sf=0,Wm=null,BD=50,jh=0,Qo=null,af=on,qs=ce,Ih=ce,Vm=!1,of=null,lf=!1;function HD(){return Di}function Qi(){return(Ye&(Yi|Ir))!==dn?tn():(af!==on||(af=tn()),af)}function Oa(i){var s=i.mode;if((s&Ln)===Yt)return Tt;if((s&kr)===Yt)return De()===zt?Tt:oo;qs===ce&&(qs=qo);var u=Co()!==To;if(u)return Ih!==ce&&(Ih=Um!==null?Um.pendingLanes:ce),bv(qs,Ih);var d=De(),p;if((Ye&km)!==dn&&d===Ri)p=ha(ts,qs);else{var S=Pd(d);p=ha(S,qs)}return p}function WD(i){var s=i.mode;return(s&Ln)===Yt?Tt:(s&kr)===Yt?De()===zt?Tt:oo:(qs===ce&&(qs=qo),Nd(qs))}function oi(i,s,u){EL(),RL(i);var d=Fh(i,s);if(d===null)return TL(i),null;pa(d,s,u),d===Di&&(Yo=Ct(Yo,s),ai===kh&&Su(d,Li));var p=De();s===Tt?(Ye&zm)!==dn&&(Ye&(Yi|Ir))===dn?(La(d,s),$m(d)):(ar(d,u),La(d,s),Ye===dn&&(Ma(),Yn())):((Ye&km)!==dn&&(p===Ri||p===zt)&&($s===null?$s=new Set([d]):$s.add(d)),ar(d,u),La(d,s)),Um=d}function Fh(i,s){i.lanes=Ct(i.lanes,s);var u=i.alternate;u!==null&&(u.lanes=Ct(u.lanes,s)),u===null&&(i.flags&(Dt|xi))!==ot&&sx(i);for(var d=i,p=i.return;p!==null;)p.childLanes=Ct(p.childLanes,s),u=p.alternate,u!==null?u.childLanes=Ct(u.childLanes,s):(p.flags&(Dt|xi))!==ot&&sx(i),d=p,p=p.return;if(d.tag===_){var S=d.stateNode;return S}else return null}function ar(i,s){var u=i.callbackNode;Ql(i,s);var d=pi(i,i===Di?Li:ce),p=fo();if(d===ce){u!==null&&(ga(u),i.callbackNode=null,i.callbackPriority=Dr);return}if(u!==null){var S=i.callbackPriority;if(S===p)return;ga(u)}var E;if(p===Ms)E=ss($m.bind(null,i));else if(p===no)E=In(zt,$m.bind(null,i));else{var R=Pr(p);E=In(R,Xb.bind(null,i))}i.callbackPriority=p,i.callbackNode=E}function Xb(i){if(af=on,qs=ce,Ih=ce,(Ye&(Yi|Ir))!==dn)throw Error("Should not already be working.");var s=i.callbackNode,u=Fr();if(u&&i.callbackNode!==s)return null;var d=pi(i,i===Di?Li:ce);if(d===ce)return null;var p=sL(i,d);if(jn(qo,Yo))bu(i,ce);else if(p!==Ws){if(p===Lh&&(Ye|=qb,i.hydrate&&(i.hydrate=!1,Ya(i.containerInfo)),d=Ec(i),d!==ce&&(p=uf(i,d))),p===Dh){var S=zh;throw bu(i,ce),Su(i,d),ar(i,tn()),S}var E=i.current.alternate;i.finishedWork=E,i.finishedLanes=d,VD(i,p,d)}return ar(i,tn()),i.callbackNode===s?Xb.bind(null,i):null}function VD(i,s,u){switch(s){case Ws:case Dh:throw Error("Root did not complete. This is a bug in React.");case Lh:{Go(i);break}case Ph:{if(Su(i,u),zd(u)&&!hx()){var d=jm+Yb-tn();if(d>10){var p=pi(i,ce);if(p!==ce)break;var S=i.suspendedLanes;if(!is(S,u)){Qi(),Xl(i,S);break}i.timeoutHandle=vt(Go.bind(null,i),d);break}}Go(i);break}case kh:{if(Su(i,u),wc(u))break;if(!hx()){var E=uo(i,u),R=E,D=tn()-R,I=xL(D)-D;if(I>10){i.timeoutHandle=vt(Go.bind(null,i),I);break}}Go(i);break}case Nm:{Go(i);break}default:throw Error("Unknown root exit status.")}}function Su(i,s){s=ho(s,_h),s=ho(s,Yo),Id(i,s)}function $m(i){if((Ye&(Yi|Ir))!==dn)throw Error("Should not already be working.");Fr();var s,u;if(i===Di&&jn(i.expiredLanes,Li)?(s=Li,u=uf(i,s),jn(qo,Yo)&&(s=pi(i,s),u=uf(i,s))):(s=pi(i,ce),u=uf(i,s)),i.tag!==As&&u===Lh&&(Ye|=qb,i.hydrate&&(i.hydrate=!1,Ya(i.containerInfo)),s=Ec(i),s!==ce&&(u=uf(i,s))),u===Dh){var d=zh;throw bu(i,ce),Su(i,s),ar(i,tn()),d}var p=i.current.alternate;return i.finishedWork=p,i.finishedLanes=s,Go(i),ar(i,tn()),null}function $D(i,s){Fd(i,s),ar(i,tn()),(Ye&(Yi|Ir))===dn&&(Ma(),Yn())}function qD(){if((Ye&(nf|Yi|Ir))!==dn){(Ye&Yi)!==dn&&m("unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}QD(),Fr()}function YD(i){return nr(Wi,i)}function QD(){if($s!==null){var i=$s;$s=null,i.forEach(function(s){Kl(s),ar(s,tn())})}Yn()}function Kb(i,s){var u=Ye;Ye|=nf;try{return i(s)}finally{Ye=u,Ye===dn&&(Ma(),Yn())}}function GD(i,s){var u=Ye;Ye|=jD;try{return i(s)}finally{Ye=u,Ye===dn&&(Ma(),Yn())}}function XD(i,s,u,d,p){var S=Ye;Ye|=km;try{return nr(Ri,i.bind(null,s,u,d,p))}finally{Ye=S,Ye===dn&&(Ma(),Yn())}}function KD(i,s){var u=Ye;Ye&=~nf,Ye|=zm;try{return i(s)}finally{Ye=u,Ye===dn&&(Ma(),Yn())}}function Bh(i,s){var u=Ye;if((u&(Yi|Ir))!==dn)return m("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),i(s);Ye|=nf;try{return i?nr(zt,i.bind(null,s)):void 0}finally{Ye=u,Yn()}}function ZD(i){var s=Ye;Ye|=nf;try{nr(zt,i)}finally{Ye=s,Ye===dn&&(Ma(),Yn())}}function Hh(i,s){Sn(_m,fs,i),fs=Ct(fs,s),qo=Ct(qo,s)}function qm(i){fs=_m.current,Ft(_m,i)}function bu(i,s){i.finishedWork=null,i.finishedLanes=ce;var u=i.timeoutHandle;if(u!==ur&&(i.timeoutHandle=ur,un(u)),wn!==null)for(var d=wn.return;d!==null;)Mb(d),d=d.return;Di=i,wn=Zo(i.current,null),Li=fs=qo=s,ai=Ws,zh=null,Nh=ce,Yo=ce,_h=ce,Qo=null,Vi.discardPendingWarnings()}function Zb(i,s){do{var u=wn;try{if(Po(),HS(),Fn(),Pm.current=null,u===null||u.return===null){ai=Dh,zh=s,wn=null;return}Va&&u.mode&Qn&&ph(u,!0),rD(i,u.return,u,s,Li),nx(u)}catch(d){s=d,wn===u&&u!==null?(u=u.return,wn=u):u=wn;continue}return}while(!0)}function Jb(){var i=Lm.current;return Lm.current=fh,i===null?fh:i}function ex(i){Lm.current=i}function Wh(i){{var s=v.__interactionsRef.current;return v.__interactionsRef.current=i.memoizedInteractions,s}}function Vh(i){v.__interactionsRef.current=i}function JD(){jm=tn()}function Ym(i){Nh=Ct(i,Nh)}function eL(){ai===Ws&&(ai=Ph)}function tL(){(ai===Ws||ai===Ph)&&(ai=kh),Di!==null&&(kd(Nh)||kd(Yo))&&Su(Di,Li)}function nL(){ai!==Nm&&(ai=Lh)}function iL(){return ai===Ws}function uf(i,s){var u=Ye;Ye|=Yi;var d=Jb();(Di!==i||Li!==s)&&(bu(i,s),fx(i,s));var p=Wh(i);do try{rL();break}catch(S){Zb(i,S)}while(!0);if(Po(),Vh(p),Ye=u,ex(d),wn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Di=null,Li=ce,ai}function rL(){for(;wn!==null;)tx(wn)}function sL(i,s){var u=Ye;Ye|=Yi;var d=Jb();(Di!==i||Li!==s)&&(Ma(),bu(i,s),fx(i,s));var p=Wh(i);do try{aL();break}catch(S){Zb(i,S)}while(!0);return Po(),Vh(p),ex(d),Ye=u,wn!==null?Ws:(Di=null,Li=ce,ai)}function aL(){for(;wn!==null&&!xo();)tx(wn)}function tx(i){var s=i.alternate;xn(i);var u;(i.mode&Qn)!==Yt?(um(i),u=Gm(s,i,fs),ph(i,!0)):u=Gm(s,i,fs),Fn(),i.memoizedProps=i.pendingProps,u===null?nx(i):wn=u,Pm.current=null}function nx(i){var s=i;do{var u=s.alternate,d=s.return;if((s.flags&Yr)===ot){xn(s);var p=void 0;if((s.mode&Qn)===Yt?p=Ab(u,s,fs):(um(s),p=Ab(u,s,fs),ph(s,!1)),Fn(),p!==null){wn=p;return}if(oL(s),d!==null&&(d.flags&Yr)===ot){d.firstEffect===null&&(d.firstEffect=s.firstEffect),s.lastEffect!==null&&(d.lastEffect!==null&&(d.lastEffect.nextEffect=s.firstEffect),d.lastEffect=s.lastEffect);var S=s.flags;S>ci&&(d.lastEffect!==null?d.lastEffect.nextEffect=s:d.firstEffect=s,d.lastEffect=s)}}else{var E=eD(s);if(E!==null){E.flags&=Wa,wn=E;return}if((s.mode&Qn)!==Yt){ph(s,!1);for(var R=s.actualDuration,D=s.child;D!==null;)R+=D.actualDuration,D=D.sibling;s.actualDuration=R}d!==null&&(d.firstEffect=d.lastEffect=null,d.flags|=Yr)}var I=s.sibling;if(I!==null){wn=I;return}s=d,wn=s}while(s!==null);ai===Ws&&(ai=Nm)}function oL(i){if(!((i.tag===ue||i.tag===it)&&i.memoizedState!==null&&!jn(fs,Ci)&&(i.mode&kr)!==ce)){var s=ce;if((i.mode&Qn)!==Yt){for(var u=i.actualDuration,d=i.selfBaseDuration,p=i.alternate===null||i.child!==i.alternate.child,S=i.child;S!==null;)s=Ct(s,Ct(S.lanes,S.childLanes)),p&&(u+=S.actualDuration),d+=S.treeBaseDuration,S=S.sibling;var E=i.tag===$&&i.memoizedState!==null;if(E){var R=i.child;R!==null&&(d-=R.treeBaseDuration)}i.actualDuration=u,i.treeBaseDuration=d}else for(var D=i.child;D!==null;)s=Ct(s,Ct(D.lanes,D.childLanes)),D=D.sibling;i.childLanes=s}}function Go(i){var s=De();return nr(zt,lL.bind(null,i,s)),null}function lL(i,s){do Fr();while(yu!==null);if(wL(),(Ye&(Yi|Ir))!==dn)throw Error("Should not already be working.");var u=i.finishedWork,d=i.finishedLanes;if(u===null)return null;if(i.finishedWork=null,i.finishedLanes=ce,u===i.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");i.callbackNode=null;var p=Ct(u.lanes,u.childLanes);Zl(i,p),$s!==null&&!Tv(p)&&$s.has(i)&&$s.delete(i),i===Di&&(Di=null,wn=null,Li=ce);var S;if(u.flags>ci?u.lastEffect!==null?(u.lastEffect.nextEffect=u,S=u.firstEffect):S=u:S=u.firstEffect,S!==null){var E=Ye;Ye|=Ir;var R=Wh(i);Pm.current=null,of=pt(i.containerInfo),lf=!1,Ne=S;do if(Fs(null,uL,null),Bs()){if(Ne===null)throw Error("Should be working on an effect.");var D=Hs();Da(Ne,D),Ne=Ne.nextEffect}while(Ne!==null);of=null,rb(),Ne=S;do if(Fs(null,cL,null,i,s),Bs()){if(Ne===null)throw Error("Should be working on an effect.");var I=Hs();Da(Ne,I),Ne=Ne.nextEffect}while(Ne!==null);lf&&xd(),lt(i.containerInfo),i.current=u,Ne=S;do if(Fs(null,fL,null,i,d),Bs()){if(Ne===null)throw Error("Should be working on an effect.");var V=Hs();Da(Ne,V),Ne=Ne.nextEffect}while(Ne!==null);Ne=null,va(),Vh(R),Ye=E}else i.current=u,rb();var K=Vs;if(Vs)Vs=!1,yu=i,Fm=d,rf=s;else for(Ne=S;Ne!==null;){var ee=Ne.nextEffect;Ne.nextEffect=null,Ne.flags&ze&&mx(Ne),Ne=ee}if(p=i.pendingLanes,p!==ce){if(Qo!==null){var pe=Qo;Qo=null;for(var ge=0;ge<pe.length;ge++)cx(i,pe[ge],i.memoizedInteractions)}La(i,p)}else gu=null;if(K||dx(i,d),p===Tt?i===Wm?sf++:(sf=0,Wm=i):sf=0,eo(u.stateNode,s),zD(),ar(i,tn()),Uh){Uh=!1;var Ee=Im;throw Im=null,Ee}return(Ye&zm)!==dn||Yn(),null}function uL(){for(;Ne!==null;){var i=Ne.alternate;!lf&&of!==null&&((Ne.flags&ze)!==ot?we(Ne,of)&&(lf=!0,$a()):Ne.tag===$&&wD(i,Ne)&&we(Ne,of)&&(lf=!0,$a()));var s=Ne.flags;(s&Jt)!==ot&&(xn(Ne),fD(i,Ne),Fn()),(s&Bn)!==ot&&(Vs||(Vs=!0,In(Wi,function(){return Fr(),null}))),Ne=Ne.nextEffect}}function cL(i,s){for(;Ne!==null;){xn(Ne);var u=Ne.flags;if(u&st&&TD(Ne),u&ln){var d=Ne.alternate;d!==null&&mD(d)}var p=u&(Dt|tt|ze|xi);switch(p){case Dt:{Bb(Ne),Ne.flags&=~Dt;break}case Ce:{Bb(Ne),Ne.flags&=~Dt;var S=Ne.alternate;Am(S,Ne);break}case xi:{Ne.flags&=~xi;break}case qr:{Ne.flags&=~xi;var E=Ne.alternate;Am(E,Ne);break}case tt:{var R=Ne.alternate;Am(R,Ne);break}case ze:{xD(i,Ne);break}}Fn(),Ne=Ne.nextEffect}}function fL(i,s){for(;Ne!==null;){xn(Ne);var u=Ne.flags;if(u&(tt|Lt)){var d=Ne.alternate;pD(i,d,Ne)}u&ln&&vD(Ne),Fn(),Ne=Ne.nextEffect}}function Fr(){if(rf!==rs){var i=rf>Wi?Wi:rf;return rf=rs,nr(i,pL)}return!1}function dL(i,s){Bm.push(s,i),Vs||(Vs=!0,In(Wi,function(){return Fr(),null}))}function ix(i,s){Hm.push(s,i);{i.flags|=sn;var u=i.alternate;u!==null&&(u.flags|=sn)}Vs||(Vs=!0,In(Wi,function(){return Fr(),null}))}function hL(i){var s=i.create;i.destroy=s()}function pL(){if(yu===null)return!1;var i=yu,s=Fm;if(yu=null,Fm=ce,(Ye&(Yi|Ir))!==dn)throw Error("Cannot flush passive effects while already rendering.");Vm=!0;var u=Ye;Ye|=Ir;var d=Wh(i),p=Hm;Hm=[];for(var S=0;S<p.length;S+=2){var E=p[S],R=p[S+1],D=E.destroy;E.destroy=void 0;{R.flags&=~sn;var I=R.alternate;I!==null&&(I.flags&=~sn)}if(typeof D=="function"){if(xn(R),Fs(null,D,null),Bs()){if(R===null)throw Error("Should be working on an effect.");var V=Hs();Da(R,V)}Fn()}}var K=Bm;Bm=[];for(var ee=0;ee<K.length;ee+=2){var pe=K[ee],ge=K[ee+1];{if(xn(ge),Fs(null,hL,null,pe),Bs()){if(ge===null)throw Error("Should be working on an effect.");var Ee=Hs();Da(ge,Ee)}Fn()}}for(var Ze=i.current.firstEffect;Ze!==null;){var gt=Ze.nextEffect;Ze.nextEffect=null,Ze.flags&ze&&mx(Ze),Ze=gt}return Vh(d),dx(i,s),Vm=!1,Ye=u,Yn(),jh=yu===null?0:jh+1,!0}function Qm(i){return gu!==null&&gu.has(i)}function vL(i){gu===null?gu=new Set([i]):gu.add(i)}function mL(i){Uh||(Uh=!0,Im=i)}var gL=mL;function rx(i,s,u){var d=Em(u,s),p=Ob(i,d,Tt);os(i,p);var S=Qi(),E=Fh(i,Tt);E!==null&&(pa(E,Tt,S),ar(E,S),La(E,Tt))}function Da(i,s){if(i.tag===_){rx(i,i,s);return}for(var u=i.return;u!==null;){if(u.tag===_){rx(u,i,s);return}else if(u.tag===k){var d=u.type,p=u.stateNode;if(typeof d.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&!Qm(p)){var S=Em(s,i),E=Db(u,S,Tt);os(u,E);var R=Qi(),D=Fh(u,Tt);if(D!==null)pa(D,Tt,R),ar(D,R),La(D,Tt);else if(typeof p.componentDidCatch=="function"&&!Qm(p))try{p.componentDidCatch(s,S)}catch{}return}}u=u.return}}function yL(i,s,u){var d=i.pingCache;d!==null&&d.delete(s);var p=Qi();Xl(i,u),Di===i&&is(Li,u)&&(ai===kh||ai===Ph&&zd(Li)&&tn()-jm<Yb?bu(i,ce):_h=Ct(_h,u)),ar(i,p),La(i,u)}function SL(i,s){s===$n&&(s=WD(i));var u=Qi(),d=Fh(i,s);d!==null&&(pa(d,s,u),ar(d,u),La(d,s))}function bL(i,s){var u=$n,d;d=i.stateNode,d!==null&&d.delete(s),SL(i,u)}function xL(i){return i<120?120:i<480?480:i<1080?1080:i<1920?1920:i<3e3?3e3:i<4320?4320:UD(i/1960)*1960}function EL(){if(sf>FD)throw sf=0,Wm=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");jh>BD&&(jh=0,m("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function wL(){Vi.flushLegacyContextWarning(),Vi.flushPendingUnsafeLifecycleWarnings()}var $h=null;function sx(i){{if((Ye&Yi)!==dn||!(i.mode&(Ln|kr)))return;var s=i.tag;if(s!==M&&s!==_&&s!==k&&s!==A&&s!==J&&s!==re&&s!==me&&s!==Te)return;var u=be(i.type)||"ReactComponent";if($h!==null){if($h.has(u))return;$h.add(u)}else $h=new Set([u]);var d=Gn;try{xn(i),m("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{d?xn(i):Fn()}}}var qh=null;function TL(i){{var s=i.tag;if(s!==_&&s!==k&&s!==A&&s!==J&&s!==re&&s!==me&&s!==Te||(i.flags&sn)!==ot)return;var u=be(i.type)||"ReactComponent";if(qh!==null){if(qh.has(u))return;qh.add(u)}else qh=new Set([u]);if(!Vm){var d=Gn;try{xn(i),m("Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.",s===k?"the componentWillUnmount method":"a useEffect cleanup function")}finally{d?xn(i):Fn()}}}}var Gm;{var CL=null;Gm=function(i,s,u){var d=bx(CL,s);try{return Tb(i,s,u)}catch(S){if(S!==null&&typeof S=="object"&&typeof S.then=="function")throw S;if(Po(),HS(),Mb(s),bx(s,d),s.mode&Qn&&um(s),Fs(null,Tb,null,i,s,u),Bs()){var p=Hs();throw p}else throw S}}}var ax=!1,Xm;Xm=new Set;function RL(i){if(ya&&(Ye&Yi)!==dn&&!DO())switch(i.tag){case A:case J:case me:{var s=wn&&be(wn.type)||"Unknown",u=s;if(!Xm.has(u)){Xm.add(u);var d=be(i.type)||"Unknown";m("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",d,s,s)}break}case k:{ax||(m("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),ax=!0);break}}}var Xo={current:!1};function ox(i){if(Hn===!0&&mu.current===!0&&Xo.current!==!0){var s=Gn;try{xn(i),m(`It looks like you're using the wrong act() around your test interactions.
158
158
  Be sure to use the matching version of act() corresponding to your renderer:
159
159
 
160
160
  // for react-dom:
@@ -166,7 +166,7 @@ act(() => ...);
166
166
  import TestRenderer from react-test-renderer';
167
167
  const {act} = TestRenderer;
168
168
  // ...
169
- act(() => ...);`)}finally{s?xn(i):In()}}}function lx(i){Bn===!0&&(i.mode&Mt)!==$t&&mu.current===!1&&Xo.current===!1&&m(`An update to %s ran an effect, but was not wrapped in act(...).
169
+ act(() => ...);`)}finally{s?xn(i):Fn()}}}function lx(i){Hn===!0&&(i.mode&Mt)!==Yt&&mu.current===!1&&Xo.current===!1&&m(`An update to %s ran an effect, but was not wrapped in act(...).
170
170
 
171
171
  When testing, code that causes React state updates should be wrapped into act(...):
172
172
 
@@ -175,7 +175,7 @@ act(() => {
175
175
  });
176
176
  /* assert on the output */
177
177
 
178
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,be(i.type))}function AL(i){if(Bn===!0&&$e===cn&&mu.current===!1&&Xo.current===!1){var s=Qn;try{xn(i),m(`An update to %s inside a test was not wrapped in act(...).
178
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,be(i.type))}function AL(i){if(Hn===!0&&Ye===dn&&mu.current===!1&&Xo.current===!1){var s=Gn;try{xn(i),m(`An update to %s inside a test was not wrapped in act(...).
179
179
 
180
180
  When testing, code that causes React state updates should be wrapped into act(...):
181
181
 
@@ -184,33 +184,33 @@ act(() => {
184
184
  });
185
185
  /* assert on the output */
186
186
 
187
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,be(i.type))}finally{s?xn(i):In()}}}var ML=AL,ux=!1;function OL(i){ux===!1&&h.unstable_flushAllWithoutAsserting===void 0&&(i.mode&Ln||i.mode&kr)&&(ux=!0,m(`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest:
187
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,be(i.type))}finally{s?xn(i):Fn()}}}var ML=AL,ux=!1;function OL(i){ux===!1&&h.unstable_flushAllWithoutAsserting===void 0&&(i.mode&Ln||i.mode&kr)&&(ux=!0,m(`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest:
188
188
  jest.mock('scheduler', () => require('scheduler/unstable_mock'));
189
189
 
190
- For more info, visit https://reactjs.org/link/mock-scheduler`))}function Km(i,s){return s*1e3+i.interactionThreadID}function Yh(i){Qo===null?Qo=[i]:Qo.push(i)}function cx(i,s,u){if(u.size>0){var d=i.pendingInteractionMap,p=d.get(s);p!=null?u.forEach(function(R){p.has(R)||R.__count++,p.add(R)}):(d.set(s,new Set(u)),u.forEach(function(R){R.__count++}));var S=v.__subscriberRef.current;if(S!==null){var E=Km(i,s);S.onWorkScheduled(u,E)}}}function La(i,s){cx(i,s,v.__interactionsRef.current)}function fx(i,s){var u=new Set;if(i.pendingInteractionMap.forEach(function(S,E){Un(s,E)&&S.forEach(function(R){return u.add(R)})}),i.memoizedInteractions=u,u.size>0){var d=v.__subscriberRef.current;if(d!==null){var p=Km(i,s);try{d.onWorkStarted(u,p)}catch(S){jn(zt,function(){throw S})}}}}function dx(i,s){var u=i.pendingLanes,d;try{if(d=v.__subscriberRef.current,d!==null&&i.memoizedInteractions.size>0){var p=Km(i,s);d.onWorkStopped(i.memoizedInteractions,p)}}catch(E){jn(zt,function(){throw E})}finally{var S=i.pendingInteractionMap;S.forEach(function(E,R){Un(u,R)||(S.delete(R),E.forEach(function(D){if(D.__count--,d!==null&&D.__count===0)try{d.onInteractionScheduledWorkCompleted(D)}catch(F){jn(zt,function(){throw F})}}))})}}function hx(){return Ko>0}var Zm=h.unstable_flushAllWithoutAsserting,px=typeof Zm=="function";function Jm(){if(Zm!==void 0)try{return Zm()}finally{}else try{for(var i=!1;Fr();)i=!0;return i}finally{}}function vx(i){try{Jm(),_D(function(){Jm()?vx(i):i()})}catch(s){i(s)}}var Ko=0;function DL(i){var s=Ko;Ko++;var u=mu.current,d=Xo.current;mu.current=!0,Xo.current=!0;function p(){Ko--,mu.current=u,Xo.current=d,Ko>s&&m("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ")}var S;try{S=Kb(i)}catch(R){throw p(),R}if(S!==null&&typeof S=="object"&&typeof S.then=="function"){var E=!1;return typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){E===!1&&m("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")}),{then:function(R,D){E=!0,S.then(function(){if(Ko>1||px===!0&&u===!0){p(),R();return}vx(function(F){p(),F?D(F):R()})},function(F){p(),D(F)})}}}else{S!==void 0&&m("The callback passed to act(...) function must return undefined, or a Promise. You returned %s",S);try{Ko===1&&(px===!1||u===!1)&&Jm(),p()}catch(R){throw p(),R}return{then:function(R){m("Do not await the result of calling act(...) with sync logic, it is not a Promise."),R()}}}}function mx(i){i.sibling=null,i.stateNode=null}var Sr=null,xu=null,LL=function(i){Sr=i};function Eu(i){{if(Sr===null)return i;var s=Sr(i);return s===void 0?i:s.current}}function eg(i){return Eu(i)}function tg(i){{if(Sr===null)return i;var s=Sr(i);if(s===void 0){if(i!=null&&typeof i.render=="function"){var u=Eu(i.render);if(i.render!==u){var d={$$typeof:Ge,render:u};return i.displayName!==void 0&&(d.displayName=i.displayName),d}}return i}return s.current}}function gx(i,s){{if(Sr===null)return!1;var u=i.elementType,d=s.type,p=!1,S=typeof d=="object"&&d!==null?d.$$typeof:null;switch(i.tag){case P:{typeof d=="function"&&(p=!0);break}case A:{(typeof d=="function"||S===ft)&&(p=!0);break}case J:{(S===Ge||S===ft)&&(p=!0);break}case se:case ge:{(S===ht||S===ft)&&(p=!0);break}default:return!1}if(p){var E=Sr(u);if(E!==void 0&&E===Sr(d))return!0}return!1}}function yx(i){{if(Sr===null||typeof WeakSet!="function")return;xu===null&&(xu=new WeakSet),xu.add(i)}}var PL=function(i,s){{if(Sr===null)return;var u=s.staleFamilies,d=s.updatedFamilies;Fr(),Bh(function(){ng(i.current,d,u)})}},kL=function(i,s){{if(i.context!==un)return;Fr(),Bh(function(){xx(s,i,null,null)})}};function ng(i,s,u){{var d=i.alternate,p=i.child,S=i.sibling,E=i.tag,R=i.type,D=null;switch(E){case A:case ge:case P:D=R;break;case J:D=R.render;break}if(Sr===null)throw new Error("Expected resolveFamily to be set during hot reload.");var F=!1,W=!1;if(D!==null){var X=Sr(D);X!==void 0&&(u.has(X)?W=!0:s.has(X)&&(E===P?W=!0:F=!0))}xu!==null&&(xu.has(i)||d!==null&&xu.has(d))&&(W=!0),W&&(i._debugNeedsRemount=!0),(W||F)&&ai(i,Tt,sn),p!==null&&!W&&ng(p,s,u),S!==null&&ng(S,s,u)}}var zL=function(i,s){{var u=new Set,d=new Set(s.map(function(p){return p.current}));return ig(i.current,d,u),u}};function ig(i,s,u){{var d=i.child,p=i.sibling,S=i.tag,E=i.type,R=null;switch(S){case A:case ge:case P:R=E;break;case J:R=E.render;break}var D=!1;R!==null&&s.has(R)&&(D=!0),D?NL(i,u):d!==null&&ig(d,s,u),p!==null&&ig(p,s,u)}}function NL(i,s){{var u=_L(i,s);if(u)return;for(var d=i;;){switch(d.tag){case k:s.add(d.stateNode);return;case L:s.add(d.stateNode.containerInfo);return;case _:s.add(d.stateNode.containerInfo);return}if(d.return===null)throw new Error("Expected to reach root first.");d=d.return}}}function _L(i,s){for(var u=i,d=!1;;){if(u.tag===k)d=!0,s.add(u.stateNode);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)return d;for(;u.sibling===null;){if(u.return===null||u.return===i)return d;u=u.return}u.sibling.return=u.return,u=u.sibling}return!1}var rg;{rg=!1;try{var Sx=Object.preventExtensions({})}catch{rg=!0}}var UL=1;function jL(i,s,u,d){this.tag=i,this.key=u,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=s,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=d,this.flags=at,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.lanes=ue,this.childLanes=ue,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugID=UL++,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!rg&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var or=function(i,s,u,d){return new jL(i,s,u,d)};function sg(i){var s=i.prototype;return!!(s&&s.isReactComponent)}function IL(i){return typeof i=="function"&&!sg(i)&&i.defaultProps===void 0}function FL(i){if(typeof i=="function")return sg(i)?P:A;if(i!=null){var s=i.$$typeof;if(s===Ge)return J;if(s===ht)return se}return M}function Zo(i,s){var u=i.alternate;u===null?(u=or(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u._debugID=i._debugID,u._debugSource=i._debugSource,u._debugOwner=i._debugOwner,u._debugHookTypes=i._debugHookTypes,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=at,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,u.actualDuration=0,u.actualStartTime=-1),u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue;var d=i.dependencies;switch(u.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.selfBaseDuration=i.selfBaseDuration,u.treeBaseDuration=i.treeBaseDuration,u._debugNeedsRemount=i._debugNeedsRemount,u.tag){case M:case A:case ge:u.type=Eu(i.type);break;case P:u.type=eg(i.type);break;case J:u.type=tg(i.type);break}return u}function BL(i,s){i.flags&=Dt,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null;var u=i.alternate;if(u===null)i.childLanes=ue,i.lanes=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null,i.selfBaseDuration=0,i.treeBaseDuration=0;else{i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type;var d=u.dependencies;i.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},i.selfBaseDuration=u.selfBaseDuration,i.treeBaseDuration=u.treeBaseDuration}return i}function HL(i){var s;return i===ua?s=kr|Ln|Mt:i===jl?s=Ln|Mt:s=$t,Vn&&(s|=Yn),or(_,null,null,s)}function ag(i,s,u,d,p,S){var E=M,R=i;if(typeof i=="function")sg(i)?(E=P,R=eg(R)):R=Eu(R);else if(typeof i=="string")E=k;else e:switch(i){case pt:return Jo(u.children,p,S,s);case Gi:E=q,p|=zr;break;case vn:E=q,p|=Mt;break;case Kt:return VL(u,p,S,s);case nt:return WL(u,p,S,s);case Ze:return $L(u,p,S,s);case j:return lg(u,p,S,s);case z:return qL(u,p,S,s);case Qt:default:{if(typeof i=="object"&&i!==null)switch(i.$$typeof){case xt:E=H;break e;case ct:E=te;break e;case Ge:E=J,R=tg(R);break e;case ht:E=se;break e;case ft:E=Ce,R=null;break e;case mn:E=Z;break e}var D="";{(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var F=d?be(d.type):null;F&&(D+=`
190
+ For more info, visit https://reactjs.org/link/mock-scheduler`))}function Km(i,s){return s*1e3+i.interactionThreadID}function Yh(i){Qo===null?Qo=[i]:Qo.push(i)}function cx(i,s,u){if(u.size>0){var d=i.pendingInteractionMap,p=d.get(s);p!=null?u.forEach(function(R){p.has(R)||R.__count++,p.add(R)}):(d.set(s,new Set(u)),u.forEach(function(R){R.__count++}));var S=v.__subscriberRef.current;if(S!==null){var E=Km(i,s);S.onWorkScheduled(u,E)}}}function La(i,s){cx(i,s,v.__interactionsRef.current)}function fx(i,s){var u=new Set;if(i.pendingInteractionMap.forEach(function(S,E){jn(s,E)&&S.forEach(function(R){return u.add(R)})}),i.memoizedInteractions=u,u.size>0){var d=v.__subscriberRef.current;if(d!==null){var p=Km(i,s);try{d.onWorkStarted(u,p)}catch(S){In(zt,function(){throw S})}}}}function dx(i,s){var u=i.pendingLanes,d;try{if(d=v.__subscriberRef.current,d!==null&&i.memoizedInteractions.size>0){var p=Km(i,s);d.onWorkStopped(i.memoizedInteractions,p)}}catch(E){In(zt,function(){throw E})}finally{var S=i.pendingInteractionMap;S.forEach(function(E,R){jn(u,R)||(S.delete(R),E.forEach(function(D){if(D.__count--,d!==null&&D.__count===0)try{d.onInteractionScheduledWorkCompleted(D)}catch(I){In(zt,function(){throw I})}}))})}}function hx(){return Ko>0}var Zm=h.unstable_flushAllWithoutAsserting,px=typeof Zm=="function";function Jm(){if(Zm!==void 0)try{return Zm()}finally{}else try{for(var i=!1;Fr();)i=!0;return i}finally{}}function vx(i){try{Jm(),_D(function(){Jm()?vx(i):i()})}catch(s){i(s)}}var Ko=0;function DL(i){var s=Ko;Ko++;var u=mu.current,d=Xo.current;mu.current=!0,Xo.current=!0;function p(){Ko--,mu.current=u,Xo.current=d,Ko>s&&m("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ")}var S;try{S=Kb(i)}catch(R){throw p(),R}if(S!==null&&typeof S=="object"&&typeof S.then=="function"){var E=!1;return typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){E===!1&&m("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")}),{then:function(R,D){E=!0,S.then(function(){if(Ko>1||px===!0&&u===!0){p(),R();return}vx(function(I){p(),I?D(I):R()})},function(I){p(),D(I)})}}}else{S!==void 0&&m("The callback passed to act(...) function must return undefined, or a Promise. You returned %s",S);try{Ko===1&&(px===!1||u===!1)&&Jm(),p()}catch(R){throw p(),R}return{then:function(R){m("Do not await the result of calling act(...) with sync logic, it is not a Promise."),R()}}}}function mx(i){i.sibling=null,i.stateNode=null}var Sr=null,xu=null,LL=function(i){Sr=i};function Eu(i){{if(Sr===null)return i;var s=Sr(i);return s===void 0?i:s.current}}function eg(i){return Eu(i)}function tg(i){{if(Sr===null)return i;var s=Sr(i);if(s===void 0){if(i!=null&&typeof i.render=="function"){var u=Eu(i.render);if(i.render!==u){var d={$$typeof:Ut,render:u};return i.displayName!==void 0&&(d.displayName=i.displayName),d}}return i}return s.current}}function gx(i,s){{if(Sr===null)return!1;var u=i.elementType,d=s.type,p=!1,S=typeof d=="object"&&d!==null?d.$$typeof:null;switch(i.tag){case k:{typeof d=="function"&&(p=!0);break}case A:{(typeof d=="function"||S===Qe)&&(p=!0);break}case J:{(S===Ut||S===Qe)&&(p=!0);break}case re:case me:{(S===We||S===Qe)&&(p=!0);break}default:return!1}if(p){var E=Sr(u);if(E!==void 0&&E===Sr(d))return!0}return!1}}function yx(i){{if(Sr===null||typeof WeakSet!="function")return;xu===null&&(xu=new WeakSet),xu.add(i)}}var PL=function(i,s){{if(Sr===null)return;var u=s.staleFamilies,d=s.updatedFamilies;Fr(),Bh(function(){ng(i.current,d,u)})}},kL=function(i,s){{if(i.context!==fn)return;Fr(),Bh(function(){xx(s,i,null,null)})}};function ng(i,s,u){{var d=i.alternate,p=i.child,S=i.sibling,E=i.tag,R=i.type,D=null;switch(E){case A:case me:case k:D=R;break;case J:D=R.render;break}if(Sr===null)throw new Error("Expected resolveFamily to be set during hot reload.");var I=!1,V=!1;if(D!==null){var K=Sr(D);K!==void 0&&(u.has(K)?V=!0:s.has(K)&&(E===k?V=!0:I=!0))}xu!==null&&(xu.has(i)||d!==null&&xu.has(d))&&(V=!0),V&&(i._debugNeedsRemount=!0),(V||I)&&oi(i,Tt,on),p!==null&&!V&&ng(p,s,u),S!==null&&ng(S,s,u)}}var zL=function(i,s){{var u=new Set,d=new Set(s.map(function(p){return p.current}));return ig(i.current,d,u),u}};function ig(i,s,u){{var d=i.child,p=i.sibling,S=i.tag,E=i.type,R=null;switch(S){case A:case me:case k:R=E;break;case J:R=E.render;break}var D=!1;R!==null&&s.has(R)&&(D=!0),D?NL(i,u):d!==null&&ig(d,s,u),p!==null&&ig(p,s,u)}}function NL(i,s){{var u=_L(i,s);if(u)return;for(var d=i;;){switch(d.tag){case P:s.add(d.stateNode);return;case L:s.add(d.stateNode.containerInfo);return;case _:s.add(d.stateNode.containerInfo);return}if(d.return===null)throw new Error("Expected to reach root first.");d=d.return}}}function _L(i,s){for(var u=i,d=!1;;){if(u.tag===P)d=!0,s.add(u.stateNode);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)return d;for(;u.sibling===null;){if(u.return===null||u.return===i)return d;u=u.return}u.sibling.return=u.return,u=u.sibling}return!1}var rg;{rg=!1;try{var Sx=Object.preventExtensions({})}catch{rg=!0}}var UL=1;function jL(i,s,u,d){this.tag=i,this.key=u,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=s,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=d,this.flags=ot,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.lanes=ce,this.childLanes=ce,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugID=UL++,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!rg&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var or=function(i,s,u,d){return new jL(i,s,u,d)};function sg(i){var s=i.prototype;return!!(s&&s.isReactComponent)}function IL(i){return typeof i=="function"&&!sg(i)&&i.defaultProps===void 0}function FL(i){if(typeof i=="function")return sg(i)?k:A;if(i!=null){var s=i.$$typeof;if(s===Ut)return J;if(s===We)return re}return M}function Zo(i,s){var u=i.alternate;u===null?(u=or(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u._debugID=i._debugID,u._debugSource=i._debugSource,u._debugOwner=i._debugOwner,u._debugHookTypes=i._debugHookTypes,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=ot,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,u.actualDuration=0,u.actualStartTime=-1),u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue;var d=i.dependencies;switch(u.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.selfBaseDuration=i.selfBaseDuration,u.treeBaseDuration=i.treeBaseDuration,u._debugNeedsRemount=i._debugNeedsRemount,u.tag){case M:case A:case me:u.type=Eu(i.type);break;case k:u.type=eg(i.type);break;case J:u.type=tg(i.type);break}return u}function BL(i,s){i.flags&=Dt,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null;var u=i.alternate;if(u===null)i.childLanes=ce,i.lanes=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null,i.selfBaseDuration=0,i.treeBaseDuration=0;else{i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type;var d=u.dependencies;i.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},i.selfBaseDuration=u.selfBaseDuration,i.treeBaseDuration=u.treeBaseDuration}return i}function HL(i){var s;return i===ua?s=kr|Ln|Mt:i===jl?s=Ln|Mt:s=Yt,Vn&&(s|=Qn),or(_,null,null,s)}function ag(i,s,u,d,p,S){var E=M,R=i;if(typeof i=="function")sg(i)?(E=k,R=eg(R)):R=Eu(R);else if(typeof i=="string")E=P;else e:switch(i){case dt:return Jo(u.children,p,S,s);case zn:E=q,p|=zr;break;case rn:E=q,p|=Mt;break;case Xt:return WL(u,p,S,s);case jt:return VL(u,p,S,s);case Ie:return $L(u,p,S,s);case j:return lg(u,p,S,s);case z:return qL(u,p,S,s);case bt:default:{if(typeof i=="object"&&i!==null)switch(i.$$typeof){case wt:E=B;break e;case ht:E=Q;break e;case Ut:E=J,R=tg(R);break e;case We:E=re;break e;case Qe:E=Re,R=null;break e;case St:E=Te;break e}var D="";{(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var I=d?be(d.type):null;I&&(D+=`
191
191
 
192
- Check the render method of \``+F+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(i==null?i:typeof i)+"."+D)}}var W=or(E,u,s,p);return W.elementType=i,W.type=R,W.lanes=S,W._debugOwner=d,W}function og(i,s,u){var d=null;d=i._owner;var p=i.type,S=i.key,E=i.props,R=ag(p,S,E,d,s,u);return R._debugSource=i._source,R._debugOwner=i._owner,R}function Jo(i,s,u,d){var p=or(I,i,d,s);return p.lanes=u,p}function VL(i,s,u,d){typeof i.id!="string"&&m('Profiler must specify an "id" as a prop');var p=or(re,i,d,s|Yn);return p.elementType=Kt,p.type=Kt,p.lanes=u,p.stateNode={effectDuration:0,passiveEffectDuration:0},p}function WL(i,s,u,d){var p=or($,i,d,s);return p.type=nt,p.elementType=nt,p.lanes=u,p}function $L(i,s,u,d){var p=or(_e,i,d,s);return p.type=Ze,p.elementType=Ze,p.lanes=u,p}function lg(i,s,u,d){var p=or(Ue,i,d,s);return p.type=j,p.elementType=j,p.lanes=u,p}function qL(i,s,u,d){var p=or(dt,i,d,s);return p.type=z,p.elementType=z,p.lanes=u,p}function ug(i,s,u){var d=or(O,i,null,s);return d.lanes=u,d}function YL(){var i=or(k,null,null,$t);return i.elementType="DELETED",i.type="DELETED",i}function cg(i,s,u){var d=i.children!==null?i.children:[],p=or(L,d,i.key,s);return p.lanes=u,p.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},p}function bx(i,s){return i===null&&(i=or(M,null,null,$t)),i.tag=s.tag,i.key=s.key,i.elementType=s.elementType,i.type=s.type,i.stateNode=s.stateNode,i.return=s.return,i.child=s.child,i.sibling=s.sibling,i.index=s.index,i.ref=s.ref,i.pendingProps=s.pendingProps,i.memoizedProps=s.memoizedProps,i.updateQueue=s.updateQueue,i.memoizedState=s.memoizedState,i.dependencies=s.dependencies,i.mode=s.mode,i.flags=s.flags,i.nextEffect=s.nextEffect,i.firstEffect=s.firstEffect,i.lastEffect=s.lastEffect,i.lanes=s.lanes,i.childLanes=s.childLanes,i.alternate=s.alternate,i.actualDuration=s.actualDuration,i.actualStartTime=s.actualStartTime,i.selfBaseDuration=s.selfBaseDuration,i.treeBaseDuration=s.treeBaseDuration,i._debugID=s._debugID,i._debugSource=s._debugSource,i._debugOwner=s._debugOwner,i._debugNeedsRemount=s._debugNeedsRemount,i._debugHookTypes=s._debugHookTypes,i}function QL(i,s,u){switch(this.tag=s,this.containerInfo=i,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=ur,this.context=null,this.pendingContext=null,this.hydrate=u,this.callbackNode=null,this.callbackPriority=Dr,this.eventTimes=po(ue),this.expirationTimes=po(sn),this.pendingLanes=ue,this.suspendedLanes=ue,this.pingedLanes=ue,this.expiredLanes=ue,this.mutableReadLanes=ue,this.finishedLanes=ue,this.entangledLanes=ue,this.entanglements=po(ue),Jt&&(this.mutableSourceEagerHydrationData=null),this.interactionThreadID=v.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map,s){case jl:this._debugRootType="createBlockingRoot()";break;case ua:this._debugRootType="createRoot()";break;case As:this._debugRootType="createLegacyRoot()";break}}function GL(i,s,u,d){var p=new QL(i,s,u),S=HL(s);return p.current=S,S.stateNode=p,cu(S),p}function XL(i,s){var u=s._getVersion,d=u(s._source);i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[s,d]:i.mutableSourceEagerHydrationData.push(s,d)}function KL(i,s,u){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ut,key:d==null?null:""+d,children:i,containerInfo:s,implementation:u}}var fg,dg;fg=!1,dg={};function ZL(i){if(!i)return un;var s=pe(i),u=dc(s);if(s.tag===P){var d=s.type;if(Hn(d))return Ul(s,d,u)}return u}function JL(i){var s=pe(i);if(s===void 0)throw typeof i.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(i));var u=U(s);return u===null?null:u.stateNode}function eP(i,s){{var u=pe(i);if(u===void 0)throw typeof i.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(i));var d=U(u);if(d===null)return null;if(d.mode&Mt){var p=be(u.type)||"Component";if(!dg[p]){dg[p]=!0;var S=Qn;try{xn(d),u.mode&Mt?m("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",s,s,p):m("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",s,s,p)}finally{S?xn(S):In()}}}return d.stateNode}}function tP(i,s,u,d){return GL(i,s,u)}function xx(i,s,u,d){Il(s,i);var p=s.current,S=Yi();typeof jest<"u"&&(OL(p),ox(p));var E=Oa(p),R=ZL(u);s.context===null?s.context=R:s.pendingContext=R,ya&&Qn!==null&&!fg&&(fg=!0,m(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
192
+ Check the render method of \``+I+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(i==null?i:typeof i)+"."+D)}}var V=or(E,u,s,p);return V.elementType=i,V.type=R,V.lanes=S,V._debugOwner=d,V}function og(i,s,u){var d=null;d=i._owner;var p=i.type,S=i.key,E=i.props,R=ag(p,S,E,d,s,u);return R._debugSource=i._source,R._debugOwner=i._owner,R}function Jo(i,s,u,d){var p=or(H,i,d,s);return p.lanes=u,p}function WL(i,s,u,d){typeof i.id!="string"&&m('Profiler must specify an "id" as a prop');var p=or(ie,i,d,s|Qn);return p.elementType=Xt,p.type=Xt,p.lanes=u,p.stateNode={effectDuration:0,passiveEffectDuration:0},p}function VL(i,s,u,d){var p=or($,i,d,s);return p.type=jt,p.elementType=jt,p.lanes=u,p}function $L(i,s,u,d){var p=or(ke,i,d,s);return p.type=Ie,p.elementType=Ie,p.lanes=u,p}function lg(i,s,u,d){var p=or(it,i,d,s);return p.type=j,p.elementType=j,p.lanes=u,p}function qL(i,s,u,d){var p=or(ue,i,d,s);return p.type=z,p.elementType=z,p.lanes=u,p}function ug(i,s,u){var d=or(O,i,null,s);return d.lanes=u,d}function YL(){var i=or(P,null,null,Yt);return i.elementType="DELETED",i.type="DELETED",i}function cg(i,s,u){var d=i.children!==null?i.children:[],p=or(L,d,i.key,s);return p.lanes=u,p.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},p}function bx(i,s){return i===null&&(i=or(M,null,null,Yt)),i.tag=s.tag,i.key=s.key,i.elementType=s.elementType,i.type=s.type,i.stateNode=s.stateNode,i.return=s.return,i.child=s.child,i.sibling=s.sibling,i.index=s.index,i.ref=s.ref,i.pendingProps=s.pendingProps,i.memoizedProps=s.memoizedProps,i.updateQueue=s.updateQueue,i.memoizedState=s.memoizedState,i.dependencies=s.dependencies,i.mode=s.mode,i.flags=s.flags,i.nextEffect=s.nextEffect,i.firstEffect=s.firstEffect,i.lastEffect=s.lastEffect,i.lanes=s.lanes,i.childLanes=s.childLanes,i.alternate=s.alternate,i.actualDuration=s.actualDuration,i.actualStartTime=s.actualStartTime,i.selfBaseDuration=s.selfBaseDuration,i.treeBaseDuration=s.treeBaseDuration,i._debugID=s._debugID,i._debugSource=s._debugSource,i._debugOwner=s._debugOwner,i._debugNeedsRemount=s._debugNeedsRemount,i._debugHookTypes=s._debugHookTypes,i}function QL(i,s,u){switch(this.tag=s,this.containerInfo=i,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=ur,this.context=null,this.pendingContext=null,this.hydrate=u,this.callbackNode=null,this.callbackPriority=Dr,this.eventTimes=po(ce),this.expirationTimes=po(on),this.pendingLanes=ce,this.suspendedLanes=ce,this.pingedLanes=ce,this.expiredLanes=ce,this.mutableReadLanes=ce,this.finishedLanes=ce,this.entangledLanes=ce,this.entanglements=po(ce),en&&(this.mutableSourceEagerHydrationData=null),this.interactionThreadID=v.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map,s){case jl:this._debugRootType="createBlockingRoot()";break;case ua:this._debugRootType="createRoot()";break;case As:this._debugRootType="createLegacyRoot()";break}}function GL(i,s,u,d){var p=new QL(i,s,u),S=HL(s);return p.current=S,S.stateNode=p,cu(S),p}function XL(i,s){var u=s._getVersion,d=u(s._source);i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[s,d]:i.mutableSourceEagerHydrationData.push(s,d)}function KL(i,s,u){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ct,key:d==null?null:""+d,children:i,containerInfo:s,implementation:u}}var fg,dg;fg=!1,dg={};function ZL(i){if(!i)return fn;var s=se(i),u=dc(s);if(s.tag===k){var d=s.type;if(Wn(d))return Ul(s,d,u)}return u}function JL(i){var s=se(i);if(s===void 0)throw typeof i.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(i));var u=U(s);return u===null?null:u.stateNode}function eP(i,s){{var u=se(i);if(u===void 0)throw typeof i.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(i));var d=U(u);if(d===null)return null;if(d.mode&Mt){var p=be(u.type)||"Component";if(!dg[p]){dg[p]=!0;var S=Gn;try{xn(d),u.mode&Mt?m("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",s,s,p):m("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",s,s,p)}finally{S?xn(S):Fn()}}}return d.stateNode}}function tP(i,s,u,d){return GL(i,s,u)}function xx(i,s,u,d){Il(s,i);var p=s.current,S=Qi();typeof jest<"u"&&(OL(p),ox(p));var E=Oa(p),R=ZL(u);s.context===null?s.context=R:s.pendingContext=R,ya&&Gn!==null&&!fg&&(fg=!0,m(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
193
193
 
194
- Check the render method of %s.`,be(Qn.type)||"Unknown"));var D=as(S,E);return D.payload={element:i},d=d===void 0?null:d,d!==null&&(typeof d!="function"&&m("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",d),D.callback=d),os(p,D),ai(p,E,S),E}function nP(i){var s=i.current;if(!s.child)return null;switch(s.child.tag){case k:return Qe(s.child.stateNode);default:return s.child.stateNode}}function iP(i){switch(i.tag){case _:var s=i.stateNode;if(s.hydrate){var u=Gl(s);$D(s,u)}break;case $:var d=Yi();Bh(function(){return ai(i,Tt,d)});var p=Vl;Qh(i,p);break}}function Ex(i,s){var u=i.memoizedState;u!==null&&u.dehydrated!==null&&(u.retryLane=jd(u.retryLane,s))}function Qh(i,s){Ex(i,s);var u=i.alternate;u&&Ex(u,s)}function rP(i){if(i.tag===$){var s=Yi(),u=Vl;ai(i,u,s),Qh(i,u)}}function sP(i){if(i.tag===$){var s=Yi(),u=lo;ai(i,u,s),Qh(i,u)}}function aP(i){if(i.tag===$){var s=Yi(),u=Oa(i);ai(i,u,s),Qh(i,u)}}function oP(i,s){var u=bc();try{return xc(i),s()}finally{xc(u)}}function lP(i){var s=de(i);return s===null?null:s.tag===Ye?s.stateNode.instance:s.stateNode}var wx=function(i){return!1};function Tx(i){return wx(i)}var Cx=null,Rx=null,Ax=null,Mx=null,Ox=null,Dx=null,Lx=null,Px=null;{var kx=function(i,s,u){var d=s[u],p=Array.isArray(i)?i.slice():c({},i);return u+1===s.length?(Array.isArray(p)?p.splice(d,1):delete p[d],p):(p[d]=kx(i[d],s,u+1),p)},zx=function(i,s){return kx(i,s,0)},Nx=function(i,s,u,d){var p=s[d],S=Array.isArray(i)?i.slice():c({},i);if(d+1===s.length){var E=u[d];S[E]=S[p],Array.isArray(S)?S.splice(p,1):delete S[p]}else S[p]=Nx(i[p],s,u,d+1);return S},_x=function(i,s,u){if(s.length!==u.length){x("copyWithRename() expects paths of the same length");return}else for(var d=0;d<u.length-1;d++)if(s[d]!==u[d]){x("copyWithRename() expects paths to be the same except for the deepest key");return}return Nx(i,s,u,0)},Ux=function(i,s,u,d){if(u>=s.length)return d;var p=s[u],S=Array.isArray(i)?i.slice():c({},i);return S[p]=Ux(i[p],s,u+1,d),S},jx=function(i,s,u){return Ux(i,s,0,u)},hg=function(i,s){for(var u=i.memoizedState;u!==null&&s>0;)u=u.next,s--;return u};Cx=function(i,s,u,d){var p=hg(i,s);if(p!==null){var S=jx(p.memoizedState,u,d);p.memoizedState=S,p.baseState=S,i.memoizedProps=c({},i.memoizedProps),ai(i,Tt,sn)}},Rx=function(i,s,u){var d=hg(i,s);if(d!==null){var p=zx(d.memoizedState,u);d.memoizedState=p,d.baseState=p,i.memoizedProps=c({},i.memoizedProps),ai(i,Tt,sn)}},Ax=function(i,s,u,d){var p=hg(i,s);if(p!==null){var S=_x(p.memoizedState,u,d);p.memoizedState=S,p.baseState=S,i.memoizedProps=c({},i.memoizedProps),ai(i,Tt,sn)}},Mx=function(i,s,u){i.pendingProps=jx(i.memoizedProps,s,u),i.alternate&&(i.alternate.pendingProps=i.pendingProps),ai(i,Tt,sn)},Ox=function(i,s){i.pendingProps=zx(i.memoizedProps,s),i.alternate&&(i.alternate.pendingProps=i.pendingProps),ai(i,Tt,sn)},Dx=function(i,s,u){i.pendingProps=_x(i.memoizedProps,s,u),i.alternate&&(i.alternate.pendingProps=i.pendingProps),ai(i,Tt,sn)},Lx=function(i){ai(i,Tt,sn)},Px=function(i){wx=i}}function uP(i){var s=U(i);return s===null?null:s.stateNode}function cP(i){return null}function fP(){return Qn}function dP(i){var s=i.findFiberByHostInstance,u=g.ReactCurrentDispatcher;return _n({bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:Cx,overrideHookStateDeletePath:Rx,overrideHookStateRenamePath:Ax,overrideProps:Mx,overridePropsDeletePath:Ox,overridePropsRenamePath:Dx,setSuspenseHandler:Px,scheduleUpdate:Lx,currentDispatcherRef:u,findHostInstanceByFiber:uP,findFiberByHostInstance:s||cP,findHostInstancesForRefresh:zL,scheduleRefresh:PL,scheduleRoot:kL,setRefreshHandler:LL,getCurrentFiber:fP})}return r.IsThisRendererActing=Xo,r.act=DL,r.attemptContinuousHydration=sP,r.attemptHydrationAtCurrentPriority=aP,r.attemptSynchronousHydration=iP,r.attemptUserBlockingHydration=rP,r.batchedEventUpdates=GD,r.batchedUpdates=Kb,r.createComponentSelector=CD,r.createContainer=tP,r.createHasPsuedoClassSelector=RD,r.createPortal=KL,r.createRoleSelector=AD,r.createTestNameSelector=OD,r.createTextSelector=MD,r.deferredUpdates=YD,r.discreteUpdates=XD,r.findAllNodes=Ah,r.findBoundingRects=PD,r.findHostInstance=JL,r.findHostInstanceWithNoPortals=lP,r.findHostInstanceWithWarning=eP,r.flushControlled=ZD,r.flushDiscreteUpdates=qD,r.flushPassiveEffects=Fr,r.flushSync=Bh,r.focusWithin=kD,r.getCurrentUpdateLanePriority=bc,r.getFindAllNodesFailureDescription=LD,r.getPublicRootInstance=nP,r.injectIntoDevTools=dP,r.observeVisibleRects=ND,r.registerMutableSourceForHydration=XL,r.runWithPriority=oP,r.shouldSuspend=Tx,r.unbatchedUpdates=KD,r.updateContainer=xx,r})}(ff)),ff.exports}var pf={exports:{}};/** @license React v0.26.2
194
+ Check the render method of %s.`,be(Gn.type)||"Unknown"));var D=as(S,E);return D.payload={element:i},d=d===void 0?null:d,d!==null&&(typeof d!="function"&&m("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",d),D.callback=d),os(p,D),oi(p,E,S),E}function nP(i){var s=i.current;if(!s.child)return null;switch(s.child.tag){case P:return Ke(s.child.stateNode);default:return s.child.stateNode}}function iP(i){switch(i.tag){case _:var s=i.stateNode;if(s.hydrate){var u=Gl(s);$D(s,u)}break;case $:var d=Qi();Bh(function(){return oi(i,Tt,d)});var p=Wl;Qh(i,p);break}}function Ex(i,s){var u=i.memoizedState;u!==null&&u.dehydrated!==null&&(u.retryLane=jd(u.retryLane,s))}function Qh(i,s){Ex(i,s);var u=i.alternate;u&&Ex(u,s)}function rP(i){if(i.tag===$){var s=Qi(),u=Wl;oi(i,u,s),Qh(i,u)}}function sP(i){if(i.tag===$){var s=Qi(),u=lo;oi(i,u,s),Qh(i,u)}}function aP(i){if(i.tag===$){var s=Qi(),u=Oa(i);oi(i,u,s),Qh(i,u)}}function oP(i,s){var u=bc();try{return xc(i),s()}finally{xc(u)}}function lP(i){var s=he(i);return s===null?null:s.tag===Xe?s.stateNode.instance:s.stateNode}var wx=function(i){return!1};function Tx(i){return wx(i)}var Cx=null,Rx=null,Ax=null,Mx=null,Ox=null,Dx=null,Lx=null,Px=null;{var kx=function(i,s,u){var d=s[u],p=Array.isArray(i)?i.slice():c({},i);return u+1===s.length?(Array.isArray(p)?p.splice(d,1):delete p[d],p):(p[d]=kx(i[d],s,u+1),p)},zx=function(i,s){return kx(i,s,0)},Nx=function(i,s,u,d){var p=s[d],S=Array.isArray(i)?i.slice():c({},i);if(d+1===s.length){var E=u[d];S[E]=S[p],Array.isArray(S)?S.splice(p,1):delete S[p]}else S[p]=Nx(i[p],s,u,d+1);return S},_x=function(i,s,u){if(s.length!==u.length){x("copyWithRename() expects paths of the same length");return}else for(var d=0;d<u.length-1;d++)if(s[d]!==u[d]){x("copyWithRename() expects paths to be the same except for the deepest key");return}return Nx(i,s,u,0)},Ux=function(i,s,u,d){if(u>=s.length)return d;var p=s[u],S=Array.isArray(i)?i.slice():c({},i);return S[p]=Ux(i[p],s,u+1,d),S},jx=function(i,s,u){return Ux(i,s,0,u)},hg=function(i,s){for(var u=i.memoizedState;u!==null&&s>0;)u=u.next,s--;return u};Cx=function(i,s,u,d){var p=hg(i,s);if(p!==null){var S=jx(p.memoizedState,u,d);p.memoizedState=S,p.baseState=S,i.memoizedProps=c({},i.memoizedProps),oi(i,Tt,on)}},Rx=function(i,s,u){var d=hg(i,s);if(d!==null){var p=zx(d.memoizedState,u);d.memoizedState=p,d.baseState=p,i.memoizedProps=c({},i.memoizedProps),oi(i,Tt,on)}},Ax=function(i,s,u,d){var p=hg(i,s);if(p!==null){var S=_x(p.memoizedState,u,d);p.memoizedState=S,p.baseState=S,i.memoizedProps=c({},i.memoizedProps),oi(i,Tt,on)}},Mx=function(i,s,u){i.pendingProps=jx(i.memoizedProps,s,u),i.alternate&&(i.alternate.pendingProps=i.pendingProps),oi(i,Tt,on)},Ox=function(i,s){i.pendingProps=zx(i.memoizedProps,s),i.alternate&&(i.alternate.pendingProps=i.pendingProps),oi(i,Tt,on)},Dx=function(i,s,u){i.pendingProps=_x(i.memoizedProps,s,u),i.alternate&&(i.alternate.pendingProps=i.pendingProps),oi(i,Tt,on)},Lx=function(i){oi(i,Tt,on)},Px=function(i){wx=i}}function uP(i){var s=U(i);return s===null?null:s.stateNode}function cP(i){return null}function fP(){return Gn}function dP(i){var s=i.findFiberByHostInstance,u=g.ReactCurrentDispatcher;return Un({bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:Cx,overrideHookStateDeletePath:Rx,overrideHookStateRenamePath:Ax,overrideProps:Mx,overridePropsDeletePath:Ox,overridePropsRenamePath:Dx,setSuspenseHandler:Px,scheduleUpdate:Lx,currentDispatcherRef:u,findHostInstanceByFiber:uP,findFiberByHostInstance:s||cP,findHostInstancesForRefresh:zL,scheduleRefresh:PL,scheduleRoot:kL,setRefreshHandler:LL,getCurrentFiber:fP})}return r.IsThisRendererActing=Xo,r.act=DL,r.attemptContinuousHydration=sP,r.attemptHydrationAtCurrentPriority=aP,r.attemptSynchronousHydration=iP,r.attemptUserBlockingHydration=rP,r.batchedEventUpdates=GD,r.batchedUpdates=Kb,r.createComponentSelector=CD,r.createContainer=tP,r.createHasPsuedoClassSelector=RD,r.createPortal=KL,r.createRoleSelector=AD,r.createTestNameSelector=OD,r.createTextSelector=MD,r.deferredUpdates=YD,r.discreteUpdates=XD,r.findAllNodes=Ah,r.findBoundingRects=PD,r.findHostInstance=JL,r.findHostInstanceWithNoPortals=lP,r.findHostInstanceWithWarning=eP,r.flushControlled=ZD,r.flushDiscreteUpdates=qD,r.flushPassiveEffects=Fr,r.flushSync=Bh,r.focusWithin=kD,r.getCurrentUpdateLanePriority=bc,r.getFindAllNodesFailureDescription=LD,r.getPublicRootInstance=nP,r.injectIntoDevTools=dP,r.observeVisibleRects=ND,r.registerMutableSourceForHydration=XL,r.runWithPriority=oP,r.shouldSuspend=Tx,r.unbatchedUpdates=KD,r.updateContainer=xx,r})}(ff)),ff.exports}var pf={exports:{}};/** @license React v0.26.2
195
195
  * react-reconciler.production.min.js
196
196
  *
197
197
  * Copyright (c) Facebook, Inc. and its affiliates.
198
198
  *
199
199
  * This source code is licensed under the MIT license found in the
200
200
  * LICENSE file in the root directory of this source tree.
201
- */pf.exports;var Mg;function Xx(){return Mg||(Mg=1,function(t){t.exports=function(n){var r={},o=Sg(),c=C,h=wg();function v(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,m=60106,w=60107,A=60108,P=60114,M=60109,_=60110,L=60112,k=60113,O=60120,I=60115,q=60116,te=60121,H=60129,J=60130,re=60131;if(typeof Symbol=="function"&&Symbol.for){var $=Symbol.for;x=$("react.element"),m=$("react.portal"),w=$("react.fragment"),A=$("react.strict_mode"),P=$("react.profiler"),M=$("react.provider"),_=$("react.context"),L=$("react.forward_ref"),k=$("react.suspense"),O=$("react.suspense_list"),I=$("react.memo"),q=$("react.lazy"),te=$("react.block"),$("react.scope"),H=$("react.debug_trace_mode"),J=$("react.offscreen"),re=$("react.legacy_hidden")}var se=typeof Symbol=="function"&&Symbol.iterator;function ge(a){return a===null||typeof a!="object"?null:(a=se&&a[se]||a["@@iterator"],typeof a=="function"?a:null)}function Ce(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case m:return"Portal";case P:return"Profiler";case A:return"StrictMode";case k:return"Suspense";case O:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case _:return(a.displayName||"Context")+".Consumer";case M:return(a._context.displayName||"Context")+".Provider";case L:var l=a.render;return l=l.displayName||l.name||"",a.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case I:return Ce(a.type);case te:return Ce(a._render);case q:l=a._payload,a=a._init;try{return Ce(a(l))}catch{}}return null}function me(a){var l=a,f=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,l.flags&1026&&(f=l.return),a=l.return;while(a)}return l.tag===3?f:null}function Ie(a){if(me(a)!==a)throw Error(v(188))}function _e(a){var l=a.alternate;if(!l){if(l=me(a),l===null)throw Error(v(188));return l!==a?null:a}for(var f=a,y=l;;){var b=f.return;if(b===null)break;var T=b.alternate;if(T===null){if(y=b.return,y!==null){f=y;continue}break}if(b.child===T.child){for(T=b.child;T;){if(T===f)return Ie(b),a;if(T===y)return Ie(b),l;T=T.sibling}throw Error(v(188))}if(f.return!==y.return)f=b,y=T;else{for(var N=!1,B=b.child;B;){if(B===f){N=!0,f=b,y=T;break}if(B===y){N=!0,y=b,f=T;break}B=B.sibling}if(!N){for(B=T.child;B;){if(B===f){N=!0,f=T,y=b;break}if(B===y){N=!0,y=T,f=b;break}B=B.sibling}if(!N)throw Error(v(189))}}if(f.alternate!==y)throw Error(v(190))}if(f.tag!==3)throw Error(v(188));return f.stateNode.current===f?a:l}function Ye(a){if(a=_e(a),!a)return null;for(var l=a;;){if(l.tag===5||l.tag===6)return l;if(l.child)l.child.return=l,l=l.child;else{if(l===a)break;for(;!l.sibling;){if(!l.return||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}}return null}function gt(a){if(a=_e(a),!a)return null;for(var l=a;;){if(l.tag===5||l.tag===6)return l;if(l.child&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break;for(;!l.sibling;){if(!l.return||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}}return null}function Z(a,l){for(var f=a.alternate;l!==null;){if(l===a||l===f)return!0;l=l.return}return!1}var Ue=n.getPublicInstance,dt=n.getRootHostContext,pe=n.getChildHostContext,je=n.prepareForCommit,He=n.resetAfterCommit,ut=n.createInstance,pt=n.appendInitialChild,vn=n.finalizeInitialChildren,Kt=n.prepareUpdate,xt=n.shouldSetTextContent,ct=n.createTextInstance,Ge=n.scheduleTimeout,nt=n.cancelTimeout,Ze=n.noTimeout,ht=n.isPrimaryRenderer,ft=n.supportsMutation,mn=n.supportsPersistence,Qt=n.supportsHydration,Gi=n.getInstanceFromNode,j=n.makeOpaqueHydratingObject,z=n.makeClientId,G=n.beforeActiveInstanceBlur,Se=n.afterActiveInstanceBlur,st=n.preparePortalMount,Ve=n.supportsTestSelectors,gn=n.findFiberRoot,ki=n.getBoundingRect,be=n.getTextContent,at=n.isHiddenSubtree,ui=n.matchAccessibilityRole,Dt=n.setFocusIfFocusable,et=n.setupIntersectionObserver,Te=n.appendChild,Pe=n.appendChildToContainer,rt=n.commitTextUpdate,Lt=n.commitMount,tt=n.commitUpdate,an=n.insertBefore,Zt=n.insertInContainerBefore,Fn=n.removeChild,nn=n.removeChildFromContainer,bi=n.resetTextContent,qr=n.hideInstance,Ha=n.hideTextInstance,Va=n.unhideInstance,Yr=n.unhideTextInstance,xi=n.clearContainer,ia=n.cloneInstance,Wa=n.createContainerChildSet,ws=n.appendChildToContainerChildSet,Xi=n.finalizeContainerChildren,vl=n.replaceContainerChildren,ml=n.cloneHiddenInstance,Qr=n.cloneHiddenTextInstance,Ju=n.canHydrateInstance,ec=n.canHydrateTextInstance,gl=n.isSuspenseInstancePending,yl=n.isSuspenseInstanceFallback,U=n.getNextHydratableSibling,de=n.getFirstHydratableChild,we=n.hydrateInstance,Qe=n.hydrateTextInstance,Et=n.getNextHydratableInstanceAfterSuspenseInstance,At=n.commitHydratedContainer,vt=n.commitHydratedSuspenseInstance,ot;function yn(a){if(ot===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);ot=l&&l[1]||""}return`
202
- `+ot+a}var Ut=!1;function Ht(a,l){if(!a||Ut)return"";Ut=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(ne){var y=ne}Reflect.construct(a,[],l)}else{try{l.call()}catch(ne){y=ne}a.call(l.prototype)}else{try{throw Error()}catch(ne){y=ne}a()}}catch(ne){if(ne&&y&&typeof ne.stack=="string"){for(var b=ne.stack.split(`
201
+ */pf.exports;var Mg;function Xx(){return Mg||(Mg=1,function(t){t.exports=function(n){var r={},o=Sg(),c=C,h=wg();function v(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,m=60106,w=60107,A=60108,k=60114,M=60109,_=60110,L=60112,P=60113,O=60120,H=60115,q=60116,Q=60121,B=60129,J=60130,ie=60131;if(typeof Symbol=="function"&&Symbol.for){var $=Symbol.for;x=$("react.element"),m=$("react.portal"),w=$("react.fragment"),A=$("react.strict_mode"),k=$("react.profiler"),M=$("react.provider"),_=$("react.context"),L=$("react.forward_ref"),P=$("react.suspense"),O=$("react.suspense_list"),H=$("react.memo"),q=$("react.lazy"),Q=$("react.block"),$("react.scope"),B=$("react.debug_trace_mode"),J=$("react.offscreen"),ie=$("react.legacy_hidden")}var re=typeof Symbol=="function"&&Symbol.iterator;function me(a){return a===null||typeof a!="object"?null:(a=re&&a[re]||a["@@iterator"],typeof a=="function"?a:null)}function Re(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case m:return"Portal";case k:return"Profiler";case A:return"StrictMode";case P:return"Suspense";case O:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case _:return(a.displayName||"Context")+".Consumer";case M:return(a._context.displayName||"Context")+".Provider";case L:var l=a.render;return l=l.displayName||l.name||"",a.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case H:return Re(a.type);case Q:return Re(a._render);case q:l=a._payload,a=a._init;try{return Re(a(l))}catch{}}return null}function Se(a){var l=a,f=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,l.flags&1026&&(f=l.return),a=l.return;while(a)}return l.tag===3?f:null}function Fe(a){if(Se(a)!==a)throw Error(v(188))}function ke(a){var l=a.alternate;if(!l){if(l=Se(a),l===null)throw Error(v(188));return l!==a?null:a}for(var f=a,y=l;;){var b=f.return;if(b===null)break;var T=b.alternate;if(T===null){if(y=b.return,y!==null){f=y;continue}break}if(b.child===T.child){for(T=b.child;T;){if(T===f)return Fe(b),a;if(T===y)return Fe(b),l;T=T.sibling}throw Error(v(188))}if(f.return!==y.return)f=b,y=T;else{for(var N=!1,F=b.child;F;){if(F===f){N=!0,f=b,y=T;break}if(F===y){N=!0,y=b,f=T;break}F=F.sibling}if(!N){for(F=T.child;F;){if(F===f){N=!0,f=T,y=b;break}if(F===y){N=!0,y=T,f=b;break}F=F.sibling}if(!N)throw Error(v(189))}}if(f.alternate!==y)throw Error(v(190))}if(f.tag!==3)throw Error(v(188));return f.stateNode.current===f?a:l}function Xe(a){if(a=ke(a),!a)return null;for(var l=a;;){if(l.tag===5||l.tag===6)return l;if(l.child)l.child.return=l,l=l.child;else{if(l===a)break;for(;!l.sibling;){if(!l.return||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}}return null}function ft(a){if(a=ke(a),!a)return null;for(var l=a;;){if(l.tag===5||l.tag===6)return l;if(l.child&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break;for(;!l.sibling;){if(!l.return||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}}return null}function Te(a,l){for(var f=a.alternate;l!==null;){if(l===a||l===f)return!0;l=l.return}return!1}var it=n.getPublicInstance,ue=n.getRootHostContext,se=n.getChildHostContext,je=n.prepareForCommit,qe=n.resetAfterCommit,ct=n.createInstance,dt=n.appendInitialChild,rn=n.finalizeInitialChildren,Xt=n.prepareUpdate,wt=n.shouldSetTextContent,ht=n.createTextInstance,Ut=n.scheduleTimeout,jt=n.cancelTimeout,Ie=n.noTimeout,We=n.isPrimaryRenderer,Qe=n.supportsMutation,St=n.supportsPersistence,bt=n.supportsHydration,zn=n.getInstanceFromNode,j=n.makeOpaqueHydratingObject,z=n.makeClientId,X=n.beforeActiveInstanceBlur,ye=n.afterActiveInstanceBlur,at=n.preparePortalMount,Ve=n.supportsTestSelectors,gn=n.findFiberRoot,zi=n.getBoundingRect,be=n.getTextContent,ot=n.isHiddenSubtree,ci=n.matchAccessibilityRole,Dt=n.setFocusIfFocusable,tt=n.setupIntersectionObserver,Ce=n.appendChild,ze=n.appendChildToContainer,st=n.commitTextUpdate,Lt=n.commitMount,nt=n.commitUpdate,ln=n.insertBefore,Jt=n.insertInContainerBefore,Bn=n.removeChild,sn=n.removeChildFromContainer,xi=n.resetTextContent,qr=n.hideInstance,Ha=n.hideTextInstance,Wa=n.unhideInstance,Yr=n.unhideTextInstance,Ei=n.clearContainer,ia=n.cloneInstance,Va=n.createContainerChildSet,ws=n.appendChildToContainerChildSet,Xi=n.finalizeContainerChildren,vl=n.replaceContainerChildren,ml=n.cloneHiddenInstance,Qr=n.cloneHiddenTextInstance,Ju=n.canHydrateInstance,ec=n.canHydrateTextInstance,gl=n.isSuspenseInstancePending,yl=n.isSuspenseInstanceFallback,U=n.getNextHydratableSibling,he=n.getFirstHydratableChild,we=n.hydrateInstance,Ke=n.hydrateTextInstance,xt=n.getNextHydratableInstanceAfterSuspenseInstance,At=n.commitHydratedContainer,pt=n.commitHydratedSuspenseInstance,lt;function yn(a){if(lt===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);lt=l&&l[1]||""}return`
202
+ `+lt+a}var It=!1;function Vt(a,l){if(!a||It)return"";It=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(te){var y=te}Reflect.construct(a,[],l)}else{try{l.call()}catch(te){y=te}a.call(l.prototype)}else{try{throw Error()}catch(te){y=te}a()}}catch(te){if(te&&y&&typeof te.stack=="string"){for(var b=te.stack.split(`
203
203
  `),T=y.stack.split(`
204
- `),N=b.length-1,B=T.length-1;1<=N&&0<=B&&b[N]!==T[B];)B--;for(;1<=N&&0<=B;N--,B--)if(b[N]!==T[B]){if(N!==1||B!==1)do if(N--,B--,0>B||b[N]!==T[B])return`
205
- `+b[N].replace(" at new "," at ");while(1<=N&&0<=B);break}}}finally{Ut=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?yn(a):""}var zn=[],Zn=-1;function zi(a){return{current:a}}function mt(a){0>Zn||(a.current=zn[Zn],zn[Zn]=null,Zn--)}function on(a,l){Zn++,zn[Zn]=a.current,a.current=l}var ur={},ln=zi(ur),Bn=zi(!1),Nn=ur;function cr(a,l){var f=a.type.contextTypes;if(!f)return ur;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===l)return y.__reactInternalMemoizedMaskedChildContext;var b={},T;for(T in f)b[T]=l[T];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=b),b}function Jt(a){return a=a.childContextTypes,a!=null}function Sl(){mt(Bn),mt(ln)}function Sd(a,l,f){if(ln.current!==ur)throw Error(v(168));on(ln,l),on(Bn,f)}function bd(a,l,f){var y=a.stateNode;if(a=l.childContextTypes,typeof y.getChildContext!="function")return f;y=y.getChildContext();for(var b in y)if(!(b in a))throw Error(v(108,Ce(l)||"Unknown",b));return o({},f,y)}function $a(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||ur,Nn=ln.current,on(ln,a),on(Bn,Bn.current),!0}function xd(a,l,f){var y=a.stateNode;if(!y)throw Error(v(169));f?(a=bd(a,l,Nn),y.__reactInternalMemoizedMergedChildContext=a,mt(Bn),mt(ln),on(ln,a)):mt(Bn),on(Bn,f)}var tc=null,Ni=null,ov=h.unstable_now;ov();var bl=0,Vt=8;function Ki(a){if(1&a)return Vt=15,1;if(2&a)return Vt=14,2;if(4&a)return Vt=13,4;var l=24&a;return l!==0?(Vt=12,l):a&32?(Vt=11,32):(l=192&a,l!==0?(Vt=10,l):a&256?(Vt=9,256):(l=3584&a,l!==0?(Vt=8,l):a&4096?(Vt=7,4096):(l=4186112&a,l!==0?(Vt=6,l):(l=62914560&a,l!==0?(Vt=5,l):a&67108864?(Vt=4,67108864):a&134217728?(Vt=3,134217728):(l=805306368&a,l!==0?(Vt=2,l):1073741824&a?(Vt=1,1073741824):(Vt=8,a))))))}function lv(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function uv(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(v(358,a))}}function qa(a,l){var f=a.pendingLanes;if(f===0)return Vt=0;var y=0,b=0,T=a.expiredLanes,N=a.suspendedLanes,B=a.pingedLanes;if(T!==0)y=T,b=Vt=15;else if(T=f&134217727,T!==0){var ne=T&~N;ne!==0?(y=Ki(ne),b=Vt):(B&=T,B!==0&&(y=Ki(B),b=Vt))}else T=f&~N,T!==0?(y=Ki(T),b=Vt):B!==0&&(y=Ki(B),b=Vt);if(y===0)return 0;if(y=31-Gr(y),y=f&((0>y?0:1<<y)<<1)-1,l!==0&&l!==y&&!(l&N)){if(Ki(l),b<=Vt)return l;Vt=b}if(l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=y;0<l;)f=31-Gr(l),b=1<<f,y|=a[f],l&=~b;return y}function Ed(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function xl(a,l){switch(a){case 15:return 1;case 14:return 2;case 12:return a=ra(24&~l),a===0?xl(10,l):a;case 10:return a=ra(192&~l),a===0?xl(8,l):a;case 8:return a=ra(3584&~l),a===0&&(a=ra(4186112&~l),a===0&&(a=512)),a;case 2:return l=ra(805306368&~l),l===0&&(l=268435456),l}throw Error(v(358,a))}function ra(a){return a&-a}function nc(a){for(var l=[],f=0;31>f;f++)l.push(a);return l}function El(a,l,f){a.pendingLanes|=l;var y=l-1;a.suspendedLanes&=y,a.pingedLanes&=y,a=a.eventTimes,l=31-Gr(l),a[l]=f}var Gr=Math.clz32?Math.clz32:dv,cv=Math.log,fv=Math.LN2;function dv(a){return a===0?32:31-(cv(a)/fv|0)|0}var wd=h.unstable_runWithPriority,ic=h.unstable_scheduleCallback,rc=h.unstable_cancelCallback,hv=h.unstable_shouldYield,Td=h.unstable_requestPaint,Ya=h.unstable_now,pv=h.unstable_getCurrentPriorityLevel,Qa=h.unstable_ImmediatePriority,sc=h.unstable_UserBlockingPriority,Cd=h.unstable_NormalPriority,ac=h.unstable_LowPriority,oc=h.unstable_IdlePriority,wl={},vv=Td!==void 0?Td:function(){},Tr=null,Tl=null,lc=!1,Cl=Ya(),On=1e4>Cl?Ya:function(){return Ya()-Cl};function sa(){switch(pv()){case Qa:return 99;case sc:return 98;case Cd:return 97;case ac:return 96;case oc:return 95;default:throw Error(v(332))}}function Rd(a){switch(a){case 99:return Qa;case 98:return sc;case 97:return Cd;case 96:return ac;case 95:return oc;default:throw Error(v(332))}}function Cr(a,l){return a=Rd(a),wd(a,l)}function aa(a,l,f){return a=Rd(a),ic(a,l,f)}function _i(){if(Tl!==null){var a=Tl;Tl=null,rc(a)}Ad()}function Ad(){if(!lc&&Tr!==null){lc=!0;var a=0;try{var l=Tr;Cr(99,function(){for(;a<l.length;a++){var f=l[a];do f=f(!0);while(f!==null)}}),Tr=null}catch(f){throw Tr!==null&&(Tr=Tr.slice(a+1)),ic(Qa,_i),f}finally{lc=!1}}}var mv=g.ReactCurrentBatchConfig;function gv(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var Ui=typeof Object.is=="function"?Object.is:gv,yv=Object.prototype.hasOwnProperty;function Rl(a,l){if(Ui(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var f=Object.keys(a),y=Object.keys(l);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++)if(!yv.call(l,f[y])||!Ui(a[f[y]],l[f[y]]))return!1;return!0}function Sv(a){switch(a.tag){case 5:return yn(a.type);case 16:return yn("Lazy");case 13:return yn("Suspense");case 19:return yn("SuspenseList");case 0:case 2:case 15:return a=Ht(a.type,!1),a;case 11:return a=Ht(a.type.render,!1),a;case 22:return a=Ht(a.type._render,!1),a;case 1:return a=Ht(a.type,!0),a;default:return""}}function Zi(a,l){if(a&&a.defaultProps){l=o({},l),a=a.defaultProps;for(var f in a)l[f]===void 0&&(l[f]=a[f]);return l}return l}var Al=zi(null),Ml=null,fr=null,Ga=null;function Ol(){Ga=fr=Ml=null}function uc(a,l){a=a.type._context,ht?(on(Al,a._currentValue),a._currentValue=l):(on(Al,a._currentValue2),a._currentValue2=l)}function Dl(a){var l=Al.current;mt(Al),a=a.type._context,ht?a._currentValue=l:a._currentValue2=l}function cc(a,l){for(;a!==null;){var f=a.alternate;if((a.childLanes&l)===l){if(f===null||(f.childLanes&l)===l)break;f.childLanes|=l}else a.childLanes|=l,f!==null&&(f.childLanes|=l);a=a.return}}function Ts(a,l){Ml=a,Ga=fr=null,a=a.dependencies,a!==null&&a.firstContext!==null&&(a.lanes&l&&(Bi=!0),a.firstContext=null)}function Ei(a,l){if(Ga!==a&&l!==!1&&l!==0)if((typeof l!="number"||l===1073741823)&&(Ga=a,l=1073741823),l={context:a,observedBits:l,next:null},fr===null){if(Ml===null)throw Error(v(308));fr=l,Ml.dependencies={lanes:0,firstContext:l,responders:null}}else fr=fr.next=l;return ht?a._currentValue:a._currentValue2}var Rr=!1;function ji(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Ji(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function dr(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function hr(a,l){if(a=a.updateQueue,a!==null){a=a.shared;var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}}function Ar(a,l){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var b=null,T=null;if(f=f.firstBaseUpdate,f!==null){do{var N={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};T===null?b=T=N:T=T.next=N,f=f.next}while(f!==null);T===null?b=T=l:T=T.next=l}else b=T=l;f={baseState:y.baseState,firstBaseUpdate:b,lastBaseUpdate:T,shared:y.shared,effects:y.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=l:a.next=l,f.lastBaseUpdate=l}function Cs(a,l,f,y){var b=a.updateQueue;Rr=!1;var T=b.firstBaseUpdate,N=b.lastBaseUpdate,B=b.shared.pending;if(B!==null){b.shared.pending=null;var ne=B,xe=ne.next;ne.next=null,N===null?T=xe:N.next=xe,N=ne;var Fe=a.alternate;if(Fe!==null){Fe=Fe.updateQueue;var Ke=Fe.lastBaseUpdate;Ke!==N&&(Ke===null?Fe.firstBaseUpdate=xe:Ke.next=xe,Fe.lastBaseUpdate=ne)}}if(T!==null){Ke=b.baseState,N=0,Fe=xe=ne=null;do{B=T.lane;var Ae=T.eventTime;if((y&B)===B){Fe!==null&&(Fe=Fe.next={eventTime:Ae,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var Pt=a,qt=T;switch(B=l,Ae=f,qt.tag){case 1:if(Pt=qt.payload,typeof Pt=="function"){Ke=Pt.call(Ae,Ke,B);break e}Ke=Pt;break e;case 3:Pt.flags=Pt.flags&-4097|64;case 0:if(Pt=qt.payload,B=typeof Pt=="function"?Pt.call(Ae,Ke,B):Pt,B==null)break e;Ke=o({},Ke,B);break e;case 2:Rr=!0}}T.callback!==null&&(a.flags|=32,B=b.effects,B===null?b.effects=[T]:B.push(T))}else Ae={eventTime:Ae,lane:B,tag:T.tag,payload:T.payload,callback:T.callback,next:null},Fe===null?(xe=Fe=Ae,ne=Ke):Fe=Fe.next=Ae,N|=B;if(T=T.next,T===null){if(B=b.shared.pending,B===null)break;T=B.next,B.next=null,b.lastBaseUpdate=B,b.shared.pending=null}}while(!0);Fe===null&&(ne=Ke),b.baseState=ne,b.firstBaseUpdate=xe,b.lastBaseUpdate=Fe,xo|=N,a.lanes=N,a.memoizedState=Ke}}function Xa(a,l,f){if(a=l.effects,l.effects=null,a!==null)for(l=0;l<a.length;l++){var y=a[l],b=y.callback;if(b!==null){if(y.callback=null,y=f,typeof b!="function")throw Error(v(191,b));b.call(y)}}}var Md=new c.Component().refs;function oa(a,l,f,y){l=a.memoizedState,f=f(y,l),f=f==null?l:o({},l,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Ll={isMounted:function(a){return(a=a._reactInternals)?me(a)===a:!1},enqueueSetState:function(a,l,f){a=a._reactInternals;var y=pi(),b=Cn(a),T=dr(y,b);T.payload=l,f!=null&&(T.callback=f),hr(a,T),Nr(a,b,y)},enqueueReplaceState:function(a,l,f){a=a._reactInternals;var y=pi(),b=Cn(a),T=dr(y,b);T.tag=1,T.payload=l,f!=null&&(T.callback=f),hr(a,T),Nr(a,b,y)},enqueueForceUpdate:function(a,l){a=a._reactInternals;var f=pi(),y=Cn(a),b=dr(f,y);b.tag=2,l!=null&&(b.callback=l),hr(a,b),Nr(a,y,f)}};function la(a,l,f,y,b,T,N){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,T,N):l.prototype&&l.prototype.isPureReactComponent?!Rl(f,y)||!Rl(b,T):!0}function Od(a,l,f){var y=!1,b=ur,T=l.contextType;return typeof T=="object"&&T!==null?T=Ei(T):(b=Jt(l)?Nn:ln.current,y=l.contextTypes,T=(y=y!=null)?cr(a,b):ur),l=new l(f,T),a.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Ll,a.stateNode=l,l._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=T),l}function Pl(a,l,f,y){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,y),l.state!==a&&Ll.enqueueReplaceState(l,l.state,null)}function kl(a,l,f,y){var b=a.stateNode;b.props=f,b.state=a.memoizedState,b.refs=Md,ji(a);var T=l.contextType;typeof T=="object"&&T!==null?b.context=Ei(T):(T=Jt(l)?Nn:ln.current,b.context=cr(a,T)),Cs(a,f,b,y),b.state=a.memoizedState,T=l.getDerivedStateFromProps,typeof T=="function"&&(oa(a,l,T,f),b.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(l=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),l!==b.state&&Ll.enqueueReplaceState(b,b.state,null),Cs(a,f,b,y),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4)}var Ka=Array.isArray;function Xr(a,l,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(v(309));var y=f.stateNode}if(!y)throw Error(v(147,a));var b=""+a;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===b?l.ref:(l=function(T){var N=y.refs;N===Md&&(N=y.refs={}),T===null?delete N[b]:N[b]=T},l._stringRef=b,l)}if(typeof a!="string")throw Error(v(284));if(!f._owner)throw Error(v(290,a))}return a}function ci(a,l){if(a.type!=="textarea")throw Error(v(31,Object.prototype.toString.call(l)==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":l))}function zl(a){function l(Q,V){if(a){var ie=Q.lastEffect;ie!==null?(ie.nextEffect=V,Q.lastEffect=V):Q.firstEffect=Q.lastEffect=V,V.nextEffect=null,V.flags=8}}function f(Q,V){if(!a)return null;for(;V!==null;)l(Q,V),V=V.sibling;return null}function y(Q,V){for(Q=new Map;V!==null;)V.key!==null?Q.set(V.key,V):Q.set(V.index,V),V=V.sibling;return Q}function b(Q,V){return Q=Ft(Q,V),Q.index=0,Q.sibling=null,Q}function T(Q,V,ie){return Q.index=ie,a?(ie=Q.alternate,ie!==null?(ie=ie.index,ie<V?(Q.flags=2,V):ie):(Q.flags=2,V)):V}function N(Q){return a&&Q.alternate===null&&(Q.flags=2),Q}function B(Q,V,ie,Re){return V===null||V.tag!==6?(V=No(ie,Q.mode,Re),V.return=Q,V):(V=b(V,ie),V.return=Q,V)}function ne(Q,V,ie,Re){return V!==null&&V.elementType===ie.type?(Re=b(V,ie.props),Re.ref=Xr(Q,V,ie),Re.return=Q,Re):(Re=zo(ie.type,ie.key,ie.props,null,Q.mode,Re),Re.ref=Xr(Q,V,ie),Re.return=Q,Re)}function xe(Q,V,ie,Re){return V===null||V.tag!==4||V.stateNode.containerInfo!==ie.containerInfo||V.stateNode.implementation!==ie.implementation?(V=Ta(ie,Q.mode,Re),V.return=Q,V):(V=b(V,ie.children||[]),V.return=Q,V)}function Fe(Q,V,ie,Re,Be){return V===null||V.tag!==7?(V=js(ie,Q.mode,Re,Be),V.return=Q,V):(V=b(V,ie),V.return=Q,V)}function Ke(Q,V,ie){if(typeof V=="string"||typeof V=="number")return V=No(""+V,Q.mode,ie),V.return=Q,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case x:return ie=zo(V.type,V.key,V.props,null,Q.mode,ie),ie.ref=Xr(Q,null,V),ie.return=Q,ie;case m:return V=Ta(V,Q.mode,ie),V.return=Q,V}if(Ka(V)||ge(V))return V=js(V,Q.mode,ie,null),V.return=Q,V;ci(Q,V)}return null}function Ae(Q,V,ie,Re){var Be=V!==null?V.key:null;if(typeof ie=="string"||typeof ie=="number")return Be!==null?null:B(Q,V,""+ie,Re);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return ie.key===Be?ie.type===w?Fe(Q,V,ie.props.children,Re,Be):ne(Q,V,ie,Re):null;case m:return ie.key===Be?xe(Q,V,ie,Re):null}if(Ka(ie)||ge(ie))return Be!==null?null:Fe(Q,V,ie,Re,null);ci(Q,ie)}return null}function Pt(Q,V,ie,Re,Be){if(typeof Re=="string"||typeof Re=="number")return Q=Q.get(ie)||null,B(V,Q,""+Re,Be);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case x:return Q=Q.get(Re.key===null?ie:Re.key)||null,Re.type===w?Fe(V,Q,Re.props.children,Be,Re.key):ne(V,Q,Re,Be);case m:return Q=Q.get(Re.key===null?ie:Re.key)||null,xe(V,Q,Re,Be)}if(Ka(Re)||ge(Re))return Q=Q.get(ie)||null,Fe(V,Q,Re,Be,null);ci(V,Re)}return null}function qt(Q,V,ie,Re){for(var Be=null,kt=null,Je=V,Rt=V=0,En=null;Je!==null&&Rt<ie.length;Rt++){Je.index>Rt?(En=Je,Je=null):En=Je.sibling;var yt=Ae(Q,Je,ie[Rt],Re);if(yt===null){Je===null&&(Je=En);break}a&&Je&&yt.alternate===null&&l(Q,Je),V=T(yt,V,Rt),kt===null?Be=yt:kt.sibling=yt,kt=yt,Je=En}if(Rt===ie.length)return f(Q,Je),Be;if(Je===null){for(;Rt<ie.length;Rt++)Je=Ke(Q,ie[Rt],Re),Je!==null&&(V=T(Je,V,Rt),kt===null?Be=Je:kt.sibling=Je,kt=Je);return Be}for(Je=y(Q,Je);Rt<ie.length;Rt++)En=Pt(Je,Q,Rt,ie[Rt],Re),En!==null&&(a&&En.alternate!==null&&Je.delete(En.key===null?Rt:En.key),V=T(En,V,Rt),kt===null?Be=En:kt.sibling=En,kt=En);return a&&Je.forEach(function(_r){return l(Q,_r)}),Be}function Mi(Q,V,ie,Re){var Be=ge(ie);if(typeof Be!="function")throw Error(v(150));if(ie=Be.call(ie),ie==null)throw Error(v(151));for(var kt=Be=null,Je=V,Rt=V=0,En=null,yt=ie.next();Je!==null&&!yt.done;Rt++,yt=ie.next()){Je.index>Rt?(En=Je,Je=null):En=Je.sibling;var _r=Ae(Q,Je,yt.value,Re);if(_r===null){Je===null&&(Je=En);break}a&&Je&&_r.alternate===null&&l(Q,Je),V=T(_r,V,Rt),kt===null?Be=_r:kt.sibling=_r,kt=_r,Je=En}if(yt.done)return f(Q,Je),Be;if(Je===null){for(;!yt.done;Rt++,yt=ie.next())yt=Ke(Q,yt.value,Re),yt!==null&&(V=T(yt,V,Rt),kt===null?Be=yt:kt.sibling=yt,kt=yt);return Be}for(Je=y(Q,Je);!yt.done;Rt++,yt=ie.next())yt=Pt(Je,Q,Rt,yt.value,Re),yt!==null&&(a&&yt.alternate!==null&&Je.delete(yt.key===null?Rt:yt.key),V=T(yt,V,Rt),kt===null?Be=yt:kt.sibling=yt,kt=yt);return a&&Je.forEach(function(Av){return l(Q,Av)}),Be}return function(Q,V,ie,Re){var Be=typeof ie=="object"&&ie!==null&&ie.type===w&&ie.key===null;Be&&(ie=ie.props.children);var kt=typeof ie=="object"&&ie!==null;if(kt)switch(ie.$$typeof){case x:e:{for(kt=ie.key,Be=V;Be!==null;){if(Be.key===kt){switch(Be.tag){case 7:if(ie.type===w){f(Q,Be.sibling),V=b(Be,ie.props.children),V.return=Q,Q=V;break e}break;default:if(Be.elementType===ie.type){f(Q,Be.sibling),V=b(Be,ie.props),V.ref=Xr(Q,Be,ie),V.return=Q,Q=V;break e}}f(Q,Be);break}else l(Q,Be);Be=Be.sibling}ie.type===w?(V=js(ie.props.children,Q.mode,Re,ie.key),V.return=Q,Q=V):(Re=zo(ie.type,ie.key,ie.props,null,Q.mode,Re),Re.ref=Xr(Q,V,ie),Re.return=Q,Q=Re)}return N(Q);case m:e:{for(Be=ie.key;V!==null;){if(V.key===Be)if(V.tag===4&&V.stateNode.containerInfo===ie.containerInfo&&V.stateNode.implementation===ie.implementation){f(Q,V.sibling),V=b(V,ie.children||[]),V.return=Q,Q=V;break e}else{f(Q,V);break}else l(Q,V);V=V.sibling}V=Ta(ie,Q.mode,Re),V.return=Q,Q=V}return N(Q)}if(typeof ie=="string"||typeof ie=="number")return ie=""+ie,V!==null&&V.tag===6?(f(Q,V.sibling),V=b(V,ie),V.return=Q,Q=V):(f(Q,V),V=No(ie,Q.mode,Re),V.return=Q,Q=V),N(Q);if(Ka(ie))return qt(Q,V,ie,Re);if(ge(ie))return Mi(Q,V,ie,Re);if(kt&&ci(Q,ie),typeof ie>"u"&&!Be)switch(Q.tag){case 1:case 22:case 0:case 11:case 15:throw Error(v(152,Ce(Q.type)||"Component"))}return f(Q,V)}}var Rs=zl(!0),pr=zl(!1),Ii={},jt=zi(Ii),Sn=zi(Ii),Kr=zi(Ii);function un(a){if(a===Ii)throw Error(v(174));return a}function er(a,l){on(Kr,l),on(Sn,a),on(jt,Ii),a=dt(l),mt(jt),on(jt,a)}function Jn(){mt(jt),mt(Sn),mt(Kr)}function Nl(a){var l=un(Kr.current),f=un(jt.current);l=pe(f,a.type,l),f!==l&&(on(Sn,a),on(jt,l))}function Zr(a){Sn.current===a&&(mt(jt),mt(Sn))}var rn=zi(0);function Mr(a){for(var l=a;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||gl(f)||yl(f)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if(l.flags&64)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Fi=null,Hn=null,wi=!1;function _l(a,l){var f=Ai(5,null,null,0);f.elementType="DELETED",f.type="DELETED",f.stateNode=l,f.return=a,f.flags=8,a.lastEffect!==null?(a.lastEffect.nextEffect=f,a.lastEffect=f):a.firstEffect=a.lastEffect=f}function fc(a,l){switch(a.tag){case 5:return l=Ju(l,a.type,a.pendingProps),l!==null?(a.stateNode=l,!0):!1;case 6:return l=ec(l,a.pendingProps),l!==null?(a.stateNode=l,!0):!1;case 13:return!1;default:return!1}}function Ul(a){if(wi){var l=Hn;if(l){var f=l;if(!fc(a,l)){if(l=U(f),!l||!fc(a,l)){a.flags=a.flags&-1025|2,wi=!1,Fi=a;return}_l(Fi,f)}Fi=a,Hn=de(l)}else a.flags=a.flags&-1025|2,wi=!1,Fi=a}}function Za(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Fi=a}function Ja(a){if(!Qt||a!==Fi)return!1;if(!wi)return Za(a),wi=!0,!1;var l=a.type;if(a.tag!==5||l!=="head"&&l!=="body"&&!xt(l,a.memoizedProps))for(l=Hn;l;)_l(a,l),l=U(l);if(Za(a),a.tag===13){if(!Qt)throw Error(v(316));if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(v(317));Hn=Et(a)}else Hn=Fi?U(a.stateNode):null;return!0}function dc(){Qt&&(Hn=Fi=null,wi=!1)}var As=[];function jl(){for(var a=0;a<As.length;a++){var l=As[a];ht?l._workInProgressVersionPrimary=null:l._workInProgressVersionSecondary=null}As.length=0}var ua=g.ReactCurrentDispatcher,ei=g.ReactCurrentBatchConfig,fi=0,Wt=null,Vn=null,_n=null,Il=!1,eo=!1;function di(){throw Error(v(321))}function hc(a,l){if(l===null)return!1;for(var f=0;f<l.length&&f<a.length;f++)if(!Ui(a[f],l[f]))return!1;return!0}function Fl(a,l,f,y,b,T){if(fi=T,Wt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,ua.current=a===null||a.memoizedState===null?oo:Vl,a=f(y,b),eo){T=0;do{if(eo=!1,!(25>T))throw Error(v(301));T+=1,_n=Vn=null,l.updateQueue=null,ua.current=Wl,a=f(y,b)}while(eo)}if(ua.current=Tt,l=Vn!==null&&Vn.next!==null,fi=0,_n=Vn=Wt=null,Il=!1,l)throw Error(v(300));return a}function Jr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _n===null?Wt.memoizedState=_n=a:_n=_n.next=a,_n}function es(){if(Vn===null){var a=Wt.alternate;a=a!==null?a.memoizedState:null}else a=Vn.next;var l=_n===null?Wt.memoizedState:_n.next;if(l!==null)_n=l,Vn=a;else{if(a===null)throw Error(v(310));Vn=a,a={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},_n===null?Wt.memoizedState=_n=a:_n=_n.next=a}return _n}function vr(a,l){return typeof l=="function"?l(a):l}function ca(a){var l=es(),f=l.queue;if(f===null)throw Error(v(311));f.lastRenderedReducer=a;var y=Vn,b=y.baseQueue,T=f.pending;if(T!==null){if(b!==null){var N=b.next;b.next=T.next,T.next=N}y.baseQueue=b=T,f.pending=null}if(b!==null){b=b.next,y=y.baseState;var B=N=T=null,ne=b;do{var xe=ne.lane;if((fi&xe)===xe)B!==null&&(B=B.next={lane:0,action:ne.action,eagerReducer:ne.eagerReducer,eagerState:ne.eagerState,next:null}),y=ne.eagerReducer===a?ne.eagerState:a(y,ne.action);else{var Fe={lane:xe,action:ne.action,eagerReducer:ne.eagerReducer,eagerState:ne.eagerState,next:null};B===null?(N=B=Fe,T=y):B=B.next=Fe,Wt.lanes|=xe,xo|=xe}ne=ne.next}while(ne!==null&&ne!==b);B===null?T=y:B.next=N,Ui(y,l.memoizedState)||(Bi=!0),l.memoizedState=y,l.baseState=T,l.baseQueue=B,f.lastRenderedState=y}return[l.memoizedState,f.dispatch]}function to(a){var l=es(),f=l.queue;if(f===null)throw Error(v(311));f.lastRenderedReducer=a;var y=f.dispatch,b=f.pending,T=l.memoizedState;if(b!==null){f.pending=null;var N=b=b.next;do T=a(T,N.action),N=N.next;while(N!==b);Ui(T,l.memoizedState)||(Bi=!0),l.memoizedState=T,l.baseQueue===null&&(l.baseState=T),f.lastRenderedState=T}return[T,y]}function Ms(a,l,f){var y=l._getVersion;y=y(l._source);var b=ht?l._workInProgressVersionPrimary:l._workInProgressVersionSecondary;if(b!==null?a=b===y:(a=a.mutableReadLanes,(a=(fi&a)===a)&&(ht?l._workInProgressVersionPrimary=y:l._workInProgressVersionSecondary=y,As.push(l))),a)return f(l._source);throw As.push(l),Error(v(350))}function no(a,l,f,y){var b=$n;if(b===null)throw Error(v(349));var T=l._getVersion,N=T(l._source),B=ua.current,ne=B.useState(function(){return Ms(b,l,f)}),xe=ne[1],Fe=ne[0];ne=_n;var Ke=a.memoizedState,Ae=Ke.refs,Pt=Ae.getSnapshot,qt=Ke.source;Ke=Ke.subscribe;var Mi=Wt;return a.memoizedState={refs:Ae,source:l,subscribe:y},B.useEffect(function(){Ae.getSnapshot=f,Ae.setSnapshot=xe;var Q=T(l._source);if(!Ui(N,Q)){Q=f(l._source),Ui(Fe,Q)||(xe(Q),Q=Cn(Mi),b.mutableReadLanes|=Q&b.pendingLanes),Q=b.mutableReadLanes,b.entangledLanes|=Q;for(var V=b.entanglements,ie=Q;0<ie;){var Re=31-Gr(ie),Be=1<<Re;V[Re]|=Q,ie&=~Be}}},[f,l,y]),B.useEffect(function(){return y(l._source,function(){var Q=Ae.getSnapshot,V=Ae.setSnapshot;try{V(Q(l._source));var ie=Cn(Mi);b.mutableReadLanes|=ie&b.pendingLanes}catch(Re){V(function(){throw Re})}})},[l,y]),Ui(Pt,f)&&Ui(qt,l)&&Ui(Ke,y)||(a={pending:null,dispatch:null,lastRenderedReducer:vr,lastRenderedState:Fe},a.dispatch=xe=Wn.bind(null,Wt,a),ne.queue=a,ne.baseQueue=null,Fe=Ms(b,l,f),ne.memoizedState=ne.baseState=Fe),Fe}function pc(a,l,f){var y=es();return no(y,a,l,f)}function ts(a){var l=Jr();return typeof a=="function"&&(a=a()),l.memoizedState=l.baseState=a,a=l.queue={pending:null,dispatch:null,lastRenderedReducer:vr,lastRenderedState:a},a=a.dispatch=Wn.bind(null,Wt,a),[l.memoizedState,a]}function io(a,l,f,y){return a={tag:a,create:l,destroy:f,deps:y,next:null},l=Wt.updateQueue,l===null?(l={lastEffect:null},Wt.updateQueue=l,l.lastEffect=a.next=a):(f=l.lastEffect,f===null?l.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,l.lastEffect=a)),a}function Os(a){var l=Jr();return a={current:a},l.memoizedState=a}function ro(){return es().memoizedState}function Or(a,l,f,y){var b=Jr();Wt.flags|=a,b.memoizedState=io(1|l,f,void 0,y===void 0?null:y)}function Bl(a,l,f,y){var b=es();y=y===void 0?null:y;var T=void 0;if(Vn!==null){var N=Vn.memoizedState;if(T=N.destroy,y!==null&&hc(y,N.deps)){io(l,f,T,y);return}}Wt.flags|=a,b.memoizedState=io(1|l,f,T,y)}function so(a,l){return Or(516,4,a,l)}function fa(a,l){return Bl(516,4,a,l)}function vc(a,l){return Bl(4,2,a,l)}function mc(a,l){if(typeof l=="function")return a=a(),l(a),function(){l(null)};if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function ao(a,l,f){return f=f!=null?f.concat([a]):null,Bl(4,2,mc.bind(null,l,a),f)}function Hl(){}function Dr(a,l){var f=es();l=l===void 0?null:l;var y=f.memoizedState;return y!==null&&l!==null&&hc(l,y[1])?y[0]:(f.memoizedState=[a,l],a)}function Dd(a,l){var f=es();l=l===void 0?null:l;var y=f.memoizedState;return y!==null&&l!==null&&hc(l,y[1])?y[0]:(a=a(),f.memoizedState=[a,l],a)}function ue(a,l){var f=sa();Cr(98>f?98:f,function(){a(!0)}),Cr(97<f?97:f,function(){var y=ei.transition;ei.transition=1;try{a(!1),l()}finally{ei.transition=y}})}function Wn(a,l,f){var y=pi(),b=Cn(a),T={lane:b,action:f,eagerReducer:null,eagerState:null,next:null},N=l.pending;if(N===null?T.next=T:(T.next=N.next,N.next=T),l.pending=T,N=a.alternate,a===Wt||N!==null&&N===Wt)eo=Il=!0;else{if(a.lanes===0&&(N===null||N.lanes===0)&&(N=l.lastRenderedReducer,N!==null))try{var B=l.lastRenderedState,ne=N(B,f);if(T.eagerReducer=N,T.eagerState=ne,Ui(ne,B))return}catch{}finally{}Nr(a,b,y)}}var Tt={readContext:Ei,useCallback:di,useContext:di,useEffect:di,useImperativeHandle:di,useLayoutEffect:di,useMemo:di,useReducer:di,useRef:di,useState:di,useDebugValue:di,useDeferredValue:di,useTransition:di,useMutableSource:di,useOpaqueIdentifier:di,unstable_isNewReconciler:!1},oo={readContext:Ei,useCallback:function(a,l){return Jr().memoizedState=[a,l===void 0?null:l],a},useContext:Ei,useEffect:so,useImperativeHandle:function(a,l,f){return f=f!=null?f.concat([a]):null,Or(4,2,mc.bind(null,l,a),f)},useLayoutEffect:function(a,l){return Or(4,2,a,l)},useMemo:function(a,l){var f=Jr();return l=l===void 0?null:l,a=a(),f.memoizedState=[a,l],a},useReducer:function(a,l,f){var y=Jr();return l=f!==void 0?f(l):l,y.memoizedState=y.baseState=l,a=y.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},a=a.dispatch=Wn.bind(null,Wt,a),[y.memoizedState,a]},useRef:Os,useState:ts,useDebugValue:Hl,useDeferredValue:function(a){var l=ts(a),f=l[0],y=l[1];return so(function(){var b=ei.transition;ei.transition=1;try{y(a)}finally{ei.transition=b}},[a]),f},useTransition:function(){var a=ts(!1),l=a[0];return a=ue.bind(null,a[1]),Os(a),[a,l]},useMutableSource:function(a,l,f){var y=Jr();return y.memoizedState={refs:{getSnapshot:l,setSnapshot:null},source:a,subscribe:f},no(y,a,l,f)},useOpaqueIdentifier:function(){if(wi){var a=!1,l=j(function(){throw a||(a=!0,f(z())),Error(v(355))}),f=ts(l)[1];return!(Wt.mode&2)&&(Wt.flags|=516,io(5,function(){f(z())},void 0,null)),l}return l=z(),ts(l),l},unstable_isNewReconciler:!1},Vl={readContext:Ei,useCallback:Dr,useContext:Ei,useEffect:fa,useImperativeHandle:ao,useLayoutEffect:vc,useMemo:Dd,useReducer:ca,useRef:ro,useState:function(){return ca(vr)},useDebugValue:Hl,useDeferredValue:function(a){var l=ca(vr),f=l[0],y=l[1];return fa(function(){var b=ei.transition;ei.transition=1;try{y(a)}finally{ei.transition=b}},[a]),f},useTransition:function(){var a=ca(vr)[0];return[ro().current,a]},useMutableSource:pc,useOpaqueIdentifier:function(){return ca(vr)[0]},unstable_isNewReconciler:!1},Wl={readContext:Ei,useCallback:Dr,useContext:Ei,useEffect:fa,useImperativeHandle:ao,useLayoutEffect:vc,useMemo:Dd,useReducer:to,useRef:ro,useState:function(){return to(vr)},useDebugValue:Hl,useDeferredValue:function(a){var l=to(vr),f=l[0],y=l[1];return fa(function(){var b=ei.transition;ei.transition=1;try{y(a)}finally{ei.transition=b}},[a]),f},useTransition:function(){var a=to(vr)[0];return[ro().current,a]},useMutableSource:pc,useOpaqueIdentifier:function(){return to(vr)[0]},unstable_isNewReconciler:!1},Ld=g.ReactCurrentOwner,Bi=!1;function ti(a,l,f,y){l.child=a===null?pr(l,null,f,y):Rs(l,a.child,f,y)}function $l(a,l,f,y,b){f=f.render;var T=l.ref;return Ts(l,b),y=Fl(a,l,f,y,T,b),a!==null&&!Bi?(l.updateQueue=a.updateQueue,l.flags&=-517,a.lanes&=~b,Pr(a,l,b)):(l.flags|=1,ti(a,l,y,b),l.child)}function gc(a,l,f,y,b,T){if(a===null){var N=f.type;return typeof N=="function"&&!Pc(N)&&N.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=N,Ds(a,l,N,y,b,T)):(a=zo(f.type,null,y,l,l.mode,T),a.ref=l.ref,a.return=l,l.child=a)}return N=a.child,!(b&T)&&(b=N.memoizedProps,f=f.compare,f=f!==null?f:Rl,f(b,y)&&a.ref===l.ref)?Pr(a,l,T):(l.flags|=1,a=Ft(N,y),a.ref=l.ref,a.return=l,l.child=a)}function Ds(a,l,f,y,b,T){if(a!==null&&Rl(a.memoizedProps,y)&&a.ref===l.ref)if(Bi=!1,(T&b)!==0)a.flags&16384&&(Bi=!0);else return l.lanes=a.lanes,Pr(a,l,T);return lo(a,l,f,y,T)}function da(a,l,f){var y=l.pendingProps,b=y.children,T=a!==null?a.memoizedState:null;if(y.mode==="hidden"||y.mode==="unstable-defer-without-hiding")if(!(l.mode&4))l.memoizedState={baseLanes:0},In(l,f);else if(f&1073741824)l.memoizedState={baseLanes:0},In(l,T!==null?T.baseLanes:f);else return a=T!==null?T.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:a},In(l,a),null;else T!==null?(y=T.baseLanes|f,l.memoizedState=null):y=f,In(l,y);return ti(a,l,b,f),l.child}function Ls(a,l){var f=l.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(l.flags|=128)}function lo(a,l,f,y,b){var T=Jt(f)?Nn:ln.current;return T=cr(l,T),Ts(l,b),f=Fl(a,l,f,y,T,b),a!==null&&!Bi?(l.updateQueue=a.updateQueue,l.flags&=-517,a.lanes&=~b,Pr(a,l,b)):(l.flags|=1,ti(a,l,f,b),l.child)}function yc(a,l,f,y,b){if(Jt(f)){var T=!0;$a(l)}else T=!1;if(Ts(l,b),l.stateNode===null)a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),Od(l,f,y),kl(l,f,y,b),y=!0;else if(a===null){var N=l.stateNode,B=l.memoizedProps;N.props=B;var ne=N.context,xe=f.contextType;typeof xe=="object"&&xe!==null?xe=Ei(xe):(xe=Jt(f)?Nn:ln.current,xe=cr(l,xe));var Fe=f.getDerivedStateFromProps,Ke=typeof Fe=="function"||typeof N.getSnapshotBeforeUpdate=="function";Ke||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B!==y||ne!==xe)&&Pl(l,N,y,xe),Rr=!1;var Ae=l.memoizedState;N.state=Ae,Cs(l,y,N,b),ne=l.memoizedState,B!==y||Ae!==ne||Bn.current||Rr?(typeof Fe=="function"&&(oa(l,f,Fe,y),ne=l.memoizedState),(B=Rr||la(l,f,B,y,Ae,ne,xe))?(Ke||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(l.flags|=4)):(typeof N.componentDidMount=="function"&&(l.flags|=4),l.memoizedProps=y,l.memoizedState=ne),N.props=y,N.state=ne,N.context=xe,y=B):(typeof N.componentDidMount=="function"&&(l.flags|=4),y=!1)}else{N=l.stateNode,Ji(a,l),B=l.memoizedProps,xe=l.type===l.elementType?B:Zi(l.type,B),N.props=xe,Ke=l.pendingProps,Ae=N.context,ne=f.contextType,typeof ne=="object"&&ne!==null?ne=Ei(ne):(ne=Jt(f)?Nn:ln.current,ne=cr(l,ne));var Pt=f.getDerivedStateFromProps;(Fe=typeof Pt=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B!==Ke||Ae!==ne)&&Pl(l,N,y,ne),Rr=!1,Ae=l.memoizedState,N.state=Ae,Cs(l,y,N,b);var qt=l.memoizedState;B!==Ke||Ae!==qt||Bn.current||Rr?(typeof Pt=="function"&&(oa(l,f,Pt,y),qt=l.memoizedState),(xe=Rr||la(l,f,xe,y,Ae,qt,ne))?(Fe||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(y,qt,ne),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(y,qt,ne)),typeof N.componentDidUpdate=="function"&&(l.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(l.flags|=256)):(typeof N.componentDidUpdate!="function"||B===a.memoizedProps&&Ae===a.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ae===a.memoizedState||(l.flags|=256),l.memoizedProps=y,l.memoizedState=qt),N.props=y,N.state=qt,N.context=ne,y=xe):(typeof N.componentDidUpdate!="function"||B===a.memoizedProps&&Ae===a.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ae===a.memoizedState||(l.flags|=256),y=!1)}return ql(a,l,f,y,T,b)}function ql(a,l,f,y,b,T){Ls(a,l);var N=(l.flags&64)!==0;if(!y&&!N)return b&&xd(l,f,!1),Pr(a,l,T);y=l.stateNode,Ld.current=l;var B=N&&typeof f.getDerivedStateFromError!="function"?null:y.render();return l.flags|=1,a!==null&&N?(l.child=Rs(l,a.child,null,T),l.child=Rs(l,null,B,T)):ti(a,l,B,T),l.memoizedState=y.state,b&&xd(l,f,!0),l.child}function Yl(a){var l=a.stateNode;l.pendingContext?Sd(a,l.pendingContext,l.pendingContext!==l.context):l.context&&Sd(a,l.context,!1),er(a,l.containerInfo)}var Ti={dehydrated:null,retryLane:0};function sn(a,l,f){var y=l.pendingProps,b=rn.current,T=!1,N;return(N=(l.flags&64)!==0)||(N=a!==null&&a.memoizedState===null?!1:(b&2)!==0),N?(T=!0,l.flags&=-65):a!==null&&a.memoizedState===null||y.fallback===void 0||y.unstable_avoidThisFallback===!0||(b|=1),on(rn,b&1),a===null?(y.fallback!==void 0&&Ul(l),a=y.children,b=y.fallback,T?(a=Sc(l,a,b,f),l.child.memoizedState={baseLanes:f},l.memoizedState=Ti,a):typeof y.unstable_expectedLoadTime=="number"?(a=Sc(l,a,b,f),l.child.memoizedState={baseLanes:f},l.memoizedState=Ti,l.lanes=33554432,a):(f=wa({mode:"visible",children:a},l.mode,f,null),f.return=l,l.child=f)):a.memoizedState!==null?T?(y=xc(a,l,y.children,y.fallback,f),T=l.child,b=a.child.memoizedState,T.memoizedState=b===null?{baseLanes:f}:{baseLanes:b.baseLanes|f},T.childLanes=a.childLanes&~f,l.memoizedState=Ti,y):(f=bc(a,l,y.children,f),l.memoizedState=null,f):T?(y=xc(a,l,y.children,y.fallback,f),T=l.child,b=a.child.memoizedState,T.memoizedState=b===null?{baseLanes:f}:{baseLanes:b.baseLanes|f},T.childLanes=a.childLanes&~f,l.memoizedState=Ti,y):(f=bc(a,l,y.children,f),l.memoizedState=null,f)}function Sc(a,l,f,y){var b=a.mode,T=a.child;return l={mode:"hidden",children:l},!(b&2)&&T!==null?(T.childLanes=0,T.pendingProps=l):T=wa(l,b,0,null),f=js(f,b,y,null),T.return=a,f.return=a,T.sibling=f,a.child=T,f}function bc(a,l,f,y){var b=a.child;return a=b.sibling,f=Ft(b,{mode:"visible",children:f}),!(l.mode&2)&&(f.lanes=y),f.return=l,f.sibling=null,a!==null&&(a.nextEffect=null,a.flags=8,l.firstEffect=l.lastEffect=a),l.child=f}function xc(a,l,f,y,b){var T=l.mode,N=a.child;a=N.sibling;var B={mode:"hidden",children:f};return!(T&2)&&l.child!==N?(f=l.child,f.childLanes=0,f.pendingProps=B,N=f.lastEffect,N!==null?(l.firstEffect=f.firstEffect,l.lastEffect=N,N.nextEffect=null):l.firstEffect=l.lastEffect=null):f=Ft(N,B),a!==null?y=Ft(a,y):(y=js(y,T,b,null),y.flags|=2),y.return=l,f.return=l,f.sibling=y,l.child=f,y}function It(a,l){a.lanes|=l;var f=a.alternate;f!==null&&(f.lanes|=l),cc(a.return,l)}function Lr(a,l,f,y,b,T){var N=a.memoizedState;N===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:b,lastEffect:T}:(N.isBackwards=l,N.rendering=null,N.renderingStartTime=0,N.last=y,N.tail=f,N.tailMode=b,N.lastEffect=T)}function Pd(a,l,f){var y=l.pendingProps,b=y.revealOrder,T=y.tail;if(ti(a,l,y.children,f),y=rn.current,y&2)y=y&1|2,l.flags|=64;else{if(a!==null&&a.flags&64)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&It(a,f);else if(a.tag===19)It(a,f);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}y&=1}if(on(rn,y),!(l.mode&2))l.memoizedState=null;else switch(b){case"forwards":for(f=l.child,b=null;f!==null;)a=f.alternate,a!==null&&Mr(a)===null&&(b=f),f=f.sibling;f=b,f===null?(b=l.child,l.child=null):(b=f.sibling,f.sibling=null),Lr(l,!1,b,f,T,l.lastEffect);break;case"backwards":for(f=null,b=l.child,l.child=null;b!==null;){if(a=b.alternate,a!==null&&Mr(a)===null){l.child=b;break}a=b.sibling,b.sibling=f,f=b,b=a}Lr(l,!0,f,null,T,l.lastEffect);break;case"together":Lr(l,!1,null,null,void 0,l.lastEffect);break;default:l.memoizedState=null}return l.child}function Pr(a,l,f){if(a!==null&&(l.dependencies=a.dependencies),xo|=l.lanes,f&l.childLanes){if(a!==null&&l.child!==a.child)throw Error(v(153));if(l.child!==null){for(a=l.child,f=Ft(a,a.pendingProps),l.child=f,f.return=l;a.sibling!==null;)a=a.sibling,f=f.sibling=Ft(a,a.pendingProps),f.return=l;f.sibling=null}return l.child}return null}function hi(a){a.flags|=4}var uo,co,Ql,Gl;if(ft)uo=function(a,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)pt(a,f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},co=function(){},Ql=function(a,l,f,y,b){if(a=a.memoizedProps,a!==y){var T=l.stateNode,N=un(jt.current);f=Kt(T,f,a,y,b,N),(l.updateQueue=f)&&hi(l)}},Gl=function(a,l,f,y){f!==y&&hi(l)};else if(mn){uo=function(a,l,f,y){for(var b=l.child;b!==null;){if(b.tag===5){var T=b.stateNode;f&&y&&(T=ml(T,b.type,b.memoizedProps,b)),pt(a,T)}else if(b.tag===6)T=b.stateNode,f&&y&&(T=Qr(T,b.memoizedProps,b)),pt(a,T);else if(b.tag!==4){if(b.tag===13&&b.flags&4&&(T=b.memoizedState!==null)){var N=b.child;if(N!==null&&(N.child!==null&&(N.child.return=N,uo(a,N,!0,T)),T=N.sibling,T!==null)){T.return=b,b=T;continue}}if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===l)break;for(;b.sibling===null;){if(b.return===null||b.return===l)return;b=b.return}b.sibling.return=b.return,b=b.sibling}};var Ec=function(a,l,f,y){for(var b=l.child;b!==null;){if(b.tag===5){var T=b.stateNode;f&&y&&(T=ml(T,b.type,b.memoizedProps,b)),ws(a,T)}else if(b.tag===6)T=b.stateNode,f&&y&&(T=Qr(T,b.memoizedProps,b)),ws(a,T);else if(b.tag!==4){if(b.tag===13&&b.flags&4&&(T=b.memoizedState!==null)){var N=b.child;if(N!==null&&(N.child!==null&&(N.child.return=N,Ec(a,N,!0,T)),T=N.sibling,T!==null)){T.return=b,b=T;continue}}if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===l)break;for(;b.sibling===null;){if(b.return===null||b.return===l)return;b=b.return}b.sibling.return=b.return,b=b.sibling}};co=function(a){var l=a.stateNode;if(a.firstEffect!==null){var f=l.containerInfo,y=Wa(f);Ec(y,a,!1,!1),l.pendingChildren=y,hi(a),Xi(f,y)}},Ql=function(a,l,f,y,b){var T=a.stateNode,N=a.memoizedProps;if((a=l.firstEffect===null)&&N===y)l.stateNode=T;else{var B=l.stateNode,ne=un(jt.current),xe=null;N!==y&&(xe=Kt(B,f,N,y,b,ne)),a&&xe===null?l.stateNode=T:(T=ia(T,xe,f,N,y,l,a,B),vn(T,f,y,b,ne)&&hi(l),l.stateNode=T,a?hi(l):uo(T,l,!1,!1))}},Gl=function(a,l,f,y){f!==y?(a=un(Kr.current),f=un(jt.current),l.stateNode=ct(y,a,f,l),hi(l)):l.stateNode=a.stateNode}}else co=function(){},Ql=function(){},Gl=function(){};function fo(a,l){if(!wi)switch(a.tailMode){case"hidden":l=a.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function kd(a,l,f){var y=l.pendingProps;switch(l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Jt(l.type)&&Sl(),null;case 3:return Jn(),mt(Bn),mt(ln),jl(),y=l.stateNode,y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(Ja(l)?hi(l):y.hydrate||(l.flags|=256)),co(l),null;case 5:Zr(l);var b=un(Kr.current);if(f=l.type,a!==null&&l.stateNode!=null)Ql(a,l,f,y,b),a.ref!==l.ref&&(l.flags|=128);else{if(!y){if(l.stateNode===null)throw Error(v(166));return null}if(a=un(jt.current),Ja(l)){if(!Qt)throw Error(v(175));a=we(l.stateNode,l.type,l.memoizedProps,b,a,l),l.updateQueue=a,a!==null&&hi(l)}else{var T=ut(f,y,b,a,l);uo(T,l,!1,!1),l.stateNode=T,vn(T,f,y,b,a)&&hi(l)}l.ref!==null&&(l.flags|=128)}return null;case 6:if(a&&l.stateNode!=null)Gl(a,l,a.memoizedProps,y);else{if(typeof y!="string"&&l.stateNode===null)throw Error(v(166));if(a=un(Kr.current),b=un(jt.current),Ja(l)){if(!Qt)throw Error(v(176));Qe(l.stateNode,l.memoizedProps,l)&&hi(l)}else l.stateNode=ct(y,a,b,l)}return null;case 13:return mt(rn),y=l.memoizedState,l.flags&64?(l.lanes=f,l):(y=y!==null,b=!1,a===null?l.memoizedProps.fallback!==void 0&&Ja(l):b=a.memoizedState!==null,y&&!b&&l.mode&2&&(a===null&&l.memoizedProps.unstable_avoidThisFallback!==!0||rn.current&1?Dn===0&&(Dn=3):((Dn===0||Dn===3)&&(Dn=4),$n===null||!(xo&134217727)&&!(va&134217727)||zs($n,zt))),mn&&y&&(l.flags|=4),ft&&(y||b)&&(l.flags|=4),null);case 4:return Jn(),co(l),a===null&&st(l.stateNode.containerInfo),null;case 10:return Dl(l),null;case 17:return Jt(l.type)&&Sl(),null;case 19:if(mt(rn),y=l.memoizedState,y===null)return null;if(b=(l.flags&64)!==0,T=y.rendering,T===null)if(b)fo(y,!1);else{if(Dn!==0||a!==null&&a.flags&64)for(a=l.child;a!==null;){if(T=Mr(a),T!==null){for(l.flags|=64,fo(y,!1),a=T.updateQueue,a!==null&&(l.updateQueue=a,l.flags|=4),y.lastEffect===null&&(l.firstEffect=null),l.lastEffect=y.lastEffect,a=f,y=l.child;y!==null;)b=y,f=a,b.flags&=2,b.nextEffect=null,b.firstEffect=null,b.lastEffect=null,T=b.alternate,T===null?(b.childLanes=0,b.lanes=f,b.child=null,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=T.childLanes,b.lanes=T.lanes,b.child=T.child,b.memoizedProps=T.memoizedProps,b.memoizedState=T.memoizedState,b.updateQueue=T.updateQueue,b.type=T.type,f=T.dependencies,b.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),y=y.sibling;return on(rn,rn.current&1|2),l.child}a=a.sibling}y.tail!==null&&On()>iu&&(l.flags|=64,b=!0,fo(y,!1),l.lanes=33554432)}else{if(!b)if(a=Mr(T),a!==null){if(l.flags|=64,b=!0,a=a.updateQueue,a!==null&&(l.updateQueue=a,l.flags|=4),fo(y,!0),y.tail===null&&y.tailMode==="hidden"&&!T.alternate&&!wi)return l=l.lastEffect=y.lastEffect,l!==null&&(l.nextEffect=null),null}else 2*On()-y.renderingStartTime>iu&&f!==1073741824&&(l.flags|=64,b=!0,fo(y,!1),l.lanes=33554432);y.isBackwards?(T.sibling=l.child,l.child=T):(a=y.last,a!==null?a.sibling=T:l.child=T,y.last=T)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.lastEffect=l.lastEffect,y.renderingStartTime=On(),a.sibling=null,l=rn.current,on(rn,b?l&1|2:l&1),a):null;case 23:case 24:return xn(),a!==null&&a.memoizedState!==null!=(l.memoizedState!==null)&&y.mode!=="unstable-defer-without-hiding"&&(l.flags|=4),null}throw Error(v(156,l.tag))}function zd(a){switch(a.tag){case 1:Jt(a.type)&&Sl();var l=a.flags;return l&4096?(a.flags=l&-4097|64,a):null;case 3:if(Jn(),mt(Bn),mt(ln),jl(),l=a.flags,l&64)throw Error(v(285));return a.flags=l&-4097|64,a;case 5:return Zr(a),null;case 13:return mt(rn),l=a.flags,l&4096?(a.flags=l&-4097|64,a):null;case 19:return mt(rn),null;case 4:return Jn(),null;case 10:return Dl(a),null;case 23:case 24:return xn(),null;default:return null}}function wc(a,l){try{var f="",y=l;do f+=Sv(y),y=y.return;while(y);var b=f}catch(T){b=`
204
+ `),N=b.length-1,F=T.length-1;1<=N&&0<=F&&b[N]!==T[F];)F--;for(;1<=N&&0<=F;N--,F--)if(b[N]!==T[F]){if(N!==1||F!==1)do if(N--,F--,0>F||b[N]!==T[F])return`
205
+ `+b[N].replace(" at new "," at ");while(1<=N&&0<=F);break}}}finally{It=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?yn(a):""}var Nn=[],Jn=-1;function Ni(a){return{current:a}}function vt(a){0>Jn||(a.current=Nn[Jn],Nn[Jn]=null,Jn--)}function un(a,l){Jn++,Nn[Jn]=a.current,a.current=l}var ur={},cn=Ni(ur),Hn=Ni(!1),_n=ur;function cr(a,l){var f=a.type.contextTypes;if(!f)return ur;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===l)return y.__reactInternalMemoizedMaskedChildContext;var b={},T;for(T in f)b[T]=l[T];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=b),b}function en(a){return a=a.childContextTypes,a!=null}function Sl(){vt(Hn),vt(cn)}function Sd(a,l,f){if(cn.current!==ur)throw Error(v(168));un(cn,l),un(Hn,f)}function bd(a,l,f){var y=a.stateNode;if(a=l.childContextTypes,typeof y.getChildContext!="function")return f;y=y.getChildContext();for(var b in y)if(!(b in a))throw Error(v(108,Re(l)||"Unknown",b));return o({},f,y)}function $a(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||ur,_n=cn.current,un(cn,a),un(Hn,Hn.current),!0}function xd(a,l,f){var y=a.stateNode;if(!y)throw Error(v(169));f?(a=bd(a,l,_n),y.__reactInternalMemoizedMergedChildContext=a,vt(Hn),vt(cn),un(cn,a)):vt(Hn),un(Hn,f)}var tc=null,_i=null,ov=h.unstable_now;ov();var bl=0,$t=8;function Ki(a){if(1&a)return $t=15,1;if(2&a)return $t=14,2;if(4&a)return $t=13,4;var l=24&a;return l!==0?($t=12,l):a&32?($t=11,32):(l=192&a,l!==0?($t=10,l):a&256?($t=9,256):(l=3584&a,l!==0?($t=8,l):a&4096?($t=7,4096):(l=4186112&a,l!==0?($t=6,l):(l=62914560&a,l!==0?($t=5,l):a&67108864?($t=4,67108864):a&134217728?($t=3,134217728):(l=805306368&a,l!==0?($t=2,l):1073741824&a?($t=1,1073741824):($t=8,a))))))}function lv(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function uv(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(v(358,a))}}function qa(a,l){var f=a.pendingLanes;if(f===0)return $t=0;var y=0,b=0,T=a.expiredLanes,N=a.suspendedLanes,F=a.pingedLanes;if(T!==0)y=T,b=$t=15;else if(T=f&134217727,T!==0){var te=T&~N;te!==0?(y=Ki(te),b=$t):(F&=T,F!==0&&(y=Ki(F),b=$t))}else T=f&~N,T!==0?(y=Ki(T),b=$t):F!==0&&(y=Ki(F),b=$t);if(y===0)return 0;if(y=31-Gr(y),y=f&((0>y?0:1<<y)<<1)-1,l!==0&&l!==y&&!(l&N)){if(Ki(l),b<=$t)return l;$t=b}if(l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=y;0<l;)f=31-Gr(l),b=1<<f,y|=a[f],l&=~b;return y}function Ed(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function xl(a,l){switch(a){case 15:return 1;case 14:return 2;case 12:return a=ra(24&~l),a===0?xl(10,l):a;case 10:return a=ra(192&~l),a===0?xl(8,l):a;case 8:return a=ra(3584&~l),a===0&&(a=ra(4186112&~l),a===0&&(a=512)),a;case 2:return l=ra(805306368&~l),l===0&&(l=268435456),l}throw Error(v(358,a))}function ra(a){return a&-a}function nc(a){for(var l=[],f=0;31>f;f++)l.push(a);return l}function El(a,l,f){a.pendingLanes|=l;var y=l-1;a.suspendedLanes&=y,a.pingedLanes&=y,a=a.eventTimes,l=31-Gr(l),a[l]=f}var Gr=Math.clz32?Math.clz32:dv,cv=Math.log,fv=Math.LN2;function dv(a){return a===0?32:31-(cv(a)/fv|0)|0}var wd=h.unstable_runWithPriority,ic=h.unstable_scheduleCallback,rc=h.unstable_cancelCallback,hv=h.unstable_shouldYield,Td=h.unstable_requestPaint,Ya=h.unstable_now,pv=h.unstable_getCurrentPriorityLevel,Qa=h.unstable_ImmediatePriority,sc=h.unstable_UserBlockingPriority,Cd=h.unstable_NormalPriority,ac=h.unstable_LowPriority,oc=h.unstable_IdlePriority,wl={},vv=Td!==void 0?Td:function(){},Tr=null,Tl=null,lc=!1,Cl=Ya(),On=1e4>Cl?Ya:function(){return Ya()-Cl};function sa(){switch(pv()){case Qa:return 99;case sc:return 98;case Cd:return 97;case ac:return 96;case oc:return 95;default:throw Error(v(332))}}function Rd(a){switch(a){case 99:return Qa;case 98:return sc;case 97:return Cd;case 96:return ac;case 95:return oc;default:throw Error(v(332))}}function Cr(a,l){return a=Rd(a),wd(a,l)}function aa(a,l,f){return a=Rd(a),ic(a,l,f)}function Ui(){if(Tl!==null){var a=Tl;Tl=null,rc(a)}Ad()}function Ad(){if(!lc&&Tr!==null){lc=!0;var a=0;try{var l=Tr;Cr(99,function(){for(;a<l.length;a++){var f=l[a];do f=f(!0);while(f!==null)}}),Tr=null}catch(f){throw Tr!==null&&(Tr=Tr.slice(a+1)),ic(Qa,Ui),f}finally{lc=!1}}}var mv=g.ReactCurrentBatchConfig;function gv(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var ji=typeof Object.is=="function"?Object.is:gv,yv=Object.prototype.hasOwnProperty;function Rl(a,l){if(ji(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var f=Object.keys(a),y=Object.keys(l);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++)if(!yv.call(l,f[y])||!ji(a[f[y]],l[f[y]]))return!1;return!0}function Sv(a){switch(a.tag){case 5:return yn(a.type);case 16:return yn("Lazy");case 13:return yn("Suspense");case 19:return yn("SuspenseList");case 0:case 2:case 15:return a=Vt(a.type,!1),a;case 11:return a=Vt(a.type.render,!1),a;case 22:return a=Vt(a.type._render,!1),a;case 1:return a=Vt(a.type,!0),a;default:return""}}function Zi(a,l){if(a&&a.defaultProps){l=o({},l),a=a.defaultProps;for(var f in a)l[f]===void 0&&(l[f]=a[f]);return l}return l}var Al=Ni(null),Ml=null,fr=null,Ga=null;function Ol(){Ga=fr=Ml=null}function uc(a,l){a=a.type._context,We?(un(Al,a._currentValue),a._currentValue=l):(un(Al,a._currentValue2),a._currentValue2=l)}function Dl(a){var l=Al.current;vt(Al),a=a.type._context,We?a._currentValue=l:a._currentValue2=l}function cc(a,l){for(;a!==null;){var f=a.alternate;if((a.childLanes&l)===l){if(f===null||(f.childLanes&l)===l)break;f.childLanes|=l}else a.childLanes|=l,f!==null&&(f.childLanes|=l);a=a.return}}function Ts(a,l){Ml=a,Ga=fr=null,a=a.dependencies,a!==null&&a.firstContext!==null&&(a.lanes&l&&(Hi=!0),a.firstContext=null)}function wi(a,l){if(Ga!==a&&l!==!1&&l!==0)if((typeof l!="number"||l===1073741823)&&(Ga=a,l=1073741823),l={context:a,observedBits:l,next:null},fr===null){if(Ml===null)throw Error(v(308));fr=l,Ml.dependencies={lanes:0,firstContext:l,responders:null}}else fr=fr.next=l;return We?a._currentValue:a._currentValue2}var Rr=!1;function Ii(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Ji(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function dr(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function hr(a,l){if(a=a.updateQueue,a!==null){a=a.shared;var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}}function Ar(a,l){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var b=null,T=null;if(f=f.firstBaseUpdate,f!==null){do{var N={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};T===null?b=T=N:T=T.next=N,f=f.next}while(f!==null);T===null?b=T=l:T=T.next=l}else b=T=l;f={baseState:y.baseState,firstBaseUpdate:b,lastBaseUpdate:T,shared:y.shared,effects:y.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=l:a.next=l,f.lastBaseUpdate=l}function Cs(a,l,f,y){var b=a.updateQueue;Rr=!1;var T=b.firstBaseUpdate,N=b.lastBaseUpdate,F=b.shared.pending;if(F!==null){b.shared.pending=null;var te=F,xe=te.next;te.next=null,N===null?T=xe:N.next=xe,N=te;var Be=a.alternate;if(Be!==null){Be=Be.updateQueue;var Je=Be.lastBaseUpdate;Je!==N&&(Je===null?Be.firstBaseUpdate=xe:Je.next=xe,Be.lastBaseUpdate=te)}}if(T!==null){Je=b.baseState,N=0,Be=xe=te=null;do{F=T.lane;var Me=T.eventTime;if((y&F)===F){Be!==null&&(Be=Be.next={eventTime:Me,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var Pt=a,Qt=T;switch(F=l,Me=f,Qt.tag){case 1:if(Pt=Qt.payload,typeof Pt=="function"){Je=Pt.call(Me,Je,F);break e}Je=Pt;break e;case 3:Pt.flags=Pt.flags&-4097|64;case 0:if(Pt=Qt.payload,F=typeof Pt=="function"?Pt.call(Me,Je,F):Pt,F==null)break e;Je=o({},Je,F);break e;case 2:Rr=!0}}T.callback!==null&&(a.flags|=32,F=b.effects,F===null?b.effects=[T]:F.push(T))}else Me={eventTime:Me,lane:F,tag:T.tag,payload:T.payload,callback:T.callback,next:null},Be===null?(xe=Be=Me,te=Je):Be=Be.next=Me,N|=F;if(T=T.next,T===null){if(F=b.shared.pending,F===null)break;T=F.next,F.next=null,b.lastBaseUpdate=F,b.shared.pending=null}}while(!0);Be===null&&(te=Je),b.baseState=te,b.firstBaseUpdate=xe,b.lastBaseUpdate=Be,xo|=N,a.lanes=N,a.memoizedState=Je}}function Xa(a,l,f){if(a=l.effects,l.effects=null,a!==null)for(l=0;l<a.length;l++){var y=a[l],b=y.callback;if(b!==null){if(y.callback=null,y=f,typeof b!="function")throw Error(v(191,b));b.call(y)}}}var Md=new c.Component().refs;function oa(a,l,f,y){l=a.memoizedState,f=f(y,l),f=f==null?l:o({},l,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Ll={isMounted:function(a){return(a=a._reactInternals)?Se(a)===a:!1},enqueueSetState:function(a,l,f){a=a._reactInternals;var y=vi(),b=Cn(a),T=dr(y,b);T.payload=l,f!=null&&(T.callback=f),hr(a,T),Nr(a,b,y)},enqueueReplaceState:function(a,l,f){a=a._reactInternals;var y=vi(),b=Cn(a),T=dr(y,b);T.tag=1,T.payload=l,f!=null&&(T.callback=f),hr(a,T),Nr(a,b,y)},enqueueForceUpdate:function(a,l){a=a._reactInternals;var f=vi(),y=Cn(a),b=dr(f,y);b.tag=2,l!=null&&(b.callback=l),hr(a,b),Nr(a,y,f)}};function la(a,l,f,y,b,T,N){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,T,N):l.prototype&&l.prototype.isPureReactComponent?!Rl(f,y)||!Rl(b,T):!0}function Od(a,l,f){var y=!1,b=ur,T=l.contextType;return typeof T=="object"&&T!==null?T=wi(T):(b=en(l)?_n:cn.current,y=l.contextTypes,T=(y=y!=null)?cr(a,b):ur),l=new l(f,T),a.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Ll,a.stateNode=l,l._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=T),l}function Pl(a,l,f,y){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,y),l.state!==a&&Ll.enqueueReplaceState(l,l.state,null)}function kl(a,l,f,y){var b=a.stateNode;b.props=f,b.state=a.memoizedState,b.refs=Md,Ii(a);var T=l.contextType;typeof T=="object"&&T!==null?b.context=wi(T):(T=en(l)?_n:cn.current,b.context=cr(a,T)),Cs(a,f,b,y),b.state=a.memoizedState,T=l.getDerivedStateFromProps,typeof T=="function"&&(oa(a,l,T,f),b.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(l=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),l!==b.state&&Ll.enqueueReplaceState(b,b.state,null),Cs(a,f,b,y),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4)}var Ka=Array.isArray;function Xr(a,l,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(v(309));var y=f.stateNode}if(!y)throw Error(v(147,a));var b=""+a;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===b?l.ref:(l=function(T){var N=y.refs;N===Md&&(N=y.refs={}),T===null?delete N[b]:N[b]=T},l._stringRef=b,l)}if(typeof a!="string")throw Error(v(284));if(!f._owner)throw Error(v(290,a))}return a}function fi(a,l){if(a.type!=="textarea")throw Error(v(31,Object.prototype.toString.call(l)==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":l))}function zl(a){function l(G,W){if(a){var ne=G.lastEffect;ne!==null?(ne.nextEffect=W,G.lastEffect=W):G.firstEffect=G.lastEffect=W,W.nextEffect=null,W.flags=8}}function f(G,W){if(!a)return null;for(;W!==null;)l(G,W),W=W.sibling;return null}function y(G,W){for(G=new Map;W!==null;)W.key!==null?G.set(W.key,W):G.set(W.index,W),W=W.sibling;return G}function b(G,W){return G=Ht(G,W),G.index=0,G.sibling=null,G}function T(G,W,ne){return G.index=ne,a?(ne=G.alternate,ne!==null?(ne=ne.index,ne<W?(G.flags=2,W):ne):(G.flags=2,W)):W}function N(G){return a&&G.alternate===null&&(G.flags=2),G}function F(G,W,ne,Ae){return W===null||W.tag!==6?(W=No(ne,G.mode,Ae),W.return=G,W):(W=b(W,ne),W.return=G,W)}function te(G,W,ne,Ae){return W!==null&&W.elementType===ne.type?(Ae=b(W,ne.props),Ae.ref=Xr(G,W,ne),Ae.return=G,Ae):(Ae=zo(ne.type,ne.key,ne.props,null,G.mode,Ae),Ae.ref=Xr(G,W,ne),Ae.return=G,Ae)}function xe(G,W,ne,Ae){return W===null||W.tag!==4||W.stateNode.containerInfo!==ne.containerInfo||W.stateNode.implementation!==ne.implementation?(W=Ta(ne,G.mode,Ae),W.return=G,W):(W=b(W,ne.children||[]),W.return=G,W)}function Be(G,W,ne,Ae,He){return W===null||W.tag!==7?(W=js(ne,G.mode,Ae,He),W.return=G,W):(W=b(W,ne),W.return=G,W)}function Je(G,W,ne){if(typeof W=="string"||typeof W=="number")return W=No(""+W,G.mode,ne),W.return=G,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return ne=zo(W.type,W.key,W.props,null,G.mode,ne),ne.ref=Xr(G,null,W),ne.return=G,ne;case m:return W=Ta(W,G.mode,ne),W.return=G,W}if(Ka(W)||me(W))return W=js(W,G.mode,ne,null),W.return=G,W;fi(G,W)}return null}function Me(G,W,ne,Ae){var He=W!==null?W.key:null;if(typeof ne=="string"||typeof ne=="number")return He!==null?null:F(G,W,""+ne,Ae);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return ne.key===He?ne.type===w?Be(G,W,ne.props.children,Ae,He):te(G,W,ne,Ae):null;case m:return ne.key===He?xe(G,W,ne,Ae):null}if(Ka(ne)||me(ne))return He!==null?null:Be(G,W,ne,Ae,null);fi(G,ne)}return null}function Pt(G,W,ne,Ae,He){if(typeof Ae=="string"||typeof Ae=="number")return G=G.get(ne)||null,F(W,G,""+Ae,He);if(typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case x:return G=G.get(Ae.key===null?ne:Ae.key)||null,Ae.type===w?Be(W,G,Ae.props.children,He,Ae.key):te(W,G,Ae,He);case m:return G=G.get(Ae.key===null?ne:Ae.key)||null,xe(W,G,Ae,He)}if(Ka(Ae)||me(Ae))return G=G.get(ne)||null,Be(W,G,Ae,He,null);fi(W,Ae)}return null}function Qt(G,W,ne,Ae){for(var He=null,kt=null,et=W,Rt=W=0,En=null;et!==null&&Rt<ne.length;Rt++){et.index>Rt?(En=et,et=null):En=et.sibling;var mt=Me(G,et,ne[Rt],Ae);if(mt===null){et===null&&(et=En);break}a&&et&&mt.alternate===null&&l(G,et),W=T(mt,W,Rt),kt===null?He=mt:kt.sibling=mt,kt=mt,et=En}if(Rt===ne.length)return f(G,et),He;if(et===null){for(;Rt<ne.length;Rt++)et=Je(G,ne[Rt],Ae),et!==null&&(W=T(et,W,Rt),kt===null?He=et:kt.sibling=et,kt=et);return He}for(et=y(G,et);Rt<ne.length;Rt++)En=Pt(et,G,Rt,ne[Rt],Ae),En!==null&&(a&&En.alternate!==null&&et.delete(En.key===null?Rt:En.key),W=T(En,W,Rt),kt===null?He=En:kt.sibling=En,kt=En);return a&&et.forEach(function(_r){return l(G,_r)}),He}function Oi(G,W,ne,Ae){var He=me(ne);if(typeof He!="function")throw Error(v(150));if(ne=He.call(ne),ne==null)throw Error(v(151));for(var kt=He=null,et=W,Rt=W=0,En=null,mt=ne.next();et!==null&&!mt.done;Rt++,mt=ne.next()){et.index>Rt?(En=et,et=null):En=et.sibling;var _r=Me(G,et,mt.value,Ae);if(_r===null){et===null&&(et=En);break}a&&et&&_r.alternate===null&&l(G,et),W=T(_r,W,Rt),kt===null?He=_r:kt.sibling=_r,kt=_r,et=En}if(mt.done)return f(G,et),He;if(et===null){for(;!mt.done;Rt++,mt=ne.next())mt=Je(G,mt.value,Ae),mt!==null&&(W=T(mt,W,Rt),kt===null?He=mt:kt.sibling=mt,kt=mt);return He}for(et=y(G,et);!mt.done;Rt++,mt=ne.next())mt=Pt(et,G,Rt,mt.value,Ae),mt!==null&&(a&&mt.alternate!==null&&et.delete(mt.key===null?Rt:mt.key),W=T(mt,W,Rt),kt===null?He=mt:kt.sibling=mt,kt=mt);return a&&et.forEach(function(Av){return l(G,Av)}),He}return function(G,W,ne,Ae){var He=typeof ne=="object"&&ne!==null&&ne.type===w&&ne.key===null;He&&(ne=ne.props.children);var kt=typeof ne=="object"&&ne!==null;if(kt)switch(ne.$$typeof){case x:e:{for(kt=ne.key,He=W;He!==null;){if(He.key===kt){switch(He.tag){case 7:if(ne.type===w){f(G,He.sibling),W=b(He,ne.props.children),W.return=G,G=W;break e}break;default:if(He.elementType===ne.type){f(G,He.sibling),W=b(He,ne.props),W.ref=Xr(G,He,ne),W.return=G,G=W;break e}}f(G,He);break}else l(G,He);He=He.sibling}ne.type===w?(W=js(ne.props.children,G.mode,Ae,ne.key),W.return=G,G=W):(Ae=zo(ne.type,ne.key,ne.props,null,G.mode,Ae),Ae.ref=Xr(G,W,ne),Ae.return=G,G=Ae)}return N(G);case m:e:{for(He=ne.key;W!==null;){if(W.key===He)if(W.tag===4&&W.stateNode.containerInfo===ne.containerInfo&&W.stateNode.implementation===ne.implementation){f(G,W.sibling),W=b(W,ne.children||[]),W.return=G,G=W;break e}else{f(G,W);break}else l(G,W);W=W.sibling}W=Ta(ne,G.mode,Ae),W.return=G,G=W}return N(G)}if(typeof ne=="string"||typeof ne=="number")return ne=""+ne,W!==null&&W.tag===6?(f(G,W.sibling),W=b(W,ne),W.return=G,G=W):(f(G,W),W=No(ne,G.mode,Ae),W.return=G,G=W),N(G);if(Ka(ne))return Qt(G,W,ne,Ae);if(me(ne))return Oi(G,W,ne,Ae);if(kt&&fi(G,ne),typeof ne>"u"&&!He)switch(G.tag){case 1:case 22:case 0:case 11:case 15:throw Error(v(152,Re(G.type)||"Component"))}return f(G,W)}}var Rs=zl(!0),pr=zl(!1),Fi={},Ft=Ni(Fi),Sn=Ni(Fi),Kr=Ni(Fi);function fn(a){if(a===Fi)throw Error(v(174));return a}function er(a,l){un(Kr,l),un(Sn,a),un(Ft,Fi),a=ue(l),vt(Ft),un(Ft,a)}function ei(){vt(Ft),vt(Sn),vt(Kr)}function Nl(a){var l=fn(Kr.current),f=fn(Ft.current);l=se(f,a.type,l),f!==l&&(un(Sn,a),un(Ft,l))}function Zr(a){Sn.current===a&&(vt(Ft),vt(Sn))}var an=Ni(0);function Mr(a){for(var l=a;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||gl(f)||yl(f)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if(l.flags&64)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Bi=null,Wn=null,Ti=!1;function _l(a,l){var f=Mi(5,null,null,0);f.elementType="DELETED",f.type="DELETED",f.stateNode=l,f.return=a,f.flags=8,a.lastEffect!==null?(a.lastEffect.nextEffect=f,a.lastEffect=f):a.firstEffect=a.lastEffect=f}function fc(a,l){switch(a.tag){case 5:return l=Ju(l,a.type,a.pendingProps),l!==null?(a.stateNode=l,!0):!1;case 6:return l=ec(l,a.pendingProps),l!==null?(a.stateNode=l,!0):!1;case 13:return!1;default:return!1}}function Ul(a){if(Ti){var l=Wn;if(l){var f=l;if(!fc(a,l)){if(l=U(f),!l||!fc(a,l)){a.flags=a.flags&-1025|2,Ti=!1,Bi=a;return}_l(Bi,f)}Bi=a,Wn=he(l)}else a.flags=a.flags&-1025|2,Ti=!1,Bi=a}}function Za(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Bi=a}function Ja(a){if(!bt||a!==Bi)return!1;if(!Ti)return Za(a),Ti=!0,!1;var l=a.type;if(a.tag!==5||l!=="head"&&l!=="body"&&!wt(l,a.memoizedProps))for(l=Wn;l;)_l(a,l),l=U(l);if(Za(a),a.tag===13){if(!bt)throw Error(v(316));if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(v(317));Wn=xt(a)}else Wn=Bi?U(a.stateNode):null;return!0}function dc(){bt&&(Wn=Bi=null,Ti=!1)}var As=[];function jl(){for(var a=0;a<As.length;a++){var l=As[a];We?l._workInProgressVersionPrimary=null:l._workInProgressVersionSecondary=null}As.length=0}var ua=g.ReactCurrentDispatcher,ti=g.ReactCurrentBatchConfig,di=0,qt=null,Vn=null,Un=null,Il=!1,eo=!1;function hi(){throw Error(v(321))}function hc(a,l){if(l===null)return!1;for(var f=0;f<l.length&&f<a.length;f++)if(!ji(a[f],l[f]))return!1;return!0}function Fl(a,l,f,y,b,T){if(di=T,qt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,ua.current=a===null||a.memoizedState===null?oo:Wl,a=f(y,b),eo){T=0;do{if(eo=!1,!(25>T))throw Error(v(301));T+=1,Un=Vn=null,l.updateQueue=null,ua.current=Vl,a=f(y,b)}while(eo)}if(ua.current=Tt,l=Vn!==null&&Vn.next!==null,di=0,Un=Vn=qt=null,Il=!1,l)throw Error(v(300));return a}function Jr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Un===null?qt.memoizedState=Un=a:Un=Un.next=a,Un}function es(){if(Vn===null){var a=qt.alternate;a=a!==null?a.memoizedState:null}else a=Vn.next;var l=Un===null?qt.memoizedState:Un.next;if(l!==null)Un=l,Vn=a;else{if(a===null)throw Error(v(310));Vn=a,a={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},Un===null?qt.memoizedState=Un=a:Un=Un.next=a}return Un}function vr(a,l){return typeof l=="function"?l(a):l}function ca(a){var l=es(),f=l.queue;if(f===null)throw Error(v(311));f.lastRenderedReducer=a;var y=Vn,b=y.baseQueue,T=f.pending;if(T!==null){if(b!==null){var N=b.next;b.next=T.next,T.next=N}y.baseQueue=b=T,f.pending=null}if(b!==null){b=b.next,y=y.baseState;var F=N=T=null,te=b;do{var xe=te.lane;if((di&xe)===xe)F!==null&&(F=F.next={lane:0,action:te.action,eagerReducer:te.eagerReducer,eagerState:te.eagerState,next:null}),y=te.eagerReducer===a?te.eagerState:a(y,te.action);else{var Be={lane:xe,action:te.action,eagerReducer:te.eagerReducer,eagerState:te.eagerState,next:null};F===null?(N=F=Be,T=y):F=F.next=Be,qt.lanes|=xe,xo|=xe}te=te.next}while(te!==null&&te!==b);F===null?T=y:F.next=N,ji(y,l.memoizedState)||(Hi=!0),l.memoizedState=y,l.baseState=T,l.baseQueue=F,f.lastRenderedState=y}return[l.memoizedState,f.dispatch]}function to(a){var l=es(),f=l.queue;if(f===null)throw Error(v(311));f.lastRenderedReducer=a;var y=f.dispatch,b=f.pending,T=l.memoizedState;if(b!==null){f.pending=null;var N=b=b.next;do T=a(T,N.action),N=N.next;while(N!==b);ji(T,l.memoizedState)||(Hi=!0),l.memoizedState=T,l.baseQueue===null&&(l.baseState=T),f.lastRenderedState=T}return[T,y]}function Ms(a,l,f){var y=l._getVersion;y=y(l._source);var b=We?l._workInProgressVersionPrimary:l._workInProgressVersionSecondary;if(b!==null?a=b===y:(a=a.mutableReadLanes,(a=(di&a)===a)&&(We?l._workInProgressVersionPrimary=y:l._workInProgressVersionSecondary=y,As.push(l))),a)return f(l._source);throw As.push(l),Error(v(350))}function no(a,l,f,y){var b=qn;if(b===null)throw Error(v(349));var T=l._getVersion,N=T(l._source),F=ua.current,te=F.useState(function(){return Ms(b,l,f)}),xe=te[1],Be=te[0];te=Un;var Je=a.memoizedState,Me=Je.refs,Pt=Me.getSnapshot,Qt=Je.source;Je=Je.subscribe;var Oi=qt;return a.memoizedState={refs:Me,source:l,subscribe:y},F.useEffect(function(){Me.getSnapshot=f,Me.setSnapshot=xe;var G=T(l._source);if(!ji(N,G)){G=f(l._source),ji(Be,G)||(xe(G),G=Cn(Oi),b.mutableReadLanes|=G&b.pendingLanes),G=b.mutableReadLanes,b.entangledLanes|=G;for(var W=b.entanglements,ne=G;0<ne;){var Ae=31-Gr(ne),He=1<<Ae;W[Ae]|=G,ne&=~He}}},[f,l,y]),F.useEffect(function(){return y(l._source,function(){var G=Me.getSnapshot,W=Me.setSnapshot;try{W(G(l._source));var ne=Cn(Oi);b.mutableReadLanes|=ne&b.pendingLanes}catch(Ae){W(function(){throw Ae})}})},[l,y]),ji(Pt,f)&&ji(Qt,l)&&ji(Je,y)||(a={pending:null,dispatch:null,lastRenderedReducer:vr,lastRenderedState:Be},a.dispatch=xe=$n.bind(null,qt,a),te.queue=a,te.baseQueue=null,Be=Ms(b,l,f),te.memoizedState=te.baseState=Be),Be}function pc(a,l,f){var y=es();return no(y,a,l,f)}function ts(a){var l=Jr();return typeof a=="function"&&(a=a()),l.memoizedState=l.baseState=a,a=l.queue={pending:null,dispatch:null,lastRenderedReducer:vr,lastRenderedState:a},a=a.dispatch=$n.bind(null,qt,a),[l.memoizedState,a]}function io(a,l,f,y){return a={tag:a,create:l,destroy:f,deps:y,next:null},l=qt.updateQueue,l===null?(l={lastEffect:null},qt.updateQueue=l,l.lastEffect=a.next=a):(f=l.lastEffect,f===null?l.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,l.lastEffect=a)),a}function Os(a){var l=Jr();return a={current:a},l.memoizedState=a}function ro(){return es().memoizedState}function Or(a,l,f,y){var b=Jr();qt.flags|=a,b.memoizedState=io(1|l,f,void 0,y===void 0?null:y)}function Bl(a,l,f,y){var b=es();y=y===void 0?null:y;var T=void 0;if(Vn!==null){var N=Vn.memoizedState;if(T=N.destroy,y!==null&&hc(y,N.deps)){io(l,f,T,y);return}}qt.flags|=a,b.memoizedState=io(1|l,f,T,y)}function so(a,l){return Or(516,4,a,l)}function fa(a,l){return Bl(516,4,a,l)}function vc(a,l){return Bl(4,2,a,l)}function mc(a,l){if(typeof l=="function")return a=a(),l(a),function(){l(null)};if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function ao(a,l,f){return f=f!=null?f.concat([a]):null,Bl(4,2,mc.bind(null,l,a),f)}function Hl(){}function Dr(a,l){var f=es();l=l===void 0?null:l;var y=f.memoizedState;return y!==null&&l!==null&&hc(l,y[1])?y[0]:(f.memoizedState=[a,l],a)}function Dd(a,l){var f=es();l=l===void 0?null:l;var y=f.memoizedState;return y!==null&&l!==null&&hc(l,y[1])?y[0]:(a=a(),f.memoizedState=[a,l],a)}function ce(a,l){var f=sa();Cr(98>f?98:f,function(){a(!0)}),Cr(97<f?97:f,function(){var y=ti.transition;ti.transition=1;try{a(!1),l()}finally{ti.transition=y}})}function $n(a,l,f){var y=vi(),b=Cn(a),T={lane:b,action:f,eagerReducer:null,eagerState:null,next:null},N=l.pending;if(N===null?T.next=T:(T.next=N.next,N.next=T),l.pending=T,N=a.alternate,a===qt||N!==null&&N===qt)eo=Il=!0;else{if(a.lanes===0&&(N===null||N.lanes===0)&&(N=l.lastRenderedReducer,N!==null))try{var F=l.lastRenderedState,te=N(F,f);if(T.eagerReducer=N,T.eagerState=te,ji(te,F))return}catch{}finally{}Nr(a,b,y)}}var Tt={readContext:wi,useCallback:hi,useContext:hi,useEffect:hi,useImperativeHandle:hi,useLayoutEffect:hi,useMemo:hi,useReducer:hi,useRef:hi,useState:hi,useDebugValue:hi,useDeferredValue:hi,useTransition:hi,useMutableSource:hi,useOpaqueIdentifier:hi,unstable_isNewReconciler:!1},oo={readContext:wi,useCallback:function(a,l){return Jr().memoizedState=[a,l===void 0?null:l],a},useContext:wi,useEffect:so,useImperativeHandle:function(a,l,f){return f=f!=null?f.concat([a]):null,Or(4,2,mc.bind(null,l,a),f)},useLayoutEffect:function(a,l){return Or(4,2,a,l)},useMemo:function(a,l){var f=Jr();return l=l===void 0?null:l,a=a(),f.memoizedState=[a,l],a},useReducer:function(a,l,f){var y=Jr();return l=f!==void 0?f(l):l,y.memoizedState=y.baseState=l,a=y.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},a=a.dispatch=$n.bind(null,qt,a),[y.memoizedState,a]},useRef:Os,useState:ts,useDebugValue:Hl,useDeferredValue:function(a){var l=ts(a),f=l[0],y=l[1];return so(function(){var b=ti.transition;ti.transition=1;try{y(a)}finally{ti.transition=b}},[a]),f},useTransition:function(){var a=ts(!1),l=a[0];return a=ce.bind(null,a[1]),Os(a),[a,l]},useMutableSource:function(a,l,f){var y=Jr();return y.memoizedState={refs:{getSnapshot:l,setSnapshot:null},source:a,subscribe:f},no(y,a,l,f)},useOpaqueIdentifier:function(){if(Ti){var a=!1,l=j(function(){throw a||(a=!0,f(z())),Error(v(355))}),f=ts(l)[1];return!(qt.mode&2)&&(qt.flags|=516,io(5,function(){f(z())},void 0,null)),l}return l=z(),ts(l),l},unstable_isNewReconciler:!1},Wl={readContext:wi,useCallback:Dr,useContext:wi,useEffect:fa,useImperativeHandle:ao,useLayoutEffect:vc,useMemo:Dd,useReducer:ca,useRef:ro,useState:function(){return ca(vr)},useDebugValue:Hl,useDeferredValue:function(a){var l=ca(vr),f=l[0],y=l[1];return fa(function(){var b=ti.transition;ti.transition=1;try{y(a)}finally{ti.transition=b}},[a]),f},useTransition:function(){var a=ca(vr)[0];return[ro().current,a]},useMutableSource:pc,useOpaqueIdentifier:function(){return ca(vr)[0]},unstable_isNewReconciler:!1},Vl={readContext:wi,useCallback:Dr,useContext:wi,useEffect:fa,useImperativeHandle:ao,useLayoutEffect:vc,useMemo:Dd,useReducer:to,useRef:ro,useState:function(){return to(vr)},useDebugValue:Hl,useDeferredValue:function(a){var l=to(vr),f=l[0],y=l[1];return fa(function(){var b=ti.transition;ti.transition=1;try{y(a)}finally{ti.transition=b}},[a]),f},useTransition:function(){var a=to(vr)[0];return[ro().current,a]},useMutableSource:pc,useOpaqueIdentifier:function(){return to(vr)[0]},unstable_isNewReconciler:!1},Ld=g.ReactCurrentOwner,Hi=!1;function ni(a,l,f,y){l.child=a===null?pr(l,null,f,y):Rs(l,a.child,f,y)}function $l(a,l,f,y,b){f=f.render;var T=l.ref;return Ts(l,b),y=Fl(a,l,f,y,T,b),a!==null&&!Hi?(l.updateQueue=a.updateQueue,l.flags&=-517,a.lanes&=~b,Pr(a,l,b)):(l.flags|=1,ni(a,l,y,b),l.child)}function gc(a,l,f,y,b,T){if(a===null){var N=f.type;return typeof N=="function"&&!Pc(N)&&N.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=N,Ds(a,l,N,y,b,T)):(a=zo(f.type,null,y,l,l.mode,T),a.ref=l.ref,a.return=l,l.child=a)}return N=a.child,!(b&T)&&(b=N.memoizedProps,f=f.compare,f=f!==null?f:Rl,f(b,y)&&a.ref===l.ref)?Pr(a,l,T):(l.flags|=1,a=Ht(N,y),a.ref=l.ref,a.return=l,l.child=a)}function Ds(a,l,f,y,b,T){if(a!==null&&Rl(a.memoizedProps,y)&&a.ref===l.ref)if(Hi=!1,(T&b)!==0)a.flags&16384&&(Hi=!0);else return l.lanes=a.lanes,Pr(a,l,T);return lo(a,l,f,y,T)}function da(a,l,f){var y=l.pendingProps,b=y.children,T=a!==null?a.memoizedState:null;if(y.mode==="hidden"||y.mode==="unstable-defer-without-hiding")if(!(l.mode&4))l.memoizedState={baseLanes:0},Fn(l,f);else if(f&1073741824)l.memoizedState={baseLanes:0},Fn(l,T!==null?T.baseLanes:f);else return a=T!==null?T.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:a},Fn(l,a),null;else T!==null?(y=T.baseLanes|f,l.memoizedState=null):y=f,Fn(l,y);return ni(a,l,b,f),l.child}function Ls(a,l){var f=l.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(l.flags|=128)}function lo(a,l,f,y,b){var T=en(f)?_n:cn.current;return T=cr(l,T),Ts(l,b),f=Fl(a,l,f,y,T,b),a!==null&&!Hi?(l.updateQueue=a.updateQueue,l.flags&=-517,a.lanes&=~b,Pr(a,l,b)):(l.flags|=1,ni(a,l,f,b),l.child)}function yc(a,l,f,y,b){if(en(f)){var T=!0;$a(l)}else T=!1;if(Ts(l,b),l.stateNode===null)a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),Od(l,f,y),kl(l,f,y,b),y=!0;else if(a===null){var N=l.stateNode,F=l.memoizedProps;N.props=F;var te=N.context,xe=f.contextType;typeof xe=="object"&&xe!==null?xe=wi(xe):(xe=en(f)?_n:cn.current,xe=cr(l,xe));var Be=f.getDerivedStateFromProps,Je=typeof Be=="function"||typeof N.getSnapshotBeforeUpdate=="function";Je||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(F!==y||te!==xe)&&Pl(l,N,y,xe),Rr=!1;var Me=l.memoizedState;N.state=Me,Cs(l,y,N,b),te=l.memoizedState,F!==y||Me!==te||Hn.current||Rr?(typeof Be=="function"&&(oa(l,f,Be,y),te=l.memoizedState),(F=Rr||la(l,f,F,y,Me,te,xe))?(Je||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(l.flags|=4)):(typeof N.componentDidMount=="function"&&(l.flags|=4),l.memoizedProps=y,l.memoizedState=te),N.props=y,N.state=te,N.context=xe,y=F):(typeof N.componentDidMount=="function"&&(l.flags|=4),y=!1)}else{N=l.stateNode,Ji(a,l),F=l.memoizedProps,xe=l.type===l.elementType?F:Zi(l.type,F),N.props=xe,Je=l.pendingProps,Me=N.context,te=f.contextType,typeof te=="object"&&te!==null?te=wi(te):(te=en(f)?_n:cn.current,te=cr(l,te));var Pt=f.getDerivedStateFromProps;(Be=typeof Pt=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(F!==Je||Me!==te)&&Pl(l,N,y,te),Rr=!1,Me=l.memoizedState,N.state=Me,Cs(l,y,N,b);var Qt=l.memoizedState;F!==Je||Me!==Qt||Hn.current||Rr?(typeof Pt=="function"&&(oa(l,f,Pt,y),Qt=l.memoizedState),(xe=Rr||la(l,f,xe,y,Me,Qt,te))?(Be||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(y,Qt,te),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(y,Qt,te)),typeof N.componentDidUpdate=="function"&&(l.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(l.flags|=256)):(typeof N.componentDidUpdate!="function"||F===a.memoizedProps&&Me===a.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||F===a.memoizedProps&&Me===a.memoizedState||(l.flags|=256),l.memoizedProps=y,l.memoizedState=Qt),N.props=y,N.state=Qt,N.context=te,y=xe):(typeof N.componentDidUpdate!="function"||F===a.memoizedProps&&Me===a.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||F===a.memoizedProps&&Me===a.memoizedState||(l.flags|=256),y=!1)}return ql(a,l,f,y,T,b)}function ql(a,l,f,y,b,T){Ls(a,l);var N=(l.flags&64)!==0;if(!y&&!N)return b&&xd(l,f,!1),Pr(a,l,T);y=l.stateNode,Ld.current=l;var F=N&&typeof f.getDerivedStateFromError!="function"?null:y.render();return l.flags|=1,a!==null&&N?(l.child=Rs(l,a.child,null,T),l.child=Rs(l,null,F,T)):ni(a,l,F,T),l.memoizedState=y.state,b&&xd(l,f,!0),l.child}function Yl(a){var l=a.stateNode;l.pendingContext?Sd(a,l.pendingContext,l.pendingContext!==l.context):l.context&&Sd(a,l.context,!1),er(a,l.containerInfo)}var Ci={dehydrated:null,retryLane:0};function on(a,l,f){var y=l.pendingProps,b=an.current,T=!1,N;return(N=(l.flags&64)!==0)||(N=a!==null&&a.memoizedState===null?!1:(b&2)!==0),N?(T=!0,l.flags&=-65):a!==null&&a.memoizedState===null||y.fallback===void 0||y.unstable_avoidThisFallback===!0||(b|=1),un(an,b&1),a===null?(y.fallback!==void 0&&Ul(l),a=y.children,b=y.fallback,T?(a=Sc(l,a,b,f),l.child.memoizedState={baseLanes:f},l.memoizedState=Ci,a):typeof y.unstable_expectedLoadTime=="number"?(a=Sc(l,a,b,f),l.child.memoizedState={baseLanes:f},l.memoizedState=Ci,l.lanes=33554432,a):(f=wa({mode:"visible",children:a},l.mode,f,null),f.return=l,l.child=f)):a.memoizedState!==null?T?(y=xc(a,l,y.children,y.fallback,f),T=l.child,b=a.child.memoizedState,T.memoizedState=b===null?{baseLanes:f}:{baseLanes:b.baseLanes|f},T.childLanes=a.childLanes&~f,l.memoizedState=Ci,y):(f=bc(a,l,y.children,f),l.memoizedState=null,f):T?(y=xc(a,l,y.children,y.fallback,f),T=l.child,b=a.child.memoizedState,T.memoizedState=b===null?{baseLanes:f}:{baseLanes:b.baseLanes|f},T.childLanes=a.childLanes&~f,l.memoizedState=Ci,y):(f=bc(a,l,y.children,f),l.memoizedState=null,f)}function Sc(a,l,f,y){var b=a.mode,T=a.child;return l={mode:"hidden",children:l},!(b&2)&&T!==null?(T.childLanes=0,T.pendingProps=l):T=wa(l,b,0,null),f=js(f,b,y,null),T.return=a,f.return=a,T.sibling=f,a.child=T,f}function bc(a,l,f,y){var b=a.child;return a=b.sibling,f=Ht(b,{mode:"visible",children:f}),!(l.mode&2)&&(f.lanes=y),f.return=l,f.sibling=null,a!==null&&(a.nextEffect=null,a.flags=8,l.firstEffect=l.lastEffect=a),l.child=f}function xc(a,l,f,y,b){var T=l.mode,N=a.child;a=N.sibling;var F={mode:"hidden",children:f};return!(T&2)&&l.child!==N?(f=l.child,f.childLanes=0,f.pendingProps=F,N=f.lastEffect,N!==null?(l.firstEffect=f.firstEffect,l.lastEffect=N,N.nextEffect=null):l.firstEffect=l.lastEffect=null):f=Ht(N,F),a!==null?y=Ht(a,y):(y=js(y,T,b,null),y.flags|=2),y.return=l,f.return=l,f.sibling=y,l.child=f,y}function Bt(a,l){a.lanes|=l;var f=a.alternate;f!==null&&(f.lanes|=l),cc(a.return,l)}function Lr(a,l,f,y,b,T){var N=a.memoizedState;N===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:b,lastEffect:T}:(N.isBackwards=l,N.rendering=null,N.renderingStartTime=0,N.last=y,N.tail=f,N.tailMode=b,N.lastEffect=T)}function Pd(a,l,f){var y=l.pendingProps,b=y.revealOrder,T=y.tail;if(ni(a,l,y.children,f),y=an.current,y&2)y=y&1|2,l.flags|=64;else{if(a!==null&&a.flags&64)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Bt(a,f);else if(a.tag===19)Bt(a,f);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}y&=1}if(un(an,y),!(l.mode&2))l.memoizedState=null;else switch(b){case"forwards":for(f=l.child,b=null;f!==null;)a=f.alternate,a!==null&&Mr(a)===null&&(b=f),f=f.sibling;f=b,f===null?(b=l.child,l.child=null):(b=f.sibling,f.sibling=null),Lr(l,!1,b,f,T,l.lastEffect);break;case"backwards":for(f=null,b=l.child,l.child=null;b!==null;){if(a=b.alternate,a!==null&&Mr(a)===null){l.child=b;break}a=b.sibling,b.sibling=f,f=b,b=a}Lr(l,!0,f,null,T,l.lastEffect);break;case"together":Lr(l,!1,null,null,void 0,l.lastEffect);break;default:l.memoizedState=null}return l.child}function Pr(a,l,f){if(a!==null&&(l.dependencies=a.dependencies),xo|=l.lanes,f&l.childLanes){if(a!==null&&l.child!==a.child)throw Error(v(153));if(l.child!==null){for(a=l.child,f=Ht(a,a.pendingProps),l.child=f,f.return=l;a.sibling!==null;)a=a.sibling,f=f.sibling=Ht(a,a.pendingProps),f.return=l;f.sibling=null}return l.child}return null}function pi(a){a.flags|=4}var uo,co,Ql,Gl;if(Qe)uo=function(a,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)dt(a,f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},co=function(){},Ql=function(a,l,f,y,b){if(a=a.memoizedProps,a!==y){var T=l.stateNode,N=fn(Ft.current);f=Xt(T,f,a,y,b,N),(l.updateQueue=f)&&pi(l)}},Gl=function(a,l,f,y){f!==y&&pi(l)};else if(St){uo=function(a,l,f,y){for(var b=l.child;b!==null;){if(b.tag===5){var T=b.stateNode;f&&y&&(T=ml(T,b.type,b.memoizedProps,b)),dt(a,T)}else if(b.tag===6)T=b.stateNode,f&&y&&(T=Qr(T,b.memoizedProps,b)),dt(a,T);else if(b.tag!==4){if(b.tag===13&&b.flags&4&&(T=b.memoizedState!==null)){var N=b.child;if(N!==null&&(N.child!==null&&(N.child.return=N,uo(a,N,!0,T)),T=N.sibling,T!==null)){T.return=b,b=T;continue}}if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===l)break;for(;b.sibling===null;){if(b.return===null||b.return===l)return;b=b.return}b.sibling.return=b.return,b=b.sibling}};var Ec=function(a,l,f,y){for(var b=l.child;b!==null;){if(b.tag===5){var T=b.stateNode;f&&y&&(T=ml(T,b.type,b.memoizedProps,b)),ws(a,T)}else if(b.tag===6)T=b.stateNode,f&&y&&(T=Qr(T,b.memoizedProps,b)),ws(a,T);else if(b.tag!==4){if(b.tag===13&&b.flags&4&&(T=b.memoizedState!==null)){var N=b.child;if(N!==null&&(N.child!==null&&(N.child.return=N,Ec(a,N,!0,T)),T=N.sibling,T!==null)){T.return=b,b=T;continue}}if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===l)break;for(;b.sibling===null;){if(b.return===null||b.return===l)return;b=b.return}b.sibling.return=b.return,b=b.sibling}};co=function(a){var l=a.stateNode;if(a.firstEffect!==null){var f=l.containerInfo,y=Va(f);Ec(y,a,!1,!1),l.pendingChildren=y,pi(a),Xi(f,y)}},Ql=function(a,l,f,y,b){var T=a.stateNode,N=a.memoizedProps;if((a=l.firstEffect===null)&&N===y)l.stateNode=T;else{var F=l.stateNode,te=fn(Ft.current),xe=null;N!==y&&(xe=Xt(F,f,N,y,b,te)),a&&xe===null?l.stateNode=T:(T=ia(T,xe,f,N,y,l,a,F),rn(T,f,y,b,te)&&pi(l),l.stateNode=T,a?pi(l):uo(T,l,!1,!1))}},Gl=function(a,l,f,y){f!==y?(a=fn(Kr.current),f=fn(Ft.current),l.stateNode=ht(y,a,f,l),pi(l)):l.stateNode=a.stateNode}}else co=function(){},Ql=function(){},Gl=function(){};function fo(a,l){if(!Ti)switch(a.tailMode){case"hidden":l=a.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function kd(a,l,f){var y=l.pendingProps;switch(l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return en(l.type)&&Sl(),null;case 3:return ei(),vt(Hn),vt(cn),jl(),y=l.stateNode,y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(Ja(l)?pi(l):y.hydrate||(l.flags|=256)),co(l),null;case 5:Zr(l);var b=fn(Kr.current);if(f=l.type,a!==null&&l.stateNode!=null)Ql(a,l,f,y,b),a.ref!==l.ref&&(l.flags|=128);else{if(!y){if(l.stateNode===null)throw Error(v(166));return null}if(a=fn(Ft.current),Ja(l)){if(!bt)throw Error(v(175));a=we(l.stateNode,l.type,l.memoizedProps,b,a,l),l.updateQueue=a,a!==null&&pi(l)}else{var T=ct(f,y,b,a,l);uo(T,l,!1,!1),l.stateNode=T,rn(T,f,y,b,a)&&pi(l)}l.ref!==null&&(l.flags|=128)}return null;case 6:if(a&&l.stateNode!=null)Gl(a,l,a.memoizedProps,y);else{if(typeof y!="string"&&l.stateNode===null)throw Error(v(166));if(a=fn(Kr.current),b=fn(Ft.current),Ja(l)){if(!bt)throw Error(v(176));Ke(l.stateNode,l.memoizedProps,l)&&pi(l)}else l.stateNode=ht(y,a,b,l)}return null;case 13:return vt(an),y=l.memoizedState,l.flags&64?(l.lanes=f,l):(y=y!==null,b=!1,a===null?l.memoizedProps.fallback!==void 0&&Ja(l):b=a.memoizedState!==null,y&&!b&&l.mode&2&&(a===null&&l.memoizedProps.unstable_avoidThisFallback!==!0||an.current&1?Dn===0&&(Dn=3):((Dn===0||Dn===3)&&(Dn=4),qn===null||!(xo&134217727)&&!(va&134217727)||zs(qn,zt))),St&&y&&(l.flags|=4),Qe&&(y||b)&&(l.flags|=4),null);case 4:return ei(),co(l),a===null&&at(l.stateNode.containerInfo),null;case 10:return Dl(l),null;case 17:return en(l.type)&&Sl(),null;case 19:if(vt(an),y=l.memoizedState,y===null)return null;if(b=(l.flags&64)!==0,T=y.rendering,T===null)if(b)fo(y,!1);else{if(Dn!==0||a!==null&&a.flags&64)for(a=l.child;a!==null;){if(T=Mr(a),T!==null){for(l.flags|=64,fo(y,!1),a=T.updateQueue,a!==null&&(l.updateQueue=a,l.flags|=4),y.lastEffect===null&&(l.firstEffect=null),l.lastEffect=y.lastEffect,a=f,y=l.child;y!==null;)b=y,f=a,b.flags&=2,b.nextEffect=null,b.firstEffect=null,b.lastEffect=null,T=b.alternate,T===null?(b.childLanes=0,b.lanes=f,b.child=null,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=T.childLanes,b.lanes=T.lanes,b.child=T.child,b.memoizedProps=T.memoizedProps,b.memoizedState=T.memoizedState,b.updateQueue=T.updateQueue,b.type=T.type,f=T.dependencies,b.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),y=y.sibling;return un(an,an.current&1|2),l.child}a=a.sibling}y.tail!==null&&On()>iu&&(l.flags|=64,b=!0,fo(y,!1),l.lanes=33554432)}else{if(!b)if(a=Mr(T),a!==null){if(l.flags|=64,b=!0,a=a.updateQueue,a!==null&&(l.updateQueue=a,l.flags|=4),fo(y,!0),y.tail===null&&y.tailMode==="hidden"&&!T.alternate&&!Ti)return l=l.lastEffect=y.lastEffect,l!==null&&(l.nextEffect=null),null}else 2*On()-y.renderingStartTime>iu&&f!==1073741824&&(l.flags|=64,b=!0,fo(y,!1),l.lanes=33554432);y.isBackwards?(T.sibling=l.child,l.child=T):(a=y.last,a!==null?a.sibling=T:l.child=T,y.last=T)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.lastEffect=l.lastEffect,y.renderingStartTime=On(),a.sibling=null,l=an.current,un(an,b?l&1|2:l&1),a):null;case 23:case 24:return xn(),a!==null&&a.memoizedState!==null!=(l.memoizedState!==null)&&y.mode!=="unstable-defer-without-hiding"&&(l.flags|=4),null}throw Error(v(156,l.tag))}function zd(a){switch(a.tag){case 1:en(a.type)&&Sl();var l=a.flags;return l&4096?(a.flags=l&-4097|64,a):null;case 3:if(ei(),vt(Hn),vt(cn),jl(),l=a.flags,l&64)throw Error(v(285));return a.flags=l&-4097|64,a;case 5:return Zr(a),null;case 13:return vt(an),l=a.flags,l&4096?(a.flags=l&-4097|64,a):null;case 19:return vt(an),null;case 4:return ei(),null;case 10:return Dl(a),null;case 23:case 24:return xn(),null;default:return null}}function wc(a,l){try{var f="",y=l;do f+=Sv(y),y=y.return;while(y);var b=f}catch(T){b=`
206
206
  Error generating stack: `+T.message+`
207
- `+T.stack}return{value:a,source:l,stack:b}}function ha(a,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var bv=typeof WeakMap=="function"?WeakMap:Map;function Nd(a,l,f){f=dr(-1,f),f.tag=3,f.payload={element:null};var y=l.value;return f.callback=function(){wo||(wo=!0,nr=y),ha(a,l)},f}function _d(a,l,f){f=dr(-1,f),f.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var b=l.value;f.payload=function(){return ha(a,l),y(b)}}var T=a.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(f.callback=function(){typeof y!="function"&&(jn===null?jn=new Set([this]):jn.add(this),ha(a,l));var N=l.stack;this.componentDidCatch(l.value,{componentStack:N!==null?N:""})}),f}var xv=typeof WeakSet=="function"?WeakSet:Set;function Ud(a){var l=a.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){sr(a,f)}else l.current=null}function ni(a,l){switch(l.tag){case 0:case 11:case 15:case 22:return;case 1:if(l.flags&256&&a!==null){var f=a.memoizedProps,y=a.memoizedState;a=l.stateNode,l=a.getSnapshotBeforeUpdate(l.elementType===l.type?f:Zi(l.type,f),y),a.__reactInternalSnapshotBeforeUpdate=l}return;case 3:ft&&l.flags&256&&xi(l.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(v(163))}function ns(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&a)===a){var y=f.destroy;f.destroy=void 0,y!==void 0&&y()}f=f.next}while(f!==l)}}function Ev(a,l,f){switch(f.tag){case 0:case 11:case 15:case 22:if(l=f.updateQueue,l=l!==null?l.lastEffect:null,l!==null){a=l=l.next;do{if((a.tag&3)===3){var y=a.create;a.destroy=y()}a=a.next}while(a!==l)}if(l=f.updateQueue,l=l!==null?l.lastEffect:null,l!==null){a=l=l.next;do{var b=a;y=b.next,b=b.tag,b&4&&b&1&&(Dc(f,a),au(f,a)),a=y}while(a!==l)}return;case 1:a=f.stateNode,f.flags&4&&(l===null?a.componentDidMount():(y=f.elementType===f.type?l.memoizedProps:Zi(f.type,l.memoizedProps),a.componentDidUpdate(y,l.memoizedState,a.__reactInternalSnapshotBeforeUpdate))),l=f.updateQueue,l!==null&&Xa(f,l,a);return;case 3:if(l=f.updateQueue,l!==null){if(a=null,f.child!==null)switch(f.child.tag){case 5:a=Ue(f.child.stateNode);break;case 1:a=f.child.stateNode}Xa(f,l,a)}return;case 5:a=f.stateNode,l===null&&f.flags&4&&Lt(a,f.type,f.memoizedProps,f);return;case 6:return;case 4:return;case 12:return;case 13:Qt&&f.memoizedState===null&&(f=f.alternate,f!==null&&(f=f.memoizedState,f!==null&&(f=f.dehydrated,f!==null&&vt(f))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(v(163))}function Un(a,l){if(ft)for(var f=a;;){if(f.tag===5){var y=f.stateNode;l?qr(y):Va(f.stateNode,f.memoizedProps)}else if(f.tag===6)y=f.stateNode,l?Ha(y):Yr(y,f.memoizedProps);else if((f.tag!==23&&f.tag!==24||f.memoizedState===null||f===a)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===a)break;for(;f.sibling===null;){if(f.return===null||f.return===a)return;f=f.return}f.sibling.return=f.return,f=f.sibling}}function is(a,l){if(Ni&&typeof Ni.onCommitFiberUnmount=="function")try{Ni.onCommitFiberUnmount(tc,l)}catch{}switch(l.tag){case 0:case 11:case 14:case 15:case 22:if(a=l.updateQueue,a!==null&&(a=a.lastEffect,a!==null)){var f=a=a.next;do{var y=f,b=y.destroy;if(y=y.tag,b!==void 0)if(y&4)Dc(l,f);else{y=l;try{b()}catch(T){sr(y,T)}}f=f.next}while(f!==a)}break;case 1:if(Ud(l),a=l.stateNode,typeof a.componentWillUnmount=="function")try{a.props=l.memoizedProps,a.state=l.memoizedState,a.componentWillUnmount()}catch(T){sr(l,T)}break;case 5:Ud(l);break;case 4:ft?Id(a,l):mn&&mn&&(l=l.stateNode.containerInfo,a=Wa(l),vl(l,a))}}function Ct(a,l){for(var f=l;;)if(is(a,f),f.child===null||ft&&f.tag===4){if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}else f.child.return=f,f=f.child}function ho(a){a.alternate=null,a.child=null,a.dependencies=null,a.firstEffect=null,a.lastEffect=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.return=null,a.updateQueue=null}function wv(a){return a.tag===5||a.tag===3||a.tag===4}function jd(a){if(ft){e:{for(var l=a.return;l!==null;){if(wv(l))break e;l=l.return}throw Error(v(160))}var f=l;switch(l=f.stateNode,f.tag){case 5:var y=!1;break;case 3:l=l.containerInfo,y=!0;break;case 4:l=l.containerInfo,y=!0;break;default:throw Error(v(161))}f.flags&16&&(bi(l),f.flags&=-17);e:t:for(f=a;;){for(;f.sibling===null;){if(f.return===null||wv(f.return)){f=null;break e}f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue t;f.child.return=f,f=f.child}if(!(f.flags&2)){f=f.stateNode;break e}}y?po(a,f,l):pa(a,f,l)}}function po(a,l,f){var y=a.tag,b=y===5||y===6;if(b)a=b?a.stateNode:a.stateNode.instance,l?Zt(f,a,l):Pe(f,a);else if(y!==4&&(a=a.child,a!==null))for(po(a,l,f),a=a.sibling;a!==null;)po(a,l,f),a=a.sibling}function pa(a,l,f){var y=a.tag,b=y===5||y===6;if(b)a=b?a.stateNode:a.stateNode.instance,l?an(f,a,l):Te(f,a);else if(y!==4&&(a=a.child,a!==null))for(pa(a,l,f),a=a.sibling;a!==null;)pa(a,l,f),a=a.sibling}function Id(a,l){for(var f=l,y=!1,b,T;;){if(!y){y=f.return;e:for(;;){if(y===null)throw Error(v(160));switch(b=y.stateNode,y.tag){case 5:T=!1;break e;case 3:b=b.containerInfo,T=!0;break e;case 4:b=b.containerInfo,T=!0;break e}y=y.return}y=!0}if(f.tag===5||f.tag===6)Ct(a,f),T?nn(b,f.stateNode):Fn(b,f.stateNode);else if(f.tag===4){if(f.child!==null){b=f.stateNode.containerInfo,T=!0,f.child.return=f,f=f.child;continue}}else if(is(a,f),f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return,f.tag===4&&(y=!1)}f.sibling.return=f.return,f=f.sibling}}function Xl(a,l){if(ft){switch(l.tag){case 0:case 11:case 14:case 15:case 22:ns(3,l);return;case 1:return;case 5:var f=l.stateNode;if(f!=null){var y=l.memoizedProps;a=a!==null?a.memoizedProps:y;var b=l.type,T=l.updateQueue;l.updateQueue=null,T!==null&&tt(f,T,b,a,y,l)}return;case 6:if(l.stateNode===null)throw Error(v(162));f=l.memoizedProps,rt(l.stateNode,a!==null?a.memoizedProps:f,f);return;case 3:Qt&&(l=l.stateNode,l.hydrate&&(l.hydrate=!1,At(l.containerInfo)));return;case 12:return;case 13:Fd(l),Kl(l);return;case 19:Kl(l);return;case 17:return;case 23:case 24:Un(l,l.memoizedState!==null);return}throw Error(v(163))}switch(l.tag){case 0:case 11:case 14:case 15:case 22:ns(3,l);return;case 12:return;case 13:Fd(l),Kl(l);return;case 19:Kl(l);return;case 3:Qt&&(f=l.stateNode,f.hydrate&&(f.hydrate=!1,At(f.containerInfo)));break;case 23:case 24:return}e:if(mn){switch(l.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:l=l.stateNode,vl(l.containerInfo,l.pendingChildren);break e}throw Error(v(163))}}function Fd(a){a.memoizedState!==null&&(Eo=On(),ft&&Un(a.child,!0))}function Kl(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new xv),l.forEach(function(y){var b=ou.bind(null,a,y);f.has(y)||(f.add(y),y.then(b,b))})}}function Tv(a,l){return a!==null&&(a=a.memoizedState,a===null||a.dehydrated!==null)?(l=l.memoizedState,l!==null&&l.dehydrated===null):!1}var vo=0,Zl=1,Jl=2,mo=3,eu=4;if(typeof Symbol=="function"&&Symbol.for){var go=Symbol.for;vo=go("selector.component"),Zl=go("selector.has_pseudo_class"),Jl=go("selector.role"),mo=go("selector.test_id"),eu=go("selector.text")}function Tc(a){var l=Gi(a);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(v(364));return l}if(a=gn(a),a===null)throw Error(v(362));return a.stateNode.current}function Cc(a,l){switch(l.$$typeof){case vo:if(a.type===l.value)return!0;break;case Zl:e:{l=l.value,a=[a,0];for(var f=0;f<a.length;){var y=a[f++],b=a[f++],T=l[b];if(y.tag!==5||!at(y)){for(;T!=null&&Cc(y,T);)b++,T=l[b];if(b===l.length){l=!0;break e}else for(y=y.child;y!==null;)a.push(y,b),y=y.sibling}}l=!1}return l;case Jl:if(a.tag===5&&ui(a.stateNode,l.value))return!0;break;case eu:if((a.tag===5||a.tag===6)&&(a=be(a),a!==null&&0<=a.indexOf(l.value)))return!0;break;case mo:if(a.tag===5&&(a=a.memoizedProps["data-testname"],typeof a=="string"&&a.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(v(365,l))}return!1}function yo(a){switch(a.$$typeof){case vo:return"<"+(Ce(a.value)||"Unknown")+">";case Zl:return":has("+(yo(a)||"")+")";case Jl:return'[role="'+a.value+'"]';case eu:return'"'+a.value+'"';case mo:return'[data-testname="'+a.value+'"]';default:throw Error(v(365,a))}}function Rc(a,l){var f=[];a=[a,0];for(var y=0;y<a.length;){var b=a[y++],T=a[y++],N=l[T];if(b.tag!==5||!at(b)){for(;N!=null&&Cc(b,N);)T++,N=l[T];if(T===l.length)f.push(b);else for(b=b.child;b!==null;)a.push(b,T),b=b.sibling}}return f}function Ac(a,l){if(!Ve)throw Error(v(363));a=Tc(a),a=Rc(a,l),l=[],a=Array.from(a);for(var f=0;f<a.length;){var y=a[f++];if(y.tag===5)at(y)||l.push(y.stateNode);else for(y=y.child;y!==null;)a.push(y),y=y.sibling}return l}var So=null;function Mc(a){if(So===null)try{var l=("require"+Math.random()).slice(0,7);So=(t&&t[l]).call(t,"timers").setImmediate}catch{So=function(y){var b=new MessageChannel;b.port1.onmessage=y,b.port2.postMessage(void 0)}}return So(a)}var Cv=Math.ceil,Ps=g.ReactCurrentDispatcher,tu=g.ReactCurrentOwner,nu=g.IsSomeRendererActing,qe=0,$n=null,bn=null,zt=0,Ci=0,Hi=zi(0),Dn=0,bo=null,rs=0,xo=0,va=0,tr=0,ma=null,Eo=0,iu=1/0;function en(){iu=On()+500}var Oe=null,wo=!1,nr=null,jn=null,ss=!1,ga=null,qn=90,ru=[],$t=[],Mt=null,Ln=0,kr=null,Yn=-1,zr=0,su=0,To=null,Co=!1;function pi(){return qe&48?On():Yn!==-1?Yn:Yn=On()}function Cn(a){if(a=a.mode,!(a&2))return 1;if(!(a&4))return sa()===99?1:2;if(zr===0&&(zr=rs),mv.transition!==0){su!==0&&(su=ma!==null?ma.pendingLanes:0),a=zr;var l=4186112&~su;return l&=-l,l===0&&(a=4186112&~a,l=a&-a,l===0&&(l=8192)),l}return a=sa(),qe&4&&a===98?a=xl(12,zr):(a=lv(a),a=xl(a,zr)),a}function Nr(a,l,f){if(50<Ln)throw Ln=0,kr=null,Error(v(185));if(a=ks(a,l),a===null)return null;El(a,l,f),a===$n&&(va|=l,Dn===4&&zs(a,zt));var y=sa();l===1?qe&8&&!(qe&48)?Qn(a):(Ri(a,f),qe===0&&(en(),_i())):(!(qe&4)||y!==98&&y!==99||(Mt===null?Mt=new Set([a]):Mt.add(a)),Ri(a,f)),ma=a}function ks(a,l){a.lanes|=l;var f=a.alternate;for(f!==null&&(f.lanes|=l),f=a,a=a.return;a!==null;)a.childLanes|=l,f=a.alternate,f!==null&&(f.childLanes|=l),f=a,a=a.return;return f.tag===3?f.stateNode:null}function Ri(a,l){for(var f=a.callbackNode,y=a.suspendedLanes,b=a.pingedLanes,T=a.expirationTimes,N=a.pendingLanes;0<N;){var B=31-Gr(N),ne=1<<B,xe=T[B];if(xe===-1){if(!(ne&y)||ne&b){xe=l,Ki(ne);var Fe=Vt;T[B]=10<=Fe?xe+250:6<=Fe?xe+5e3:-1}}else xe<=l&&(a.expiredLanes|=ne);N&=~ne}if(y=qa(a,a===$n?zt:0),l=Vt,y===0)f!==null&&(f!==wl&&rc(f),a.callbackNode=null,a.callbackPriority=0);else{if(f!==null){if(a.callbackPriority===l)return;f!==wl&&rc(f)}l===15?(f=Qn.bind(null,a),Tr===null?(Tr=[f],Tl=ic(Qa,Ad)):Tr.push(f),f=wl):l===14?f=aa(99,Qn.bind(null,a)):(f=uv(l),f=aa(f,Oc.bind(null,a))),a.callbackPriority=l,a.callbackNode=f}}function Oc(a){if(Yn=-1,su=zr=0,qe&48)throw Error(v(327));var l=a.callbackNode;if(ri()&&a.callbackNode!==l)return null;var f=qa(a,a===$n?zt:0);if(f===0)return null;var y=f,b=qe;qe|=16;var T=Vi();($n!==a||zt!==y)&&(en(),ii(a,y));do try{Ao();break}catch(B){Vd(a,B)}while(!0);if(Ol(),Ps.current=T,qe=b,bn!==null?y=0:($n=null,zt=0,y=Dn),rs&va)ii(a,0);else if(y!==0){if(y===2&&(qe|=64,a.hydrate&&(a.hydrate=!1,xi(a.containerInfo)),f=Ed(a),f!==0&&(y=Ro(a,f))),y===1)throw l=bo,ii(a,0),zs(a,f),Ri(a,On()),l;switch(a.finishedWork=a.current.alternate,a.finishedLanes=f,y){case 0:case 1:throw Error(v(345));case 2:ir(a);break;case 3:if(zs(a,f),(f&62914560)===f&&(y=Eo+500-On(),10<y)){if(qa(a,0)!==0)break;if(b=a.suspendedLanes,(b&f)!==f){pi(),a.pingedLanes|=a.suspendedLanes&b;break}a.timeoutHandle=Ge(ir.bind(null,a),y);break}ir(a);break;case 4:if(zs(a,f),(f&4186112)===f)break;for(y=a.eventTimes,b=-1;0<f;){var N=31-Gr(f);T=1<<N,N=y[N],N>b&&(b=N),f&=~T}if(f=b,f=On()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Cv(f/1960))-f,10<f){a.timeoutHandle=Ge(ir.bind(null,a),f);break}ir(a);break;case 5:ir(a);break;default:throw Error(v(329))}}return Ri(a,On()),a.callbackNode===l?Oc.bind(null,a):null}function zs(a,l){for(l&=~tr,l&=~va,a.suspendedLanes|=l,a.pingedLanes&=~l,a=a.expirationTimes;0<l;){var f=31-Gr(l),y=1<<f;a[f]=-1,l&=~y}}function Qn(a){if(qe&48)throw Error(v(327));if(ri(),a===$n&&a.expiredLanes&zt){var l=zt,f=Ro(a,l);rs&va&&(l=qa(a,l),f=Ro(a,l))}else l=qa(a,0),f=Ro(a,l);if(a.tag!==0&&f===2&&(qe|=64,a.hydrate&&(a.hydrate=!1,xi(a.containerInfo)),l=Ed(a),l!==0&&(f=Ro(a,l))),f===1)throw f=bo,ii(a,0),zs(a,l),Ri(a,On()),f;return a.finishedWork=a.current.alternate,a.finishedLanes=l,ir(a),Ri(a,On()),null}function ya(){if(Mt!==null){var a=Mt;Mt=null,a.forEach(function(l){l.expiredLanes|=24&l.pendingLanes,Ri(l,On())})}_i()}function Bd(a,l){var f=qe;qe|=1;try{return a(l)}finally{qe=f,qe===0&&(en(),_i())}}function Hd(a,l){var f=qe;if(f&48)return a(l);qe|=1;try{if(a)return Cr(99,a.bind(null,l))}finally{qe=f,_i()}}function In(a,l){on(Hi,Ci),Ci|=l,rs|=l}function xn(){Ci=Hi.current,mt(Hi)}function ii(a,l){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==Ze&&(a.timeoutHandle=Ze,nt(f)),bn!==null)for(f=bn.return;f!==null;){var y=f;switch(y.tag){case 1:y=y.type.childContextTypes,y!=null&&Sl();break;case 3:Jn(),mt(Bn),mt(ln),jl();break;case 5:Zr(y);break;case 4:Jn();break;case 13:mt(rn);break;case 19:mt(rn);break;case 10:Dl(y);break;case 23:case 24:xn()}f=f.return}$n=a,bn=Ft(a.current,null),zt=Ci=rs=l,Dn=0,bo=null,tr=va=xo=0}function Vd(a,l){do{var f=bn;try{if(Ol(),ua.current=Tt,Il){for(var y=Wt.memoizedState;y!==null;){var b=y.queue;b!==null&&(b.pending=null),y=y.next}Il=!1}if(fi=0,_n=Vn=Wt=null,eo=!1,tu.current=null,f===null||f.return===null){Dn=1,bo=l,bn=null;break}e:{var T=a,N=f.return,B=f,ne=l;if(l=zt,B.flags|=2048,B.firstEffect=B.lastEffect=null,ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var xe=ne;if(!(B.mode&2)){var Fe=B.alternate;Fe?(B.updateQueue=Fe.updateQueue,B.memoizedState=Fe.memoizedState,B.lanes=Fe.lanes):(B.updateQueue=null,B.memoizedState=null)}var Ke=(rn.current&1)!==0,Ae=N;do{var Pt;if(Pt=Ae.tag===13){var qt=Ae.memoizedState;if(qt!==null)Pt=qt.dehydrated!==null;else{var Mi=Ae.memoizedProps;Pt=Mi.fallback===void 0?!1:Mi.unstable_avoidThisFallback!==!0?!0:!Ke}}if(Pt){var Q=Ae.updateQueue;if(Q===null){var V=new Set;V.add(xe),Ae.updateQueue=V}else Q.add(xe);if(!(Ae.mode&2)){if(Ae.flags|=64,B.flags|=16384,B.flags&=-2981,B.tag===1)if(B.alternate===null)B.tag=17;else{var ie=dr(-1,1);ie.tag=2,hr(B,ie)}B.lanes|=1;break e}ne=void 0,B=l;var Re=T.pingCache;if(Re===null?(Re=T.pingCache=new bv,ne=new Set,Re.set(xe,ne)):(ne=Re.get(xe),ne===void 0&&(ne=new Set,Re.set(xe,ne))),!ne.has(B)){ne.add(B);var Be=Lo.bind(null,T,xe,B);xe.then(Be,Be)}Ae.flags|=4096,Ae.lanes=l;break e}Ae=Ae.return}while(Ae!==null);ne=Error((Ce(B.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
207
+ `+T.stack}return{value:a,source:l,stack:b}}function ha(a,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var bv=typeof WeakMap=="function"?WeakMap:Map;function Nd(a,l,f){f=dr(-1,f),f.tag=3,f.payload={element:null};var y=l.value;return f.callback=function(){wo||(wo=!0,nr=y),ha(a,l)},f}function _d(a,l,f){f=dr(-1,f),f.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var b=l.value;f.payload=function(){return ha(a,l),y(b)}}var T=a.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(f.callback=function(){typeof y!="function"&&(In===null?In=new Set([this]):In.add(this),ha(a,l));var N=l.stack;this.componentDidCatch(l.value,{componentStack:N!==null?N:""})}),f}var xv=typeof WeakSet=="function"?WeakSet:Set;function Ud(a){var l=a.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){sr(a,f)}else l.current=null}function ii(a,l){switch(l.tag){case 0:case 11:case 15:case 22:return;case 1:if(l.flags&256&&a!==null){var f=a.memoizedProps,y=a.memoizedState;a=l.stateNode,l=a.getSnapshotBeforeUpdate(l.elementType===l.type?f:Zi(l.type,f),y),a.__reactInternalSnapshotBeforeUpdate=l}return;case 3:Qe&&l.flags&256&&Ei(l.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(v(163))}function ns(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&a)===a){var y=f.destroy;f.destroy=void 0,y!==void 0&&y()}f=f.next}while(f!==l)}}function Ev(a,l,f){switch(f.tag){case 0:case 11:case 15:case 22:if(l=f.updateQueue,l=l!==null?l.lastEffect:null,l!==null){a=l=l.next;do{if((a.tag&3)===3){var y=a.create;a.destroy=y()}a=a.next}while(a!==l)}if(l=f.updateQueue,l=l!==null?l.lastEffect:null,l!==null){a=l=l.next;do{var b=a;y=b.next,b=b.tag,b&4&&b&1&&(Dc(f,a),au(f,a)),a=y}while(a!==l)}return;case 1:a=f.stateNode,f.flags&4&&(l===null?a.componentDidMount():(y=f.elementType===f.type?l.memoizedProps:Zi(f.type,l.memoizedProps),a.componentDidUpdate(y,l.memoizedState,a.__reactInternalSnapshotBeforeUpdate))),l=f.updateQueue,l!==null&&Xa(f,l,a);return;case 3:if(l=f.updateQueue,l!==null){if(a=null,f.child!==null)switch(f.child.tag){case 5:a=it(f.child.stateNode);break;case 1:a=f.child.stateNode}Xa(f,l,a)}return;case 5:a=f.stateNode,l===null&&f.flags&4&&Lt(a,f.type,f.memoizedProps,f);return;case 6:return;case 4:return;case 12:return;case 13:bt&&f.memoizedState===null&&(f=f.alternate,f!==null&&(f=f.memoizedState,f!==null&&(f=f.dehydrated,f!==null&&pt(f))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(v(163))}function jn(a,l){if(Qe)for(var f=a;;){if(f.tag===5){var y=f.stateNode;l?qr(y):Wa(f.stateNode,f.memoizedProps)}else if(f.tag===6)y=f.stateNode,l?Ha(y):Yr(y,f.memoizedProps);else if((f.tag!==23&&f.tag!==24||f.memoizedState===null||f===a)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===a)break;for(;f.sibling===null;){if(f.return===null||f.return===a)return;f=f.return}f.sibling.return=f.return,f=f.sibling}}function is(a,l){if(_i&&typeof _i.onCommitFiberUnmount=="function")try{_i.onCommitFiberUnmount(tc,l)}catch{}switch(l.tag){case 0:case 11:case 14:case 15:case 22:if(a=l.updateQueue,a!==null&&(a=a.lastEffect,a!==null)){var f=a=a.next;do{var y=f,b=y.destroy;if(y=y.tag,b!==void 0)if(y&4)Dc(l,f);else{y=l;try{b()}catch(T){sr(y,T)}}f=f.next}while(f!==a)}break;case 1:if(Ud(l),a=l.stateNode,typeof a.componentWillUnmount=="function")try{a.props=l.memoizedProps,a.state=l.memoizedState,a.componentWillUnmount()}catch(T){sr(l,T)}break;case 5:Ud(l);break;case 4:Qe?Id(a,l):St&&St&&(l=l.stateNode.containerInfo,a=Va(l),vl(l,a))}}function Ct(a,l){for(var f=l;;)if(is(a,f),f.child===null||Qe&&f.tag===4){if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}else f.child.return=f,f=f.child}function ho(a){a.alternate=null,a.child=null,a.dependencies=null,a.firstEffect=null,a.lastEffect=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.return=null,a.updateQueue=null}function wv(a){return a.tag===5||a.tag===3||a.tag===4}function jd(a){if(Qe){e:{for(var l=a.return;l!==null;){if(wv(l))break e;l=l.return}throw Error(v(160))}var f=l;switch(l=f.stateNode,f.tag){case 5:var y=!1;break;case 3:l=l.containerInfo,y=!0;break;case 4:l=l.containerInfo,y=!0;break;default:throw Error(v(161))}f.flags&16&&(xi(l),f.flags&=-17);e:t:for(f=a;;){for(;f.sibling===null;){if(f.return===null||wv(f.return)){f=null;break e}f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue t;f.child.return=f,f=f.child}if(!(f.flags&2)){f=f.stateNode;break e}}y?po(a,f,l):pa(a,f,l)}}function po(a,l,f){var y=a.tag,b=y===5||y===6;if(b)a=b?a.stateNode:a.stateNode.instance,l?Jt(f,a,l):ze(f,a);else if(y!==4&&(a=a.child,a!==null))for(po(a,l,f),a=a.sibling;a!==null;)po(a,l,f),a=a.sibling}function pa(a,l,f){var y=a.tag,b=y===5||y===6;if(b)a=b?a.stateNode:a.stateNode.instance,l?ln(f,a,l):Ce(f,a);else if(y!==4&&(a=a.child,a!==null))for(pa(a,l,f),a=a.sibling;a!==null;)pa(a,l,f),a=a.sibling}function Id(a,l){for(var f=l,y=!1,b,T;;){if(!y){y=f.return;e:for(;;){if(y===null)throw Error(v(160));switch(b=y.stateNode,y.tag){case 5:T=!1;break e;case 3:b=b.containerInfo,T=!0;break e;case 4:b=b.containerInfo,T=!0;break e}y=y.return}y=!0}if(f.tag===5||f.tag===6)Ct(a,f),T?sn(b,f.stateNode):Bn(b,f.stateNode);else if(f.tag===4){if(f.child!==null){b=f.stateNode.containerInfo,T=!0,f.child.return=f,f=f.child;continue}}else if(is(a,f),f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return,f.tag===4&&(y=!1)}f.sibling.return=f.return,f=f.sibling}}function Xl(a,l){if(Qe){switch(l.tag){case 0:case 11:case 14:case 15:case 22:ns(3,l);return;case 1:return;case 5:var f=l.stateNode;if(f!=null){var y=l.memoizedProps;a=a!==null?a.memoizedProps:y;var b=l.type,T=l.updateQueue;l.updateQueue=null,T!==null&&nt(f,T,b,a,y,l)}return;case 6:if(l.stateNode===null)throw Error(v(162));f=l.memoizedProps,st(l.stateNode,a!==null?a.memoizedProps:f,f);return;case 3:bt&&(l=l.stateNode,l.hydrate&&(l.hydrate=!1,At(l.containerInfo)));return;case 12:return;case 13:Fd(l),Kl(l);return;case 19:Kl(l);return;case 17:return;case 23:case 24:jn(l,l.memoizedState!==null);return}throw Error(v(163))}switch(l.tag){case 0:case 11:case 14:case 15:case 22:ns(3,l);return;case 12:return;case 13:Fd(l),Kl(l);return;case 19:Kl(l);return;case 3:bt&&(f=l.stateNode,f.hydrate&&(f.hydrate=!1,At(f.containerInfo)));break;case 23:case 24:return}e:if(St){switch(l.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:l=l.stateNode,vl(l.containerInfo,l.pendingChildren);break e}throw Error(v(163))}}function Fd(a){a.memoizedState!==null&&(Eo=On(),Qe&&jn(a.child,!0))}function Kl(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new xv),l.forEach(function(y){var b=ou.bind(null,a,y);f.has(y)||(f.add(y),y.then(b,b))})}}function Tv(a,l){return a!==null&&(a=a.memoizedState,a===null||a.dehydrated!==null)?(l=l.memoizedState,l!==null&&l.dehydrated===null):!1}var vo=0,Zl=1,Jl=2,mo=3,eu=4;if(typeof Symbol=="function"&&Symbol.for){var go=Symbol.for;vo=go("selector.component"),Zl=go("selector.has_pseudo_class"),Jl=go("selector.role"),mo=go("selector.test_id"),eu=go("selector.text")}function Tc(a){var l=zn(a);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(v(364));return l}if(a=gn(a),a===null)throw Error(v(362));return a.stateNode.current}function Cc(a,l){switch(l.$$typeof){case vo:if(a.type===l.value)return!0;break;case Zl:e:{l=l.value,a=[a,0];for(var f=0;f<a.length;){var y=a[f++],b=a[f++],T=l[b];if(y.tag!==5||!ot(y)){for(;T!=null&&Cc(y,T);)b++,T=l[b];if(b===l.length){l=!0;break e}else for(y=y.child;y!==null;)a.push(y,b),y=y.sibling}}l=!1}return l;case Jl:if(a.tag===5&&ci(a.stateNode,l.value))return!0;break;case eu:if((a.tag===5||a.tag===6)&&(a=be(a),a!==null&&0<=a.indexOf(l.value)))return!0;break;case mo:if(a.tag===5&&(a=a.memoizedProps["data-testname"],typeof a=="string"&&a.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(v(365,l))}return!1}function yo(a){switch(a.$$typeof){case vo:return"<"+(Re(a.value)||"Unknown")+">";case Zl:return":has("+(yo(a)||"")+")";case Jl:return'[role="'+a.value+'"]';case eu:return'"'+a.value+'"';case mo:return'[data-testname="'+a.value+'"]';default:throw Error(v(365,a))}}function Rc(a,l){var f=[];a=[a,0];for(var y=0;y<a.length;){var b=a[y++],T=a[y++],N=l[T];if(b.tag!==5||!ot(b)){for(;N!=null&&Cc(b,N);)T++,N=l[T];if(T===l.length)f.push(b);else for(b=b.child;b!==null;)a.push(b,T),b=b.sibling}}return f}function Ac(a,l){if(!Ve)throw Error(v(363));a=Tc(a),a=Rc(a,l),l=[],a=Array.from(a);for(var f=0;f<a.length;){var y=a[f++];if(y.tag===5)ot(y)||l.push(y.stateNode);else for(y=y.child;y!==null;)a.push(y),y=y.sibling}return l}var So=null;function Mc(a){if(So===null)try{var l=("require"+Math.random()).slice(0,7);So=(t&&t[l]).call(t,"timers").setImmediate}catch{So=function(y){var b=new MessageChannel;b.port1.onmessage=y,b.port2.postMessage(void 0)}}return So(a)}var Cv=Math.ceil,Ps=g.ReactCurrentDispatcher,tu=g.ReactCurrentOwner,nu=g.IsSomeRendererActing,Ge=0,qn=null,bn=null,zt=0,Ri=0,Wi=Ni(0),Dn=0,bo=null,rs=0,xo=0,va=0,tr=0,ma=null,Eo=0,iu=1/0;function tn(){iu=On()+500}var De=null,wo=!1,nr=null,In=null,ss=!1,ga=null,Yn=90,ru=[],Yt=[],Mt=null,Ln=0,kr=null,Qn=-1,zr=0,su=0,To=null,Co=!1;function vi(){return Ge&48?On():Qn!==-1?Qn:Qn=On()}function Cn(a){if(a=a.mode,!(a&2))return 1;if(!(a&4))return sa()===99?1:2;if(zr===0&&(zr=rs),mv.transition!==0){su!==0&&(su=ma!==null?ma.pendingLanes:0),a=zr;var l=4186112&~su;return l&=-l,l===0&&(a=4186112&~a,l=a&-a,l===0&&(l=8192)),l}return a=sa(),Ge&4&&a===98?a=xl(12,zr):(a=lv(a),a=xl(a,zr)),a}function Nr(a,l,f){if(50<Ln)throw Ln=0,kr=null,Error(v(185));if(a=ks(a,l),a===null)return null;El(a,l,f),a===qn&&(va|=l,Dn===4&&zs(a,zt));var y=sa();l===1?Ge&8&&!(Ge&48)?Gn(a):(Ai(a,f),Ge===0&&(tn(),Ui())):(!(Ge&4)||y!==98&&y!==99||(Mt===null?Mt=new Set([a]):Mt.add(a)),Ai(a,f)),ma=a}function ks(a,l){a.lanes|=l;var f=a.alternate;for(f!==null&&(f.lanes|=l),f=a,a=a.return;a!==null;)a.childLanes|=l,f=a.alternate,f!==null&&(f.childLanes|=l),f=a,a=a.return;return f.tag===3?f.stateNode:null}function Ai(a,l){for(var f=a.callbackNode,y=a.suspendedLanes,b=a.pingedLanes,T=a.expirationTimes,N=a.pendingLanes;0<N;){var F=31-Gr(N),te=1<<F,xe=T[F];if(xe===-1){if(!(te&y)||te&b){xe=l,Ki(te);var Be=$t;T[F]=10<=Be?xe+250:6<=Be?xe+5e3:-1}}else xe<=l&&(a.expiredLanes|=te);N&=~te}if(y=qa(a,a===qn?zt:0),l=$t,y===0)f!==null&&(f!==wl&&rc(f),a.callbackNode=null,a.callbackPriority=0);else{if(f!==null){if(a.callbackPriority===l)return;f!==wl&&rc(f)}l===15?(f=Gn.bind(null,a),Tr===null?(Tr=[f],Tl=ic(Qa,Ad)):Tr.push(f),f=wl):l===14?f=aa(99,Gn.bind(null,a)):(f=uv(l),f=aa(f,Oc.bind(null,a))),a.callbackPriority=l,a.callbackNode=f}}function Oc(a){if(Qn=-1,su=zr=0,Ge&48)throw Error(v(327));var l=a.callbackNode;if(si()&&a.callbackNode!==l)return null;var f=qa(a,a===qn?zt:0);if(f===0)return null;var y=f,b=Ge;Ge|=16;var T=Vi();(qn!==a||zt!==y)&&(tn(),ri(a,y));do try{Ao();break}catch(F){Wd(a,F)}while(!0);if(Ol(),Ps.current=T,Ge=b,bn!==null?y=0:(qn=null,zt=0,y=Dn),rs&va)ri(a,0);else if(y!==0){if(y===2&&(Ge|=64,a.hydrate&&(a.hydrate=!1,Ei(a.containerInfo)),f=Ed(a),f!==0&&(y=Ro(a,f))),y===1)throw l=bo,ri(a,0),zs(a,f),Ai(a,On()),l;switch(a.finishedWork=a.current.alternate,a.finishedLanes=f,y){case 0:case 1:throw Error(v(345));case 2:ir(a);break;case 3:if(zs(a,f),(f&62914560)===f&&(y=Eo+500-On(),10<y)){if(qa(a,0)!==0)break;if(b=a.suspendedLanes,(b&f)!==f){vi(),a.pingedLanes|=a.suspendedLanes&b;break}a.timeoutHandle=Ut(ir.bind(null,a),y);break}ir(a);break;case 4:if(zs(a,f),(f&4186112)===f)break;for(y=a.eventTimes,b=-1;0<f;){var N=31-Gr(f);T=1<<N,N=y[N],N>b&&(b=N),f&=~T}if(f=b,f=On()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Cv(f/1960))-f,10<f){a.timeoutHandle=Ut(ir.bind(null,a),f);break}ir(a);break;case 5:ir(a);break;default:throw Error(v(329))}}return Ai(a,On()),a.callbackNode===l?Oc.bind(null,a):null}function zs(a,l){for(l&=~tr,l&=~va,a.suspendedLanes|=l,a.pingedLanes&=~l,a=a.expirationTimes;0<l;){var f=31-Gr(l),y=1<<f;a[f]=-1,l&=~y}}function Gn(a){if(Ge&48)throw Error(v(327));if(si(),a===qn&&a.expiredLanes&zt){var l=zt,f=Ro(a,l);rs&va&&(l=qa(a,l),f=Ro(a,l))}else l=qa(a,0),f=Ro(a,l);if(a.tag!==0&&f===2&&(Ge|=64,a.hydrate&&(a.hydrate=!1,Ei(a.containerInfo)),l=Ed(a),l!==0&&(f=Ro(a,l))),f===1)throw f=bo,ri(a,0),zs(a,l),Ai(a,On()),f;return a.finishedWork=a.current.alternate,a.finishedLanes=l,ir(a),Ai(a,On()),null}function ya(){if(Mt!==null){var a=Mt;Mt=null,a.forEach(function(l){l.expiredLanes|=24&l.pendingLanes,Ai(l,On())})}Ui()}function Bd(a,l){var f=Ge;Ge|=1;try{return a(l)}finally{Ge=f,Ge===0&&(tn(),Ui())}}function Hd(a,l){var f=Ge;if(f&48)return a(l);Ge|=1;try{if(a)return Cr(99,a.bind(null,l))}finally{Ge=f,Ui()}}function Fn(a,l){un(Wi,Ri),Ri|=l,rs|=l}function xn(){Ri=Wi.current,vt(Wi)}function ri(a,l){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==Ie&&(a.timeoutHandle=Ie,jt(f)),bn!==null)for(f=bn.return;f!==null;){var y=f;switch(y.tag){case 1:y=y.type.childContextTypes,y!=null&&Sl();break;case 3:ei(),vt(Hn),vt(cn),jl();break;case 5:Zr(y);break;case 4:ei();break;case 13:vt(an);break;case 19:vt(an);break;case 10:Dl(y);break;case 23:case 24:xn()}f=f.return}qn=a,bn=Ht(a.current,null),zt=Ri=rs=l,Dn=0,bo=null,tr=va=xo=0}function Wd(a,l){do{var f=bn;try{if(Ol(),ua.current=Tt,Il){for(var y=qt.memoizedState;y!==null;){var b=y.queue;b!==null&&(b.pending=null),y=y.next}Il=!1}if(di=0,Un=Vn=qt=null,eo=!1,tu.current=null,f===null||f.return===null){Dn=1,bo=l,bn=null;break}e:{var T=a,N=f.return,F=f,te=l;if(l=zt,F.flags|=2048,F.firstEffect=F.lastEffect=null,te!==null&&typeof te=="object"&&typeof te.then=="function"){var xe=te;if(!(F.mode&2)){var Be=F.alternate;Be?(F.updateQueue=Be.updateQueue,F.memoizedState=Be.memoizedState,F.lanes=Be.lanes):(F.updateQueue=null,F.memoizedState=null)}var Je=(an.current&1)!==0,Me=N;do{var Pt;if(Pt=Me.tag===13){var Qt=Me.memoizedState;if(Qt!==null)Pt=Qt.dehydrated!==null;else{var Oi=Me.memoizedProps;Pt=Oi.fallback===void 0?!1:Oi.unstable_avoidThisFallback!==!0?!0:!Je}}if(Pt){var G=Me.updateQueue;if(G===null){var W=new Set;W.add(xe),Me.updateQueue=W}else G.add(xe);if(!(Me.mode&2)){if(Me.flags|=64,F.flags|=16384,F.flags&=-2981,F.tag===1)if(F.alternate===null)F.tag=17;else{var ne=dr(-1,1);ne.tag=2,hr(F,ne)}F.lanes|=1;break e}te=void 0,F=l;var Ae=T.pingCache;if(Ae===null?(Ae=T.pingCache=new bv,te=new Set,Ae.set(xe,te)):(te=Ae.get(xe),te===void 0&&(te=new Set,Ae.set(xe,te))),!te.has(F)){te.add(F);var He=Lo.bind(null,T,xe,F);xe.then(He,He)}Me.flags|=4096,Me.lanes=l;break e}Me=Me.return}while(Me!==null);te=Error((Re(F.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
208
208
 
209
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Dn!==5&&(Dn=2),ne=wc(ne,B),Ae=N;do{switch(Ae.tag){case 3:T=ne,Ae.flags|=4096,l&=-l,Ae.lanes|=l;var kt=Nd(Ae,T,l);Ar(Ae,kt);break e;case 1:T=ne;var Je=Ae.type,Rt=Ae.stateNode;if(!(Ae.flags&64)&&(typeof Je.getDerivedStateFromError=="function"||Rt!==null&&typeof Rt.componentDidCatch=="function"&&(jn===null||!jn.has(Rt)))){Ae.flags|=4096,l&=-l,Ae.lanes|=l;var En=_d(Ae,T,l);Ar(Ae,En);break e}}Ae=Ae.return}while(Ae!==null)}ba(f)}catch(yt){l=yt,bn===f&&f!==null&&(bn=f=f.return);continue}break}while(!0)}function Vi(){var a=Ps.current;return Ps.current=Tt,a===null?Tt:a}function Ro(a,l){var f=qe;qe|=16;var y=Vi();$n===a&&zt===l||ii(a,l);do try{Ns();break}catch(b){Vd(a,b)}while(!0);if(Ol(),qe=f,Ps.current=y,bn!==null)throw Error(v(261));return $n=null,zt=0,Dn}function Ns(){for(;bn!==null;)Sa(bn)}function Ao(){for(;bn!==null&&!hv();)Sa(bn)}function Sa(a){var l=_s(a.alternate,a,Ci);a.memoizedProps=a.pendingProps,l===null?ba(a):bn=l,tu.current=null}function ba(a){var l=a;do{var f=l.alternate;if(a=l.return,l.flags&2048){if(f=zd(l),f!==null){f.flags&=2047,bn=f;return}a!==null&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}else{if(f=kd(f,l,Ci),f!==null){bn=f;return}if(f=l,f.tag!==24&&f.tag!==23||f.memoizedState===null||Ci&1073741824||!(f.mode&4)){for(var y=0,b=f.child;b!==null;)y|=b.lanes|b.childLanes,b=b.sibling;f.childLanes=y}a!==null&&!(a.flags&2048)&&(a.firstEffect===null&&(a.firstEffect=l.firstEffect),l.lastEffect!==null&&(a.lastEffect!==null&&(a.lastEffect.nextEffect=l.firstEffect),a.lastEffect=l.lastEffect),1<l.flags&&(a.lastEffect!==null?a.lastEffect.nextEffect=l:a.firstEffect=l,a.lastEffect=l))}if(l=l.sibling,l!==null){bn=l;return}bn=l=a}while(l!==null);Dn===0&&(Dn=5)}function ir(a){var l=sa();return Cr(99,Mo.bind(null,a,l)),null}function Mo(a,l){do ri();while(ga!==null);if(qe&48)throw Error(v(327));var f=a.finishedWork;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(v(177));a.callbackNode=null;var y=f.lanes|f.childLanes,b=y,T=a.pendingLanes&~b;a.pendingLanes=b,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=b,a.mutableReadLanes&=b,a.entangledLanes&=b,b=a.entanglements;for(var N=a.eventTimes,B=a.expirationTimes;0<T;){var ne=31-Gr(T),xe=1<<ne;b[ne]=0,N[ne]=-1,B[ne]=-1,T&=~xe}if(Mt!==null&&!(y&24)&&Mt.has(a)&&Mt.delete(a),a===$n&&(bn=$n=null,zt=0),1<f.flags?f.lastEffect!==null?(f.lastEffect.nextEffect=f,y=f.firstEffect):y=f:y=f.firstEffect,y!==null){b=qe,qe|=32,tu.current=null,To=je(a.containerInfo),Co=!1,Oe=y;do try{Oo()}catch(V){if(Oe===null)throw Error(v(330));sr(Oe,V),Oe=Oe.nextEffect}while(Oe!==null);To=null,Oe=y;do try{for(N=a;Oe!==null;){var Fe=Oe.flags;if(Fe&16&&ft&&bi(Oe.stateNode),Fe&128){var Ke=Oe.alternate;if(Ke!==null){var Ae=Ke.ref;Ae!==null&&(typeof Ae=="function"?Ae(null):Ae.current=null)}}switch(Fe&1038){case 2:jd(Oe),Oe.flags&=-3;break;case 6:jd(Oe),Oe.flags&=-3,Xl(Oe.alternate,Oe);break;case 1024:Oe.flags&=-1025;break;case 1028:Oe.flags&=-1025,Xl(Oe.alternate,Oe);break;case 4:Xl(Oe.alternate,Oe);break;case 8:B=N,T=Oe,ft?Id(B,T):Ct(B,T);var Pt=T.alternate;ho(T),Pt!==null&&ho(Pt)}Oe=Oe.nextEffect}}catch(V){if(Oe===null)throw Error(v(330));sr(Oe,V),Oe=Oe.nextEffect}while(Oe!==null);Co&&Se(),He(a.containerInfo),a.current=f,Oe=y;do try{for(Fe=a;Oe!==null;){var qt=Oe.flags;if(qt&36&&Ev(Fe,Oe.alternate,Oe),qt&128){Ke=void 0;var Mi=Oe.ref;if(Mi!==null){var Q=Oe.stateNode;switch(Oe.tag){case 5:Ke=Ue(Q);break;default:Ke=Q}typeof Mi=="function"?Mi(Ke):Mi.current=Ke}}Oe=Oe.nextEffect}}catch(V){if(Oe===null)throw Error(v(330));sr(Oe,V),Oe=Oe.nextEffect}while(Oe!==null);Oe=null,vv(),qe=b}else a.current=f;if(ss)ss=!1,ga=a,qn=l;else for(Oe=y;Oe!==null;)l=Oe.nextEffect,Oe.nextEffect=null,Oe.flags&8&&(qt=Oe,qt.sibling=null,qt.stateNode=null),Oe=l;if(y=a.pendingLanes,y===0&&(jn=null),y===1?a===kr?Ln++:(Ln=0,kr=a):Ln=0,f=f.stateNode,Ni&&typeof Ni.onCommitFiberRoot=="function")try{Ni.onCommitFiberRoot(tc,f,void 0,(f.current.flags&64)===64)}catch{}if(Ri(a,On()),wo)throw wo=!1,a=nr,nr=null,a;return qe&8||_i(),null}function Oo(){for(;Oe!==null;){var a=Oe.alternate;Co||To===null||(Oe.flags&8?Z(Oe,To)&&(Co=!0,G()):Oe.tag===13&&Tv(a,Oe)&&Z(Oe,To)&&(Co=!0,G()));var l=Oe.flags;l&256&&ni(a,Oe),!(l&512)||ss||(ss=!0,aa(97,function(){return ri(),null})),Oe=Oe.nextEffect}}function ri(){if(qn!==90){var a=97<qn?97:qn;return qn=90,Cr(a,rr)}return!1}function au(a,l){ru.push(l,a),ss||(ss=!0,aa(97,function(){return ri(),null}))}function Dc(a,l){$t.push(l,a),ss||(ss=!0,aa(97,function(){return ri(),null}))}function rr(){if(ga===null)return!1;var a=ga;if(ga=null,qe&48)throw Error(v(331));var l=qe;qe|=32;var f=$t;$t=[];for(var y=0;y<f.length;y+=2){var b=f[y],T=f[y+1],N=b.destroy;if(b.destroy=void 0,typeof N=="function")try{N()}catch(ne){if(T===null)throw Error(v(330));sr(T,ne)}}for(f=ru,ru=[],y=0;y<f.length;y+=2){b=f[y],T=f[y+1];try{var B=b.create;b.destroy=B()}catch(ne){if(T===null)throw Error(v(330));sr(T,ne)}}for(B=a.current.firstEffect;B!==null;)a=B.nextEffect,B.nextEffect=null,B.flags&8&&(B.sibling=null,B.stateNode=null),B=a;return qe=l,_i(),!0}function Do(a,l,f){l=wc(f,l),l=Nd(a,l,1),hr(a,l),l=pi(),a=ks(a,1),a!==null&&(El(a,1,l),Ri(a,l))}function sr(a,l){if(a.tag===3)Do(a,a,l);else for(var f=a.return;f!==null;){if(f.tag===3){Do(f,a,l);break}else if(f.tag===1){var y=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(jn===null||!jn.has(y))){a=wc(l,a);var b=_d(f,a,1);if(hr(f,b),b=pi(),f=ks(f,1),f!==null)El(f,1,b),Ri(f,b);else if(typeof y.componentDidCatch=="function"&&(jn===null||!jn.has(y)))try{y.componentDidCatch(l,a)}catch{}break}}f=f.return}}function Lo(a,l,f){var y=a.pingCache;y!==null&&y.delete(l),l=pi(),a.pingedLanes|=a.suspendedLanes&f,$n===a&&(zt&f)===f&&(Dn===4||Dn===3&&(zt&62914560)===zt&&500>On()-Eo?ii(a,0):tr|=f),Ri(a,l)}function ou(a,l){var f=a.stateNode;f!==null&&f.delete(l),l=0,l===0&&(l=a.mode,l&2?l&4?(zr===0&&(zr=rs),l=ra(62914560&~zr),l===0&&(l=4194304)):l=sa()===99?1:2:l=1),f=pi(),a=ks(a,l),a!==null&&(El(a,l,f),Ri(a,f))}var _s;_s=function(a,l,f){var y=l.lanes;if(a!==null)if(a.memoizedProps!==l.pendingProps||Bn.current)Bi=!0;else if(f&y)Bi=!!(a.flags&16384);else{switch(Bi=!1,l.tag){case 3:Yl(l),dc();break;case 5:Nl(l);break;case 1:Jt(l.type)&&$a(l);break;case 4:er(l,l.stateNode.containerInfo);break;case 10:uc(l,l.memoizedProps.value);break;case 13:if(l.memoizedState!==null)return f&l.child.childLanes?sn(a,l,f):(on(rn,rn.current&1),l=Pr(a,l,f),l!==null?l.sibling:null);on(rn,rn.current&1);break;case 19:if(y=(f&l.childLanes)!==0,a.flags&64){if(y)return Pd(a,l,f);l.flags|=64}var b=l.memoizedState;if(b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),on(rn,rn.current),y)break;return null;case 23:case 24:return l.lanes=0,da(a,l,f)}return Pr(a,l,f)}else Bi=!1;switch(l.lanes=0,l.tag){case 2:if(y=l.type,a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),a=l.pendingProps,b=cr(l,ln.current),Ts(l,f),b=Fl(null,l,y,a,b,f),l.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0){if(l.tag=1,l.memoizedState=null,l.updateQueue=null,Jt(y)){var T=!0;$a(l)}else T=!1;l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,ji(l);var N=y.getDerivedStateFromProps;typeof N=="function"&&oa(l,y,N,a),b.updater=Ll,l.stateNode=b,b._reactInternals=l,kl(l,y,a,f),l=ql(null,l,y,!0,T,f)}else l.tag=0,ti(null,l,b,f),l=l.child;return l;case 16:b=l.elementType;e:{switch(a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),a=l.pendingProps,T=b._init,b=T(b._payload),l.type=b,T=l.tag=Ea(b),a=Zi(b,a),T){case 0:l=lo(null,l,b,a,f);break e;case 1:l=yc(null,l,b,a,f);break e;case 11:l=$l(null,l,b,a,f);break e;case 14:l=gc(null,l,b,Zi(b.type,a),y,f);break e}throw Error(v(306,b,""))}return l;case 0:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),lo(a,l,y,b,f);case 1:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),yc(a,l,y,b,f);case 3:if(Yl(l),y=l.updateQueue,a===null||y===null)throw Error(v(282));if(y=l.pendingProps,b=l.memoizedState,b=b!==null?b.element:null,Ji(a,l),Cs(l,y,null,f),y=l.memoizedState.element,y===b)dc(),l=Pr(a,l,f);else{if(b=l.stateNode,(T=b.hydrate)&&(Qt?(Hn=de(l.stateNode.containerInfo),Fi=l,T=wi=!0):T=!1),T){if(Qt&&(a=b.mutableSourceEagerHydrationData,a!=null))for(b=0;b<a.length;b+=2)T=a[b],N=a[b+1],ht?T._workInProgressVersionPrimary=N:T._workInProgressVersionSecondary=N,As.push(T);for(f=pr(l,null,y,f),l.child=f;f;)f.flags=f.flags&-3|1024,f=f.sibling}else ti(a,l,y,f),dc();l=l.child}return l;case 5:return Nl(l),a===null&&Ul(l),y=l.type,b=l.pendingProps,T=a!==null?a.memoizedProps:null,N=b.children,xt(y,b)?N=null:T!==null&&xt(y,T)&&(l.flags|=16),Ls(a,l),ti(a,l,N,f),l.child;case 6:return a===null&&Ul(l),null;case 13:return sn(a,l,f);case 4:return er(l,l.stateNode.containerInfo),y=l.pendingProps,a===null?l.child=Rs(l,null,y,f):ti(a,l,y,f),l.child;case 11:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),$l(a,l,y,b,f);case 7:return ti(a,l,l.pendingProps,f),l.child;case 8:return ti(a,l,l.pendingProps.children,f),l.child;case 12:return ti(a,l,l.pendingProps.children,f),l.child;case 10:e:{if(y=l.type._context,b=l.pendingProps,N=l.memoizedProps,T=b.value,uc(l,T),N!==null){var B=N.value;if(T=Ui(B,T)?0:(typeof y._calculateChangedBits=="function"?y._calculateChangedBits(B,T):1073741823)|0,T===0){if(N.children===b.children&&!Bn.current){l=Pr(a,l,f);break e}}else for(B=l.child,B!==null&&(B.return=l);B!==null;){var ne=B.dependencies;if(ne!==null){N=B.child;for(var xe=ne.firstContext;xe!==null;){if(xe.context===y&&xe.observedBits&T){B.tag===1&&(xe=dr(-1,f&-f),xe.tag=2,hr(B,xe)),B.lanes|=f,xe=B.alternate,xe!==null&&(xe.lanes|=f),cc(B.return,f),ne.lanes|=f;break}xe=xe.next}}else N=B.tag===10&&B.type===l.type?null:B.child;if(N!==null)N.return=B;else for(N=B;N!==null;){if(N===l){N=null;break}if(B=N.sibling,B!==null){B.return=N.return,N=B;break}N=N.return}B=N}}ti(a,l,b.children,f),l=l.child}return l;case 9:return b=l.type,T=l.pendingProps,y=T.children,Ts(l,f),b=Ei(b,T.unstable_observedBits),y=y(b),l.flags|=1,ti(a,l,y,f),l.child;case 14:return b=l.type,T=Zi(b,l.pendingProps),T=Zi(b.type,T),gc(a,l,b,T,y,f);case 15:return Ds(a,l,l.type,l.pendingProps,y,f);case 17:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),l.tag=1,Jt(y)?(a=!0,$a(l)):a=!1,Ts(l,f),Od(l,y,b),kl(l,y,b,f),ql(null,l,y,!0,a,f);case 19:return Pd(a,l,f);case 23:return da(a,l,f);case 24:return da(a,l,f)}throw Error(v(156,l.tag))};var Us={current:!1},xa=h.unstable_flushAllWithoutAsserting,Po=typeof xa=="function";function lu(){if(xa!==void 0)return xa();for(var a=!1;ri();)a=!0;return a}function Lc(a){try{lu(),Mc(function(){lu()?Lc(a):a()})}catch(l){a(l)}}var ko=0,uu=!1;function Rv(a,l,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ai(a,l,f,y){return new Rv(a,l,f,y)}function Pc(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ea(a){if(typeof a=="function")return Pc(a)?1:0;if(a!=null){if(a=a.$$typeof,a===L)return 11;if(a===I)return 14}return 2}function Ft(a,l){var f=a.alternate;return f===null?(f=Ai(a.tag,l,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=l,f.type=a.type,f.flags=0,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null),f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,l=a.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function zo(a,l,f,y,b,T){var N=2;if(y=a,typeof a=="function")Pc(a)&&(N=1);else if(typeof a=="string")N=5;else e:switch(a){case w:return js(f.children,b,T,l);case H:N=8,b|=16;break;case A:N=8,b|=1;break;case P:return a=Ai(12,f,l,b|8),a.elementType=P,a.type=P,a.lanes=T,a;case k:return a=Ai(13,f,l,b),a.type=k,a.elementType=k,a.lanes=T,a;case O:return a=Ai(19,f,l,b),a.elementType=O,a.lanes=T,a;case J:return wa(f,b,T,l);case re:return a=Ai(24,f,l,b),a.elementType=re,a.lanes=T,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case M:N=10;break e;case _:N=9;break e;case L:N=11;break e;case I:N=14;break e;case q:N=16,y=null;break e;case te:N=22;break e}throw Error(v(130,a==null?a:typeof a,""))}return l=Ai(N,f,l,b),l.elementType=a,l.type=y,l.lanes=T,l}function js(a,l,f,y){return a=Ai(7,a,y,l),a.lanes=f,a}function wa(a,l,f,y){return a=Ai(23,a,y,l),a.elementType=J,a.lanes=f,a}function No(a,l,f){return a=Ai(6,a,null,l),a.lanes=f,a}function Ta(a,l,f){return l=Ai(4,a.children!==null?a.children:[],a.key,l),l.lanes=f,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function kc(a,l,f){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ze,this.pendingContext=this.context=null,this.hydrate=f,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=nc(0),this.expirationTimes=nc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nc(0),Qt&&(this.mutableSourceEagerHydrationData=null)}function _o(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(v(188)):Error(v(268,Object.keys(a)));return a=Ye(l),a===null?null:a.stateNode}function cu(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<l?f:l}}function Uo(a,l){cu(a,l),(a=a.alternate)&&cu(a,l)}function as(a){return a=Ye(a),a===null?null:a.stateNode}function os(){return null}return r.IsThisRendererActing=Us,r.act=function(a){function l(){ko--,nu.current=f,Us.current=y}uu===!1&&(uu=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),ko++;var f=nu.current,y=Us.current;nu.current=!0,Us.current=!0;try{var b=Bd(a)}catch(T){throw l(),T}if(b!==null&&typeof b=="object"&&typeof b.then=="function")return{then:function(T,N){b.then(function(){1<ko||Po===!0&&f===!0?(l(),T()):Lc(function(B){l(),B?N(B):T()})},function(B){l(),N(B)})}};try{ko!==1||Po!==!1&&f!==!1||lu(),l()}catch(T){throw l(),T}return{then:function(T){T()}}},r.attemptContinuousHydration=function(a){if(a.tag===13){var l=pi();Nr(a,67108864,l),Uo(a,67108864)}},r.attemptHydrationAtCurrentPriority=function(a){if(a.tag===13){var l=pi(),f=Cn(a);Nr(a,f,l),Uo(a,f)}},r.attemptSynchronousHydration=function(a){switch(a.tag){case 3:var l=a.stateNode;if(l.hydrate){var f=Ki(l.pendingLanes);l.expiredLanes|=f&l.pendingLanes,Ri(l,On()),!(qe&48)&&(en(),_i())}break;case 13:var y=pi();Hd(function(){return Nr(a,1,y)}),Uo(a,4)}},r.attemptUserBlockingHydration=function(a){if(a.tag===13){var l=pi();Nr(a,4,l),Uo(a,4)}},r.batchedEventUpdates=function(a,l){var f=qe;qe|=2;try{return a(l)}finally{qe=f,qe===0&&(en(),_i())}},r.batchedUpdates=Bd,r.createComponentSelector=function(a){return{$$typeof:vo,value:a}},r.createContainer=function(a,l,f){return a=new kc(a,l,f),l=Ai(3,null,null,l===2?7:l===1?3:0),a.current=l,l.stateNode=a,ji(l),a},r.createHasPsuedoClassSelector=function(a){return{$$typeof:Zl,value:a}},r.createPortal=function(a,l,f){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:y==null?null:""+y,children:a,containerInfo:l,implementation:f}},r.createRoleSelector=function(a){return{$$typeof:Jl,value:a}},r.createTestNameSelector=function(a){return{$$typeof:mo,value:a}},r.createTextSelector=function(a){return{$$typeof:eu,value:a}},r.deferredUpdates=function(a){return Cr(97,a)},r.discreteUpdates=function(a,l,f,y,b){var T=qe;qe|=4;try{return Cr(98,a.bind(null,l,f,y,b))}finally{qe=T,qe===0&&(en(),_i())}},r.findAllNodes=Ac,r.findBoundingRects=function(a,l){if(!Ve)throw Error(v(363));l=Ac(a,l),a=[];for(var f=0;f<l.length;f++)a.push(ki(l[f]));for(l=a.length-1;0<l;l--){f=a[l];for(var y=f.x,b=y+f.width,T=f.y,N=T+f.height,B=l-1;0<=B;B--)if(l!==B){var ne=a[B],xe=ne.x,Fe=xe+ne.width,Ke=ne.y,Ae=Ke+ne.height;if(y>=xe&&T>=Ke&&b<=Fe&&N<=Ae){a.splice(l,1);break}else if(y!==xe||f.width!==ne.width||Ae<T||Ke>N){if(!(T!==Ke||f.height!==ne.height||Fe<y||xe>b)){xe>y&&(ne.width+=xe-y,ne.x=y),Fe<b&&(ne.width=b-xe),a.splice(l,1);break}}else{Ke>T&&(ne.height+=Ke-T,ne.y=T),Ae<N&&(ne.height=N-Ke),a.splice(l,1);break}}}return a},r.findHostInstance=_o,r.findHostInstanceWithNoPortals=function(a){return a=gt(a),a===null?null:a.tag===20?a.stateNode.instance:a.stateNode},r.findHostInstanceWithWarning=function(a){return _o(a)},r.flushControlled=function(a){var l=qe;qe|=1;try{Cr(99,a)}finally{qe=l,qe===0&&(en(),_i())}},r.flushDiscreteUpdates=function(){!(qe&49)&&(ya(),ri())},r.flushPassiveEffects=ri,r.flushSync=Hd,r.focusWithin=function(a,l){if(!Ve)throw Error(v(363));for(a=Tc(a),l=Rc(a,l),l=Array.from(l),a=0;a<l.length;){var f=l[a++];if(!at(f)){if(f.tag===5&&Dt(f.stateNode))return!0;for(f=f.child;f!==null;)l.push(f),f=f.sibling}}return!1},r.getCurrentUpdateLanePriority=function(){return bl},r.getFindAllNodesFailureDescription=function(a,l){if(!Ve)throw Error(v(363));var f=0,y=[];a=[Tc(a),0];for(var b=0;b<a.length;){var T=a[b++],N=a[b++],B=l[N];if((T.tag!==5||!at(T))&&(Cc(T,B)&&(y.push(yo(B)),N++,N>f&&(f=N)),N<l.length))for(T=T.child;T!==null;)a.push(T,N),T=T.sibling}if(f<l.length){for(a=[];f<l.length;f++)a.push(yo(l[f]));return`findAllNodes was able to match part of the selector:
209
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Dn!==5&&(Dn=2),te=wc(te,F),Me=N;do{switch(Me.tag){case 3:T=te,Me.flags|=4096,l&=-l,Me.lanes|=l;var kt=Nd(Me,T,l);Ar(Me,kt);break e;case 1:T=te;var et=Me.type,Rt=Me.stateNode;if(!(Me.flags&64)&&(typeof et.getDerivedStateFromError=="function"||Rt!==null&&typeof Rt.componentDidCatch=="function"&&(In===null||!In.has(Rt)))){Me.flags|=4096,l&=-l,Me.lanes|=l;var En=_d(Me,T,l);Ar(Me,En);break e}}Me=Me.return}while(Me!==null)}ba(f)}catch(mt){l=mt,bn===f&&f!==null&&(bn=f=f.return);continue}break}while(!0)}function Vi(){var a=Ps.current;return Ps.current=Tt,a===null?Tt:a}function Ro(a,l){var f=Ge;Ge|=16;var y=Vi();qn===a&&zt===l||ri(a,l);do try{Ns();break}catch(b){Wd(a,b)}while(!0);if(Ol(),Ge=f,Ps.current=y,bn!==null)throw Error(v(261));return qn=null,zt=0,Dn}function Ns(){for(;bn!==null;)Sa(bn)}function Ao(){for(;bn!==null&&!hv();)Sa(bn)}function Sa(a){var l=_s(a.alternate,a,Ri);a.memoizedProps=a.pendingProps,l===null?ba(a):bn=l,tu.current=null}function ba(a){var l=a;do{var f=l.alternate;if(a=l.return,l.flags&2048){if(f=zd(l),f!==null){f.flags&=2047,bn=f;return}a!==null&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}else{if(f=kd(f,l,Ri),f!==null){bn=f;return}if(f=l,f.tag!==24&&f.tag!==23||f.memoizedState===null||Ri&1073741824||!(f.mode&4)){for(var y=0,b=f.child;b!==null;)y|=b.lanes|b.childLanes,b=b.sibling;f.childLanes=y}a!==null&&!(a.flags&2048)&&(a.firstEffect===null&&(a.firstEffect=l.firstEffect),l.lastEffect!==null&&(a.lastEffect!==null&&(a.lastEffect.nextEffect=l.firstEffect),a.lastEffect=l.lastEffect),1<l.flags&&(a.lastEffect!==null?a.lastEffect.nextEffect=l:a.firstEffect=l,a.lastEffect=l))}if(l=l.sibling,l!==null){bn=l;return}bn=l=a}while(l!==null);Dn===0&&(Dn=5)}function ir(a){var l=sa();return Cr(99,Mo.bind(null,a,l)),null}function Mo(a,l){do si();while(ga!==null);if(Ge&48)throw Error(v(327));var f=a.finishedWork;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(v(177));a.callbackNode=null;var y=f.lanes|f.childLanes,b=y,T=a.pendingLanes&~b;a.pendingLanes=b,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=b,a.mutableReadLanes&=b,a.entangledLanes&=b,b=a.entanglements;for(var N=a.eventTimes,F=a.expirationTimes;0<T;){var te=31-Gr(T),xe=1<<te;b[te]=0,N[te]=-1,F[te]=-1,T&=~xe}if(Mt!==null&&!(y&24)&&Mt.has(a)&&Mt.delete(a),a===qn&&(bn=qn=null,zt=0),1<f.flags?f.lastEffect!==null?(f.lastEffect.nextEffect=f,y=f.firstEffect):y=f:y=f.firstEffect,y!==null){b=Ge,Ge|=32,tu.current=null,To=je(a.containerInfo),Co=!1,De=y;do try{Oo()}catch(W){if(De===null)throw Error(v(330));sr(De,W),De=De.nextEffect}while(De!==null);To=null,De=y;do try{for(N=a;De!==null;){var Be=De.flags;if(Be&16&&Qe&&xi(De.stateNode),Be&128){var Je=De.alternate;if(Je!==null){var Me=Je.ref;Me!==null&&(typeof Me=="function"?Me(null):Me.current=null)}}switch(Be&1038){case 2:jd(De),De.flags&=-3;break;case 6:jd(De),De.flags&=-3,Xl(De.alternate,De);break;case 1024:De.flags&=-1025;break;case 1028:De.flags&=-1025,Xl(De.alternate,De);break;case 4:Xl(De.alternate,De);break;case 8:F=N,T=De,Qe?Id(F,T):Ct(F,T);var Pt=T.alternate;ho(T),Pt!==null&&ho(Pt)}De=De.nextEffect}}catch(W){if(De===null)throw Error(v(330));sr(De,W),De=De.nextEffect}while(De!==null);Co&&ye(),qe(a.containerInfo),a.current=f,De=y;do try{for(Be=a;De!==null;){var Qt=De.flags;if(Qt&36&&Ev(Be,De.alternate,De),Qt&128){Je=void 0;var Oi=De.ref;if(Oi!==null){var G=De.stateNode;switch(De.tag){case 5:Je=it(G);break;default:Je=G}typeof Oi=="function"?Oi(Je):Oi.current=Je}}De=De.nextEffect}}catch(W){if(De===null)throw Error(v(330));sr(De,W),De=De.nextEffect}while(De!==null);De=null,vv(),Ge=b}else a.current=f;if(ss)ss=!1,ga=a,Yn=l;else for(De=y;De!==null;)l=De.nextEffect,De.nextEffect=null,De.flags&8&&(Qt=De,Qt.sibling=null,Qt.stateNode=null),De=l;if(y=a.pendingLanes,y===0&&(In=null),y===1?a===kr?Ln++:(Ln=0,kr=a):Ln=0,f=f.stateNode,_i&&typeof _i.onCommitFiberRoot=="function")try{_i.onCommitFiberRoot(tc,f,void 0,(f.current.flags&64)===64)}catch{}if(Ai(a,On()),wo)throw wo=!1,a=nr,nr=null,a;return Ge&8||Ui(),null}function Oo(){for(;De!==null;){var a=De.alternate;Co||To===null||(De.flags&8?Te(De,To)&&(Co=!0,X()):De.tag===13&&Tv(a,De)&&Te(De,To)&&(Co=!0,X()));var l=De.flags;l&256&&ii(a,De),!(l&512)||ss||(ss=!0,aa(97,function(){return si(),null})),De=De.nextEffect}}function si(){if(Yn!==90){var a=97<Yn?97:Yn;return Yn=90,Cr(a,rr)}return!1}function au(a,l){ru.push(l,a),ss||(ss=!0,aa(97,function(){return si(),null}))}function Dc(a,l){Yt.push(l,a),ss||(ss=!0,aa(97,function(){return si(),null}))}function rr(){if(ga===null)return!1;var a=ga;if(ga=null,Ge&48)throw Error(v(331));var l=Ge;Ge|=32;var f=Yt;Yt=[];for(var y=0;y<f.length;y+=2){var b=f[y],T=f[y+1],N=b.destroy;if(b.destroy=void 0,typeof N=="function")try{N()}catch(te){if(T===null)throw Error(v(330));sr(T,te)}}for(f=ru,ru=[],y=0;y<f.length;y+=2){b=f[y],T=f[y+1];try{var F=b.create;b.destroy=F()}catch(te){if(T===null)throw Error(v(330));sr(T,te)}}for(F=a.current.firstEffect;F!==null;)a=F.nextEffect,F.nextEffect=null,F.flags&8&&(F.sibling=null,F.stateNode=null),F=a;return Ge=l,Ui(),!0}function Do(a,l,f){l=wc(f,l),l=Nd(a,l,1),hr(a,l),l=vi(),a=ks(a,1),a!==null&&(El(a,1,l),Ai(a,l))}function sr(a,l){if(a.tag===3)Do(a,a,l);else for(var f=a.return;f!==null;){if(f.tag===3){Do(f,a,l);break}else if(f.tag===1){var y=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(In===null||!In.has(y))){a=wc(l,a);var b=_d(f,a,1);if(hr(f,b),b=vi(),f=ks(f,1),f!==null)El(f,1,b),Ai(f,b);else if(typeof y.componentDidCatch=="function"&&(In===null||!In.has(y)))try{y.componentDidCatch(l,a)}catch{}break}}f=f.return}}function Lo(a,l,f){var y=a.pingCache;y!==null&&y.delete(l),l=vi(),a.pingedLanes|=a.suspendedLanes&f,qn===a&&(zt&f)===f&&(Dn===4||Dn===3&&(zt&62914560)===zt&&500>On()-Eo?ri(a,0):tr|=f),Ai(a,l)}function ou(a,l){var f=a.stateNode;f!==null&&f.delete(l),l=0,l===0&&(l=a.mode,l&2?l&4?(zr===0&&(zr=rs),l=ra(62914560&~zr),l===0&&(l=4194304)):l=sa()===99?1:2:l=1),f=vi(),a=ks(a,l),a!==null&&(El(a,l,f),Ai(a,f))}var _s;_s=function(a,l,f){var y=l.lanes;if(a!==null)if(a.memoizedProps!==l.pendingProps||Hn.current)Hi=!0;else if(f&y)Hi=!!(a.flags&16384);else{switch(Hi=!1,l.tag){case 3:Yl(l),dc();break;case 5:Nl(l);break;case 1:en(l.type)&&$a(l);break;case 4:er(l,l.stateNode.containerInfo);break;case 10:uc(l,l.memoizedProps.value);break;case 13:if(l.memoizedState!==null)return f&l.child.childLanes?on(a,l,f):(un(an,an.current&1),l=Pr(a,l,f),l!==null?l.sibling:null);un(an,an.current&1);break;case 19:if(y=(f&l.childLanes)!==0,a.flags&64){if(y)return Pd(a,l,f);l.flags|=64}var b=l.memoizedState;if(b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),un(an,an.current),y)break;return null;case 23:case 24:return l.lanes=0,da(a,l,f)}return Pr(a,l,f)}else Hi=!1;switch(l.lanes=0,l.tag){case 2:if(y=l.type,a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),a=l.pendingProps,b=cr(l,cn.current),Ts(l,f),b=Fl(null,l,y,a,b,f),l.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0){if(l.tag=1,l.memoizedState=null,l.updateQueue=null,en(y)){var T=!0;$a(l)}else T=!1;l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,Ii(l);var N=y.getDerivedStateFromProps;typeof N=="function"&&oa(l,y,N,a),b.updater=Ll,l.stateNode=b,b._reactInternals=l,kl(l,y,a,f),l=ql(null,l,y,!0,T,f)}else l.tag=0,ni(null,l,b,f),l=l.child;return l;case 16:b=l.elementType;e:{switch(a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),a=l.pendingProps,T=b._init,b=T(b._payload),l.type=b,T=l.tag=Ea(b),a=Zi(b,a),T){case 0:l=lo(null,l,b,a,f);break e;case 1:l=yc(null,l,b,a,f);break e;case 11:l=$l(null,l,b,a,f);break e;case 14:l=gc(null,l,b,Zi(b.type,a),y,f);break e}throw Error(v(306,b,""))}return l;case 0:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),lo(a,l,y,b,f);case 1:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),yc(a,l,y,b,f);case 3:if(Yl(l),y=l.updateQueue,a===null||y===null)throw Error(v(282));if(y=l.pendingProps,b=l.memoizedState,b=b!==null?b.element:null,Ji(a,l),Cs(l,y,null,f),y=l.memoizedState.element,y===b)dc(),l=Pr(a,l,f);else{if(b=l.stateNode,(T=b.hydrate)&&(bt?(Wn=he(l.stateNode.containerInfo),Bi=l,T=Ti=!0):T=!1),T){if(bt&&(a=b.mutableSourceEagerHydrationData,a!=null))for(b=0;b<a.length;b+=2)T=a[b],N=a[b+1],We?T._workInProgressVersionPrimary=N:T._workInProgressVersionSecondary=N,As.push(T);for(f=pr(l,null,y,f),l.child=f;f;)f.flags=f.flags&-3|1024,f=f.sibling}else ni(a,l,y,f),dc();l=l.child}return l;case 5:return Nl(l),a===null&&Ul(l),y=l.type,b=l.pendingProps,T=a!==null?a.memoizedProps:null,N=b.children,wt(y,b)?N=null:T!==null&&wt(y,T)&&(l.flags|=16),Ls(a,l),ni(a,l,N,f),l.child;case 6:return a===null&&Ul(l),null;case 13:return on(a,l,f);case 4:return er(l,l.stateNode.containerInfo),y=l.pendingProps,a===null?l.child=Rs(l,null,y,f):ni(a,l,y,f),l.child;case 11:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),$l(a,l,y,b,f);case 7:return ni(a,l,l.pendingProps,f),l.child;case 8:return ni(a,l,l.pendingProps.children,f),l.child;case 12:return ni(a,l,l.pendingProps.children,f),l.child;case 10:e:{if(y=l.type._context,b=l.pendingProps,N=l.memoizedProps,T=b.value,uc(l,T),N!==null){var F=N.value;if(T=ji(F,T)?0:(typeof y._calculateChangedBits=="function"?y._calculateChangedBits(F,T):1073741823)|0,T===0){if(N.children===b.children&&!Hn.current){l=Pr(a,l,f);break e}}else for(F=l.child,F!==null&&(F.return=l);F!==null;){var te=F.dependencies;if(te!==null){N=F.child;for(var xe=te.firstContext;xe!==null;){if(xe.context===y&&xe.observedBits&T){F.tag===1&&(xe=dr(-1,f&-f),xe.tag=2,hr(F,xe)),F.lanes|=f,xe=F.alternate,xe!==null&&(xe.lanes|=f),cc(F.return,f),te.lanes|=f;break}xe=xe.next}}else N=F.tag===10&&F.type===l.type?null:F.child;if(N!==null)N.return=F;else for(N=F;N!==null;){if(N===l){N=null;break}if(F=N.sibling,F!==null){F.return=N.return,N=F;break}N=N.return}F=N}}ni(a,l,b.children,f),l=l.child}return l;case 9:return b=l.type,T=l.pendingProps,y=T.children,Ts(l,f),b=wi(b,T.unstable_observedBits),y=y(b),l.flags|=1,ni(a,l,y,f),l.child;case 14:return b=l.type,T=Zi(b,l.pendingProps),T=Zi(b.type,T),gc(a,l,b,T,y,f);case 15:return Ds(a,l,l.type,l.pendingProps,y,f);case 17:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:Zi(y,b),a!==null&&(a.alternate=null,l.alternate=null,l.flags|=2),l.tag=1,en(y)?(a=!0,$a(l)):a=!1,Ts(l,f),Od(l,y,b),kl(l,y,b,f),ql(null,l,y,!0,a,f);case 19:return Pd(a,l,f);case 23:return da(a,l,f);case 24:return da(a,l,f)}throw Error(v(156,l.tag))};var Us={current:!1},xa=h.unstable_flushAllWithoutAsserting,Po=typeof xa=="function";function lu(){if(xa!==void 0)return xa();for(var a=!1;si();)a=!0;return a}function Lc(a){try{lu(),Mc(function(){lu()?Lc(a):a()})}catch(l){a(l)}}var ko=0,uu=!1;function Rv(a,l,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(a,l,f,y){return new Rv(a,l,f,y)}function Pc(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ea(a){if(typeof a=="function")return Pc(a)?1:0;if(a!=null){if(a=a.$$typeof,a===L)return 11;if(a===H)return 14}return 2}function Ht(a,l){var f=a.alternate;return f===null?(f=Mi(a.tag,l,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=l,f.type=a.type,f.flags=0,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null),f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,l=a.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function zo(a,l,f,y,b,T){var N=2;if(y=a,typeof a=="function")Pc(a)&&(N=1);else if(typeof a=="string")N=5;else e:switch(a){case w:return js(f.children,b,T,l);case B:N=8,b|=16;break;case A:N=8,b|=1;break;case k:return a=Mi(12,f,l,b|8),a.elementType=k,a.type=k,a.lanes=T,a;case P:return a=Mi(13,f,l,b),a.type=P,a.elementType=P,a.lanes=T,a;case O:return a=Mi(19,f,l,b),a.elementType=O,a.lanes=T,a;case J:return wa(f,b,T,l);case ie:return a=Mi(24,f,l,b),a.elementType=ie,a.lanes=T,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case M:N=10;break e;case _:N=9;break e;case L:N=11;break e;case H:N=14;break e;case q:N=16,y=null;break e;case Q:N=22;break e}throw Error(v(130,a==null?a:typeof a,""))}return l=Mi(N,f,l,b),l.elementType=a,l.type=y,l.lanes=T,l}function js(a,l,f,y){return a=Mi(7,a,y,l),a.lanes=f,a}function wa(a,l,f,y){return a=Mi(23,a,y,l),a.elementType=J,a.lanes=f,a}function No(a,l,f){return a=Mi(6,a,null,l),a.lanes=f,a}function Ta(a,l,f){return l=Mi(4,a.children!==null?a.children:[],a.key,l),l.lanes=f,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function kc(a,l,f){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ie,this.pendingContext=this.context=null,this.hydrate=f,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=nc(0),this.expirationTimes=nc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nc(0),bt&&(this.mutableSourceEagerHydrationData=null)}function _o(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(v(188)):Error(v(268,Object.keys(a)));return a=Xe(l),a===null?null:a.stateNode}function cu(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<l?f:l}}function Uo(a,l){cu(a,l),(a=a.alternate)&&cu(a,l)}function as(a){return a=Xe(a),a===null?null:a.stateNode}function os(){return null}return r.IsThisRendererActing=Us,r.act=function(a){function l(){ko--,nu.current=f,Us.current=y}uu===!1&&(uu=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),ko++;var f=nu.current,y=Us.current;nu.current=!0,Us.current=!0;try{var b=Bd(a)}catch(T){throw l(),T}if(b!==null&&typeof b=="object"&&typeof b.then=="function")return{then:function(T,N){b.then(function(){1<ko||Po===!0&&f===!0?(l(),T()):Lc(function(F){l(),F?N(F):T()})},function(F){l(),N(F)})}};try{ko!==1||Po!==!1&&f!==!1||lu(),l()}catch(T){throw l(),T}return{then:function(T){T()}}},r.attemptContinuousHydration=function(a){if(a.tag===13){var l=vi();Nr(a,67108864,l),Uo(a,67108864)}},r.attemptHydrationAtCurrentPriority=function(a){if(a.tag===13){var l=vi(),f=Cn(a);Nr(a,f,l),Uo(a,f)}},r.attemptSynchronousHydration=function(a){switch(a.tag){case 3:var l=a.stateNode;if(l.hydrate){var f=Ki(l.pendingLanes);l.expiredLanes|=f&l.pendingLanes,Ai(l,On()),!(Ge&48)&&(tn(),Ui())}break;case 13:var y=vi();Hd(function(){return Nr(a,1,y)}),Uo(a,4)}},r.attemptUserBlockingHydration=function(a){if(a.tag===13){var l=vi();Nr(a,4,l),Uo(a,4)}},r.batchedEventUpdates=function(a,l){var f=Ge;Ge|=2;try{return a(l)}finally{Ge=f,Ge===0&&(tn(),Ui())}},r.batchedUpdates=Bd,r.createComponentSelector=function(a){return{$$typeof:vo,value:a}},r.createContainer=function(a,l,f){return a=new kc(a,l,f),l=Mi(3,null,null,l===2?7:l===1?3:0),a.current=l,l.stateNode=a,Ii(l),a},r.createHasPsuedoClassSelector=function(a){return{$$typeof:Zl,value:a}},r.createPortal=function(a,l,f){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:y==null?null:""+y,children:a,containerInfo:l,implementation:f}},r.createRoleSelector=function(a){return{$$typeof:Jl,value:a}},r.createTestNameSelector=function(a){return{$$typeof:mo,value:a}},r.createTextSelector=function(a){return{$$typeof:eu,value:a}},r.deferredUpdates=function(a){return Cr(97,a)},r.discreteUpdates=function(a,l,f,y,b){var T=Ge;Ge|=4;try{return Cr(98,a.bind(null,l,f,y,b))}finally{Ge=T,Ge===0&&(tn(),Ui())}},r.findAllNodes=Ac,r.findBoundingRects=function(a,l){if(!Ve)throw Error(v(363));l=Ac(a,l),a=[];for(var f=0;f<l.length;f++)a.push(zi(l[f]));for(l=a.length-1;0<l;l--){f=a[l];for(var y=f.x,b=y+f.width,T=f.y,N=T+f.height,F=l-1;0<=F;F--)if(l!==F){var te=a[F],xe=te.x,Be=xe+te.width,Je=te.y,Me=Je+te.height;if(y>=xe&&T>=Je&&b<=Be&&N<=Me){a.splice(l,1);break}else if(y!==xe||f.width!==te.width||Me<T||Je>N){if(!(T!==Je||f.height!==te.height||Be<y||xe>b)){xe>y&&(te.width+=xe-y,te.x=y),Be<b&&(te.width=b-xe),a.splice(l,1);break}}else{Je>T&&(te.height+=Je-T,te.y=T),Me<N&&(te.height=N-Je),a.splice(l,1);break}}}return a},r.findHostInstance=_o,r.findHostInstanceWithNoPortals=function(a){return a=ft(a),a===null?null:a.tag===20?a.stateNode.instance:a.stateNode},r.findHostInstanceWithWarning=function(a){return _o(a)},r.flushControlled=function(a){var l=Ge;Ge|=1;try{Cr(99,a)}finally{Ge=l,Ge===0&&(tn(),Ui())}},r.flushDiscreteUpdates=function(){!(Ge&49)&&(ya(),si())},r.flushPassiveEffects=si,r.flushSync=Hd,r.focusWithin=function(a,l){if(!Ve)throw Error(v(363));for(a=Tc(a),l=Rc(a,l),l=Array.from(l),a=0;a<l.length;){var f=l[a++];if(!ot(f)){if(f.tag===5&&Dt(f.stateNode))return!0;for(f=f.child;f!==null;)l.push(f),f=f.sibling}}return!1},r.getCurrentUpdateLanePriority=function(){return bl},r.getFindAllNodesFailureDescription=function(a,l){if(!Ve)throw Error(v(363));var f=0,y=[];a=[Tc(a),0];for(var b=0;b<a.length;){var T=a[b++],N=a[b++],F=l[N];if((T.tag!==5||!ot(T))&&(Cc(T,F)&&(y.push(yo(F)),N++,N>f&&(f=N)),N<l.length))for(T=T.child;T!==null;)a.push(T,N),T=T.sibling}if(f<l.length){for(a=[];f<l.length;f++)a.push(yo(l[f]));return`findAllNodes was able to match part of the selector:
210
210
  `+(y.join(" > ")+`
211
211
 
212
212
  No matching component was found for:
213
- `)+a.join(" > ")}return null},r.getPublicRootInstance=function(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return Ue(a.child.stateNode);default:return a.child.stateNode}},r.injectIntoDevTools=function(a){if(a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:g.ReactCurrentDispatcher,findHostInstanceByFiber:as,findFiberByHostInstance:a.findFiberByHostInstance||os,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!l.isDisabled&&l.supportsFiber)try{tc=l.inject(a),Ni=l}catch{}a=!0}return a},r.observeVisibleRects=function(a,l,f,y){if(!Ve)throw Error(v(363));a=Ac(a,l);var b=et(a,f,y).disconnect;return{disconnect:function(){b()}}},r.registerMutableSourceForHydration=function(a,l){var f=l._getVersion;f=f(l._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[l,f]:a.mutableSourceEagerHydrationData.push(l,f)},r.runWithPriority=function(a,l){var f=bl;try{return bl=a,l()}finally{bl=f}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(a,l){var f=qe;qe&=-2,qe|=8;try{return a(l)}finally{qe=f,qe===0&&(en(),_i())}},r.updateContainer=function(a,l,f,y){var b=l.current,T=pi(),N=Cn(b);e:if(f){f=f._reactInternals;t:{if(me(f)!==f||f.tag!==1)throw Error(v(170));var B=f;do{switch(B.tag){case 3:B=B.stateNode.context;break t;case 1:if(Jt(B.type)){B=B.stateNode.__reactInternalMemoizedMergedChildContext;break t}}B=B.return}while(B!==null);throw Error(v(171))}if(f.tag===1){var ne=f.type;if(Jt(ne)){f=bd(f,ne,B);break e}}f=B}else f=ur;return l.context===null?l.context=f:l.pendingContext=f,l=dr(T,N),l.payload={element:a},y=y===void 0?null:y,y!==null&&(l.callback=y),hr(b,l),Nr(b,N,T),N},r}}(pf)),pf.exports}process.env.NODE_ENV==="production"?Xh.exports=Xx():Xh.exports=Gx();var Kx=Xh.exports;const Zx=Bx(Kx),vf=["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 Jx(){return vf.reduce((t,e)=>(t[e]=[],t),{})}const tl=vf.reduce((t,e)=>(t[e.slice(2).toLowerCase()]=e,t[e]=e,t),{}),Cu=(t,e,n)=>{const r=t.length,o=n||We(r);for(let c=0;c<r;c++)o[c]=c%5===0?t[c+1]<e[3]&&t[c+3]>e[1]&&t[c+2]<e[4]&&t[c+4]>e[2]?1:0:t[c];return o};function We(t,e,n){return new Float32Array(t,e,n)}const eE=(t,e,n)=>{const r=t[1]<=e[3]&&t[3]>=e[1]&&t[2]<=e[4]&&t[4]>=e[2],o=n||We(5);return r?(o[0]=1,o[1]=Math.max(t[1],e[1]),o[2]=Math.max(t[2],e[2]),o[3]=Math.min(t[3],e[3]),o[4]=Math.min(t[4],e[4]),o):(o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o)},tE=t=>t.length/5,ps=(t,e,n)=>{const r=n||We(9);return r[0]=t[0]*e[0]+t[1]*e[3]+t[2]*e[6],r[1]=t[0]*e[1]+t[1]*e[4]+t[2]*e[7],r[2]=t[0]*e[2]+t[1]*e[5]+t[2]*e[8],r[3]=t[3]*e[0]+t[4]*e[3]+t[5]*e[6],r[4]=t[3]*e[1]+t[4]*e[4]+t[5]*e[7],r[5]=t[3]*e[2]+t[4]*e[5]+t[5]*e[8],r[6]=t[6]*e[0]+t[7]*e[3]+t[8]*e[6],r[7]=t[6]*e[1]+t[7]*e[4]+t[8]*e[7],r[8]=t[6]*e[2]+t[7]*e[5]+t[8]*e[8],r};class wt{constructor(e){this.index=0,this.length=e,this.points=We(this.length)}static grid(e=1,n=1){return new wt(5*e*n)}static point(e,n){const r=We(5);return r[0]=1,r[1]=e,r[2]=n,r[3]=e,r[4]=n,r}static positionPair(e){const n=We(5);return n[0]=1,n[1]=e.x1,n[2]=e.y1,n[3]=e.x2,n[4]=e.y2,n}static projection(e){return wt.singleBox(e.width,e.height,e.x,e.y)}static singleBox(e,n,r=0,o=0){const c=We(5);return c[0]=1,c[1]=r,c[2]=o,c[3]=e+r,c[4]=n+o,c}row(e){return e(this)}addPoints(e,n,r,o){return this.points[this.index]=1,this.points[1+this.index]=e,this.points[2+this.index]=n,this.points[3+this.index]=r,this.points[4+this.index]=o,this.index+=5,this}addBox(e,n,r,o){return this.addPoints(e,n,e+r,n+o),this}build(){return this.points}}const Br=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)t[r]=r%5===0?e[6]*t[r+1]+e[7]*t[r+2]+e[8]*t[r]:r%5%2===1?e[0]*t[r]+e[1]*t[r+1]+e[2]:e[3]*t[r-1]+e[4]*t[r]+e[5];return t},Ys=t=>{const e=We(9);return e[0]=t,e[4]=t,e[8]=1,e},mi=(t,e)=>{const n=We(9);return n[0]=1,n[2]=t,n[4]=1,n[5]=e,n[8]=1,n},Ru=(t,e,n)=>ps(mi((1-t)*e,(1-t)*n),Ys(t)),vs=(t,e,n)=>{const r=t.length,o=n&&n.length>=r?n.slice(0,r):We(r);for(let c=0;c<r;c++)o[c]=c%5===0?e[6]*t[c+1]+e[7]*t[c+2]+e[8]*t[c]:c%5%2===1?e[0]*t[c]+e[1]*t[c+1]+e[2]:e[3]*t[c-1]+e[4]*t[c]+e[5];return o};let mf=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");class Hr{constructor(){this.__revision=0,this.__owner={value:void 0},this.__state={},this.scale=1,this.layers=[],this.time=[],this.addEventListener=(e,n,r)=>{const o=tl[e];if(!this.eventHandlers[o])throw new Error(`Unknown event ${o}`);this.eventHandlers[o].indexOf(n)===-1&&this.eventHandlers[o].push(n)},this.removeEventListener=(e,n)=>{const r=tl[e];if(!this.eventHandlers[r]){console.warn(`Unknown event ${r}`);return}this.eventHandlers[r].indexOf(n)!==-1&&(this.eventHandlers[r]=this.eventHandlers[r].filter(o=>o!==n))},this.id=this.__id=mf(),this.eventHandlers=Jx()}get crop(){return this._crop}set crop(e){this._crop=e}getObjectsAt(e){return[]}getAllPointsAt(e,n,r){return[]}getScheduledUpdates(e,n){return[]}dispatchEvent(e,n){const r=this.eventHandlers[e],o=r?r.length:0;let c=!1;if(o)for(let h=0;h<o;h++)try{r[h](n),c=!0}catch(v){console.error(e,v)}return c}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(e,n){Br(this.points,mi(e,n))}atScale(e){Br(this.points,Ru(e,this.x,this.y)),this.scale*=e}transform(e){Br(this.points,e)}applyProps(e){this.__revision++}appendChild(e){}removeChild(e){}insertBefore(e,n){}hideInstance(){}}class xr extends Hr{constructor(e){if(super(),this.type="spacial-content",this.style={opacity:1},!e)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:We(5)},this.points=We(5);else{const n=e.scale||1;this.id=e.id||e.uri,this.uri=e.uri,this.points=wt.singleBox(e.width,e.height,e.x,e.y),this.display={x:0,y:0,scale:n,width:e.width/n,height:e.height/n,points:wt.singleBox(e.width/n,e.height/n),rotation:e==null?void 0:e.rotation}}}applyProps(e){const n=e.display?e.display.width:e.target.width,r=e.target.width/n;if(this.id=e.id||e.uri,this.uri=e.uri,this.points.set(wt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y)),e.style&&typeof e.style.opacity<"u"&&(this.style.opacity=e.style.opacity),e.crop){this.cropData=e.crop;const o=wt.singleBox(e.crop.width,e.crop.height,e.crop.x,e.crop.y);Br(o,mi(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(o):this.crop=We(o)}e.display?(this.display.scale=r,this.display.width=e.display.width,this.display.height=e.display.height,this.display.rotation=e.display.rotation,this.display.points=wt.singleBox(e.display.width,e.display.height)):(this.display.scale=r,this.display.width=e.target.width/r,this.display.height=e.target.height/r,this.display.points=wt.singleBox(e.target.width/r,e.target.height/r))}getAllPointsAt(e,n,r){return[[this,this.crop||this.points,n]]}static fromSvg(e,n,r,o){return xr.fromImage("data:image/svg+xml;base64,"+btoa(e),n,r,o)}static fromImage(e,n,r,o){const c=new xr;return c.applyProps({uri:e,id:o,display:r,target:n}),c}getImageUrl(){return this.uri}}class tp extends Hr{constructor(e){if(super(),this.type="spacial-content",this.getTexture=()=>({source:void 0,hash:-1}),!e)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:We(5)},this.points=We(5);else{const n=e.scale||1;this.id=e.id||e.uri,this.uri=e.uri,this.points=wt.singleBox(e.width,e.height),this.display={x:0,y:0,scale:n,width:e.width/n,height:e.height/n,points:n!==1?wt.singleBox(e.width/n,e.height/n):this.points}}}applyProps(e){const n=e.display?e.display.width:e.target.width,r=e.target.width/n;this.id=e.id,this.points.set(wt.singleBox(e.target.width,e.target.height)),this.display.scale=r,this.display.width=e.target.width/r,this.display.height=e.target.height/r,this.getTexture=e.getTexture,this.display.points=r!==1?wt.singleBox(e.target.width/r,e.target.height/r):this.points}getAllPointsAt(e,n,r){return[[this,this.points,n]]}}function nE(t,e,n=1){const r=e.length;if(r===0)throw new Error("No resources passed in.");let o=0;for(let c=0;c<r&&!(!e[c]||!e[c].display);c++)o=Math.abs(e[c].display.scale-t)*n<Math.abs(e[o].display.scale-t)?c:o;return o}function Og(t,e){return Math.abs(t-e)}function gf(t,e){const n=Og(t.x,e.x),r=Og(t.y,e.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}function iE(t){const e=t.length;return t.indexOf("/info.json")===e-10?t.slice(0,-10):t}function Dg(...t){return e=>t.forEach(n=>function(r,o){typeof r=="function"?r(o):r!=null&&(r.current=o)}(n,e))}function yf(...t){return ae.useCallback(Dg(...t),t)}function oi(){return oi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},oi.apply(this,arguments)}const Lg=ae.forwardRef((t,e)=>{const{children:n,...r}=t;return ae.Children.toArray(n).some(kg)?ae.createElement(ae.Fragment,null,ae.Children.map(n,o=>kg(o)?ae.createElement(np,oi({},r,{ref:e}),o.props.children):o)):ae.createElement(np,oi({},r,{ref:e}),n)});Lg.displayName="Slot";const np=ae.forwardRef((t,e)=>{const{children:n,...r}=t;return ae.isValidElement(n)?ae.cloneElement(n,{...rE(r,n.props),ref:Dg(e,n.ref)}):ae.Children.count(n)>1?ae.Children.only(null):null});np.displayName="SlotClone";const Pg=({children:t})=>ae.createElement(ae.Fragment,null,t);function kg(t){return ae.isValidElement(t)&&t.type===Pg}function rE(t,e){const n={...e};for(const r in e){const o=t[r],c=e[r];/^on[A-Z]/.test(r)?n[r]=(...h)=>{c==null||c(...h),o==null||o(...h)}:r==="style"?n[r]={...o,...c}:r==="className"&&(n[r]=[o,c].filter(Boolean).join(" "))}return{...t,...n}}const Sf=globalThis!=null&&globalThis.document?ae.useLayoutEffect:()=>{};var bf=function(e,n,r,o){this.name=e,this.fn=n,this.args=r,this.modifiers=o};bf.prototype._test=function(e){var n=this.fn;try{nl(this.modifiers.slice(),n,this)(e)}catch{n=function(){return!1}}try{return nl(this.modifiers.slice(),n,this)(e)}catch{return!1}},bf.prototype._check=function(e){try{nl(this.modifiers.slice(),this.fn,this)(e)}catch{if(nl(this.modifiers.slice(),function(r){return r},this)(!1))return}if(!nl(this.modifiers.slice(),this.fn,this)(e))throw null},bf.prototype._testAsync=function(e){var n=this;return new Promise(function(r,o){Ng(n.modifiers.slice(),n.fn,n)(e).then(function(c){c?r(e):o(null)}).catch(function(c){return o(c)})})};function zg(t,e){return e===void 0&&(e="simple"),typeof t=="object"?t[e]:t}function nl(t,e,n){if(t.length){var r=t.shift(),o=nl(t,e,n);return r.perform(o,n)}else return zg(e)}function Ng(t,e,n){if(t.length){var r=t.shift(),o=Ng(t,e,n);return r.performAsync(o,n)}else return function(c){return Promise.resolve(zg(e,"async")(c))}}var sE=function(e,n,r){this.name=e,this.perform=n,this.performAsync=r},ip=function(t){function e(n,r,o,c){for(var h=[],v=arguments.length-4;v-- >0;)h[v]=arguments[v+4];t.call(this,h),t.captureStackTrace&&t.captureStackTrace(this,e),this.rule=n,this.value=r,this.cause=o,this.target=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Vr=function(e,n){e===void 0&&(e=[]),n===void 0&&(n=[]),this.chain=e,this.nextRuleModifiers=n};Vr.prototype._applyRule=function(e,n){var r=this;return function(){for(var o=[],c=arguments.length;c--;)o[c]=arguments[c];return r.chain.push(new bf(n,e.apply(r,o),o,r.nextRuleModifiers)),r.nextRuleModifiers=[],r}},Vr.prototype._applyModifier=function(e,n){return this.nextRuleModifiers.push(new sE(n,e.simple,e.async)),this},Vr.prototype._clone=function(){return new Vr(this.chain.slice(),this.nextRuleModifiers.slice())},Vr.prototype.test=function(e){return this.chain.every(function(n){return n._test(e)})},Vr.prototype.testAll=function(e){var n=[];return this.chain.forEach(function(r){try{r._check(e)}catch(o){n.push(new ip(r,e,o))}}),n},Vr.prototype.check=function(e){this.chain.forEach(function(n){try{n._check(e)}catch(r){throw new ip(n,e,r)}})},Vr.prototype.testAsync=function(e){var n=this;return new Promise(function(r,o){_g(e,n.chain.slice(),r,o)})};function _g(t,e,n,r){if(e.length){var o=e.shift();o._testAsync(t).then(function(){_g(t,e,n,r)},function(c){r(new ip(o,t,c))})}else n(t)}var Ug=function(t,e){return e&&typeof t=="string"&&t.trim().length===0?!0:t==null};function aE(t,e){return e===void 0&&(e=!1),{simple:function(n){return Ug(n,e)||t.check(n)===void 0},async:function(n){return Ug(n,e)||t.testAsync(n)}}}function Qs(){return typeof Proxy<"u"?jg(new Vr):rp(new Vr)}var Au={};Qs.extend=function(t){Object.assign(Au,t)},Qs.clearCustomRules=function(){Au={}};function jg(t){return new Proxy(t,{get:function(n,r){if(r in n)return n[r];var o=jg(t._clone());if(r in xf)return o._applyModifier(xf[r],r);if(r in Au)return o._applyRule(Au[r],r);if(r in sp)return o._applyRule(sp[r],r)}})}function rp(t){var e=function(o,c){return Object.keys(o).forEach(function(h){c[h]=function(){for(var v=[],g=arguments.length;g--;)v[g]=arguments[g];var x=rp(c._clone()),m=x._applyRule(o[h],h).apply(void 0,v);return m}}),c},n=e(sp,t),r=e(Au,n);return Object.keys(xf).forEach(function(o){Object.defineProperty(r,o,{get:function(){var c=rp(r._clone());return c._applyModifier(xf[o],o)}})}),r}var xf={not:{simple:function(t){return function(e){return!t(e)}},async:function(t){return function(e){return Promise.resolve(t(e)).then(function(n){return!n}).catch(function(){return!0})}}},some:{simple:function(t){return function(e){return Ef(e).some(function(n){try{return t(n)}catch{return!1}})}},async:function(t){return function(e){return Promise.all(Ef(e).map(function(n){try{return t(n).catch(function(){return!1})}catch{return!1}})).then(function(n){return n.some(Boolean)})}}},every:{simple:function(t){return function(e){return e!==!1&&Ef(e).every(t)}},async:function(t){return function(e){return Promise.all(Ef(e).map(t)).then(function(n){return n.every(Boolean)})}}},strict:{simple:function(t,e){return function(n){return Ig(e)&&n&&typeof n=="object"?Object.keys(e.args[0]).length===Object.keys(n).length&&t(n):t(n)}},async:function(t,e){return function(n){return Promise.resolve(t(n)).then(function(r){return Ig(e)&&n&&typeof n=="object"?Object.keys(e.args[0]).length===Object.keys(n).length&&r:r}).catch(function(){return!1})}}}};function Ig(t){return t&&t.name==="schema"&&t.args.length>0&&typeof t.args[0]=="object"}function Ef(t){return typeof t=="string"?t.split(""):t}var sp={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(t){return t===void 0&&(t=!0),function(e){return typeof e=="number"&&(t||isFinite(e))}},integer:function(){return function(t){var e=Number.isInteger||oE;return e(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return il("string")},boolean:function(){return il("boolean")},undefined:function(){return il("undefined")},null:function(){return il("null")},array:function(){return il("array")},object:function(){return il("object")},instanceOf:function(t){return function(e){return e instanceof t}},pattern:function(t){return function(e){return t.test(e)}},lowercase:function(){return function(t){return typeof t=="boolean"||t===t.toLowerCase()&&t.trim()!==""}},uppercase:function(){return function(t){return t===t.toUpperCase()&&t.trim()!==""}},vowel:function(){return function(t){return/^[aeiou]+$/i.test(t)}},consonant:function(){return function(t){return/^(?=[^aeiou])([a-z]+)$/i.test(t)}},first:function(t){return function(e){return e[0]==t}},last:function(t){return function(e){return e[e.length-1]==t}},empty:function(){return function(t){return t.length===0}},length:function(t,e){return function(n){return n.length>=t&&n.length<=(e||t)}},minLength:function(t){return function(e){return e.length>=t}},maxLength:function(t){return function(e){return e.length<=t}},negative:function(){return function(t){return t<0}},positive:function(){return function(t){return t>=0}},between:function(t,e){return function(n){return n>=t&&n<=e}},range:function(t,e){return function(n){return n>=t&&n<=e}},lessThan:function(t){return function(e){return e<t}},lessThanOrEqual:function(t){return function(e){return e<=t}},greaterThan:function(t){return function(e){return e>t}},greaterThanOrEqual:function(t){return function(e){return e>=t}},even:function(){return function(t){return t%2===0}},odd:function(){return function(t){return t%2!==0}},includes:function(t){return function(e){return~e.indexOf(t)}},schema:function(t){return lE(t)},passesAnyOf:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(n){return t.some(function(r){return r.test(n)})}},optional:aE};function il(t){return function(e){return Array.isArray(e)&&t==="array"||e===null&&t==="null"||typeof e===t}}function oE(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function lE(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach(function(r){var o=t[r];try{o.check((e||{})[r])}catch(c){c.target=r,n.push(c)}}),n.length>0)throw n;return!0},async:function(e){var n=[],r=Object.keys(t).map(function(o){var c=t[o];return c.testAsync((e||{})[o]).catch(function(h){h.target=o,n.push(h)})});return Promise.all(r).then(function(){if(n.length>0)throw n;return!0})}}}var Bt="colors",gi="sizes",Ne="space",uE={gap:Ne,gridGap:Ne,columnGap:Ne,gridColumnGap:Ne,rowGap:Ne,gridRowGap:Ne,inset:Ne,insetBlock:Ne,insetBlockEnd:Ne,insetBlockStart:Ne,insetInline:Ne,insetInlineEnd:Ne,insetInlineStart:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,marginBlock:Ne,marginBlockEnd:Ne,marginBlockStart:Ne,marginInline:Ne,marginInlineEnd:Ne,marginInlineStart:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,paddingBlock:Ne,paddingBlockEnd:Ne,paddingBlockStart:Ne,paddingInline:Ne,paddingInlineEnd:Ne,paddingInlineStart:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,scrollMargin:Ne,scrollMarginTop:Ne,scrollMarginRight:Ne,scrollMarginBottom:Ne,scrollMarginLeft:Ne,scrollMarginX:Ne,scrollMarginY:Ne,scrollMarginBlock:Ne,scrollMarginBlockEnd:Ne,scrollMarginBlockStart:Ne,scrollMarginInline:Ne,scrollMarginInlineEnd:Ne,scrollMarginInlineStart:Ne,scrollPadding:Ne,scrollPaddingTop:Ne,scrollPaddingRight:Ne,scrollPaddingBottom:Ne,scrollPaddingLeft:Ne,scrollPaddingX:Ne,scrollPaddingY:Ne,scrollPaddingBlock:Ne,scrollPaddingBlockEnd:Ne,scrollPaddingBlockStart:Ne,scrollPaddingInline:Ne,scrollPaddingInlineEnd:Ne,scrollPaddingInlineStart:Ne,fontSize:"fontSizes",background:Bt,backgroundColor:Bt,backgroundImage:Bt,borderImage:Bt,border:Bt,borderBlock:Bt,borderBlockEnd:Bt,borderBlockStart:Bt,borderBottom:Bt,borderBottomColor:Bt,borderColor:Bt,borderInline:Bt,borderInlineEnd:Bt,borderInlineStart:Bt,borderLeft:Bt,borderLeftColor:Bt,borderRight:Bt,borderRightColor:Bt,borderTop:Bt,borderTopColor:Bt,caretColor:Bt,color:Bt,columnRuleColor:Bt,fill:Bt,outline:Bt,outlineColor:Bt,stroke:Bt,textDecorationColor:Bt,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:gi,minBlockSize:gi,maxBlockSize:gi,inlineSize:gi,minInlineSize:gi,maxInlineSize:gi,width:gi,minWidth:gi,maxWidth:gi,height:gi,minHeight:gi,maxHeight:gi,flexBasis:gi,gridTemplateColumns:gi,gridTemplateRows:gi,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},cE=(t,e)=>typeof e=="function"?{"()":Function.prototype.toString.call(e)}:e,rl=()=>{const t=Object.create(null);return(e,n,...r)=>{const o=(c=>JSON.stringify(c,cE))(e);return o in t?t[o]:t[o]=n(e,...r)}},za=Symbol.for("sxs.internal"),ap=(t,e)=>Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)),Fg=t=>{for(const e in t)return!0;return!1},{hasOwnProperty:fE}=Object.prototype,op=t=>t.includes("-")?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),dE=/\s+(?![^()]*\))/,sl=t=>e=>t(...typeof e=="string"?String(e).split(dE):[e]),Bg={appearance:t=>({WebkitAppearance:t,appearance:t}),backfaceVisibility:t=>({WebkitBackfaceVisibility:t,backfaceVisibility:t}),backdropFilter:t=>({WebkitBackdropFilter:t,backdropFilter:t}),backgroundClip:t=>({WebkitBackgroundClip:t,backgroundClip:t}),boxDecorationBreak:t=>({WebkitBoxDecorationBreak:t,boxDecorationBreak:t}),clipPath:t=>({WebkitClipPath:t,clipPath:t}),content:t=>({content:t.includes('"')||t.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(t)?t:`"${t}"`}),hyphens:t=>({WebkitHyphens:t,hyphens:t}),maskImage:t=>({WebkitMaskImage:t,maskImage:t}),maskSize:t=>({WebkitMaskSize:t,maskSize:t}),tabSize:t=>({MozTabSize:t,tabSize:t}),textSizeAdjust:t=>({WebkitTextSizeAdjust:t,textSizeAdjust:t}),userSelect:t=>({WebkitUserSelect:t,userSelect:t}),marginBlock:sl((t,e)=>({marginBlockStart:t,marginBlockEnd:e||t})),marginInline:sl((t,e)=>({marginInlineStart:t,marginInlineEnd:e||t})),maxSize:sl((t,e)=>({maxBlockSize:t,maxInlineSize:e||t})),minSize:sl((t,e)=>({minBlockSize:t,minInlineSize:e||t})),paddingBlock:sl((t,e)=>({paddingBlockStart:t,paddingBlockEnd:e||t})),paddingInline:sl((t,e)=>({paddingInlineStart:t,paddingInlineEnd:e||t}))},lp=/([\d.]+)([^]*)/,hE=(t,e)=>t.length?t.reduce((n,r)=>(n.push(...e.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(o)?`:is(${r})`:r):r+" "+o)),n),[]):e,pE=(t,e)=>t in vE&&typeof e=="string"?e.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,c)=>r+(o==="stretch"?`-moz-available${c};${op(t)}:${r}-webkit-fill-available`:`-moz-fit-content${c};${op(t)}:${r}fit-content`)+c):String(e),vE={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},ms=t=>t?t+"-":"",Hg=(t,e,n)=>t.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,o,c,h,v)=>h=="$"==!!c?r:(o||h=="--"?"calc(":"")+"var(--"+(h==="$"?ms(e)+(v.includes("$")?"":ms(n))+v.replace(/\$/g,"-"):v)+")"+(o||h=="--"?"*"+(o||"")+(c||"1")+")":"")),mE=/\s*,\s*(?![^()]*\))/,gE=Object.prototype.toString,al=(t,e,n,r,o)=>{let c,h,v;const g=(x,m,w)=>{let A,P;const M=_=>{for(A in _){const O=A.charCodeAt(0)===64,I=O&&Array.isArray(_[A])?_[A]:[_[A]];for(P of I){const q=/[A-Z]/.test(k=A)?k:k.replace(/-[^]/g,H=>H[1].toUpperCase()),te=typeof P=="object"&&P&&P.toString===gE&&(!r.utils[q]||!m.length);if(q in r.utils&&!te){const H=r.utils[q];if(H!==h){h=H,M(H(P)),h=null;continue}}else if(q in Bg){const H=Bg[q];if(H!==v){v=H,M(H(P)),v=null;continue}}if(O&&(L=A.slice(1)in r.media?"@media "+r.media[A.slice(1)]:A,A=L.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(H,J,re,$,se,ge)=>{const Ce=lp.test(J),me=.0625*(Ce?-1:1),[Ie,_e]=Ce?[$,J]:[J,$];return"("+(re[0]==="="?"":re[0]===">"===Ce?"max-":"min-")+Ie+":"+(re[0]!=="="&&re.length===1?_e.replace(lp,(Ye,gt,Z)=>Number(gt)+me*(re===">"?1:-1)+Z):_e)+(se?") and ("+(se[0]===">"?"min-":"max-")+Ie+":"+(se.length===1?ge.replace(lp,(Ye,gt,Z)=>Number(gt)+me*(se===">"?-1:1)+Z):ge):"")+")"})),te){const H=O?w.concat(A):[...w],J=O?[...m]:hE(m,A.split(mE));c!==void 0&&o(Vg(...c)),c=void 0,g(P,J,H)}else c===void 0&&(c=[[],m,w]),A=O||A.charCodeAt(0)!==36?A:`--${ms(r.prefix)}${A.slice(1).replace(/\$/g,"-")}`,P=te?P:typeof P=="number"?P&&q in yE?String(P)+"px":String(P):Hg(pE(q,P??""),r.prefix,r.themeMap[q]),c[0].push(`${O?`${A} `:`${op(A)}:`}${P}`)}}var L,k};M(x),c!==void 0&&o(Vg(...c)),c=void 0};g(t,e,n)},Vg=(t,e,n)=>`${n.map(r=>`${r}{`).join("")}${e.length?`${e.join(",")}{`:""}${t.join(";")}${e.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,yE={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},Wg=t=>String.fromCharCode(t+(t>25?39:97)),Na=t=>(e=>{let n,r="";for(n=Math.abs(e);n>52;n=n/52|0)r=Wg(n%52)+r;return Wg(n%52)+r})(((e,n)=>{let r=n.length;for(;r;)e=33*e^n.charCodeAt(--r);return e})(5381,JSON.stringify(t))>>>0),Mu=["themed","global","styled","onevar","resonevar","allvar","inline"],SE=t=>{if(t.href&&!t.href.startsWith(location.origin))return!1;try{return!!t.cssRules}catch{return!1}},bE=t=>{let e;const n=()=>{const{cssRules:o}=e.sheet;return[].map.call(o,(c,h)=>{const{cssText:v}=c;let g="";if(v.startsWith("--sxs"))return"";if(o[h-1]&&(g=o[h-1].cssText).startsWith("--sxs")){if(!c.cssRules.length)return"";for(const x in e.rules)if(e.rules[x].group===c)return`--sxs{--sxs:${[...e.rules[x].cache].join(" ")}}${v}`;return c.cssRules.length?`${g}${v}`:""}return v}).join("")},r=()=>{if(e){const{rules:v,sheet:g}=e;if(!g.deleteRule){for(;Object(Object(g.cssRules)[0]).type===3;)g.cssRules.splice(0,1);g.cssRules=[]}for(const x in v)delete v[x]}const o=Object(t).styleSheets||[];for(const v of o)if(SE(v)){for(let g=0,x=v.cssRules;x[g];++g){const m=Object(x[g]);if(m.type!==1)continue;const w=Object(x[g+1]);if(w.type!==4)continue;++g;const{cssText:A}=m;if(!A.startsWith("--sxs"))continue;const P=A.slice(14,-3).trim().split(/\s+/),M=Mu[P[0]];M&&(e||(e={sheet:v,reset:r,rules:{},toString:n}),e.rules[M]={group:w,index:g,cache:new Set(P)})}if(e)break}if(!e){const v=(g,x)=>({type:x,cssRules:[],insertRule(m,w){this.cssRules.splice(w,0,v(m,{import:3,undefined:1}[(m.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return g==="@media{}"?`@media{${[].map.call(this.cssRules,m=>m.cssText).join("")}}`:g}});e={sheet:t?(t.head||t).appendChild(document.createElement("style")).sheet:v("","text/css"),rules:{},reset:r,toString:n}}const{sheet:c,rules:h}=e;for(let v=Mu.length-1;v>=0;--v){const g=Mu[v];if(!h[g]){const x=Mu[v+1],m=h[x]?h[x].index:c.cssRules.length;c.insertRule("@media{}",m),c.insertRule(`--sxs{--sxs:${v}}`,m),h[g]={group:c.cssRules[m+1],index:m,cache:new Set([v])}}xE(h[g])}};return r(),e},xE=t=>{const e=t.group;let n=e.cssRules.length;t.apply=r=>{try{e.insertRule(r,n),++n}catch{}}},Ou=Symbol(),EE=rl(),$g=(t,e)=>EE(t,()=>(...n)=>{let r={type:null,composers:new Set};for(const o of n)if(o!=null)if(o[za]){r.type==null&&(r.type=o[za].type);for(const c of o[za].composers)r.composers.add(c)}else o.constructor!==Object||o.$$typeof?r.type==null&&(r.type=o):r.composers.add(wE(o,t));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),TE(t,r,e)}),wE=({variants:t,compoundVariants:e,defaultVariants:n,...r},o)=>{const c=`${ms(o.prefix)}c-${Na(r)}`,h=[],v=[],g=Object.create(null),x=[];for(const A in n)g[A]=String(n[A]);if(typeof t=="object"&&t)for(const A in t){m=g,w=A,fE.call(m,w)||(g[A]="undefined");const P=t[A];for(const M in P){const _={[A]:String(M)};String(M)==="undefined"&&x.push(A);const L=P[M],k=[_,L,!Fg(L)];h.push(k)}}var m,w;if(typeof e=="object"&&e)for(const A of e){let{css:P,...M}=A;P=typeof P=="object"&&P||{};for(const L in M)M[L]=String(M[L]);const _=[M,P,!Fg(P)];v.push(_)}return[c,r,h,v,g,x]},TE=(t,e,n)=>{const[r,o,c,h]=CE(e.composers),v=typeof e.type=="function"||e.type.$$typeof?(w=>{function A(){for(let P=0;P<A[Ou].length;P++){const[M,_]=A[Ou][P];w.rules[M].apply(_)}return A[Ou]=[],null}return A[Ou]=[],A.rules={},Mu.forEach(P=>A.rules[P]={apply:M=>A[Ou].push([P,M])}),A})(n):null,g=(v||n).rules,x=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,m=w=>{w=typeof w=="object"&&w||RE;const{css:A,...P}=w,M={};for(const k in c)if(delete P[k],k in w){let O=w[k];typeof O=="object"&&O?M[k]={"@initial":c[k],...O}:(O=String(O),M[k]=O!=="undefined"||h.has(k)?O:c[k])}else M[k]=c[k];const _=new Set([...o]);for(const[k,O,I,q]of e.composers){n.rules.styled.cache.has(k)||(n.rules.styled.cache.add(k),al(O,[`.${k}`],[],t,J=>{g.styled.apply(J)}));const te=qg(I,M,t.media),H=qg(q,M,t.media,!0);for(const J of te)if(J!==void 0)for(const[re,$,se]of J){const ge=`${k}-${Na($)}-${re}`;_.add(ge);const Ce=(se?n.rules.resonevar:n.rules.onevar).cache,me=se?g.resonevar:g.onevar;Ce.has(ge)||(Ce.add(ge),al($,[`.${ge}`],[],t,Ie=>{me.apply(Ie)}))}for(const J of H)if(J!==void 0)for(const[re,$]of J){const se=`${k}-${Na($)}-${re}`;_.add(se),n.rules.allvar.cache.has(se)||(n.rules.allvar.cache.add(se),al($,[`.${se}`],[],t,ge=>{g.allvar.apply(ge)}))}}if(typeof A=="object"&&A){const k=`${r}-i${Na(A)}-css`;_.add(k),n.rules.inline.cache.has(k)||(n.rules.inline.cache.add(k),al(A,[`.${k}`],[],t,O=>{g.inline.apply(O)}))}for(const k of String(w.className||"").trim().split(/\s+/))k&&_.add(k);const L=P.className=[..._].join(" ");return{type:e.type,className:L,selector:x,props:P,toString:()=>L,deferredInjector:v}};return ap(m,{className:r,selector:x,[za]:e,toString:()=>(n.rules.styled.cache.has(r)||m(),r)})},CE=t=>{let e="";const n=[],r={},o=[];for(const[c,,,,h,v]of t){e===""&&(e=c),n.push(c),o.push(...v);for(const g in h){const x=h[g];(r[g]===void 0||x!=="undefined"||v.includes(x))&&(r[g]=x)}}return[e,n,r,new Set(o)]},qg=(t,e,n,r)=>{const o=[];e:for(let[c,h,v]of t){if(v)continue;let g,x=0,m=!1;for(g in c){const w=c[g];let A=e[g];if(A!==w){if(typeof A!="object"||!A)continue e;{let P,M,_=0;for(const L in A){if(w===String(A[L])){if(L!=="@initial"){const k=L.slice(1);(M=M||[]).push(k in n?n[k]:L.replace(/^@media ?/,"")),m=!0}x+=_,P=!0}++_}if(M&&M.length&&(h={["@media "+M.join(", ")]:h}),!P)continue e}}}(o[x]=o[x]||[]).push([r?"cv":`${g}-${c[g]}`,h,m])}return o},RE={},AE=rl(),ME=(t,e)=>AE(t,()=>(...n)=>{const r=()=>{for(let o of n){o=typeof o=="object"&&o||{};let c=Na(o);if(!e.rules.global.cache.has(c)){if(e.rules.global.cache.add(c),"@import"in o){let h=[].indexOf.call(e.sheet.cssRules,e.rules.themed.group)-1;for(let v of[].concat(o["@import"]))v=v.includes('"')||v.includes("'")?v:`"${v}"`,e.sheet.insertRule(`@import ${v};`,h++);delete o["@import"]}al(o,[],[],t,h=>{e.rules.global.apply(h)})}}return""};return ap(r,{toString:r})}),OE=rl(),DE=(t,e)=>OE(t,()=>n=>{const r=`${ms(t.prefix)}k-${Na(n)}`,o=()=>{if(!e.rules.global.cache.has(r)){e.rules.global.cache.add(r);const c=[];al(n,[],[],t,v=>c.push(v));const h=`@keyframes ${r}{${c.join("")}}`;e.rules.global.apply(h)}return r};return ap(o,{get name(){return o()},toString:o})}),LE=class{constructor(t,e,n,r){this.token=t==null?"":String(t),this.value=e==null?"":String(e),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+ms(this.prefix)+ms(this.scale)+this.token}toString(){return this.computedValue}},PE=rl(),kE=(t,e)=>PE(t,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const o=`.${n=(n=typeof n=="string"?n:"")||`${ms(t.prefix)}t-${Na(r)}`}`,c={},h=[];for(const g in r){c[g]={};for(const x in r[g]){const m=`--${ms(t.prefix)}${g}-${x}`,w=Hg(String(r[g][x]),t.prefix,g);c[g][x]=new LE(x,w,g,t.prefix),h.push(`${m}:${w}`)}}const v=()=>{if(h.length&&!e.rules.themed.cache.has(n)){e.rules.themed.cache.add(n);const g=`${r===t.theme?":root,":""}.${n}{${h.join(";")}}`;e.rules.themed.apply(g)}return n};return{...c,get className(){return v()},selector:o,toString:v}}),zE=rl(),NE=rl(),_E=t=>{const e=(n=>{let r=!1;const o=zE(n,c=>{r=!0;const h="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",v=typeof c.media=="object"&&c.media||{},g=typeof c.root=="object"?c.root||null:globalThis.document||null,x=typeof c.theme=="object"&&c.theme||{},m={prefix:h,media:v,theme:x,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...uE},utils:typeof c.utils=="object"&&c.utils||{}},w=bE(g),A={css:$g(m,w),globalCss:ME(m,w),keyframes:DE(m,w),createTheme:kE(m,w),reset(){w.reset(),A.theme.toString()},theme:{},sheet:w,config:m,prefix:h,getCssText:w.toString,toString:w.toString};return String(A.theme=A.createTheme(x)),A});return r||o.reset(),o})(t);return e.styled=(({config:n,sheet:r})=>NE(n,()=>{const o=$g(n,r);return(...c)=>{const h=o(...c),v=h[za].type,g=C.forwardRef((x,m)=>{const w=x&&x.as||v,{props:A,deferredInjector:P}=h(x);return delete A.as,A.ref=m,P?C.createElement(C.Fragment,null,C.createElement(w,A),C.createElement(P,null)):C.createElement(w,A)});return g.className=h.className,g.displayName=`Styled.${v.displayName||v.name||v}`,g.selector=h.selector,g.toString=()=>h.selector,g[za]=h[za],g}}))(e),e};function UE(t,e,n){return Math.max(e,Math.min(t,n))}const li={toVector(t,e){return t===void 0&&(t=e),Array.isArray(t)?t:[t,t]},add(t,e){return[t[0]+e[0],t[1]+e[1]]},sub(t,e){return[t[0]-e[0],t[1]-e[1]]},addTo(t,e){t[0]+=e[0],t[1]+=e[1]},subTo(t,e){t[0]-=e[0],t[1]-=e[1]}};function Yg(t,e,n){return e===0||Math.abs(e)===1/0?Math.pow(t,n*5):t*e*n/(e+n*t)}function Qg(t,e,n,r=.15){return r===0?UE(t,e,n):t<e?-Yg(e-t,n-e,r)+e:t>n?+Yg(t-n,n-e,r)+n:t}function jE(t,[e,n],[r,o]){const[[c,h],[v,g]]=t;return[Qg(e,c,h,r),Qg(n,v,g,o)]}function IE(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function FE(t){var e=IE(t,"string");return typeof e=="symbol"?e:String(e)}function Li(t,e,n){return e=FE(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function hn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gg(Object(n),!0).forEach(function(r){Li(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const Xg={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Kg(t){return t?t[0].toUpperCase()+t.slice(1):""}const BE=["enter","leave"];function HE(t=!1,e){return t&&!BE.includes(e)}function VE(t,e="",n=!1){const r=Xg[t],o=r&&r[e]||e;return"on"+Kg(t)+Kg(o)+(HE(n,o)?"Capture":"")}const WE=["gotpointercapture","lostpointercapture"];function $E(t){let e=t.substring(2).toLowerCase();const n=!!~e.indexOf("passive");n&&(e=e.replace("passive",""));const r=WE.includes(e)?"capturecapture":"capture",o=!!~e.indexOf(r);return o&&(e=e.replace("capture","")),{device:e,capture:o,passive:n}}function qE(t,e=""){const n=Xg[t],r=n&&n[e]||e;return t+r}function wf(t){return"touches"in t}function Zg(t){return wf(t)?"touch":"pointerType"in t?t.pointerType:"mouse"}function YE(t){return Array.from(t.touches).filter(e=>{var n,r;return e.target===t.currentTarget||((n=t.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,e.target))})}function QE(t){return t.type==="touchend"||t.type==="touchcancel"?t.changedTouches:t.targetTouches}function Jg(t){return wf(t)?QE(t)[0]:t}function GE(t){return YE(t).map(e=>e.identifier)}function up(t){const e=Jg(t);return wf(t)?e.identifier:e.pointerId}function ey(t){const e=Jg(t);return[e.clientX,e.clientY]}function XE(t){const e={};if("buttons"in t&&(e.buttons=t.buttons),"shiftKey"in t){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:c}=t;Object.assign(e,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:c})}return e}function Tf(t,...e){return typeof t=="function"?t(...e):t}function KE(){}function ZE(...t){return t.length===0?KE:t.length===1?t[0]:function(){let e;for(const n of t)e=n.apply(this,arguments)||e;return e}}function ty(t,e){return Object.assign({},e,t||{})}const JE=32;class ew{constructor(e,n,r){this.ctrl=e,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:n,ingKey:r,args:o}=this;n[r]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=o,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=e.target,n.currentTarget=e.currentTarget,n.lastOffset=r.from?Tf(r.from,n):n.offset,n.offset=n.lastOffset),n.startTime=n.timeStamp=e.timeStamp}computeValues(e){const n=this.state;n._values=e,n.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:n,config:r,shared:o}=this;n.args=this.args;let c=0;if(e&&(n.event=e,r.preventDefault&&e.cancelable&&n.event.preventDefault(),n.type=e.type,o.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,o.locked=!!document.pointerLockElement,Object.assign(o,XE(e)),o.down=o.pressed=o.buttons%2===1||o.touches>0,c=e.timeStamp-n.timeStamp,n.timeStamp=e.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const H=n._delta.map(Math.abs);li.addTo(n._distance,H)}this.axisIntent&&this.axisIntent(e);const[h,v]=n._movement,[g,x]=r.threshold,{_step:m,values:w}=n;if(r.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(h)>=g&&w[0]),m[1]===!1&&(m[1]=Math.abs(v)>=x&&w[1])):(m[0]===!1&&(m[0]=Math.abs(h)>=g&&Math.sign(h)*g),m[1]===!1&&(m[1]=Math.abs(v)>=x&&Math.sign(v)*x)),n.intentional=m[0]!==!1||m[1]!==!1,!n.intentional)return;const A=[0,0];if(r.hasCustomTransform){const[H,J]=w;A[0]=m[0]!==!1?H-m[0]:0,A[1]=m[1]!==!1?J-m[1]:0}else A[0]=m[0]!==!1?h-m[0]:0,A[1]=m[1]!==!1?v-m[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(A);const P=n.offset,M=n._active&&!n._blocked||n.active;M&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=o[this.ingKey]=n._active,e&&(n.first&&("bounds"in r&&(n._bounds=Tf(r.bounds,n)),this.setup&&this.setup()),n.movement=A,this.computeOffset()));const[_,L]=n.offset,[[k,O],[I,q]]=n._bounds;n.overflow=[_<k?-1:_>O?1:0,L<I?-1:L>q?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const te=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=jE(n._bounds,n.offset,te),n.delta=li.sub(n.offset,P),this.computeMovement(),M&&(!n.last||c>JE)){n.delta=li.sub(n.offset,P);const H=n.delta.map(Math.abs);li.addTo(n.distance,H),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&c>0&&(n.velocity=[H[0]/c,H[1]/c])}}emit(){const e=this.state,n=this.shared,r=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!r.triggerAllEvents)return;const o=this.handler(hn(hn(hn({},n),e),{},{[this.aliasKey]:e.values}));o!==void 0&&(e.memo=o)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function tw([t,e],n){const r=Math.abs(t),o=Math.abs(e);if(r>o&&r>n)return"x";if(o>r&&o>n)return"y"}class nw extends ew{constructor(...e){super(...e),Li(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=li.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=li.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const n=this.state,r=this.config;if(!n.axis&&e){const o=typeof r.axisThreshold=="object"?r.axisThreshold[Zg(e)]:r.axisThreshold;n.axis=tw(n._movement,o)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0;break}}}const iw=t=>t,ny=.15,iy={enabled(t=!0){return t},eventOptions(t,e,n){return hn(hn({},n.shared.eventOptions),t)},preventDefault(t=!1){return t},triggerAllEvents(t=!1){return t},rubberband(t=0){switch(t){case!0:return[ny,ny];case!1:return[0,0];default:return li.toVector(t)}},from(t){if(typeof t=="function")return t;if(t!=null)return li.toVector(t)},transform(t,e,n){const r=t||n.shared.transform;return this.hasCustomTransform=!!r,r||iw},threshold(t){return li.toVector(t,0)}},rw=0,Du=hn(hn({},iy),{},{axis(t,e,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(t=rw){return t},bounds(t={}){if(typeof t=="function")return c=>Du.bounds(t(c));if("current"in t)return()=>t.current;if(typeof HTMLElement=="function"&&t instanceof HTMLElement)return t;const{left:e=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=t;return[[e,n],[r,o]]}}),ry={ArrowRight:(t,e=1)=>[t*e,0],ArrowLeft:(t,e=1)=>[-1*t*e,0],ArrowUp:(t,e=1)=>[0,-1*t*e],ArrowDown:(t,e=1)=>[0,t*e]};class sw extends nw{constructor(...e){super(...e),Li(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const n=e._bounds.getBoundingClientRect(),r=e.currentTarget.getBoundingClientRect(),o={left:n.left-r.left+e.offset[0],right:n.right-r.right+e.offset[0],top:n.top-r.top+e.offset[1],bottom:n.bottom-r.bottom+e.offset[1]};e._bounds=Du.bounds(o)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const n=this.config,r=this.state;if(e.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(e.buttons):n.pointerButtons!==-1&&n.pointerButtons!==e.buttons))return;const o=this.ctrl.setEventIds(e);n.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(o&&o.size>1&&r._pointerActive)&&(this.start(e),this.setupPointer(e),r._pointerId=up(e),r._pointerActive=!0,this.computeValues(ey(e)),this.computeInitial(),n.preventScrollAxis&&Zg(e)!=="mouse"?(r._active=!1,this.setupScrollPrevention(e)):n.delay>0?(this.setupDelayTrigger(e),n.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const n=this.state,r=this.config;if(!n._pointerActive||n.type===e.type&&e.timeStamp===n.timeStamp)return;const o=up(e);if(n._pointerId!==void 0&&o!==n._pointerId)return;const c=ey(e);if(document.pointerLockElement===e.target?n._delta=[e.movementX,e.movementY]:(n._delta=li.sub(c,n._values),this.computeValues(c)),li.addTo(n._movement,n._delta),this.compute(e),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(e);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(e);return}else return;this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const o=up(e);if(n._pointerId!==void 0&&o!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[c,h]=n._distance;if(n.tap=c<=r.tapsThreshold&&h<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[v,g]=n.direction,[x,m]=n.velocity,[w,A]=n.movement,[P,M]=r.swipe.velocity,[_,L]=r.swipe.distance,k=r.swipe.duration;n.elapsedTime<k&&(Math.abs(x)>P&&Math.abs(w)>_&&(n.swipe[0]=v),Math.abs(m)>M&&Math.abs(A)>L&&(n.swipe[1]=g))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const n=this.config,r=n.device;n.pointerLock&&e.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,aw(e);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){const n=ry[e.key];if(n){const r=this.state,o=e.shiftKey?10:e.altKey?.1:1;this.start(e),r._delta=n(this.config.keyboardDisplacement,o),r._keyboardActive=!0,li.addTo(r._movement,r._delta),this.compute(e),this.emit()}}keyUp(e){e.key in ry&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const n=this.config.device;e(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(n,"change",this.pointerMove.bind(this)),e(n,"end",this.pointerUp.bind(this)),e(n,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function aw(t){"persist"in t&&typeof t.persist=="function"&&t.persist()}const Lu=typeof window<"u"&&window.document&&window.document.createElement;function ow(){return Lu&&"ontouchstart"in window}function sy(){return ow()||Lu&&window.navigator.maxTouchPoints>1}function lw(){return Lu&&"onpointerdown"in window}function uw(){return Lu&&"exitPointerLock"in window.document}function cw(){try{return"constructor"in GestureEvent}catch{return!1}}const lr={isBrowser:Lu,gesture:cw(),touch:sy(),touchscreen:sy(),pointer:lw(),pointerLock:uw()},fw=250,dw=180,hw=.5,pw=50,vw=250,mw=10,ay={mouse:0,touch:0,pen:8},gw=hn(hn({},Du),{},{device(t,e,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&lr.pointerLock,lr.touch&&n?"touch":this.pointerLock?"mouse":lr.pointer&&!o?"pointer":lr.touch?"touch":"mouse"},preventScrollAxis(t,e,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&t?fw:void 0,!(!lr.touchscreen||n===!1))return t||(n!==void 0?"y":void 0)},pointerCapture(t,e,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&this.device==="pointer"&&n},threshold(t,e,{filterTaps:n=!1,tapsThreshold:r=3,axis:o=void 0}){const c=li.toVector(t,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,c},swipe({velocity:t=hw,distance:e=pw,duration:n=vw}={}){return{velocity:this.transform(li.toVector(t)),distance:this.transform(li.toVector(e)),duration:n}},delay(t=0){switch(t){case!0:return dw;case!1:return 0;default:return t}},axisThreshold(t){return t?hn(hn({},ay),t):ay},keyboardDisplacement(t=mw){return t}});hn(hn({},iy),{},{device(t,e,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!lr.touch&&lr.gesture)return"gesture";if(lr.touch&&r)return"touch";if(lr.touchscreen){if(lr.pointer)return"pointer";if(lr.touch)return"touch"}},bounds(t,e,{scaleBounds:n={},angleBounds:r={}}){const o=h=>{const v=ty(Tf(n,h),{min:-1/0,max:1/0});return[v.min,v.max]},c=h=>{const v=ty(Tf(r,h),{min:-1/0,max:1/0});return[v.min,v.max]};return typeof n!="function"&&typeof r!="function"?[o(),c()]:h=>[o(h),c(h)]},threshold(t,e,n){return this.lockDirection=n.axis==="lock",li.toVector(t,this.lockDirection?[.1,3]:0)},modifierKey(t){return t===void 0?"ctrlKey":t},pinchOnWheel(t=!0){return t}}),hn(hn({},Du),{},{mouseOnly:(t=!0)=>t}),hn(hn({},Du),{},{mouseOnly:(t=!0)=>t});const oy=new Map,cp=new Map;function yw(t){oy.set(t.key,t.engine),cp.set(t.key,t.resolver)}const Sw={key:"drag",engine:sw,resolver:gw};function bw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,c;for(c=0;c<r.length;c++)o=r[c],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function xw(t,e){if(t==null)return{};var n=bw(t,e),r,o;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(o=0;o<c.length;o++)r=c[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}const Ew={target(t){if(t)return()=>"current"in t?t.current:t},enabled(t=!0){return t},window(t=lr.isBrowser?window:void 0){return t},eventOptions({passive:t=!0,capture:e=!1}={}){return{passive:t,capture:e}},transform(t){return t}},ww=["target","eventOptions","window","enabled","transform"];function Cf(t={},e){const n={};for(const[r,o]of Object.entries(e))switch(typeof o){case"function":n[r]=o.call(n,t[r],r,t);break;case"object":n[r]=Cf(t[r],o);break;case"boolean":o&&(n[r]=t[r]);break}return n}function Tw(t,e,n={}){const r=t,{target:o,eventOptions:c,window:h,enabled:v,transform:g}=r,x=xw(r,ww);if(n.shared=Cf({target:o,eventOptions:c,window:h,enabled:v,transform:g},Ew),e){const m=cp.get(e);n[e]=Cf(hn({shared:n.shared},x),m)}else for(const m in x){const w=cp.get(m);w&&(n[m]=Cf(hn({shared:n.shared},x[m]),w))}return n}class ly{constructor(e,n){Li(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=n}add(e,n,r,o,c){const h=this._listeners,v=qE(n,r),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},x=hn(hn({},g),c);e.addEventListener(v,o,x);const m=()=>{e.removeEventListener(v,o,x),h.delete(m)};return h.add(m),m}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class Cw{constructor(){Li(this,"_timeouts",new Map)}add(e,n,r=140,...o){this.remove(e),this._timeouts.set(e,window.setTimeout(n,r,...o))}remove(e){const n=this._timeouts.get(e);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}}class Rw{constructor(e){Li(this,"gestures",new Set),Li(this,"_targetEventStore",new ly(this)),Li(this,"gestureEventStores",{}),Li(this,"gestureTimeoutStores",{}),Li(this,"handlers",{}),Li(this,"config",{}),Li(this,"pointerIds",new Set),Li(this,"touchIds",new Set),Li(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Aw(this,e)}setEventIds(e){if(wf(e))return this.touchIds=new Set(GE(e)),this.touchIds;if("pointerId"in e)return e.type==="pointerup"||e.type==="pointercancel"?this.pointerIds.delete(e.pointerId):e.type==="pointerdown"&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,n){this.handlers=e,this.nativeHandlers=n}applyConfig(e,n){this.config=Tw(e,n,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const n=this.config.shared,r={};let o;if(!(n.target&&(o=n.target(),!o))){if(n.enabled){for(const h of this.gestures){const v=this.config[h],g=uy(r,v.eventOptions,!!o);if(v.enabled){const x=oy.get(h);new x(this,e,h).bind(g)}}const c=uy(r,n.eventOptions,!!o);for(const h in this.nativeHandlers)c(h,"",v=>this.nativeHandlers[h](hn(hn({},this.state.shared),{},{event:v,args:e})),void 0,!0)}for(const c in r)r[c]=ZE(...r[c]);if(!o)return r;for(const c in r){const{device:h,capture:v,passive:g}=$E(c);this._targetEventStore.add(o,h,"",r[c],{capture:v,passive:g})}}}}function ol(t,e){t.gestures.add(e),t.gestureEventStores[e]=new ly(t,e),t.gestureTimeoutStores[e]=new Cw}function Aw(t,e){e.drag&&ol(t,"drag"),e.wheel&&ol(t,"wheel"),e.scroll&&ol(t,"scroll"),e.move&&ol(t,"move"),e.pinch&&ol(t,"pinch"),e.hover&&ol(t,"hover")}const uy=(t,e,n)=>(r,o,c,h={},v=!1)=>{var g,x;const m=(g=h.capture)!==null&&g!==void 0?g:e.capture,w=(x=h.passive)!==null&&x!==void 0?x:e.passive;let A=v?r:VE(r,o,m);n&&w&&(A+="Passive"),t[A]=t[A]||[],t[A].push(c)};function Mw(t,e={},n,r){const o=C.useMemo(()=>new Rw(t),[]);if(o.applyHandlers(t,r),o.applyConfig(e,n),C.useEffect(o.effect.bind(o)),C.useEffect(()=>o.clean.bind(o),[]),e.target===void 0)return o.bind.bind(o)}function Ow(t,e){return yw(Sw),Mw({drag:t},e||{},"drag")}const Dw=ae.useId||(()=>{});let Lw=0;function Pw(t){const[e,n]=ae.useState(Dw());return Sf(()=>{t||n(r=>r??String(Lw++))},[t]),t||(e?`radix-${e}`:"")}const ll=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce((t,e)=>({...t,[e]:ae.forwardRef((n,r)=>{const{asChild:o,...c}=n,h=o?Lg:e;return ae.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),n.as&&console.error(kw),ae.createElement(h,oi({},c,{ref:r}))})}),{}),kw="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",zw=ae.forwardRef((t,e)=>ae.createElement(ll.span,oi({},t,{ref:e,style:{...t.style,position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}}))),Nw=ae.forwardRef((t,e)=>{var n,r;const{containerRef:o,style:c,...h}=t,v=(n=o==null?void 0:o.current)!==null&&n!==void 0?n:globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,[,g]=ae.useState({});return Sf(()=>{g({})},[]),v?vg.createPortal(ae.createElement(ll.div,oi({"data-radix-portal":""},h,{ref:e,style:v===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...c}:void 0})),v):null}),_w=ae.forwardRef((t,e)=>{const{children:n,width:r=10,height:o=5,...c}=t;return ae.createElement(ll.svg,oi({},c,{ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?n:ae.createElement("polygon",{points:"0,0 30,0 15,10"}))});function cy(t){const[e,n]=ae.useState(void 0);return ae.useEffect(()=>{if(t){const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let h,v;if("borderBoxSize"in c){const g=c.borderBoxSize,x=Array.isArray(g)?g[0]:g;h=x.inlineSize,v=x.blockSize}else{const g=t.getBoundingClientRect();h=g.width,v=g.height}n({width:h,height:v})});return r.observe(t,{box:"border-box"}),()=>{n(void 0),r.unobserve(t)}}},[t]),e}function Uw(t,e){const n=_a.get(t);return n===void 0?(_a.set(t,{rect:{},callbacks:[e]}),_a.size===1&&(fp=requestAnimationFrame(fy))):(n.callbacks.push(e),e(t.getBoundingClientRect())),()=>{const r=_a.get(t);if(r===void 0)return;const o=r.callbacks.indexOf(e);o>-1&&r.callbacks.splice(o,1),r.callbacks.length===0&&(_a.delete(t),_a.size===0&&cancelAnimationFrame(fp))}}let fp;const _a=new Map;function fy(){const t=[];_a.forEach((e,n)=>{const r=n.getBoundingClientRect();var o,c;o=e.rect,c=r,(o.width!==c.width||o.height!==c.height||o.top!==c.top||o.right!==c.right||o.bottom!==c.bottom||o.left!==c.left)&&(e.rect=r,t.push(e))}),t.forEach(e=>{e.callbacks.forEach(n=>n(e.rect))}),fp=requestAnimationFrame(fy)}function dy(t){const[e,n]=ae.useState();return ae.useEffect(()=>{if(t){const r=Uw(t,n);return()=>{n(void 0),r()}}},[t]),e}function hy(t,e=[]){let n=[];const r=()=>{const o=n.map(c=>ae.createContext(c));return function(c){const h=(c==null?void 0:c[t])||o;return ae.useMemo(()=>({[`__scope${t}`]:{...c,[t]:h}}),[c,h])}};return r.scopeName=t,[function(o,c){const h=ae.createContext(c),v=n.length;function g(x){const{scope:m,children:w,...A}=x,P=(m==null?void 0:m[t][v])||h,M=ae.useMemo(()=>A,Object.values(A));return ae.createElement(P.Provider,{value:M},w)}return n=[...n,c],g.displayName=o+"Provider",[g,function(x,m){const w=(m==null?void 0:m[t][v])||h,A=ae.useContext(w);if(A)return A;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${o}\``)}]},jw(r,...e)]}function jw(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const c=r.reduce((h,{useScope:v,scopeName:g})=>({...h,...v(o)[`__scope${g}`]}),{});return ae.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return n.scopeName=e.scopeName,n}function Iw({anchorRect:t,popperSize:e,arrowSize:n,arrowOffset:r=0,side:o,sideOffset:c=0,align:h,alignOffset:v=0,shouldAvoidCollisions:g=!0,collisionBoundariesRect:x,collisionTolerance:m=0}){if(!t||!e||!x)return{popperStyles:Fw,arrowStyles:dp};const w=function(J,re,$=0,se=0,ge){const Ce=ge?ge.height:0,me=py(re,J,"x"),Ie=py(re,J,"y"),_e=Ie.before-$-Ce,Ye=Ie.after+$+Ce,gt=me.before-$-Ce,Z=me.after+$+Ce;return{top:{start:{x:me.start+se,y:_e},center:{x:me.center,y:_e},end:{x:me.end-se,y:_e}},right:{start:{x:Z,y:Ie.start+se},center:{x:Z,y:Ie.center},end:{x:Z,y:Ie.end-se}},bottom:{start:{x:me.start+se,y:Ye},center:{x:me.center,y:Ye},end:{x:me.end-se,y:Ye}},left:{start:{x:gt,y:Ie.start+se},center:{x:gt,y:Ie.center},end:{x:gt,y:Ie.end-se}}}}(e,t,c,v,n),A=w[o][h];if(g===!1){const J=vy(A);let re=dp;return n&&(re=gy({popperSize:e,arrowSize:n,arrowOffset:r,side:o,align:h})),{popperStyles:{...J,"--radix-popper-transform-origin":my(e,o,h,r,n)},arrowStyles:re,placedSide:o,placedAlign:h}}const P=DOMRect.fromRect({...e,...A}),M=(_=x,L=m,DOMRect.fromRect({width:_.width-2*L,height:_.height-2*L,x:_.left+L,y:_.top+L}));var _,L;const k=Sy(P,M),O=w[yy(o)][h],I=function(J,re,$){const se=yy(J);return re[J]&&!$[se]?se:J}(o,k,Sy(DOMRect.fromRect({...e,...O}),M)),q=function(J,re,$,se,ge){const Ce=$==="top"||$==="bottom",me=Ce?"left":"top",Ie=Ce?"right":"bottom",_e=Ce?"width":"height",Ye=re[_e]>J[_e];return(se==="start"||se==="center")&&(ge[me]&&Ye||ge[Ie]&&!Ye)?"end":(se==="end"||se==="center")&&(ge[Ie]&&Ye||ge[me]&&!Ye)?"start":se}(e,t,o,h,k),te=vy(w[I][q]);let H=dp;return n&&(H=gy({popperSize:e,arrowSize:n,arrowOffset:r,side:I,align:q})),{popperStyles:{...te,"--radix-popper-transform-origin":my(e,I,q,r,n)},arrowStyles:H,placedSide:I,placedAlign:q}}function py(t,e,n){const r=t[n==="x"?"left":"top"],o=n==="x"?"width":"height",c=t[o],h=e[o];return{before:r-h,start:r,center:r+(c-h)/2,end:r+c-h,after:r+c}}function vy(t){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(t.x+window.scrollX)}px, ${Math.round(t.y+window.scrollY)}px, 0)`}}function my(t,e,n,r,o){const c=e==="top"||e==="bottom",h=o?o.width:0,v=o?o.height:0,g=h/2+r;let x="",m="";return c?(x={start:`${g}px`,center:"center",end:t.width-g+"px"}[n],m=e==="top"?`${t.height+v}px`:-v+"px"):(x=e==="left"?`${t.width+v}px`:-v+"px",m={start:`${g}px`,center:"center",end:t.height-g+"px"}[n]),`${x} ${m}`}const Fw={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},dp={position:"absolute",opacity:0};function gy({popperSize:t,arrowSize:e,arrowOffset:n,side:r,align:o}){const c=(t.width-e.width)/2,h=(t.height-e.width)/2,v={top:0,right:90,bottom:180,left:-90}[r],g=Math.max(e.width,e.height),x={width:`${g}px`,height:`${g}px`,transform:`rotate(${v}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:Bw(r,o)};return r!=="top"&&r!=="bottom"||(o==="start"&&(x.left=`${n}px`),o==="center"&&(x.left=`${c}px`),o==="end"&&(x.right=`${n}px`)),r!=="left"&&r!=="right"||(o==="start"&&(x.top=`${n}px`),o==="center"&&(x.top=`${h}px`),o==="end"&&(x.bottom=`${n}px`)),x}function Bw(t,e){return(t!=="top"&&t!=="right"||e!=="end")&&(t!=="bottom"&&t!=="left"||e==="end")?"ltr":"rtl"}function yy(t){return{top:"bottom",right:"left",bottom:"top",left:"right"}[t]}function Sy(t,e){return{top:t.top<e.top,right:t.right>e.right,bottom:t.bottom>e.bottom,left:t.left<e.left}}const[by,xy]=hy("Popper"),[Hw,Ey]=by("Popper"),Vw=t=>{const{__scopePopper:e,children:n}=t,[r,o]=ae.useState(null);return ae.createElement(Hw,{scope:e,anchor:r,onAnchorChange:o},n)},Ww=ae.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...o}=t,c=Ey("PopperAnchor",n),h=ae.useRef(null),v=yf(e,h);return ae.useEffect(()=>{c.onAnchorChange((r==null?void 0:r.current)||h.current)}),r?null:ae.createElement(ll.div,oi({},o,{ref:v}))}),[$w,qw]=by("PopperContent"),Yw=ae.forwardRef((t,e)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:c="center",alignOffset:h,collisionTolerance:v,avoidCollisions:g=!0,...x}=t,m=Ey("PopperContent",n),[w,A]=ae.useState(),P=dy(m.anchor),[M,_]=ae.useState(null),L=cy(M),[k,O]=ae.useState(null),I=cy(k),q=yf(e,Ce=>_(Ce)),te=function(){const[Ce,me]=ae.useState(void 0);return ae.useEffect(()=>{let Ie;function _e(){me({width:window.innerWidth,height:window.innerHeight})}function Ye(){window.clearTimeout(Ie),Ie=window.setTimeout(_e,100)}return _e(),window.addEventListener("resize",Ye),()=>window.removeEventListener("resize",Ye)},[]),Ce}(),H=te?DOMRect.fromRect({...te,x:0,y:0}):void 0,{popperStyles:J,arrowStyles:re,placedSide:$,placedAlign:se}=Iw({anchorRect:P,popperSize:L,arrowSize:I,arrowOffset:w,side:r,sideOffset:o,align:c,alignOffset:h,shouldAvoidCollisions:g,collisionBoundariesRect:H,collisionTolerance:v}),ge=$!==void 0;return ae.createElement("div",{style:J,"data-radix-popper-content-wrapper":""},ae.createElement($w,{scope:n,arrowStyles:re,onArrowChange:O,onArrowOffsetChange:A},ae.createElement(ll.div,oi({"data-side":$,"data-align":se},x,{style:{...x.style,animation:ge?void 0:"none"},ref:q}))))}),Qw=ae.forwardRef(function(t,e){const{__scopePopper:n,offset:r,...o}=t,c=qw("PopperArrow",n),{onArrowOffsetChange:h}=c;return ae.useEffect(()=>h(r),[h,r]),ae.createElement("span",{style:{...c.arrowStyles,pointerEvents:"none"}},ae.createElement("span",{ref:c.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},ae.createElement(_w,oi({},o,{ref:e,style:{...o.style,display:"block"}}))))}),Gw=Vw,Xw=Ww,Kw=Yw,Zw=Qw,wy=t=>{const{present:e,children:n}=t,r=function(h){const[v,g]=ae.useState(),x=ae.useRef({}),m=ae.useRef(h),w=ae.useRef("none"),A=h?"mounted":"unmounted",[P,M]=function(_,L){return ae.useReducer((k,O)=>{const I=L[k][O];return I??k},_)}(A,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ae.useEffect(()=>{const _=Rf(x.current);w.current=P==="mounted"?_:"none"},[P]),Sf(()=>{const _=x.current,L=m.current;if(L!==h){const k=w.current,O=Rf(_);h?M("MOUNT"):O==="none"||(_==null?void 0:_.display)==="none"?M("UNMOUNT"):M(L&&k!==O?"ANIMATION_OUT":"UNMOUNT"),m.current=h}},[h,M]),Sf(()=>{if(v){const _=k=>{const O=Rf(x.current).includes(k.animationName);k.target===v&&O&&M("ANIMATION_END")},L=k=>{k.target===v&&(w.current=Rf(x.current))};return v.addEventListener("animationstart",L),v.addEventListener("animationcancel",_),v.addEventListener("animationend",_),()=>{v.removeEventListener("animationstart",L),v.removeEventListener("animationcancel",_),v.removeEventListener("animationend",_)}}},[v,M]),{isPresent:["mounted","unmountSuspended"].includes(P),ref:ae.useCallback(_=>{_&&(x.current=getComputedStyle(_)),g(_)},[])}}(e),o=typeof n=="function"?n({present:r.isPresent}):ae.Children.only(n),c=yf(r.ref,o.ref);return typeof n=="function"||r.isPresent?ae.cloneElement(o,{ref:c}):null};function Rf(t){return(t==null?void 0:t.animationName)||"none"}wy.displayName="Presence";function Ty(t){const e=ae.useRef(t);return ae.useEffect(()=>{e.current=t},[t]),e.current}function hp(t){const e=ae.useRef(t);return ae.useEffect(()=>{e.current=t}),ae.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Jw(t){const e=hp(t);ae.useEffect(()=>{const n=r=>{r.key==="Escape"&&e(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e])}function eT({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,o]=function({defaultProp:g,onChange:x}){const m=ae.useState(g),[w]=m,A=ae.useRef(w),P=hp(x);return ae.useEffect(()=>{A.current!==w&&(P(w),A.current=w)},[w,A,P]),m}({defaultProp:e,onChange:n}),c=t!==void 0,h=c?t:r,v=hp(n);return[h,ae.useCallback(g=>{if(c){const x=g,m=typeof g=="function"?x(t):g;m!==t&&v(m)}else o(g)},[c,t,o,v])]}function ul(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}const[Cy,mP]=hy("Tooltip",[xy]),Af=xy(),tT=700,[gP,nT]=Cy("TooltipProvider",{isOpenDelayed:!0,delayDuration:tT,onOpen:()=>{},onClose:()=>{}}),[iT,Mf]=Cy("Tooltip"),rT=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o=!1,onOpenChange:c,delayDuration:h}=t,v=nT("Tooltip",e),g=Af(e),[x,m]=ae.useState(null),w=Pw(),A=ae.useRef(0),P=h??v.delayDuration,M=ae.useRef(!1),{onOpen:_,onClose:L}=v,[k=!1,O]=eT({prop:r,defaultProp:o,onChange:H=>{H&&(document.dispatchEvent(new CustomEvent("tooltip.open")),_()),c==null||c(H)}}),I=ae.useMemo(()=>k?M.current?"delayed-open":"instant-open":"closed",[k]),q=ae.useCallback(()=>{window.clearTimeout(A.current),M.current=!1,O(!0)},[O]),te=ae.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{M.current=!0,O(!0)},P)},[P,O]);return ae.useEffect(()=>()=>window.clearTimeout(A.current),[]),ae.createElement(Gw,g,ae.createElement(iT,{scope:e,contentId:w,open:k,stateAttribute:I,trigger:x,onTriggerChange:m,onTriggerEnter:ae.useCallback(()=>{v.isOpenDelayed?te():q()},[v.isOpenDelayed,te,q]),onOpen:ae.useCallback(q,[q]),onClose:ae.useCallback(()=>{window.clearTimeout(A.current),O(!1),L()},[O,L])},n))},sT=ae.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=Mf("TooltipTrigger",n),c=Af(n),h=yf(e,o.onTriggerChange),v=ae.useRef(!1),g=ae.useCallback(()=>v.current=!1,[]);return ae.useEffect(()=>()=>document.removeEventListener("mouseup",g),[g]),ae.createElement(Xw,oi({asChild:!0},c),ae.createElement(ll.button,oi({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:h,onMouseEnter:ul(t.onMouseEnter,o.onTriggerEnter),onMouseLeave:ul(t.onMouseLeave,o.onClose),onMouseDown:ul(t.onMouseDown,()=>{o.onClose(),v.current=!0,document.addEventListener("mouseup",g,{once:!0})}),onFocus:ul(t.onFocus,()=>{v.current||o.onOpen()}),onBlur:ul(t.onBlur,o.onClose),onClick:ul(t.onClick,o.onClose)})))}),aT=ae.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Mf("TooltipContent",t.__scopeTooltip);return ae.createElement(wy,{present:n||o.open},ae.createElement(oT,oi({ref:e},r)))}),oT=ae.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":o,portalled:c=!0,...h}=t,v=Mf("TooltipContent",n),g=Af(n),x=c?Nw:ae.Fragment,{onClose:m}=v;return Jw(()=>m()),ae.useEffect(()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m)),[m]),ae.createElement(x,null,ae.createElement(uT,{__scopeTooltip:n}),ae.createElement(Kw,oi({"data-state":v.stateAttribute},g,h,{ref:e,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),ae.createElement(Pg,null,r),ae.createElement(zw,{id:v.contentId,role:"tooltip"},o||r)))}),lT=ae.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=Af(n);return ae.createElement(Zw,oi({},o,r,{ref:e}))});function uT(t){const{__scopeTooltip:e}=t,n=Mf("CheckTriggerMoved",e),r=dy(n.trigger),o=r==null?void 0:r.left,c=Ty(o),h=r==null?void 0:r.top,v=Ty(h),g=n.onClose;return ae.useEffect(()=>{(c!==void 0&&c!==o||v!==void 0&&v!==h)&&g()},[g,c,v,o,h]),null}const cT=rT,fT=sT,dT=aT,hT=lT;function pT(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,c;for(c=0;c<r.length;c++)o=r[c],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function gs(t,e){if(t==null)return{};var n=pT(t,e),r,o;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(o=0;o<c.length;o++)r=c[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}let yi;(function(t){t[t.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",t[t.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",t[t.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",t[t.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",t[t.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",t[t.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",t[t.THEME_ERROR=6]="THEME_ERROR",t[t.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",t[t.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",t[t.EMPTY_KEY=9]="EMPTY_KEY"})(yi||(yi={}));const vT={[yi.UNSUPPORTED_INPUT]:(t,e)=>[`An input with type \`${t}\` input was found at path \`${e}\` but it's not supported yet.`],[yi.NO_COMPONENT_FOR_TYPE]:(t,e)=>[`Type \`${t}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[yi.UNKNOWN_INPUT]:(t,e)=>[`input at path \`${t}\` is not recognized.`,e],[yi.DUPLICATE_KEYS]:(t,e,n)=>[`Key \`${t}\` of path \`${e}\` already exists at path \`${n}\`. Even nested keys need to be unique. Rename one of the keys.`],[yi.ALREADY_REGISTERED_TYPE]:t=>[`Type ${t} has already been registered. You can't register a component with the same type.`],[yi.CLIPBOARD_ERROR]:t=>["Error copying the value",t],[yi.THEME_ERROR]:(t,e)=>[`Error accessing the theme \`${t}.${e}\` value.`],[yi.PATH_DOESNT_EXIST]:t=>[`Error getting the value at path \`${t}\`. There is probably an error in your \`render\` function.`],[yi.PATH_DOESNT_EXIST]:t=>[`Error accessing the value at path \`${t}\``],[yi.INPUT_TYPE_OVERRIDE]:(t,e,n)=>[`Input at path \`${t}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${n}\`.`],[yi.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function Ry(t,e,...n){const[r,...o]=vT[e](...n);console[t]("LEVA: "+r,...o)}const Ay=Ry.bind(null,"warn");Ry.bind(null,"log");function yP(t){return t}function mT(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function My(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ua(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?My(Object(n),!0).forEach(function(r){mT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const Gs=(t,e,n)=>t>n?n:t<e?e:t,gT=t=>{if(t===""||typeof t=="number")return t;try{const e=Xs(t);if(!isNaN(e))return e}catch{}return parseFloat(t)},yT=Math.log(10);function Oy(t){let e=Math.abs(+String(t).replace(".",""));if(e===0)return .01;for(;e!==0&&e%10===0;)e/=10;const n=Math.floor(Math.log(e)/yT)+1,r=Math.floor(Math.log10(Math.abs(t))),o=Math.pow(10,r-n);return Math.max(o,.001)}const ST=(t,e,n)=>n===e?0:(Gs(t,e,n)-e)/(n-e),Dy=(t,e,n)=>t*(n-e)+e,Ly=/\(([0-9+\-*/^ .]+)\)/,Py=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,ky=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,zy=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Ny=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,_y=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function Xs(t){if(isNaN(Number(t)))if(Ly.test(t)){const e=t.replace(Ly,(n,r)=>String(Xs(r)));return Xs(e)}else if(Py.test(t)){const e=t.replace(Py,(n,r,o)=>String(Math.pow(Number(r),Number(o))));return Xs(e)}else if(ky.test(t)){const e=t.replace(ky,(n,r,o)=>String(Number(r)*Number(o)));return Xs(e)}else if(zy.test(t)){const e=t.replace(zy,(n,r,o)=>{if(o!=0)return String(Number(r)/Number(o));throw new Error("Division by zero")});return Xs(e)}else if(Ny.test(t)){const e=t.replace(Ny,(n,r,o)=>String(Number(r)+Number(o)));return Xs(e)}else if(_y.test(t)){const e=t.replace(_y,(n,r,o)=>String(Number(r)-Number(o)));return Xs(e)}else return Number(t);return Number(t)}let Uy;(function(t){t.BUTTON="BUTTON",t.BUTTON_GROUP="BUTTON_GROUP",t.MONITOR="MONITOR",t.FOLDER="FOLDER"})(Uy||(Uy={}));let jy;(function(t){t.SELECT="SELECT",t.IMAGE="IMAGE",t.NUMBER="NUMBER",t.COLOR="COLOR",t.STRING="STRING",t.BOOLEAN="BOOLEAN",t.INTERVAL="INTERVAL",t.VECTOR3D="VECTOR3D",t.VECTOR2D="VECTOR2D"})(jy||(jy={}));const bT=t=>t.shiftKey?5:t.altKey?1/5:1,xT=["value"],ET=["min","max"],wT=t=>{if(typeof t=="number")return!0;if(typeof t=="string"){const e=parseFloat(t);return isNaN(e)?!1:t.substring((""+e).length).trim().length<4}return!1},TT=(t,{min:e=-1/0,max:n=1/0,suffix:r})=>{const o=parseFloat(t);if(t===""||isNaN(o))throw Error("Invalid number");const c=Gs(o,e,n);return r?c+r:c},CT=(t,{pad:e=0,suffix:n})=>{const r=parseFloat(t).toFixed(e);return n?r+n:r},RT=t=>{let{value:e}=t,n=gs(t,xT);const{min:r=-1/0,max:o=1/0}=n,c=gs(n,ET);let h=parseFloat(e);const v=typeof e=="string"?e.substring((""+h).length):void 0;h=Gs(h,r,o);let g=n.step;g||(Number.isFinite(r)?Number.isFinite(o)?g=+(Math.abs(o-r)/100).toPrecision(1):g=+(Math.abs(h-r)/100).toPrecision(1):Number.isFinite(o)&&(g=+(Math.abs(o-h)/100).toPrecision(1)));const x=g?Oy(g)*10:Oy(h);g=g||x/10;const m=Math.round(Gs(Math.log10(1/x),0,2));return{value:v?h+v:h,settings:Ua({initialValue:h,step:g,pad:m,min:r,max:o,suffix:v},c)}},Iy=(t,{step:e,initialValue:n})=>{const r=Math.round((t-n)/e);return n+r*e};var AT=Object.freeze({__proto__:null,schema:wT,sanitize:TT,format:CT,normalize:RT,sanitizeStep:Iy});function Qi(){return Qi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Qi.apply(this,arguments)}const MT=C.createContext({});function ys(){return C.useContext(MT)}const OT=C.createContext(null);C.createContext(null);const DT=C.createContext(null);function LT(){return C.useContext(DT)}const PT=()=>({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Of(t,e){const[n,r]=t.split(" "),o={};return n!=="none"&&(o.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${n!=="default"&&n||e.borderColor}`),r&&(o.backgroundColor=r),o}const Pu={$inputStyle:()=>t=>Of(t,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>t=>Of(t,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>t=>Of(t,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>t=>Of(t,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:_t,css:SP,createTheme:bP,globalCss:kT,keyframes:xP}=_E({prefix:"leva",theme:PT(),utils:Ua(Ua({},Pu),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:t=>({"&:focus":Pu.$focusStyle()(t)}),$focusWithin:t=>({"&:focus-within":Pu.$focusStyle()(t)}),$hover:t=>({"&:hover":Pu.$hoverStyle()(t)}),$active:t=>({"&:active":Pu.$activeStyle()(t)})})});kT({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function zT(t,e){const{theme:n}=C.useContext(OT);if(!(t in n)||!(e in n[t]))return Ay(yi.THEME_ERROR,t,e),"";let r=e;for(;;){let o=n[t][r];if(typeof o=="string"&&o.charAt(0)==="$")r=o.substr(1);else return o}}const Fy=_t("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),By=_t("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${Fy}`]:{paddingLeft:0}}),NT=_t(By,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),_T=_t("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),UT=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],jT=["onUpdate"];function Hy(t){let{innerLabel:e,value:n,onUpdate:r,onChange:o,onKeyDown:c,type:h,id:v,inputType:g="text",rows:x=0}=t,m=gs(t,UT);const{id:w,emitOnEditStart:A,emitOnEditEnd:P,disabled:M}=ys(),_=v||w,L=C.useRef(null),k=x>0,O=k?"textarea":"input",I=C.useCallback(H=>J=>{const re=J.currentTarget.value;H(re)},[]);C.useEffect(()=>{const H=L.current,J=I(re=>{r(re),P()});return H==null||H.addEventListener("blur",J),()=>H==null?void 0:H.removeEventListener("blur",J)},[I,r,P]);const q=C.useCallback(H=>{H.key==="Enter"&&I(r)(H)},[I,r]),te=Object.assign({as:O},k?{rows:x}:{},m);return C.createElement(_T,{textArea:k},e&&typeof e=="string"?C.createElement(By,null,e):e,C.createElement(Fy,Qi({levaType:h,ref:L,id:_,type:g,autoComplete:"off",spellCheck:"false",value:n,onChange:I(o),onFocus:()=>A(),onKeyPress:q,onKeyDown:c,disabled:M},te)))}function IT(t){let{onUpdate:e}=t,n=gs(t,jT);const r=C.useCallback(c=>e(gT(c)),[e]),o=C.useCallback(c=>{const h=c.key==="ArrowUp"?1:c.key==="ArrowDown"?-1:0;if(h){c.preventDefault();const v=c.altKey?.1:c.shiftKey?10:1;e(g=>parseFloat(g)+h*v)}},[e]);return C.createElement(Hy,Qi({},n,{onUpdate:r,onKeyDown:o,type:"number"}))}const pp=_t("div",{}),Vy=_t("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]});_t("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${Vy}::after`]:{opacity:.6},[`${pp}:hover > & + ${Vy}::after`]:{opacity:.6},[`${pp}:hover > & > svg`]:{opacity:1}});const FT=_t("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${pp}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),Wy=_t("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${FT} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),BT=_t(Wy,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),HT=_t("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),VT=_t("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),vp=_t("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}});_t("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${vp}`]:{pointerEvents:"auto"}}}}}),_t("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"});const WT=_t("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),$T=_t(hT,{fill:"$toolTipBackground"}),qT=["align"];function YT(){const{id:t,disable:e,disabled:n}=ys();return C.createElement(C.Fragment,null,C.createElement(VT,{id:t+"__disable",type:"checkbox",checked:!n,onChange:()=>e(!n)}),C.createElement("label",{htmlFor:t+"__disable"}))}function QT(t){const{id:e,optional:n,hint:r}=ys(),o=t.htmlFor||(e?{htmlFor:e}:null),c=!r&&typeof t.children=="string"?{title:t.children}:null;return C.createElement(C.Fragment,null,n&&C.createElement(YT,null),r!==void 0?C.createElement(cT,null,C.createElement(fT,{asChild:!0},C.createElement(vp,Qi({},o,t))),C.createElement(dT,{side:"top",sideOffset:2},C.createElement(WT,null,r,C.createElement($T,null)))):C.createElement(vp,Qi({},o,c,t)))}function Df(t){let{align:e}=t,n=gs(t,qT);const{value:r,label:o,key:c,disabled:h}=ys(),{hideCopyButton:v}=LT(),g=!v&&c!==void 0,[x,m]=C.useState(!1),w=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[c]:r??""})),m(!0)}catch{Ay(yi.CLIPBOARD_ERROR,{[c]:r})}};return C.createElement(HT,{align:e,onPointerLeave:()=>m(!1)},C.createElement(QT,n),g&&!h&&C.createElement("div",{title:`Click to copy ${typeof o=="string"?o:c} value`},x?C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},C.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),C.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):C.createElement("svg",{onClick:w,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},C.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),C.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const GT=["toggled"],XT=_t("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function KT(t){let{toggled:e}=t,n=gs(t,GT);return C.createElement(XT,Qi({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},n),C.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const ZT=["input"];function Lf(t){let{input:e}=t,n=gs(t,ZT);return e?C.createElement(BT,n):C.createElement(Wy,n)}function $y(t,e){const{emitOnEditStart:n,emitOnEditEnd:r}=ys();return Ow(o=>{o.first&&(document.body.classList.add("leva__panel__dragged"),n==null||n());const c=t(o);return o.last&&(document.body.classList.remove("leva__panel__dragged"),r==null||r()),c},e)}const JT=_t("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),eC=_t("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),tC=_t("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),nC=_t("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),iC=_t("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function rC({value:t,min:e,max:n,onDrag:r,step:o,initialValue:c}){const h=C.useRef(null),v=C.useRef(null),g=C.useRef(0),x=zT("sizes","scrubberWidth"),m=$y(({event:A,first:P,xy:[M],movement:[_],memo:L})=>{if(P){const{width:O,left:I}=h.current.getBoundingClientRect();g.current=O-parseFloat(x),L=(A==null?void 0:A.target)===v.current?t:Dy((M-I)/O,e,n)}const k=L+Dy(_/g.current,0,n-e);return r(Iy(k,{step:o,initialValue:c})),L}),w=ST(t,e,n);return C.createElement(nC,Qi({ref:h},m()),C.createElement(eC,null,C.createElement(iC,{style:{left:0,right:`${(1-w)*100}%`}})),C.createElement(tC,{ref:v,style:{left:`calc(${w} * (100% - ${x}))`}}))}const sC=C.memo(({label:t,onUpdate:e,step:n,innerLabelTrim:r})=>{const[o,c]=C.useState(!1),h=$y(({active:v,delta:[g],event:x,memo:m=0})=>(c(v),m+=g/2,Math.abs(m)>=1&&(e(w=>parseFloat(w)+Math.floor(m)*n*bT(x)),m=0),m));return C.createElement(NT,Qi({dragging:o,title:t.length>1?t:""},h()),t.slice(0,r))});function aC({label:t,id:e,displayValue:n,onUpdate:r,onChange:o,settings:c,innerLabelTrim:h=1}){const v=h>0&&C.createElement(sC,{label:t,step:c.step,onUpdate:r,innerLabelTrim:h});return C.createElement(IT,{id:e,value:String(n),onUpdate:r,onChange:o,innerLabel:v})}function oC(){const t=ys(),{label:e,value:n,onUpdate:r,settings:o,id:c}=t,{min:h,max:v}=o,g=v!==1/0&&h!==-1/0;return C.createElement(Lf,{input:!0},C.createElement(Df,null,e),C.createElement(JT,{hasRange:g},g&&C.createElement(rC,Qi({value:parseFloat(n),onDrag:r},o)),C.createElement(aC,Qi({},t,{id:c,label:"value",innerLabelTrim:g?0:1}))))}const lC=gs(AT,["sanitizeStep"]);Ua({component:oC},lC);var uC=Object.freeze({__proto__:null,schema:(t,e)=>Qs().schema({options:Qs().passesAnyOf(Qs().object(),Qs().array())}).test(e),sanitize:(t,{values:e})=>{if(e.indexOf(t)<0)throw Error("Selected value doesn't match Select options");return t},format:(t,{values:e})=>e.indexOf(t),normalize:t=>{let{value:e,options:n}=t,r,o;return Array.isArray(n)?(o=n,r=n.map(c=>String(c))):(o=Object.values(n),r=Object.keys(n)),"value"in t?o.includes(e)||(r.unshift(String(e)),o.unshift(e)):e=o[0],Object.values(n).includes(e)||(n[String(e)]=e),{value:e,settings:{keys:r,values:o}}}});const cC=_t("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),mp=_t("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),fC=_t("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${mp}:focus + &`]:{$focusStyle:""},[`${mp}:hover + &`]:{$hoverStyle:""}});function dC({displayValue:t,value:e,onUpdate:n,id:r,settings:o,disabled:c}){const{keys:h,values:v}=o,g=C.useRef();return e===v[t]&&(g.current=h[t]),C.createElement(cC,null,C.createElement(mp,{id:r,value:t,onChange:x=>n(v[Number(x.currentTarget.value)]),disabled:c},h.map((x,m)=>C.createElement("option",{key:x,value:m},x))),C.createElement(fC,null,g.current),C.createElement(KT,{toggled:!0}))}function hC(){const{label:t,value:e,displayValue:n,onUpdate:r,id:o,disabled:c,settings:h}=ys();return C.createElement(Lf,{input:!0},C.createElement(Df,null,t),C.createElement(dC,{id:o,value:e,displayValue:n,onUpdate:r,settings:h,disabled:c}))}Ua({component:hC},uC);var pC=Object.freeze({__proto__:null,schema:t=>Qs().string().test(t),sanitize:t=>{if(typeof t!="string")throw Error("Invalid string");return t},normalize:({value:t,editable:e=!0,rows:n=!1})=>({value:t,settings:{editable:e,rows:typeof n=="number"?n:n?5:0}})});const vC=["displayValue","onUpdate","onChange","editable"],mC=_t("div",{whiteSpace:"pre-wrap"});function gC(t){let{displayValue:e,onUpdate:n,onChange:r,editable:o=!0}=t,c=gs(t,vC);return o?C.createElement(Hy,Qi({value:e,onUpdate:n,onChange:r},c)):C.createElement(mC,null,e)}function yC(){const{label:t,settings:e,displayValue:n,onUpdate:r,onChange:o}=ys();return C.createElement(Lf,{input:!0},C.createElement(Df,null,t),C.createElement(gC,Qi({displayValue:n,onUpdate:r,onChange:o},e)))}Ua({component:yC},pC);var SC=Object.freeze({__proto__:null,schema:t=>Qs().boolean().test(t),sanitize:t=>{if(typeof t!="boolean")throw Error("Invalid boolean");return t}});const bC=_t("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function xC({value:t,onUpdate:e,id:n,disabled:r}){return C.createElement(bC,null,C.createElement("input",{id:n,type:"checkbox",checked:t,onChange:o=>e(o.currentTarget.checked),disabled:r}),C.createElement("label",{htmlFor:n},C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function EC(){const{label:t,value:e,onUpdate:n,disabled:r,id:o}=ys();return C.createElement(Lf,{input:!0},C.createElement(Df,null,t),C.createElement(xC,{value:e,onUpdate:n,id:o,disabled:r}))}Ua({component:EC},SC),_t("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});class ja extends Hr{constructor(e){super(),this.type="spacial-content",this.style={opacity:1},this.format="jpg",this.tileUrl=iE(e.url),this.id=e.id||`${this.tileUrl}--${e.scaleFactor}`,this.points=e.displayPoints?e.displayPoints:vs(e.points,Ys(e.scaleFactor)),this.tileWidth=e.tileWidth,this.display={x:0,y:0,width:e.width/e.scaleFactor,height:e.height/e.scaleFactor,points:e.points,scale:e.scaleFactor},e.format&&(this.format=e.format)}applyProps(e){if(e.style&&typeof e.style.opacity<"u"&&(this.style.opacity=e.style.opacity),e.service!==this.service&&(this.service=e.service),e.format?this.format=e.format:this.format="jpg",e.crop){this.cropData=e.crop;const n=We([...this.points]),r=n.length/5,o=e.crop.x||0,c=e.crop.y||0,h=e.crop.x+e.crop.width,v=e.crop.y+e.crop.height;for(let g=0;g<r;g++){const x=g*5;n[x+1]<h&&n[x+3]>o&&n[x+2]<v&&n[x+4]>c?(n[x+1]=Gs(n[x+1],o,h),n[x+3]=Gs(n[x+3],o,h),n[x+2]=Gs(n[x+2],c,v),n[x+4]=Gs(n[x+4],c,v)):n[x]=0}Br(n,mi(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(n):this.crop=n}}static fromTile(e,n,r,o,c,h){r.height=r.height?r.height:r.width;const v=Math.ceil(n.width/o),g=Math.ceil(n.height/o),x=Math.ceil(v/r.width),m=Math.ceil(g/r.height),w=wt.grid(x,m),A=wt.grid(x,m);for(let M=0;M<m;M++)for(let _=0;_<x;_++){const L=_*r.width,k=M*r.height;A.addPoints(L*o,k*o,_===x-1?n.width:(L+r.width)*o,M===m-1?n.height:(k+r.height)*o),w.addPoints(L,k,_===x-1?v:L+r.width,M===m-1?g:k+r.height)}const P=new ja({url:e,scaleFactor:o,points:w.build(),displayPoints:A.build(),width:n.width,height:n.height,tileWidth:r.width,format:h});return P.applyProps({service:c}),P}getImageUrl(e){const n=this.points.slice(e*5,e*5+5),r=n[3]-n[1],o=n[4]-n[2],c=Math.ceil(r/this.display.scale);return`${this.tileUrl}/${n[1]},${n[2]},${r},${o}/${c>this.tileWidth?this.tileWidth:c},/0/default.${this.format||"jpg"}`}getAllPointsAt(e,n,r){const o=Cu(this.crop||this.points,e);return[[this,o,n]]}transform(e){Br(this.points,e)}getScheduledUpdates(e,n){return[]}}class wC extends Hr{constructor(){super(...arguments),this.type="spacial-content"}getAllPointsAt(e,n,r){return[[this,this.points,n]]}}class TC extends wC{constructor(e){super(),this.images=[],this.allImages=[],this.scaleFactors=[],this.aggregateBuffer=We(9),this.isFullyLoaded=!1,this.maxScaleFactor=0,this._scheduleSortByScales=!1,this._sortByScales=()=>{this._scheduleSortByScales=!1,this.allImages.sort((r,o)=>o.display.width-r.display.width),this.images=[];let n=.1;for(const r of this.allImages){if(r.display.width<this.renderOptions.minSize&&r.display.height<this.renderOptions.minSize&&!r.priority||r instanceof xr&&(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){const c=this.images.pop();c&&(c instanceof xr||c.priority)?(r.priority&&this.images.push(r),this.images.push(c)):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)},this.loadFullResource=async()=>{if(!this.isFullyLoaded&&this.lazyLoader){this.isFullyLoaded=!0;const n=await this.lazyLoader();this.addImages(n)}},this.fallback=[this.loadFullResource],this.id=e.id,this.points=wt.singleBox(e.width,e.height),this.lazyLoader=e.loadFullImages,e.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:wt.singleBox(e.width,e.height),height:e.height,width:e.width,scale:1},this.renderOptions={renderSmallestFallback:!0,renderLayers:3,minSize:255,maxImageSize:1024,quality:1.2,...e.renderOptions||{}},this.addImages(e.images)}applyProps(e){typeof e.renderSmallestFallback<"u"&&e.renderSmallestFallback!==this.renderOptions.renderSmallestFallback&&(this.renderOptions.renderSmallestFallback=e.renderSmallestFallback),typeof e.renderLayers<"u"&&e.renderLayers!==this.renderOptions.renderLayers&&(this.renderOptions.renderLayers=e.renderLayers),typeof e.minSize<"u"&&e.minSize!==this.renderOptions.minSize&&(this.renderOptions.minSize=e.minSize),typeof e.maxImageSize<"u"&&e.maxImageSize!==this.renderOptions.maxImageSize&&(this.renderOptions.maxImageSize=e.maxImageSize),typeof e.quality<"u"&&e.quality!==this.renderOptions.quality&&(this.renderOptions.quality=e.quality)}appendChild(e){this.addImages([e])}removeChild(e){this.images.indexOf(e)!==-1&&(this.images=this.images.filter(n=>n!==e),this.sortByScales())}insertBefore(e,n){this.addImages([e])}hideInstance(){}addImages(e){for(const n of e)n.__parent=this,n.__owner=this.__owner;this.allImages.push(...e.filter(Boolean)),this.sortByScales()}sortByScales(){this._scheduleSortByScales=!0}getScheduledUpdates(e,n){return this._scheduleSortByScales?[this._sortByScales]:this.isFullyLoaded?[]:n>1/this.maxScaleFactor?this.fallback:[]}getAllPointsAt(e,n,r){if(this.images.length===0)return[];const o=nE(1/(r||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),c=this.images.length,h=n?ps(n,mi(this.x,this.y)):mi(this.x,this.y);if(o!==this.images.length-1&&this.images[o+1]){let v=[];for(let m=c-1;m>=o;m--)v.push(m);const g=v[0];this.renderOptions.renderLayers&&(v=v.slice(-this.renderOptions.renderLayers)),this.renderOptions.renderSmallestFallback&&v.indexOf(g)===-1&&v.unshift(g);const x=[];for(let m=0;m<v.length;m++)x.push(...this.images[v[m]].getAllPointsAt(e,h,r));return x}return this.images[o].getAllPointsAt(e,h,r)}}function Pf(t,e,n,r,o){const c=Math.PI/180*o,h=Math.cos(c),v=Math.sin(c),g=h*(n-t)+v*(r-e)+t,x=h*(r-e)-v*(n-t)+e;return[g,x]}class ku extends Hr{constructor(e,n){super(),this.type="world-object",this.intersectionBuffer=We(5),this.aggregateBuffer=We(9),this.invertedBuffer=We(9),this.rotation=0,this._updatedList=[];const{x:r=0,y:o=0}=n||{};e?(this.id=e.id||"",this.scale=1,this.layers=e.layers,this.points=We([1,r,o,r+e.width,o+e.height]),this.worldPoints=We([1,r,o,r+e.width,o+e.height]),this.filteredPointsBuffer=We(e.layers.length*5)):(this.id="",this.scale=1,this.layers=[],this.points=We(5),this.worldPoints=We(5),this.filteredPointsBuffer=We(5))}static createWithProps(e){const n=new ku;return n.applyProps(e),n}applyProps(e){const n=e.x||0,r=e.y||0;this.id=e.id;const o=typeof e.scale<"u"?e.scale:this.scale;this.points[0]=1,this.points[1]=n,this.points[2]=r,this.points[3]=n+e.width,this.points[4]=r+e.height,this.rotation=e.rotation||0,this.worldPoints[3]=this.worldPoints[1]+e.width,this.worldPoints[4]=this.worldPoints[2]+e.height,e.scale&&e.scale!==1&&this.atScale(o),this.scale=o}appendChild(e){e.points[0]===0&&e.points.set(this.points),e.__owner.value=this,this.addLayers([e])}removeChild(e){this.layers=this.layers.filter(n=>n!==e),this.filteredPointsBuffer=We(this.layers.length*5)}insertBefore(e,n){const r=this.layers.indexOf(n);if(r===-1||this.layers.indexOf(e)!==-1)return;const o=this.layers.slice(0,r),c=this.layers.slice(r);this.layers=[...o,e,...c]}hideInstance(){console.warn("hideInstance: not yet implemented")}getObjectsAt(e,n){if(this.rotation&&(e=this.applyRotation(e)),Cu(this.points,e,this.filteredPointsBuffer)[0]===0)return[];const o=this.layers.length,c=[];for(let h=0;h<o;h++){const v=this.layers[h];if(n&&v.isShape){const x=vs(v.points,mi(this.x,this.y));if(!v.intersects([e[1]-x[1],e[2]-x[2]]))continue}if(Cu(vs(v.points,mi(this.x,this.y)),e,this.filteredPointsBuffer)[0]!==0&&c.push(v),n){const x=v;c.push(...x.getObjectsAt(e,n))}}return c}applyRotation(e){if(this.rotation){const n={x:e[1],y:e[2]},r={x:e[1],y:e[4]},o={x:e[3],y:e[2]},c={x:e[3],y:e[4]},h=this.points[1]+(this.points[3]-this.points[1])/2,v=this.points[2]+(this.points[4]-this.points[2])/2,[g,x]=Pf(h,v,n.x,n.y,this.rotation),[m,w]=Pf(h,v,r.x,r.y,this.rotation),[A,P]=Pf(h,v,o.x,o.y,this.rotation),[M,_]=Pf(h,v,c.x,c.y,this.rotation),L=Math.min(g,m,A,M),k=Math.max(g,m,A,M),O=Math.min(x,w,P,_),I=Math.max(x,w,P,_);return We([e[0],L,O,k,I])}return e}getAllPointsAt(e,n,r){const o=ps(mi(this.x,this.y),Ys(this.scale),this.aggregateBuffer);this.rotation&&(e=this.applyRotation(e));const c=eE(e,this.points,this.intersectionBuffer),h=this.layers.length,v=[],g=vs(c,ps(Ys(1/this.scale),mi(-this.x,-this.y),this.invertedBuffer)),x=n?ps(n,o,this.aggregateBuffer):o,m=r*this.scale;for(let w=0;w<h;w++)v.push(...this.layers[w].getAllPointsAt(g,x,m));return v}addLayers(e){const n=[];for(const r of e)this.layers.indexOf(r)===-1&&(n.push(r),r.points.length===5&&(r.points[1]<this.worldPoints[1]/this.scale||r.points[2]<this.worldPoints[2]/this.scale||r.points[3]>this.worldPoints[3]/this.scale||r.points[4]>this.worldPoints[4]/this.scale)&&(r.crop=r.crop||We([1,Math.max(this.worldPoints[1]/this.scale,r.points[1]),Math.max(this.worldPoints[2]/this.scale,r.points[2]),Math.min(this.worldPoints[3]/this.scale,r.points[3]),Math.min(this.worldPoints[4]/this.scale,r.points[4])])));this.layers=this.layers.concat(n),this.filteredPointsBuffer=We(this.layers.length*5)}getScheduledUpdates(e,n){const r=this.layers.length;this._updatedList=[];const o=n*this.scale;for(let c=0;c<r;c++){const h=this.layers[c].getScheduledUpdates(e,o);h&&this._updatedList.push(...h)}return this._updatedList}}class cl extends Hr{constructor(e=0,n=0,r=100,o="left-to-right"){super(),this.id="world",this.aggregateBuffer=We(9),this.isDirty=!1,this.zones=[],this.triggerQueue=[],this.activatedEvents=[],this._updatedList=[],this.translationBuffer=We(9),this.needsRecalculate=!0,this.emptyPaintables=[],this.renderOrder=[],this.objects=[],this.subscriptions=[],this._propagateEventTargets=[],this._alreadyFlushed=[],this._width=e,this._height=n,this.aspectRatio=Number.isNaN(e/n)?1:e/n,this.viewingDirection=o,this.points=We(r*5),this.filteredPointsBuffer=We(r*5)}get x(){return 0}get y(){return 0}get width(){return this._width}get height(){return this._height}static withProps(e){const n=new cl;return n.applyProps(e),n}applyProps(e){typeof e.width<"u"&&typeof e.height<"u"&&(e.width!==this._width||e.height!==this._height)&&this.resize(e.width,e.height),e.viewingDirection!==this.viewingDirection&&(this.viewingDirection=e.viewingDirection,this.triggerRepaint())}propagateTouchEvent(e,n,r){const o=[];for(const c of r)if(c.x&&c.y){const h=wt.singleBox(1,1,c.x,c.y);o.push(this.getObjectsAt(h,!0).reverse())}return o.map(c=>this.propagateEvent(e,n,c,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(e,n,r,o,c={}){const h=wt.singleBox(1,1,r,o),v=this.getObjectsAt(h,!0).reverse();return this.propagateEvent(e,n,v,c)}propagateEvent(e,n,r,{bubbles:o=!1,cancelable:c=!1}={}){n.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let h=!1;n.stopPropagation=()=>{h=!0};const v=r.length;for(let m=v-1;m>=0;m--){this._propagateEventTargets.unshift(r[m][0]);const w=r[m][1].length;if(w)for(let A=0;A<w;A++)this._propagateEventTargets.unshift(r[m][1][A])}const g=this._propagateEventTargets.length;let x=!1;for(let m=0;m<g&&(n.atlasTarget=this._propagateEventTargets[m],n.atlasWorld=this,x=this._propagateEventTargets[m].dispatchEvent(e,n)||x,!h);m++);return x&&this.triggerRepaint(),this._propagateEventTargets}appendChild(e){const n=this.appendWorldObject(e);this.renderOrder.push(n/5)}removeChild(e){const n=this.objects.indexOf(e);if(n===-1){for(const r of this.objects)if(r&&r.id===e.id){this.removeChild(r);return}return}this.objects[n]=null,this.renderOrder=this.renderOrder.filter(r=>r!==n),this.points[n*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(e,n){const r=this.objects.indexOf(n);if(r===-1)return;const o=this.appendWorldObject(e);this.renderOrder.splice(r-1,0,o/5)}hideInstance(){}asWorldObject(){return null}addZone(e){this.zones.push(e)}selectZone(e){if(typeof e=="string"){const n=this.zones.length;for(let r=0;r<n;r++)if(this.zones[r].id===e){this.selectedZone=r,this.trigger("zone-changed");return}}else this.zones[e]&&(this.selectedZone=e,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(tE(this.points)===this.objects.length){const e=this.points,n=We(this.points.length*2);n.set(e,0),this.points=n}}appendWorldObject(e){this.checkResizeInternalBuffer();const n=this.objects.length*5,r=e.points;return e.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),e.points[1]=r[1],e.points[2]=r[2],e.points[3]=r[3],e.points[4]=r[4],this.objects.push(e),this.filteredPointsBuffer=We(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),n}recalculateWorldSize(){let e=!1;if(this.needsRecalculate){const n=new Int32Array(this.objects.length),r=new Int32Array(this.objects.length),o=this.renderOrder.length;for(let v=0;v<o;v++){const g=this.renderOrder[v];this.objects[g]&&(n[v]=this.points[g*5+3],r[v]=this.points[g*5+4])}const c=Math.max(...n);c!==this._width&&(this._width=c,e=!0);const h=Math.max(...r);h!==this._height&&(this._height=h,e=!0),e&&this.trigger("recalculate-world-size",{width:c,height:h}),this.needsRecalculate=!1}return e}addObjectAt(e,n){n.width&&!n.height?n.height=n.width/e.width*e.height:n.height&&!n.width&&(n.width=n.height/e.height*e.width),(!n||!n.width||!n.height)&&(n.width=e.width,n.height=e.height);const{width:r,x:o,y:c}=n,h=r/e.width;this.checkResizeInternalBuffer(),this.points.set(wt.singleBox(e.width,e.height,0,0),this.objects.length*5);const v=new ku(e);return v.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(v),this.scaleWorldObject(this.objects.length-1,h),this.translateWorldObject(this.objects.length-1,o,c),this.filteredPointsBuffer=We(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,v}scaleWorldObject(e,n){Br(this.points.subarray(e*5,e*5+5),Ru(n,this.points[e*5+1],this.points[e*5+2]));const r=this.objects[e];r&&(r.atScale(n),this.triggerRepaint())}translateWorldObject(e,n,r){Br(this.points.subarray(e*5,e*5+5),mi(n,r));const o=this.objects[e];o&&(o.translate(n,r),this.triggerRepaint())}resize(e,n){return this._width=e,this._height=n,this.aspectRatio=e/n,this.triggerRepaint(),this}getObjects(){return this.objects}getPoints(){return this.points}getPointsFromViewer(e,n){const r=wt.singleBox(e.width,e.height,e.x,e.y);return this.getPointsAt(r,n,e.scale)}addLayoutSubscriber(e){return this.subscriptions.push(e),()=>{this.subscriptions.splice(this.subscriptions.indexOf(e),1)}}getScheduledUpdates(e,n){const r=Cu(this.points,e,this.filteredPointsBuffer),o=this.objects.length;this._updatedList=[];for(let c=0;c<o;c++)if(r[c*5]!==0){if(!this.objects[c])continue;this._updatedList.push(...this.objects[c].getScheduledUpdates(e,n))}return this._updatedList}getObjectsAt(e,n=!1){const r=this.getActiveZone(),o=Cu(this.points,e,this.filteredPointsBuffer),c=this.renderOrder.length,h=[];for(let v=0;v<c;v++){const g=this.renderOrder[v];if(o[g*5]!==0){const x=this.objects[g];if(!x||r&&r.objects.indexOf(x)===-1)continue;if(x.type!=="world-object"){h.push([x,[x]]);continue}n?h.push([x,x.getObjectsAt(e,n)]):h.push([x,this.emptyPaintables])}}return h}getPointsAt(e,n,r=1){const o=this.getObjectsAt(e),c=ps(Ys(r),mi(-e[1],-e[2]),this.translationBuffer),h=n?ps(n,c,this.aggregateBuffer):c,v=o.length,g=[];for(let x=0;x<v;x++)o[x]&&g.push(...o[x][0].getAllPointsAt(e,h,r));return g}flushSubscriptions(){if(this.triggerQueue.length){this._alreadyFlushed=[];const e=this.triggerQueue.length;for(let n=0;n<e;n++){if(this._alreadyFlushed.indexOf(this.triggerQueue[n][0])!==-1)continue;typeof this.triggerQueue[n][1]>"u"&&this._alreadyFlushed.push(this.triggerQueue[n][0]);const r=this.subscriptions.length;for(let o=0;o<r;o++)this.subscriptions[o].apply(null,this.triggerQueue[n])}this.triggerQueue=[]}}trigger(e,n){this.triggerQueue.push([e,n])}triggerEventActivation(){this.trigger("event-activation")}triggerRepaint(){this.trigger("repaint")}gotoRegion(e){this.trigger("goto-region",e)}goHome(e=!1){this.trigger("go-home",{immediate:e})}zoomTo(e,n,r){this.trigger("zoom-to",{point:n,factor:e,stream:r})}zoomIn(e){this.trigger("zoom-to",{point:e,factor:.5})}zoomOut(e){this.trigger("zoom-to",{point:e,factor:2})}constraintBounds(e){this.trigger("constrain-bounds",{immediate:e})}}const kf=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,zf={},CC=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"];class zu extends Hr{constructor(){super(),this.type="spacial-content",this.hoverEvents=!1,this.activeEvents=!1,this.display={x:0,y:0,scale:1,width:-1,height:-1,points:We(5)},this._parsed={border:{id:null,match:[]},outline:{id:null,match:[]}},this.props={},this.addHover=()=>{this.hovering=!0,this.__revision++},this.removeHover=()=>{this.hovering=!1,this.pressing=!1,this.__revision++},this.addPress=()=>{this.pressing=!0,this.__revision++},this.removePress=()=>{this.pressing=!1,this.__revision++},this.id=mf(12),this.points=We(5)}getAllPointsAt(e,n){return[[this,this.points,n]]}applyProps(e={}){let n=!1;if(e.interactive!==this.props.interactive&&(n=!0,this.props.interactive=e.interactive),e.style){const r=e.border||e.style.border;if(r!==this._parsed.border.id)if(!r)this._parsed.border.id=null,this._parsed.border.match=[];else{const o=zf[r]||kf.exec(r)||kf.exec(r);o&&(this._parsed.border.id=r,this._parsed.border.match=zf[r]=o)}if(this._parsed.border.id&&(e.style.borderWidth=this._parsed.border.match[1],e.style.borderStyle="solid",e.style.borderColor=this._parsed.border.match[4]),e.style.outline!==this._parsed.outline.id)if(!e.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{const o=zf[e.style.outline]||kf.exec(e.style.outline)||kf.exec(e.style.outline);o&&(this._parsed.outline.id=e.style.outline,this._parsed.outline.match=zf[e.style.outline]=o)}this._parsed.outline.id&&(e.style.outlineWidth=this._parsed.outline.match[1],e.style.outlineStyle="solid",e.style.outlineColor=this._parsed.outline.match[4]),this.props.style=e.style,e.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.backgroundColor,n=!0),e.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.style.background,n=!0);for(const o of CC)if(this.props.style[o]!==e.style[o]){n=!0;break}e.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=e.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n=!0),e.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=e.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0)}e.href!==this.props.href&&(this.props.href=e.href,n=!0),e.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=e.hrefTarget,n=!0),e.title!==this.props.title&&(this.props.title=e.title,n=!0),e.className!==this.props.className&&(this.props.className=e.className,e.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),e.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0),e.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=e.relativeSize,n=!0),e.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=e.relativeStyle,n=!0),e.html!==this.props.html&&(this.props.html=e.html,n=!0),e.target&&(e.target.width!==this.display.width||e.target.height!==this.display.height||e.target.x!==this.points[1]||e.target.y!==this.points[2])&&(n=!0,this.points=wt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.points=wt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.width=e.target.width,this.display.height=e.target.height),n&&this.__revision++}}class Nf extends Hr{constructor(){super(),this.type="spacial-content",this.color="#000",this.text="",this.display={x:0,y:0,scale:1,width:100,height:100,points:We(5)},this.interactive=!1,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=We(5)}getAllPointsAt(e,n){return[[this,this.points,n]]}applyProps({id:e,target:n,text:r,color:o,backgroundColor:c,fontSize:h=18,interactive:v,fontFamily:g="Arial, sans-serif",...x}){x.font=`${h}px ${g}`,this.interactive=v||!1,typeof r<"u"&&(this.text=r||""),o&&(this.color=o),c&&(this.backgroundColor=c),e&&(this.id=e),n&&(this.points=wt.singleBox(n.width,n.height,n.x,n.y),this.display.points=this.points,this.display.width=n.width,this.display.height=n.height),this.props={...this.props,...x},this.__revision++}}const pn=Math.pow,_f=Math.sqrt,Nu=Math.sin,qy=Math.cos,_u=Math.PI,Uf=1.70158,jf=Uf*1.525,Yy=Uf+1,Qy=2*_u/3,Gy=2*_u/4.5,If=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},Ks={linear:t=>t,easeInQuad:function(t){return t*t},easeOutQuad:function(t){return 1-(1-t)*(1-t)},easeInOutQuad:function(t){return t<.5?2*t*t:1-pn(-2*t+2,2)/2},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1-pn(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-pn(-2*t+2,3)/2},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1-pn(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-pn(-2*t+2,4)/2},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1-pn(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-pn(-2*t+2,5)/2},easeInSine:function(t){return 1-qy(t*_u/2)},easeOutSine:function(t){return Nu(t*_u/2)},easeInOutSine:function(t){return-(qy(_u*t)-1)/2},easeInExpo:function(t){return t===0?0:pn(2,10*t-10)},easeOutExpo:function(t){return t===1?1:1-pn(2,-10*t)},easeInOutExpo:function(t){return t===0?0:t===1?1:t<.5?pn(2,20*t-10)/2:(2-pn(2,-20*t+10))/2},easeInCirc:function(t){return 1-_f(1-pn(t,2))},easeOutCirc:function(t){return _f(1-pn(t-1,2))},easeInOutCirc:function(t){return t<.5?(1-_f(1-pn(2*t,2)))/2:(_f(1-pn(-2*t+2,2))+1)/2},easeInBack:function(t){return Yy*t*t*t-Uf*t*t},easeOutBack:function(t){return 1+Yy*pn(t-1,3)+Uf*pn(t-1,2)},easeInOutBack:function(t){return t<.5?pn(2*t,2)*((jf+1)*2*t-jf)/2:(pn(2*t-2,2)*((jf+1)*(t*2-2)+jf)+2)/2},easeInElastic:function(t){return t===0?0:t===1?1:-pn(2,10*t-10)*Nu((t*10-10.75)*Qy)},easeOutElastic:function(t){return t===0?0:t===1?1:pn(2,-10*t)*Nu((t*10-.75)*Qy)+1},easeInOutElastic:function(t){return t===0?0:t===1?1:t<.5?-(pn(2,20*t-10)*Nu((20*t-11.125)*Gy))/2:pn(2,-20*t+10)*Nu((20*t-11.125)*Gy)/2+1},easeInBounce:function(t){return 1-If(1-t)},easeOutBounce:If,easeInOutBounce:function(t){return t<.5?(1-If(1-2*t))/2:(1+If(2*t-1))/2}};class RC{constructor(e){this.runtime=e,this.pendingTransition={from:We(5),to:We(5),elapsed_time:0,done:!0,total_time:0,timingFunction:Ks.easeInOutQuad,constrain:!1}}hasPending(){return!this.pendingTransition.done}getPendingTransition(){return this.pendingTransition}getPendingFrom(){return this.pendingTransition.from}customTransition(e){e(this.pendingTransition)}stopTransition(){this.pendingTransition.from=We(this.runtime.target),this.pendingTransition.to=We(this.runtime.target),this.pendingTransition.done=!0,this.pendingTransition.elapsed_time=0,this.pendingTransition.total_time=0}runTransition(e,n){if(!this.pendingTransition.done){const r=this.pendingTransition,o=r.total_time===0?0:(r.elapsed_time+n)/r.total_time,c=r.total_time===0?1:o===0?0:r.timingFunction(o);e[1]=r.from[1]+(r.to[1]-r.from[1])*c,e[2]=r.from[2]+(r.to[2]-r.from[2])*c,e[3]=r.from[3]+(r.to[3]-r.from[3])*c,e[4]=r.from[4]+(r.to[4]-r.from[4])*c,this.pendingTransition.elapsed_time+=n,this.pendingTransition.elapsed_time>=this.pendingTransition.total_time&&(this.pendingTransition.done=!0,this.pendingTransition.constrain&&this.constrainBounds({transition:{duration:this.pendingTransition.total_time===0?0:500,easing:Ks.easeOutExpo}}))}}zoomTo(e,{origin:n,stream:r=!1,transition:o}={}){const c=this.runtime.getZoomedPosition(e,{origin:n}),h=Math.abs(1-e);this.applyTransition(c,o,{duration:2e3*h,easing:Ks.easeOutExpo,constrain:!0},{stream:!1})}constrainBounds({transition:e,panPadding:n=0}={}){const[r,o]=this.runtime.constrainBounds(this.runtime.target,{panPadding:n});r&&(this.applyTransition(o,e,{duration:500,easing:Ks.easeOutQuart,constrain:!1}),this.runtime.updateNextFrame())}applyTransition(e,n,r,{stream:o}={}){this.pendingTransition.from=We(this.runtime.target),this.pendingTransition.to=e,o||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=typeof(n==null?void 0:n.duration)<"u"?n.duration:typeof(r==null?void 0:r.duration)<"u"?r.duration:1e3,this.pendingTransition.constrain=typeof(n==null?void 0:n.constrain)<"u"?n.constrain:typeof(r==null?void 0:r.constrain)<"u"?r.constrain:!1,this.pendingTransition.timingFunction=(n==null?void 0:n.easing)||(r==null?void 0:r.easing)||Ks.easeInOutSine}goToRegion(e,{transition:n}={}){const r=this.runtime.clampRegion(e);this.applyTransition(wt.singleBox(r.width,r.height,r.x,r.y),n,{duration:1e3,easing:Ks.easeOutExpo,constrain:!0}),this.runtime.updateNextFrame()}}class Ff{constructor(e,n,r,o=[],c){this.id=mf(),this.ready=!1,this.transformBuffer=We(500),this.lastTarget=We(5),this.zoomBuffer=We(5),this.logNextRender=!1,this.pendingUpdate=!0,this.isCommitting=!1,this.firstRender=!0,this.mode="explore",this.controllers=[],this.controllersRunning=!1,this.controllerStopFunctions=[],this.maxScaleFactor=1,this._viewerToWorld={x:0,y:0},this._lastGoodScale=1,this.hooks={useFrame:[],useBeforeFrame:[],useAfterPaint:[],useAfterFrame:[]},this._viewport={x:0,y:0,width:0,height:0},this.setViewport=h=>{const v=typeof h.x>"u"?this.target[1]:h.x,g=typeof h.y>"u"?this.target[2]:h.y;h.width?this.target[3]=v+h.width:this.target[3]=this.target[3]-this.target[1]+v,h.height?this.target[4]=g+h.height:this.target[4]=this.target[4]-this.target[2]+g,Math.abs(this.target[1]-v)>.01&&(this.target[1]=v),Math.abs(this.target[2]-g)>.01&&(this.target[2]=g),this.pendingUpdate=!0},this.render=h=>{const v=h-this.lastTime;if(this.isCommitting||this.fpsLimit&&v<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=h,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook("useFrame",v);const g=this.pendingUpdate,x=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,v),this.pendingUpdate=!0,this.updateControllerPosition()),!this.firstRender&&!g&&!x&&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",v),this.renderer.beforeFrame(this.world,v,this.target);const m=this.getScaleFactor(),w=this.renderer.getPointsAt(this.world,this.target,this.aggregate,m),A=w.length;for(let _=0;_<A;_++){const L=w[_][0],k=w[_][1],O=w[_][2],I=O?vs(k,O,this.transformBuffer):k;this.renderer.prepareLayer(L,L.__parent&&O?vs(L.__parent.crop||L.__parent.points,O):I);const q=I.length/5;for(let te=0;te<q;te++){const H=te*5;I[H]!==0&&(this.renderer.paint(L,te,I[H+1],I[H+2],I[H+3]-I[H+1],I[H+4]-I[H+2]),this.hook("useAfterPaint",L))}this.renderer.finishLayer(L,k)}this.renderer.afterFrame(this.world,v,this.target),this.hook("useAfterFrame",v),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();const P=this.world.getScheduledUpdates(this.target,m),M=P.length;if(M>0)for(let _=0;_<M;_++){const L=P[M-_-1]();L?L.then(()=>{this.pendingUpdate=!0}):this.pendingUpdate=!0}},this.renderer=e,this.world=n,this.options={maxOverZoom:1,maxUnderZoom:1,visibilityRatio:1.5,...c||{}},this.target=wt.projection(r),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=wt.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new RC(this),this.aggregate=Ys(1),this.world.addLayoutSubscriber(h=>{h==="repaint"&&(this.pendingUpdate=!0),h==="recalculate-world-size"&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=o,this.render(this.lastTime),this.startControllers()}get x(){return this.target[1]}set x(e){this.target[1]=e}get y(){return this.target[2]}set y(e){this.target[2]=e}get x2(){return this.target[3]}set x2(e){this.target[3]=e}get y2(){return this.target[4]}set y2(e){this.target[4]=e}get width(){return this.target[3]-this.target[1]}set width(e){this.target[3]=this.target[1]+e}get height(){return this.target[4]-this.target[2]}set height(e){this.target[4]=this.target[2]=e}setHomePosition(e){this.homePosition.set(wt.projection(e||this.world)),this.pendingUpdate=!0}startControllers(){if(!this.controllersRunning){for(const e of this.controllers)this.controllerStopFunctions.push(e.start(this));this.controllersRunning=!0}}stopControllers(){if(this.controllersRunning){for(const e of this.controllerStopFunctions)e();this.controllersRunning=!1,this.controllerStopFunctions=[]}}updateControllerPosition(){for(const e of this.controllers)e.updatePosition(this.x,this.y,this.width,this.height)}triggerResize(){this.renderer.triggerResize&&this.renderer.triggerResize(),this.pendingUpdate=!0}addController(e){this.controllers.push(e),this.controllersRunning&&e.start(this),this.pendingUpdate=!0}cover(){return this.goHome({cover:!0})}getRendererScreenPosition(){return this.renderer.getRendererScreenPosition()}updateRendererScreenPosition(){this.pendingUpdate=!0,this.renderer.resize()}setOptions(e){this.options={...this.options,...e}}goHome(e={}){if(this.world.width<=0||this.world.height<=0)return;const n=this.getScaleFactor(),r=e.position?{x:e.position[1],y:e.position[2],width:e.position[3]-e.position[1],height:e.position[4]-e.position[2]}:{x:this.homePosition[1],y:this.homePosition[2],width:this.homePosition[3]-this.homePosition[1],height:this.homePosition[4]-this.homePosition[2]},o=this.width*n,c=this.height*n,h=r.width/o,v=r.height/c,g=o/c;if(e.cover?h>v:h<v){const x=g*r.height,m=(x-r.width)/2;this.target[1]=-m+r.x,this.target[2]=r.y,this.target[3]=x-m+r.x,this.target[4]=r.height+r.y}else{const x=r.width/g,m=(x-r.height)/2;this.target[1]=r.x,this.target[2]=r.y-m,this.target[3]=r.x+r.width,this.target[4]=r.y+x-m}this.constrainBounds(this.target),this.updateControllerPosition()}resize(e,n,r,o){this.updateFocalPosition(e-n,r-o);const c=n/e,h=o/r;this.target[3]=this.target[1]+(this.target[3]-this.target[1])*c,this.target[4]=this.target[2]+(this.target[4]-this.target[2])*h,this.goHome({position:this.focalPosition}),this.renderer.resize(n,o),this.pendingUpdate=!0}updateFocalPosition(e,n){if(!this.manualFocalPosition){const r=this.width,o=this.height,c=Math.min(r,o),h=0,v=0,g=this.x+h,x=this.y+v;if(r<o){const m=this.height-this.width;this.focalPosition=wt.projection({x:g,y:x+m/2,width:c-h*2,height:c-v*2}),this.pendingUpdate=!0}else{const m=this.width-this.height;this.focalPosition=wt.projection({x:g+m/2,y:x,width:c-h*2,height:c-v*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(e,{panPadding:n=0,ref:r=!1}={}){const{minX:o,maxX:c,minY:h,maxY:v}=this.getBounds({target:e,padding:n});let g=!1;const x=r?e:We(e),m=e[3]-e[1],w=e[4]-e[2];return o>e[1]&&(g=!0,x[1]=o,x[3]=o+m),h>e[2]&&(g=!0,x[2]=h,x[4]=h+w),c<e[1]&&(g=!0,x[1]=c,x[3]=c+m),v<e[2]&&(g=!0,x[2]=v,x[4]=v+w),[g,x]}getBounds(e){const n=e.target||this.target,r=e.padding,o=this.options.visibilityRatio,c=Math.abs(1-o);if(this.world.hasActiveZone()){const O=this.world.getActiveZone();if(O){const I=n[3]-n[1]<O.points[3]-O.points[1],q=n[4]-n[2]<O.points[4]-O.points[2];return{minX:I?O.points[1]-r:O.points[1]+(O.points[3]-O.points[1])/2-(n[3]-n[1])/2,maxX:q?O.points[2]-r:O.points[2]+(O.points[4]-O.points[2])/2-(n[4]-n[2])/2,minY:I?O.points[3]+r:O.points[1]+(O.points[3]-O.points[1])/2-(n[3]-n[1])/2,maxY:q?O.points[4]+r:O.points[2]+(O.points[4]-O.points[2])/2-(n[4]-n[2])/2}}}const h=n[3]-n[1],v=this.world.width,g=-h*c,x=v-h-g,m=n[4]-n[2],w=this.world.height,A=-m*c,P=w-m-A,M=Math.max(g,x),_=Math.min(g,x),L=Math.max(A,P),k=Math.min(A,P);return{minX:_,maxX:M,minY:k,maxY:L}}getScaleFactor(e=!1){const n=this.renderer.getScale(this.target[3]-this.target[1],this.target[4]-this.target[2],e);return n===0?this._lastGoodScale:(this._lastGoodScale=n,n)}getZoomedPosition(e,{origin:n,fromPos:r}){var o;const c=r?{width:r[3]-r[1],height:r[4]-r[2]}:void 0,h=c?this.renderer.getScale(c.width,c.height):this.getScaleFactor(),v=c?c.width:this.width,g=c?c.height:this.height,x=(o=this.getRendererScreenPosition())==null?void 0:o.width,m=this.world.width,w=x?x/m:1,A=this.options.maxUnderZoom,P=Math.max(w||1,this.options.maxOverZoom),M=1/e,_=h*M;if(M<1){const O=v*h,I=g*h,q=this.world.width/O,te=this.world.height/I;if(q>te){const H=this.world.width*_,re=~~(v*h)*A;H<re&&(e=this.world.width*h/(v*h*A))}else{const H=this.world.height*_,re=~~(g*h)*A;H<re&&(e=this.world.height*h/(g*h*A))}}else _>P&&(e=h/P);const k=vs(this.target,Ru(e,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(k,{ref:!0,panPadding:100}),k}clampRegion({x:e,y:n,width:r,height:o,padding:c=0}){const h=this.width,v=this.height,g=r/h<o/v,x=e-c,m=n-c,w=r+c*2,A=o+c*2;if(g){const M=A/v*h;return{x:x-(M-w)/2,y:m,width:M,height:A}}const P=w/h*v;return{x,y:m-(P-A)/2,width:w,height:P}}viewerToWorld(e,n){const r=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+e/r,this._viewerToWorld.y=this.target[2]+n/r,this._viewerToWorld}worldToViewer(e,n,r,o){const c=wt.singleBox(r,o,e,n);return Br(c,ps(Ys(this.getScaleFactor()),mi(-this.target[1],-this.target[2]))),{x:c[1],y:c[2],width:c[3]-c[1],height:c[4]-c[2],strand:c}}setScale(e,n){Br(this.target,Ru(e,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(e){const n=this.target;return this.target=e.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(e){this.world.selectZone(e),this.pendingUpdate=!0}deselectZone(){this.world.deselectZone(),this.pendingUpdate=!0}hook(e,n){const r=this.hooks[e].length;if(r!==0)for(let o=0;o<r;o++)this.hooks[e][o](n)}registerHook(e,n){return this.hooks[e].push(n),()=>{this.hooks[e]=this.hooks[e].filter(r=>r!==n)}}updateNextFrame(){this.pendingUpdate=!0}}const Uu=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Bf=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Xy}abort(e=new Error("This operation was aborted")){this.signal.reason=e,this.signal.dispatchEvent({type:"abort",target:this.signal})}},AC=typeof AbortSignal=="function",MC=typeof Bf.AbortSignal=="function",Xy=AC?AbortSignal:MC?Bf.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(n=>n(e),this))}onabort(){}addEventListener(e,n){e==="abort"&&this._listeners.push(n)}removeEventListener(e,n){e==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},gp=new Set,yp=(t,e)=>{const n=`LRU_CACHE_OPTION_${t}`;Hf(n)&&bp(n,`${t} option`,`options.${e}`,Ia)},Sp=(t,e)=>{const n=`LRU_CACHE_METHOD_${t}`;if(Hf(n)){const{prototype:r}=Ia,{get:o}=Object.getOwnPropertyDescriptor(r,t);bp(n,`${t} method`,`cache.${e}()`,o)}},OC=(t,e)=>{const n=`LRU_CACHE_PROPERTY_${t}`;if(Hf(n)){const{prototype:r}=Ia,{get:o}=Object.getOwnPropertyDescriptor(r,t);bp(n,`${t} property`,`cache.${e}`,o)}},Ky=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},Hf=t=>!gp.has(t),bp=(t,e,n,r)=>{gp.add(t);const o=`The ${e} is deprecated. Please use ${n} instead.`;Ky(o,"DeprecationWarning",t,r)},Zs=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Zy=t=>Zs(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Vf:null:null;class Vf extends Array{constructor(e){super(e),this.fill(0)}}class DC{constructor(e){if(e===0)return[];const n=Zy(e);this.heap=new n(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class Ia{constructor(e={}){const{max:n=0,ttl:r,ttlResolution:o=1,ttlAutopurge:c,updateAgeOnGet:h,updateAgeOnHas:v,allowStale:g,dispose:x,disposeAfter:m,noDisposeOnSet:w,noUpdateTTL:A,maxSize:P=0,maxEntrySize:M=0,sizeCalculation:_,fetchMethod:L,fetchContext:k,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:I,allowStaleOnFetchRejection:q,allowStaleOnFetchAbort:te,ignoreFetchAbort:H}=e,{length:J,maxAge:re,stale:$}=e instanceof Ia?{}:e;if(n!==0&&!Zs(n))throw new TypeError("max option must be a nonnegative integer");const se=n?Zy(n):Array;if(!se)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=P,this.maxEntrySize=M||this.maxSize,this.sizeCalculation=_||J,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=L||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=k,!this.fetchMethod&&k!==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 se(n),this.prev=new se(n),this.head=0,this.tail=0,this.free=new DC(n),this.initialFill=1,this.size=0,typeof x=="function"&&(this.dispose=x),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!w,this.noUpdateTTL=!!A,this.noDeleteOnFetchRejection=!!O,this.allowStaleOnFetchRejection=!!q,this.allowStaleOnFetchAbort=!!te,this.ignoreFetchAbort=!!H,this.maxEntrySize!==0){if(this.maxSize!==0&&!Zs(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Zs(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!g||!!$,this.noDeleteOnStaleGet=!!I,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!v,this.ttlResolution=Zs(o)||o===0?o:1,this.ttlAutopurge=!!c,this.ttl=r||re||0,this.ttl){if(!Zs(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){const ge="LRU_CACHE_UNBOUNDED";Hf(ge)&&(gp.add(ge),Ky("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ge,Ia))}$&&yp("stale","allowStale"),re&&yp("maxAge","ttl"),J&&yp("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Vf(this.max),this.starts=new Vf(this.max),this.setItemTTL=(r,o,c=Uu.now())=>{if(this.starts[r]=o!==0?c:0,this.ttls[r]=o,o!==0&&this.ttlAutopurge){const h=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},o+1);h.unref&&h.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Uu.now():0};let e=0;const n=()=>{const r=Uu.now();if(this.ttlResolution>0){e=r;const o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{const o=this.keyMap.get(r);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(e||n())-this.starts[r]>this.ttls[r]}updateItemAge(e){}setItemTTL(e,n,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Vf(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,n,r,o)=>{if(this.isBackgroundFetch(n))return 0;if(!Zs(r))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(r=o(n,e),!Zs(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=(e,n)=>{if(this.sizes[e]=n,this.maxSize){const r=this.maxSize-this.sizes[e];for(;this.calculatedSize>r;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,n){}requireSize(e,n,r,o){if(r||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())this.isBackgroundFetch(this.valList[e])||(yield[this.keyList[e],this.valList[e]])}*rentries(){for(const e of this.rindexes())this.isBackgroundFetch(this.valList[e])||(yield[this.keyList[e],this.valList[e]])}*keys(){for(const e of this.indexes())this.isBackgroundFetch(this.valList[e])||(yield this.keyList[e])}*rkeys(){for(const e of this.rindexes())this.isBackgroundFetch(this.valList[e])||(yield this.keyList[e])}*values(){for(const e of this.indexes())this.isBackgroundFetch(this.valList[e])||(yield this.valList[e])}*rvalues(){for(const e of this.rindexes())this.isBackgroundFetch(this.valList[e])||(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,n={}){for(const r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],n)}forEach(e,n=this){for(const r of this.indexes())e.call(n,this.valList[r],this.keyList[r],this)}rforEach(e,n=this){for(const r of this.rindexes())e.call(n,this.valList[r],this.keyList[r],this)}get prune(){return Sp("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),e=!0);return e}dump(){const e=[];for(const n of this.indexes({allowStale:!0})){const r=this.keyList[n],o=this.valList[n],c=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(c===void 0)continue;const h={value:c};if(this.ttls){h.ttl=this.ttls[n];const v=Uu.now()-this.starts[n];h.start=Math.floor(Date.now()-v)}this.sizes&&(h.size=this.sizes[n]),e.unshift([r,h])}return e}load(e){this.clear();for(const[n,r]of e){if(r.start){const o=Date.now()-r.start;r.start=Uu.now()-o}this.set(n,r.value,r)}}dispose(e,n,r){}set(e,n,{ttl:r=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,size:h=0,sizeCalculation:v=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL}={}){if(h=this.requireSize(e,n,h,v),this.maxEntrySize&&h>this.maxEntrySize)return this.delete(e),this;let x=this.size===0?void 0:this.keyMap.get(e);if(x===void 0)x=this.newIndex(),this.keyList[x]=e,this.valList[x]=n,this.keyMap.set(e,x),this.next[this.tail]=x,this.prev[x]=this.tail,this.tail=x,this.size++,this.addItemSize(x,h),g=!1;else{this.moveToTail(x);const m=this.valList[x];n!==m&&(this.isBackgroundFetch(m)?m.__abortController.abort(new Error("replaced")):c||(this.dispose(m,e,"set"),this.disposeAfter&&this.disposed.push([m,e,"set"])),this.removeItemSize(x),this.valList[x]=n,this.addItemSize(x,h))}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),g||this.setItemTTL(x,r,o),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){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const n=this.head,r=this.keyList[n],o=this.valList[n];return this.isBackgroundFetch(o)?o.__abortController.abort(new Error("evicted")):(this.dispose(o,r,"evict"),this.disposeAfter&&this.disposed.push([o,r,"evict"])),this.removeItemSize(n),e&&(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(e,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const r=this.keyMap.get(e);return r!==void 0&&!this.isStale(r)?(n&&this.updateItemAge(r),!0):!1}peek(e,{allowStale:n=this.allowStale}={}){const r=this.keyMap.get(e);if(r!==void 0&&(n||!this.isStale(r))){const o=this.valList[r];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,n,r,o){const c=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(c))return c;const h=new Bf;r.signal&&r.signal.addEventListener("abort",()=>h.abort(r.signal.reason));const v={signal:h.signal,options:r,context:o},g=(A,P=!1)=>{const{aborted:M}=h.signal,_=r.ignoreFetchAbort&&A!==void 0;return M&&!_&&!P?x(h.signal.reason):(this.valList[n]===w&&(A===void 0?w.__staleWhileFetching?this.valList[n]=w.__staleWhileFetching:this.delete(e):this.set(e,A,v.options)),A)},x=A=>{const{aborted:P}=h.signal,M=P&&r.allowStaleOnFetchAbort,_=M||r.allowStaleOnFetchRejection,L=_||r.noDeleteOnFetchRejection;if(this.valList[n]===w&&(!L||w.__staleWhileFetching===void 0?this.delete(e):M||(this.valList[n]=w.__staleWhileFetching)),_)return w.__staleWhileFetching;if(w.__returned===w)throw A},m=(A,P)=>{this.fetchMethod(e,c,v).then(M=>A(M),P),h.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(A(),r.allowStaleOnFetchAbort&&(A=M=>g(M,!0)))})},w=new Promise(m).then(g,x);return w.__abortController=h,w.__staleWhileFetching=c,w.__returned=null,n===void 0?(this.set(e,w,v.options),n=this.keyMap.get(e)):this.valList[n]=w,w}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:v=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:x=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:A=this.ignoreFetchAbort,allowStaleOnFetchAbort:P=this.allowStaleOnFetchAbort,fetchContext:M=this.fetchContext,forceRefresh:_=!1,signal:L}={}){if(!this.fetchMethod)return this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:o});const k={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:o,ttl:c,noDisposeOnSet:h,size:v,sizeCalculation:g,noUpdateTTL:x,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:P,ignoreFetchAbort:A,signal:L};let O=this.keyMap.get(e);if(O===void 0){const I=this.backgroundFetch(e,O,k,M);return I.__returned=I}else{const I=this.valList[O];if(this.isBackgroundFetch(I))return n&&I.__staleWhileFetching!==void 0?I.__staleWhileFetching:I.__returned=I;if(!_&&!this.isStale(O))return this.moveToTail(O),r&&this.updateItemAge(O),I;const q=this.backgroundFetch(e,O,k,M);return n&&q.__staleWhileFetching!==void 0?q.__staleWhileFetching:q.__returned=q}}get(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet}={}){const c=this.keyMap.get(e);if(c!==void 0){const h=this.valList[c],v=this.isBackgroundFetch(h);return this.isStale(c)?v?n?h.__staleWhileFetching:void 0:(o||this.delete(e),n?h:void 0):v?void 0:(this.moveToTail(c),r&&this.updateItemAge(c),h)}}connect(e,n){this.prev[n]=e,this.next[e]=n}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Sp("del","delete"),this.delete}delete(e){let n=!1;if(this.size!==0){const r=this.keyMap.get(e);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);const o=this.valList[r];this.isBackgroundFetch(o)?o.__abortController.abort(new Error("deleted")):(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),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(const e of this.rindexes({allowStale:!0})){const n=this.valList[e];if(this.isBackgroundFetch(n))n.__abortController.abort(new Error("deleted"));else{const r=this.keyList[e];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 Sp("reset","clear"),this.clear}get length(){return OC("length","size"),this.size}static get AbortController(){return Bf}static get AbortSignal(){return Xy}}var LC=Ia;const Wf=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,$f={},PC=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"];class Jy extends Hr{constructor(){super(),this.type="spacial-content",this.isShape=!0,this.hoverEvents=!1,this.activeEvents=!1,this.display={x:0,y:0,scale:1,width:-1,height:-1,points:We(5)},this.boundingBox=null,this._parsed={border:{id:null,match:[]},outline:{id:null,match:[]}},this.props={},this.shape={type:"none"},this.addHover=()=>{this.hovering=!0,this.__revision++},this.removeHover=()=>{this.hovering=!1,this.pressing=!1,this.__revision++},this.addPress=()=>{this.pressing=!0,this.__revision++},this.removePress=()=>{this.pressing=!1,this.__revision++},this.id=mf(12),this.points=We(5),this.shape={type:"none"}}updateBoundingBox(){if(this.shape.type==="none")return;const e=this.shape.points;if(this.shape.points.length>2){const n=Math.min(...e.map(h=>h[0])),r=Math.min(...e.map(h=>h[1])),o=Math.max(0,...e.map(h=>h[0])),c=Math.max(0,...e.map(h=>h[1]));this.boundingBox={x:n,y:r,width:o-n,height:c-r};return}this.boundingBox=null}intersects(e){if(!e||this.shape.type==="none")return!1;const[n,r]=e,o=this.shape.points;let c=this.boundingBox;if(c||(this.updateBoundingBox(),c=this.boundingBox),!c||n<c.x||n>c.x+c.width||r<c.y||r>c.height+c.y)return!1;let h=!1;for(let v=0,g=o.length-1;v<o.length;g=v++)o[v][1]>r!=o[g][1]>r&&n<(o[g][0]-o[v][0])*(r-o[v][1])/(o[g][1]-o[v][1])+o[v][0]&&(h=!h);return h}getAllPointsAt(e,n){return e[3]-e[1]===1&&e[4]-e[2]===1?this.intersects([e[1],e[2]])?[[this,this.points,n]]:[]:[[this,this.points,n]]}applyProps(e={}){let n=!1;if(e.points)if(this.shape.type!=="polygon"||this.shape.points.length!==e.points.length)this.shape={type:"polygon",points:e.points,open:e.open},this.updateBoundingBox();else{let r=!1;const o=e.points.length;for(let c=0;c<o;c++)if(e.points[c][0]!==this.shape.points[c][0]||e.points[c][1]!==this.shape.points[c][1]){r=!0;break}r&&(this.shape={type:"polygon",points:e.points,open:e.open},this.updateBoundingBox())}if(e.interactive!==this.props.interactive&&(n=!0,this.props.interactive=e.interactive),(e.open||e.open===!1)&&(n=!0,this.shape.open=e.open),e.style){const r=e.border||e.style.border;if(r!==this._parsed.border.id)if(!r)this._parsed.border.id=null,this._parsed.border.match=[];else{const o=$f[r]||Wf.exec(r)||Wf.exec(r);o&&(this._parsed.border.id=r,this._parsed.border.match=$f[r]=o)}if(this._parsed.border.id&&(e.style.borderWidth=this._parsed.border.match[1],e.style.borderStyle="solid",e.style.borderColor=this._parsed.border.match[4]),e.style.outline!==this._parsed.outline.id)if(!e.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{const o=$f[e.style.outline]||Wf.exec(e.style.outline)||Wf.exec(e.style.outline);o&&(this._parsed.outline.id=e.style.outline,this._parsed.outline.match=$f[e.style.outline]=o)}this._parsed.outline.id&&(e.style.outlineWidth=this._parsed.outline.match[1],e.style.outlineStyle="solid",e.style.outlineColor=this._parsed.outline.match[4]),this.props.style=e.style,e.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.backgroundColor,n=!0),e.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.style.background,n=!0);for(const o of PC)if(this.props.style[o]!==e.style[o]){n=!0;break}e.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=e.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n=!0),e.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=e.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0)}e.href!==this.props.href&&(this.props.href=e.href,n=!0),e.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=e.hrefTarget,n=!0),e.title!==this.props.title&&(this.props.title=e.title,n=!0),e.className!==this.props.className&&(this.props.className=e.className,e.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),e.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0),e.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=e.relativeSize,n=!0),e.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=e.relativeStyle,n=!0),e.html!==this.props.html&&(this.props.html=e.html,n=!0),e.target&&(e.target.width!==this.display.width||e.target.height!==this.display.height||e.target.x!==this.points[1]||e.target.y!==this.points[2])&&(n=!0,this.points=wt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.points=wt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.width=e.target.width,this.display.height=e.target.height),n&&this.__revision++}}const e0=/(-?[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,t0={},qf={};class kC{constructor(e,n){this.imagesPending=0,this.imagesLoaded=0,this.frameIsRendering=!1,this.pendingDrawCall=!1,this.firstMeaningfulPaint=!1,this.parallelTasks=8,this.frameTasks=0,this.loadingQueueOrdered=!0,this.loadingQueue=[],this.currentTask=Promise.resolve(),this.tasksRunning=0,this.averageJobTime=1e3,this.lastKnownScale=1,this.visible=[],this.previousVisible=[],this.drawCalls=[],this.invalidated=[],this._worker=()=>{if(this.loadingQueue.length){const r=this.loadingQueue.pop();r&&(this.tasksRunning++,this.frameTasks++,this.currentTask=r.task().then(()=>{this.tasksRunning--}).catch(()=>{this.tasksRunning--}))}},this._scheduled=0,this._doWork=()=>{this.loadingQueue.length===0&&this.tasksRunning===0&&this._scheduled&&(clearInterval(this._scheduled),this._scheduled=0),this._worker()},this.canvas=e,this.rendererPosition=e.getBoundingClientRect(),this.ctx=e.getContext("2d",{alpha:!0}),this.ctx.imageSmoothingEnabled=!0,this.options=n||{},this.canvas.style.opacity="0",this.canvas.style.transition="opacity .3s",this.dpi=(n==null?void 0:n.dpi)||1,this.hostCache=n!=null&&n.lruCache?new LC({maxSize:1024*512*512,dispose:(r,o,c)=>{this.invalidated.push(o),r.width=0,r.height=0},sizeCalculation:(r,o)=>r.width*r.height}):{store:{},get(r){return this.store[r]},set(r,o){this.store[r]=o}}}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(e){if(this.clearTransform(),this.lastPaintedObject=void 0,this.frameIsRendering=!1,this.imagesPending=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++){const 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(e,n,r){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const o=this.getCanvasDims(),c=o.width/e,h=o.height/n,v=(c<h?h:c)*(r&&this.dpi||1);return Number.isNaN(v)||(this.lastKnownScale=v),this.lastKnownScale}beforeFrame(e,n,r){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(n);const o=this.getCanvasDims();this.ctx.globalAlpha=1,this.ctx.fillStyle=this.options.background||"rgb(0, 0, 0)",this.ctx.fillRect(0,0,o.width,o.height)}applyTransform(e,n,r,o,c){const h=e.__owner.value;if(h&&h.rotation){this.ctx.save();const v=n+o/2,g=r+c/2;this.ctx.translate(v,g),this.ctx.rotate(h.rotation*Math.PI/180),this.ctx.translate(-v,-g),this.lastPaintedObject=h}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(e,n,r,o,c,h){const v=this.ctx.globalAlpha;if(e instanceof xr||e instanceof ja){if(e.display.rotation){this.ctx.save();let m=r+c/2,w=o+h/2;e.crop&&(m-=e.crop[n*5+1],w-=e.crop[n*5+2]),this.ctx.translate(m,w),this.ctx.rotate(e.display.rotation*Math.PI/180),this.ctx.translate(-m,-w)}if(this.visible.push(e),typeof e.style&&e.style.opacity!=="undefined"){if(!e.style.opacity)return;this.ctx.globalAlpha=e.style.opacity}try{const m=e.__host.canvas,w=this.getCanvasDims();if((m.indices.indexOf(n)===-1||this.invalidated.indexOf(m.canvases[n])!==-1)&&this.schedulePaintToCanvas(m,e,n,gf({x:r+c/2,y:o+c/2},{x:w.width/2,y:w.height/2})),!this.firstMeaningfulPaint)return;const A=this.hostCache.get(m.canvases[n]);if(A)if(e.crop&&e.cropData){if(e.crop[n*5]){const P=[e.crop[n*5+1]/e.display.scale-e.display.points[n*5+1],e.crop[n*5+2]/e.display.scale-e.display.points[n*5+2],1+(e.crop[n*5+3]-e.crop[n*5+1])/e.display.scale,1+(e.crop[n*5+4]-e.crop[n*5+2])/e.display.scale];P[0]+=e.cropData.x/e.display.scale,P[1]+=e.cropData.y/e.display.scale;const M=e.x*this.lastKnownScale,_=e.y*this.lastKnownScale,L=[r+M,o+_,c,h];L[0]+=M,L[1]+=_,this.ctx.drawImage(A,P[0],P[1],P[2],P[3],L[0],L[1],L[2]+1,L[3]+1)}}else this.ctx.drawImage(A,0,0,e.display.points[n*5+3]-e.display.points[n*5+1],e.display.points[n*5+4]-e.display.points[n*5+2],r,o,c+Number.MIN_VALUE,h+Number.MIN_VALUE)}catch{}e.display.rotation&&this.ctx.restore()}const g=e instanceof zu&&this.options.box,x=e instanceof Jy&&this.options.polygon;if((g||x)&&!e.props.className&&!e.props.html&&!e.props.href){if(e.props.style){const m=Object.assign({},e.props.style||{},e.hovering?e.props.hoverStyles:{},e.pressing?e.props.pressStyles:{}),w=e.props.relativeStyle?1:c/e.width;typeof m.opacity<"u"&&(this.ctx.globalAlpha=m.opacity);let A=0;typeof m.borderWidth<"u"&&(A=parseInt(m.borderWidth,10)*w);let P=0;typeof m.outlineWidth<"u"&&(P=parseInt(m.outlineWidth,10)*w);let M=0;if(typeof m.outlineOffset<"u"&&(M=parseInt(m.outlineOffset,10)*w),m.borderColor&&(this.ctx.strokeStyle=m.borderColor),m.boxShadow){const _=m.boxShadow.split(/,(?![^(]*\))/);for(const L of _){const k=t0[L]||e0.exec(L)||e0.exec(L);t0[L]=k,k&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(k[1])*this.dpi*w,this.ctx.shadowOffsetY=parseInt(k[3])*this.dpi*w,this.ctx.shadowBlur=parseInt(k[5])*this.dpi*w,this.ctx.shadowColor=k[9],this.ctx.fillStyle="rgba(0,0,0,1)",this.ctx.fillRect(r+A,o+A,c,h),this.ctx.restore())}}if(this.ctx.fillStyle=m.backgroundColor||"transparent",this.ctx.lineWidth=A,x){const _=e.shape,L=_.points||[],k=L.length;this.ctx.beginPath();for(let O=0;O<k;O++)this.ctx.lineTo(r+L[O][0]*this.lastKnownScale,o+L[O][1]*this.lastKnownScale);_.open||this.ctx.closePath(),A&&this.ctx.stroke(),_.open||this.ctx.fill()}else A&&this.ctx.strokeRect(r+A/2,o+A/2,c+A,h+A),this.ctx.fillRect(r+A,o+A,c,h);P&&(m.outlineColor&&(this.ctx.strokeStyle=m.outlineColor),this.ctx.lineWidth=P,this.ctx.strokeRect(r-P/2-M,o-P/2-M,c+A*2+P+M*2,h+A*2+P+M*2))}this.ctx.globalAlpha=v}}loadImage(e,n,r,o=!1){if(qf[e]&&qf[e].naturalWidth>0){n(qf[e]);return}try{let c=!1;o||setTimeout(()=>{c||this.loadImage(e,n,r,!0)},3e3);const h=document.createElement("img");h.decoding="auto",h.onload=function(){c=!0,n(h),qf[e]=h,h.onload=null},this.options.crossOrigin&&(h.crossOrigin="anonymous"),h.src=e,h.complete&&h.onload({}),h.width}catch(c){console.log("image error",c),r(c)}}schedulePaintToCanvas(e,n,r,o){this.imagesPending++,e.indices.push(r);const c=`${n.id}--${n.display.scale}-${r}`,h=this.invalidated.indexOf(c);h!==-1&&this.invalidated.splice(h,1),e.canvases[r]=c,n.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:c,scale:n.display.scale,network:!0,distance:o,task:()=>new Promise(v=>{if(this.visible.indexOf(n)===-1){this.imagesPending--,e.indices.splice(e.indices.indexOf(r),1),v();return}const g=n.getImageUrl(r);this.loadImage(g,x=>{this.loadingQueue.push({id:c,scale:n.display.scale,distance:o,task:()=>new Promise(m=>{this.imagesLoaded++,e.loaded.push(r),e.loaded.length===e.indices.length&&(e.loading=!1);const w=n.display.points.slice(r*5,r*5+5),A=document.createElement("canvas"),P=A.getContext("2d");A.width=w[3]-w[1],A.height=w[4]-w[2],this.hostCache.set(e.canvases[r],A),this.drawCalls.push(()=>{P.drawImage(x,0,0,w[3]-w[1],w[4]-w[2]),m()})})}),v()},x=>{this.imagesPending--,e.indices.splice(e.indices.indexOf(r),1),v()})})})}afterPaintLayer(e,n){}prepareLayer(e,n){e.__owner.value&&(e.cropData?(this.lastKnownScale*(1/e.display.scale),this.applyTransform(e,n[1],n[2],n[3]-n[1],n[4]-n[2])):this.applyTransform(e,n[1],n[2],n[3]-n[1],n[4]-n[2])),(!e.__host||!e.__host.canvas)&&(e instanceof xr||e instanceof ja)&&this.createImageHost(e)}finishLayer(){this.lastPaintedObject&&this.clearTransform()}createImageHost(e){e.__host=e.__host?e.__host:{},e.__host.canvas={canvas:void 0,canvases:[],indices:[],loaded:[],loading:!1}}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getViewportBounds(e,n,r){const o=e.getActiveZone();if(o){const c=n[3]-n[1]<o.points[3]-o.points[1],h=n[4]-n[2]<o.points[4]-o.points[2];return{x1:c?o.points[1]-r:o.points[1]+(o.points[3]-o.points[1])/2-(n[3]-n[1])/2,y1:h?o.points[2]-r:o.points[2]+(o.points[4]-o.points[2])/2-(n[4]-n[2])/2,x2:c?o.points[3]+r:o.points[1]+(o.points[3]-o.points[1])/2-(n[3]-n[1])/2,y2:h?o.points[4]+r:o.points[2]+(o.points[4]-o.points[2])/2-(n[4]-n[2])/2}}return null}pendingUpdate(){const e=!this.pendingDrawCall&&this.drawCalls.length===0&&this.imagesPending===0&&this.loadingQueue.length===0&&this.tasksRunning===0;return!this.firstMeaningfulPaint&&e?(this.canvas.style.opacity="1",this.firstMeaningfulPaint=e,!0):this.options.debug?!0:!e}getRendererScreenPosition(){return this.rendererPosition}reset(){this.loadingQueue=[],this.drawCalls=[]}}class n0{constructor(e){this.renderers=[];for(const n of e)n&&this.renderers.push(n);this.length=this.renderers.length}afterFrame(e,n,r){for(let o=0;o<this.length;o++)this.renderers[o].afterFrame(e,n,r)}afterPaintLayer(e,n){for(let r=0;r<this.length;r++)this.renderers[r].afterPaintLayer(e,n)}beforeFrame(e,n,r){for(let o=0;o<this.length;o++)this.renderers[o].beforeFrame(e,n,r)}triggerResize(){for(let e=0;e<this.length;e++){const n=this.renderers[e];n.triggerResize&&n.triggerResize()}}getPointsAt(e,n,r,o){return this.renderers[0].getPointsAt(e,n,r,o)}getScale(e,n){return this.renderers[0].getScale(e,n)}getViewportBounds(e,n,r){return this.renderers[0].getViewportBounds(e,n,r)}getRendererScreenPosition(){return this.renderers[0].getRendererScreenPosition()}isReady(){for(let e=0;e<this.length;e++)if(!this.renderers[e].isReady())return!1;return!0}paint(e,n,r,o,c,h){for(let v=0;v<this.length;v++)this.renderers[v].paint(e,n,r,o,c,h)}pendingUpdate(){for(let e=0;e<this.length;e++)if(this.renderers[e].pendingUpdate())return!0;return!1}prepareLayer(e,n){for(let r=0;r<this.length;r++)this.renderers[r].prepareLayer(e,n)}finishLayer(e,n){for(let r=0;r<this.length;r++)this.renderers[r].finishLayer(e,n)}resize(e,n){for(let r=0;r<this.length;r++)this.renderers[r].resize(e,n)}reset(){for(let e=0;e<this.length;e++)this.renderers[e].reset()}}class zC{constructor(e){this.heightRatio=1,this.widthRatio=1,this.target=new Float32Array(5),this.delta=0,this.renderNextFrame=!0,this.canvas=e,this.initialWidth=e.width,this.initialHeight=e.height,this.context=e.getContext("2d"),this.context.globalAlpha=.5,this.aggregate=Ys(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(e,n,r){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);const o=this.initialWidth/e.width,c=this.initialHeight/e.height,h=this.widthRatio>this.heightRatio?o:c;if(this.target=r,this.bounds){const v=e.getPointsAt(this.bounds,this.aggregate,h);for(const[g,x]of v)if(g instanceof xr&&g.__host.canvas){const m=x.length/5;for(let w=0;w<m;w++)g.__host.canvas.canvases[w]&&(x[w+1]*h,x[w+2]*h,(x[w+3]-x[w+1])*h,(x[w+4]-x[w+2])*h)}}e.getPoints().forEach((v,g,x)=>{if(g%5===0&&v){const m={x1:x[g+1]*h,y1:x[g+2]*h,x2:x[g+3]*h,y2:x[g+4]*h,width:(x[g+3]-x[g+1])*h,height:(x[g+4]-x[g+2])*h};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]*h,r[2]*h,(r[3]-r[1])*h,(r[4]-r[2])*h))}}getActiveZone(e){return null}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getScale(e,n){return 1}beforeFrame(e,n){this.bounds=wt.singleBox(e.width,e.height)}drawImage(){}afterPaintLayer(e,n){}paint(e,n,r,o,c,h){this.renderNextFrame=!0}prepareLayer(e){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(e,n,r){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}}var i0=!1,Fa,xp,Ep,Yf,Qf,r0,Gf,wp,Tp,Cp,s0,Rp,Ap,a0,o0;function Pi(){if(!i0){i0=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(Rp=/\b(iPhone|iP[ao]d)/.exec(t),Ap=/\b(iP[ao]d)/.exec(t),Cp=/Android/i.exec(t),a0=/FBAN\/\w+;/i.exec(t),o0=/Mobile/i.exec(t),s0=!!/Win64/.exec(t),e){Fa=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Fa&&document&&document.documentMode&&(Fa=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);r0=r?parseFloat(r[1])+4:Fa,xp=e[2]?parseFloat(e[2]):NaN,Ep=e[3]?parseFloat(e[3]):NaN,Yf=e[4]?parseFloat(e[4]):NaN,Yf?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),Qf=e&&e[1]?parseFloat(e[1]):NaN):Qf=NaN}else Fa=xp=Ep=Qf=Yf=NaN;if(n){if(n[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Gf=o?parseFloat(o[1].replace("_",".")):!0}else Gf=!1;wp=!!n[2],Tp=!!n[3]}else Gf=wp=Tp=!1}}var Mp={ie:function(){return Pi()||Fa},ieCompatibilityMode:function(){return Pi()||r0>Fa},ie64:function(){return Mp.ie()&&s0},firefox:function(){return Pi()||xp},opera:function(){return Pi()||Ep},webkit:function(){return Pi()||Yf},safari:function(){return Mp.webkit()},chrome:function(){return Pi()||Qf},windows:function(){return Pi()||wp},osx:function(){return Pi()||Gf},linux:function(){return Pi()||Tp},iphone:function(){return Pi()||Rp},mobile:function(){return Pi()||Rp||Ap||Cp||o0},nativeApp:function(){return Pi()||a0},android:function(){return Pi()||Cp},ipad:function(){return Pi()||Ap}},NC=Mp,Xf=!!(typeof window<"u"&&window.document&&window.document.createElement),_C={canUseDOM:Xf,canUseWorkers:typeof Worker<"u",canUseEventListeners:Xf&&!!(window.addEventListener||window.attachEvent),canUseViewport:Xf&&!!window.screen,isInWorker:!Xf},UC=_C,l0=UC,u0;l0.canUseDOM&&(u0=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
213
+ `)+a.join(" > ")}return null},r.getPublicRootInstance=function(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return it(a.child.stateNode);default:return a.child.stateNode}},r.injectIntoDevTools=function(a){if(a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:g.ReactCurrentDispatcher,findHostInstanceByFiber:as,findFiberByHostInstance:a.findFiberByHostInstance||os,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!l.isDisabled&&l.supportsFiber)try{tc=l.inject(a),_i=l}catch{}a=!0}return a},r.observeVisibleRects=function(a,l,f,y){if(!Ve)throw Error(v(363));a=Ac(a,l);var b=tt(a,f,y).disconnect;return{disconnect:function(){b()}}},r.registerMutableSourceForHydration=function(a,l){var f=l._getVersion;f=f(l._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[l,f]:a.mutableSourceEagerHydrationData.push(l,f)},r.runWithPriority=function(a,l){var f=bl;try{return bl=a,l()}finally{bl=f}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(a,l){var f=Ge;Ge&=-2,Ge|=8;try{return a(l)}finally{Ge=f,Ge===0&&(tn(),Ui())}},r.updateContainer=function(a,l,f,y){var b=l.current,T=vi(),N=Cn(b);e:if(f){f=f._reactInternals;t:{if(Se(f)!==f||f.tag!==1)throw Error(v(170));var F=f;do{switch(F.tag){case 3:F=F.stateNode.context;break t;case 1:if(en(F.type)){F=F.stateNode.__reactInternalMemoizedMergedChildContext;break t}}F=F.return}while(F!==null);throw Error(v(171))}if(f.tag===1){var te=f.type;if(en(te)){f=bd(f,te,F);break e}}f=F}else f=ur;return l.context===null?l.context=f:l.pendingContext=f,l=dr(T,N),l.payload={element:a},y=y===void 0?null:y,y!==null&&(l.callback=y),hr(b,l),Nr(b,N,T),N},r}}(pf)),pf.exports}process.env.NODE_ENV==="production"?Xh.exports=Xx():Xh.exports=Gx();var Kx=Xh.exports;const Zx=Bx(Kx),vf=["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 Jx(){return vf.reduce((t,e)=>(t[e]=[],t),{})}const tl=vf.reduce((t,e)=>(t[e.slice(2).toLowerCase()]=e,t[e]=e,t),{}),Cu=(t,e,n)=>{const r=t.length,o=n||$e(r);for(let c=0;c<r;c++)o[c]=c%5===0?t[c+1]<e[3]&&t[c+3]>e[1]&&t[c+2]<e[4]&&t[c+4]>e[2]?1:0:t[c];return o};function $e(t,e,n){return new Float32Array(t,e,n)}const eE=(t,e,n)=>{const r=t[1]<=e[3]&&t[3]>=e[1]&&t[2]<=e[4]&&t[4]>=e[2],o=n||$e(5);return r?(o[0]=1,o[1]=Math.max(t[1],e[1]),o[2]=Math.max(t[2],e[2]),o[3]=Math.min(t[3],e[3]),o[4]=Math.min(t[4],e[4]),o):(o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o)},tE=t=>t.length/5,ps=(t,e,n)=>{const r=n||$e(9);return r[0]=t[0]*e[0]+t[1]*e[3]+t[2]*e[6],r[1]=t[0]*e[1]+t[1]*e[4]+t[2]*e[7],r[2]=t[0]*e[2]+t[1]*e[5]+t[2]*e[8],r[3]=t[3]*e[0]+t[4]*e[3]+t[5]*e[6],r[4]=t[3]*e[1]+t[4]*e[4]+t[5]*e[7],r[5]=t[3]*e[2]+t[4]*e[5]+t[5]*e[8],r[6]=t[6]*e[0]+t[7]*e[3]+t[8]*e[6],r[7]=t[6]*e[1]+t[7]*e[4]+t[8]*e[7],r[8]=t[6]*e[2]+t[7]*e[5]+t[8]*e[8],r};class Et{constructor(e){this.index=0,this.length=e,this.points=$e(this.length)}static grid(e=1,n=1){return new Et(5*e*n)}static point(e,n){const r=$e(5);return r[0]=1,r[1]=e,r[2]=n,r[3]=e,r[4]=n,r}static positionPair(e){const n=$e(5);return n[0]=1,n[1]=e.x1,n[2]=e.y1,n[3]=e.x2,n[4]=e.y2,n}static projection(e){return Et.singleBox(e.width,e.height,e.x,e.y)}static singleBox(e,n,r=0,o=0){const c=$e(5);return c[0]=1,c[1]=r,c[2]=o,c[3]=e+r,c[4]=n+o,c}row(e){return e(this)}addPoints(e,n,r,o){return this.points[this.index]=1,this.points[1+this.index]=e,this.points[2+this.index]=n,this.points[3+this.index]=r,this.points[4+this.index]=o,this.index+=5,this}addBox(e,n,r,o){return this.addPoints(e,n,e+r,n+o),this}build(){return this.points}}const Br=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)t[r]=r%5===0?e[6]*t[r+1]+e[7]*t[r+2]+e[8]*t[r]:r%5%2===1?e[0]*t[r]+e[1]*t[r+1]+e[2]:e[3]*t[r-1]+e[4]*t[r]+e[5];return t},Ys=t=>{const e=$e(9);return e[0]=t,e[4]=t,e[8]=1,e},gi=(t,e)=>{const n=$e(9);return n[0]=1,n[2]=t,n[4]=1,n[5]=e,n[8]=1,n},Ru=(t,e,n)=>ps(gi((1-t)*e,(1-t)*n),Ys(t)),vs=(t,e,n)=>{const r=t.length,o=n&&n.length>=r?n.slice(0,r):$e(r);for(let c=0;c<r;c++)o[c]=c%5===0?e[6]*t[c+1]+e[7]*t[c+2]+e[8]*t[c]:c%5%2===1?e[0]*t[c]+e[1]*t[c+1]+e[2]:e[3]*t[c-1]+e[4]*t[c]+e[5];return o};let mf=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");class Hr{constructor(){this.__revision=0,this.__owner={value:void 0},this.__state={},this.scale=1,this.layers=[],this.time=[],this.addEventListener=(e,n,r)=>{const o=tl[e];if(!this.eventHandlers[o])throw new Error(`Unknown event ${o}`);this.eventHandlers[o].indexOf(n)===-1&&this.eventHandlers[o].push(n)},this.removeEventListener=(e,n)=>{const r=tl[e];if(!this.eventHandlers[r]){console.warn(`Unknown event ${r}`);return}this.eventHandlers[r].indexOf(n)!==-1&&(this.eventHandlers[r]=this.eventHandlers[r].filter(o=>o!==n))},this.id=this.__id=mf(),this.eventHandlers=Jx()}get crop(){return this._crop}set crop(e){this._crop=e}getObjectsAt(e){return[]}getAllPointsAt(e,n,r){return[]}getScheduledUpdates(e,n){return[]}dispatchEvent(e,n){const r=this.eventHandlers[e],o=r?r.length:0;let c=!1;if(o)for(let h=0;h<o;h++)try{r[h](n),c=!0}catch(v){console.error(e,v)}return c}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(e,n){Br(this.points,gi(e,n))}atScale(e){Br(this.points,Ru(e,this.x,this.y)),this.scale*=e}transform(e){Br(this.points,e)}applyProps(e){this.__revision++}appendChild(e){}removeChild(e){}insertBefore(e,n){}hideInstance(){}}class xr extends Hr{constructor(e){if(super(),this.type="spacial-content",this.style={opacity:1},!e)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:$e(5)},this.points=$e(5);else{const n=e.scale||1;this.id=e.id||e.uri,this.uri=e.uri,this.points=Et.singleBox(e.width,e.height,e.x,e.y),this.display={x:0,y:0,scale:n,width:e.width/n,height:e.height/n,points:Et.singleBox(e.width/n,e.height/n),rotation:e==null?void 0:e.rotation}}}applyProps(e){const n=e.display?e.display.width:e.target.width,r=e.target.width/n;if(this.id=e.id||e.uri,this.uri=e.uri,this.points.set(Et.singleBox(e.target.width,e.target.height,e.target.x,e.target.y)),e.style&&typeof e.style.opacity<"u"&&(this.style.opacity=e.style.opacity),e.crop){this.cropData=e.crop;const o=Et.singleBox(e.crop.width,e.crop.height,e.crop.x,e.crop.y);Br(o,gi(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(o):this.crop=$e(o)}e.display?(this.display.scale=r,this.display.width=e.display.width,this.display.height=e.display.height,this.display.rotation=e.display.rotation,this.display.points=Et.singleBox(e.display.width,e.display.height)):(this.display.scale=r,this.display.width=e.target.width/r,this.display.height=e.target.height/r,this.display.points=Et.singleBox(e.target.width/r,e.target.height/r))}getAllPointsAt(e,n,r){return[[this,this.crop||this.points,n]]}static fromSvg(e,n,r,o){return xr.fromImage("data:image/svg+xml;base64,"+btoa(e),n,r,o)}static fromImage(e,n,r,o){const c=new xr;return c.applyProps({uri:e,id:o,display:r,target:n}),c}getImageUrl(){return this.uri}}class tp extends Hr{constructor(e){if(super(),this.type="spacial-content",this.getTexture=()=>({source:void 0,hash:-1}),!e)this.id="",this.uri="",this.display={x:0,y:0,scale:1,width:0,height:0,points:$e(5)},this.points=$e(5);else{const n=e.scale||1;this.id=e.id||e.uri,this.uri=e.uri,this.points=Et.singleBox(e.width,e.height),this.display={x:0,y:0,scale:n,width:e.width/n,height:e.height/n,points:n!==1?Et.singleBox(e.width/n,e.height/n):this.points}}}applyProps(e){const n=e.display?e.display.width:e.target.width,r=e.target.width/n;this.id=e.id,this.points.set(Et.singleBox(e.target.width,e.target.height)),this.display.scale=r,this.display.width=e.target.width/r,this.display.height=e.target.height/r,this.getTexture=e.getTexture,this.display.points=r!==1?Et.singleBox(e.target.width/r,e.target.height/r):this.points}getAllPointsAt(e,n,r){return[[this,this.points,n]]}}function nE(t,e,n=1){const r=e.length;if(r===0)throw new Error("No resources passed in.");let o=0;for(let c=0;c<r&&!(!e[c]||!e[c].display);c++)o=Math.abs(e[c].display.scale-t)*n<Math.abs(e[o].display.scale-t)?c:o;return o}function Og(t,e){return Math.abs(t-e)}function gf(t,e){const n=Og(t.x,e.x),r=Og(t.y,e.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}function iE(t){const e=t.length;return t.indexOf("/info.json")===e-10?t.slice(0,-10):t}function Dg(...t){return e=>t.forEach(n=>function(r,o){typeof r=="function"?r(o):r!=null&&(r.current=o)}(n,e))}function yf(...t){return ae.useCallback(Dg(...t),t)}function li(){return li=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},li.apply(this,arguments)}const Lg=ae.forwardRef((t,e)=>{const{children:n,...r}=t;return ae.Children.toArray(n).some(kg)?ae.createElement(ae.Fragment,null,ae.Children.map(n,o=>kg(o)?ae.createElement(np,li({},r,{ref:e}),o.props.children):o)):ae.createElement(np,li({},r,{ref:e}),n)});Lg.displayName="Slot";const np=ae.forwardRef((t,e)=>{const{children:n,...r}=t;return ae.isValidElement(n)?ae.cloneElement(n,{...rE(r,n.props),ref:Dg(e,n.ref)}):ae.Children.count(n)>1?ae.Children.only(null):null});np.displayName="SlotClone";const Pg=({children:t})=>ae.createElement(ae.Fragment,null,t);function kg(t){return ae.isValidElement(t)&&t.type===Pg}function rE(t,e){const n={...e};for(const r in e){const o=t[r],c=e[r];/^on[A-Z]/.test(r)?n[r]=(...h)=>{c==null||c(...h),o==null||o(...h)}:r==="style"?n[r]={...o,...c}:r==="className"&&(n[r]=[o,c].filter(Boolean).join(" "))}return{...t,...n}}const Sf=globalThis!=null&&globalThis.document?ae.useLayoutEffect:()=>{};var bf=function(e,n,r,o){this.name=e,this.fn=n,this.args=r,this.modifiers=o};bf.prototype._test=function(e){var n=this.fn;try{nl(this.modifiers.slice(),n,this)(e)}catch{n=function(){return!1}}try{return nl(this.modifiers.slice(),n,this)(e)}catch{return!1}},bf.prototype._check=function(e){try{nl(this.modifiers.slice(),this.fn,this)(e)}catch{if(nl(this.modifiers.slice(),function(r){return r},this)(!1))return}if(!nl(this.modifiers.slice(),this.fn,this)(e))throw null},bf.prototype._testAsync=function(e){var n=this;return new Promise(function(r,o){Ng(n.modifiers.slice(),n.fn,n)(e).then(function(c){c?r(e):o(null)}).catch(function(c){return o(c)})})};function zg(t,e){return e===void 0&&(e="simple"),typeof t=="object"?t[e]:t}function nl(t,e,n){if(t.length){var r=t.shift(),o=nl(t,e,n);return r.perform(o,n)}else return zg(e)}function Ng(t,e,n){if(t.length){var r=t.shift(),o=Ng(t,e,n);return r.performAsync(o,n)}else return function(c){return Promise.resolve(zg(e,"async")(c))}}var sE=function(e,n,r){this.name=e,this.perform=n,this.performAsync=r},ip=function(t){function e(n,r,o,c){for(var h=[],v=arguments.length-4;v-- >0;)h[v]=arguments[v+4];t.call(this,h),t.captureStackTrace&&t.captureStackTrace(this,e),this.rule=n,this.value=r,this.cause=o,this.target=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Wr=function(e,n){e===void 0&&(e=[]),n===void 0&&(n=[]),this.chain=e,this.nextRuleModifiers=n};Wr.prototype._applyRule=function(e,n){var r=this;return function(){for(var o=[],c=arguments.length;c--;)o[c]=arguments[c];return r.chain.push(new bf(n,e.apply(r,o),o,r.nextRuleModifiers)),r.nextRuleModifiers=[],r}},Wr.prototype._applyModifier=function(e,n){return this.nextRuleModifiers.push(new sE(n,e.simple,e.async)),this},Wr.prototype._clone=function(){return new Wr(this.chain.slice(),this.nextRuleModifiers.slice())},Wr.prototype.test=function(e){return this.chain.every(function(n){return n._test(e)})},Wr.prototype.testAll=function(e){var n=[];return this.chain.forEach(function(r){try{r._check(e)}catch(o){n.push(new ip(r,e,o))}}),n},Wr.prototype.check=function(e){this.chain.forEach(function(n){try{n._check(e)}catch(r){throw new ip(n,e,r)}})},Wr.prototype.testAsync=function(e){var n=this;return new Promise(function(r,o){_g(e,n.chain.slice(),r,o)})};function _g(t,e,n,r){if(e.length){var o=e.shift();o._testAsync(t).then(function(){_g(t,e,n,r)},function(c){r(new ip(o,t,c))})}else n(t)}var Ug=function(t,e){return e&&typeof t=="string"&&t.trim().length===0?!0:t==null};function aE(t,e){return e===void 0&&(e=!1),{simple:function(n){return Ug(n,e)||t.check(n)===void 0},async:function(n){return Ug(n,e)||t.testAsync(n)}}}function Qs(){return typeof Proxy<"u"?jg(new Wr):rp(new Wr)}var Au={};Qs.extend=function(t){Object.assign(Au,t)},Qs.clearCustomRules=function(){Au={}};function jg(t){return new Proxy(t,{get:function(n,r){if(r in n)return n[r];var o=jg(t._clone());if(r in xf)return o._applyModifier(xf[r],r);if(r in Au)return o._applyRule(Au[r],r);if(r in sp)return o._applyRule(sp[r],r)}})}function rp(t){var e=function(o,c){return Object.keys(o).forEach(function(h){c[h]=function(){for(var v=[],g=arguments.length;g--;)v[g]=arguments[g];var x=rp(c._clone()),m=x._applyRule(o[h],h).apply(void 0,v);return m}}),c},n=e(sp,t),r=e(Au,n);return Object.keys(xf).forEach(function(o){Object.defineProperty(r,o,{get:function(){var c=rp(r._clone());return c._applyModifier(xf[o],o)}})}),r}var xf={not:{simple:function(t){return function(e){return!t(e)}},async:function(t){return function(e){return Promise.resolve(t(e)).then(function(n){return!n}).catch(function(){return!0})}}},some:{simple:function(t){return function(e){return Ef(e).some(function(n){try{return t(n)}catch{return!1}})}},async:function(t){return function(e){return Promise.all(Ef(e).map(function(n){try{return t(n).catch(function(){return!1})}catch{return!1}})).then(function(n){return n.some(Boolean)})}}},every:{simple:function(t){return function(e){return e!==!1&&Ef(e).every(t)}},async:function(t){return function(e){return Promise.all(Ef(e).map(t)).then(function(n){return n.every(Boolean)})}}},strict:{simple:function(t,e){return function(n){return Ig(e)&&n&&typeof n=="object"?Object.keys(e.args[0]).length===Object.keys(n).length&&t(n):t(n)}},async:function(t,e){return function(n){return Promise.resolve(t(n)).then(function(r){return Ig(e)&&n&&typeof n=="object"?Object.keys(e.args[0]).length===Object.keys(n).length&&r:r}).catch(function(){return!1})}}}};function Ig(t){return t&&t.name==="schema"&&t.args.length>0&&typeof t.args[0]=="object"}function Ef(t){return typeof t=="string"?t.split(""):t}var sp={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(t){return t===void 0&&(t=!0),function(e){return typeof e=="number"&&(t||isFinite(e))}},integer:function(){return function(t){var e=Number.isInteger||oE;return e(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return il("string")},boolean:function(){return il("boolean")},undefined:function(){return il("undefined")},null:function(){return il("null")},array:function(){return il("array")},object:function(){return il("object")},instanceOf:function(t){return function(e){return e instanceof t}},pattern:function(t){return function(e){return t.test(e)}},lowercase:function(){return function(t){return typeof t=="boolean"||t===t.toLowerCase()&&t.trim()!==""}},uppercase:function(){return function(t){return t===t.toUpperCase()&&t.trim()!==""}},vowel:function(){return function(t){return/^[aeiou]+$/i.test(t)}},consonant:function(){return function(t){return/^(?=[^aeiou])([a-z]+)$/i.test(t)}},first:function(t){return function(e){return e[0]==t}},last:function(t){return function(e){return e[e.length-1]==t}},empty:function(){return function(t){return t.length===0}},length:function(t,e){return function(n){return n.length>=t&&n.length<=(e||t)}},minLength:function(t){return function(e){return e.length>=t}},maxLength:function(t){return function(e){return e.length<=t}},negative:function(){return function(t){return t<0}},positive:function(){return function(t){return t>=0}},between:function(t,e){return function(n){return n>=t&&n<=e}},range:function(t,e){return function(n){return n>=t&&n<=e}},lessThan:function(t){return function(e){return e<t}},lessThanOrEqual:function(t){return function(e){return e<=t}},greaterThan:function(t){return function(e){return e>t}},greaterThanOrEqual:function(t){return function(e){return e>=t}},even:function(){return function(t){return t%2===0}},odd:function(){return function(t){return t%2!==0}},includes:function(t){return function(e){return~e.indexOf(t)}},schema:function(t){return lE(t)},passesAnyOf:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(n){return t.some(function(r){return r.test(n)})}},optional:aE};function il(t){return function(e){return Array.isArray(e)&&t==="array"||e===null&&t==="null"||typeof e===t}}function oE(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function lE(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach(function(r){var o=t[r];try{o.check((e||{})[r])}catch(c){c.target=r,n.push(c)}}),n.length>0)throw n;return!0},async:function(e){var n=[],r=Object.keys(t).map(function(o){var c=t[o];return c.testAsync((e||{})[o]).catch(function(h){h.target=o,n.push(h)})});return Promise.all(r).then(function(){if(n.length>0)throw n;return!0})}}}var Wt="colors",yi="sizes",Ue="space",uE={gap:Ue,gridGap:Ue,columnGap:Ue,gridColumnGap:Ue,rowGap:Ue,gridRowGap:Ue,inset:Ue,insetBlock:Ue,insetBlockEnd:Ue,insetBlockStart:Ue,insetInline:Ue,insetInlineEnd:Ue,insetInlineStart:Ue,margin:Ue,marginTop:Ue,marginRight:Ue,marginBottom:Ue,marginLeft:Ue,marginBlock:Ue,marginBlockEnd:Ue,marginBlockStart:Ue,marginInline:Ue,marginInlineEnd:Ue,marginInlineStart:Ue,padding:Ue,paddingTop:Ue,paddingRight:Ue,paddingBottom:Ue,paddingLeft:Ue,paddingBlock:Ue,paddingBlockEnd:Ue,paddingBlockStart:Ue,paddingInline:Ue,paddingInlineEnd:Ue,paddingInlineStart:Ue,top:Ue,right:Ue,bottom:Ue,left:Ue,scrollMargin:Ue,scrollMarginTop:Ue,scrollMarginRight:Ue,scrollMarginBottom:Ue,scrollMarginLeft:Ue,scrollMarginX:Ue,scrollMarginY:Ue,scrollMarginBlock:Ue,scrollMarginBlockEnd:Ue,scrollMarginBlockStart:Ue,scrollMarginInline:Ue,scrollMarginInlineEnd:Ue,scrollMarginInlineStart:Ue,scrollPadding:Ue,scrollPaddingTop:Ue,scrollPaddingRight:Ue,scrollPaddingBottom:Ue,scrollPaddingLeft:Ue,scrollPaddingX:Ue,scrollPaddingY:Ue,scrollPaddingBlock:Ue,scrollPaddingBlockEnd:Ue,scrollPaddingBlockStart:Ue,scrollPaddingInline:Ue,scrollPaddingInlineEnd:Ue,scrollPaddingInlineStart:Ue,fontSize:"fontSizes",background:Wt,backgroundColor:Wt,backgroundImage:Wt,borderImage:Wt,border:Wt,borderBlock:Wt,borderBlockEnd:Wt,borderBlockStart:Wt,borderBottom:Wt,borderBottomColor:Wt,borderColor:Wt,borderInline:Wt,borderInlineEnd:Wt,borderInlineStart:Wt,borderLeft:Wt,borderLeftColor:Wt,borderRight:Wt,borderRightColor:Wt,borderTop:Wt,borderTopColor:Wt,caretColor:Wt,color:Wt,columnRuleColor:Wt,fill:Wt,outline:Wt,outlineColor:Wt,stroke:Wt,textDecorationColor:Wt,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:yi,minBlockSize:yi,maxBlockSize:yi,inlineSize:yi,minInlineSize:yi,maxInlineSize:yi,width:yi,minWidth:yi,maxWidth:yi,height:yi,minHeight:yi,maxHeight:yi,flexBasis:yi,gridTemplateColumns:yi,gridTemplateRows:yi,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},cE=(t,e)=>typeof e=="function"?{"()":Function.prototype.toString.call(e)}:e,rl=()=>{const t=Object.create(null);return(e,n,...r)=>{const o=(c=>JSON.stringify(c,cE))(e);return o in t?t[o]:t[o]=n(e,...r)}},za=Symbol.for("sxs.internal"),ap=(t,e)=>Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)),Fg=t=>{for(const e in t)return!0;return!1},{hasOwnProperty:fE}=Object.prototype,op=t=>t.includes("-")?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),dE=/\s+(?![^()]*\))/,sl=t=>e=>t(...typeof e=="string"?String(e).split(dE):[e]),Bg={appearance:t=>({WebkitAppearance:t,appearance:t}),backfaceVisibility:t=>({WebkitBackfaceVisibility:t,backfaceVisibility:t}),backdropFilter:t=>({WebkitBackdropFilter:t,backdropFilter:t}),backgroundClip:t=>({WebkitBackgroundClip:t,backgroundClip:t}),boxDecorationBreak:t=>({WebkitBoxDecorationBreak:t,boxDecorationBreak:t}),clipPath:t=>({WebkitClipPath:t,clipPath:t}),content:t=>({content:t.includes('"')||t.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(t)?t:`"${t}"`}),hyphens:t=>({WebkitHyphens:t,hyphens:t}),maskImage:t=>({WebkitMaskImage:t,maskImage:t}),maskSize:t=>({WebkitMaskSize:t,maskSize:t}),tabSize:t=>({MozTabSize:t,tabSize:t}),textSizeAdjust:t=>({WebkitTextSizeAdjust:t,textSizeAdjust:t}),userSelect:t=>({WebkitUserSelect:t,userSelect:t}),marginBlock:sl((t,e)=>({marginBlockStart:t,marginBlockEnd:e||t})),marginInline:sl((t,e)=>({marginInlineStart:t,marginInlineEnd:e||t})),maxSize:sl((t,e)=>({maxBlockSize:t,maxInlineSize:e||t})),minSize:sl((t,e)=>({minBlockSize:t,minInlineSize:e||t})),paddingBlock:sl((t,e)=>({paddingBlockStart:t,paddingBlockEnd:e||t})),paddingInline:sl((t,e)=>({paddingInlineStart:t,paddingInlineEnd:e||t}))},lp=/([\d.]+)([^]*)/,hE=(t,e)=>t.length?t.reduce((n,r)=>(n.push(...e.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(o)?`:is(${r})`:r):r+" "+o)),n),[]):e,pE=(t,e)=>t in vE&&typeof e=="string"?e.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,c)=>r+(o==="stretch"?`-moz-available${c};${op(t)}:${r}-webkit-fill-available`:`-moz-fit-content${c};${op(t)}:${r}fit-content`)+c):String(e),vE={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},ms=t=>t?t+"-":"",Hg=(t,e,n)=>t.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,o,c,h,v)=>h=="$"==!!c?r:(o||h=="--"?"calc(":"")+"var(--"+(h==="$"?ms(e)+(v.includes("$")?"":ms(n))+v.replace(/\$/g,"-"):v)+")"+(o||h=="--"?"*"+(o||"")+(c||"1")+")":"")),mE=/\s*,\s*(?![^()]*\))/,gE=Object.prototype.toString,al=(t,e,n,r,o)=>{let c,h,v;const g=(x,m,w)=>{let A,k;const M=_=>{for(A in _){const O=A.charCodeAt(0)===64,H=O&&Array.isArray(_[A])?_[A]:[_[A]];for(k of H){const q=/[A-Z]/.test(P=A)?P:P.replace(/-[^]/g,B=>B[1].toUpperCase()),Q=typeof k=="object"&&k&&k.toString===gE&&(!r.utils[q]||!m.length);if(q in r.utils&&!Q){const B=r.utils[q];if(B!==h){h=B,M(B(k)),h=null;continue}}else if(q in Bg){const B=Bg[q];if(B!==v){v=B,M(B(k)),v=null;continue}}if(O&&(L=A.slice(1)in r.media?"@media "+r.media[A.slice(1)]:A,A=L.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(B,J,ie,$,re,me)=>{const Re=lp.test(J),Se=.0625*(Re?-1:1),[Fe,ke]=Re?[$,J]:[J,$];return"("+(ie[0]==="="?"":ie[0]===">"===Re?"max-":"min-")+Fe+":"+(ie[0]!=="="&&ie.length===1?ke.replace(lp,(Xe,ft,Te)=>Number(ft)+Se*(ie===">"?1:-1)+Te):ke)+(re?") and ("+(re[0]===">"?"min-":"max-")+Fe+":"+(re.length===1?me.replace(lp,(Xe,ft,Te)=>Number(ft)+Se*(re===">"?-1:1)+Te):me):"")+")"})),Q){const B=O?w.concat(A):[...w],J=O?[...m]:hE(m,A.split(mE));c!==void 0&&o(Wg(...c)),c=void 0,g(k,J,B)}else c===void 0&&(c=[[],m,w]),A=O||A.charCodeAt(0)!==36?A:`--${ms(r.prefix)}${A.slice(1).replace(/\$/g,"-")}`,k=Q?k:typeof k=="number"?k&&q in yE?String(k)+"px":String(k):Hg(pE(q,k??""),r.prefix,r.themeMap[q]),c[0].push(`${O?`${A} `:`${op(A)}:`}${k}`)}}var L,P};M(x),c!==void 0&&o(Wg(...c)),c=void 0};g(t,e,n)},Wg=(t,e,n)=>`${n.map(r=>`${r}{`).join("")}${e.length?`${e.join(",")}{`:""}${t.join(";")}${e.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,yE={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},Vg=t=>String.fromCharCode(t+(t>25?39:97)),Na=t=>(e=>{let n,r="";for(n=Math.abs(e);n>52;n=n/52|0)r=Vg(n%52)+r;return Vg(n%52)+r})(((e,n)=>{let r=n.length;for(;r;)e=33*e^n.charCodeAt(--r);return e})(5381,JSON.stringify(t))>>>0),Mu=["themed","global","styled","onevar","resonevar","allvar","inline"],SE=t=>{if(t.href&&!t.href.startsWith(location.origin))return!1;try{return!!t.cssRules}catch{return!1}},bE=t=>{let e;const n=()=>{const{cssRules:o}=e.sheet;return[].map.call(o,(c,h)=>{const{cssText:v}=c;let g="";if(v.startsWith("--sxs"))return"";if(o[h-1]&&(g=o[h-1].cssText).startsWith("--sxs")){if(!c.cssRules.length)return"";for(const x in e.rules)if(e.rules[x].group===c)return`--sxs{--sxs:${[...e.rules[x].cache].join(" ")}}${v}`;return c.cssRules.length?`${g}${v}`:""}return v}).join("")},r=()=>{if(e){const{rules:v,sheet:g}=e;if(!g.deleteRule){for(;Object(Object(g.cssRules)[0]).type===3;)g.cssRules.splice(0,1);g.cssRules=[]}for(const x in v)delete v[x]}const o=Object(t).styleSheets||[];for(const v of o)if(SE(v)){for(let g=0,x=v.cssRules;x[g];++g){const m=Object(x[g]);if(m.type!==1)continue;const w=Object(x[g+1]);if(w.type!==4)continue;++g;const{cssText:A}=m;if(!A.startsWith("--sxs"))continue;const k=A.slice(14,-3).trim().split(/\s+/),M=Mu[k[0]];M&&(e||(e={sheet:v,reset:r,rules:{},toString:n}),e.rules[M]={group:w,index:g,cache:new Set(k)})}if(e)break}if(!e){const v=(g,x)=>({type:x,cssRules:[],insertRule(m,w){this.cssRules.splice(w,0,v(m,{import:3,undefined:1}[(m.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return g==="@media{}"?`@media{${[].map.call(this.cssRules,m=>m.cssText).join("")}}`:g}});e={sheet:t?(t.head||t).appendChild(document.createElement("style")).sheet:v("","text/css"),rules:{},reset:r,toString:n}}const{sheet:c,rules:h}=e;for(let v=Mu.length-1;v>=0;--v){const g=Mu[v];if(!h[g]){const x=Mu[v+1],m=h[x]?h[x].index:c.cssRules.length;c.insertRule("@media{}",m),c.insertRule(`--sxs{--sxs:${v}}`,m),h[g]={group:c.cssRules[m+1],index:m,cache:new Set([v])}}xE(h[g])}};return r(),e},xE=t=>{const e=t.group;let n=e.cssRules.length;t.apply=r=>{try{e.insertRule(r,n),++n}catch{}}},Ou=Symbol(),EE=rl(),$g=(t,e)=>EE(t,()=>(...n)=>{let r={type:null,composers:new Set};for(const o of n)if(o!=null)if(o[za]){r.type==null&&(r.type=o[za].type);for(const c of o[za].composers)r.composers.add(c)}else o.constructor!==Object||o.$$typeof?r.type==null&&(r.type=o):r.composers.add(wE(o,t));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),TE(t,r,e)}),wE=({variants:t,compoundVariants:e,defaultVariants:n,...r},o)=>{const c=`${ms(o.prefix)}c-${Na(r)}`,h=[],v=[],g=Object.create(null),x=[];for(const A in n)g[A]=String(n[A]);if(typeof t=="object"&&t)for(const A in t){m=g,w=A,fE.call(m,w)||(g[A]="undefined");const k=t[A];for(const M in k){const _={[A]:String(M)};String(M)==="undefined"&&x.push(A);const L=k[M],P=[_,L,!Fg(L)];h.push(P)}}var m,w;if(typeof e=="object"&&e)for(const A of e){let{css:k,...M}=A;k=typeof k=="object"&&k||{};for(const L in M)M[L]=String(M[L]);const _=[M,k,!Fg(k)];v.push(_)}return[c,r,h,v,g,x]},TE=(t,e,n)=>{const[r,o,c,h]=CE(e.composers),v=typeof e.type=="function"||e.type.$$typeof?(w=>{function A(){for(let k=0;k<A[Ou].length;k++){const[M,_]=A[Ou][k];w.rules[M].apply(_)}return A[Ou]=[],null}return A[Ou]=[],A.rules={},Mu.forEach(k=>A.rules[k]={apply:M=>A[Ou].push([k,M])}),A})(n):null,g=(v||n).rules,x=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,m=w=>{w=typeof w=="object"&&w||RE;const{css:A,...k}=w,M={};for(const P in c)if(delete k[P],P in w){let O=w[P];typeof O=="object"&&O?M[P]={"@initial":c[P],...O}:(O=String(O),M[P]=O!=="undefined"||h.has(P)?O:c[P])}else M[P]=c[P];const _=new Set([...o]);for(const[P,O,H,q]of e.composers){n.rules.styled.cache.has(P)||(n.rules.styled.cache.add(P),al(O,[`.${P}`],[],t,J=>{g.styled.apply(J)}));const Q=qg(H,M,t.media),B=qg(q,M,t.media,!0);for(const J of Q)if(J!==void 0)for(const[ie,$,re]of J){const me=`${P}-${Na($)}-${ie}`;_.add(me);const Re=(re?n.rules.resonevar:n.rules.onevar).cache,Se=re?g.resonevar:g.onevar;Re.has(me)||(Re.add(me),al($,[`.${me}`],[],t,Fe=>{Se.apply(Fe)}))}for(const J of B)if(J!==void 0)for(const[ie,$]of J){const re=`${P}-${Na($)}-${ie}`;_.add(re),n.rules.allvar.cache.has(re)||(n.rules.allvar.cache.add(re),al($,[`.${re}`],[],t,me=>{g.allvar.apply(me)}))}}if(typeof A=="object"&&A){const P=`${r}-i${Na(A)}-css`;_.add(P),n.rules.inline.cache.has(P)||(n.rules.inline.cache.add(P),al(A,[`.${P}`],[],t,O=>{g.inline.apply(O)}))}for(const P of String(w.className||"").trim().split(/\s+/))P&&_.add(P);const L=k.className=[..._].join(" ");return{type:e.type,className:L,selector:x,props:k,toString:()=>L,deferredInjector:v}};return ap(m,{className:r,selector:x,[za]:e,toString:()=>(n.rules.styled.cache.has(r)||m(),r)})},CE=t=>{let e="";const n=[],r={},o=[];for(const[c,,,,h,v]of t){e===""&&(e=c),n.push(c),o.push(...v);for(const g in h){const x=h[g];(r[g]===void 0||x!=="undefined"||v.includes(x))&&(r[g]=x)}}return[e,n,r,new Set(o)]},qg=(t,e,n,r)=>{const o=[];e:for(let[c,h,v]of t){if(v)continue;let g,x=0,m=!1;for(g in c){const w=c[g];let A=e[g];if(A!==w){if(typeof A!="object"||!A)continue e;{let k,M,_=0;for(const L in A){if(w===String(A[L])){if(L!=="@initial"){const P=L.slice(1);(M=M||[]).push(P in n?n[P]:L.replace(/^@media ?/,"")),m=!0}x+=_,k=!0}++_}if(M&&M.length&&(h={["@media "+M.join(", ")]:h}),!k)continue e}}}(o[x]=o[x]||[]).push([r?"cv":`${g}-${c[g]}`,h,m])}return o},RE={},AE=rl(),ME=(t,e)=>AE(t,()=>(...n)=>{const r=()=>{for(let o of n){o=typeof o=="object"&&o||{};let c=Na(o);if(!e.rules.global.cache.has(c)){if(e.rules.global.cache.add(c),"@import"in o){let h=[].indexOf.call(e.sheet.cssRules,e.rules.themed.group)-1;for(let v of[].concat(o["@import"]))v=v.includes('"')||v.includes("'")?v:`"${v}"`,e.sheet.insertRule(`@import ${v};`,h++);delete o["@import"]}al(o,[],[],t,h=>{e.rules.global.apply(h)})}}return""};return ap(r,{toString:r})}),OE=rl(),DE=(t,e)=>OE(t,()=>n=>{const r=`${ms(t.prefix)}k-${Na(n)}`,o=()=>{if(!e.rules.global.cache.has(r)){e.rules.global.cache.add(r);const c=[];al(n,[],[],t,v=>c.push(v));const h=`@keyframes ${r}{${c.join("")}}`;e.rules.global.apply(h)}return r};return ap(o,{get name(){return o()},toString:o})}),LE=class{constructor(t,e,n,r){this.token=t==null?"":String(t),this.value=e==null?"":String(e),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+ms(this.prefix)+ms(this.scale)+this.token}toString(){return this.computedValue}},PE=rl(),kE=(t,e)=>PE(t,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const o=`.${n=(n=typeof n=="string"?n:"")||`${ms(t.prefix)}t-${Na(r)}`}`,c={},h=[];for(const g in r){c[g]={};for(const x in r[g]){const m=`--${ms(t.prefix)}${g}-${x}`,w=Hg(String(r[g][x]),t.prefix,g);c[g][x]=new LE(x,w,g,t.prefix),h.push(`${m}:${w}`)}}const v=()=>{if(h.length&&!e.rules.themed.cache.has(n)){e.rules.themed.cache.add(n);const g=`${r===t.theme?":root,":""}.${n}{${h.join(";")}}`;e.rules.themed.apply(g)}return n};return{...c,get className(){return v()},selector:o,toString:v}}),zE=rl(),NE=rl(),_E=t=>{const e=(n=>{let r=!1;const o=zE(n,c=>{r=!0;const h="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",v=typeof c.media=="object"&&c.media||{},g=typeof c.root=="object"?c.root||null:globalThis.document||null,x=typeof c.theme=="object"&&c.theme||{},m={prefix:h,media:v,theme:x,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...uE},utils:typeof c.utils=="object"&&c.utils||{}},w=bE(g),A={css:$g(m,w),globalCss:ME(m,w),keyframes:DE(m,w),createTheme:kE(m,w),reset(){w.reset(),A.theme.toString()},theme:{},sheet:w,config:m,prefix:h,getCssText:w.toString,toString:w.toString};return String(A.theme=A.createTheme(x)),A});return r||o.reset(),o})(t);return e.styled=(({config:n,sheet:r})=>NE(n,()=>{const o=$g(n,r);return(...c)=>{const h=o(...c),v=h[za].type,g=C.forwardRef((x,m)=>{const w=x&&x.as||v,{props:A,deferredInjector:k}=h(x);return delete A.as,A.ref=m,k?C.createElement(C.Fragment,null,C.createElement(w,A),C.createElement(k,null)):C.createElement(w,A)});return g.className=h.className,g.displayName=`Styled.${v.displayName||v.name||v}`,g.selector=h.selector,g.toString=()=>h.selector,g[za]=h[za],g}}))(e),e};function UE(t,e,n){return Math.max(e,Math.min(t,n))}const ui={toVector(t,e){return t===void 0&&(t=e),Array.isArray(t)?t:[t,t]},add(t,e){return[t[0]+e[0],t[1]+e[1]]},sub(t,e){return[t[0]-e[0],t[1]-e[1]]},addTo(t,e){t[0]+=e[0],t[1]+=e[1]},subTo(t,e){t[0]-=e[0],t[1]-=e[1]}};function Yg(t,e,n){return e===0||Math.abs(e)===1/0?Math.pow(t,n*5):t*e*n/(e+n*t)}function Qg(t,e,n,r=.15){return r===0?UE(t,e,n):t<e?-Yg(e-t,n-e,r)+e:t>n?+Yg(t-n,n-e,r)+n:t}function jE(t,[e,n],[r,o]){const[[c,h],[v,g]]=t;return[Qg(e,c,h,r),Qg(n,v,g,o)]}function IE(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function FE(t){var e=IE(t,"string");return typeof e=="symbol"?e:String(e)}function Pi(t,e,n){return e=FE(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gg(Object(n),!0).forEach(function(r){Pi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const Xg={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Kg(t){return t?t[0].toUpperCase()+t.slice(1):""}const BE=["enter","leave"];function HE(t=!1,e){return t&&!BE.includes(e)}function WE(t,e="",n=!1){const r=Xg[t],o=r&&r[e]||e;return"on"+Kg(t)+Kg(o)+(HE(n,o)?"Capture":"")}const VE=["gotpointercapture","lostpointercapture"];function $E(t){let e=t.substring(2).toLowerCase();const n=!!~e.indexOf("passive");n&&(e=e.replace("passive",""));const r=VE.includes(e)?"capturecapture":"capture",o=!!~e.indexOf(r);return o&&(e=e.replace("capture","")),{device:e,capture:o,passive:n}}function qE(t,e=""){const n=Xg[t],r=n&&n[e]||e;return t+r}function wf(t){return"touches"in t}function Zg(t){return wf(t)?"touch":"pointerType"in t?t.pointerType:"mouse"}function YE(t){return Array.from(t.touches).filter(e=>{var n,r;return e.target===t.currentTarget||((n=t.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,e.target))})}function QE(t){return t.type==="touchend"||t.type==="touchcancel"?t.changedTouches:t.targetTouches}function Jg(t){return wf(t)?QE(t)[0]:t}function GE(t){return YE(t).map(e=>e.identifier)}function up(t){const e=Jg(t);return wf(t)?e.identifier:e.pointerId}function ey(t){const e=Jg(t);return[e.clientX,e.clientY]}function XE(t){const e={};if("buttons"in t&&(e.buttons=t.buttons),"shiftKey"in t){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:c}=t;Object.assign(e,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:c})}return e}function Tf(t,...e){return typeof t=="function"?t(...e):t}function KE(){}function ZE(...t){return t.length===0?KE:t.length===1?t[0]:function(){let e;for(const n of t)e=n.apply(this,arguments)||e;return e}}function ty(t,e){return Object.assign({},e,t||{})}const JE=32;class ew{constructor(e,n,r){this.ctrl=e,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:n,ingKey:r,args:o}=this;n[r]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=o,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=e.target,n.currentTarget=e.currentTarget,n.lastOffset=r.from?Tf(r.from,n):n.offset,n.offset=n.lastOffset),n.startTime=n.timeStamp=e.timeStamp}computeValues(e){const n=this.state;n._values=e,n.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:n,config:r,shared:o}=this;n.args=this.args;let c=0;if(e&&(n.event=e,r.preventDefault&&e.cancelable&&n.event.preventDefault(),n.type=e.type,o.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,o.locked=!!document.pointerLockElement,Object.assign(o,XE(e)),o.down=o.pressed=o.buttons%2===1||o.touches>0,c=e.timeStamp-n.timeStamp,n.timeStamp=e.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const B=n._delta.map(Math.abs);ui.addTo(n._distance,B)}this.axisIntent&&this.axisIntent(e);const[h,v]=n._movement,[g,x]=r.threshold,{_step:m,values:w}=n;if(r.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(h)>=g&&w[0]),m[1]===!1&&(m[1]=Math.abs(v)>=x&&w[1])):(m[0]===!1&&(m[0]=Math.abs(h)>=g&&Math.sign(h)*g),m[1]===!1&&(m[1]=Math.abs(v)>=x&&Math.sign(v)*x)),n.intentional=m[0]!==!1||m[1]!==!1,!n.intentional)return;const A=[0,0];if(r.hasCustomTransform){const[B,J]=w;A[0]=m[0]!==!1?B-m[0]:0,A[1]=m[1]!==!1?J-m[1]:0}else A[0]=m[0]!==!1?h-m[0]:0,A[1]=m[1]!==!1?v-m[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(A);const k=n.offset,M=n._active&&!n._blocked||n.active;M&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=o[this.ingKey]=n._active,e&&(n.first&&("bounds"in r&&(n._bounds=Tf(r.bounds,n)),this.setup&&this.setup()),n.movement=A,this.computeOffset()));const[_,L]=n.offset,[[P,O],[H,q]]=n._bounds;n.overflow=[_<P?-1:_>O?1:0,L<H?-1:L>q?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const Q=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=jE(n._bounds,n.offset,Q),n.delta=ui.sub(n.offset,k),this.computeMovement(),M&&(!n.last||c>JE)){n.delta=ui.sub(n.offset,k);const B=n.delta.map(Math.abs);ui.addTo(n.distance,B),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&c>0&&(n.velocity=[B[0]/c,B[1]/c])}}emit(){const e=this.state,n=this.shared,r=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!r.triggerAllEvents)return;const o=this.handler(vn(vn(vn({},n),e),{},{[this.aliasKey]:e.values}));o!==void 0&&(e.memo=o)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function tw([t,e],n){const r=Math.abs(t),o=Math.abs(e);if(r>o&&r>n)return"x";if(o>r&&o>n)return"y"}class nw extends ew{constructor(...e){super(...e),Pi(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=ui.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ui.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const n=this.state,r=this.config;if(!n.axis&&e){const o=typeof r.axisThreshold=="object"?r.axisThreshold[Zg(e)]:r.axisThreshold;n.axis=tw(n._movement,o)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0;break}}}const iw=t=>t,ny=.15,iy={enabled(t=!0){return t},eventOptions(t,e,n){return vn(vn({},n.shared.eventOptions),t)},preventDefault(t=!1){return t},triggerAllEvents(t=!1){return t},rubberband(t=0){switch(t){case!0:return[ny,ny];case!1:return[0,0];default:return ui.toVector(t)}},from(t){if(typeof t=="function")return t;if(t!=null)return ui.toVector(t)},transform(t,e,n){const r=t||n.shared.transform;return this.hasCustomTransform=!!r,r||iw},threshold(t){return ui.toVector(t,0)}},rw=0,Du=vn(vn({},iy),{},{axis(t,e,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(t=rw){return t},bounds(t={}){if(typeof t=="function")return c=>Du.bounds(t(c));if("current"in t)return()=>t.current;if(typeof HTMLElement=="function"&&t instanceof HTMLElement)return t;const{left:e=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=t;return[[e,n],[r,o]]}}),ry={ArrowRight:(t,e=1)=>[t*e,0],ArrowLeft:(t,e=1)=>[-1*t*e,0],ArrowUp:(t,e=1)=>[0,-1*t*e],ArrowDown:(t,e=1)=>[0,t*e]};class sw extends nw{constructor(...e){super(...e),Pi(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const n=e._bounds.getBoundingClientRect(),r=e.currentTarget.getBoundingClientRect(),o={left:n.left-r.left+e.offset[0],right:n.right-r.right+e.offset[0],top:n.top-r.top+e.offset[1],bottom:n.bottom-r.bottom+e.offset[1]};e._bounds=Du.bounds(o)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const n=this.config,r=this.state;if(e.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(e.buttons):n.pointerButtons!==-1&&n.pointerButtons!==e.buttons))return;const o=this.ctrl.setEventIds(e);n.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(o&&o.size>1&&r._pointerActive)&&(this.start(e),this.setupPointer(e),r._pointerId=up(e),r._pointerActive=!0,this.computeValues(ey(e)),this.computeInitial(),n.preventScrollAxis&&Zg(e)!=="mouse"?(r._active=!1,this.setupScrollPrevention(e)):n.delay>0?(this.setupDelayTrigger(e),n.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const n=this.state,r=this.config;if(!n._pointerActive||n.type===e.type&&e.timeStamp===n.timeStamp)return;const o=up(e);if(n._pointerId!==void 0&&o!==n._pointerId)return;const c=ey(e);if(document.pointerLockElement===e.target?n._delta=[e.movementX,e.movementY]:(n._delta=ui.sub(c,n._values),this.computeValues(c)),ui.addTo(n._movement,n._delta),this.compute(e),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(e);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(e);return}else return;this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const o=up(e);if(n._pointerId!==void 0&&o!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[c,h]=n._distance;if(n.tap=c<=r.tapsThreshold&&h<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[v,g]=n.direction,[x,m]=n.velocity,[w,A]=n.movement,[k,M]=r.swipe.velocity,[_,L]=r.swipe.distance,P=r.swipe.duration;n.elapsedTime<P&&(Math.abs(x)>k&&Math.abs(w)>_&&(n.swipe[0]=v),Math.abs(m)>M&&Math.abs(A)>L&&(n.swipe[1]=g))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const n=this.config,r=n.device;n.pointerLock&&e.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,aw(e);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){const n=ry[e.key];if(n){const r=this.state,o=e.shiftKey?10:e.altKey?.1:1;this.start(e),r._delta=n(this.config.keyboardDisplacement,o),r._keyboardActive=!0,ui.addTo(r._movement,r._delta),this.compute(e),this.emit()}}keyUp(e){e.key in ry&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const n=this.config.device;e(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(n,"change",this.pointerMove.bind(this)),e(n,"end",this.pointerUp.bind(this)),e(n,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function aw(t){"persist"in t&&typeof t.persist=="function"&&t.persist()}const Lu=typeof window<"u"&&window.document&&window.document.createElement;function ow(){return Lu&&"ontouchstart"in window}function sy(){return ow()||Lu&&window.navigator.maxTouchPoints>1}function lw(){return Lu&&"onpointerdown"in window}function uw(){return Lu&&"exitPointerLock"in window.document}function cw(){try{return"constructor"in GestureEvent}catch{return!1}}const lr={isBrowser:Lu,gesture:cw(),touch:sy(),touchscreen:sy(),pointer:lw(),pointerLock:uw()},fw=250,dw=180,hw=.5,pw=50,vw=250,mw=10,ay={mouse:0,touch:0,pen:8},gw=vn(vn({},Du),{},{device(t,e,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&lr.pointerLock,lr.touch&&n?"touch":this.pointerLock?"mouse":lr.pointer&&!o?"pointer":lr.touch?"touch":"mouse"},preventScrollAxis(t,e,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&t?fw:void 0,!(!lr.touchscreen||n===!1))return t||(n!==void 0?"y":void 0)},pointerCapture(t,e,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&this.device==="pointer"&&n},threshold(t,e,{filterTaps:n=!1,tapsThreshold:r=3,axis:o=void 0}){const c=ui.toVector(t,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,c},swipe({velocity:t=hw,distance:e=pw,duration:n=vw}={}){return{velocity:this.transform(ui.toVector(t)),distance:this.transform(ui.toVector(e)),duration:n}},delay(t=0){switch(t){case!0:return dw;case!1:return 0;default:return t}},axisThreshold(t){return t?vn(vn({},ay),t):ay},keyboardDisplacement(t=mw){return t}});vn(vn({},iy),{},{device(t,e,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!lr.touch&&lr.gesture)return"gesture";if(lr.touch&&r)return"touch";if(lr.touchscreen){if(lr.pointer)return"pointer";if(lr.touch)return"touch"}},bounds(t,e,{scaleBounds:n={},angleBounds:r={}}){const o=h=>{const v=ty(Tf(n,h),{min:-1/0,max:1/0});return[v.min,v.max]},c=h=>{const v=ty(Tf(r,h),{min:-1/0,max:1/0});return[v.min,v.max]};return typeof n!="function"&&typeof r!="function"?[o(),c()]:h=>[o(h),c(h)]},threshold(t,e,n){return this.lockDirection=n.axis==="lock",ui.toVector(t,this.lockDirection?[.1,3]:0)},modifierKey(t){return t===void 0?"ctrlKey":t},pinchOnWheel(t=!0){return t}}),vn(vn({},Du),{},{mouseOnly:(t=!0)=>t}),vn(vn({},Du),{},{mouseOnly:(t=!0)=>t});const oy=new Map,cp=new Map;function yw(t){oy.set(t.key,t.engine),cp.set(t.key,t.resolver)}const Sw={key:"drag",engine:sw,resolver:gw};function bw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,c;for(c=0;c<r.length;c++)o=r[c],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function xw(t,e){if(t==null)return{};var n=bw(t,e),r,o;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(o=0;o<c.length;o++)r=c[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}const Ew={target(t){if(t)return()=>"current"in t?t.current:t},enabled(t=!0){return t},window(t=lr.isBrowser?window:void 0){return t},eventOptions({passive:t=!0,capture:e=!1}={}){return{passive:t,capture:e}},transform(t){return t}},ww=["target","eventOptions","window","enabled","transform"];function Cf(t={},e){const n={};for(const[r,o]of Object.entries(e))switch(typeof o){case"function":n[r]=o.call(n,t[r],r,t);break;case"object":n[r]=Cf(t[r],o);break;case"boolean":o&&(n[r]=t[r]);break}return n}function Tw(t,e,n={}){const r=t,{target:o,eventOptions:c,window:h,enabled:v,transform:g}=r,x=xw(r,ww);if(n.shared=Cf({target:o,eventOptions:c,window:h,enabled:v,transform:g},Ew),e){const m=cp.get(e);n[e]=Cf(vn({shared:n.shared},x),m)}else for(const m in x){const w=cp.get(m);w&&(n[m]=Cf(vn({shared:n.shared},x[m]),w))}return n}class ly{constructor(e,n){Pi(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=n}add(e,n,r,o,c){const h=this._listeners,v=qE(n,r),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},x=vn(vn({},g),c);e.addEventListener(v,o,x);const m=()=>{e.removeEventListener(v,o,x),h.delete(m)};return h.add(m),m}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class Cw{constructor(){Pi(this,"_timeouts",new Map)}add(e,n,r=140,...o){this.remove(e),this._timeouts.set(e,window.setTimeout(n,r,...o))}remove(e){const n=this._timeouts.get(e);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}}class Rw{constructor(e){Pi(this,"gestures",new Set),Pi(this,"_targetEventStore",new ly(this)),Pi(this,"gestureEventStores",{}),Pi(this,"gestureTimeoutStores",{}),Pi(this,"handlers",{}),Pi(this,"config",{}),Pi(this,"pointerIds",new Set),Pi(this,"touchIds",new Set),Pi(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Aw(this,e)}setEventIds(e){if(wf(e))return this.touchIds=new Set(GE(e)),this.touchIds;if("pointerId"in e)return e.type==="pointerup"||e.type==="pointercancel"?this.pointerIds.delete(e.pointerId):e.type==="pointerdown"&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,n){this.handlers=e,this.nativeHandlers=n}applyConfig(e,n){this.config=Tw(e,n,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const n=this.config.shared,r={};let o;if(!(n.target&&(o=n.target(),!o))){if(n.enabled){for(const h of this.gestures){const v=this.config[h],g=uy(r,v.eventOptions,!!o);if(v.enabled){const x=oy.get(h);new x(this,e,h).bind(g)}}const c=uy(r,n.eventOptions,!!o);for(const h in this.nativeHandlers)c(h,"",v=>this.nativeHandlers[h](vn(vn({},this.state.shared),{},{event:v,args:e})),void 0,!0)}for(const c in r)r[c]=ZE(...r[c]);if(!o)return r;for(const c in r){const{device:h,capture:v,passive:g}=$E(c);this._targetEventStore.add(o,h,"",r[c],{capture:v,passive:g})}}}}function ol(t,e){t.gestures.add(e),t.gestureEventStores[e]=new ly(t,e),t.gestureTimeoutStores[e]=new Cw}function Aw(t,e){e.drag&&ol(t,"drag"),e.wheel&&ol(t,"wheel"),e.scroll&&ol(t,"scroll"),e.move&&ol(t,"move"),e.pinch&&ol(t,"pinch"),e.hover&&ol(t,"hover")}const uy=(t,e,n)=>(r,o,c,h={},v=!1)=>{var g,x;const m=(g=h.capture)!==null&&g!==void 0?g:e.capture,w=(x=h.passive)!==null&&x!==void 0?x:e.passive;let A=v?r:WE(r,o,m);n&&w&&(A+="Passive"),t[A]=t[A]||[],t[A].push(c)};function Mw(t,e={},n,r){const o=C.useMemo(()=>new Rw(t),[]);if(o.applyHandlers(t,r),o.applyConfig(e,n),C.useEffect(o.effect.bind(o)),C.useEffect(()=>o.clean.bind(o),[]),e.target===void 0)return o.bind.bind(o)}function Ow(t,e){return yw(Sw),Mw({drag:t},e||{},"drag")}const Dw=ae.useId||(()=>{});let Lw=0;function Pw(t){const[e,n]=ae.useState(Dw());return Sf(()=>{t||n(r=>r??String(Lw++))},[t]),t||(e?`radix-${e}`:"")}const ll=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce((t,e)=>({...t,[e]:ae.forwardRef((n,r)=>{const{asChild:o,...c}=n,h=o?Lg:e;return ae.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),n.as&&console.error(kw),ae.createElement(h,li({},c,{ref:r}))})}),{}),kw="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",zw=ae.forwardRef((t,e)=>ae.createElement(ll.span,li({},t,{ref:e,style:{...t.style,position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}}))),Nw=ae.forwardRef((t,e)=>{var n,r;const{containerRef:o,style:c,...h}=t,v=(n=o==null?void 0:o.current)!==null&&n!==void 0?n:globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,[,g]=ae.useState({});return Sf(()=>{g({})},[]),v?vg.createPortal(ae.createElement(ll.div,li({"data-radix-portal":""},h,{ref:e,style:v===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...c}:void 0})),v):null}),_w=ae.forwardRef((t,e)=>{const{children:n,width:r=10,height:o=5,...c}=t;return ae.createElement(ll.svg,li({},c,{ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?n:ae.createElement("polygon",{points:"0,0 30,0 15,10"}))});function cy(t){const[e,n]=ae.useState(void 0);return ae.useEffect(()=>{if(t){const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let h,v;if("borderBoxSize"in c){const g=c.borderBoxSize,x=Array.isArray(g)?g[0]:g;h=x.inlineSize,v=x.blockSize}else{const g=t.getBoundingClientRect();h=g.width,v=g.height}n({width:h,height:v})});return r.observe(t,{box:"border-box"}),()=>{n(void 0),r.unobserve(t)}}},[t]),e}function Uw(t,e){const n=_a.get(t);return n===void 0?(_a.set(t,{rect:{},callbacks:[e]}),_a.size===1&&(fp=requestAnimationFrame(fy))):(n.callbacks.push(e),e(t.getBoundingClientRect())),()=>{const r=_a.get(t);if(r===void 0)return;const o=r.callbacks.indexOf(e);o>-1&&r.callbacks.splice(o,1),r.callbacks.length===0&&(_a.delete(t),_a.size===0&&cancelAnimationFrame(fp))}}let fp;const _a=new Map;function fy(){const t=[];_a.forEach((e,n)=>{const r=n.getBoundingClientRect();var o,c;o=e.rect,c=r,(o.width!==c.width||o.height!==c.height||o.top!==c.top||o.right!==c.right||o.bottom!==c.bottom||o.left!==c.left)&&(e.rect=r,t.push(e))}),t.forEach(e=>{e.callbacks.forEach(n=>n(e.rect))}),fp=requestAnimationFrame(fy)}function dy(t){const[e,n]=ae.useState();return ae.useEffect(()=>{if(t){const r=Uw(t,n);return()=>{n(void 0),r()}}},[t]),e}function hy(t,e=[]){let n=[];const r=()=>{const o=n.map(c=>ae.createContext(c));return function(c){const h=(c==null?void 0:c[t])||o;return ae.useMemo(()=>({[`__scope${t}`]:{...c,[t]:h}}),[c,h])}};return r.scopeName=t,[function(o,c){const h=ae.createContext(c),v=n.length;function g(x){const{scope:m,children:w,...A}=x,k=(m==null?void 0:m[t][v])||h,M=ae.useMemo(()=>A,Object.values(A));return ae.createElement(k.Provider,{value:M},w)}return n=[...n,c],g.displayName=o+"Provider",[g,function(x,m){const w=(m==null?void 0:m[t][v])||h,A=ae.useContext(w);if(A)return A;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${o}\``)}]},jw(r,...e)]}function jw(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const c=r.reduce((h,{useScope:v,scopeName:g})=>({...h,...v(o)[`__scope${g}`]}),{});return ae.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return n.scopeName=e.scopeName,n}function Iw({anchorRect:t,popperSize:e,arrowSize:n,arrowOffset:r=0,side:o,sideOffset:c=0,align:h,alignOffset:v=0,shouldAvoidCollisions:g=!0,collisionBoundariesRect:x,collisionTolerance:m=0}){if(!t||!e||!x)return{popperStyles:Fw,arrowStyles:dp};const w=function(J,ie,$=0,re=0,me){const Re=me?me.height:0,Se=py(ie,J,"x"),Fe=py(ie,J,"y"),ke=Fe.before-$-Re,Xe=Fe.after+$+Re,ft=Se.before-$-Re,Te=Se.after+$+Re;return{top:{start:{x:Se.start+re,y:ke},center:{x:Se.center,y:ke},end:{x:Se.end-re,y:ke}},right:{start:{x:Te,y:Fe.start+re},center:{x:Te,y:Fe.center},end:{x:Te,y:Fe.end-re}},bottom:{start:{x:Se.start+re,y:Xe},center:{x:Se.center,y:Xe},end:{x:Se.end-re,y:Xe}},left:{start:{x:ft,y:Fe.start+re},center:{x:ft,y:Fe.center},end:{x:ft,y:Fe.end-re}}}}(e,t,c,v,n),A=w[o][h];if(g===!1){const J=vy(A);let ie=dp;return n&&(ie=gy({popperSize:e,arrowSize:n,arrowOffset:r,side:o,align:h})),{popperStyles:{...J,"--radix-popper-transform-origin":my(e,o,h,r,n)},arrowStyles:ie,placedSide:o,placedAlign:h}}const k=DOMRect.fromRect({...e,...A}),M=(_=x,L=m,DOMRect.fromRect({width:_.width-2*L,height:_.height-2*L,x:_.left+L,y:_.top+L}));var _,L;const P=Sy(k,M),O=w[yy(o)][h],H=function(J,ie,$){const re=yy(J);return ie[J]&&!$[re]?re:J}(o,P,Sy(DOMRect.fromRect({...e,...O}),M)),q=function(J,ie,$,re,me){const Re=$==="top"||$==="bottom",Se=Re?"left":"top",Fe=Re?"right":"bottom",ke=Re?"width":"height",Xe=ie[ke]>J[ke];return(re==="start"||re==="center")&&(me[Se]&&Xe||me[Fe]&&!Xe)?"end":(re==="end"||re==="center")&&(me[Fe]&&Xe||me[Se]&&!Xe)?"start":re}(e,t,o,h,P),Q=vy(w[H][q]);let B=dp;return n&&(B=gy({popperSize:e,arrowSize:n,arrowOffset:r,side:H,align:q})),{popperStyles:{...Q,"--radix-popper-transform-origin":my(e,H,q,r,n)},arrowStyles:B,placedSide:H,placedAlign:q}}function py(t,e,n){const r=t[n==="x"?"left":"top"],o=n==="x"?"width":"height",c=t[o],h=e[o];return{before:r-h,start:r,center:r+(c-h)/2,end:r+c-h,after:r+c}}function vy(t){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(t.x+window.scrollX)}px, ${Math.round(t.y+window.scrollY)}px, 0)`}}function my(t,e,n,r,o){const c=e==="top"||e==="bottom",h=o?o.width:0,v=o?o.height:0,g=h/2+r;let x="",m="";return c?(x={start:`${g}px`,center:"center",end:t.width-g+"px"}[n],m=e==="top"?`${t.height+v}px`:-v+"px"):(x=e==="left"?`${t.width+v}px`:-v+"px",m={start:`${g}px`,center:"center",end:t.height-g+"px"}[n]),`${x} ${m}`}const Fw={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},dp={position:"absolute",opacity:0};function gy({popperSize:t,arrowSize:e,arrowOffset:n,side:r,align:o}){const c=(t.width-e.width)/2,h=(t.height-e.width)/2,v={top:0,right:90,bottom:180,left:-90}[r],g=Math.max(e.width,e.height),x={width:`${g}px`,height:`${g}px`,transform:`rotate(${v}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:Bw(r,o)};return r!=="top"&&r!=="bottom"||(o==="start"&&(x.left=`${n}px`),o==="center"&&(x.left=`${c}px`),o==="end"&&(x.right=`${n}px`)),r!=="left"&&r!=="right"||(o==="start"&&(x.top=`${n}px`),o==="center"&&(x.top=`${h}px`),o==="end"&&(x.bottom=`${n}px`)),x}function Bw(t,e){return(t!=="top"&&t!=="right"||e!=="end")&&(t!=="bottom"&&t!=="left"||e==="end")?"ltr":"rtl"}function yy(t){return{top:"bottom",right:"left",bottom:"top",left:"right"}[t]}function Sy(t,e){return{top:t.top<e.top,right:t.right>e.right,bottom:t.bottom>e.bottom,left:t.left<e.left}}const[by,xy]=hy("Popper"),[Hw,Ey]=by("Popper"),Ww=t=>{const{__scopePopper:e,children:n}=t,[r,o]=ae.useState(null);return ae.createElement(Hw,{scope:e,anchor:r,onAnchorChange:o},n)},Vw=ae.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...o}=t,c=Ey("PopperAnchor",n),h=ae.useRef(null),v=yf(e,h);return ae.useEffect(()=>{c.onAnchorChange((r==null?void 0:r.current)||h.current)}),r?null:ae.createElement(ll.div,li({},o,{ref:v}))}),[$w,qw]=by("PopperContent"),Yw=ae.forwardRef((t,e)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:c="center",alignOffset:h,collisionTolerance:v,avoidCollisions:g=!0,...x}=t,m=Ey("PopperContent",n),[w,A]=ae.useState(),k=dy(m.anchor),[M,_]=ae.useState(null),L=cy(M),[P,O]=ae.useState(null),H=cy(P),q=yf(e,Re=>_(Re)),Q=function(){const[Re,Se]=ae.useState(void 0);return ae.useEffect(()=>{let Fe;function ke(){Se({width:window.innerWidth,height:window.innerHeight})}function Xe(){window.clearTimeout(Fe),Fe=window.setTimeout(ke,100)}return ke(),window.addEventListener("resize",Xe),()=>window.removeEventListener("resize",Xe)},[]),Re}(),B=Q?DOMRect.fromRect({...Q,x:0,y:0}):void 0,{popperStyles:J,arrowStyles:ie,placedSide:$,placedAlign:re}=Iw({anchorRect:k,popperSize:L,arrowSize:H,arrowOffset:w,side:r,sideOffset:o,align:c,alignOffset:h,shouldAvoidCollisions:g,collisionBoundariesRect:B,collisionTolerance:v}),me=$!==void 0;return ae.createElement("div",{style:J,"data-radix-popper-content-wrapper":""},ae.createElement($w,{scope:n,arrowStyles:ie,onArrowChange:O,onArrowOffsetChange:A},ae.createElement(ll.div,li({"data-side":$,"data-align":re},x,{style:{...x.style,animation:me?void 0:"none"},ref:q}))))}),Qw=ae.forwardRef(function(t,e){const{__scopePopper:n,offset:r,...o}=t,c=qw("PopperArrow",n),{onArrowOffsetChange:h}=c;return ae.useEffect(()=>h(r),[h,r]),ae.createElement("span",{style:{...c.arrowStyles,pointerEvents:"none"}},ae.createElement("span",{ref:c.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},ae.createElement(_w,li({},o,{ref:e,style:{...o.style,display:"block"}}))))}),Gw=Ww,Xw=Vw,Kw=Yw,Zw=Qw,wy=t=>{const{present:e,children:n}=t,r=function(h){const[v,g]=ae.useState(),x=ae.useRef({}),m=ae.useRef(h),w=ae.useRef("none"),A=h?"mounted":"unmounted",[k,M]=function(_,L){return ae.useReducer((P,O)=>{const H=L[P][O];return H??P},_)}(A,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ae.useEffect(()=>{const _=Rf(x.current);w.current=k==="mounted"?_:"none"},[k]),Sf(()=>{const _=x.current,L=m.current;if(L!==h){const P=w.current,O=Rf(_);h?M("MOUNT"):O==="none"||(_==null?void 0:_.display)==="none"?M("UNMOUNT"):M(L&&P!==O?"ANIMATION_OUT":"UNMOUNT"),m.current=h}},[h,M]),Sf(()=>{if(v){const _=P=>{const O=Rf(x.current).includes(P.animationName);P.target===v&&O&&M("ANIMATION_END")},L=P=>{P.target===v&&(w.current=Rf(x.current))};return v.addEventListener("animationstart",L),v.addEventListener("animationcancel",_),v.addEventListener("animationend",_),()=>{v.removeEventListener("animationstart",L),v.removeEventListener("animationcancel",_),v.removeEventListener("animationend",_)}}},[v,M]),{isPresent:["mounted","unmountSuspended"].includes(k),ref:ae.useCallback(_=>{_&&(x.current=getComputedStyle(_)),g(_)},[])}}(e),o=typeof n=="function"?n({present:r.isPresent}):ae.Children.only(n),c=yf(r.ref,o.ref);return typeof n=="function"||r.isPresent?ae.cloneElement(o,{ref:c}):null};function Rf(t){return(t==null?void 0:t.animationName)||"none"}wy.displayName="Presence";function Ty(t){const e=ae.useRef(t);return ae.useEffect(()=>{e.current=t},[t]),e.current}function hp(t){const e=ae.useRef(t);return ae.useEffect(()=>{e.current=t}),ae.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Jw(t){const e=hp(t);ae.useEffect(()=>{const n=r=>{r.key==="Escape"&&e(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e])}function eT({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,o]=function({defaultProp:g,onChange:x}){const m=ae.useState(g),[w]=m,A=ae.useRef(w),k=hp(x);return ae.useEffect(()=>{A.current!==w&&(k(w),A.current=w)},[w,A,k]),m}({defaultProp:e,onChange:n}),c=t!==void 0,h=c?t:r,v=hp(n);return[h,ae.useCallback(g=>{if(c){const x=g,m=typeof g=="function"?x(t):g;m!==t&&v(m)}else o(g)},[c,t,o,v])]}function ul(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}const[Cy,mP]=hy("Tooltip",[xy]),Af=xy(),tT=700,[gP,nT]=Cy("TooltipProvider",{isOpenDelayed:!0,delayDuration:tT,onOpen:()=>{},onClose:()=>{}}),[iT,Mf]=Cy("Tooltip"),rT=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o=!1,onOpenChange:c,delayDuration:h}=t,v=nT("Tooltip",e),g=Af(e),[x,m]=ae.useState(null),w=Pw(),A=ae.useRef(0),k=h??v.delayDuration,M=ae.useRef(!1),{onOpen:_,onClose:L}=v,[P=!1,O]=eT({prop:r,defaultProp:o,onChange:B=>{B&&(document.dispatchEvent(new CustomEvent("tooltip.open")),_()),c==null||c(B)}}),H=ae.useMemo(()=>P?M.current?"delayed-open":"instant-open":"closed",[P]),q=ae.useCallback(()=>{window.clearTimeout(A.current),M.current=!1,O(!0)},[O]),Q=ae.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{M.current=!0,O(!0)},k)},[k,O]);return ae.useEffect(()=>()=>window.clearTimeout(A.current),[]),ae.createElement(Gw,g,ae.createElement(iT,{scope:e,contentId:w,open:P,stateAttribute:H,trigger:x,onTriggerChange:m,onTriggerEnter:ae.useCallback(()=>{v.isOpenDelayed?Q():q()},[v.isOpenDelayed,Q,q]),onOpen:ae.useCallback(q,[q]),onClose:ae.useCallback(()=>{window.clearTimeout(A.current),O(!1),L()},[O,L])},n))},sT=ae.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=Mf("TooltipTrigger",n),c=Af(n),h=yf(e,o.onTriggerChange),v=ae.useRef(!1),g=ae.useCallback(()=>v.current=!1,[]);return ae.useEffect(()=>()=>document.removeEventListener("mouseup",g),[g]),ae.createElement(Xw,li({asChild:!0},c),ae.createElement(ll.button,li({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:h,onMouseEnter:ul(t.onMouseEnter,o.onTriggerEnter),onMouseLeave:ul(t.onMouseLeave,o.onClose),onMouseDown:ul(t.onMouseDown,()=>{o.onClose(),v.current=!0,document.addEventListener("mouseup",g,{once:!0})}),onFocus:ul(t.onFocus,()=>{v.current||o.onOpen()}),onBlur:ul(t.onBlur,o.onClose),onClick:ul(t.onClick,o.onClose)})))}),aT=ae.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Mf("TooltipContent",t.__scopeTooltip);return ae.createElement(wy,{present:n||o.open},ae.createElement(oT,li({ref:e},r)))}),oT=ae.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":o,portalled:c=!0,...h}=t,v=Mf("TooltipContent",n),g=Af(n),x=c?Nw:ae.Fragment,{onClose:m}=v;return Jw(()=>m()),ae.useEffect(()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m)),[m]),ae.createElement(x,null,ae.createElement(uT,{__scopeTooltip:n}),ae.createElement(Kw,li({"data-state":v.stateAttribute},g,h,{ref:e,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),ae.createElement(Pg,null,r),ae.createElement(zw,{id:v.contentId,role:"tooltip"},o||r)))}),lT=ae.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=Af(n);return ae.createElement(Zw,li({},o,r,{ref:e}))});function uT(t){const{__scopeTooltip:e}=t,n=Mf("CheckTriggerMoved",e),r=dy(n.trigger),o=r==null?void 0:r.left,c=Ty(o),h=r==null?void 0:r.top,v=Ty(h),g=n.onClose;return ae.useEffect(()=>{(c!==void 0&&c!==o||v!==void 0&&v!==h)&&g()},[g,c,v,o,h]),null}const cT=rT,fT=sT,dT=aT,hT=lT;function pT(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,c;for(c=0;c<r.length;c++)o=r[c],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function gs(t,e){if(t==null)return{};var n=pT(t,e),r,o;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(o=0;o<c.length;o++)r=c[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}let Si;(function(t){t[t.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",t[t.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",t[t.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",t[t.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",t[t.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",t[t.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",t[t.THEME_ERROR=6]="THEME_ERROR",t[t.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",t[t.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",t[t.EMPTY_KEY=9]="EMPTY_KEY"})(Si||(Si={}));const vT={[Si.UNSUPPORTED_INPUT]:(t,e)=>[`An input with type \`${t}\` input was found at path \`${e}\` but it's not supported yet.`],[Si.NO_COMPONENT_FOR_TYPE]:(t,e)=>[`Type \`${t}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[Si.UNKNOWN_INPUT]:(t,e)=>[`input at path \`${t}\` is not recognized.`,e],[Si.DUPLICATE_KEYS]:(t,e,n)=>[`Key \`${t}\` of path \`${e}\` already exists at path \`${n}\`. Even nested keys need to be unique. Rename one of the keys.`],[Si.ALREADY_REGISTERED_TYPE]:t=>[`Type ${t} has already been registered. You can't register a component with the same type.`],[Si.CLIPBOARD_ERROR]:t=>["Error copying the value",t],[Si.THEME_ERROR]:(t,e)=>[`Error accessing the theme \`${t}.${e}\` value.`],[Si.PATH_DOESNT_EXIST]:t=>[`Error getting the value at path \`${t}\`. There is probably an error in your \`render\` function.`],[Si.PATH_DOESNT_EXIST]:t=>[`Error accessing the value at path \`${t}\``],[Si.INPUT_TYPE_OVERRIDE]:(t,e,n)=>[`Input at path \`${t}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${n}\`.`],[Si.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function Ry(t,e,...n){const[r,...o]=vT[e](...n);console[t]("LEVA: "+r,...o)}const Ay=Ry.bind(null,"warn");Ry.bind(null,"log");function yP(t){return t}function mT(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function My(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ua(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?My(Object(n),!0).forEach(function(r){mT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const Gs=(t,e,n)=>t>n?n:t<e?e:t,gT=t=>{if(t===""||typeof t=="number")return t;try{const e=Xs(t);if(!isNaN(e))return e}catch{}return parseFloat(t)},yT=Math.log(10);function Oy(t){let e=Math.abs(+String(t).replace(".",""));if(e===0)return .01;for(;e!==0&&e%10===0;)e/=10;const n=Math.floor(Math.log(e)/yT)+1,r=Math.floor(Math.log10(Math.abs(t))),o=Math.pow(10,r-n);return Math.max(o,.001)}const ST=(t,e,n)=>n===e?0:(Gs(t,e,n)-e)/(n-e),Dy=(t,e,n)=>t*(n-e)+e,Ly=/\(([0-9+\-*/^ .]+)\)/,Py=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,ky=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,zy=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Ny=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,_y=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function Xs(t){if(isNaN(Number(t)))if(Ly.test(t)){const e=t.replace(Ly,(n,r)=>String(Xs(r)));return Xs(e)}else if(Py.test(t)){const e=t.replace(Py,(n,r,o)=>String(Math.pow(Number(r),Number(o))));return Xs(e)}else if(ky.test(t)){const e=t.replace(ky,(n,r,o)=>String(Number(r)*Number(o)));return Xs(e)}else if(zy.test(t)){const e=t.replace(zy,(n,r,o)=>{if(o!=0)return String(Number(r)/Number(o));throw new Error("Division by zero")});return Xs(e)}else if(Ny.test(t)){const e=t.replace(Ny,(n,r,o)=>String(Number(r)+Number(o)));return Xs(e)}else if(_y.test(t)){const e=t.replace(_y,(n,r,o)=>String(Number(r)-Number(o)));return Xs(e)}else return Number(t);return Number(t)}let Uy;(function(t){t.BUTTON="BUTTON",t.BUTTON_GROUP="BUTTON_GROUP",t.MONITOR="MONITOR",t.FOLDER="FOLDER"})(Uy||(Uy={}));let jy;(function(t){t.SELECT="SELECT",t.IMAGE="IMAGE",t.NUMBER="NUMBER",t.COLOR="COLOR",t.STRING="STRING",t.BOOLEAN="BOOLEAN",t.INTERVAL="INTERVAL",t.VECTOR3D="VECTOR3D",t.VECTOR2D="VECTOR2D"})(jy||(jy={}));const bT=t=>t.shiftKey?5:t.altKey?1/5:1,xT=["value"],ET=["min","max"],wT=t=>{if(typeof t=="number")return!0;if(typeof t=="string"){const e=parseFloat(t);return isNaN(e)?!1:t.substring((""+e).length).trim().length<4}return!1},TT=(t,{min:e=-1/0,max:n=1/0,suffix:r})=>{const o=parseFloat(t);if(t===""||isNaN(o))throw Error("Invalid number");const c=Gs(o,e,n);return r?c+r:c},CT=(t,{pad:e=0,suffix:n})=>{const r=parseFloat(t).toFixed(e);return n?r+n:r},RT=t=>{let{value:e}=t,n=gs(t,xT);const{min:r=-1/0,max:o=1/0}=n,c=gs(n,ET);let h=parseFloat(e);const v=typeof e=="string"?e.substring((""+h).length):void 0;h=Gs(h,r,o);let g=n.step;g||(Number.isFinite(r)?Number.isFinite(o)?g=+(Math.abs(o-r)/100).toPrecision(1):g=+(Math.abs(h-r)/100).toPrecision(1):Number.isFinite(o)&&(g=+(Math.abs(o-h)/100).toPrecision(1)));const x=g?Oy(g)*10:Oy(h);g=g||x/10;const m=Math.round(Gs(Math.log10(1/x),0,2));return{value:v?h+v:h,settings:Ua({initialValue:h,step:g,pad:m,min:r,max:o,suffix:v},c)}},Iy=(t,{step:e,initialValue:n})=>{const r=Math.round((t-n)/e);return n+r*e};var AT=Object.freeze({__proto__:null,schema:wT,sanitize:TT,format:CT,normalize:RT,sanitizeStep:Iy});function Gi(){return Gi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gi.apply(this,arguments)}const MT=C.createContext({});function ys(){return C.useContext(MT)}const OT=C.createContext(null);C.createContext(null);const DT=C.createContext(null);function LT(){return C.useContext(DT)}const PT=()=>({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Of(t,e){const[n,r]=t.split(" "),o={};return n!=="none"&&(o.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${n!=="default"&&n||e.borderColor}`),r&&(o.backgroundColor=r),o}const Pu={$inputStyle:()=>t=>Of(t,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>t=>Of(t,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>t=>Of(t,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>t=>Of(t,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:_t,css:SP,createTheme:bP,globalCss:kT,keyframes:xP}=_E({prefix:"leva",theme:PT(),utils:Ua(Ua({},Pu),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:t=>({"&:focus":Pu.$focusStyle()(t)}),$focusWithin:t=>({"&:focus-within":Pu.$focusStyle()(t)}),$hover:t=>({"&:hover":Pu.$hoverStyle()(t)}),$active:t=>({"&:active":Pu.$activeStyle()(t)})})});kT({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function zT(t,e){const{theme:n}=C.useContext(OT);if(!(t in n)||!(e in n[t]))return Ay(Si.THEME_ERROR,t,e),"";let r=e;for(;;){let o=n[t][r];if(typeof o=="string"&&o.charAt(0)==="$")r=o.substr(1);else return o}}const Fy=_t("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),By=_t("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${Fy}`]:{paddingLeft:0}}),NT=_t(By,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),_T=_t("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),UT=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],jT=["onUpdate"];function Hy(t){let{innerLabel:e,value:n,onUpdate:r,onChange:o,onKeyDown:c,type:h,id:v,inputType:g="text",rows:x=0}=t,m=gs(t,UT);const{id:w,emitOnEditStart:A,emitOnEditEnd:k,disabled:M}=ys(),_=v||w,L=C.useRef(null),P=x>0,O=P?"textarea":"input",H=C.useCallback(B=>J=>{const ie=J.currentTarget.value;B(ie)},[]);C.useEffect(()=>{const B=L.current,J=H(ie=>{r(ie),k()});return B==null||B.addEventListener("blur",J),()=>B==null?void 0:B.removeEventListener("blur",J)},[H,r,k]);const q=C.useCallback(B=>{B.key==="Enter"&&H(r)(B)},[H,r]),Q=Object.assign({as:O},P?{rows:x}:{},m);return C.createElement(_T,{textArea:P},e&&typeof e=="string"?C.createElement(By,null,e):e,C.createElement(Fy,Gi({levaType:h,ref:L,id:_,type:g,autoComplete:"off",spellCheck:"false",value:n,onChange:H(o),onFocus:()=>A(),onKeyPress:q,onKeyDown:c,disabled:M},Q)))}function IT(t){let{onUpdate:e}=t,n=gs(t,jT);const r=C.useCallback(c=>e(gT(c)),[e]),o=C.useCallback(c=>{const h=c.key==="ArrowUp"?1:c.key==="ArrowDown"?-1:0;if(h){c.preventDefault();const v=c.altKey?.1:c.shiftKey?10:1;e(g=>parseFloat(g)+h*v)}},[e]);return C.createElement(Hy,Gi({},n,{onUpdate:r,onKeyDown:o,type:"number"}))}const pp=_t("div",{}),Wy=_t("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]});_t("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${Wy}::after`]:{opacity:.6},[`${pp}:hover > & + ${Wy}::after`]:{opacity:.6},[`${pp}:hover > & > svg`]:{opacity:1}});const FT=_t("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${pp}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),Vy=_t("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${FT} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),BT=_t(Vy,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),HT=_t("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),WT=_t("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),vp=_t("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}});_t("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${vp}`]:{pointerEvents:"auto"}}}}}),_t("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"});const VT=_t("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),$T=_t(hT,{fill:"$toolTipBackground"}),qT=["align"];function YT(){const{id:t,disable:e,disabled:n}=ys();return C.createElement(C.Fragment,null,C.createElement(WT,{id:t+"__disable",type:"checkbox",checked:!n,onChange:()=>e(!n)}),C.createElement("label",{htmlFor:t+"__disable"}))}function QT(t){const{id:e,optional:n,hint:r}=ys(),o=t.htmlFor||(e?{htmlFor:e}:null),c=!r&&typeof t.children=="string"?{title:t.children}:null;return C.createElement(C.Fragment,null,n&&C.createElement(YT,null),r!==void 0?C.createElement(cT,null,C.createElement(fT,{asChild:!0},C.createElement(vp,Gi({},o,t))),C.createElement(dT,{side:"top",sideOffset:2},C.createElement(VT,null,r,C.createElement($T,null)))):C.createElement(vp,Gi({},o,c,t)))}function Df(t){let{align:e}=t,n=gs(t,qT);const{value:r,label:o,key:c,disabled:h}=ys(),{hideCopyButton:v}=LT(),g=!v&&c!==void 0,[x,m]=C.useState(!1),w=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[c]:r??""})),m(!0)}catch{Ay(Si.CLIPBOARD_ERROR,{[c]:r})}};return C.createElement(HT,{align:e,onPointerLeave:()=>m(!1)},C.createElement(QT,n),g&&!h&&C.createElement("div",{title:`Click to copy ${typeof o=="string"?o:c} value`},x?C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},C.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),C.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):C.createElement("svg",{onClick:w,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},C.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),C.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const GT=["toggled"],XT=_t("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function KT(t){let{toggled:e}=t,n=gs(t,GT);return C.createElement(XT,Gi({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},n),C.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const ZT=["input"];function Lf(t){let{input:e}=t,n=gs(t,ZT);return e?C.createElement(BT,n):C.createElement(Vy,n)}function $y(t,e){const{emitOnEditStart:n,emitOnEditEnd:r}=ys();return Ow(o=>{o.first&&(document.body.classList.add("leva__panel__dragged"),n==null||n());const c=t(o);return o.last&&(document.body.classList.remove("leva__panel__dragged"),r==null||r()),c},e)}const JT=_t("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),eC=_t("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),tC=_t("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),nC=_t("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),iC=_t("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function rC({value:t,min:e,max:n,onDrag:r,step:o,initialValue:c}){const h=C.useRef(null),v=C.useRef(null),g=C.useRef(0),x=zT("sizes","scrubberWidth"),m=$y(({event:A,first:k,xy:[M],movement:[_],memo:L})=>{if(k){const{width:O,left:H}=h.current.getBoundingClientRect();g.current=O-parseFloat(x),L=(A==null?void 0:A.target)===v.current?t:Dy((M-H)/O,e,n)}const P=L+Dy(_/g.current,0,n-e);return r(Iy(P,{step:o,initialValue:c})),L}),w=ST(t,e,n);return C.createElement(nC,Gi({ref:h},m()),C.createElement(eC,null,C.createElement(iC,{style:{left:0,right:`${(1-w)*100}%`}})),C.createElement(tC,{ref:v,style:{left:`calc(${w} * (100% - ${x}))`}}))}const sC=C.memo(({label:t,onUpdate:e,step:n,innerLabelTrim:r})=>{const[o,c]=C.useState(!1),h=$y(({active:v,delta:[g],event:x,memo:m=0})=>(c(v),m+=g/2,Math.abs(m)>=1&&(e(w=>parseFloat(w)+Math.floor(m)*n*bT(x)),m=0),m));return C.createElement(NT,Gi({dragging:o,title:t.length>1?t:""},h()),t.slice(0,r))});function aC({label:t,id:e,displayValue:n,onUpdate:r,onChange:o,settings:c,innerLabelTrim:h=1}){const v=h>0&&C.createElement(sC,{label:t,step:c.step,onUpdate:r,innerLabelTrim:h});return C.createElement(IT,{id:e,value:String(n),onUpdate:r,onChange:o,innerLabel:v})}function oC(){const t=ys(),{label:e,value:n,onUpdate:r,settings:o,id:c}=t,{min:h,max:v}=o,g=v!==1/0&&h!==-1/0;return C.createElement(Lf,{input:!0},C.createElement(Df,null,e),C.createElement(JT,{hasRange:g},g&&C.createElement(rC,Gi({value:parseFloat(n),onDrag:r},o)),C.createElement(aC,Gi({},t,{id:c,label:"value",innerLabelTrim:g?0:1}))))}const lC=gs(AT,["sanitizeStep"]);Ua({component:oC},lC);var uC=Object.freeze({__proto__:null,schema:(t,e)=>Qs().schema({options:Qs().passesAnyOf(Qs().object(),Qs().array())}).test(e),sanitize:(t,{values:e})=>{if(e.indexOf(t)<0)throw Error("Selected value doesn't match Select options");return t},format:(t,{values:e})=>e.indexOf(t),normalize:t=>{let{value:e,options:n}=t,r,o;return Array.isArray(n)?(o=n,r=n.map(c=>String(c))):(o=Object.values(n),r=Object.keys(n)),"value"in t?o.includes(e)||(r.unshift(String(e)),o.unshift(e)):e=o[0],Object.values(n).includes(e)||(n[String(e)]=e),{value:e,settings:{keys:r,values:o}}}});const cC=_t("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),mp=_t("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),fC=_t("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${mp}:focus + &`]:{$focusStyle:""},[`${mp}:hover + &`]:{$hoverStyle:""}});function dC({displayValue:t,value:e,onUpdate:n,id:r,settings:o,disabled:c}){const{keys:h,values:v}=o,g=C.useRef();return e===v[t]&&(g.current=h[t]),C.createElement(cC,null,C.createElement(mp,{id:r,value:t,onChange:x=>n(v[Number(x.currentTarget.value)]),disabled:c},h.map((x,m)=>C.createElement("option",{key:x,value:m},x))),C.createElement(fC,null,g.current),C.createElement(KT,{toggled:!0}))}function hC(){const{label:t,value:e,displayValue:n,onUpdate:r,id:o,disabled:c,settings:h}=ys();return C.createElement(Lf,{input:!0},C.createElement(Df,null,t),C.createElement(dC,{id:o,value:e,displayValue:n,onUpdate:r,settings:h,disabled:c}))}Ua({component:hC},uC);var pC=Object.freeze({__proto__:null,schema:t=>Qs().string().test(t),sanitize:t=>{if(typeof t!="string")throw Error("Invalid string");return t},normalize:({value:t,editable:e=!0,rows:n=!1})=>({value:t,settings:{editable:e,rows:typeof n=="number"?n:n?5:0}})});const vC=["displayValue","onUpdate","onChange","editable"],mC=_t("div",{whiteSpace:"pre-wrap"});function gC(t){let{displayValue:e,onUpdate:n,onChange:r,editable:o=!0}=t,c=gs(t,vC);return o?C.createElement(Hy,Gi({value:e,onUpdate:n,onChange:r},c)):C.createElement(mC,null,e)}function yC(){const{label:t,settings:e,displayValue:n,onUpdate:r,onChange:o}=ys();return C.createElement(Lf,{input:!0},C.createElement(Df,null,t),C.createElement(gC,Gi({displayValue:n,onUpdate:r,onChange:o},e)))}Ua({component:yC},pC);var SC=Object.freeze({__proto__:null,schema:t=>Qs().boolean().test(t),sanitize:t=>{if(typeof t!="boolean")throw Error("Invalid boolean");return t}});const bC=_t("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function xC({value:t,onUpdate:e,id:n,disabled:r}){return C.createElement(bC,null,C.createElement("input",{id:n,type:"checkbox",checked:t,onChange:o=>e(o.currentTarget.checked),disabled:r}),C.createElement("label",{htmlFor:n},C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function EC(){const{label:t,value:e,onUpdate:n,disabled:r,id:o}=ys();return C.createElement(Lf,{input:!0},C.createElement(Df,null,t),C.createElement(xC,{value:e,onUpdate:n,id:o,disabled:r}))}Ua({component:EC},SC),_t("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});class ja extends Hr{constructor(e){super(),this.type="spacial-content",this.style={opacity:1},this.format="jpg",this.tileUrl=iE(e.url),this.id=e.id||`${this.tileUrl}--${e.scaleFactor}`,this.points=e.displayPoints?e.displayPoints:vs(e.points,Ys(e.scaleFactor)),this.tileWidth=e.tileWidth,this.display={x:0,y:0,width:e.width/e.scaleFactor,height:e.height/e.scaleFactor,points:e.points,scale:e.scaleFactor},e.format&&(this.format=e.format)}applyProps(e){if(e.style&&typeof e.style.opacity<"u"&&(this.style.opacity=e.style.opacity),e.service!==this.service&&(this.service=e.service),e.format?this.format=e.format:this.format="jpg",e.crop){this.cropData=e.crop;const n=$e([...this.points]),r=n.length/5,o=e.crop.x||0,c=e.crop.y||0,h=e.crop.x+e.crop.width,v=e.crop.y+e.crop.height;for(let g=0;g<r;g++){const x=g*5;n[x+1]<h&&n[x+3]>o&&n[x+2]<v&&n[x+4]>c?(n[x+1]=Gs(n[x+1],o,h),n[x+3]=Gs(n[x+3],o,h),n[x+2]=Gs(n[x+2],c,v),n[x+4]=Gs(n[x+4],c,v)):n[x]=0}Br(n,gi(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(n):this.crop=n}}static fromTile(e,n,r,o,c,h){r.height=r.height?r.height:r.width;const v=Math.ceil(n.width/o),g=Math.ceil(n.height/o),x=Math.ceil(v/r.width),m=Math.ceil(g/r.height),w=Et.grid(x,m),A=Et.grid(x,m);for(let M=0;M<m;M++)for(let _=0;_<x;_++){const L=_*r.width,P=M*r.height;A.addPoints(L*o,P*o,_===x-1?n.width:(L+r.width)*o,M===m-1?n.height:(P+r.height)*o),w.addPoints(L,P,_===x-1?v:L+r.width,M===m-1?g:P+r.height)}const k=new ja({url:e,scaleFactor:o,points:w.build(),displayPoints:A.build(),width:n.width,height:n.height,tileWidth:r.width,format:h});return k.applyProps({service:c}),k}getImageUrl(e){const n=this.points.slice(e*5,e*5+5),r=n[3]-n[1],o=n[4]-n[2],c=Math.ceil(r/this.display.scale);return`${this.tileUrl}/${n[1]},${n[2]},${r},${o}/${c>this.tileWidth?this.tileWidth:c},/0/default.${this.format||"jpg"}`}getAllPointsAt(e,n,r){const o=Cu(this.crop||this.points,e);return[[this,o,n]]}transform(e){Br(this.points,e)}getScheduledUpdates(e,n){return[]}}class wC extends Hr{constructor(){super(...arguments),this.type="spacial-content"}getAllPointsAt(e,n,r){return[[this,this.points,n]]}}class TC extends wC{constructor(e){super(),this.images=[],this.allImages=[],this.scaleFactors=[],this.aggregateBuffer=$e(9),this.isFullyLoaded=!1,this.maxScaleFactor=0,this._scheduleSortByScales=!1,this._sortByScales=()=>{this._scheduleSortByScales=!1,this.allImages.sort((r,o)=>o.display.width-r.display.width),this.images=[];let n=.1;for(const r of this.allImages){if(r.display.width<this.renderOptions.minSize&&r.display.height<this.renderOptions.minSize&&!r.priority||r instanceof xr&&(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){const c=this.images.pop();c&&(c instanceof xr||c.priority)?(r.priority&&this.images.push(r),this.images.push(c)):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)},this.loadFullResource=async()=>{if(!this.isFullyLoaded&&this.lazyLoader){this.isFullyLoaded=!0;const n=await this.lazyLoader();this.addImages(n)}},this.fallback=[this.loadFullResource],this.id=e.id,this.points=Et.singleBox(e.width,e.height),this.lazyLoader=e.loadFullImages,e.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:Et.singleBox(e.width,e.height),height:e.height,width:e.width,scale:1},this.renderOptions={renderSmallestFallback:!0,renderLayers:3,minSize:255,maxImageSize:1024,quality:1.2,...e.renderOptions||{}},this.addImages(e.images)}applyProps(e){typeof e.renderSmallestFallback<"u"&&e.renderSmallestFallback!==this.renderOptions.renderSmallestFallback&&(this.renderOptions.renderSmallestFallback=e.renderSmallestFallback),typeof e.renderLayers<"u"&&e.renderLayers!==this.renderOptions.renderLayers&&(this.renderOptions.renderLayers=e.renderLayers),typeof e.minSize<"u"&&e.minSize!==this.renderOptions.minSize&&(this.renderOptions.minSize=e.minSize),typeof e.maxImageSize<"u"&&e.maxImageSize!==this.renderOptions.maxImageSize&&(this.renderOptions.maxImageSize=e.maxImageSize),typeof e.quality<"u"&&e.quality!==this.renderOptions.quality&&(this.renderOptions.quality=e.quality)}appendChild(e){this.addImages([e])}removeChild(e){this.images.indexOf(e)!==-1&&(this.images=this.images.filter(n=>n!==e),this.sortByScales())}insertBefore(e,n){this.addImages([e])}hideInstance(){}addImages(e){for(const n of e)n.__parent=this,n.__owner=this.__owner;this.allImages.push(...e.filter(Boolean)),this.sortByScales()}sortByScales(){this._scheduleSortByScales=!0}getScheduledUpdates(e,n){return this._scheduleSortByScales?[this._sortByScales]:this.isFullyLoaded?[]:n>1/this.maxScaleFactor?this.fallback:[]}getAllPointsAt(e,n,r){if(this.images.length===0)return[];const o=nE(1/(r||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),c=this.images.length,h=n?ps(n,gi(this.x,this.y)):gi(this.x,this.y);if(o!==this.images.length-1&&this.images[o+1]){let v=[];for(let m=c-1;m>=o;m--)v.push(m);const g=v[0];this.renderOptions.renderLayers&&(v=v.slice(-this.renderOptions.renderLayers)),this.renderOptions.renderSmallestFallback&&v.indexOf(g)===-1&&v.unshift(g);const x=[];for(let m=0;m<v.length;m++)x.push(...this.images[v[m]].getAllPointsAt(e,h,r));return x}return this.images[o].getAllPointsAt(e,h,r)}}function Pf(t,e,n,r,o){const c=Math.PI/180*o,h=Math.cos(c),v=Math.sin(c),g=h*(n-t)+v*(r-e)+t,x=h*(r-e)-v*(n-t)+e;return[g,x]}class ku extends Hr{constructor(e,n){super(),this.type="world-object",this.intersectionBuffer=$e(5),this.aggregateBuffer=$e(9),this.invertedBuffer=$e(9),this.rotation=0,this._updatedList=[];const{x:r=0,y:o=0}=n||{};e?(this.id=e.id||"",this.scale=1,this.layers=e.layers,this.points=$e([1,r,o,r+e.width,o+e.height]),this.worldPoints=$e([1,r,o,r+e.width,o+e.height]),this.filteredPointsBuffer=$e(e.layers.length*5)):(this.id="",this.scale=1,this.layers=[],this.points=$e(5),this.worldPoints=$e(5),this.filteredPointsBuffer=$e(5))}static createWithProps(e){const n=new ku;return n.applyProps(e),n}applyProps(e){const n=e.x||0,r=e.y||0;this.id=e.id;const o=typeof e.scale<"u"?e.scale:this.scale;this.points[0]=1,this.points[1]=n,this.points[2]=r,this.points[3]=n+e.width,this.points[4]=r+e.height,this.rotation=e.rotation||0,this.worldPoints[3]=this.worldPoints[1]+e.width,this.worldPoints[4]=this.worldPoints[2]+e.height,e.scale&&e.scale!==1&&this.atScale(o),this.scale=o}appendChild(e){e.points[0]===0&&e.points.set(this.points),e.__owner.value=this,this.addLayers([e])}removeChild(e){this.layers=this.layers.filter(n=>n!==e),this.filteredPointsBuffer=$e(this.layers.length*5)}insertBefore(e,n){const r=this.layers.indexOf(n);if(r===-1||this.layers.indexOf(e)!==-1)return;const o=this.layers.slice(0,r),c=this.layers.slice(r);this.layers=[...o,e,...c]}hideInstance(){console.warn("hideInstance: not yet implemented")}getObjectsAt(e,n){if(this.rotation&&(e=this.applyRotation(e)),Cu(this.points,e,this.filteredPointsBuffer)[0]===0)return[];const o=this.layers.length,c=[];for(let h=0;h<o;h++){const v=this.layers[h];if(n&&v.isShape){const x=vs(v.points,gi(this.x,this.y));if(!v.intersects([e[1]-x[1],e[2]-x[2]]))continue}if(Cu(vs(v.points,gi(this.x,this.y)),e,this.filteredPointsBuffer)[0]!==0&&c.push(v),n){const x=v;c.push(...x.getObjectsAt(e,n))}}return c}applyRotation(e){if(this.rotation){const n={x:e[1],y:e[2]},r={x:e[1],y:e[4]},o={x:e[3],y:e[2]},c={x:e[3],y:e[4]},h=this.points[1]+(this.points[3]-this.points[1])/2,v=this.points[2]+(this.points[4]-this.points[2])/2,[g,x]=Pf(h,v,n.x,n.y,this.rotation),[m,w]=Pf(h,v,r.x,r.y,this.rotation),[A,k]=Pf(h,v,o.x,o.y,this.rotation),[M,_]=Pf(h,v,c.x,c.y,this.rotation),L=Math.min(g,m,A,M),P=Math.max(g,m,A,M),O=Math.min(x,w,k,_),H=Math.max(x,w,k,_);return $e([e[0],L,O,P,H])}return e}getAllPointsAt(e,n,r){const o=ps(gi(this.x,this.y),Ys(this.scale),this.aggregateBuffer);this.rotation&&(e=this.applyRotation(e));const c=eE(e,this.points,this.intersectionBuffer),h=this.layers.length,v=[],g=vs(c,ps(Ys(1/this.scale),gi(-this.x,-this.y),this.invertedBuffer)),x=n?ps(n,o,this.aggregateBuffer):o,m=r*this.scale;for(let w=0;w<h;w++)v.push(...this.layers[w].getAllPointsAt(g,x,m));return v}addLayers(e){const n=[];for(const r of e)this.layers.indexOf(r)===-1&&(n.push(r),r.points.length===5&&(r.points[1]<this.worldPoints[1]/this.scale||r.points[2]<this.worldPoints[2]/this.scale||r.points[3]>this.worldPoints[3]/this.scale||r.points[4]>this.worldPoints[4]/this.scale)&&(r.crop=r.crop||$e([1,Math.max(this.worldPoints[1]/this.scale,r.points[1]),Math.max(this.worldPoints[2]/this.scale,r.points[2]),Math.min(this.worldPoints[3]/this.scale,r.points[3]),Math.min(this.worldPoints[4]/this.scale,r.points[4])])));this.layers=this.layers.concat(n),this.filteredPointsBuffer=$e(this.layers.length*5)}getScheduledUpdates(e,n){const r=this.layers.length;this._updatedList=[];const o=n*this.scale;for(let c=0;c<r;c++){const h=this.layers[c].getScheduledUpdates(e,o);h&&this._updatedList.push(...h)}return this._updatedList}}class cl extends Hr{constructor(e=0,n=0,r=100,o="left-to-right"){super(),this.id="world",this.aggregateBuffer=$e(9),this.isDirty=!1,this.zones=[],this.triggerQueue=[],this.activatedEvents=[],this._updatedList=[],this.translationBuffer=$e(9),this.needsRecalculate=!0,this.emptyPaintables=[],this.renderOrder=[],this.objects=[],this.subscriptions=[],this._propagateEventTargets=[],this._alreadyFlushed=[],this._width=e,this._height=n,this.aspectRatio=Number.isNaN(e/n)?1:e/n,this.viewingDirection=o,this.points=$e(r*5),this.filteredPointsBuffer=$e(r*5)}get x(){return 0}get y(){return 0}get width(){return this._width}get height(){return this._height}static withProps(e){const n=new cl;return n.applyProps(e),n}applyProps(e){typeof e.width<"u"&&typeof e.height<"u"&&(e.width!==this._width||e.height!==this._height)&&this.resize(e.width,e.height),e.viewingDirection!==this.viewingDirection&&(this.viewingDirection=e.viewingDirection,this.triggerRepaint())}propagateTouchEvent(e,n,r){const o=[];for(const c of r)if(c.x&&c.y){const h=Et.singleBox(1,1,c.x,c.y);o.push(this.getObjectsAt(h,!0).reverse())}return o.map(c=>this.propagateEvent(e,n,c,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(e,n,r,o,c={}){const h=Et.singleBox(1,1,r,o),v=this.getObjectsAt(h,!0).reverse();return this.propagateEvent(e,n,v,c)}propagateEvent(e,n,r,{bubbles:o=!1,cancelable:c=!1}={}){n.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let h=!1;n.stopPropagation=()=>{h=!0};const v=r.length;for(let m=v-1;m>=0;m--){this._propagateEventTargets.unshift(r[m][0]);const w=r[m][1].length;if(w)for(let A=0;A<w;A++)this._propagateEventTargets.unshift(r[m][1][A])}const g=this._propagateEventTargets.length;let x=!1;for(let m=0;m<g&&(n.atlasTarget=this._propagateEventTargets[m],n.atlasWorld=this,x=this._propagateEventTargets[m].dispatchEvent(e,n)||x,!h);m++);return x&&this.triggerRepaint(),this._propagateEventTargets}appendChild(e){const n=this.appendWorldObject(e);this.renderOrder.push(n/5)}removeChild(e){const n=this.objects.indexOf(e);if(n===-1){for(const r of this.objects)if(r&&r.id===e.id){this.removeChild(r);return}return}this.objects[n]=null,this.renderOrder=this.renderOrder.filter(r=>r!==n),this.points[n*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(e,n){const r=this.objects.indexOf(n);if(r===-1)return;const o=this.appendWorldObject(e);this.renderOrder.splice(r-1,0,o/5)}hideInstance(){}asWorldObject(){return null}addZone(e){this.zones.push(e)}selectZone(e){if(typeof e=="string"){const n=this.zones.length;for(let r=0;r<n;r++)if(this.zones[r].id===e){this.selectedZone=r,this.trigger("zone-changed");return}}else this.zones[e]&&(this.selectedZone=e,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(tE(this.points)===this.objects.length){const e=this.points,n=$e(this.points.length*2);n.set(e,0),this.points=n}}appendWorldObject(e){this.checkResizeInternalBuffer();const n=this.objects.length*5,r=e.points;return e.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),e.points[1]=r[1],e.points[2]=r[2],e.points[3]=r[3],e.points[4]=r[4],this.objects.push(e),this.filteredPointsBuffer=$e(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),n}recalculateWorldSize(){let e=!1;if(this.needsRecalculate){const n=new Int32Array(this.objects.length),r=new Int32Array(this.objects.length),o=this.renderOrder.length;for(let v=0;v<o;v++){const g=this.renderOrder[v];this.objects[g]&&(n[v]=this.points[g*5+3],r[v]=this.points[g*5+4])}const c=Math.max(...n);c!==this._width&&(this._width=c,e=!0);const h=Math.max(...r);h!==this._height&&(this._height=h,e=!0),e&&this.trigger("recalculate-world-size",{width:c,height:h}),this.needsRecalculate=!1}return e}addObjectAt(e,n){n.width&&!n.height?n.height=n.width/e.width*e.height:n.height&&!n.width&&(n.width=n.height/e.height*e.width),(!n||!n.width||!n.height)&&(n.width=e.width,n.height=e.height);const{width:r,x:o,y:c}=n,h=r/e.width;this.checkResizeInternalBuffer(),this.points.set(Et.singleBox(e.width,e.height,0,0),this.objects.length*5);const v=new ku(e);return v.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(v),this.scaleWorldObject(this.objects.length-1,h),this.translateWorldObject(this.objects.length-1,o,c),this.filteredPointsBuffer=$e(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,v}scaleWorldObject(e,n){Br(this.points.subarray(e*5,e*5+5),Ru(n,this.points[e*5+1],this.points[e*5+2]));const r=this.objects[e];r&&(r.atScale(n),this.triggerRepaint())}translateWorldObject(e,n,r){Br(this.points.subarray(e*5,e*5+5),gi(n,r));const o=this.objects[e];o&&(o.translate(n,r),this.triggerRepaint())}resize(e,n){return this._width=e,this._height=n,this.aspectRatio=e/n,this.triggerRepaint(),this}getObjects(){return this.objects}getPoints(){return this.points}getPointsFromViewer(e,n){const r=Et.singleBox(e.width,e.height,e.x,e.y);return this.getPointsAt(r,n,e.scale)}addLayoutSubscriber(e){return this.subscriptions.push(e),()=>{this.subscriptions.splice(this.subscriptions.indexOf(e),1)}}getScheduledUpdates(e,n){const r=Cu(this.points,e,this.filteredPointsBuffer),o=this.objects.length;this._updatedList=[];for(let c=0;c<o;c++)if(r[c*5]!==0){if(!this.objects[c])continue;this._updatedList.push(...this.objects[c].getScheduledUpdates(e,n))}return this._updatedList}getObjectsAt(e,n=!1){const r=this.getActiveZone(),o=Cu(this.points,e,this.filteredPointsBuffer),c=this.renderOrder.length,h=[];for(let v=0;v<c;v++){const g=this.renderOrder[v];if(o[g*5]!==0){const x=this.objects[g];if(!x||r&&r.objects.indexOf(x)===-1)continue;if(x.type!=="world-object"){h.push([x,[x]]);continue}n?h.push([x,x.getObjectsAt(e,n)]):h.push([x,this.emptyPaintables])}}return h}getPointsAt(e,n,r=1){const o=this.getObjectsAt(e),c=ps(Ys(r),gi(-e[1],-e[2]),this.translationBuffer),h=n?ps(n,c,this.aggregateBuffer):c,v=o.length,g=[];for(let x=0;x<v;x++)o[x]&&g.push(...o[x][0].getAllPointsAt(e,h,r));return g}flushSubscriptions(){if(this.triggerQueue.length){this._alreadyFlushed=[];const e=this.triggerQueue.length;for(let n=0;n<e;n++){if(this._alreadyFlushed.indexOf(this.triggerQueue[n][0])!==-1)continue;typeof this.triggerQueue[n][1]>"u"&&this._alreadyFlushed.push(this.triggerQueue[n][0]);const r=this.subscriptions.length;for(let o=0;o<r;o++)this.subscriptions[o].apply(null,this.triggerQueue[n])}this.triggerQueue=[]}}trigger(e,n){this.triggerQueue.push([e,n])}triggerEventActivation(){this.trigger("event-activation")}triggerRepaint(){this.trigger("repaint")}gotoRegion(e){this.trigger("goto-region",e)}goHome(e=!1){this.trigger("go-home",{immediate:e})}zoomTo(e,n,r){this.trigger("zoom-to",{point:n,factor:e,stream:r})}zoomIn(e){this.trigger("zoom-to",{point:e,factor:.5})}zoomOut(e){this.trigger("zoom-to",{point:e,factor:2})}constraintBounds(e){this.trigger("constrain-bounds",{immediate:e})}}const kf=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,zf={},CC=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"];class zu extends Hr{constructor(){super(),this.type="spacial-content",this.hoverEvents=!1,this.activeEvents=!1,this.display={x:0,y:0,scale:1,width:-1,height:-1,points:$e(5)},this._parsed={border:{id:null,match:[]},outline:{id:null,match:[]}},this.props={},this.addHover=()=>{this.hovering=!0,this.__revision++},this.removeHover=()=>{this.hovering=!1,this.pressing=!1,this.__revision++},this.addPress=()=>{this.pressing=!0,this.__revision++},this.removePress=()=>{this.pressing=!1,this.__revision++},this.id=mf(12),this.points=$e(5)}getAllPointsAt(e,n){return[[this,this.points,n]]}applyProps(e={}){let n=!1;if(e.interactive!==this.props.interactive&&(n=!0,this.props.interactive=e.interactive),e.style){const r=e.border||e.style.border;if(r!==this._parsed.border.id)if(!r)this._parsed.border.id=null,this._parsed.border.match=[];else{const o=zf[r]||kf.exec(r)||kf.exec(r);o&&(this._parsed.border.id=r,this._parsed.border.match=zf[r]=o)}if(this._parsed.border.id&&(e.style.borderWidth=this._parsed.border.match[1],e.style.borderStyle="solid",e.style.borderColor=this._parsed.border.match[4]),e.style.outline!==this._parsed.outline.id)if(!e.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{const o=zf[e.style.outline]||kf.exec(e.style.outline)||kf.exec(e.style.outline);o&&(this._parsed.outline.id=e.style.outline,this._parsed.outline.match=zf[e.style.outline]=o)}this._parsed.outline.id&&(e.style.outlineWidth=this._parsed.outline.match[1],e.style.outlineStyle="solid",e.style.outlineColor=this._parsed.outline.match[4]),this.props.style=e.style,e.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.backgroundColor,n=!0),e.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.style.background,n=!0);for(const o of CC)if(this.props.style[o]!==e.style[o]){n=!0;break}e.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=e.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n=!0),e.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=e.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0)}e.href!==this.props.href&&(this.props.href=e.href,n=!0),e.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=e.hrefTarget,n=!0),e.title!==this.props.title&&(this.props.title=e.title,n=!0),e.className!==this.props.className&&(this.props.className=e.className,e.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),e.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0),e.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=e.relativeSize,n=!0),e.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=e.relativeStyle,n=!0),e.html!==this.props.html&&(this.props.html=e.html,n=!0),e.target&&(e.target.width!==this.display.width||e.target.height!==this.display.height||e.target.x!==this.points[1]||e.target.y!==this.points[2])&&(n=!0,this.points=Et.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.points=Et.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.width=e.target.width,this.display.height=e.target.height),n&&this.__revision++}}class Nf extends Hr{constructor(){super(),this.type="spacial-content",this.color="#000",this.text="",this.display={x:0,y:0,scale:1,width:100,height:100,points:$e(5)},this.interactive=!1,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=$e(5)}getAllPointsAt(e,n){return[[this,this.points,n]]}applyProps({id:e,target:n,text:r,color:o,backgroundColor:c,fontSize:h=18,interactive:v,fontFamily:g="Arial, sans-serif",...x}){x.font=`${h}px ${g}`,this.interactive=v||!1,typeof r<"u"&&(this.text=r||""),o&&(this.color=o),c&&(this.backgroundColor=c),e&&(this.id=e),n&&(this.points=Et.singleBox(n.width,n.height,n.x,n.y),this.display.points=this.points,this.display.width=n.width,this.display.height=n.height),this.props={...this.props,...x},this.__revision++}}const mn=Math.pow,_f=Math.sqrt,Nu=Math.sin,qy=Math.cos,_u=Math.PI,Uf=1.70158,jf=Uf*1.525,Yy=Uf+1,Qy=2*_u/3,Gy=2*_u/4.5,If=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},Ks={linear:t=>t,easeInQuad:function(t){return t*t},easeOutQuad:function(t){return 1-(1-t)*(1-t)},easeInOutQuad:function(t){return t<.5?2*t*t:1-mn(-2*t+2,2)/2},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1-mn(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-mn(-2*t+2,3)/2},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1-mn(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-mn(-2*t+2,4)/2},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1-mn(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-mn(-2*t+2,5)/2},easeInSine:function(t){return 1-qy(t*_u/2)},easeOutSine:function(t){return Nu(t*_u/2)},easeInOutSine:function(t){return-(qy(_u*t)-1)/2},easeInExpo:function(t){return t===0?0:mn(2,10*t-10)},easeOutExpo:function(t){return t===1?1:1-mn(2,-10*t)},easeInOutExpo:function(t){return t===0?0:t===1?1:t<.5?mn(2,20*t-10)/2:(2-mn(2,-20*t+10))/2},easeInCirc:function(t){return 1-_f(1-mn(t,2))},easeOutCirc:function(t){return _f(1-mn(t-1,2))},easeInOutCirc:function(t){return t<.5?(1-_f(1-mn(2*t,2)))/2:(_f(1-mn(-2*t+2,2))+1)/2},easeInBack:function(t){return Yy*t*t*t-Uf*t*t},easeOutBack:function(t){return 1+Yy*mn(t-1,3)+Uf*mn(t-1,2)},easeInOutBack:function(t){return t<.5?mn(2*t,2)*((jf+1)*2*t-jf)/2:(mn(2*t-2,2)*((jf+1)*(t*2-2)+jf)+2)/2},easeInElastic:function(t){return t===0?0:t===1?1:-mn(2,10*t-10)*Nu((t*10-10.75)*Qy)},easeOutElastic:function(t){return t===0?0:t===1?1:mn(2,-10*t)*Nu((t*10-.75)*Qy)+1},easeInOutElastic:function(t){return t===0?0:t===1?1:t<.5?-(mn(2,20*t-10)*Nu((20*t-11.125)*Gy))/2:mn(2,-20*t+10)*Nu((20*t-11.125)*Gy)/2+1},easeInBounce:function(t){return 1-If(1-t)},easeOutBounce:If,easeInOutBounce:function(t){return t<.5?(1-If(1-2*t))/2:(1+If(2*t-1))/2}};class RC{constructor(e){this.runtime=e,this.pendingTransition={from:$e(5),to:$e(5),elapsed_time:0,done:!0,total_time:0,timingFunction:Ks.easeInOutQuad,constrain:!1}}hasPending(){return!this.pendingTransition.done}getPendingTransition(){return this.pendingTransition}getPendingFrom(){return this.pendingTransition.from}customTransition(e){e(this.pendingTransition)}stopTransition(){this.pendingTransition.from=$e(this.runtime.target),this.pendingTransition.to=$e(this.runtime.target),this.pendingTransition.done=!0,this.pendingTransition.elapsed_time=0,this.pendingTransition.total_time=0}runTransition(e,n){if(!this.pendingTransition.done){const r=this.pendingTransition,o=r.total_time===0?0:(r.elapsed_time+n)/r.total_time,c=r.total_time===0?1:o===0?0:r.timingFunction(o);e[1]=r.from[1]+(r.to[1]-r.from[1])*c,e[2]=r.from[2]+(r.to[2]-r.from[2])*c,e[3]=r.from[3]+(r.to[3]-r.from[3])*c,e[4]=r.from[4]+(r.to[4]-r.from[4])*c,this.pendingTransition.elapsed_time+=n,this.pendingTransition.elapsed_time>=this.pendingTransition.total_time&&(this.pendingTransition.done=!0,this.pendingTransition.constrain&&this.constrainBounds({transition:{duration:this.pendingTransition.total_time===0?0:500,easing:Ks.easeOutExpo}}))}}zoomTo(e,{origin:n,stream:r=!1,transition:o}={}){const c=this.runtime.getZoomedPosition(e,{origin:n}),h=Math.abs(1-e);this.applyTransition(c,o,{duration:2e3*h,easing:Ks.easeOutExpo,constrain:!0},{stream:!1})}constrainBounds({transition:e,panPadding:n=0}={}){const[r,o]=this.runtime.constrainBounds(this.runtime.target,{panPadding:n});r&&(this.applyTransition(o,e,{duration:500,easing:Ks.easeOutQuart,constrain:!1}),this.runtime.updateNextFrame())}applyTransition(e,n,r,{stream:o}={}){this.pendingTransition.from=$e(this.runtime.target),this.pendingTransition.to=e,o||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=typeof(n==null?void 0:n.duration)<"u"?n.duration:typeof(r==null?void 0:r.duration)<"u"?r.duration:1e3,this.pendingTransition.constrain=typeof(n==null?void 0:n.constrain)<"u"?n.constrain:typeof(r==null?void 0:r.constrain)<"u"?r.constrain:!1,this.pendingTransition.timingFunction=(n==null?void 0:n.easing)||(r==null?void 0:r.easing)||Ks.easeInOutSine}goToRegion(e,{transition:n}={}){const r=this.runtime.clampRegion(e);this.applyTransition(Et.singleBox(r.width,r.height,r.x,r.y),n,{duration:1e3,easing:Ks.easeOutExpo,constrain:!0}),this.runtime.updateNextFrame()}}class Ff{constructor(e,n,r,o=[],c){this.id=mf(),this.ready=!1,this.transformBuffer=$e(500),this.lastTarget=$e(5),this.zoomBuffer=$e(5),this.logNextRender=!1,this.pendingUpdate=!0,this.isCommitting=!1,this.firstRender=!0,this.mode="explore",this.controllers=[],this.controllersRunning=!1,this.controllerStopFunctions=[],this.maxScaleFactor=1,this._viewerToWorld={x:0,y:0},this._lastGoodScale=1,this.hooks={useFrame:[],useBeforeFrame:[],useAfterPaint:[],useAfterFrame:[]},this._viewport={x:0,y:0,width:0,height:0},this.setViewport=h=>{const v=typeof h.x>"u"?this.target[1]:h.x,g=typeof h.y>"u"?this.target[2]:h.y;h.width?this.target[3]=v+h.width:this.target[3]=this.target[3]-this.target[1]+v,h.height?this.target[4]=g+h.height:this.target[4]=this.target[4]-this.target[2]+g,Math.abs(this.target[1]-v)>.01&&(this.target[1]=v),Math.abs(this.target[2]-g)>.01&&(this.target[2]=g),this.pendingUpdate=!0},this.render=h=>{const v=h-this.lastTime;if(this.isCommitting||this.fpsLimit&&v<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=h,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook("useFrame",v);const g=this.pendingUpdate,x=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,v),this.pendingUpdate=!0,this.updateControllerPosition()),!this.firstRender&&!g&&!x&&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",v),this.renderer.beforeFrame(this.world,v,this.target);const m=this.getScaleFactor(),w=this.renderer.getPointsAt(this.world,this.target,this.aggregate,m),A=w.length;for(let _=0;_<A;_++){const L=w[_][0],P=w[_][1],O=w[_][2],H=O?vs(P,O,this.transformBuffer):P;this.renderer.prepareLayer(L,L.__parent&&O?vs(L.__parent.crop||L.__parent.points,O):H);const q=H.length/5;for(let Q=0;Q<q;Q++){const B=Q*5;H[B]!==0&&(this.renderer.paint(L,Q,H[B+1],H[B+2],H[B+3]-H[B+1],H[B+4]-H[B+2]),this.hook("useAfterPaint",L))}this.renderer.finishLayer(L,P)}this.renderer.afterFrame(this.world,v,this.target),this.hook("useAfterFrame",v),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();const k=this.world.getScheduledUpdates(this.target,m),M=k.length;if(M>0)for(let _=0;_<M;_++){const L=k[M-_-1]();L?L.then(()=>{this.pendingUpdate=!0}):this.pendingUpdate=!0}},this.renderer=e,this.world=n,this.options={maxOverZoom:1,maxUnderZoom:1,visibilityRatio:1.5,...c||{}},this.target=Et.projection(r),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=Et.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new RC(this),this.aggregate=Ys(1),this.world.addLayoutSubscriber(h=>{h==="repaint"&&(this.pendingUpdate=!0),h==="recalculate-world-size"&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=o,this.render(this.lastTime),this.startControllers()}get x(){return this.target[1]}set x(e){this.target[1]=e}get y(){return this.target[2]}set y(e){this.target[2]=e}get x2(){return this.target[3]}set x2(e){this.target[3]=e}get y2(){return this.target[4]}set y2(e){this.target[4]=e}get width(){return this.target[3]-this.target[1]}set width(e){this.target[3]=this.target[1]+e}get height(){return this.target[4]-this.target[2]}set height(e){this.target[4]=this.target[2]=e}setHomePosition(e){this.homePosition.set(Et.projection(e||this.world)),this.pendingUpdate=!0}startControllers(){if(!this.controllersRunning){for(const e of this.controllers)this.controllerStopFunctions.push(e.start(this));this.controllersRunning=!0}}stopControllers(){if(this.controllersRunning){for(const e of this.controllerStopFunctions)e();this.controllersRunning=!1,this.controllerStopFunctions=[]}}updateControllerPosition(){for(const e of this.controllers)e.updatePosition(this.x,this.y,this.width,this.height)}triggerResize(){this.renderer.triggerResize&&this.renderer.triggerResize(),this.pendingUpdate=!0}addController(e){this.controllers.push(e),this.controllersRunning&&e.start(this),this.pendingUpdate=!0}cover(){return this.goHome({cover:!0})}getRendererScreenPosition(){return this.renderer.getRendererScreenPosition()}updateRendererScreenPosition(){this.pendingUpdate=!0,this.renderer.resize()}setOptions(e){this.options={...this.options,...e}}goHome(e={}){if(this.world.width<=0||this.world.height<=0)return;const n=this.getScaleFactor(),r=e.position?{x:e.position[1],y:e.position[2],width:e.position[3]-e.position[1],height:e.position[4]-e.position[2]}:{x:this.homePosition[1],y:this.homePosition[2],width:this.homePosition[3]-this.homePosition[1],height:this.homePosition[4]-this.homePosition[2]},o=this.width*n,c=this.height*n,h=r.width/o,v=r.height/c,g=o/c;if(e.cover?h>v:h<v){const x=g*r.height,m=(x-r.width)/2;this.target[1]=-m+r.x,this.target[2]=r.y,this.target[3]=x-m+r.x,this.target[4]=r.height+r.y}else{const x=r.width/g,m=(x-r.height)/2;this.target[1]=r.x,this.target[2]=r.y-m,this.target[3]=r.x+r.width,this.target[4]=r.y+x-m}this.constrainBounds(this.target),this.updateControllerPosition()}resize(e,n,r,o){this.updateFocalPosition(e-n,r-o);const c=n/e,h=o/r;this.target[3]=this.target[1]+(this.target[3]-this.target[1])*c,this.target[4]=this.target[2]+(this.target[4]-this.target[2])*h,this.goHome({position:this.focalPosition}),this.renderer.resize(n,o),this.pendingUpdate=!0}updateFocalPosition(e,n){if(!this.manualFocalPosition){const r=this.width,o=this.height,c=Math.min(r,o),h=0,v=0,g=this.x+h,x=this.y+v;if(r<o){const m=this.height-this.width;this.focalPosition=Et.projection({x:g,y:x+m/2,width:c-h*2,height:c-v*2}),this.pendingUpdate=!0}else{const m=this.width-this.height;this.focalPosition=Et.projection({x:g+m/2,y:x,width:c-h*2,height:c-v*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(e,{panPadding:n=0,ref:r=!1}={}){const{minX:o,maxX:c,minY:h,maxY:v}=this.getBounds({target:e,padding:n});let g=!1;const x=r?e:$e(e),m=e[3]-e[1],w=e[4]-e[2];return o>e[1]&&(g=!0,x[1]=o,x[3]=o+m),h>e[2]&&(g=!0,x[2]=h,x[4]=h+w),c<e[1]&&(g=!0,x[1]=c,x[3]=c+m),v<e[2]&&(g=!0,x[2]=v,x[4]=v+w),[g,x]}getBounds(e){const n=e.target||this.target,r=e.padding,o=this.options.visibilityRatio,c=Math.abs(1-o);if(this.world.hasActiveZone()){const O=this.world.getActiveZone();if(O){const H=n[3]-n[1]<O.points[3]-O.points[1],q=n[4]-n[2]<O.points[4]-O.points[2];return{minX:H?O.points[1]-r:O.points[1]+(O.points[3]-O.points[1])/2-(n[3]-n[1])/2,maxX:q?O.points[2]-r:O.points[2]+(O.points[4]-O.points[2])/2-(n[4]-n[2])/2,minY:H?O.points[3]+r:O.points[1]+(O.points[3]-O.points[1])/2-(n[3]-n[1])/2,maxY:q?O.points[4]+r:O.points[2]+(O.points[4]-O.points[2])/2-(n[4]-n[2])/2}}}const h=n[3]-n[1],v=this.world.width,g=-h*c,x=v-h-g,m=n[4]-n[2],w=this.world.height,A=-m*c,k=w-m-A,M=Math.max(g,x),_=Math.min(g,x),L=Math.max(A,k),P=Math.min(A,k);return{minX:_,maxX:M,minY:P,maxY:L}}getScaleFactor(e=!1){const n=this.renderer.getScale(this.target[3]-this.target[1],this.target[4]-this.target[2],e);return n===0?this._lastGoodScale:(this._lastGoodScale=n,n)}getZoomedPosition(e,{origin:n,fromPos:r}){var o;const c=r?{width:r[3]-r[1],height:r[4]-r[2]}:void 0,h=c?this.renderer.getScale(c.width,c.height):this.getScaleFactor(),v=c?c.width:this.width,g=c?c.height:this.height,x=(o=this.getRendererScreenPosition())==null?void 0:o.width,m=this.world.width,w=x?x/m:1,A=this.options.maxUnderZoom,k=Math.max(w||1,this.options.maxOverZoom),M=1/e,_=h*M;if(M<1){const O=v*h,H=g*h,q=this.world.width/O,Q=this.world.height/H;if(q>Q){const B=this.world.width*_,ie=~~(v*h)*A;B<ie&&(e=this.world.width*h/(v*h*A))}else{const B=this.world.height*_,ie=~~(g*h)*A;B<ie&&(e=this.world.height*h/(g*h*A))}}else _>k&&(e=h/k);const P=vs(this.target,Ru(e,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(P,{ref:!0,panPadding:100}),P}clampRegion({x:e,y:n,width:r,height:o,padding:c=0}){const h=this.width,v=this.height,g=r/h<o/v,x=e-c,m=n-c,w=r+c*2,A=o+c*2;if(g){const M=A/v*h;return{x:x-(M-w)/2,y:m,width:M,height:A}}const k=w/h*v;return{x,y:m-(k-A)/2,width:w,height:k}}viewerToWorld(e,n){const r=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+e/r,this._viewerToWorld.y=this.target[2]+n/r,this._viewerToWorld}worldToViewer(e,n,r,o){const c=Et.singleBox(r,o,e,n);return Br(c,ps(Ys(this.getScaleFactor()),gi(-this.target[1],-this.target[2]))),{x:c[1],y:c[2],width:c[3]-c[1],height:c[4]-c[2],strand:c}}setScale(e,n){Br(this.target,Ru(e,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(e){const n=this.target;return this.target=e.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(e){this.world.selectZone(e),this.pendingUpdate=!0}deselectZone(){this.world.deselectZone(),this.pendingUpdate=!0}hook(e,n){const r=this.hooks[e].length;if(r!==0)for(let o=0;o<r;o++)this.hooks[e][o](n)}registerHook(e,n){return this.hooks[e].push(n),()=>{this.hooks[e]=this.hooks[e].filter(r=>r!==n)}}updateNextFrame(){this.pendingUpdate=!0}}const Uu=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Bf=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Xy}abort(e=new Error("This operation was aborted")){this.signal.reason=e,this.signal.dispatchEvent({type:"abort",target:this.signal})}},AC=typeof AbortSignal=="function",MC=typeof Bf.AbortSignal=="function",Xy=AC?AbortSignal:MC?Bf.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(n=>n(e),this))}onabort(){}addEventListener(e,n){e==="abort"&&this._listeners.push(n)}removeEventListener(e,n){e==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},gp=new Set,yp=(t,e)=>{const n=`LRU_CACHE_OPTION_${t}`;Hf(n)&&bp(n,`${t} option`,`options.${e}`,Ia)},Sp=(t,e)=>{const n=`LRU_CACHE_METHOD_${t}`;if(Hf(n)){const{prototype:r}=Ia,{get:o}=Object.getOwnPropertyDescriptor(r,t);bp(n,`${t} method`,`cache.${e}()`,o)}},OC=(t,e)=>{const n=`LRU_CACHE_PROPERTY_${t}`;if(Hf(n)){const{prototype:r}=Ia,{get:o}=Object.getOwnPropertyDescriptor(r,t);bp(n,`${t} property`,`cache.${e}`,o)}},Ky=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},Hf=t=>!gp.has(t),bp=(t,e,n,r)=>{gp.add(t);const o=`The ${e} is deprecated. Please use ${n} instead.`;Ky(o,"DeprecationWarning",t,r)},Zs=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Zy=t=>Zs(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Wf:null:null;class Wf extends Array{constructor(e){super(e),this.fill(0)}}class DC{constructor(e){if(e===0)return[];const n=Zy(e);this.heap=new n(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class Ia{constructor(e={}){const{max:n=0,ttl:r,ttlResolution:o=1,ttlAutopurge:c,updateAgeOnGet:h,updateAgeOnHas:v,allowStale:g,dispose:x,disposeAfter:m,noDisposeOnSet:w,noUpdateTTL:A,maxSize:k=0,maxEntrySize:M=0,sizeCalculation:_,fetchMethod:L,fetchContext:P,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:H,allowStaleOnFetchRejection:q,allowStaleOnFetchAbort:Q,ignoreFetchAbort:B}=e,{length:J,maxAge:ie,stale:$}=e instanceof Ia?{}:e;if(n!==0&&!Zs(n))throw new TypeError("max option must be a nonnegative integer");const re=n?Zy(n):Array;if(!re)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=k,this.maxEntrySize=M||this.maxSize,this.sizeCalculation=_||J,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=L||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=P,!this.fetchMethod&&P!==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 re(n),this.prev=new re(n),this.head=0,this.tail=0,this.free=new DC(n),this.initialFill=1,this.size=0,typeof x=="function"&&(this.dispose=x),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!w,this.noUpdateTTL=!!A,this.noDeleteOnFetchRejection=!!O,this.allowStaleOnFetchRejection=!!q,this.allowStaleOnFetchAbort=!!Q,this.ignoreFetchAbort=!!B,this.maxEntrySize!==0){if(this.maxSize!==0&&!Zs(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Zs(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!g||!!$,this.noDeleteOnStaleGet=!!H,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!v,this.ttlResolution=Zs(o)||o===0?o:1,this.ttlAutopurge=!!c,this.ttl=r||ie||0,this.ttl){if(!Zs(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){const me="LRU_CACHE_UNBOUNDED";Hf(me)&&(gp.add(me),Ky("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",me,Ia))}$&&yp("stale","allowStale"),ie&&yp("maxAge","ttl"),J&&yp("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Wf(this.max),this.starts=new Wf(this.max),this.setItemTTL=(r,o,c=Uu.now())=>{if(this.starts[r]=o!==0?c:0,this.ttls[r]=o,o!==0&&this.ttlAutopurge){const h=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},o+1);h.unref&&h.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Uu.now():0};let e=0;const n=()=>{const r=Uu.now();if(this.ttlResolution>0){e=r;const o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{const o=this.keyMap.get(r);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(e||n())-this.starts[r]>this.ttls[r]}updateItemAge(e){}setItemTTL(e,n,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Wf(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,n,r,o)=>{if(this.isBackgroundFetch(n))return 0;if(!Zs(r))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(r=o(n,e),!Zs(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=(e,n)=>{if(this.sizes[e]=n,this.maxSize){const r=this.maxSize-this.sizes[e];for(;this.calculatedSize>r;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,n){}requireSize(e,n,r,o){if(r||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((e||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())this.isBackgroundFetch(this.valList[e])||(yield[this.keyList[e],this.valList[e]])}*rentries(){for(const e of this.rindexes())this.isBackgroundFetch(this.valList[e])||(yield[this.keyList[e],this.valList[e]])}*keys(){for(const e of this.indexes())this.isBackgroundFetch(this.valList[e])||(yield this.keyList[e])}*rkeys(){for(const e of this.rindexes())this.isBackgroundFetch(this.valList[e])||(yield this.keyList[e])}*values(){for(const e of this.indexes())this.isBackgroundFetch(this.valList[e])||(yield this.valList[e])}*rvalues(){for(const e of this.rindexes())this.isBackgroundFetch(this.valList[e])||(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,n={}){for(const r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],n)}forEach(e,n=this){for(const r of this.indexes())e.call(n,this.valList[r],this.keyList[r],this)}rforEach(e,n=this){for(const r of this.rindexes())e.call(n,this.valList[r],this.keyList[r],this)}get prune(){return Sp("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),e=!0);return e}dump(){const e=[];for(const n of this.indexes({allowStale:!0})){const r=this.keyList[n],o=this.valList[n],c=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(c===void 0)continue;const h={value:c};if(this.ttls){h.ttl=this.ttls[n];const v=Uu.now()-this.starts[n];h.start=Math.floor(Date.now()-v)}this.sizes&&(h.size=this.sizes[n]),e.unshift([r,h])}return e}load(e){this.clear();for(const[n,r]of e){if(r.start){const o=Date.now()-r.start;r.start=Uu.now()-o}this.set(n,r.value,r)}}dispose(e,n,r){}set(e,n,{ttl:r=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,size:h=0,sizeCalculation:v=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL}={}){if(h=this.requireSize(e,n,h,v),this.maxEntrySize&&h>this.maxEntrySize)return this.delete(e),this;let x=this.size===0?void 0:this.keyMap.get(e);if(x===void 0)x=this.newIndex(),this.keyList[x]=e,this.valList[x]=n,this.keyMap.set(e,x),this.next[this.tail]=x,this.prev[x]=this.tail,this.tail=x,this.size++,this.addItemSize(x,h),g=!1;else{this.moveToTail(x);const m=this.valList[x];n!==m&&(this.isBackgroundFetch(m)?m.__abortController.abort(new Error("replaced")):c||(this.dispose(m,e,"set"),this.disposeAfter&&this.disposed.push([m,e,"set"])),this.removeItemSize(x),this.valList[x]=n,this.addItemSize(x,h))}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),g||this.setItemTTL(x,r,o),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){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const n=this.head,r=this.keyList[n],o=this.valList[n];return this.isBackgroundFetch(o)?o.__abortController.abort(new Error("evicted")):(this.dispose(o,r,"evict"),this.disposeAfter&&this.disposed.push([o,r,"evict"])),this.removeItemSize(n),e&&(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(e,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const r=this.keyMap.get(e);return r!==void 0&&!this.isStale(r)?(n&&this.updateItemAge(r),!0):!1}peek(e,{allowStale:n=this.allowStale}={}){const r=this.keyMap.get(e);if(r!==void 0&&(n||!this.isStale(r))){const o=this.valList[r];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,n,r,o){const c=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(c))return c;const h=new Bf;r.signal&&r.signal.addEventListener("abort",()=>h.abort(r.signal.reason));const v={signal:h.signal,options:r,context:o},g=(A,k=!1)=>{const{aborted:M}=h.signal,_=r.ignoreFetchAbort&&A!==void 0;return M&&!_&&!k?x(h.signal.reason):(this.valList[n]===w&&(A===void 0?w.__staleWhileFetching?this.valList[n]=w.__staleWhileFetching:this.delete(e):this.set(e,A,v.options)),A)},x=A=>{const{aborted:k}=h.signal,M=k&&r.allowStaleOnFetchAbort,_=M||r.allowStaleOnFetchRejection,L=_||r.noDeleteOnFetchRejection;if(this.valList[n]===w&&(!L||w.__staleWhileFetching===void 0?this.delete(e):M||(this.valList[n]=w.__staleWhileFetching)),_)return w.__staleWhileFetching;if(w.__returned===w)throw A},m=(A,k)=>{this.fetchMethod(e,c,v).then(M=>A(M),k),h.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(A(),r.allowStaleOnFetchAbort&&(A=M=>g(M,!0)))})},w=new Promise(m).then(g,x);return w.__abortController=h,w.__staleWhileFetching=c,w.__returned=null,n===void 0?(this.set(e,w,v.options),n=this.keyMap.get(e)):this.valList[n]=w,w}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:v=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:x=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:A=this.ignoreFetchAbort,allowStaleOnFetchAbort:k=this.allowStaleOnFetchAbort,fetchContext:M=this.fetchContext,forceRefresh:_=!1,signal:L}={}){if(!this.fetchMethod)return this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:o});const P={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:o,ttl:c,noDisposeOnSet:h,size:v,sizeCalculation:g,noUpdateTTL:x,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:k,ignoreFetchAbort:A,signal:L};let O=this.keyMap.get(e);if(O===void 0){const H=this.backgroundFetch(e,O,P,M);return H.__returned=H}else{const H=this.valList[O];if(this.isBackgroundFetch(H))return n&&H.__staleWhileFetching!==void 0?H.__staleWhileFetching:H.__returned=H;if(!_&&!this.isStale(O))return this.moveToTail(O),r&&this.updateItemAge(O),H;const q=this.backgroundFetch(e,O,P,M);return n&&q.__staleWhileFetching!==void 0?q.__staleWhileFetching:q.__returned=q}}get(e,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet}={}){const c=this.keyMap.get(e);if(c!==void 0){const h=this.valList[c],v=this.isBackgroundFetch(h);return this.isStale(c)?v?n?h.__staleWhileFetching:void 0:(o||this.delete(e),n?h:void 0):v?void 0:(this.moveToTail(c),r&&this.updateItemAge(c),h)}}connect(e,n){this.prev[n]=e,this.next[e]=n}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Sp("del","delete"),this.delete}delete(e){let n=!1;if(this.size!==0){const r=this.keyMap.get(e);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);const o=this.valList[r];this.isBackgroundFetch(o)?o.__abortController.abort(new Error("deleted")):(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),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(const e of this.rindexes({allowStale:!0})){const n=this.valList[e];if(this.isBackgroundFetch(n))n.__abortController.abort(new Error("deleted"));else{const r=this.keyList[e];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 Sp("reset","clear"),this.clear}get length(){return OC("length","size"),this.size}static get AbortController(){return Bf}static get AbortSignal(){return Xy}}var LC=Ia;const Vf=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,$f={},PC=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"];class Jy extends Hr{constructor(){super(),this.type="spacial-content",this.isShape=!0,this.hoverEvents=!1,this.activeEvents=!1,this.display={x:0,y:0,scale:1,width:-1,height:-1,points:$e(5)},this.boundingBox=null,this._parsed={border:{id:null,match:[]},outline:{id:null,match:[]}},this.props={},this.shape={type:"none"},this.addHover=()=>{this.hovering=!0,this.__revision++},this.removeHover=()=>{this.hovering=!1,this.pressing=!1,this.__revision++},this.addPress=()=>{this.pressing=!0,this.__revision++},this.removePress=()=>{this.pressing=!1,this.__revision++},this.id=mf(12),this.points=$e(5),this.shape={type:"none"}}updateBoundingBox(){if(this.shape.type==="none")return;const e=this.shape.points;if(this.shape.points.length>2){const n=Math.min(...e.map(h=>h[0])),r=Math.min(...e.map(h=>h[1])),o=Math.max(0,...e.map(h=>h[0])),c=Math.max(0,...e.map(h=>h[1]));this.boundingBox={x:n,y:r,width:o-n,height:c-r};return}this.boundingBox=null}intersects(e){if(!e||this.shape.type==="none")return!1;const[n,r]=e,o=this.shape.points;let c=this.boundingBox;if(c||(this.updateBoundingBox(),c=this.boundingBox),!c||n<c.x||n>c.x+c.width||r<c.y||r>c.height+c.y)return!1;let h=!1;for(let v=0,g=o.length-1;v<o.length;g=v++)o[v][1]>r!=o[g][1]>r&&n<(o[g][0]-o[v][0])*(r-o[v][1])/(o[g][1]-o[v][1])+o[v][0]&&(h=!h);return h}getAllPointsAt(e,n){return e[3]-e[1]===1&&e[4]-e[2]===1?this.intersects([e[1],e[2]])?[[this,this.points,n]]:[]:[[this,this.points,n]]}applyProps(e={}){let n=!1;if(e.points)if(this.shape.type!=="polygon"||this.shape.points.length!==e.points.length)this.shape={type:"polygon",points:e.points,open:e.open},this.updateBoundingBox();else{let r=!1;const o=e.points.length;for(let c=0;c<o;c++)if(e.points[c][0]!==this.shape.points[c][0]||e.points[c][1]!==this.shape.points[c][1]){r=!0;break}r&&(this.shape={type:"polygon",points:e.points,open:e.open},this.updateBoundingBox())}if(e.interactive!==this.props.interactive&&(n=!0,this.props.interactive=e.interactive),(e.open||e.open===!1)&&(n=!0,this.shape.open=e.open),e.style){const r=e.border||e.style.border;if(r!==this._parsed.border.id)if(!r)this._parsed.border.id=null,this._parsed.border.match=[];else{const o=$f[r]||Vf.exec(r)||Vf.exec(r);o&&(this._parsed.border.id=r,this._parsed.border.match=$f[r]=o)}if(this._parsed.border.id&&(e.style.borderWidth=this._parsed.border.match[1],e.style.borderStyle="solid",e.style.borderColor=this._parsed.border.match[4]),e.style.outline!==this._parsed.outline.id)if(!e.style.outline)this._parsed.outline.id=null,this._parsed.outline.match=[];else{const o=$f[e.style.outline]||Vf.exec(e.style.outline)||Vf.exec(e.style.outline);o&&(this._parsed.outline.id=e.style.outline,this._parsed.outline.match=$f[e.style.outline]=o)}this._parsed.outline.id&&(e.style.outlineWidth=this._parsed.outline.match[1],e.style.outlineStyle="solid",e.style.outlineColor=this._parsed.outline.match[4]),this.props.style=e.style,e.backgroundColor&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.backgroundColor,n=!0),e.style.background&&!this.props.style.backgroundColor&&(this.props.style.backgroundColor=e.style.background,n=!0);for(const o of PC)if(this.props.style[o]!==e.style[o]){n=!0;break}e.style[":hover"]!==this.props.hoverStyles&&(this.props.hoverStyles=e.style[":hover"],this.hoverEvents||(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),n=!0),e.style[":active"]!==this.props.pressStyles&&(this.props.pressStyles=e.style[":active"],this.activeEvents||(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0)}e.href!==this.props.href&&(this.props.href=e.href,n=!0),e.hrefTarget!==this.props.hrefTarget&&(this.props.hrefTarget=e.hrefTarget,n=!0),e.title!==this.props.title&&(this.props.title=e.title,n=!0),e.className!==this.props.className&&(this.props.className=e.className,e.className&&!this.hoverEvents&&(this.hoverEvents=!0,this.addEventListener("pointerenter",this.addHover),this.addEventListener("pointerleave",this.removeHover)),e.className&&!this.activeEvents&&(this.activeEvents=!0,this.addEventListener("mousedown",this.addPress),this.addEventListener("mouseup",this.removePress)),n=!0),e.relativeSize!==this.props.relativeSize&&(this.props.relativeSize=e.relativeSize,n=!0),e.relativeStyle!==this.props.relativeStyle&&(this.props.relativeStyle=e.relativeStyle,n=!0),e.html!==this.props.html&&(this.props.html=e.html,n=!0),e.target&&(e.target.width!==this.display.width||e.target.height!==this.display.height||e.target.x!==this.points[1]||e.target.y!==this.points[2])&&(n=!0,this.points=Et.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.points=Et.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.width=e.target.width,this.display.height=e.target.height),n&&this.__revision++}}const e0=/(-?[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,t0={},qf={};class kC{constructor(e,n){this.imagesPending=0,this.imagesLoaded=0,this.frameIsRendering=!1,this.pendingDrawCall=!1,this.firstMeaningfulPaint=!1,this.parallelTasks=8,this.frameTasks=0,this.loadingQueueOrdered=!0,this.loadingQueue=[],this.currentTask=Promise.resolve(),this.tasksRunning=0,this.averageJobTime=1e3,this.lastKnownScale=1,this.visible=[],this.previousVisible=[],this.drawCalls=[],this.invalidated=[],this._worker=()=>{if(this.loadingQueue.length){const r=this.loadingQueue.pop();r&&(this.tasksRunning++,this.frameTasks++,this.currentTask=r.task().then(()=>{this.tasksRunning--}).catch(()=>{this.tasksRunning--}))}},this._scheduled=0,this._doWork=()=>{this.loadingQueue.length===0&&this.tasksRunning===0&&this._scheduled&&(clearInterval(this._scheduled),this._scheduled=0),this._worker()},this.canvas=e,this.rendererPosition=e.getBoundingClientRect(),this.ctx=e.getContext("2d",{alpha:!0}),this.ctx.imageSmoothingEnabled=!0,this.options=n||{},this.canvas.style.opacity="0",this.canvas.style.transition="opacity .3s",this.dpi=(n==null?void 0:n.dpi)||1,this.hostCache=n!=null&&n.lruCache?new LC({maxSize:1024*512*512,dispose:(r,o,c)=>{this.invalidated.push(o),r.width=0,r.height=0},sizeCalculation:(r,o)=>r.width*r.height}):{store:{},get(r){return this.store[r]},set(r,o){this.store[r]=o}}}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(e){if(this.clearTransform(),this.lastPaintedObject=void 0,this.frameIsRendering=!1,this.imagesPending=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++){const 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(e,n,r){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const o=this.getCanvasDims(),c=o.width/e,h=o.height/n,v=(c<h?h:c)*(r&&this.dpi||1);return Number.isNaN(v)||(this.lastKnownScale=v),this.lastKnownScale}beforeFrame(e,n,r){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(n);const o=this.getCanvasDims();this.ctx.globalAlpha=1,this.ctx.fillStyle=this.options.background||"rgb(0, 0, 0)",this.ctx.fillRect(0,0,o.width,o.height)}applyTransform(e,n,r,o,c){const h=e.__owner.value;if(h&&h.rotation){this.ctx.save();const v=n+o/2,g=r+c/2;this.ctx.translate(v,g),this.ctx.rotate(h.rotation*Math.PI/180),this.ctx.translate(-v,-g),this.lastPaintedObject=h}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(e,n,r,o,c,h){const v=this.ctx.globalAlpha;if(e instanceof xr||e instanceof ja){if(e.display.rotation){this.ctx.save();let m=r+c/2,w=o+h/2;e.crop&&(m-=e.crop[n*5+1],w-=e.crop[n*5+2]),this.ctx.translate(m,w),this.ctx.rotate(e.display.rotation*Math.PI/180),this.ctx.translate(-m,-w)}if(this.visible.push(e),typeof e.style&&e.style.opacity!=="undefined"){if(!e.style.opacity)return;this.ctx.globalAlpha=e.style.opacity}try{const m=e.__host.canvas,w=this.getCanvasDims();if((m.indices.indexOf(n)===-1||this.invalidated.indexOf(m.canvases[n])!==-1)&&this.schedulePaintToCanvas(m,e,n,gf({x:r+c/2,y:o+c/2},{x:w.width/2,y:w.height/2})),!this.firstMeaningfulPaint)return;const A=this.hostCache.get(m.canvases[n]);if(A)if(e.crop&&e.cropData){if(e.crop[n*5]){const k=[e.crop[n*5+1]/e.display.scale-e.display.points[n*5+1],e.crop[n*5+2]/e.display.scale-e.display.points[n*5+2],1+(e.crop[n*5+3]-e.crop[n*5+1])/e.display.scale,1+(e.crop[n*5+4]-e.crop[n*5+2])/e.display.scale];k[0]+=e.cropData.x/e.display.scale,k[1]+=e.cropData.y/e.display.scale;const M=e.x*this.lastKnownScale,_=e.y*this.lastKnownScale,L=[r+M,o+_,c,h];L[0]+=M,L[1]+=_,this.ctx.drawImage(A,k[0],k[1],k[2],k[3],L[0],L[1],L[2]+1,L[3]+1)}}else this.ctx.drawImage(A,0,0,e.display.points[n*5+3]-e.display.points[n*5+1],e.display.points[n*5+4]-e.display.points[n*5+2],r,o,c+Number.MIN_VALUE,h+Number.MIN_VALUE)}catch{}e.display.rotation&&this.ctx.restore()}const g=e instanceof zu&&this.options.box,x=e instanceof Jy&&this.options.polygon;if((g||x)&&!e.props.className&&!e.props.html&&!e.props.href){if(e.props.style){const m=Object.assign({},e.props.style||{},e.hovering?e.props.hoverStyles:{},e.pressing?e.props.pressStyles:{}),w=e.props.relativeStyle?1:c/e.width;typeof m.opacity<"u"&&(this.ctx.globalAlpha=m.opacity);let A=0;typeof m.borderWidth<"u"&&(A=parseInt(m.borderWidth,10)*w);let k=0;typeof m.outlineWidth<"u"&&(k=parseInt(m.outlineWidth,10)*w);let M=0;if(typeof m.outlineOffset<"u"&&(M=parseInt(m.outlineOffset,10)*w),m.borderColor&&(this.ctx.strokeStyle=m.borderColor),m.boxShadow){const _=m.boxShadow.split(/,(?![^(]*\))/);for(const L of _){const P=t0[L]||e0.exec(L)||e0.exec(L);t0[L]=P,P&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(P[1])*this.dpi*w,this.ctx.shadowOffsetY=parseInt(P[3])*this.dpi*w,this.ctx.shadowBlur=parseInt(P[5])*this.dpi*w,this.ctx.shadowColor=P[9],this.ctx.fillStyle="rgba(0,0,0,1)",this.ctx.fillRect(r+A,o+A,c,h),this.ctx.restore())}}if(this.ctx.fillStyle=m.backgroundColor||"transparent",this.ctx.lineWidth=A,x){const _=e.shape,L=_.points||[],P=L.length;this.ctx.beginPath();for(let O=0;O<P;O++)this.ctx.lineTo(r+L[O][0]*this.lastKnownScale,o+L[O][1]*this.lastKnownScale);_.open||this.ctx.closePath(),A&&this.ctx.stroke(),_.open||this.ctx.fill()}else A&&this.ctx.strokeRect(r+A/2,o+A/2,c+A,h+A),this.ctx.fillRect(r+A,o+A,c,h);k&&(m.outlineColor&&(this.ctx.strokeStyle=m.outlineColor),this.ctx.lineWidth=k,this.ctx.strokeRect(r-k/2-M,o-k/2-M,c+A*2+k+M*2,h+A*2+k+M*2))}this.ctx.globalAlpha=v}}loadImage(e,n,r,o=!1){if(qf[e]&&qf[e].naturalWidth>0){n(qf[e]);return}try{let c=!1;o||setTimeout(()=>{c||this.loadImage(e,n,r,!0)},3e3);const h=document.createElement("img");h.decoding="auto",h.onload=function(){c=!0,n(h),qf[e]=h,h.onload=null},this.options.crossOrigin&&(h.crossOrigin="anonymous"),h.src=e,h.complete&&h.onload({}),h.width}catch(c){console.log("image error",c),r(c)}}schedulePaintToCanvas(e,n,r,o){this.imagesPending++,e.indices.push(r);const c=`${n.id}--${n.display.scale}-${r}`,h=this.invalidated.indexOf(c);h!==-1&&this.invalidated.splice(h,1),e.canvases[r]=c,n.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:c,scale:n.display.scale,network:!0,distance:o,task:()=>new Promise(v=>{if(this.visible.indexOf(n)===-1){this.imagesPending--,e.indices.splice(e.indices.indexOf(r),1),v();return}const g=n.getImageUrl(r);this.loadImage(g,x=>{this.loadingQueue.push({id:c,scale:n.display.scale,distance:o,task:()=>new Promise(m=>{this.imagesLoaded++,e.loaded.push(r),e.loaded.length===e.indices.length&&(e.loading=!1);const w=n.display.points.slice(r*5,r*5+5),A=document.createElement("canvas"),k=A.getContext("2d");A.width=w[3]-w[1],A.height=w[4]-w[2],this.hostCache.set(e.canvases[r],A),this.drawCalls.push(()=>{k.drawImage(x,0,0,w[3]-w[1],w[4]-w[2]),m()})})}),v()},x=>{this.imagesPending--,e.indices.splice(e.indices.indexOf(r),1),v()})})})}afterPaintLayer(e,n){}prepareLayer(e,n){e.__owner.value&&(e.cropData?(this.lastKnownScale*(1/e.display.scale),this.applyTransform(e,n[1],n[2],n[3]-n[1],n[4]-n[2])):this.applyTransform(e,n[1],n[2],n[3]-n[1],n[4]-n[2])),(!e.__host||!e.__host.canvas)&&(e instanceof xr||e instanceof ja)&&this.createImageHost(e)}finishLayer(){this.lastPaintedObject&&this.clearTransform()}createImageHost(e){e.__host=e.__host?e.__host:{},e.__host.canvas={canvas:void 0,canvases:[],indices:[],loaded:[],loading:!1}}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getViewportBounds(e,n,r){const o=e.getActiveZone();if(o){const c=n[3]-n[1]<o.points[3]-o.points[1],h=n[4]-n[2]<o.points[4]-o.points[2];return{x1:c?o.points[1]-r:o.points[1]+(o.points[3]-o.points[1])/2-(n[3]-n[1])/2,y1:h?o.points[2]-r:o.points[2]+(o.points[4]-o.points[2])/2-(n[4]-n[2])/2,x2:c?o.points[3]+r:o.points[1]+(o.points[3]-o.points[1])/2-(n[3]-n[1])/2,y2:h?o.points[4]+r:o.points[2]+(o.points[4]-o.points[2])/2-(n[4]-n[2])/2}}return null}pendingUpdate(){const e=!this.pendingDrawCall&&this.drawCalls.length===0&&this.imagesPending===0&&this.loadingQueue.length===0&&this.tasksRunning===0;return!this.firstMeaningfulPaint&&e?(this.canvas.style.opacity="1",this.firstMeaningfulPaint=e,!0):this.options.debug?!0:!e}getRendererScreenPosition(){return this.rendererPosition}reset(){this.loadingQueue=[],this.drawCalls=[]}}class n0{constructor(e){this.renderers=[];for(const n of e)n&&this.renderers.push(n);this.length=this.renderers.length}afterFrame(e,n,r){for(let o=0;o<this.length;o++)this.renderers[o].afterFrame(e,n,r)}afterPaintLayer(e,n){for(let r=0;r<this.length;r++)this.renderers[r].afterPaintLayer(e,n)}beforeFrame(e,n,r){for(let o=0;o<this.length;o++)this.renderers[o].beforeFrame(e,n,r)}triggerResize(){for(let e=0;e<this.length;e++){const n=this.renderers[e];n.triggerResize&&n.triggerResize()}}getPointsAt(e,n,r,o){return this.renderers[0].getPointsAt(e,n,r,o)}getScale(e,n){return this.renderers[0].getScale(e,n)}getViewportBounds(e,n,r){return this.renderers[0].getViewportBounds(e,n,r)}getRendererScreenPosition(){return this.renderers[0].getRendererScreenPosition()}isReady(){for(let e=0;e<this.length;e++)if(!this.renderers[e].isReady())return!1;return!0}paint(e,n,r,o,c,h){for(let v=0;v<this.length;v++)this.renderers[v].paint(e,n,r,o,c,h)}pendingUpdate(){for(let e=0;e<this.length;e++)if(this.renderers[e].pendingUpdate())return!0;return!1}prepareLayer(e,n){for(let r=0;r<this.length;r++)this.renderers[r].prepareLayer(e,n)}finishLayer(e,n){for(let r=0;r<this.length;r++)this.renderers[r].finishLayer(e,n)}resize(e,n){for(let r=0;r<this.length;r++)this.renderers[r].resize(e,n)}reset(){for(let e=0;e<this.length;e++)this.renderers[e].reset()}}class zC{constructor(e){this.heightRatio=1,this.widthRatio=1,this.target=new Float32Array(5),this.delta=0,this.renderNextFrame=!0,this.canvas=e,this.initialWidth=e.width,this.initialHeight=e.height,this.context=e.getContext("2d"),this.context.globalAlpha=.5,this.aggregate=Ys(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(e,n,r){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);const o=this.initialWidth/e.width,c=this.initialHeight/e.height,h=this.widthRatio>this.heightRatio?o:c;if(this.target=r,this.bounds){const v=e.getPointsAt(this.bounds,this.aggregate,h);for(const[g,x]of v)if(g instanceof xr&&g.__host.canvas){const m=x.length/5;for(let w=0;w<m;w++)g.__host.canvas.canvases[w]&&(x[w+1]*h,x[w+2]*h,(x[w+3]-x[w+1])*h,(x[w+4]-x[w+2])*h)}}e.getPoints().forEach((v,g,x)=>{if(g%5===0&&v){const m={x1:x[g+1]*h,y1:x[g+2]*h,x2:x[g+3]*h,y2:x[g+4]*h,width:(x[g+3]-x[g+1])*h,height:(x[g+4]-x[g+2])*h};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]*h,r[2]*h,(r[3]-r[1])*h,(r[4]-r[2])*h))}}getActiveZone(e){return null}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getScale(e,n){return 1}beforeFrame(e,n){this.bounds=Et.singleBox(e.width,e.height)}drawImage(){}afterPaintLayer(e,n){}paint(e,n,r,o,c,h){this.renderNextFrame=!0}prepareLayer(e){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(e,n,r){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}}var i0=!1,Fa,xp,Ep,Yf,Qf,r0,Gf,wp,Tp,Cp,s0,Rp,Ap,a0,o0;function ki(){if(!i0){i0=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(Rp=/\b(iPhone|iP[ao]d)/.exec(t),Ap=/\b(iP[ao]d)/.exec(t),Cp=/Android/i.exec(t),a0=/FBAN\/\w+;/i.exec(t),o0=/Mobile/i.exec(t),s0=!!/Win64/.exec(t),e){Fa=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Fa&&document&&document.documentMode&&(Fa=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);r0=r?parseFloat(r[1])+4:Fa,xp=e[2]?parseFloat(e[2]):NaN,Ep=e[3]?parseFloat(e[3]):NaN,Yf=e[4]?parseFloat(e[4]):NaN,Yf?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),Qf=e&&e[1]?parseFloat(e[1]):NaN):Qf=NaN}else Fa=xp=Ep=Qf=Yf=NaN;if(n){if(n[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Gf=o?parseFloat(o[1].replace("_",".")):!0}else Gf=!1;wp=!!n[2],Tp=!!n[3]}else Gf=wp=Tp=!1}}var Mp={ie:function(){return ki()||Fa},ieCompatibilityMode:function(){return ki()||r0>Fa},ie64:function(){return Mp.ie()&&s0},firefox:function(){return ki()||xp},opera:function(){return ki()||Ep},webkit:function(){return ki()||Yf},safari:function(){return Mp.webkit()},chrome:function(){return ki()||Qf},windows:function(){return ki()||wp},osx:function(){return ki()||Gf},linux:function(){return ki()||Tp},iphone:function(){return ki()||Rp},mobile:function(){return ki()||Rp||Ap||Cp||o0},nativeApp:function(){return ki()||a0},android:function(){return ki()||Cp},ipad:function(){return ki()||Ap}},NC=Mp,Xf=!!(typeof window<"u"&&window.document&&window.document.createElement),_C={canUseDOM:Xf,canUseWorkers:typeof Worker<"u",canUseEventListeners:Xf&&!!(window.addEventListener||window.attachEvent),canUseViewport:Xf&&!!window.screen,isInWorker:!Xf},UC=_C,l0=UC,u0;l0.canUseDOM&&(u0=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
214
214
  * Checks if an event is supported in the current execution environment.
215
215
  *
216
216
  * NOTE: This will not work correctly for non-generic events such as `change`,
@@ -223,7 +223,7 @@ No matching component was found for:
223
223
  * @return {boolean} True if the event is supported.
224
224
  * @internal
225
225
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
226
- */function jC(t,e){if(!l0.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r=typeof o[n]=="function"}return!r&&u0&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var IC=jC,FC=NC,BC=IC,c0=10,f0=40,d0=800;function h0(t){var e=0,n=0,r=0,o=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*c0,o=n*c0,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||o)&&t.deltaMode&&(t.deltaMode==1?(r*=f0,o*=f0):(r*=d0,o*=d0)),r&&!e&&(e=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:o}}h0.getEventType=function(){return FC.firefox()?"DOMMouseScroll":BC("wheel")?"wheel":"mousewheel"};var HC=h0,VC=HC;function WC(t){return{x:t[1],y:t[2],width:t[3]-t[1],height:t[4]-t[2]}}const $C={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:!1,onPanInSketchMode:()=>{}},p0=(t={})=>({start:function(e){const{zoomWheelConstant:n,enableWheel:r,enableClickToZoom:o}={...$C,...t},c={pointerStart:{x:0,y:0},isPressing:!1,mousemoveBuffer:We(5),multiTouch:{distance:0}};e.world.activatedEvents.push("onMouseUp","onMouseDown","onMouseMove","onTouchStart","onTouchEnd","onTouchMove","onPointerUp","onPointerDown","onPointerMove");function h(){e.world.constraintBounds(),x=0}function v(L){if(L.which>1){c.isPressing=!1;return}e.mode==="explore"&&(L.preventDefault(),c.pointerStart.x=L.atlas.x,c.pointerStart.y=L.atlas.y,e.transitionManager.stopTransition(),c.isPressing=!0)}function g(){c.isPressing&&(e.mode==="explore"&&e.world.constraintBounds(),c.isPressing=!1)}let x=0;function m(L){if(e.mode==="explore"){if(L.atlasTouches.length===1&&(L.preventDefault(),c.pointerStart.x=L.atlasTouches[0].x,c.pointerStart.y=L.atlasTouches[0].y),L.atlasTouches.length===2){L.preventDefault();const k=L.atlasTouches[0].x,O=L.atlasTouches[1].x;c.pointerStart.x=(k+O)/2;const I=L.atlasTouches[0].y,q=L.atlasTouches[1].y;c.pointerStart.y=(I+q)/2,x=gf({x:L.touches[0].clientX,y:L.touches[0].clientY},{x:L.touches[1].clientX,y:L.touches[1].clientY})}e.transitionManager.stopTransition(),c.isPressing=!0}}function w(L){let k=null,O=null,I=0;if(c.isPressing&&L.touches.length===2){const q=L.touches[0].clientX,te=L.touches[1].clientX;k=(q+te)/2;const H=L.touches[0].clientY,J=L.touches[1].clientY;O=(H+J)/2,I=gf({x:L.touches[0].clientX,y:L.touches[0].clientY},{x:L.touches[1].clientX,y:L.touches[1].clientY})}if(c.isPressing&&L.touches.length===1){const q=L.touches[0];k=q.clientX,O=q.clientY}if(k!==null&&O!==null){const q=e.getRendererScreenPosition();if(q){const{x:te,y:H}=e.viewerToWorld(k-q.x,O-q.y),J=I&&x?I/x:1;e.transitionManager.customTransition(re=>{re.from=We(e.target),re.to=vs(re.from,ps(mi(c.pointerStart.x-te,c.pointerStart.y-H),Ru(1/J,te,H)),c.mousemoveBuffer),re.elapsed_time=0,re.total_time=0,re.timingFunction=Ks.easeInOutExpo,re.done=!1})}x=I}}function A(L){if(c.isPressing){const k=e.getRendererScreenPosition();if(k){const{x:O,y:I}=e.viewerToWorld(L.clientX-k.x,L.clientY-k.y);e.transitionManager.customTransition(q=>{q.from=We(e.target),q.to=vs(q.from,mi(c.pointerStart.x-O,c.pointerStart.y-I),c.mousemoveBuffer),q.elapsed_time=0,q.total_time=0,q.timingFunction=Ks.easeInOutExpo,q.done=!1})}}}function P(L){e.mode==="explore"&&e.world.zoomIn(L.atlas)}function M(L){const O=1+VC(L).spinY/n;e.world.zoomTo(O,L.atlas,!0)}e.world.addEventListener("mouseup",h),e.world.addEventListener("touchend",h),e.world.addEventListener("touchstart",m),e.world.addEventListener("mousedown",v),window.addEventListener("touchend",g),window.addEventListener("mouseup",g),window.addEventListener("mousemove",A),window.addEventListener("touchmove",w),o&&(e.world.activatedEvents.push("onClick"),e.world.addEventListener("click",P)),r&&(e.world.activatedEvents.push("onWheel"),e.world.addEventListener("wheel",M));const _=e.world.addLayoutSubscriber((L,k)=>{if(L==="zone-changed"&&e.transitionManager.constrainBounds({transition:{duration:0}}),L==="zoom-to"&&k&&e.transitionManager.zoomTo(k.factor,{origin:k.point,stream:k.stream}),L==="go-home"){const O=k.immediate?{duration:0}:void 0;e.transitionManager.goToRegion(WC(e.homePosition),{transition:O})}if(L==="goto-region"&&k){const O=k.immediate?{duration:0}:{};e.transitionManager.goToRegion(k,{transition:O})}L==="constrain-bounds"&&e.transitionManager.constrainBounds({transition:k!=null&&k.immediate?{duration:0}:void 0})});return()=>{e.world.removeEventListener("mouseup",h),e.world.removeEventListener("touchend",h),e.world.removeEventListener("touchstart",m),e.world.removeEventListener("mousedown",v),window.removeEventListener("touchend",g),window.removeEventListener("mouseup",g),e.world.removeEventListener("mousemove",A),e.world.removeEventListener("touchmove",A),o&&e.world.removeEventListener("click",P),r&&e.world.removeEventListener("wheel",M),_()}},updatePosition(){}}),ju=C.createContext("explore");ju.displayName="Mode";const qC=()=>C.useContext(ju);function Op(t,e,n){var r,o,c,h,v;e==null&&(e=100);function g(){var m=Date.now()-h;m<e&&m>=0?r=setTimeout(g,e-m):(r=null,n||(v=t.apply(c,o),c=o=null))}var x=function(){c=this,o=arguments,h=Date.now();var m=n&&!r;return r||(r=setTimeout(g,e)),m&&(v=t.apply(c,o),c=o=null),v};return x.clear=function(){r&&(clearTimeout(r),r=null)},x.flush=function(){r&&(v=t.apply(c,o),c=o=null,clearTimeout(r),r=null)},x}Op.debounce=Op;var v0=Op;function m0(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:o}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const c=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!c)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[h,v]=C.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),g=C.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:h}),x=e?typeof e=="number"?e:e.scroll:null,m=e?typeof e=="number"?e:e.resize:null,w=C.useRef(!1);C.useEffect(()=>(w.current=!0,()=>void(w.current=!1)));const[A,P,M]=C.useMemo(()=>{const O=()=>{if(!g.current.element)return;const{left:I,top:q,width:te,height:H,bottom:J,right:re,x:$,y:se}=g.current.element.getBoundingClientRect(),ge={left:I,top:q,width:te,height:H,bottom:J,right:re,x:$,y:se};g.current.element instanceof HTMLElement&&o&&(ge.height=g.current.element.offsetHeight,ge.width=g.current.element.offsetWidth),Object.freeze(ge),w.current&&!XC(g.current.lastBounds,ge)&&v(g.current.lastBounds=ge)};return[O,m?v0(O,m):O,x?v0(O,x):O]},[v,o,x,m]);function _(){g.current.scrollContainers&&(g.current.scrollContainers.forEach(O=>O.removeEventListener("scroll",M,!0)),g.current.scrollContainers=null),g.current.resizeObserver&&(g.current.resizeObserver.disconnect(),g.current.resizeObserver=null)}function L(){g.current.element&&(g.current.resizeObserver=new c(M),g.current.resizeObserver.observe(g.current.element),n&&g.current.scrollContainers&&g.current.scrollContainers.forEach(O=>O.addEventListener("scroll",M,{capture:!0,passive:!0})))}const k=O=>{!O||O===g.current.element||(_(),g.current.element=O,g.current.scrollContainers=g0(O),L())};return QC(M,!!n),YC(P),C.useEffect(()=>{_(),L()},[n,M,P]),C.useEffect(()=>_,[]),[k,h,A]}function YC(t){C.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function QC(t,e){C.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function g0(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(t);return[n,r,o].some(c=>c==="auto"||c==="scroll")&&e.push(t),[...e,...g0(t.parentElement)]}const GC=["x","y","top","bottom","left","right","width","height"],XC=(t,e)=>GC.every(n=>t[n]===e[n]),Kf=C.createContext(null);Kf.displayName="Atlas";const Zf=C.createContext(null);Zf.displayName="Bounds";let Jf;if(typeof performance=="object"&&typeof performance.now=="function"){const t=performance;Jf=()=>t.now()}else{const t=Date,e=t.now();Jf=()=>t.now()-e}function y0(t,e){t&&t.appendChild&&e&&t.appendChild(e)}function S0(t,e){t&&t.removeChild&&e&&t.removeChild(e)}function KC(t,e){return S0(t.world,e)}function ZC(t,e,n){return b0(t.world,e,n)}function b0(t,e,n){t&&t instanceof Ff&&(t=t.world),t&&t.insertBefore&&t.insertBefore(e,n)}function x0(t,e,n){if(n&&(t.applyProps&&t.applyProps(n),t instanceof Hr))for(const r of vf){const o=r.slice(2).toLowerCase();n[r]!==e[r]&&(e[r]&&t.removeEventListener(o,e[r]),t.addEventListener(o,n[r]))}}function E0(t,e){const n=Object.keys(e);let r=!1;for(const o of n)if(vf.indexOf(o)!==-1){const c=tl[o];if(c){if(t.activatedEvents.indexOf(c)!==-1)continue;r=!0,t.activatedEvents.push(c)}}r&&t.triggerEventActivation()}const ed=new Map,w0={};function JC(t,{args:e=[],...n},r,o,c){if(!(r instanceof Ff)&&c){const g=x=>x.return?g(x.return):x.stateNode&&x.stateNode.containerInfo;r=g(c)}let h,v=r.world;switch(t){case"world":h=cl.withProps({width:n.width,height:n.height,viewingDirection:"left-to-right"}),h.activatedEvents=v.activatedEvents,h.eventHandlers=v.eventHandlers,h.subscriptions=v.subscriptions,h.triggerEventActivation(),v=h;break;case"box":h=new zu;break;case"shape":h=new Jy;break;case"worldObject":case"world-object":h=new ku;break;case"worldImage":case"world-image":h=new xr;break;case"texture":h=new tp;break;case"compositeImage":case"composite-image":h=new TC({id:n.id,width:n.width,height:n.height,images:[]});break;case"tiledImage":case"tiled-image":h=ja.fromTile(n.uri,n.display,n.tile,n.scaleFactor,void 0,n.format);break;case"paragraph":h=new Nf,h.text=n.children;break;default:return}return E0(v,n),x0(h,{},n),h}function eR(t,e){if(e instanceof cl)t.world=e;else if(e instanceof ku)t.world.appendChild(e);else if(e)throw new Error("Invalid root")}const Iu=Zx({unstable_now:Jf,now:Jf,createInstance:JC,removeChild:S0,appendChild:y0,appendInitialChild:y0,insertBefore:b0,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:eR,removeChildFromContainer:KC,createTextInstance(){},insertInContainerBefore:ZC,prepareUpdate(t,e,n,r,o){return E0(o.world,r),r},commitUpdate(t,e,n,r,o,c){t.applyProps&&e&&x0(t,r,e)},finalizeInitialChildren(t){return t==null?void 0:t.__handlers},getChildHostContext(){return w0},getRootHostContext(){return w0},prepareForCommit(t){return t.isCommitting=!0,null},preparePortalMount(){},hideInstance(t){t&&t.points&&(t.points[0]=0)},unhideInstance(t,e){t&&t.points&&(t.points[0]=1)},getPublicInstance(t){return t},hideTextInstance(){throw new Error("Text is not allowed in the react-three-fibre tree. You may have extraneous whitespace between components.")},resetAfterCommit(t){t.isCommitting=!1,t.pendingUpdate=!0,t.world&&t.world.needsRecalculate&&(t.world.recalculateWorldSize(),t.world.triggerRepaint())},shouldSetTextContent(){return!1},clearContainer(){return!1}});Iu.injectIntoDevTools({bundleType:0,version:C.version,rendererPackageName:"@atlas-viewer/atlas"});function Dp(t,e){const n=ed.get(t);n&&Iu.updateContainer(null,n,null,()=>{ed.delete(t),e&&e(t)})}const T0={render(t,e){const n=ed.get(e);if(n)Iu.updateContainer(t,n,null,()=>{});else{const r=Iu.createContainer(e,0,null,!1,null,"",()=>{},null);Iu.updateContainer(t,r,null,null),ed.set(e,r)}},unmountComponentAtNode(t,e){Dp(t,e)}},tR=C.memo(({children:t,setIsReady:e,onCreated:n,bounds:r,preset:o,mode:c="explore"})=>{const h=C.useCallback(function(g){const x=C.useRef(!1),m=()=>{e(!0)};return C.useEffect(()=>{if(o&&!x.current){o.runtime.goHome();const w=n&&n(o);return void(w&&w.then?w.then(m):m())}return()=>{}},[]),C.useEffect(()=>{x.current=!0},[]),g.children},[o]);return C.useLayoutEffect(()=>{if(o){const v=o.runtime;c!==v.mode&&(v.mode=c),T0.render(C.createElement(C.StrictMode,null,C.createElement(h,null,C.createElement(Zf.Provider,{value:r},C.createElement(ju.Provider,{value:c},C.createElement(Kf.Provider,{value:o},t))))),v)}},[o,c,t]),C.useLayoutEffect(()=>{if(o){const v=o.runtime;return()=>{T0.unmountComponentAtNode(v)}}return()=>{}},[o]),null});class nR{constructor(e,n){this.fragmentShaderSource=`
226
+ */function jC(t,e){if(!l0.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r=typeof o[n]=="function"}return!r&&u0&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var IC=jC,FC=NC,BC=IC,c0=10,f0=40,d0=800;function h0(t){var e=0,n=0,r=0,o=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*c0,o=n*c0,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||o)&&t.deltaMode&&(t.deltaMode==1?(r*=f0,o*=f0):(r*=d0,o*=d0)),r&&!e&&(e=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:o}}h0.getEventType=function(){return FC.firefox()?"DOMMouseScroll":BC("wheel")?"wheel":"mousewheel"};var HC=h0,WC=HC;function VC(t){return{x:t[1],y:t[2],width:t[3]-t[1],height:t[4]-t[2]}}const $C={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:!1,onPanInSketchMode:()=>{}},p0=(t={})=>({start:function(e){const{zoomWheelConstant:n,enableWheel:r,enableClickToZoom:o}={...$C,...t},c={pointerStart:{x:0,y:0},isPressing:!1,mousemoveBuffer:$e(5),multiTouch:{distance:0}};e.world.activatedEvents.push("onMouseUp","onMouseDown","onMouseMove","onTouchStart","onTouchEnd","onTouchMove","onPointerUp","onPointerDown","onPointerMove");function h(){e.world.constraintBounds(),x=0}function v(L){if(L.which>1){c.isPressing=!1;return}e.mode==="explore"&&(L.preventDefault(),c.pointerStart.x=L.atlas.x,c.pointerStart.y=L.atlas.y,e.transitionManager.stopTransition(),c.isPressing=!0)}function g(){c.isPressing&&(e.mode==="explore"&&e.world.constraintBounds(),c.isPressing=!1)}let x=0;function m(L){if(e.mode==="explore"){if(L.atlasTouches.length===1&&(L.preventDefault(),c.pointerStart.x=L.atlasTouches[0].x,c.pointerStart.y=L.atlasTouches[0].y),L.atlasTouches.length===2){L.preventDefault();const P=L.atlasTouches[0].x,O=L.atlasTouches[1].x;c.pointerStart.x=(P+O)/2;const H=L.atlasTouches[0].y,q=L.atlasTouches[1].y;c.pointerStart.y=(H+q)/2,x=gf({x:L.touches[0].clientX,y:L.touches[0].clientY},{x:L.touches[1].clientX,y:L.touches[1].clientY})}e.transitionManager.stopTransition(),c.isPressing=!0}}function w(L){let P=null,O=null,H=0;if(c.isPressing&&L.touches.length===2){const q=L.touches[0].clientX,Q=L.touches[1].clientX;P=(q+Q)/2;const B=L.touches[0].clientY,J=L.touches[1].clientY;O=(B+J)/2,H=gf({x:L.touches[0].clientX,y:L.touches[0].clientY},{x:L.touches[1].clientX,y:L.touches[1].clientY})}if(c.isPressing&&L.touches.length===1){const q=L.touches[0];P=q.clientX,O=q.clientY}if(P!==null&&O!==null){const q=e.getRendererScreenPosition();if(q){const{x:Q,y:B}=e.viewerToWorld(P-q.x,O-q.y),J=H&&x?H/x:1;e.transitionManager.customTransition(ie=>{ie.from=$e(e.target),ie.to=vs(ie.from,ps(gi(c.pointerStart.x-Q,c.pointerStart.y-B),Ru(1/J,Q,B)),c.mousemoveBuffer),ie.elapsed_time=0,ie.total_time=0,ie.timingFunction=Ks.easeInOutExpo,ie.done=!1})}x=H}}function A(L){if(c.isPressing){const P=e.getRendererScreenPosition();if(P){const{x:O,y:H}=e.viewerToWorld(L.clientX-P.x,L.clientY-P.y);e.transitionManager.customTransition(q=>{q.from=$e(e.target),q.to=vs(q.from,gi(c.pointerStart.x-O,c.pointerStart.y-H),c.mousemoveBuffer),q.elapsed_time=0,q.total_time=0,q.timingFunction=Ks.easeInOutExpo,q.done=!1})}}}function k(L){e.mode==="explore"&&e.world.zoomIn(L.atlas)}function M(L){const O=1+WC(L).spinY/n;e.world.zoomTo(O,L.atlas,!0)}e.world.addEventListener("mouseup",h),e.world.addEventListener("touchend",h),e.world.addEventListener("touchstart",m),e.world.addEventListener("mousedown",v),window.addEventListener("touchend",g),window.addEventListener("mouseup",g),window.addEventListener("mousemove",A),window.addEventListener("touchmove",w),o&&(e.world.activatedEvents.push("onClick"),e.world.addEventListener("click",k)),r&&(e.world.activatedEvents.push("onWheel"),e.world.addEventListener("wheel",M));const _=e.world.addLayoutSubscriber((L,P)=>{if(L==="zone-changed"&&e.transitionManager.constrainBounds({transition:{duration:0}}),L==="zoom-to"&&P&&e.transitionManager.zoomTo(P.factor,{origin:P.point,stream:P.stream}),L==="go-home"){const O=P.immediate?{duration:0}:void 0;e.transitionManager.goToRegion(VC(e.homePosition),{transition:O})}if(L==="goto-region"&&P){const O=P.immediate?{duration:0}:{};e.transitionManager.goToRegion(P,{transition:O})}L==="constrain-bounds"&&e.transitionManager.constrainBounds({transition:P!=null&&P.immediate?{duration:0}:void 0})});return()=>{e.world.removeEventListener("mouseup",h),e.world.removeEventListener("touchend",h),e.world.removeEventListener("touchstart",m),e.world.removeEventListener("mousedown",v),window.removeEventListener("touchend",g),window.removeEventListener("mouseup",g),e.world.removeEventListener("mousemove",A),e.world.removeEventListener("touchmove",A),o&&e.world.removeEventListener("click",k),r&&e.world.removeEventListener("wheel",M),_()}},updatePosition(){}}),ju=C.createContext("explore");ju.displayName="Mode";const qC=()=>C.useContext(ju);function Op(t,e,n){var r,o,c,h,v;e==null&&(e=100);function g(){var m=Date.now()-h;m<e&&m>=0?r=setTimeout(g,e-m):(r=null,n||(v=t.apply(c,o),c=o=null))}var x=function(){c=this,o=arguments,h=Date.now();var m=n&&!r;return r||(r=setTimeout(g,e)),m&&(v=t.apply(c,o),c=o=null),v};return x.clear=function(){r&&(clearTimeout(r),r=null)},x.flush=function(){r&&(v=t.apply(c,o),c=o=null,clearTimeout(r),r=null)},x}Op.debounce=Op;var v0=Op;function m0(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:o}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const c=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!c)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[h,v]=C.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),g=C.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:h}),x=e?typeof e=="number"?e:e.scroll:null,m=e?typeof e=="number"?e:e.resize:null,w=C.useRef(!1);C.useEffect(()=>(w.current=!0,()=>void(w.current=!1)));const[A,k,M]=C.useMemo(()=>{const O=()=>{if(!g.current.element)return;const{left:H,top:q,width:Q,height:B,bottom:J,right:ie,x:$,y:re}=g.current.element.getBoundingClientRect(),me={left:H,top:q,width:Q,height:B,bottom:J,right:ie,x:$,y:re};g.current.element instanceof HTMLElement&&o&&(me.height=g.current.element.offsetHeight,me.width=g.current.element.offsetWidth),Object.freeze(me),w.current&&!XC(g.current.lastBounds,me)&&v(g.current.lastBounds=me)};return[O,m?v0(O,m):O,x?v0(O,x):O]},[v,o,x,m]);function _(){g.current.scrollContainers&&(g.current.scrollContainers.forEach(O=>O.removeEventListener("scroll",M,!0)),g.current.scrollContainers=null),g.current.resizeObserver&&(g.current.resizeObserver.disconnect(),g.current.resizeObserver=null)}function L(){g.current.element&&(g.current.resizeObserver=new c(M),g.current.resizeObserver.observe(g.current.element),n&&g.current.scrollContainers&&g.current.scrollContainers.forEach(O=>O.addEventListener("scroll",M,{capture:!0,passive:!0})))}const P=O=>{!O||O===g.current.element||(_(),g.current.element=O,g.current.scrollContainers=g0(O),L())};return QC(M,!!n),YC(k),C.useEffect(()=>{_(),L()},[n,M,k]),C.useEffect(()=>_,[]),[P,h,A]}function YC(t){C.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function QC(t,e){C.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function g0(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(t);return[n,r,o].some(c=>c==="auto"||c==="scroll")&&e.push(t),[...e,...g0(t.parentElement)]}const GC=["x","y","top","bottom","left","right","width","height"],XC=(t,e)=>GC.every(n=>t[n]===e[n]),Kf=C.createContext(null);Kf.displayName="Atlas";const Zf=C.createContext(null);Zf.displayName="Bounds";let Jf;if(typeof performance=="object"&&typeof performance.now=="function"){const t=performance;Jf=()=>t.now()}else{const t=Date,e=t.now();Jf=()=>t.now()-e}function y0(t,e){t&&t.appendChild&&e&&t.appendChild(e)}function S0(t,e){t&&t.removeChild&&e&&t.removeChild(e)}function KC(t,e){return S0(t.world,e)}function ZC(t,e,n){return b0(t.world,e,n)}function b0(t,e,n){t&&t instanceof Ff&&(t=t.world),t&&t.insertBefore&&t.insertBefore(e,n)}function x0(t,e,n){if(n&&(t.applyProps&&t.applyProps(n),t instanceof Hr))for(const r of vf){const o=r.slice(2).toLowerCase();n[r]!==e[r]&&(e[r]&&t.removeEventListener(o,e[r]),t.addEventListener(o,n[r]))}}function E0(t,e){const n=Object.keys(e);let r=!1;for(const o of n)if(vf.indexOf(o)!==-1){const c=tl[o];if(c){if(t.activatedEvents.indexOf(c)!==-1)continue;r=!0,t.activatedEvents.push(c)}}r&&t.triggerEventActivation()}const ed=new Map,w0={};function JC(t,{args:e=[],...n},r,o,c){if(!(r instanceof Ff)&&c){const g=x=>x.return?g(x.return):x.stateNode&&x.stateNode.containerInfo;r=g(c)}let h,v=r.world;switch(t){case"world":h=cl.withProps({width:n.width,height:n.height,viewingDirection:"left-to-right"}),h.activatedEvents=v.activatedEvents,h.eventHandlers=v.eventHandlers,h.subscriptions=v.subscriptions,h.triggerEventActivation(),v=h;break;case"box":h=new zu;break;case"shape":h=new Jy;break;case"worldObject":case"world-object":h=new ku;break;case"worldImage":case"world-image":h=new xr;break;case"texture":h=new tp;break;case"compositeImage":case"composite-image":h=new TC({id:n.id,width:n.width,height:n.height,images:[]});break;case"tiledImage":case"tiled-image":h=ja.fromTile(n.uri,n.display,n.tile,n.scaleFactor,void 0,n.format);break;case"paragraph":h=new Nf,h.text=n.children;break;default:return}return E0(v,n),x0(h,{},n),h}function eR(t,e){if(e instanceof cl)t.world=e;else if(e instanceof ku)t.world.appendChild(e);else if(e)throw new Error("Invalid root")}const Iu=Zx({unstable_now:Jf,now:Jf,createInstance:JC,removeChild:S0,appendChild:y0,appendInitialChild:y0,insertBefore:b0,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:eR,removeChildFromContainer:KC,createTextInstance(){},insertInContainerBefore:ZC,prepareUpdate(t,e,n,r,o){return E0(o.world,r),r},commitUpdate(t,e,n,r,o,c){t.applyProps&&e&&x0(t,r,e)},finalizeInitialChildren(t){return t==null?void 0:t.__handlers},getChildHostContext(){return w0},getRootHostContext(){return w0},prepareForCommit(t){return t.isCommitting=!0,null},preparePortalMount(){},hideInstance(t){t&&t.points&&(t.points[0]=0)},unhideInstance(t,e){t&&t.points&&(t.points[0]=1)},getPublicInstance(t){return t},hideTextInstance(){throw new Error("Text is not allowed in the react-three-fibre tree. You may have extraneous whitespace between components.")},resetAfterCommit(t){t.isCommitting=!1,t.pendingUpdate=!0,t.world&&t.world.needsRecalculate&&(t.world.recalculateWorldSize(),t.world.triggerRepaint())},shouldSetTextContent(){return!1},clearContainer(){return!1}});Iu.injectIntoDevTools({bundleType:0,version:C.version,rendererPackageName:"@atlas-viewer/atlas"});function Dp(t,e){const n=ed.get(t);n&&Iu.updateContainer(null,n,null,()=>{ed.delete(t),e&&e(t)})}const T0={render(t,e){const n=ed.get(e);if(n)Iu.updateContainer(t,n,null,()=>{});else{const r=Iu.createContainer(e,0,null,!1,null,"",()=>{},null);Iu.updateContainer(t,r,null,null),ed.set(e,r)}},unmountComponentAtNode(t,e){Dp(t,e)}},tR=C.memo(({children:t,setIsReady:e,onCreated:n,bounds:r,preset:o,mode:c="explore"})=>{const h=C.useCallback(function(g){const x=C.useRef(!1),m=()=>{e(!0)};return C.useEffect(()=>{if(o&&!x.current){o.runtime.goHome();const w=n&&n(o);return void(w&&w.then?w.then(m):m())}return()=>{}},[]),C.useEffect(()=>{x.current=!0},[]),g.children},[o]);return C.useLayoutEffect(()=>{if(o){const v=o.runtime;c!==v.mode&&(v.mode=c),T0.render(C.createElement(C.StrictMode,null,C.createElement(h,null,C.createElement(Zf.Provider,{value:r},C.createElement(ju.Provider,{value:c},C.createElement(Kf.Provider,{value:o},t))))),v)}},[o,c,t]),C.useLayoutEffect(()=>{if(o){const v=o.runtime;return()=>{T0.unmountComponentAtNode(v)}}return()=>{}},[o]),null});class nR{constructor(e,n){this.fragmentShaderSource=`
227
227
  precision mediump float;
228
228
 
229
229
  uniform sampler2D u_image;
@@ -261,11 +261,11 @@ No matching component was found for:
261
261
  `)),this.classes={hostClassName:this.stylesheet.addStylesheet(`
262
262
  position: absolute;
263
263
  transform-origin: 0px 0px;
264
- `),interactive:this.stylesheet.addStylesheet("pointer-events: all"),nonInteractive:this.stylesheet.addStylesheet("pointer-events: none")},this.stylesheet.updateSheet()}createHtmlHost(e){if(this.htmlContainer&&(this.options.box||e.props.className||e.props.html||e.props.href)){const n=document.createElement(e.props.href?"a":"div");if(e.props.href){n.style.display="block",n.href=e.props.href;const r=e.props.hrefTarget||"_blank";n.target=r,r!=="_self"&&(n.rel="noopener noreferrer")}n.title=e.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),e.__host={element:n,revision:null,relative:!1},this.updateHtmlHost(e,e.width,e.height),e.__onCreate&&e.__onCreate()}}triggerResize(){this.options.triggerResize()}updateHtmlHost(e,n,r){if(e.__revision!==e.__host.revision){const o=e.__host.element,c=[this.classes.hostClassName];if(e.props.interactive?this.options.inlineStyles?o.style.pointerEvents="all":c.push(this.classes.interactive):this.options.inlineStyles?o.style.pointerEvents="none":c.push(this.classes.nonInteractive),e.props.href){o.style.display="block",o.href=e.props.href;const g=e.props.hrefTarget||"_blank";o.target=g,g!=="_self"?o.rel="noopener noreferrer":o.rel=""}else o.href&&o.removeAttribute("href");if(e.props.title&&(o.title=e.props.title||""),e.props.className&&(c.push(e.props.className),e.hovering&&c.push(`${e.props.className}--hover`),e.pressing&&c.push(`${e.props.className}--active`)),e.props.relativeStyle?(o.style.width=`${n||e.width}px`,o.style.height=`${r||e.height}px`):(o.style.width=`${e.width}px`,o.style.height=`${e.height}px`),e.props.style){Object.assign(o.style,e.props.style||{},e.hovering?e.props.hoverStyles||{}:{},e.pressing?e.props.pressStyles||{}:{});return}if(this.options.text&&e instanceof Nf){e.text&&(o.innerText=e.text),e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor),e.color&&(o.style.color=e.color),e.props.font&&(o.style.font=e.props.font),e.props.textAlign&&(o.style.textAlign=e.props.textAlign),e.__host.revision=e.__revision;const g=c.join(" ");o.className=g,o.part=g}e instanceof zu&&(this.options.box||e.props.className||e.props.html)&&(e.props.backgroundColor&&(o.style.backgroundColor=e.props.backgroundColor),e.props.border!==o.style.border&&(o.style.border=e.props.border));const v=c.join(" ");o.className=v,o.part=v}}afterFrame(e,n,r){this.stylesheet.updateSheet();for(const o of this.previousVisible)this.visible.indexOf(o)===-1&&this.htmlContainer&&o.__id&&this.htmlIds.indexOf(o.__id)!==-1&&this.htmlContainer.removeChild(o.__host.element);this.previousVisible=this.visible}afterPaintLayer(e,n){}beforeFrame(e,n,r){this.stylesheet.clearClasses(),this.paintTx++,this.zIndex=0,this.visible=[]}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getScale(e,n){const r=this.rendererPosition.width/e,o=this.rendererPosition.height/n;return r<o?o:r}getViewportBounds(e,n,r){return null}isReady(){return!1}paint(e,n,r,o,c,h){if(this.zIndex++,(this.options.text&&e instanceof Nf||e instanceof zu&&(this.options.box||e.props.className||e.props.html))&&e.__host.tx!==this.paintTx&&(this.visible.push(e),e.__host.tx=this.paintTx,this.htmlContainer)){this.updateHtmlHost(e,c,h);const v=c/e.width,g=e.__host.element;g.style.zIndex=`${this.zIndex}`,e.props.relativeStyle?g.style.transform=`translate(${Math.round(r)}px, ${Math.round(o)}px)`:g.style.transform=`translate(${Math.round(r)}px, ${Math.round(o)}px) scale(${v})`,this.previousVisible.indexOf(e)===-1&&this.htmlContainer.appendChild(g),this.htmlIds.indexOf(e.__id)===-1&&this.htmlIds.push(e.__id)}}pendingUpdate(){return!1}prepareLayer(e){e.__host||(e instanceof Nf||e instanceof zu)&&this.createHtmlHost(e)}resize(e,n){typeof e<"u"&&typeof n<"u"&&(this.htmlContainer.style.width=`${e}px`,this.htmlContainer.style.height=`${n}px`),this.rendererPosition=this.htmlContainer.getBoundingClientRect()}getRendererScreenPosition(){return this.rendererPosition}finishLayer(){}reset(){}}const td=class{constructor(t,e,n){this.activatedEvents=[],this.eventHandlers=[],this.pointerMoveEvent=void 0,this.pointerEventState={isClicking:!1,isDragging:!1,isPressed:!1,mousedOver:[],itemsBeingDragged:[],mouseDownStart:{x:0,y:0},lastTouches:[]},this._realPointerMove=o=>{this.pointerMoveEvent=o},this.onWheelEvent=o=>{o.preventDefault(),this.onPointerEvent(o)},this.onTouchEvent=o=>{const c=tl[o.type],h=[],v=o.touches.length;for(let g=0;g<v;g++){const x=o.touches.item(g);if(!x)continue;const{x:m,y:w}=this.runtime.viewerToWorld(x.clientX-this.bounds.left,x.clientY-this.bounds.top),A={id:x.identifier,x:m,y:w};h.push(A)}h.length&&this.assignToEvent(o,h[0].x,h[0].y),c!=="onTouchEnd"?(this.pointerEventState.lastTouches=h,o.atlasTouches=h,this.runtime.world.propagateTouchEvent(c,o,h)):(o.atlasTouches=[],this.runtime.world.propagateTouchEvent(c,o,this.pointerEventState.lastTouches),this.pointerEventState.lastTouches=[])},this.onPointerEvent=o=>{const c=tl[o.type];if(c&&this.runtime.world.activatedEvents.indexOf(c)!==-1){const{x:h,y:v}=this.runtime.viewerToWorld(o.clientX-this.bounds.left,o.clientY-this.bounds.top);this.assignToEvent(o,h,v),this.runtime.world.propagatePointerEvent(c,o,h,v)}},this.onPointerDown=o=>{this.pointerEventState.isPressed=!0,this.pointerEventState.isClicking=!0,this.pointerEventState.mouseDownStart.x=o.clientX,this.pointerEventState.mouseDownStart.y=o.clientY,setTimeout(()=>{this.runtime&&(this.pointerEventState.isClicking=!1)},250),setTimeout(()=>{if(this.runtime&&this.pointerEventState.isPressed&&!this.pointerEventState.isDragging){const c=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",o,c.x,c.y)}},800),this.onPointerEvent(o)},this.onPointerUp=o=>{if(this.pointerEventState.isClicking){const{x:c,y:h}=this.runtime.viewerToWorld(o.clientX-this.bounds.left,o.clientY-this.bounds.top);this.assignToEvent(o,c,h),this.runtime.world.propagatePointerEvent("onClick",o,c,h)}if(this.pointerEventState.isDragging){for(const c of this.pointerEventState.itemsBeingDragged)c.dispatchEvent("onDragEnd",o);this.pointerEventState.isDragging=!1}this.pointerEventState.isClicking=!1,this.pointerEventState.isPressed=!1,this.pointerEventState.itemsBeingDragged=[],this.onPointerEvent(o)},this.onPointerMove=o=>{this.pointerMoveEvent=void 0;const{x:c,y:h}=this.runtime.viewerToWorld(o.clientX-this.bounds.left,o.clientY-this.bounds.top);if(Number.isNaN(c)||Number.isNaN(h))return;this.assignToEvent(o,c,h),this.runtime.world.propagatePointerEvent("onPointerMove",o,c,h);const v=this.runtime.world.propagatePointerEvent("onMouseMove",o,c,h),g=[],x=[];for(const m of v)g.push(m.id),x.push(m),this.pointerEventState.mousedOver.indexOf(m)===-1&&(m.dispatchEvent("onMouseEnter",o),m.dispatchEvent("onPointerEnter",o),m.dispatchEvent("onMouseOver",o),m.dispatchEvent("onPointerOver",o));for(const m of this.pointerEventState.mousedOver)g.indexOf(m.id)===-1&&(m.dispatchEvent("onMouseLeave",o),m.dispatchEvent("onPointerLeave",o),m.dispatchEvent("onMouseOut",o),m.dispatchEvent("onPointerOut",o));if(this.pointerEventState.isDragging)for(const m of this.pointerEventState.itemsBeingDragged)m.dispatchEvent("onDrag",o);if(this.pointerEventState.isPressed&&!this.pointerEventState.isDragging&&gf(this.pointerEventState.mouseDownStart,{x:o.clientX,y:o.clientY})>50){const m=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",{...o,atlas:{x:m.x,y:m.y}},m.x,m.y)}this.pointerEventState.mousedOver=x},this.element=t,this.runtime=e,this.unsubscribe=e.world.addLayoutSubscriber(this.layoutSubscriber.bind(this)),this.bounds=t.getBoundingClientRect(),this.options={simulationRate:0,...n||{}};let r=0;e.registerHook("useFrame",o=>{r+=o,r>this.options.simulationRate&&this.pointerMoveEvent&&(r=0,e.updateNextFrame())}),e.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.activateEvents()}assignToEvent(t,e,n){td.eventPool.atlas.x=e,td.eventPool.atlas.y=n,t.atlas=td.eventPool.atlas}activateEvents(){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.unsubscribe();for(const[t,e]of this.eventHandlers)this.element.removeEventListener(this.normalizeEventName(t),e)}};let Pp=td;Pp.eventPool={atlas:{x:0,y:0}};function A0({interactive:t=!0,viewport:e,forceRefresh:n,canvasElement:r,overlayElement:o,controllerConfig:c,unstable_webglRenderer:h,dpi:v,debug:g,canvasBox:x=!0,polygon:m=!0,navigatorElement:w,background:A,runtimeOptions:P}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";const M=t?p0({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,...c||{}}):void 0,_=new n0([h?new nR(r,{dpi:v}):new kC(r,{dpi:v,debug:g,box:x,polygon:m,background:A}),o?new R0(o,{box:h||!x,text:!0,triggerResize:n}):void 0,w?new zC(w):void 0]),L=new Ff(_,new cl(1024,1024),e,M?[M]:[],P),k=new Pp(r,L);return{name:"default-preset",em:k,runtime:L,renderer:_,controller:M,canvas:r,navigator:w,unmount(){Dp(L),L.stopControllers(),L.stop(),L.reset(),k&&k.stop()}}}class iR{constructor(e,n){this.pending=!0,this.zIndex=0,this.lastKnownScale=1,this.currentlyVisible=[],this.previouslyVisible=[],this.container=e,this.rendererPosition=e.getBoundingClientRect();const{width:r,height:o}=this.rendererPosition;this.width=r,this.height=o,this.options={addPart:!1,setDraggableFalse:!1,imageClass:"",widthStylesheet:!1,sheetPrefix:"position-",background:"#000",...n||{}},this.stylesheet=new C0({sheetPrefix:this.options.sheetPrefix}),this.container.classList.add(this.stylesheet.addStylesheet(`
264
+ `),interactive:this.stylesheet.addStylesheet("pointer-events: all"),nonInteractive:this.stylesheet.addStylesheet("pointer-events: none")},this.stylesheet.updateSheet()}createHtmlHost(e){if(this.htmlContainer&&(this.options.box||e.props.className||e.props.html||e.props.href)){const n=document.createElement(e.props.href?"a":"div");if(e.props.href){n.style.display="block",n.href=e.props.href;const r=e.props.hrefTarget||"_blank";n.target=r,r!=="_self"&&(n.rel="noopener noreferrer")}n.title=e.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),e.__host={element:n,revision:null,relative:!1},this.updateHtmlHost(e,e.width,e.height),e.__onCreate&&e.__onCreate()}}triggerResize(){this.options.triggerResize()}updateHtmlHost(e,n,r){if(e.__revision!==e.__host.revision){const o=e.__host.element,c=[this.classes.hostClassName];if(e.props.interactive?this.options.inlineStyles?o.style.pointerEvents="all":c.push(this.classes.interactive):this.options.inlineStyles?o.style.pointerEvents="none":c.push(this.classes.nonInteractive),e.props.href){o.style.display="block",o.href=e.props.href;const g=e.props.hrefTarget||"_blank";o.target=g,g!=="_self"?o.rel="noopener noreferrer":o.rel=""}else o.href&&o.removeAttribute("href");if(e.props.title&&(o.title=e.props.title||""),e.props.className&&(c.push(e.props.className),e.hovering&&c.push(`${e.props.className}--hover`),e.pressing&&c.push(`${e.props.className}--active`)),e.props.relativeStyle?(o.style.width=`${n||e.width}px`,o.style.height=`${r||e.height}px`):(o.style.width=`${e.width}px`,o.style.height=`${e.height}px`),e.props.style){Object.assign(o.style,e.props.style||{},e.hovering?e.props.hoverStyles||{}:{},e.pressing?e.props.pressStyles||{}:{});return}if(this.options.text&&e instanceof Nf){e.text&&(o.innerText=e.text),e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor),e.color&&(o.style.color=e.color),e.props.font&&(o.style.font=e.props.font),e.props.textAlign&&(o.style.textAlign=e.props.textAlign),e.__host.revision=e.__revision;const g=c.join(" ");o.className=g,o.part=g}e instanceof zu&&(this.options.box||e.props.className||e.props.html)&&(e.props.backgroundColor&&(o.style.backgroundColor=e.props.backgroundColor),e.props.border!==o.style.border&&(o.style.border=e.props.border));const v=c.join(" ");o.className=v,o.part=v}}afterFrame(e,n,r){this.stylesheet.updateSheet();for(const o of this.previousVisible)this.visible.indexOf(o)===-1&&this.htmlContainer&&o.__id&&this.htmlIds.indexOf(o.__id)!==-1&&this.htmlContainer.removeChild(o.__host.element);this.previousVisible=this.visible}afterPaintLayer(e,n){}beforeFrame(e,n,r){this.stylesheet.clearClasses(),this.paintTx++,this.zIndex=0,this.visible=[]}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getScale(e,n){const r=this.rendererPosition.width/e,o=this.rendererPosition.height/n;return r<o?o:r}getViewportBounds(e,n,r){return null}isReady(){return!1}paint(e,n,r,o,c,h){if(this.zIndex++,(this.options.text&&e instanceof Nf||e instanceof zu&&(this.options.box||e.props.className||e.props.html))&&e.__host.tx!==this.paintTx&&(this.visible.push(e),e.__host.tx=this.paintTx,this.htmlContainer)){this.updateHtmlHost(e,c,h);const v=c/e.width,g=e.__host.element;g.style.zIndex=`${this.zIndex}`,e.props.relativeStyle?g.style.transform=`translate(${Math.round(r)}px, ${Math.round(o)}px)`:g.style.transform=`translate(${Math.round(r)}px, ${Math.round(o)}px) scale(${v})`,this.previousVisible.indexOf(e)===-1&&this.htmlContainer.appendChild(g),this.htmlIds.indexOf(e.__id)===-1&&this.htmlIds.push(e.__id)}}pendingUpdate(){return!1}prepareLayer(e){e.__host||(e instanceof Nf||e instanceof zu)&&this.createHtmlHost(e)}resize(e,n){typeof e<"u"&&typeof n<"u"&&(this.htmlContainer.style.width=`${e}px`,this.htmlContainer.style.height=`${n}px`),this.rendererPosition=this.htmlContainer.getBoundingClientRect()}getRendererScreenPosition(){return this.rendererPosition}finishLayer(){}reset(){}}const td=class{constructor(t,e,n){this.activatedEvents=[],this.eventHandlers=[],this.pointerMoveEvent=void 0,this.pointerEventState={isClicking:!1,isDragging:!1,isPressed:!1,mousedOver:[],itemsBeingDragged:[],mouseDownStart:{x:0,y:0},lastTouches:[]},this._realPointerMove=o=>{this.pointerMoveEvent=o},this.onWheelEvent=o=>{o.preventDefault(),this.onPointerEvent(o)},this.onTouchEvent=o=>{const c=tl[o.type],h=[],v=o.touches.length;for(let g=0;g<v;g++){const x=o.touches.item(g);if(!x)continue;const{x:m,y:w}=this.runtime.viewerToWorld(x.clientX-this.bounds.left,x.clientY-this.bounds.top),A={id:x.identifier,x:m,y:w};h.push(A)}h.length&&this.assignToEvent(o,h[0].x,h[0].y),c!=="onTouchEnd"?(this.pointerEventState.lastTouches=h,o.atlasTouches=h,this.runtime.world.propagateTouchEvent(c,o,h)):(o.atlasTouches=[],this.runtime.world.propagateTouchEvent(c,o,this.pointerEventState.lastTouches),this.pointerEventState.lastTouches=[])},this.onPointerEvent=o=>{const c=tl[o.type];if(c&&this.runtime.world.activatedEvents.indexOf(c)!==-1){const{x:h,y:v}=this.runtime.viewerToWorld(o.clientX-this.bounds.left,o.clientY-this.bounds.top);this.assignToEvent(o,h,v),this.runtime.world.propagatePointerEvent(c,o,h,v)}},this.onPointerDown=o=>{this.pointerEventState.isPressed=!0,this.pointerEventState.isClicking=!0,this.pointerEventState.mouseDownStart.x=o.clientX,this.pointerEventState.mouseDownStart.y=o.clientY,setTimeout(()=>{this.runtime&&(this.pointerEventState.isClicking=!1)},250),setTimeout(()=>{if(this.runtime&&this.pointerEventState.isPressed&&!this.pointerEventState.isDragging){const c=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",o,c.x,c.y)}},800),this.onPointerEvent(o)},this.onPointerUp=o=>{if(this.pointerEventState.isClicking){const{x:c,y:h}=this.runtime.viewerToWorld(o.clientX-this.bounds.left,o.clientY-this.bounds.top);this.assignToEvent(o,c,h),this.runtime.world.propagatePointerEvent("onClick",o,c,h)}if(this.pointerEventState.isDragging){for(const c of this.pointerEventState.itemsBeingDragged)c.dispatchEvent("onDragEnd",o);this.pointerEventState.isDragging=!1}this.pointerEventState.isClicking=!1,this.pointerEventState.isPressed=!1,this.pointerEventState.itemsBeingDragged=[],this.onPointerEvent(o)},this.onPointerMove=o=>{this.pointerMoveEvent=void 0;const{x:c,y:h}=this.runtime.viewerToWorld(o.clientX-this.bounds.left,o.clientY-this.bounds.top);if(Number.isNaN(c)||Number.isNaN(h))return;this.assignToEvent(o,c,h),this.runtime.world.propagatePointerEvent("onPointerMove",o,c,h);const v=this.runtime.world.propagatePointerEvent("onMouseMove",o,c,h),g=[],x=[];for(const m of v)g.push(m.id),x.push(m),this.pointerEventState.mousedOver.indexOf(m)===-1&&(m.dispatchEvent("onMouseEnter",o),m.dispatchEvent("onPointerEnter",o),m.dispatchEvent("onMouseOver",o),m.dispatchEvent("onPointerOver",o));for(const m of this.pointerEventState.mousedOver)g.indexOf(m.id)===-1&&(m.dispatchEvent("onMouseLeave",o),m.dispatchEvent("onPointerLeave",o),m.dispatchEvent("onMouseOut",o),m.dispatchEvent("onPointerOut",o));if(this.pointerEventState.isDragging)for(const m of this.pointerEventState.itemsBeingDragged)m.dispatchEvent("onDrag",o);if(this.pointerEventState.isPressed&&!this.pointerEventState.isDragging&&gf(this.pointerEventState.mouseDownStart,{x:o.clientX,y:o.clientY})>50){const m=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",{...o,atlas:{x:m.x,y:m.y}},m.x,m.y)}this.pointerEventState.mousedOver=x},this.element=t,this.runtime=e,this.unsubscribe=e.world.addLayoutSubscriber(this.layoutSubscriber.bind(this)),this.bounds=t.getBoundingClientRect(),this.options={simulationRate:0,...n||{}};let r=0;e.registerHook("useFrame",o=>{r+=o,r>this.options.simulationRate&&this.pointerMoveEvent&&(r=0,e.updateNextFrame())}),e.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.activateEvents()}assignToEvent(t,e,n){td.eventPool.atlas.x=e,td.eventPool.atlas.y=n,t.atlas=td.eventPool.atlas}activateEvents(){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.unsubscribe();for(const[t,e]of this.eventHandlers)this.element.removeEventListener(this.normalizeEventName(t),e)}};let Pp=td;Pp.eventPool={atlas:{x:0,y:0}};function A0({interactive:t=!0,viewport:e,forceRefresh:n,canvasElement:r,overlayElement:o,controllerConfig:c,unstable_webglRenderer:h,dpi:v,debug:g,canvasBox:x=!0,polygon:m=!0,navigatorElement:w,background:A,runtimeOptions:k}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";const M=t?p0({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,...c||{}}):void 0,_=new n0([h?new nR(r,{dpi:v}):new kC(r,{dpi:v,debug:g,box:x,polygon:m,background:A}),o?new R0(o,{box:h||!x,text:!0,triggerResize:n}):void 0,w?new zC(w):void 0]),L=new Ff(_,new cl(1024,1024),e,M?[M]:[],k),P=new Pp(r,L);return{name:"default-preset",em:P,runtime:L,renderer:_,controller:M,canvas:r,navigator:w,unmount(){Dp(L),L.stopControllers(),L.stop(),L.reset(),P&&P.stop()}}}class iR{constructor(e,n){this.pending=!0,this.zIndex=0,this.lastKnownScale=1,this.currentlyVisible=[],this.previouslyVisible=[],this.container=e,this.rendererPosition=e.getBoundingClientRect();const{width:r,height:o}=this.rendererPosition;this.width=r,this.height=o,this.options={addPart:!1,setDraggableFalse:!1,imageClass:"",widthStylesheet:!1,sheetPrefix:"position-",background:"#000",...n||{}},this.stylesheet=new C0({sheetPrefix:this.options.sheetPrefix}),this.container.classList.add(this.stylesheet.addStylesheet(`
265
265
  background: ${this.options.background};
266
- `)),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(e,n,r){this.stylesheet.updateSheet();for(const o of this.previouslyVisible)this.currentlyVisible.indexOf(o)===-1&&this.container.removeChild(o);for(const o of this.currentlyVisible)this.previouslyVisible.indexOf(o)===-1&&this.container.appendChild(o);this.previouslyVisible=this.currentlyVisible,this.currentlyVisible=[]}afterPaintLayer(e,n){}beforeFrame(e,n,r){this.stylesheet.clearClasses(),this.zIndex=0}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getScale(e,n){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const r=this.width/e,o=this.height/n,c=r<o?o:r;return Number.isNaN(c)||(this.lastKnownScale=c),this.lastKnownScale}getViewportBounds(e,n,r){return null}createImage(){const e=document.createElement("img");return this.options.imageClass?(e.className=this.options.imageClass,this.options.addPart&&e.setAttribute("part",this.options.imageClass)):(e.style.position="absolute",e.style.pointerEvents="none",e.style.userSelect="none"),this.options.setDraggableFalse&&e.setAttribute("draggable","false"),e}paint(e,n,r,o,c,h){if(this.pending=!1,this.zIndex++,e instanceof xr){if(!e.__host){const g=this.createImage();g.src=e.uri,e.__host=g,this.container.appendChild(e.__host)}const v=e.__host;this.currentlyVisible.push(v),v.style.zIndex=`${this.zIndex}`,v.style.opacity=`${e.style.opacity}`,this.options.widthStylesheet?v.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(c+Number.MIN_VALUE).toFixed(2)}px;height:${(h+Number.MIN_VALUE).toFixed(2)}px;`):(v.style.width=`${c+Number.MIN_VALUE}px`,v.style.height=`${h+Number.MIN_VALUE}px`),v.style.transform=`translate(${r}px, ${o}px)`}if(e instanceof ja){if(e.__host||(e.__host={images:[]}),!e.__host.images[n]){const g=e.getImageUrl(n),x=this.createImage();x.src=g,e.__host.images[n]=x,this.container.appendChild(x)}const v=e.__host.images[n];v.style.zIndex=`${this.zIndex}`,v.style.opacity=`${e.style.opacity}`,this.currentlyVisible.push(v),this.options.widthStylesheet?v.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(c+Number.MIN_VALUE).toFixed(2)}px;height:${(h+Number.MIN_VALUE).toFixed(2)}px;`):(v.style.width=`${c+Number.MIN_VALUE}px`,v.style.height=`${h+Number.MIN_VALUE}px`),v.style.transform=`translate(${r}px, ${o}px)`}}pendingUpdate(){return this.pending}prepareLayer(e){}finishLayer(e){}reset(){}}function rR({interactive:t,viewport:e,forceRefresh:n,containerElement:r,overlayElement:o,controllerConfig:c,background:h}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";const v=t?p0({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,...c||{}}):void 0,g=new iR(r,{addPart:!1,setDraggableFalse:!1,imageClass:"atlas-static-image",background:h}),x=o?new n0([g,new R0(o,{box:!0,text:!0,triggerResize:n})]):g,m=new Ff(x,new cl(1024,1024),e,v?[v]:[]),w=new Pp(r,m);return{name:"static-preset",em:w,runtime:m,renderer:x,controller:v,container:r,overlay:o,unmount(){Dp(m),m.stopControllers(),m.stop(),w&&w.stop()}}}const sR={"default-preset":A0,"static-preset":rR},aR={};function oR(t,e){const n=C.useRef(),r=C.useRef(),o=C.useRef(),c=C.useRef(),h=C.useRef({width:e.width,height:e.height,didUpdate:!0}),[v="default-preset",g=aR]=Array.isArray(t)?t||[]:[t],[x,m]=C.useState(null);C.useLayoutEffect(()=>{const A=r.current,P=c.current,M=n.current,_=o.current,k=(sR[v]||A0)({containerElement:P,canvasElement:A,overlayElement:M,navigatorElement:_,viewport:h.current,dpi:window.devicePixelRatio||1,forceRefresh:e.forceRefresh,unstable_webglRenderer:e.unstable_webglRenderer,...g||{}});return m(k),()=>{k&&(k.unmount(),A&&(A.height=0,A.width=0),M&&(M.innerHTML=""),_&&(_.height=0,_.width=0))}},[v,g]);const w=C.useMemo(()=>({canvas:r,overlay:n,container:c,navigator:o}),[]);return[v,x,h,w]}function lR(t){return C.useMemo(()=>Lp(t),t)}const Fu=C.forwardRef((t,e)=>C.createElement("div",{...t,ref:e,part:t.className})),uR=({htmlChildren:t,renderPreset:e,onCreated:n,mode:r="explore",resetWorldOnChange:o=!0,unstable_webglRenderer:c=!1,unstable_noReconciler:h=!1,hideInlineStyle:v=!1,controllerConfig:g,children:x,overlayStyle:m,containerStyle:w,enableNavigator:A,className:P,containerProps:M={},homePosition:_,background:L,runtimeOptions:k,debug:O,...I})=>{const[q,te]=C.useState(L),[H,J]=C.useState(r),[re,$]=C.useState(!1),se=C.useRef(!1),ge=C.useMemo(()=>(typeof e=="string"&&(e=[e,{}]),q||O?e?[e[0],{debug:O,background:q,...e[1]||{}}]:["default-preset",{background:q,debug:O}]:e||"default-preset"),[e,q,O]),[Ce,me,Ie]=m0({scroll:!0}),_e=C.useRef(),Ye=Ge=>{_e.current=Ge,Ce(Ge)},[gt,Z,Ue,dt]=oR(ge,{width:I.width,height:I.height,forceRefresh:Ie,unstable_webglRenderer:c}),[pe,je]=C.useState("");C.useEffect(()=>{J(r)},[r]),C.useEffect(()=>{Z&&Z.em&&Z.em.updateBounds()},[Z,me]),C.useEffect(()=>{Z==null||Z.runtime.setOptions(k||{})},[k]),C.useEffect(()=>{Z&&Z.runtime&&(Z.runtime.mode=H),re&&Z&&(Z.ready=!0)},[Z,re,H]),C.useEffect(()=>{Z&&(Z.runtime.manualHomePosition=!!_,Z.runtime.setHomePosition(_))},[Z,_]),C.useEffect(()=>{if(Z){const Ge=Z.runtime;Ge.resize(Ue.current.width,I.width,Ue.current.height,I.height),Ue.current.width=I.width,Ue.current.height=I.height,Ge.updateNextFrame(),Ue.current.didUpdate=!0}},[Z,I.width,I.height]),C.useLayoutEffect(()=>{Z&&(Z.overlay&&(Z.overlay.style.width=`${me.width}px`,Z.overlay.style.height=`${me.height}px`),Z.container&&(Z.container.style.width=`${me.width}px`,Z.container.style.height=`${me.height}px`))},[Z,me.height,me.width]),C.useLayoutEffect(()=>{const Ge=()=>{if(Z){const nt=Z.runtime;Ue.current.width!==I.width&&Ue.current.height!==I.height&&(nt.resize(Ue.current.width,I.width,Ue.current.height,I.height),Ue.current.width=I.width,Ue.current.height=I.height,nt.updateNextFrame(),Ue.current.didUpdate=!0)}};return window.addEventListener("resize",Ge),()=>window.removeEventListener("resize",Ge)},[Z,I.height,I.width]);const He={width:120},ut=()=>{if(Z&&Z.navigator){const Ge=Z.runtime.world.height,nt=Z.runtime.world.width,Ze=window.devicePixelRatio||1,ht=He.width,ft=He.width/nt*Ge;Z.navigator.width=ht*Ze,Z.navigator.height=ft*Ze,Z.navigator.style.width=ht+"px",Z.navigator.style.height=ft+"px"}};C.useLayoutEffect(()=>{if(Z){ut();const Ge=Z.runtime;return Ge.world.addLayoutSubscriber(nt=>{nt==="recalculate-world-size"&&(ut(),Ge.resize(Ue.current.width,I.width,Ue.current.height,I.height))})}return()=>{}},[Z]);const pt=C.useCallback(function(nt){const Ze=()=>{$(!0)};return C.useEffect(()=>{if(Z){Z.runtime.goHome();const ht=n&&n(Z);return void(ht&&ht.then?ht.then(Ze):Ze())}else throw new Error("Invalid configuration - no runtime found")},[]),nt.children},[Z]);C.useEffect(()=>{if(Z){const Ge=Z.runtime;if(o)return Ge.world.addLayoutSubscriber(nt=>{nt==="recalculate-world-size"&&Ge.goHome()})}return()=>{}},[Z,o]),C.useEffect(()=>Z?Z.runtime.registerHook("useBeforeFrame",()=>{var nt;if(Ue.current.didUpdate&&Z.canvas){const Ze=window.devicePixelRatio||1,ht=Ue.current.width,ft=Ue.current.height;Z.canvas.width=ht*Ze,Z.canvas.height=ft*Ze,Z.canvas.style.width=ht+"px",Z.canvas.style.height=ft+"px",(nt=Z.canvas.getContext("2d"))==null||nt.scale(Ze,Ze),Z&&Z.em&&Z.em.updateBounds(),Ue.current.didUpdate=!1}}):()=>{},[Z,o]),C.useEffect(()=>{const Ge=()=>{Z&&(J("sketch"),je("mode-sketch")),window.removeEventListener("keyup",Ge)},nt=Ze=>{if(Ze.code==="Space"&&Z&&Z.runtime.mode==="sketch"){if(Ze.target&&Ze.target.tagName&&Ze.target.tagName.toLowerCase()==="input")return;Ze.preventDefault(),J("explore"),je("mode-explore"),window.addEventListener("keyup",Ge)}};return window.addEventListener("keydown",nt),()=>{window.removeEventListener("keydown",nt),window.removeEventListener("keyup",Ge)}},[Z]),C.useLayoutEffect(()=>{if(_e.current&&!q){const nt=getComputedStyle(_e.current).getPropertyValue("--atlas-background");nt&&te(nt)}},[q]),se.current=!0;const{height:vn,width:Kt,...xt}=I,ct=lR([I.width,I.height]);return C.createElement(Fu,{ref:Ye,className:["atlas",v?"":`atlas-width-${ct}`,pe,P].filter(Boolean).join(" ").trim(),style:{...w,...v?{}:{width:I.width,height:I.height}}},gt==="static-preset"?C.createElement(Fu,{className:"atlas-static-container",style:Z&&Z.controller?void 0:{pointerEvents:"none"},ref:dt.container,tabIndex:0,...M}):C.createElement("canvas",{className:"atlas-canvas",part:"atlas-canvas",tabIndex:0,...xt,...M,ref:dt.canvas}),C.createElement(Fu,{className:"atlas-overlay",style:{...m||{}},ref:dt.overlay},h?C.createElement(pt,null,C.createElement(Zf.Provider,{value:me},C.createElement(ju.Provider,{value:H},C.createElement(Kf.Provider,{value:Z},x)))):C.createElement(tR,{bounds:me,preset:Z,mode:H,setIsReady:$,onCreated:n},x)),A?C.createElement(Fu,{className:"atlas-navigator"},C.createElement("canvas",{className:"atlas-navigator-canvas",part:"atlas-navigator-canvas",ref:dt.navigator})):null,v?C.createElement("style",null,`.atlas-width-${ct} { width: ${I.width}px; height: ${I.height}px; }`):C.createElement("style",null,`
266
+ `)),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(e,n,r){this.stylesheet.updateSheet();for(const o of this.previouslyVisible)this.currentlyVisible.indexOf(o)===-1&&this.container.removeChild(o);for(const o of this.currentlyVisible)this.previouslyVisible.indexOf(o)===-1&&this.container.appendChild(o);this.previouslyVisible=this.currentlyVisible,this.currentlyVisible=[]}afterPaintLayer(e,n){}beforeFrame(e,n,r){this.stylesheet.clearClasses(),this.zIndex=0}getPointsAt(e,n,r,o){return e.getPointsAt(n,r,o)}getScale(e,n){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const r=this.width/e,o=this.height/n,c=r<o?o:r;return Number.isNaN(c)||(this.lastKnownScale=c),this.lastKnownScale}getViewportBounds(e,n,r){return null}createImage(){const e=document.createElement("img");return this.options.imageClass?(e.className=this.options.imageClass,this.options.addPart&&e.setAttribute("part",this.options.imageClass)):(e.style.position="absolute",e.style.pointerEvents="none",e.style.userSelect="none"),this.options.setDraggableFalse&&e.setAttribute("draggable","false"),e}paint(e,n,r,o,c,h){if(this.pending=!1,this.zIndex++,e instanceof xr){if(!e.__host){const g=this.createImage();g.src=e.uri,e.__host=g,this.container.appendChild(e.__host)}const v=e.__host;this.currentlyVisible.push(v),v.style.zIndex=`${this.zIndex}`,v.style.opacity=`${e.style.opacity}`,this.options.widthStylesheet?v.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(c+Number.MIN_VALUE).toFixed(2)}px;height:${(h+Number.MIN_VALUE).toFixed(2)}px;`):(v.style.width=`${c+Number.MIN_VALUE}px`,v.style.height=`${h+Number.MIN_VALUE}px`),v.style.transform=`translate(${r}px, ${o}px)`}if(e instanceof ja){if(e.__host||(e.__host={images:[]}),!e.__host.images[n]){const g=e.getImageUrl(n),x=this.createImage();x.src=g,e.__host.images[n]=x,this.container.appendChild(x)}const v=e.__host.images[n];v.style.zIndex=`${this.zIndex}`,v.style.opacity=`${e.style.opacity}`,this.currentlyVisible.push(v),this.options.widthStylesheet?v.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(c+Number.MIN_VALUE).toFixed(2)}px;height:${(h+Number.MIN_VALUE).toFixed(2)}px;`):(v.style.width=`${c+Number.MIN_VALUE}px`,v.style.height=`${h+Number.MIN_VALUE}px`),v.style.transform=`translate(${r}px, ${o}px)`}}pendingUpdate(){return this.pending}prepareLayer(e){}finishLayer(e){}reset(){}}function rR({interactive:t,viewport:e,forceRefresh:n,containerElement:r,overlayElement:o,controllerConfig:c,background:h}){if(!r)throw new Error("Invalid container");r.style.userSelect="none";const v=t?p0({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,...c||{}}):void 0,g=new iR(r,{addPart:!1,setDraggableFalse:!1,imageClass:"atlas-static-image",background:h}),x=o?new n0([g,new R0(o,{box:!0,text:!0,triggerResize:n})]):g,m=new Ff(x,new cl(1024,1024),e,v?[v]:[]),w=new Pp(r,m);return{name:"static-preset",em:w,runtime:m,renderer:x,controller:v,container:r,overlay:o,unmount(){Dp(m),m.stopControllers(),m.stop(),w&&w.stop()}}}const sR={"default-preset":A0,"static-preset":rR},aR={};function oR(t,e){const n=C.useRef(),r=C.useRef(),o=C.useRef(),c=C.useRef(),h=C.useRef({width:e.width,height:e.height,didUpdate:!0}),[v="default-preset",g=aR]=Array.isArray(t)?t||[]:[t],[x,m]=C.useState(null);C.useLayoutEffect(()=>{const A=r.current,k=c.current,M=n.current,_=o.current,P=(sR[v]||A0)({containerElement:k,canvasElement:A,overlayElement:M,navigatorElement:_,viewport:h.current,dpi:window.devicePixelRatio||1,forceRefresh:e.forceRefresh,unstable_webglRenderer:e.unstable_webglRenderer,...g||{}});return m(P),()=>{P&&(P.unmount(),A&&(A.height=0,A.width=0),M&&(M.innerHTML=""),_&&(_.height=0,_.width=0))}},[v,g]);const w=C.useMemo(()=>({canvas:r,overlay:n,container:c,navigator:o}),[]);return[v,x,h,w]}function lR(t){return C.useMemo(()=>Lp(t),t)}const Fu=C.forwardRef((t,e)=>C.createElement("div",{...t,ref:e,part:t.className})),uR=({htmlChildren:t,renderPreset:e,onCreated:n,mode:r="explore",resetWorldOnChange:o=!0,unstable_webglRenderer:c=!1,unstable_noReconciler:h=!1,hideInlineStyle:v=!1,controllerConfig:g,children:x,overlayStyle:m,containerStyle:w,enableNavigator:A,className:k,containerProps:M={},homePosition:_,homeOnResize:L,homeCover:P,background:O,runtimeOptions:H,debug:q,...Q})=>{const[B,J]=C.useState(O),[ie,$]=C.useState(r),[re,me]=C.useState(!1),Re=C.useRef(!1),Se=C.useMemo(()=>(typeof e=="string"&&(e=[e,{}]),B||q?e?[e[0],{debug:q,background:B,...e[1]||{}}]:["default-preset",{background:B,debug:q}]:e||"default-preset"),[e,B,q]),[Fe,ke,Xe]=m0({scroll:!0}),ft=C.useRef(),Te=Ie=>{ft.current=Ie,Fe(Ie)},[it,ue,se,je]=oR(Se,{width:Q.width,height:Q.height,forceRefresh:Xe,unstable_webglRenderer:c}),[qe,ct]=C.useState("");C.useEffect(()=>{$(r)},[r]),C.useEffect(()=>{ue&&ue.em&&ue.em.updateBounds()},[ue,ke]),C.useEffect(()=>{ue==null||ue.runtime.setOptions(H||{})},[H]),C.useEffect(()=>{ue&&ue.runtime&&(ue.runtime.mode=ie),re&&ue&&(ue.ready=!0)},[ue,re,ie]),C.useEffect(()=>{ue&&(P||(ue.runtime.manualHomePosition=!!_,ue.runtime.setHomePosition(_)))},[ue,P,_]),C.useEffect(()=>{if(ue){const Ie=ue.runtime;Ie.resize(se.current.width,Q.width,se.current.height,Q.height),se.current.width=Q.width,se.current.height=Q.height,Ie.updateNextFrame(),se.current.didUpdate=!0}},[ue,Q.width,Q.height]),C.useLayoutEffect(()=>{if(ue&&(ue.overlay&&(ue.overlay.style.width=`${ke.width}px`,ue.overlay.style.height=`${ke.height}px`),ue.container&&(ue.container.style.width=`${ke.width}px`,ue.container.style.height=`${ke.height}px`),P)){const Ie=ue.runtime.world.width,We=ue.runtime.world.height,Qe=Ie/We,St=se.current.width,bt=se.current.height,zn=St/bt;Qe>zn?(ue.runtime.manualHomePosition=!0,ue.runtime.setHomePosition({x:(Ie-We/zn)/2,y:0,width:We/zn,height:We})):(ue.runtime.manualHomePosition=!0,ue.runtime.setHomePosition({x:0,y:(We-Ie/zn)/2,width:Ie,height:Ie/zn})),L&&ue.runtime.goHome({cover:!0})}},[ue,ke.height,ke.width,P]),C.useLayoutEffect(()=>{const Ie=()=>{if(ue){const We=ue.runtime;se.current.width!==Q.width&&se.current.height!==Q.height&&(We.resize(se.current.width,Q.width,se.current.height,Q.height),se.current.width=Q.width,se.current.height=Q.height,We.updateNextFrame(),se.current.didUpdate=!0)}};return window.addEventListener("resize",Ie),()=>window.removeEventListener("resize",Ie)},[ue,Q.height,Q.width]);const dt={width:120},rn=()=>{if(ue&&ue.navigator){const Ie=ue.runtime.world.height,We=ue.runtime.world.width,Qe=window.devicePixelRatio||1,St=dt.width,bt=dt.width/We*Ie;ue.navigator.width=St*Qe,ue.navigator.height=bt*Qe,ue.navigator.style.width=St+"px",ue.navigator.style.height=bt+"px"}};C.useLayoutEffect(()=>{if(ue){rn();const Ie=ue.runtime;return Ie.world.addLayoutSubscriber(We=>{We==="recalculate-world-size"&&(rn(),Ie.resize(se.current.width,Q.width,se.current.height,Q.height))})}return()=>{}},[ue]);const Xt=C.useCallback(function(We){const Qe=()=>{me(!0)};return C.useEffect(()=>{if(ue){ue.runtime.goHome();const St=n&&n(ue);return void(St&&St.then?St.then(Qe):Qe())}else throw new Error("Invalid configuration - no runtime found")},[]),We.children},[ue]);C.useEffect(()=>{if(ue){const Ie=ue.runtime;if(o)return Ie.world.addLayoutSubscriber(We=>{We==="recalculate-world-size"&&Ie.goHome()})}return()=>{}},[ue,o]),C.useEffect(()=>ue?ue.runtime.registerHook("useBeforeFrame",()=>{var We;if(se.current.didUpdate&&ue.canvas){const Qe=window.devicePixelRatio||1,St=se.current.width,bt=se.current.height;ue.canvas.width=St*Qe,ue.canvas.height=bt*Qe,ue.canvas.style.width=St+"px",ue.canvas.style.height=bt+"px",(We=ue.canvas.getContext("2d"))==null||We.scale(Qe,Qe),ue&&ue.em&&ue.em.updateBounds(),se.current.didUpdate=!1}}):()=>{},[ue,o]),C.useEffect(()=>{const Ie=()=>{ue&&($("sketch"),ct("mode-sketch")),window.removeEventListener("keyup",Ie)},We=Qe=>{if(Qe.code==="Space"&&ue&&ue.runtime.mode==="sketch"){if(Qe.target&&Qe.target.tagName&&Qe.target.tagName.toLowerCase()==="input")return;Qe.preventDefault(),$("explore"),ct("mode-explore"),window.addEventListener("keyup",Ie)}};return window.addEventListener("keydown",We),()=>{window.removeEventListener("keydown",We),window.removeEventListener("keyup",Ie)}},[ue]),C.useLayoutEffect(()=>{if(ft.current&&!B){const We=getComputedStyle(ft.current).getPropertyValue("--atlas-background");We&&J(We)}},[B]),Re.current=!0;const{height:wt,width:ht,...Ut}=Q,jt=lR([Q.width,Q.height]);return C.createElement(Fu,{ref:Te,className:["atlas",v?"":`atlas-width-${jt}`,qe,k].filter(Boolean).join(" ").trim(),style:{...w,...v?{}:{width:Q.width,height:Q.height}}},it==="static-preset"?C.createElement(Fu,{className:"atlas-static-container",style:ue&&ue.controller?void 0:{pointerEvents:"none"},ref:je.container,tabIndex:0,...M}):C.createElement("canvas",{className:"atlas-canvas",part:"atlas-canvas",tabIndex:0,...Ut,...M,ref:je.canvas}),C.createElement(Fu,{className:"atlas-overlay",style:{...m||{}},ref:je.overlay},h?C.createElement(Xt,null,C.createElement(Zf.Provider,{value:ke},C.createElement(ju.Provider,{value:ie},C.createElement(Kf.Provider,{value:ue},x)))):C.createElement(tR,{bounds:ke,preset:ue,mode:ie,setIsReady:me,onCreated:n},x)),A?C.createElement(Fu,{className:"atlas-navigator"},C.createElement("canvas",{className:"atlas-navigator-canvas",part:"atlas-navigator-canvas",ref:je.navigator})):null,v?C.createElement("style",null,`.atlas-width-${jt} { width: ${Q.width}px; height: ${Q.height}px; }`):C.createElement("style",null,`
267
267
  .atlas { position: relative; user-select: none; display: flex; background: var(--atlas-background, #000); z-index: var(--atlas-z-index, 10); touch-action: none; }
268
- .atlas-width-${ct} { width: ${I.width}px; height: ${I.height}px; }
268
+ .atlas-width-${jt} { width: ${Q.width}px; height: ${Q.height}px; }
269
269
  .atlas-canvas { flex: 1 1 0px; }
270
270
  .atlas-canvas:focus, .atlas-static-container:focus { outline: none }
271
271
  .atlas-canvas:focus-visible, .atlas-canvas-container:focus-visible { outline: var(--atlas-focus, 2px solid darkorange) }
@@ -281,7 +281,7 @@ No matching component was found for:
281
281
  width: var(--atlas-container-width, ${g?`${g}px`:"100%"});
282
282
  height: var(--atlas-container-height, ${cR(v||(e?m.height:512))})
283
283
  }
284
- `),r.htmlChildren)},dR=()=>C.useContext(Kf),nd=()=>{const t=dR();return t?t.runtime:void 0},M0=(t,e=[])=>{const n=nd();C.useEffect(()=>n?n.registerHook("useFrame",t):()=>{},e)};function hR(){return C.useContext(Zf)}async function pR(t,e,n){if(C.version.startsWith("18.")){const r=await Promise.resolve().then(()=>cO),o=r.default?r.default.createRoot:r.createRoot;n.current||(n.current=o(t)),n.current.render(e)}else if(typeof ReactDOM<"u"){const{render:r,unmountComponentAtNode:o}=ReactDOM;r(e,t),n.current={unmount(){o(t)}}}else{const r=await import("react-dom"),o=r.default?r.default.render:r.render,c=r.default?r.default.unmountComponentAtNode:r.unmountComponentAtNode;o(e,t),n.current={unmount(){c(t)}}}}const kp=C.forwardRef(({children:t,...e},n)=>{const r=C.useRef(),o=nd(),c=C.useRef(0),h=C.useRef(),v=C.useRef();return M0(()=>{var g,x,m,w;if(e.relative){const A=r.current;if(A&&o){const P=o.getScaleFactor();c.current!==P&&(c.current=P,A.style.transformOrigin="0 0",A.style.transform=`scale(${1/c.current})`,A.style.width=`${c.current*100}%`,A.style.height=`${c.current*100}%`,r.current&&((x=(g=h.current)==null?void 0:g.__owner.value)!=null&&x.rotation)&&(A.style.transform=`scale(${1/c.current}) translate(50%, 50%) rotate(${((w=(m=h.current)==null?void 0:m.__owner.value)==null?void 0:w.rotation)||0}deg) translate(-50%, -50%)`))}}},[e.relative]),C.useLayoutEffect(()=>{const g=h.current;n&&g&&(typeof n=="function"?n(g):n.current=g);async function x(){if(g&&g.__host){const m=e.relative?C.createElement("div",{ref:r},t):t;await pR(g.__host.element,m,v)}}g&&g.__host?x():g&&(g.__onCreate=x)},[n,t,h,e.relative]),C.useLayoutEffect(()=>()=>{v.current&&setTimeout(()=>{v.current.unmount()},0)},[]),C.createElement("box",{html:!0,...e,ref:h})});kp.displayName="HTMLPortal";const O0=(t,e,n=[])=>{const r=nd(),o=r?r.world:void 0;C.useEffect(()=>{if(r){const c=e,h=tl[t];r.world.activatedEvents.push(h);const v=h.slice(2).toLowerCase();return r.world.addEventListener(v,c),()=>{r.world.removeEventListener(v,c)}}return()=>{}},[o,t,...n])};function D0(t,e){if(t===0)return[0,1];if(e===0)return[1,0];const n=Math.abs(t)/Math.abs(e);return[n,1-n]}function vR(){const t=C.useRef({ctrl:!1,shift:!1,alt:!1});return C.useLayoutEffect(()=>{function e(r){r.key==="Shift"&&(t.current.shift=!0),r.key==="Control"&&(t.current.ctrl=!0),r.key==="Alt"&&(t.current.alt=!0)}function n(r){r.key==="Shift"&&(t.current.shift=!1),r.key==="Control"&&(t.current.ctrl=!1),r.key==="Alt"&&(t.current.alt=!1)}return window.addEventListener("keydown",e),window.addEventListener("keyup",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)}},[]),t}const mR=(t,e)=>{const n=qC(),r=nd(),o=hR(),c=C.useRef(),h=C.useRef(null),v=C.useRef(),[g,x]=C.useState(!1),m=C.useRef(!1),w=C.useRef({north:0,south:0,east:0,west:0}),A=vR(),P=C.useCallback(O=>I=>{if(m.current=!0,x(!0),o&&r){const{top:q,left:te}=o,H=r.viewerToWorld(I.pageX-te,I.pageY-q);v.current={x:H.x,y:H.y},c.current=O}},[o,r]),M=C.useMemo(()=>t.width/t.height,[t.width,t.height]),_=C.useCallback(O=>{if(!Math.abs(O.north-O.south+(O.east-O.west)))return;const q=-O.west+O.east,te=-O.north+O.south,H=t.width+q,J=t.height+te;if(H/J>=M){const $=J*M,se=H-$,[ge,Ce]=D0(O.east,O.west);O.west=O.west+se*Ce,O.east=O.east-se*ge}else{const $=H/M,se=J-$,[ge,Ce]=D0(O.north,O.south);O.north=O.north+se*ge,O.south=O.south-se*Ce}},[t.width,t.height,M]);M0(()=>{v&&r&&r.updateNextFrame()}),C.useEffect(()=>{r&&r.updateNextFrame()},[r,g]);const L=C.useCallback(O=>{var I;if(!r||!o||r.mode!=="sketch")return;const{top:q,left:te}=o,H=r.viewerToWorld(O.pageX-te,O.pageY-q),J=h.current,re=!t.maintainAspectRatio&&A.current.alt,$=!re&&A.current.shift&&((I=c.current)==null?void 0:I.indexOf("-"))!==-1;if((c.current==="translate"||c.current==="east"||c.current==="north-east"||c.current==="south-east")&&(w.current.east=H.x-(v.current?v.current.x:0),re&&(w.current.west=-w.current.east)),(c.current==="translate"||c.current==="west"||c.current==="north-west"||c.current==="south-west")&&(w.current.west=H.x-(v.current?v.current.x:0),re&&(w.current.east=-w.current.west)),(c.current==="translate"||c.current==="north"||c.current==="north-east"||c.current==="north-west")&&(w.current.north=H.y-(v.current?v.current.y:0),re&&(w.current.south=-w.current.north)),(c.current==="translate"||c.current==="south"||c.current==="south-west"||c.current==="south-east")&&(w.current.south=H.y-(v.current?v.current.y:0),re&&(w.current.north=-w.current.south)),(t.maintainAspectRatio||$)&&_(w.current),J){const se=w.current.west,ge=w.current.north,Ce=t.width+w.current.east,me=t.height+w.current.south;J.points[1]=Math.min(se,Ce),J.points[2]=Math.min(ge,me),J.points[3]=Math.max(se,Ce),J.points[4]=Math.max(ge,me),r.updateNextFrame()}},[r,t.width,t.height,t.maintainAspectRatio,o]);O0("mousemove",L,[t.width,t.height,o]),O0("pointermove",L,[t.width,t.height,o]);const k=C.useRef();return C.useEffect(()=>{k.current=()=>{if(m.current){const O=w.current.west,I=w.current.north,q=t.width+w.current.east,te=t.height+w.current.south,H=Math.min(O,q),J=Math.min(I,te),re=Math.max(O,q),$=Math.max(I,te),se={x:(t.x||0)+H,y:(t.y||0)+J,width:re-H||1,height:$-J||1};t.maintainAspectRatio,e(se),c.current=void 0,v.current=void 0,w.current.east=0,w.current.west=0,w.current.north=0,w.current.south=0,m.current=!1,x(!1)}}},[e,t.height,t.width,t.x,t.y]),C.useEffect(()=>{const O=()=>{k.current&&k.current()};return window.addEventListener("pointerup",O),window.addEventListener("touchend",O),()=>{window.removeEventListener("pointerup",O),window.removeEventListener("touchend",O)}},[]),{portalRef:h,mode:n,mouseEvent:P,onPointerMoveCallback:L,isEditing:g}};function gR({handleSize:t,resizable:e,onSave:n,children:r,maintainAspectRatio:o,disableCardinalControls:c,...h}){const v=typeof t>"u"?o?10:8:t,{portalRef:g,mode:x,mouseEvent:m,isEditing:w}=mR({x:h.x||0,y:h.y||0,width:h.width,height:h.height,maintainAspectRatio:o},n),A=C.useMemo(()=>m("translate"),[m]),P=C.useMemo(()=>m("east"),[m]),M=C.useMemo(()=>m("west"),[m]),_=C.useMemo(()=>m("south"),[m]),L=C.useMemo(()=>m("north"),[m]),k=C.useMemo(()=>m("south-east"),[m]),O=C.useMemo(()=>m("south-west"),[m]),I=C.useMemo(()=>m("north-east"),[m]),q=C.useMemo(()=>m("north-west"),[m]),te=x==="sketch",H={zIndex:999,boxShadow:"0px 2px 3px 0 rgba(0,0,0,0.2)",border:"1px solid rgba(155,155,155,.7)",borderRadius:o||c?"50%":2,position:"absolute",background:"#fff",pointerEvents:w?"none":te?"initial":"none"};return C.createElement(C.Fragment,null,C.createElement("world-object",{...h},r,te&&e?C.createElement(kp,{ref:g,target:{x:0,y:0,height:h.height,width:h.width},relative:!0,interactive:!1},te&&e?C.createElement(C.Fragment,null,C.createElement("div",{onMouseDown:A,onTouchStart:A,style:{display:"block",width:"100%",height:"100%",position:"relative",border:"1px solid rgba(155,155,155, .7)",boxSizing:"border-box",pointerEvents:w?"none":te?"initial":"none"}}),o?null:C.createElement(C.Fragment,null,C.createElement("div",{title:"east",onTouchStart:P,onMouseDown:P,style:{...H,cursor:"e-resize",height:v*2,width:v,right:0,top:"50%",opacity:c?0:1,transform:`translate(${v/2}px, -${v}px)`}}),C.createElement("div",{title:"west",onMouseDown:M,style:{...H,cursor:"w-resize",position:"absolute",height:v*2,width:v,left:0,top:"50%",opacity:c?0:1,transform:`translate(-${v/2}px, -${v}px)`}}),C.createElement("div",{title:"north",onMouseDown:L,style:{...H,cursor:"n-resize",position:"absolute",height:v,width:v*2,left:"50%",top:0,opacity:c?0:1,transform:`translate(-${v}px, -${v/2}px)`}}),C.createElement("div",{title:"south",onMouseDown:_,style:{...H,cursor:"s-resize",position:"absolute",height:v,width:v*2,left:"50%",bottom:0,opacity:c?0:1,transform:`translate(-${v}px, ${v/2}px)`}})),C.createElement("div",{title:"north-east",onMouseDown:I,style:{...H,cursor:"ne-resize",position:"absolute",height:v,width:v,right:0,top:0,transform:`translate(${v/2}px, -${v/2}px)`}}),C.createElement("div",{title:"south-east",onMouseDown:k,style:{...H,cursor:"se-resize",position:"absolute",height:v,width:v,bottom:0,right:0,transform:`translate(${v/2}px, ${v/2}px)`}}),C.createElement("div",{title:"south-west",onMouseDown:O,style:{...H,cursor:"sw-resize",position:"absolute",height:v,width:v,bottom:0,left:0,transform:`translate(-${v/2}px, ${v/2}px)`}}),C.createElement("div",{title:"north-west",onMouseDown:q,style:{...H,cursor:"nw-resize",position:"absolute",height:v,width:v,top:0,left:0,transform:`translate(-${v/2}px, -${v/2}px)`}})):null):null))}function yR({interactive:t,region:e,onClick:n,onSave:r,maintainAspectRatio:o,disableCardinalControls:c,isEditing:h,rotation:v,style:g={backgroundColor:"rgba(0,0,0,.5)"}}){const x=C.useCallback(m=>{r({id:e.id,x:e.x,y:e.y,height:e.height,width:e.width,...m})},[r,e.id,e.x,e.y,e.height,e.width]);return C.createElement(gR,{x:e.x,y:e.y,rotation:v,width:e.width,height:e.height,resizable:h,onSave:x,maintainAspectRatio:o,disableCardinalControls:c},C.createElement("box",{interactive:t,onClick:m=>{m.preventDefault(),m.stopPropagation(),n(e)},target:{x:0,y:0,width:e.width,height:e.height},style:g}))}const SR=t=>{var e,n,r,o,c;const h=t.width/(((e=t.crop)==null?void 0:e.width)||t.tiles.width),v=t.tiles.imageService.tiles||[],g=t.tiles.imageService.sizes||[],x=t.enableThumbnail,m=t.enableSizes,w=C.useMemo(()=>{const A=t.tiles.imageService.id||t.tiles.imageService["@id"];return A&&A.endsWith("/info.json")?A.slice(0,-1*10):A},[t.tiles.imageService.id]);return C.createElement("world-object",{rotation:t.rotation,key:t.tiles.imageService.id,scale:h,height:((n=t.crop)==null?void 0:n.height)||t.tiles.height,width:((r=t.crop)==null?void 0:r.width)||t.tiles.width,x:t.x,y:t.y,onClick:t.onClick},C.createElement("composite-image",{key:t.tiles.imageService.id,id:t.tiles.imageService.id,width:((o=t.crop)==null?void 0:o.width)||t.tiles.width,height:((c=t.crop)==null?void 0:c.height)||t.tiles.height,crop:t.crop},x&&t.tiles.thumbnail?C.createElement("world-image",{priority:!0,uri:t.tiles.thumbnail.id,target:{width:t.tiles.width,height:t.tiles.height},display:{width:t.tiles.thumbnail.width,height:t.tiles.thumbnail.height},crop:t.crop}):null,m&&g.map((A,P)=>C.createElement("world-image",{key:P,uri:`${w}/full/${A.width},${A.height}/0/default.jpg`,target:{width:t.tiles.width,height:t.tiles.height},display:{width:A.width,height:A.height},crop:t.crop})),v.map(A=>(A.scaleFactors||[]).map(P=>C.createElement("tiled-image",{key:`${t.tiles.imageService.id}-tile-${P}`,uri:t.tiles.imageService.id,display:{width:t.tiles.width,height:t.tiles.height},tile:A,scaleFactor:P,crop:t.crop})))))};function bR(t,e){return t?e?{...t,...e||{},":hover":t[":hover"]?Object.assign(t[":hover"]||{},e[":hover"]||{}):e[":hover"],":active":t[":active"]?Object.assign(t[":active"]||{},e[":active"]||{}):e[":hover"]}:t:e}function zp(t,e){return zp=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},zp(t,e)}function xR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zp(t,e)}var ER=function(e,n){return e===void 0&&(e=[]),n===void 0&&(n=[]),e.length!==n.length||e.some(function(r,o){return!Object.is(r,n[o])})},L0={error:null},wR=function(t){xR(e,t);function e(){for(var r,o=arguments.length,c=new Array(o),h=0;h<o;h++)c[h]=arguments[h];return r=t.call.apply(t,[this].concat(c))||this,r.state=L0,r.resetErrorBoundary=function(){for(var v,g=arguments.length,x=new Array(g),m=0;m<g;m++)x[m]=arguments[m];r.props.onReset==null||(v=r.props).onReset.apply(v,x),r.reset()},r}e.getDerivedStateFromError=function(o){return{error:o}};var n=e.prototype;return n.reset=function(){this.setState(L0)},n.componentDidCatch=function(o,c){var h,v;(h=(v=this.props).onError)==null||h.call(v,o,c)},n.componentDidUpdate=function(o,c){var h=this.state.error,v=this.props.resetKeys;if(h!==null&&c.error!==null&&ER(o.resetKeys,v)){var g,x;(g=(x=this.props).onResetKeysChange)==null||g.call(x,o.resetKeys,v),this.reset()}},n.render=function(){var o=this.state.error,c=this.props,h=c.fallbackRender,v=c.FallbackComponent,g=c.fallback;if(o!==null){var x={error:o,resetErrorBoundary:this.resetErrorBoundary};if(ae.isValidElement(g))return g;if(typeof h=="function")return h(x);if(v)return ae.createElement(v,x);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(ae.Component);const TR={collection:void 0,manifest:void 0,range:void 0,canvas:void 0,annotation:void 0,annotationPage:void 0},id=C.createContext(TR),Ss=()=>C.useContext(id);function Js({value:t,children:e}){const n=Ss(),r=C.useMemo(()=>({...n,...t}),[t,n]);return le.jsx(id.Provider,{value:r,children:e})}const Bu=C.createContext({vault:null,setVaultInstance:t=>{}});function Np({vault:t,vaultOptions:e,useGlobal:n,resources:r,children:o}){const[c,h]=C.useState(()=>t||(n?cf.globalVault(e):e?new cf.Vault(e):new cf.Vault));return le.jsx(Bu.Provider,{value:{vault:c,setVaultInstance:h},children:le.jsx(Js,{value:r||{},children:o})})}const kn=()=>{const{vault:t}=C.useContext(Bu);if(t===null)throw new Error("Vault not found. Ensure you have your provider set up correctly.");return t};function _p(t,{noCache:e=!1}={}){const n=typeof t=="string"?t:t.id,r=kn(),[o,c]=C.useState(n),[h,v]=C.useState(void 0),g=C.useMemo(()=>r.get(n,{skipSelfReturn:!0})||void 0,[n,r]),[x,m]=C.useState(g);return C.useEffect(()=>{(async()=>{try{const w=g&&!e?g:await r.load(n),A=w?w.id||w["@id"]:null;w&&o!==A&&c(A),m(w)}catch(w){v(w)}})()},[n,e]),{isLoaded:!!x,id:o,requestId:n,error:h,resource:x,cached:!!(x&&x===g)}}function P0(t,e){const{id:n,isLoaded:r,error:o,resource:c,requestId:h,cached:v}=_p(t,e);return{id:n,isLoaded:r,error:o,manifest:c,requestId:h,cached:v}}function k0({manifest:t,children:e}){return le.jsx(Js,{value:{manifest:t},children:e})}function rd({canvas:t,children:e}){return le.jsx(Js,{value:{canvas:t},children:e})}function Kn(t,e=[]){const n=kn(),[r,o]=C.useState(()=>t(n.getState(),n));return C.useEffect(()=>n.subscribe(c=>t(c,n),c=>{o(c)},!1),e),r}const Hu=C.createContext([]);function Up(){const t=C.useContext(Hu);return Kn(e=>t.map(n=>e.iiif.entities.Canvas[n]).filter(Boolean),[t])}function ea(t={},e=[]){const{id:n,selector:r}=t,o=Ss();kn();const c=n||o.manifest,h=Kn(v=>c?v.iiif.entities.Manifest[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}function z0({range:t,children:e}){return le.jsx(Js,{value:{range:t},children:e})}function N0(t,e){for(const n of e.items){if(n.type==="Canvas")return n;if(n.type==="SpecificResource")return n.source;if(n.type==="Range"){const r=N0(t,t.get(n));if(r)return r}}return null}function jp(t,e){var r;const n=[];for(const o of e.items)if(o.type==="SpecificResource"&&((r=o.source)==null?void 0:r.type)==="Canvas"&&(o.source.id.indexOf("#")!==-1?n.push({id:o.source.id.split("#")[0],type:"Canvas"}):n.push(o.source)),o.type==="Range"&&n.push(...jp(t,t.get(o))),o.type==="SpecificResource"){const c=typeof o.source=="string"?o.source:o.source.id;n.push({id:c,type:"Canvas"})}return n}function CR(t,e,n){for(const r of e.structures){const o=Ip(t,t.get(r),n);if(o)return o}return null}function Ip(t,e,n){var r,o,c;for(const h of e.items){const v=(o=(r=h==null?void 0:h.source)==null?void 0:r.id)==null?void 0:o.split("#")[0];if(h.type==="SpecificResource"&&h.source===n||h.type==="SpecificResource"&&((c=h.source)==null?void 0:c.type)==="Canvas"&&n===v)return e;if(h.type==="Range"){const g=Ip(t,t.get(h),n);if(g)return g}}return null}function RR(t,e,n,r=!1){const o=e.behavior,c=n?t.get(n):null;if(!c)return[];const h=c.behavior,v=r?!1:o.includes("paged"),g=v?!1:o.includes("continuous"),x=v||g?!1:o.includes("individuals"),m=h.includes("facing-pages"),w=h.includes("non-paged");if(m||w||x||r)return[{id:c.id,type:"Canvas"}];const[A,P]=Fp(t,e);if(g)return A;const M=A.findIndex(_=>_.id===n);if(M===-1)return[];for(const _ of P)if(_.includes(M))return _.map(L=>A[L]);return[{id:c.id,type:"Canvas"}]}function Fp(t,e,{disablePaging:n,skipNonPaged:r}={}){const o=e.behavior,c=o.includes("paged"),h=c?!1:o.includes("continuous"),v=c||h?!1:o.includes("individuals"),g=e.type==="Manifest"?e.items:jp(t,e);if(h)return[g,[g.map((M,_)=>_)]];if(v||!c||n)return[g,g.map((M,_)=>[_])];const x=[];let m=[];const w=()=>{m.length&&(x.push([...m]),m=[])};let A=0,P=!1;for(let M=0;M<g.length;M++){const _=t.get(g[M]);if(_.behavior.includes("non-paged")){M===A&&A++,r||(w(),x.push([M]),w());continue}if(M===A||_.behavior.includes("facing-pages")){m.length&&(P=!0),w(),x.push([M]),w();continue}if(m.push(M),P){w(),P=!1;continue}m.length>1&&w()}return m.length&&w(),[g,x]}function _0(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.range,h=Kn(v=>c?v.iiif.entities.Range[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}function U0({startCanvas:t,disablePaging:e}){var M;const n=kn(),r=ea(),o=_0(),[c,h]=C.useState(void 0),v=o||r;if(!v)throw new Error("Nothing selected");const[g,x]=C.useMemo(()=>Fp(n,v,{disablePaging:e}),[n,v]),m=C.useCallback(_=>{const L=x.findIndex(k=>k.includes(_));h(L===-1?0:L)},[g,x]),w=C.useCallback(_=>{const L=g.findIndex(k=>k.id===_);L!==-1?m(L):h(0)},[g,x]),A=C.useCallback(()=>{h(_=>_>=x.length?_:_+1)},[x]),P=C.useCallback(()=>{h(_=>_<=0?0:_-1)},[x]);return typeof c>"u"&&(t?w(t):h(0)),{visibleItems:((M=x[c])==null?void 0:M.map(_=>g[_].id))||[],cursor:c,items:g,sequence:x,setSequenceIndex:h,setCanvasIndex:m,setCanvasId:w,next:A,previous:P}}const Vu=()=>{},Wu=C.createContext({setCurrentCanvasId:Vu,setCurrentCanvasIndex:Vu,nextCanvas:Vu,previousCanvas:Vu,items:[],sequence:[],setSequenceIndex:Vu,currentSequenceIndex:0});function j0(t){const e=ea(),{cursor:n,visibleItems:r,next:o,sequence:c,items:h,setCanvasIndex:v,setCanvasId:g,previous:x,setSequenceIndex:m}=U0({startCanvas:t.startCanvas,disablePaging:t.pagingEnabled===!1}),w=C.useMemo(()=>({sequence:c,items:h,setCurrentCanvasId:g,nextCanvas:o,previousCanvas:x,totalCanvases:h.length,setCurrentCanvasIndex:v,setSequenceIndex:m,currentSequenceIndex:n}),[c,h,g,o,x,h,v,m,n]);return e?r.length===0?null:le.jsx(Wu.Provider,{value:w,children:le.jsx(Hu.Provider,{value:r,children:le.jsx(rd,{canvas:r[0],children:t.children})})}):(console.warn("The manifest passed to the provider is not a valid IIIF manifest."),le.jsx("div",{children:"Sorry, something went wrong."}))}function I0(t){const e=P0(t.manifest);if(!e)return console.warn("The manifest passed to the provider is not a valid IIIF manifest."),le.jsx("div",{children:"Sorry, something went wrong."});if(e.error)return le.jsx("div",{children:e.error.toString()});if(!e.isLoaded)return le.jsx("div",{children:"Loading..."});const n=le.jsx(j0,{...t,children:t.children});return le.jsx(k0,{manifest:e.id,children:t.rangeId?le.jsx(z0,{range:t.rangeId,children:n}):n})}function F0(){return C.useContext(Wu)}function B0(){return{VaultContext:C.useContext(Bu),ResourceContext:C.useContext(id),SimpleViewerReactContext:C.useContext(Wu),VisibleCanvasReactContext:C.useContext(Hu)}}function H0(t){return le.jsx(Np,{vault:t.bridge.VaultContext.vault||void 0,resources:t.bridge.ResourceContext,children:le.jsx(Hu.Provider,{value:t.bridge.VisibleCanvasReactContext,children:le.jsx(Wu.Provider,{value:t.bridge.SimpleViewerReactContext,children:t.children})})})}const Wr=function(t){return function(){const e={type:t,getType:()=>t,toString:()=>t};return(n,r)=>({...e,...n!==void 0&&{payload:n},...r!==void 0&&{meta:r}})}},AR="@iiif/IMPORT_ENTITIES",MR="@iiif/MODIFY_ENTITY_FIELD",OR="@iiif/REORDER_ENTITY_FIELD",DR="@iiif/ADD_REFERENCE",LR="@iiif/UPDATE_REFERENCE",PR="@iiif/REMOVE_REFERENCE",kR="@iiif/ADD_METADATA",zR="@iiif/REMOVE_METADATA",NR="@iiif/UPDATE_METADATA",_R="@iiif/REORDER_METADATA",UR=Wr(AR)(),jR=Wr(MR)(),IR=Wr(OR)(),FR=Wr(DR)(),BR=Wr(PR)(),HR=Wr(LR)(),VR=Wr(kR)(),WR=Wr(NR)(),$R=Wr(zR)(),qR=Wr(_R)(),Bp={importEntities:UR,modifyEntityField:jR,reorderEntityField:IR,addReference:FR,removeReference:BR,updateReference:HR,addMetadata:VR,removeMetadata:$R,updateMetadata:WR,reorderMetadata:qR};function V0(){const e=kn().getStore();return C.useMemo(()=>n=>e.dispatch(n),[e])}function W0(t){return typeof t!="string"&&t&&t.bindToVault}function $0(){const t=kn(),e=C.useRef([]),n=V0(),r=C.useMemo(()=>`vault://annotation-page/${new Date().getTime()}/${Math.round(Math.random()*1e9).toString(16)}`,[]);C.useLayoutEffect(()=>{const v={id:r,type:"AnnotationPage",behavior:[],label:null,thumbnail:[],summary:null,requiredStatement:null,metadata:[],rights:null,provider:[],items:[],seeAlso:[],homepage:[],rendering:[],service:[]};n(Bp.importEntities({entities:{AnnotationPage:{[v.id]:v}}}))},[r]);const o=Kn(v=>r?v.iiif.entities.AnnotationPage[r]:null,[r]),c=C.useCallback((v,g)=>{if(r){if(W0(v)){const w=v;w.__vault||w.bindToVault(t),v=typeof w.source=="string"?w.source:w.source.id,e.current[v]=w}else typeof v!="string"&&(v=v.id);const x=t.get({id:r,type:"AnnotationPage"}),m=t.get({id:v,type:"Annotation"});x&&m&&(x.items.find(w=>w.id===m.id)||n(Bp.addReference({id:r,type:"AnnotationPage",key:"items",reference:{id:v,type:"Annotation"},index:g})))}},[r]),h=C.useCallback(v=>{r&&(W0(v)?v=typeof v.source=="string"?v.source:v.source.id:typeof v!="string"&&(v=v.id),e.current[v]&&e.current[v].beforeRemove(),t.get({id:r,type:"AnnotationPage"})&&n(Bp.removeReference({id:r,type:"AnnotationPage",key:"items",reference:{id:v,type:"Annotation"}})))},[r]);return[o,{addAnnotation:c,removeAnnotation:h}]}const q0=C.createContext(null);function Y0(){const t=C.useContext(q0);return[t.fullPage,{addAnnotation:t.addAnnotation,removeAnnotation:t.removeAnnotation}]}function Q0({children:t}){const[e,{addAnnotation:n,removeAnnotation:r}]=$0();return le.jsx(q0.Provider,{value:C.useMemo(()=>({fullPage:e,addAnnotation:n,removeAnnotation:r}),[e]),children:t})}function YR({width:t,style:e,height:n,error:r,resetErrorBoundary:o}){return le.jsxs("div",{style:{width:t,height:n,minHeight:500,...e||{},background:"#f9f9f9"},children:[le.jsx("h3",{children:"Error occurred"}),le.jsx("p",{children:r.message}),le.jsx("button",{onClick:o,children:"Reset"})]})}const sd=C.createContext(null);function G0(){return C.useContext(sd)}const X0=C.createContext(()=>{}),K0=C.createContext(()=>{});function fl(t,e,n,r,o=[]){const c=C.useContext(t==="portal"?K0:X0);C.useEffect(()=>(t!=="none"&&c(e,n,r),()=>{c(e,null)}),[e,t,c,...o])}function $r(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.canvas,h=Kn(v=>c?v.iiif.entities.Canvas[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}const Z0=C.createContext(()=>{});function QR(t){const e=$r(),n=C.useContext(Z0);C.useEffect(()=>e&&e.id?(n(e.id,t),()=>n(e.id,-1)):()=>{},[e,t])}function GR({children:t,errorFallback:e,outerContainerProps:n={},worldScale:r,...o}){const[c,h]=C.useState(),v=B0(),g=e||YR,[x,m]=C.useState({}),w=Object.entries(x),[A,P]=C.useState({}),M=Object.entries(A),[_,L]=C.useState({}),k=C.useMemo(()=>r||Math.max(...Object.values(_)),[_]),O=C.useMemo(()=>({maxOverZoom:k||1,...o.runtimeOptions||{}}),[k,o.runtimeOptions]),I=C.useCallback((H,J)=>{L(re=>{if(J===-1){const{[H]:$,...se}=re;return se}return{...re,[H]:J}})},[]),q=C.useCallback((H,J,re)=>{m(({[H]:$,...se})=>J?{...se,[H]:{element:J,props:re}}:se)},[]),te=C.useCallback((H,J,re)=>{P(({[H]:$,...se})=>J?{...se,[H]:{element:J,props:re}}:se)},[]);return le.jsxs(wR,{resetKeys:[],fallbackRender:H=>le.jsx(g,{...o,...H}),children:[le.jsx(fR,{...o,containerProps:{style:{position:"relative"},...o.containerProps||{}},htmlChildren:le.jsx(le.Fragment,{children:w.map(([H,{element:J,props:re}])=>le.jsx(C.Fragment,{children:le.jsx(J,{...re||{}})},H))}),onCreated:H=>{h(H),o.onCreated&&o.onCreated(H)},runtimeOptions:O,children:le.jsx(sd.Provider,{value:c,children:le.jsx(Z0.Provider,{value:I,children:le.jsx(X0.Provider,{value:q,children:le.jsx(K0.Provider,{value:te,children:le.jsx(H0,{bridge:v,children:le.jsx(ju.Provider,{value:o.mode||"explore",children:le.jsx(Q0,{children:t})})})})})})})}),le.jsx("div",{children:M.map(([H,{element:J,props:re}])=>le.jsx(C.Fragment,{children:le.jsx(J,{...re||{}})},H))})]})}const ad={},J0={get(t){return t},setMetaValue([t,e,n],r){const o=J0.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;ad[t]={...ad[t]||{},[e]:{...(ad[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=ad[t];if(n)return e?n[e]:n}};function e1(t=J0){return{addEventListener(e,n,r,o){if(e)return t.setMetaValue([e.id,"eventManager",n],c=>{const h=c||[];for(const v of h)if(v.callback===r)return h;return[...h,{callback:r,scope:o}]}),r},removeEventListener(e,n,r){e&&t.setMetaValue([e.id,"eventManager",n],o=>(o||[]).filter(c=>c.callback!==r))},getListenersAsProps(e,n){const r=typeof e=="string"?{id:e}:e;if(!r||!r.id)return{};const o=t.getResourceMeta(r.id,"eventManager"),c={};if(o&&r)for(const h of Object.keys(o))c[h]=v=>{const g=t.get(r);for(const{callback:x,scope:m}of o[h]||[])(!m||n&&m.indexOf(n)!==-1)&&x(v,g)};return c}}}function Hp(t,e){const n=kn(),r=C.useMemo(()=>e1(n),[n]),o=Kn(()=>t&&t.id?n.getResourceMeta(t.id,"eventManager"):null,[t]);return C.useMemo(()=>t?r.getListenersAsProps(t,e):{},[o,t,n,e])}const od={},t1={get(t){return t},setMetaValue([t,e,n],r){const o=t1.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;od[t]={...od[t]||{},[e]:{...(od[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=od[t];if(n)return e?n[e]:n}};function Vp(t=t1){return{applyStyles(e,n,r){const o=typeof e=="string"?e:e.id;return t.setMetaValue([o,"styles",n],r)},getAppliedStyles(e){const n=typeof e=="string"?e:e.id;return t.getResourceMeta(n,"styles")}}}function $u(t,e){const n=kn(),r=C.useMemo(()=>Vp(n),[n]);return Kn(()=>{if(!t)return null;const o=r.getAppliedStyles(t.id);return o?e?o[e]:o:void 0},[t,e])}var XR=Object.defineProperty,KR=(t,e,n)=>e in t?XR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ld=(t,e,n)=>(KR(t,typeof e!="symbol"?e+"":e,n),n),ZR=function(){function t(e,n){var r=[],o=!0,c=!1,h=void 0;try{for(var v=e[Symbol.iterator](),g;!(o=(g=v.next()).done)&&(r.push(g.value),!(n&&r.length===n));o=!0);}catch(x){c=!0,h=x}finally{try{!o&&v.return&&v.return()}finally{if(c)throw h}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),qu=Math.PI*2,Wp=function(t,e,n,r,o,c,h){var v=t.x,g=t.y;v*=e,g*=n;var x=r*v-o*g,m=o*v+r*g;return{x:x+c,y:m+h}},JR=function(t,e){var n=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),r=Math.cos(t),o=Math.sin(t),c=Math.cos(t+e),h=Math.sin(t+e);return[{x:r-o*n,y:o+r*n},{x:c+h*n,y:h-c*n},{x:c,y:h}]},n1=function(t,e,n,r){var o=t*r-e*n<0?-1:1,c=t*n+e*r;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},eA=function(t,e,n,r,o,c,h,v,g,x,m,w){var A=Math.pow(o,2),P=Math.pow(c,2),M=Math.pow(m,2),_=Math.pow(w,2),L=A*P-A*_-P*M;L<0&&(L=0),L/=A*_+P*M,L=Math.sqrt(L)*(h===v?-1:1);var k=L*o/c*w,O=L*-c/o*m,I=x*k-g*O+(t+n)/2,q=g*k+x*O+(e+r)/2,te=(m-k)/o,H=(w-O)/c,J=(-m-k)/o,re=(-w-O)/c,$=n1(1,0,te,H),se=n1(te,H,J,re);return v===0&&se>0&&(se-=qu),v===1&&se<0&&(se+=qu),[I,q,$,se]},tA=function(t){var e=t.px,n=t.py,r=t.cx,o=t.cy,c=t.rx,h=t.ry,v=t.xAxisRotation,g=v===void 0?0:v,x=t.largeArcFlag,m=x===void 0?0:x,w=t.sweepFlag,A=w===void 0?0:w,P=[];if(c===0||h===0)return[];var M=Math.sin(g*qu/360),_=Math.cos(g*qu/360),L=_*(e-r)/2+M*(n-o)/2,k=-M*(e-r)/2+_*(n-o)/2;if(L===0&&k===0)return[];c=Math.abs(c),h=Math.abs(h);var O=Math.pow(L,2)/Math.pow(c,2)+Math.pow(k,2)/Math.pow(h,2);O>1&&(c*=Math.sqrt(O),h*=Math.sqrt(O));var I=eA(e,n,r,o,c,h,m,A,M,_,L,k),q=ZR(I,4),te=q[0],H=q[1],J=q[2],re=q[3],$=Math.abs(re)/(qu/4);Math.abs(1-$)<1e-7&&($=1);var se=Math.max(Math.ceil($),1);re/=se;for(var ge=0;ge<se;ge++)P.push(JR(J,re)),J+=re;return P.map(function(Ce){var me=Wp(Ce[0],c,h,_,M,te,H),Ie=me.x,_e=me.y,Ye=Wp(Ce[1],c,h,_,M,te,H),gt=Ye.x,Z=Ye.y,Ue=Wp(Ce[2],c,h,_,M,te,H),dt=Ue.x,pe=Ue.y;return{x1:Ie,y1:_e,x2:gt,y2:Z,x:dt,y:pe}})};function i1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nA=rA,$p={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},iA=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function rA(t){var e=[];return t.replace(iA,function(n,r,o){var c=r.toLowerCase();for(o=aA(o),c=="m"&&o.length>2&&(e.push([r].concat(o.splice(0,2))),c="l",r=r=="m"?"l":"L");;){if(o.length==$p[c])return o.unshift(r),e.push(o);if(o.length<$p[c])throw new Error("malformed path data");e.push([r].concat(o.splice(0,$p[c])))}}),e}var sA=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function aA(t){var e=t.match(sA);return e?e.map(Number):[]}const oA=i1(nA);var lA=uA;function uA(t){var e=0,n=0,r=0,o=0;return t.map(function(c){c=c.slice();var h=c[0],v=h.toUpperCase();if(h!=v)switch(c[0]=v,h){case"a":c[6]+=r,c[7]+=o;break;case"v":c[1]+=o;break;case"h":c[1]+=r;break;default:for(var g=1;g<c.length;)c[g++]+=r,c[g++]+=o}switch(v){case"Z":r=e,o=n;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":r=e=c[1],o=n=c[2];break;default:r=c[c.length-2],o=c[c.length-1]}return c})}const cA=i1(lA);function fA(t){const e=oA(t),n=cA(e);let r,o=0,c=0,h=0,v=0,g,x,m=0,w=0;const A=[];for(let P=0;P<n.length;P++){let M=n[P];const _=M[0];switch(_){case"M":o=M[1],c=M[2];break;case"H":M=["L",M[1],c];break;case"V":M=["L",o,M[1]];break;case"S":{let L=m,k=w;(r==="C"||r=="S")&&(L+=L-h,k+=k-v),M=["C",L,k,M[1],M[2],M[3],M[4]]}break;case"T":r==="Q"||r=="T"?(g=m*2-g,x=w*2-x):(g=m,x=w),M=["Q",g,x,M[1],M[2]];break;case"Q":g=M[1],x=M[2];break;case"A":{const L=tA({px:m,py:w,cx:M[6],cy:M[7],rx:M[1],ry:M[2],xAxisRotation:M[3],largeArcFlag:M[4],sweepFlag:M[5]});if(!L.length)continue;for(const[k,O]of L.entries())M=["C",O.x1,O.y1,O.x2,O.y2,O.x,O.y],k<L.length-1&&A.push(M);M=M}break;case"Z":M=["L",o,c];break}r=_,m=M[M.length-2],w=M[M.length-1],["C","Q","A"].indexOf(_)>-1?(h=M[M.length-4],v=M[M.length-3]):(h=m,v=w),A.push(M)}return A}/** Code to "flatten" quadratic and cubic Bézier curves to polylines.
284
+ `),r.htmlChildren)},dR=()=>C.useContext(Kf),nd=()=>{const t=dR();return t?t.runtime:void 0},M0=(t,e=[])=>{const n=nd();C.useEffect(()=>n?n.registerHook("useFrame",t):()=>{},e)};function hR(){return C.useContext(Zf)}async function pR(t,e,n){if(C.version.startsWith("18.")){const r=await Promise.resolve().then(()=>cO),o=r.default?r.default.createRoot:r.createRoot;n.current||(n.current=o(t)),n.current.render(e)}else if(typeof ReactDOM<"u"){const{render:r,unmountComponentAtNode:o}=ReactDOM;r(e,t),n.current={unmount(){o(t)}}}else{const r=await import("react-dom"),o=r.default?r.default.render:r.render,c=r.default?r.default.unmountComponentAtNode:r.unmountComponentAtNode;o(e,t),n.current={unmount(){c(t)}}}}const kp=C.forwardRef(({children:t,...e},n)=>{const r=C.useRef(),o=nd(),c=C.useRef(0),h=C.useRef(),v=C.useRef();return M0(()=>{var g,x,m,w;if(e.relative){const A=r.current;if(A&&o){const k=o.getScaleFactor();c.current!==k&&(c.current=k,A.style.transformOrigin="0 0",A.style.transform=`scale(${1/c.current})`,A.style.width=`${c.current*100}%`,A.style.height=`${c.current*100}%`,r.current&&((x=(g=h.current)==null?void 0:g.__owner.value)!=null&&x.rotation)&&(A.style.transform=`scale(${1/c.current}) translate(50%, 50%) rotate(${((w=(m=h.current)==null?void 0:m.__owner.value)==null?void 0:w.rotation)||0}deg) translate(-50%, -50%)`))}}},[e.relative]),C.useLayoutEffect(()=>{const g=h.current;n&&g&&(typeof n=="function"?n(g):n.current=g);async function x(){if(g&&g.__host){const m=e.relative?C.createElement("div",{ref:r},t):t;await pR(g.__host.element,m,v)}}g&&g.__host?x():g&&(g.__onCreate=x)},[n,t,h,e.relative]),C.useLayoutEffect(()=>()=>{v.current&&setTimeout(()=>{v.current.unmount()},0)},[]),C.createElement("box",{html:!0,...e,ref:h})});kp.displayName="HTMLPortal";const O0=(t,e,n=[])=>{const r=nd(),o=r?r.world:void 0;C.useEffect(()=>{if(r){const c=e,h=tl[t];r.world.activatedEvents.push(h);const v=h.slice(2).toLowerCase();return r.world.addEventListener(v,c),()=>{r.world.removeEventListener(v,c)}}return()=>{}},[o,t,...n])};function D0(t,e){if(t===0)return[0,1];if(e===0)return[1,0];const n=Math.abs(t)/Math.abs(e);return[n,1-n]}function vR(){const t=C.useRef({ctrl:!1,shift:!1,alt:!1});return C.useLayoutEffect(()=>{function e(r){r.key==="Shift"&&(t.current.shift=!0),r.key==="Control"&&(t.current.ctrl=!0),r.key==="Alt"&&(t.current.alt=!0)}function n(r){r.key==="Shift"&&(t.current.shift=!1),r.key==="Control"&&(t.current.ctrl=!1),r.key==="Alt"&&(t.current.alt=!1)}return window.addEventListener("keydown",e),window.addEventListener("keyup",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)}},[]),t}const mR=(t,e)=>{const n=qC(),r=nd(),o=hR(),c=C.useRef(),h=C.useRef(null),v=C.useRef(),[g,x]=C.useState(!1),m=C.useRef(!1),w=C.useRef({north:0,south:0,east:0,west:0}),A=vR(),k=C.useCallback(O=>H=>{if(m.current=!0,x(!0),o&&r){const{top:q,left:Q}=o,B=r.viewerToWorld(H.pageX-Q,H.pageY-q);v.current={x:B.x,y:B.y},c.current=O}},[o,r]),M=C.useMemo(()=>t.width/t.height,[t.width,t.height]),_=C.useCallback(O=>{if(!Math.abs(O.north-O.south+(O.east-O.west)))return;const q=-O.west+O.east,Q=-O.north+O.south,B=t.width+q,J=t.height+Q;if(B/J>=M){const $=J*M,re=B-$,[me,Re]=D0(O.east,O.west);O.west=O.west+re*Re,O.east=O.east-re*me}else{const $=B/M,re=J-$,[me,Re]=D0(O.north,O.south);O.north=O.north+re*me,O.south=O.south-re*Re}},[t.width,t.height,M]);M0(()=>{v&&r&&r.updateNextFrame()}),C.useEffect(()=>{r&&r.updateNextFrame()},[r,g]);const L=C.useCallback(O=>{var H;if(!r||!o||r.mode!=="sketch")return;const{top:q,left:Q}=o,B=r.viewerToWorld(O.pageX-Q,O.pageY-q),J=h.current,ie=!t.maintainAspectRatio&&A.current.alt,$=!ie&&A.current.shift&&((H=c.current)==null?void 0:H.indexOf("-"))!==-1;if((c.current==="translate"||c.current==="east"||c.current==="north-east"||c.current==="south-east")&&(w.current.east=B.x-(v.current?v.current.x:0),ie&&(w.current.west=-w.current.east)),(c.current==="translate"||c.current==="west"||c.current==="north-west"||c.current==="south-west")&&(w.current.west=B.x-(v.current?v.current.x:0),ie&&(w.current.east=-w.current.west)),(c.current==="translate"||c.current==="north"||c.current==="north-east"||c.current==="north-west")&&(w.current.north=B.y-(v.current?v.current.y:0),ie&&(w.current.south=-w.current.north)),(c.current==="translate"||c.current==="south"||c.current==="south-west"||c.current==="south-east")&&(w.current.south=B.y-(v.current?v.current.y:0),ie&&(w.current.north=-w.current.south)),(t.maintainAspectRatio||$)&&_(w.current),J){const re=w.current.west,me=w.current.north,Re=t.width+w.current.east,Se=t.height+w.current.south;J.points[1]=Math.min(re,Re),J.points[2]=Math.min(me,Se),J.points[3]=Math.max(re,Re),J.points[4]=Math.max(me,Se),r.updateNextFrame()}},[r,t.width,t.height,t.maintainAspectRatio,o]);O0("mousemove",L,[t.width,t.height,o]),O0("pointermove",L,[t.width,t.height,o]);const P=C.useRef();return C.useEffect(()=>{P.current=()=>{if(m.current){const O=w.current.west,H=w.current.north,q=t.width+w.current.east,Q=t.height+w.current.south,B=Math.min(O,q),J=Math.min(H,Q),ie=Math.max(O,q),$=Math.max(H,Q),re={x:(t.x||0)+B,y:(t.y||0)+J,width:ie-B||1,height:$-J||1};t.maintainAspectRatio,e(re),c.current=void 0,v.current=void 0,w.current.east=0,w.current.west=0,w.current.north=0,w.current.south=0,m.current=!1,x(!1)}}},[e,t.height,t.width,t.x,t.y]),C.useEffect(()=>{const O=()=>{P.current&&P.current()};return window.addEventListener("pointerup",O),window.addEventListener("touchend",O),()=>{window.removeEventListener("pointerup",O),window.removeEventListener("touchend",O)}},[]),{portalRef:h,mode:n,mouseEvent:k,onPointerMoveCallback:L,isEditing:g}};function gR({handleSize:t,resizable:e,onSave:n,children:r,maintainAspectRatio:o,disableCardinalControls:c,...h}){const v=typeof t>"u"?o?10:8:t,{portalRef:g,mode:x,mouseEvent:m,isEditing:w}=mR({x:h.x||0,y:h.y||0,width:h.width,height:h.height,maintainAspectRatio:o},n),A=C.useMemo(()=>m("translate"),[m]),k=C.useMemo(()=>m("east"),[m]),M=C.useMemo(()=>m("west"),[m]),_=C.useMemo(()=>m("south"),[m]),L=C.useMemo(()=>m("north"),[m]),P=C.useMemo(()=>m("south-east"),[m]),O=C.useMemo(()=>m("south-west"),[m]),H=C.useMemo(()=>m("north-east"),[m]),q=C.useMemo(()=>m("north-west"),[m]),Q=x==="sketch",B={zIndex:999,boxShadow:"0px 2px 3px 0 rgba(0,0,0,0.2)",border:"1px solid rgba(155,155,155,.7)",borderRadius:o||c?"50%":2,position:"absolute",background:"#fff",pointerEvents:w?"none":Q?"initial":"none"};return C.createElement(C.Fragment,null,C.createElement("world-object",{...h},r,Q&&e?C.createElement(kp,{ref:g,target:{x:0,y:0,height:h.height,width:h.width},relative:!0,interactive:!1},Q&&e?C.createElement(C.Fragment,null,C.createElement("div",{onMouseDown:A,onTouchStart:A,style:{display:"block",width:"100%",height:"100%",position:"relative",border:"1px solid rgba(155,155,155, .7)",boxSizing:"border-box",pointerEvents:w?"none":Q?"initial":"none"}}),o?null:C.createElement(C.Fragment,null,C.createElement("div",{title:"east",onTouchStart:k,onMouseDown:k,style:{...B,cursor:"e-resize",height:v*2,width:v,right:0,top:"50%",opacity:c?0:1,transform:`translate(${v/2}px, -${v}px)`}}),C.createElement("div",{title:"west",onMouseDown:M,style:{...B,cursor:"w-resize",position:"absolute",height:v*2,width:v,left:0,top:"50%",opacity:c?0:1,transform:`translate(-${v/2}px, -${v}px)`}}),C.createElement("div",{title:"north",onMouseDown:L,style:{...B,cursor:"n-resize",position:"absolute",height:v,width:v*2,left:"50%",top:0,opacity:c?0:1,transform:`translate(-${v}px, -${v/2}px)`}}),C.createElement("div",{title:"south",onMouseDown:_,style:{...B,cursor:"s-resize",position:"absolute",height:v,width:v*2,left:"50%",bottom:0,opacity:c?0:1,transform:`translate(-${v}px, ${v/2}px)`}})),C.createElement("div",{title:"north-east",onMouseDown:H,style:{...B,cursor:"ne-resize",position:"absolute",height:v,width:v,right:0,top:0,transform:`translate(${v/2}px, -${v/2}px)`}}),C.createElement("div",{title:"south-east",onMouseDown:P,style:{...B,cursor:"se-resize",position:"absolute",height:v,width:v,bottom:0,right:0,transform:`translate(${v/2}px, ${v/2}px)`}}),C.createElement("div",{title:"south-west",onMouseDown:O,style:{...B,cursor:"sw-resize",position:"absolute",height:v,width:v,bottom:0,left:0,transform:`translate(-${v/2}px, ${v/2}px)`}}),C.createElement("div",{title:"north-west",onMouseDown:q,style:{...B,cursor:"nw-resize",position:"absolute",height:v,width:v,top:0,left:0,transform:`translate(-${v/2}px, -${v/2}px)`}})):null):null))}function yR({interactive:t,region:e,onClick:n,onSave:r,maintainAspectRatio:o,disableCardinalControls:c,isEditing:h,rotation:v,style:g={backgroundColor:"rgba(0,0,0,.5)"}}){const x=C.useCallback(m=>{r({id:e.id,x:e.x,y:e.y,height:e.height,width:e.width,...m})},[r,e.id,e.x,e.y,e.height,e.width]);return C.createElement(gR,{x:e.x,y:e.y,rotation:v,width:e.width,height:e.height,resizable:h,onSave:x,maintainAspectRatio:o,disableCardinalControls:c},C.createElement("box",{interactive:t,onClick:m=>{m.preventDefault(),m.stopPropagation(),n(e)},target:{x:0,y:0,width:e.width,height:e.height},style:g}))}const SR=t=>{var e,n,r,o,c;const h=t.width/(((e=t.crop)==null?void 0:e.width)||t.tiles.width),v=t.tiles.imageService.tiles||[],g=t.tiles.imageService.sizes||[],x=t.enableThumbnail,m=t.enableSizes,w=C.useMemo(()=>{const A=t.tiles.imageService.id||t.tiles.imageService["@id"];return A&&A.endsWith("/info.json")?A.slice(0,-1*10):A},[t.tiles.imageService.id]);return C.createElement("world-object",{rotation:t.rotation,key:t.tiles.imageService.id,scale:h,height:((n=t.crop)==null?void 0:n.height)||t.tiles.height,width:((r=t.crop)==null?void 0:r.width)||t.tiles.width,x:t.x,y:t.y,onClick:t.onClick},C.createElement("composite-image",{key:t.tiles.imageService.id,id:t.tiles.imageService.id,width:((o=t.crop)==null?void 0:o.width)||t.tiles.width,height:((c=t.crop)==null?void 0:c.height)||t.tiles.height,crop:t.crop},x&&t.tiles.thumbnail?C.createElement("world-image",{priority:!0,uri:t.tiles.thumbnail.id,target:{width:t.tiles.width,height:t.tiles.height},display:{width:t.tiles.thumbnail.width,height:t.tiles.thumbnail.height},crop:t.crop}):null,m&&g.map((A,k)=>C.createElement("world-image",{key:k,uri:`${w}/full/${A.width},${A.height}/0/default.jpg`,target:{width:t.tiles.width,height:t.tiles.height},display:{width:A.width,height:A.height},crop:t.crop})),v.map(A=>(A.scaleFactors||[]).map(k=>C.createElement("tiled-image",{key:`${t.tiles.imageService.id}-tile-${k}`,uri:t.tiles.imageService.id,display:{width:t.tiles.width,height:t.tiles.height},tile:A,scaleFactor:k,crop:t.crop})))))};function bR(t,e){return t?e?{...t,...e||{},":hover":t[":hover"]?Object.assign(t[":hover"]||{},e[":hover"]||{}):e[":hover"],":active":t[":active"]?Object.assign(t[":active"]||{},e[":active"]||{}):e[":hover"]}:t:e}function zp(t,e){return zp=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},zp(t,e)}function xR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zp(t,e)}var ER=function(e,n){return e===void 0&&(e=[]),n===void 0&&(n=[]),e.length!==n.length||e.some(function(r,o){return!Object.is(r,n[o])})},L0={error:null},wR=function(t){xR(e,t);function e(){for(var r,o=arguments.length,c=new Array(o),h=0;h<o;h++)c[h]=arguments[h];return r=t.call.apply(t,[this].concat(c))||this,r.state=L0,r.resetErrorBoundary=function(){for(var v,g=arguments.length,x=new Array(g),m=0;m<g;m++)x[m]=arguments[m];r.props.onReset==null||(v=r.props).onReset.apply(v,x),r.reset()},r}e.getDerivedStateFromError=function(o){return{error:o}};var n=e.prototype;return n.reset=function(){this.setState(L0)},n.componentDidCatch=function(o,c){var h,v;(h=(v=this.props).onError)==null||h.call(v,o,c)},n.componentDidUpdate=function(o,c){var h=this.state.error,v=this.props.resetKeys;if(h!==null&&c.error!==null&&ER(o.resetKeys,v)){var g,x;(g=(x=this.props).onResetKeysChange)==null||g.call(x,o.resetKeys,v),this.reset()}},n.render=function(){var o=this.state.error,c=this.props,h=c.fallbackRender,v=c.FallbackComponent,g=c.fallback;if(o!==null){var x={error:o,resetErrorBoundary:this.resetErrorBoundary};if(ae.isValidElement(g))return g;if(typeof h=="function")return h(x);if(v)return ae.createElement(v,x);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(ae.Component);const TR={collection:void 0,manifest:void 0,range:void 0,canvas:void 0,annotation:void 0,annotationPage:void 0},id=C.createContext(TR),Ss=()=>C.useContext(id);function Js({value:t,children:e}){const n=Ss(),r=C.useMemo(()=>({...n,...t}),[t,n]);return le.jsx(id.Provider,{value:r,children:e})}const Bu=C.createContext({vault:null,setVaultInstance:t=>{}});function Np({vault:t,vaultOptions:e,useGlobal:n,resources:r,children:o}){const[c,h]=C.useState(()=>t||(n?cf.globalVault(e):e?new cf.Vault(e):new cf.Vault));return le.jsx(Bu.Provider,{value:{vault:c,setVaultInstance:h},children:le.jsx(Js,{value:r||{},children:o})})}const kn=()=>{const{vault:t}=C.useContext(Bu);if(t===null)throw new Error("Vault not found. Ensure you have your provider set up correctly.");return t};function _p(t,{noCache:e=!1}={}){const n=typeof t=="string"?t:t.id,r=kn(),[o,c]=C.useState(n),[h,v]=C.useState(void 0),g=C.useMemo(()=>r.get(n,{skipSelfReturn:!0})||void 0,[n,r]),[x,m]=C.useState(g);return C.useEffect(()=>{(async()=>{try{const w=g&&!e?g:await r.load(n),A=w?w.id||w["@id"]:null;w&&o!==A&&c(A),m(w)}catch(w){v(w)}})()},[n,e]),{isLoaded:!!x,id:o,requestId:n,error:h,resource:x,cached:!!(x&&x===g)}}function P0(t,e){const{id:n,isLoaded:r,error:o,resource:c,requestId:h,cached:v}=_p(t,e);return{id:n,isLoaded:r,error:o,manifest:c,requestId:h,cached:v}}function k0({manifest:t,children:e}){return le.jsx(Js,{value:{manifest:t},children:e})}function rd({canvas:t,children:e}){return le.jsx(Js,{value:{canvas:t},children:e})}function Zn(t,e=[]){const n=kn(),[r,o]=C.useState(()=>t(n.getState(),n));return C.useEffect(()=>n.subscribe(c=>t(c,n),c=>{o(c)},!1),e),r}const Hu=C.createContext([]);function Up(){const t=C.useContext(Hu);return Zn(e=>t.map(n=>e.iiif.entities.Canvas[n]).filter(Boolean),[t])}function ea(t={},e=[]){const{id:n,selector:r}=t,o=Ss();kn();const c=n||o.manifest,h=Zn(v=>c?v.iiif.entities.Manifest[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}function z0({range:t,children:e}){return le.jsx(Js,{value:{range:t},children:e})}function N0(t,e){for(const n of e.items){if(n.type==="Canvas")return n;if(n.type==="SpecificResource")return n.source;if(n.type==="Range"){const r=N0(t,t.get(n));if(r)return r}}return null}function jp(t,e){var r;const n=[];for(const o of e.items)if(o.type==="SpecificResource"&&((r=o.source)==null?void 0:r.type)==="Canvas"&&(o.source.id.indexOf("#")!==-1?n.push({id:o.source.id.split("#")[0],type:"Canvas"}):n.push(o.source)),o.type==="Range"&&n.push(...jp(t,t.get(o))),o.type==="SpecificResource"){const c=typeof o.source=="string"?o.source:o.source.id;n.push({id:c,type:"Canvas"})}return n}function CR(t,e,n){for(const r of e.structures){const o=Ip(t,t.get(r),n);if(o)return o}return null}function Ip(t,e,n){var r,o,c;for(const h of e.items){const v=(o=(r=h==null?void 0:h.source)==null?void 0:r.id)==null?void 0:o.split("#")[0];if(h.type==="SpecificResource"&&h.source===n||h.type==="SpecificResource"&&((c=h.source)==null?void 0:c.type)==="Canvas"&&n===v)return e;if(h.type==="Range"){const g=Ip(t,t.get(h),n);if(g)return g}}return null}function RR(t,e,n,r=!1){const o=e.behavior,c=n?t.get(n):null;if(!c)return[];const h=c.behavior,v=r?!1:o.includes("paged"),g=v?!1:o.includes("continuous"),x=v||g?!1:o.includes("individuals"),m=h.includes("facing-pages"),w=h.includes("non-paged");if(m||w||x||r)return[{id:c.id,type:"Canvas"}];const[A,k]=Fp(t,e);if(g)return A;const M=A.findIndex(_=>_.id===n);if(M===-1)return[];for(const _ of k)if(_.includes(M))return _.map(L=>A[L]);return[{id:c.id,type:"Canvas"}]}function Fp(t,e,{disablePaging:n,skipNonPaged:r}={}){const o=e.behavior,c=o.includes("paged"),h=c?!1:o.includes("continuous"),v=c||h?!1:o.includes("individuals"),g=e.type==="Manifest"?e.items:jp(t,e);if(h)return[g,[g.map((M,_)=>_)]];if(v||!c||n)return[g,g.map((M,_)=>[_])];const x=[];let m=[];const w=()=>{m.length&&(x.push([...m]),m=[])};let A=0,k=!1;for(let M=0;M<g.length;M++){const _=t.get(g[M]);if(_.behavior.includes("non-paged")){M===A&&A++,r||(w(),x.push([M]),w());continue}if(M===A||_.behavior.includes("facing-pages")){m.length&&(k=!0),w(),x.push([M]),w();continue}if(m.push(M),k){w(),k=!1;continue}m.length>1&&w()}return m.length&&w(),[g,x]}function _0(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.range,h=Zn(v=>c?v.iiif.entities.Range[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}function U0({startCanvas:t,disablePaging:e}){var M;const n=kn(),r=ea(),o=_0(),[c,h]=C.useState(void 0),v=o||r;if(!v)throw new Error("Nothing selected");const[g,x]=C.useMemo(()=>Fp(n,v,{disablePaging:e}),[n,v]),m=C.useCallback(_=>{const L=x.findIndex(P=>P.includes(_));h(L===-1?0:L)},[g,x]),w=C.useCallback(_=>{const L=g.findIndex(P=>P.id===_);L!==-1?m(L):h(0)},[g,x]),A=C.useCallback(()=>{h(_=>_>=x.length?_:_+1)},[x]),k=C.useCallback(()=>{h(_=>_<=0?0:_-1)},[x]);return typeof c>"u"&&(t?w(t):h(0)),{visibleItems:((M=x[c])==null?void 0:M.map(_=>g[_].id))||[],cursor:c,items:g,sequence:x,setSequenceIndex:h,setCanvasIndex:m,setCanvasId:w,next:A,previous:k}}const Wu=()=>{},Vu=C.createContext({setCurrentCanvasId:Wu,setCurrentCanvasIndex:Wu,nextCanvas:Wu,previousCanvas:Wu,items:[],sequence:[],setSequenceIndex:Wu,currentSequenceIndex:0});function j0(t){const e=ea(),{cursor:n,visibleItems:r,next:o,sequence:c,items:h,setCanvasIndex:v,setCanvasId:g,previous:x,setSequenceIndex:m}=U0({startCanvas:t.startCanvas,disablePaging:t.pagingEnabled===!1}),w=C.useMemo(()=>({sequence:c,items:h,setCurrentCanvasId:g,nextCanvas:o,previousCanvas:x,totalCanvases:h.length,setCurrentCanvasIndex:v,setSequenceIndex:m,currentSequenceIndex:n}),[c,h,g,o,x,h,v,m,n]);return e?r.length===0?null:le.jsx(Vu.Provider,{value:w,children:le.jsx(Hu.Provider,{value:r,children:le.jsx(rd,{canvas:r[0],children:t.children})})}):(console.warn("The manifest passed to the provider is not a valid IIIF manifest."),le.jsx("div",{children:"Sorry, something went wrong."}))}function I0(t){const e=P0(t.manifest);if(!e)return console.warn("The manifest passed to the provider is not a valid IIIF manifest."),le.jsx("div",{children:"Sorry, something went wrong."});if(e.error)return le.jsx("div",{children:e.error.toString()});if(!e.isLoaded)return le.jsx("div",{children:"Loading..."});const n=le.jsx(j0,{...t,children:t.children});return le.jsx(k0,{manifest:e.id,children:t.rangeId?le.jsx(z0,{range:t.rangeId,children:n}):n})}function F0(){return C.useContext(Vu)}function B0(){return{VaultContext:C.useContext(Bu),ResourceContext:C.useContext(id),SimpleViewerReactContext:C.useContext(Vu),VisibleCanvasReactContext:C.useContext(Hu)}}function H0(t){return le.jsx(Np,{vault:t.bridge.VaultContext.vault||void 0,resources:t.bridge.ResourceContext,children:le.jsx(Hu.Provider,{value:t.bridge.VisibleCanvasReactContext,children:le.jsx(Vu.Provider,{value:t.bridge.SimpleViewerReactContext,children:t.children})})})}const Vr=function(t){return function(){const e={type:t,getType:()=>t,toString:()=>t};return(n,r)=>({...e,...n!==void 0&&{payload:n},...r!==void 0&&{meta:r}})}},AR="@iiif/IMPORT_ENTITIES",MR="@iiif/MODIFY_ENTITY_FIELD",OR="@iiif/REORDER_ENTITY_FIELD",DR="@iiif/ADD_REFERENCE",LR="@iiif/UPDATE_REFERENCE",PR="@iiif/REMOVE_REFERENCE",kR="@iiif/ADD_METADATA",zR="@iiif/REMOVE_METADATA",NR="@iiif/UPDATE_METADATA",_R="@iiif/REORDER_METADATA",UR=Vr(AR)(),jR=Vr(MR)(),IR=Vr(OR)(),FR=Vr(DR)(),BR=Vr(PR)(),HR=Vr(LR)(),WR=Vr(kR)(),VR=Vr(NR)(),$R=Vr(zR)(),qR=Vr(_R)(),Bp={importEntities:UR,modifyEntityField:jR,reorderEntityField:IR,addReference:FR,removeReference:BR,updateReference:HR,addMetadata:WR,removeMetadata:$R,updateMetadata:VR,reorderMetadata:qR};function W0(){const e=kn().getStore();return C.useMemo(()=>n=>e.dispatch(n),[e])}function V0(t){return typeof t!="string"&&t&&t.bindToVault}function $0(){const t=kn(),e=C.useRef([]),n=W0(),r=C.useMemo(()=>`vault://annotation-page/${new Date().getTime()}/${Math.round(Math.random()*1e9).toString(16)}`,[]);C.useLayoutEffect(()=>{const v={id:r,type:"AnnotationPage",behavior:[],label:null,thumbnail:[],summary:null,requiredStatement:null,metadata:[],rights:null,provider:[],items:[],seeAlso:[],homepage:[],rendering:[],service:[]};n(Bp.importEntities({entities:{AnnotationPage:{[v.id]:v}}}))},[r]);const o=Zn(v=>r?v.iiif.entities.AnnotationPage[r]:null,[r]),c=C.useCallback((v,g)=>{if(r){if(V0(v)){const w=v;w.__vault||w.bindToVault(t),v=typeof w.source=="string"?w.source:w.source.id,e.current[v]=w}else typeof v!="string"&&(v=v.id);const x=t.get({id:r,type:"AnnotationPage"}),m=t.get({id:v,type:"Annotation"});x&&m&&(x.items.find(w=>w.id===m.id)||n(Bp.addReference({id:r,type:"AnnotationPage",key:"items",reference:{id:v,type:"Annotation"},index:g})))}},[r]),h=C.useCallback(v=>{r&&(V0(v)?v=typeof v.source=="string"?v.source:v.source.id:typeof v!="string"&&(v=v.id),e.current[v]&&e.current[v].beforeRemove(),t.get({id:r,type:"AnnotationPage"})&&n(Bp.removeReference({id:r,type:"AnnotationPage",key:"items",reference:{id:v,type:"Annotation"}})))},[r]);return[o,{addAnnotation:c,removeAnnotation:h}]}const q0=C.createContext(null);function Y0(){const t=C.useContext(q0);return[t.fullPage,{addAnnotation:t.addAnnotation,removeAnnotation:t.removeAnnotation}]}function Q0({children:t}){const[e,{addAnnotation:n,removeAnnotation:r}]=$0();return le.jsx(q0.Provider,{value:C.useMemo(()=>({fullPage:e,addAnnotation:n,removeAnnotation:r}),[e]),children:t})}function YR({width:t,style:e,height:n,error:r,resetErrorBoundary:o}){return le.jsxs("div",{style:{width:t,height:n,minHeight:500,...e||{},background:"#f9f9f9"},children:[le.jsx("h3",{children:"Error occurred"}),le.jsx("p",{children:r.message}),le.jsx("button",{onClick:o,children:"Reset"})]})}const sd=C.createContext(null);function G0(){return C.useContext(sd)}const X0=C.createContext(()=>{}),K0=C.createContext(()=>{});function fl(t,e,n,r,o=[]){const c=C.useContext(t==="portal"?K0:X0);C.useEffect(()=>(t!=="none"&&c(e,n,r),()=>{c(e,null)}),[e,t,c,...o])}function $r(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.canvas,h=Zn(v=>c?v.iiif.entities.Canvas[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}const Z0=C.createContext(()=>{});function QR(t){const e=$r(),n=C.useContext(Z0);C.useEffect(()=>e&&e.id?(n(e.id,t),()=>n(e.id,-1)):()=>{},[e,t])}function GR({children:t,errorFallback:e,outerContainerProps:n={},worldScale:r,...o}){const[c,h]=C.useState(),v=B0(),g=e||YR,[x,m]=C.useState({}),w=Object.entries(x),[A,k]=C.useState({}),M=Object.entries(A),[_,L]=C.useState({}),P=C.useMemo(()=>r||Math.max(...Object.values(_)),[_]),O=C.useMemo(()=>({maxOverZoom:P||1,...o.runtimeOptions||{}}),[P,o.runtimeOptions]),H=C.useCallback((B,J)=>{L(ie=>{if(J===-1){const{[B]:$,...re}=ie;return re}return{...ie,[B]:J}})},[]),q=C.useCallback((B,J,ie)=>{m(({[B]:$,...re})=>J?{...re,[B]:{element:J,props:ie}}:re)},[]),Q=C.useCallback((B,J,ie)=>{k(({[B]:$,...re})=>J?{...re,[B]:{element:J,props:ie}}:re)},[]);return le.jsxs(wR,{resetKeys:[],fallbackRender:B=>le.jsx(g,{...o,...B}),children:[le.jsx(fR,{...o,containerProps:{style:{position:"relative"},...o.containerProps||{}},htmlChildren:le.jsx(le.Fragment,{children:w.map(([B,{element:J,props:ie}])=>le.jsx(C.Fragment,{children:le.jsx(J,{...ie||{}})},B))}),onCreated:B=>{h(B),o.onCreated&&o.onCreated(B)},runtimeOptions:O,children:le.jsx(sd.Provider,{value:c,children:le.jsx(Z0.Provider,{value:H,children:le.jsx(X0.Provider,{value:q,children:le.jsx(K0.Provider,{value:Q,children:le.jsx(H0,{bridge:v,children:le.jsx(ju.Provider,{value:o.mode||"explore",children:le.jsx(Q0,{children:t})})})})})})})}),le.jsx("div",{children:M.map(([B,{element:J,props:ie}])=>le.jsx(C.Fragment,{children:le.jsx(J,{...ie||{}})},B))})]})}const ad={},J0={get(t){return t},setMetaValue([t,e,n],r){const o=J0.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;ad[t]={...ad[t]||{},[e]:{...(ad[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=ad[t];if(n)return e?n[e]:n}};function e1(t=J0){return{addEventListener(e,n,r,o){if(e)return t.setMetaValue([e.id,"eventManager",n],c=>{const h=c||[];for(const v of h)if(v.callback===r)return h;return[...h,{callback:r,scope:o}]}),r},removeEventListener(e,n,r){e&&t.setMetaValue([e.id,"eventManager",n],o=>(o||[]).filter(c=>c.callback!==r))},getListenersAsProps(e,n){const r=typeof e=="string"?{id:e}:e;if(!r||!r.id)return{};const o=t.getResourceMeta(r.id,"eventManager"),c={};if(o&&r)for(const h of Object.keys(o))c[h]=v=>{const g=t.get(r);for(const{callback:x,scope:m}of o[h]||[])(!m||n&&m.indexOf(n)!==-1)&&x(v,g)};return c}}}function Hp(t,e){const n=kn(),r=C.useMemo(()=>e1(n),[n]),o=Zn(()=>t&&t.id?n.getResourceMeta(t.id,"eventManager"):null,[t]);return C.useMemo(()=>t?r.getListenersAsProps(t,e):{},[o,t,n,e])}const od={},t1={get(t){return t},setMetaValue([t,e,n],r){const o=t1.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;od[t]={...od[t]||{},[e]:{...(od[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=od[t];if(n)return e?n[e]:n}};function Wp(t=t1){return{applyStyles(e,n,r){const o=typeof e=="string"?e:e.id;return t.setMetaValue([o,"styles",n],r)},getAppliedStyles(e){const n=typeof e=="string"?e:e.id;return t.getResourceMeta(n,"styles")}}}function $u(t,e){const n=kn(),r=C.useMemo(()=>Wp(n),[n]);return Zn(()=>{if(!t)return null;const o=r.getAppliedStyles(t.id);return o?e?o[e]:o:void 0},[t,e])}var XR=Object.defineProperty,KR=(t,e,n)=>e in t?XR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ld=(t,e,n)=>(KR(t,typeof e!="symbol"?e+"":e,n),n),ZR=function(){function t(e,n){var r=[],o=!0,c=!1,h=void 0;try{for(var v=e[Symbol.iterator](),g;!(o=(g=v.next()).done)&&(r.push(g.value),!(n&&r.length===n));o=!0);}catch(x){c=!0,h=x}finally{try{!o&&v.return&&v.return()}finally{if(c)throw h}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),qu=Math.PI*2,Vp=function(t,e,n,r,o,c,h){var v=t.x,g=t.y;v*=e,g*=n;var x=r*v-o*g,m=o*v+r*g;return{x:x+c,y:m+h}},JR=function(t,e){var n=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),r=Math.cos(t),o=Math.sin(t),c=Math.cos(t+e),h=Math.sin(t+e);return[{x:r-o*n,y:o+r*n},{x:c+h*n,y:h-c*n},{x:c,y:h}]},n1=function(t,e,n,r){var o=t*r-e*n<0?-1:1,c=t*n+e*r;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},eA=function(t,e,n,r,o,c,h,v,g,x,m,w){var A=Math.pow(o,2),k=Math.pow(c,2),M=Math.pow(m,2),_=Math.pow(w,2),L=A*k-A*_-k*M;L<0&&(L=0),L/=A*_+k*M,L=Math.sqrt(L)*(h===v?-1:1);var P=L*o/c*w,O=L*-c/o*m,H=x*P-g*O+(t+n)/2,q=g*P+x*O+(e+r)/2,Q=(m-P)/o,B=(w-O)/c,J=(-m-P)/o,ie=(-w-O)/c,$=n1(1,0,Q,B),re=n1(Q,B,J,ie);return v===0&&re>0&&(re-=qu),v===1&&re<0&&(re+=qu),[H,q,$,re]},tA=function(t){var e=t.px,n=t.py,r=t.cx,o=t.cy,c=t.rx,h=t.ry,v=t.xAxisRotation,g=v===void 0?0:v,x=t.largeArcFlag,m=x===void 0?0:x,w=t.sweepFlag,A=w===void 0?0:w,k=[];if(c===0||h===0)return[];var M=Math.sin(g*qu/360),_=Math.cos(g*qu/360),L=_*(e-r)/2+M*(n-o)/2,P=-M*(e-r)/2+_*(n-o)/2;if(L===0&&P===0)return[];c=Math.abs(c),h=Math.abs(h);var O=Math.pow(L,2)/Math.pow(c,2)+Math.pow(P,2)/Math.pow(h,2);O>1&&(c*=Math.sqrt(O),h*=Math.sqrt(O));var H=eA(e,n,r,o,c,h,m,A,M,_,L,P),q=ZR(H,4),Q=q[0],B=q[1],J=q[2],ie=q[3],$=Math.abs(ie)/(qu/4);Math.abs(1-$)<1e-7&&($=1);var re=Math.max(Math.ceil($),1);ie/=re;for(var me=0;me<re;me++)k.push(JR(J,ie)),J+=ie;return k.map(function(Re){var Se=Vp(Re[0],c,h,_,M,Q,B),Fe=Se.x,ke=Se.y,Xe=Vp(Re[1],c,h,_,M,Q,B),ft=Xe.x,Te=Xe.y,it=Vp(Re[2],c,h,_,M,Q,B),ue=it.x,se=it.y;return{x1:Fe,y1:ke,x2:ft,y2:Te,x:ue,y:se}})};function i1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nA=rA,$p={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},iA=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function rA(t){var e=[];return t.replace(iA,function(n,r,o){var c=r.toLowerCase();for(o=aA(o),c=="m"&&o.length>2&&(e.push([r].concat(o.splice(0,2))),c="l",r=r=="m"?"l":"L");;){if(o.length==$p[c])return o.unshift(r),e.push(o);if(o.length<$p[c])throw new Error("malformed path data");e.push([r].concat(o.splice(0,$p[c])))}}),e}var sA=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function aA(t){var e=t.match(sA);return e?e.map(Number):[]}const oA=i1(nA);var lA=uA;function uA(t){var e=0,n=0,r=0,o=0;return t.map(function(c){c=c.slice();var h=c[0],v=h.toUpperCase();if(h!=v)switch(c[0]=v,h){case"a":c[6]+=r,c[7]+=o;break;case"v":c[1]+=o;break;case"h":c[1]+=r;break;default:for(var g=1;g<c.length;)c[g++]+=r,c[g++]+=o}switch(v){case"Z":r=e,o=n;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":r=e=c[1],o=n=c[2];break;default:r=c[c.length-2],o=c[c.length-1]}return c})}const cA=i1(lA);function fA(t){const e=oA(t),n=cA(e);let r,o=0,c=0,h=0,v=0,g,x,m=0,w=0;const A=[];for(let k=0;k<n.length;k++){let M=n[k];const _=M[0];switch(_){case"M":o=M[1],c=M[2];break;case"H":M=["L",M[1],c];break;case"V":M=["L",o,M[1]];break;case"S":{let L=m,P=w;(r==="C"||r=="S")&&(L+=L-h,P+=P-v),M=["C",L,P,M[1],M[2],M[3],M[4]]}break;case"T":r==="Q"||r=="T"?(g=m*2-g,x=w*2-x):(g=m,x=w),M=["Q",g,x,M[1],M[2]];break;case"Q":g=M[1],x=M[2];break;case"A":{const L=tA({px:m,py:w,cx:M[6],cy:M[7],rx:M[1],ry:M[2],xAxisRotation:M[3],largeArcFlag:M[4],sweepFlag:M[5]});if(!L.length)continue;for(const[P,O]of L.entries())M=["C",O.x1,O.y1,O.x2,O.y2,O.x,O.y],P<L.length-1&&A.push(M);M=M}break;case"Z":M=["L",o,c];break}r=_,m=M[M.length-2],w=M[M.length-1],["C","Q","A"].indexOf(_)>-1?(h=M[M.length-4],v=M[M.length-3]):(h=m,v=w),A.push(M)}return A}/** Code to "flatten" quadratic and cubic Bézier curves to polylines.
285
285
  *
286
286
  * All code in this module is based on JavaScript code by Raph Levien, published on his blog at
287
287
  * https://raphlinus.github.io/.
@@ -311,7 +311,7 @@ No matching component was found for:
311
311
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
312
312
  * See the License for the specific language governing permissions and
313
313
  * limitations under the License.
314
- */function dA(t,e,n,r=1){return new r1(t,e,n).subdivide(r)}function hA(t,e,n,r,o=1){return new qp(new Float64Array([t.x,t.y,e.x,e.y,n.x,n.y,r.x,r.y])).subdivide(o)}function pA(t){return t.x*t.x+t.y*t.y}function Yu(t){return t/(1-.67+Math.pow(Math.pow(.67,4)+.25*t*t,.25))}function dl(t){return t*(1-.39+Math.sqrt(.39*.39+.25*t*t))}class r1{constructor(e,n,r){ld(this,"start"),ld(this,"control"),ld(this,"end"),this.start=e,this.control=n,this.end=r}eval(e){const n=1-e;return{x:this.start.x*n*n+2*this.control.x*n*e+this.end.x*e*e,y:this.start.y*n*n+2*this.control.y*n*e+this.end.y*e*e}}mapToBasic(){const{x:e,y:n}=this.start,{x:r,y:o}=this.control,{x:c,y:h}=this.end,v=2*r-e-c,g=2*o-n-h,x=(r-e)*v+(o-n)*g,m=(c-r)*v+(h-o)*g,w=(c-e)*g-(h-n)*v,A=x/w,P=m/w,M=Math.abs(w)/(Math.hypot(v,g)*Math.abs(P-A));return{x0:e,x2:c,scale:M,cross:w}}subdivide(e){const n=this.mapToBasic(),r=Yu(n.x0),o=Yu(n.x2),c=.5*Math.abs(o-r)*Math.sqrt(n.scale/e),h=Math.ceil(c),v=dl(r),g=dl(o),x=[0];for(let m=1;m<h;m++){const w=(dl(r+(o-r)*m/h)-v)/(g-v);x.push(w)}return x.push(1),x.map(m=>this.eval(m))}}class qp{constructor(e){ld(this,"c"),this.c=e}weightsum(e,n,r,o){const c=e*this.c[0]+n*this.c[2]+r*this.c[4]+o*this.c[6],h=e*this.c[1]+n*this.c[3]+r*this.c[5]+o*this.c[7];return{x:c,y:h}}eval(e){const n=1-e,r=n*n*n,o=3*n*n*e,c=3*n*e*e,h=e*e*e;return this.weightsum(r,o,c,h)}deriv(e){const n=1-e,r=-3*n*n,o=3*e*e,c=-6*e*n-r,h=6*e*n-o;return this.weightsum(r,c,h,o)}midpoint_quadbez(){const e=this.weightsum(-.25,.75,.75,-.25);return new r1({x:this.c[0],y:this.c[1]},e,{x:this.c[6],y:this.c[7]})}subsegment(e,n){const r=new Float64Array(8),o=this.eval(e),c=this.eval(n);r[0]=o.x,r[1]=o.y;const h=(n-e)/3,v=this.deriv(e);r[2]=o.x+h*v.x,r[3]=o.y+h*v.y;const g=this.deriv(n);return r[4]=c.x-h*g.x,r[5]=c.y-h*g.y,r[6]=c.x,r[7]=c.y,new qp(r)}subdivide(e){const n=.1*e,r=e-n,o=Math.sqrt(r),c=pA(this.weightsum(1,-3,3,-1)),h=Math.ceil(Math.pow(c/(432*n*n),1/6)),v=[];let g=0;for(let M=0;M<h;M++){const _=M/h,L=(M+1)/h,k=this.subsegment(_,L).midpoint_quadbez(),O=k.mapToBasic(),I=Yu(O.x0),q=Yu(O.x2),te=Math.sqrt(O.scale);let H=Math.abs(q-I)*te;if(Math.sign(O.x0)!=Math.sign(O.x2)){const J=o/te,re=o*Math.abs(q-I)/Yu(J);H=Math.max(H,re)}v.push({quad:k,a0:I,a2:q,val:H}),g+=H}const x=.5*g/o,m=Math.ceil(x),w=[{x:this.c[0],y:this.c[1]}];let A=0,P=0;for(let M=1;M<m;M++){const _=g*M/m;for(;A+v[P].val<_;)A+=v[P].val,P++;const L=v[P].a0,k=v[P].a2,O=dl(L),I=dl(k),q=L+(k-L)*(_-A)/v[P].val,te=(dl(q)-O)/(I-O);w.push(v[P].quad.eval(te))}return w.push({x:this.c[6],y:this.c[7]}),w}}const vA=/&?(xywh=)?(pixel:|percent:|pct:)?([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?)/,mA=/&?(t=)(npt:)?([0-9]+(.[0-9]+)?)?(,([0-9]+(.[0-9]+)?))?/,s1=/^rgba\((\d+),(\d+),(\d+),([0-9.]+)\)$/;function Qu(t,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r}={}){if(Array.isArray(t))return Er(t.reduce((o,c)=>{const{selector:h,selectors:v,iiifRenderingHints:g}=Qu(c,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});return h&&(o.selector||(o.selector=h),o.selectors.push(...v)),g&&(o.iiifRenderingHints=o.iiifRenderingHints||{type:"ImageApiSelector"},Object.assign(o.iiifRenderingHints,g)),o},{selector:null,selectors:[],iiifRenderingHints:r}));if(!t)return Er({selector:null,selectors:[],iiifRenderingHints:r});if(typeof t=="string"){const[o,c]=t.split("#");return c?Qu({type:"FragmentSelector",value:c},{svgPreprocessor:n,iiifRenderingHints:r,domParser:e}):Er({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type&&t.type==="PointSelector"&&(t.t||t.t===0)){const o={type:"TemporalSelector",temporal:{startTime:t.t}};return Er({selector:o,selectors:[o],iiifRenderingHints:r})}if(o1(t)){const o=[];if(t.region){const c=Qu({type:"FragmentSelector",value:"xywh="+t.region},{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});o.push(...c.selectors)}return Er({selector:o[0],selectors:o,iiifRenderingHints:r?{...r,...t}:t})}if(t.type==="FragmentSelector"){const o=vA.exec(t.value);if(o){const h={type:"BoxSelector",spatial:{unit:o[2]==="percent:"||o[2]==="pct:"?"percent":"pixel",x:parseFloat(o[3]),y:parseFloat(o[4]),width:parseFloat(o[5]),height:parseFloat(o[6])}};return Er({selector:h,selectors:[h],iiifRenderingHints:r})}const c=t.value.match(mA);if(c){const h={type:"TemporalSelector",temporal:{startTime:c[4]?parseFloat(c[4]):0,endTime:c[7]?parseFloat(c[7]):void 0}};return Er({selector:h,selectors:[h],iiifRenderingHints:r})}return Er({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type==="SvgSelector"&&"value"in t){e||(typeof window<"u"?e=new window.DOMParser:console.warn("No DOMParser available, cannot parse SVG selector, `points`, `spatial` and `style` will be unavailable and the SVG will not be normalized."));let o=[],c,h,v=(n==null?void 0:n(t.value))??t.value,g;if(e){const m=e.parseFromString(t.value,"image/svg+xml").querySelector("svg");if(!m)return console.warn(`Illegal SVG selector: ${t.value}`),Er({selector:null,selectors:[],iiifRenderingHints:r});const w=a1(m);w&&(o=w.points,g=w.shapeType,c=[Math.min(...o.map(A=>A[0])),Math.min(...o.map(A=>A[1])),Math.max(...o.map(A=>A[0])),Math.max(...o.map(A=>A[1]))],{style:h,svg:v}=SA(w.element)??{svg:v})}const x={type:"SvgSelector",svg:v,svgShape:g,style:h,points:o.length?o:void 0,spatial:c?{unit:"pixel",x:c[0],y:c[1],width:c[2]-c[0],height:c[3]-c[1]}:void 0};return Er({selector:x,selectors:[x],iiifRenderingHints:r})}return Er({selector:null,selectors:[],iiifRenderingHints:r})}function gA(t){const e=t.map(r=>r[0]).reduce((r,o)=>(r[o]+=1,r),{C:0,Q:0,L:0,M:0}),n=new Set(t.map(r=>r[0]));if(e.C>0||e.Q>0)return"path";if(e.L>0&&(n.size===1||n.size===2&&n.has("M"))){if(e.L===4)return"rect";const r=t.slice(-1)[0];return t[0][0]==="M"&&r[0]==="L"&&r[1]==t[0][1]&&r[2]===t[0][2]||r[1]===0&&r[2]===0?"polygon":"polyline"}return"path"}function a1(t){var e;for(const n of Array.from(t.children))switch(n==null?void 0:n.tagName.toLowerCase()){case"g":{const r=a1(n);if(r)return r}continue;case"path":{const r=n.getAttribute("d");if(!r)continue;const o=fA(r);return{element:n,points:yA(o),shapeType:gA(o)}}case"circle":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("r")??"0");if(!c)continue;const h=[];for(let v=0;v<=360;v+=12){const g=v*Math.PI/180;h.push([r+c*Math.cos(g),o+c*Math.sin(g)])}return{element:n,points:h,shapeType:"circle"}}case"ellipse":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("rx")??"0"),h=parseFloat(n.getAttribute("ry")??"0");if(!c&&!h)continue;const v=[];for(let g=0;g<=360;g+=12){const x=Math.tan(g/360*Math.PI),m=c*(1-x**2)/(1+x**2),w=h*2*x/(1+x**2);v.push([r+m,o+w])}return{element:n,points:v,shapeType:"ellipse"}}case"line":{const r=parseFloat(n.getAttribute("x0")??"0"),o=parseFloat(n.getAttribute("y0")??"0"),c=parseFloat(n.getAttribute("x1")??"0"),h=parseFloat(n.getAttribute("y1")??"0");if(r===c&&o===h)continue;return{element:n,points:[[r,o],[c,h]],shapeType:"polyline"}}case"polygon":case"polyline":{const r=((e=n.getAttribute("points"))==null?void 0:e.split(" ").map(c=>c.split(",").map(parseFloat)))??[];if(!r.length)continue;let o="polyline";return n.tagName.toLowerCase()==="polygon"&&(r.push(r[0]),o="polygon"),{element:n,points:r,shapeType:o}}case"rect":{const r=parseFloat(n.getAttribute("x")??"0"),o=parseFloat(n.getAttribute("y")??"0"),c=parseFloat(n.getAttribute("width")??"0"),h=parseFloat(n.getAttribute("height")??"0");if(!c||!h)continue;return{element:n,points:[[r,o],[r+c,o],[r+c,o+h],[r,o+h],[r,o]],shapeType:"rect"}}default:continue}return null}function yA(t){const e=[];for(let n=0;n<t.length;n++){const r=e[e.length-1]??[0,0],o=t[n];switch(o[0]){case"M":case"L":e.push([o[1],o[2]]);continue;case"C":e.push(...hA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]},{x:o[5],y:o[6]}).map(c=>[c.x,c.y]).slice(1));continue;case"Q":e.push(...dA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]}).map(c=>[c.x,c.y]).slice(1));continue}}return e}function SA(t){const e={};if(t.hasAttribute("fill")?(e.fill=t.getAttribute("fill"),t.removeAttribute("fill")):t.style.fill&&(e.fill=t.style.fill),e.fill){const r=s1.exec(e.fill);r&&(e.fillOpacity=parseFloat(r[4]),e.fill=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}if(t.hasAttribute("fill-opacity")?(e.fillOpacity=parseFloat(t.getAttribute("fill-opacity")),t.removeAttribute("fill-opacity")):t.style.fillOpacity&&(e.fillOpacity=parseFloat(t.style.fillOpacity)),t.hasAttribute("stroke")?(e.stroke=t.getAttribute("stroke"),t.removeAttribute("stroke")):t.style.stroke&&(e.stroke=t.style.stroke),e.stroke){const r=s1.exec(e.stroke);r&&(e.strokeOpacity=parseFloat(r[4]),e.stroke=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}t.hasAttribute("stroke-opacity")?(e.strokeOpacity=parseFloat(t.getAttribute("stroke-opacity")),t.removeAttribute("stroke-opacity")):t.style.strokeOpacity&&(e.strokeOpacity=parseFloat(t.style.strokeOpacity)),t.hasAttribute("stroke-width")?(e.strokeWidth=t.getAttribute("stroke-width"),t.removeAttribute("stroke-width")):t.style.strokeWidth&&(e.strokeWidth=t.style.strokeWidth),t.hasAttribute("stroke-dasharray")?(e.strokeDasharray=t.getAttribute("stroke-dasharray"),t.removeAttribute("stroke-dasharray")):t.style.strokeDasharray&&(e.strokeDasharray=t.style.strokeDasharray);let n=t;for(;n.tagName.toLowerCase()!=="svg";)if(n=n.parentElement,n===null)throw new Error("Could not find root SVG element");return{svg:n.outerHTML,style:Object.keys(e).length>0?e:void 0}}function o1(t){return!!t&&t.type==="iiif:ImageApiSelector"&&t.type==="iiif:ImageApiSelector"}function Er(t){if(t.iiifRenderingHints){const e=t.iiifRenderingHints;if(e.rotation){const n=l1(e.rotation);if(n)if(t.selectors.length)for(const r of t.selectors)r.rotation=n;else t.selectors.push({type:"RotationSelector",rotation:n})}}else delete t.iiifRenderingHints;return t}function l1(t){let e=parseFloat(t);return e&&t.startsWith("!")&&(e=360-e),e&&(e=e%360),e!==e?0:e||0}function ta(t,e={}){if(Array.isArray(t))return ta(t[0]);if(typeof t=="string"){const[n,r]=t.split("#");return r?ta({type:"SpecificResource",source:{id:n,type:"Unknown"},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{id:n,type:e.typeMap&&e.typeMap[n]||"Unknown"},selector:null,selectors:[]}}if(t.type==="Choice"||t.type==="List"||t.type==="Composite"||t.type==="Independents")return ta(t.items[0]);if(t.type==="SpecificResource"){t.source.type==="Canvas"&&t.source.partOf&&typeof t.source.partOf=="string"&&(t.source.partOf=[{id:t.source.partOf,type:"Manifest"}]);const{selector:n,selectors:r}=t.selector?Qu(t.selector,e):{selector:null,selectors:[]};return{type:"SpecificResource",source:t.source,selector:n,selectors:r}}if(t.id){t.type==="Canvas"&&t.partOf&&typeof t.partOf=="string"&&(t.partOf=[{id:t.partOf,type:"Manifest"}]);const[n,r]=t.id.split("#");return r?ta({type:"SpecificResource",source:{...t,id:n},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{...t,id:n},selector:null,selectors:[]}}return{type:"SpecificResource",source:t,selector:null,selectors:[]}}function Yp(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=kn(),h=n||o.annotation,v=Kn(x=>h?x.iiif.entities.Annotation[h]:void 0,[h]),g=Kn(x=>v&&v.body?v.body.map(m=>m?m.type==="SpecificResource"?{...m,source:c.get(m)}:m?x.iiif.entities[m.type][m.id]:null:null).filter(Boolean):[],[v]);return C.useMemo(()=>{if(!v)return;const x={...v,body:g,target:ta(v.target,{typeMap:c.getState().iiif.mapping})};return r?r(x):x},[v,r,g,...e])}const u1=({id:t,style:e,className:n,interactive:r})=>{const o=Yp({id:t}),c=$u(o,"atlas"),h=$u(o,"html"),v=Hp(o,["atlas"]),g=$r(),x=C.useMemo(()=>bR(e,c),[e,c]);return g&&o&&o.target&&o.target.selector&&o.target.selector.type==="BoxSelector"&&o.target.source&&(o.target.source.id===g.id||o.target.source===g.id)?le.jsx(yR,{id:o.id,isEditing:!0,region:o.target.selector.spatial,style:x,className:(h==null?void 0:h.className)||n,interactive:!!(h!=null&&h.href||r),href:(h==null?void 0:h.href)||null,title:(h==null?void 0:h.title)||null,hrefTarget:(h==null?void 0:h.target)||null,onClick:()=>{},...v}):null};function c1(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.annotationPage,h=Kn(v=>c?v.iiif.entities.AnnotationPage[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,...e])}const Qp=({className:t,page:e})=>{var c;const n=c1({id:e.id})||e,r=$u(n,"atlas"),o=$u(n,"html");return Kn(h=>n.id?h.iiif.entities.AnnotationPage[n.id]:null,[]),le.jsx(C.Fragment,{children:(c=n.items)==null?void 0:c.map(h=>le.jsx(u1,{id:h.id,style:r,className:(o==null?void 0:o.className)||t},h.id))})};function f1({id:t,image:e,thumbnail:n,isStatic:r,x:o=0,y:c=0,children:h,selector:v,onClick:g,enableSizes:x}){var w,A;const m=C.useMemo(()=>{if(!(!v||v.spatial.x===0&&v.spatial.y===0))return v.spatial},[v]);return le.jsx("world-object",{x:o+e.target.spatial.x,y:c+e.target.spatial.y,width:e.target.spatial.width,height:e.target.spatial.height,onClick:g,children:e.service?le.jsxs(C.Fragment,{children:[le.jsx(SR,{tiles:{id:e.service.id||e.service["@id"]||"unknown",height:e.height,width:e.width,imageService:e.service,thumbnail:n&&n.type==="fixed"?n:void 0},enableSizes:x,x:0,y:0,width:(w=e.target)==null?void 0:w.spatial.width,height:(A=e.target)==null?void 0:A.spatial.height,crop:m}),h]},"service"):le.jsxs(C.Fragment,{children:[le.jsx("world-image",{onClick:g,uri:e.id,target:{x:0,y:0,width:e.target.spatial.width,height:e.target.spatial.height},display:e.width&&e.height?{width:e.width,height:e.height}:void 0,crop:m}),h]},"no-service")},t+(e.service?"server":"no-service"))}var bA=Object.defineProperty,xA=(t,e,n)=>e in t?bA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ud=(t,e,n)=>(xA(t,typeof e!="symbol"?e+"":e,n),n),EA=function(){function t(e,n){var r=[],o=!0,c=!1,h=void 0;try{for(var v=e[Symbol.iterator](),g;!(o=(g=v.next()).done)&&(r.push(g.value),!(n&&r.length===n));o=!0);}catch(x){c=!0,h=x}finally{try{!o&&v.return&&v.return()}finally{if(c)throw h}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Gu=Math.PI*2,Gp=function(t,e,n,r,o,c,h){var v=t.x,g=t.y;v*=e,g*=n;var x=r*v-o*g,m=o*v+r*g;return{x:x+c,y:m+h}},wA=function(t,e){var n=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),r=Math.cos(t),o=Math.sin(t),c=Math.cos(t+e),h=Math.sin(t+e);return[{x:r-o*n,y:o+r*n},{x:c+h*n,y:h-c*n},{x:c,y:h}]},d1=function(t,e,n,r){var o=t*r-e*n<0?-1:1,c=t*n+e*r;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},TA=function(t,e,n,r,o,c,h,v,g,x,m,w){var A=Math.pow(o,2),P=Math.pow(c,2),M=Math.pow(m,2),_=Math.pow(w,2),L=A*P-A*_-P*M;L<0&&(L=0),L/=A*_+P*M,L=Math.sqrt(L)*(h===v?-1:1);var k=L*o/c*w,O=L*-c/o*m,I=x*k-g*O+(t+n)/2,q=g*k+x*O+(e+r)/2,te=(m-k)/o,H=(w-O)/c,J=(-m-k)/o,re=(-w-O)/c,$=d1(1,0,te,H),se=d1(te,H,J,re);return v===0&&se>0&&(se-=Gu),v===1&&se<0&&(se+=Gu),[I,q,$,se]},CA=function(t){var e=t.px,n=t.py,r=t.cx,o=t.cy,c=t.rx,h=t.ry,v=t.xAxisRotation,g=v===void 0?0:v,x=t.largeArcFlag,m=x===void 0?0:x,w=t.sweepFlag,A=w===void 0?0:w,P=[];if(c===0||h===0)return[];var M=Math.sin(g*Gu/360),_=Math.cos(g*Gu/360),L=_*(e-r)/2+M*(n-o)/2,k=-M*(e-r)/2+_*(n-o)/2;if(L===0&&k===0)return[];c=Math.abs(c),h=Math.abs(h);var O=Math.pow(L,2)/Math.pow(c,2)+Math.pow(k,2)/Math.pow(h,2);O>1&&(c*=Math.sqrt(O),h*=Math.sqrt(O));var I=TA(e,n,r,o,c,h,m,A,M,_,L,k),q=EA(I,4),te=q[0],H=q[1],J=q[2],re=q[3],$=Math.abs(re)/(Gu/4);Math.abs(1-$)<1e-7&&($=1);var se=Math.max(Math.ceil($),1);re/=se;for(var ge=0;ge<se;ge++)P.push(wA(J,re)),J+=re;return P.map(function(Ce){var me=Gp(Ce[0],c,h,_,M,te,H),Ie=me.x,_e=me.y,Ye=Gp(Ce[1],c,h,_,M,te,H),gt=Ye.x,Z=Ye.y,Ue=Gp(Ce[2],c,h,_,M,te,H),dt=Ue.x,pe=Ue.y;return{x1:Ie,y1:_e,x2:gt,y2:Z,x:dt,y:pe}})},RA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function h1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var AA=OA,Xp={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},MA=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function OA(t){var e=[];return t.replace(MA,function(n,r,o){var c=r.toLowerCase();for(o=LA(o),c=="m"&&o.length>2&&(e.push([r].concat(o.splice(0,2))),c="l",r=r=="m"?"l":"L");;){if(o.length==Xp[c])return o.unshift(r),e.push(o);if(o.length<Xp[c])throw new Error("malformed path data");e.push([r].concat(o.splice(0,Xp[c])))}}),e}var DA=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function LA(t){var e=t.match(DA);return e?e.map(Number):[]}const PA=h1(AA);var kA=zA;function zA(t){var e=0,n=0,r=0,o=0;return t.map(function(c){c=c.slice();var h=c[0],v=h.toUpperCase();if(h!=v)switch(c[0]=v,h){case"a":c[6]+=r,c[7]+=o;break;case"v":c[1]+=o;break;case"h":c[1]+=r;break;default:for(var g=1;g<c.length;)c[g++]+=r,c[g++]+=o}switch(v){case"Z":r=e,o=n;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":r=e=c[1],o=n=c[2];break;default:r=c[c.length-2],o=c[c.length-1]}return c})}const NA=h1(kA);function _A(t){const e=PA(t),n=NA(e);let r,o=0,c=0,h=0,v=0,g,x,m=0,w=0;const A=[];for(let P=0;P<n.length;P++){let M=n[P];const _=M[0];switch(_){case"M":o=M[1],c=M[2];break;case"H":M=["L",M[1],c];break;case"V":M=["L",o,M[1]];break;case"S":{let L=m,k=w;(r==="C"||r=="S")&&(L+=L-h,k+=k-v),M=["C",L,k,M[1],M[2],M[3],M[4]]}break;case"T":r==="Q"||r=="T"?(g=m*2-g,x=w*2-x):(g=m,x=w),M=["Q",g,x,M[1],M[2]];break;case"Q":g=M[1],x=M[2];break;case"A":{const L=CA({px:m,py:w,cx:M[6],cy:M[7],rx:M[1],ry:M[2],xAxisRotation:M[3],largeArcFlag:M[4],sweepFlag:M[5]});if(!L.length)continue;for(const[k,O]of L.entries())M=["C",O.x1,O.y1,O.x2,O.y2,O.x,O.y],k<L.length-1&&A.push(M);M=M}break;case"Z":M=["L",o,c];break}r=_,m=M[M.length-2],w=M[M.length-1],["C","Q","A"].indexOf(_)>-1?(h=M[M.length-4],v=M[M.length-3]):(h=m,v=w),A.push(M)}return A}/** Code to "flatten" quadratic and cubic Bézier curves to polylines.
314
+ */function dA(t,e,n,r=1){return new r1(t,e,n).subdivide(r)}function hA(t,e,n,r,o=1){return new qp(new Float64Array([t.x,t.y,e.x,e.y,n.x,n.y,r.x,r.y])).subdivide(o)}function pA(t){return t.x*t.x+t.y*t.y}function Yu(t){return t/(1-.67+Math.pow(Math.pow(.67,4)+.25*t*t,.25))}function dl(t){return t*(1-.39+Math.sqrt(.39*.39+.25*t*t))}class r1{constructor(e,n,r){ld(this,"start"),ld(this,"control"),ld(this,"end"),this.start=e,this.control=n,this.end=r}eval(e){const n=1-e;return{x:this.start.x*n*n+2*this.control.x*n*e+this.end.x*e*e,y:this.start.y*n*n+2*this.control.y*n*e+this.end.y*e*e}}mapToBasic(){const{x:e,y:n}=this.start,{x:r,y:o}=this.control,{x:c,y:h}=this.end,v=2*r-e-c,g=2*o-n-h,x=(r-e)*v+(o-n)*g,m=(c-r)*v+(h-o)*g,w=(c-e)*g-(h-n)*v,A=x/w,k=m/w,M=Math.abs(w)/(Math.hypot(v,g)*Math.abs(k-A));return{x0:e,x2:c,scale:M,cross:w}}subdivide(e){const n=this.mapToBasic(),r=Yu(n.x0),o=Yu(n.x2),c=.5*Math.abs(o-r)*Math.sqrt(n.scale/e),h=Math.ceil(c),v=dl(r),g=dl(o),x=[0];for(let m=1;m<h;m++){const w=(dl(r+(o-r)*m/h)-v)/(g-v);x.push(w)}return x.push(1),x.map(m=>this.eval(m))}}class qp{constructor(e){ld(this,"c"),this.c=e}weightsum(e,n,r,o){const c=e*this.c[0]+n*this.c[2]+r*this.c[4]+o*this.c[6],h=e*this.c[1]+n*this.c[3]+r*this.c[5]+o*this.c[7];return{x:c,y:h}}eval(e){const n=1-e,r=n*n*n,o=3*n*n*e,c=3*n*e*e,h=e*e*e;return this.weightsum(r,o,c,h)}deriv(e){const n=1-e,r=-3*n*n,o=3*e*e,c=-6*e*n-r,h=6*e*n-o;return this.weightsum(r,c,h,o)}midpoint_quadbez(){const e=this.weightsum(-.25,.75,.75,-.25);return new r1({x:this.c[0],y:this.c[1]},e,{x:this.c[6],y:this.c[7]})}subsegment(e,n){const r=new Float64Array(8),o=this.eval(e),c=this.eval(n);r[0]=o.x,r[1]=o.y;const h=(n-e)/3,v=this.deriv(e);r[2]=o.x+h*v.x,r[3]=o.y+h*v.y;const g=this.deriv(n);return r[4]=c.x-h*g.x,r[5]=c.y-h*g.y,r[6]=c.x,r[7]=c.y,new qp(r)}subdivide(e){const n=.1*e,r=e-n,o=Math.sqrt(r),c=pA(this.weightsum(1,-3,3,-1)),h=Math.ceil(Math.pow(c/(432*n*n),1/6)),v=[];let g=0;for(let M=0;M<h;M++){const _=M/h,L=(M+1)/h,P=this.subsegment(_,L).midpoint_quadbez(),O=P.mapToBasic(),H=Yu(O.x0),q=Yu(O.x2),Q=Math.sqrt(O.scale);let B=Math.abs(q-H)*Q;if(Math.sign(O.x0)!=Math.sign(O.x2)){const J=o/Q,ie=o*Math.abs(q-H)/Yu(J);B=Math.max(B,ie)}v.push({quad:P,a0:H,a2:q,val:B}),g+=B}const x=.5*g/o,m=Math.ceil(x),w=[{x:this.c[0],y:this.c[1]}];let A=0,k=0;for(let M=1;M<m;M++){const _=g*M/m;for(;A+v[k].val<_;)A+=v[k].val,k++;const L=v[k].a0,P=v[k].a2,O=dl(L),H=dl(P),q=L+(P-L)*(_-A)/v[k].val,Q=(dl(q)-O)/(H-O);w.push(v[k].quad.eval(Q))}return w.push({x:this.c[6],y:this.c[7]}),w}}const vA=/&?(xywh=)?(pixel:|percent:|pct:)?([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?)/,mA=/&?(t=)(npt:)?([0-9]+(.[0-9]+)?)?(,([0-9]+(.[0-9]+)?))?/,s1=/^rgba\((\d+),(\d+),(\d+),([0-9.]+)\)$/;function Qu(t,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r}={}){if(Array.isArray(t))return Er(t.reduce((o,c)=>{const{selector:h,selectors:v,iiifRenderingHints:g}=Qu(c,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});return h&&(o.selector||(o.selector=h),o.selectors.push(...v)),g&&(o.iiifRenderingHints=o.iiifRenderingHints||{type:"ImageApiSelector"},Object.assign(o.iiifRenderingHints,g)),o},{selector:null,selectors:[],iiifRenderingHints:r}));if(!t)return Er({selector:null,selectors:[],iiifRenderingHints:r});if(typeof t=="string"){const[o,c]=t.split("#");return c?Qu({type:"FragmentSelector",value:c},{svgPreprocessor:n,iiifRenderingHints:r,domParser:e}):Er({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type&&t.type==="PointSelector"&&(t.t||t.t===0)){const o={type:"TemporalSelector",temporal:{startTime:t.t}};return Er({selector:o,selectors:[o],iiifRenderingHints:r})}if(o1(t)){const o=[];if(t.region){const c=Qu({type:"FragmentSelector",value:"xywh="+t.region},{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});o.push(...c.selectors)}return Er({selector:o[0],selectors:o,iiifRenderingHints:r?{...r,...t}:t})}if(t.type==="FragmentSelector"){const o=vA.exec(t.value);if(o){const h={type:"BoxSelector",spatial:{unit:o[2]==="percent:"||o[2]==="pct:"?"percent":"pixel",x:parseFloat(o[3]),y:parseFloat(o[4]),width:parseFloat(o[5]),height:parseFloat(o[6])}};return Er({selector:h,selectors:[h],iiifRenderingHints:r})}const c=t.value.match(mA);if(c){const h={type:"TemporalSelector",temporal:{startTime:c[4]?parseFloat(c[4]):0,endTime:c[7]?parseFloat(c[7]):void 0}};return Er({selector:h,selectors:[h],iiifRenderingHints:r})}return Er({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type==="SvgSelector"&&"value"in t){e||(typeof window<"u"?e=new window.DOMParser:console.warn("No DOMParser available, cannot parse SVG selector, `points`, `spatial` and `style` will be unavailable and the SVG will not be normalized."));let o=[],c,h,v=(n==null?void 0:n(t.value))??t.value,g;if(e){const m=e.parseFromString(t.value,"image/svg+xml").querySelector("svg");if(!m)return console.warn(`Illegal SVG selector: ${t.value}`),Er({selector:null,selectors:[],iiifRenderingHints:r});const w=a1(m);w&&(o=w.points,g=w.shapeType,c=[Math.min(...o.map(A=>A[0])),Math.min(...o.map(A=>A[1])),Math.max(...o.map(A=>A[0])),Math.max(...o.map(A=>A[1]))],{style:h,svg:v}=SA(w.element)??{svg:v})}const x={type:"SvgSelector",svg:v,svgShape:g,style:h,points:o.length?o:void 0,spatial:c?{unit:"pixel",x:c[0],y:c[1],width:c[2]-c[0],height:c[3]-c[1]}:void 0};return Er({selector:x,selectors:[x],iiifRenderingHints:r})}return Er({selector:null,selectors:[],iiifRenderingHints:r})}function gA(t){const e=t.map(r=>r[0]).reduce((r,o)=>(r[o]+=1,r),{C:0,Q:0,L:0,M:0}),n=new Set(t.map(r=>r[0]));if(e.C>0||e.Q>0)return"path";if(e.L>0&&(n.size===1||n.size===2&&n.has("M"))){if(e.L===4)return"rect";const r=t.slice(-1)[0];return t[0][0]==="M"&&r[0]==="L"&&r[1]==t[0][1]&&r[2]===t[0][2]||r[1]===0&&r[2]===0?"polygon":"polyline"}return"path"}function a1(t){var e;for(const n of Array.from(t.children))switch(n==null?void 0:n.tagName.toLowerCase()){case"g":{const r=a1(n);if(r)return r}continue;case"path":{const r=n.getAttribute("d");if(!r)continue;const o=fA(r);return{element:n,points:yA(o),shapeType:gA(o)}}case"circle":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("r")??"0");if(!c)continue;const h=[];for(let v=0;v<=360;v+=12){const g=v*Math.PI/180;h.push([r+c*Math.cos(g),o+c*Math.sin(g)])}return{element:n,points:h,shapeType:"circle"}}case"ellipse":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("rx")??"0"),h=parseFloat(n.getAttribute("ry")??"0");if(!c&&!h)continue;const v=[];for(let g=0;g<=360;g+=12){const x=Math.tan(g/360*Math.PI),m=c*(1-x**2)/(1+x**2),w=h*2*x/(1+x**2);v.push([r+m,o+w])}return{element:n,points:v,shapeType:"ellipse"}}case"line":{const r=parseFloat(n.getAttribute("x0")??"0"),o=parseFloat(n.getAttribute("y0")??"0"),c=parseFloat(n.getAttribute("x1")??"0"),h=parseFloat(n.getAttribute("y1")??"0");if(r===c&&o===h)continue;return{element:n,points:[[r,o],[c,h]],shapeType:"polyline"}}case"polygon":case"polyline":{const r=((e=n.getAttribute("points"))==null?void 0:e.split(" ").map(c=>c.split(",").map(parseFloat)))??[];if(!r.length)continue;let o="polyline";return n.tagName.toLowerCase()==="polygon"&&(r.push(r[0]),o="polygon"),{element:n,points:r,shapeType:o}}case"rect":{const r=parseFloat(n.getAttribute("x")??"0"),o=parseFloat(n.getAttribute("y")??"0"),c=parseFloat(n.getAttribute("width")??"0"),h=parseFloat(n.getAttribute("height")??"0");if(!c||!h)continue;return{element:n,points:[[r,o],[r+c,o],[r+c,o+h],[r,o+h],[r,o]],shapeType:"rect"}}default:continue}return null}function yA(t){const e=[];for(let n=0;n<t.length;n++){const r=e[e.length-1]??[0,0],o=t[n];switch(o[0]){case"M":case"L":e.push([o[1],o[2]]);continue;case"C":e.push(...hA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]},{x:o[5],y:o[6]}).map(c=>[c.x,c.y]).slice(1));continue;case"Q":e.push(...dA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]}).map(c=>[c.x,c.y]).slice(1));continue}}return e}function SA(t){const e={};if(t.hasAttribute("fill")?(e.fill=t.getAttribute("fill"),t.removeAttribute("fill")):t.style.fill&&(e.fill=t.style.fill),e.fill){const r=s1.exec(e.fill);r&&(e.fillOpacity=parseFloat(r[4]),e.fill=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}if(t.hasAttribute("fill-opacity")?(e.fillOpacity=parseFloat(t.getAttribute("fill-opacity")),t.removeAttribute("fill-opacity")):t.style.fillOpacity&&(e.fillOpacity=parseFloat(t.style.fillOpacity)),t.hasAttribute("stroke")?(e.stroke=t.getAttribute("stroke"),t.removeAttribute("stroke")):t.style.stroke&&(e.stroke=t.style.stroke),e.stroke){const r=s1.exec(e.stroke);r&&(e.strokeOpacity=parseFloat(r[4]),e.stroke=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}t.hasAttribute("stroke-opacity")?(e.strokeOpacity=parseFloat(t.getAttribute("stroke-opacity")),t.removeAttribute("stroke-opacity")):t.style.strokeOpacity&&(e.strokeOpacity=parseFloat(t.style.strokeOpacity)),t.hasAttribute("stroke-width")?(e.strokeWidth=t.getAttribute("stroke-width"),t.removeAttribute("stroke-width")):t.style.strokeWidth&&(e.strokeWidth=t.style.strokeWidth),t.hasAttribute("stroke-dasharray")?(e.strokeDasharray=t.getAttribute("stroke-dasharray"),t.removeAttribute("stroke-dasharray")):t.style.strokeDasharray&&(e.strokeDasharray=t.style.strokeDasharray);let n=t;for(;n.tagName.toLowerCase()!=="svg";)if(n=n.parentElement,n===null)throw new Error("Could not find root SVG element");return{svg:n.outerHTML,style:Object.keys(e).length>0?e:void 0}}function o1(t){return!!t&&t.type==="iiif:ImageApiSelector"&&t.type==="iiif:ImageApiSelector"}function Er(t){if(t.iiifRenderingHints){const e=t.iiifRenderingHints;if(e.rotation){const n=l1(e.rotation);if(n)if(t.selectors.length)for(const r of t.selectors)r.rotation=n;else t.selectors.push({type:"RotationSelector",rotation:n})}}else delete t.iiifRenderingHints;return t}function l1(t){let e=parseFloat(t);return e&&t.startsWith("!")&&(e=360-e),e&&(e=e%360),e!==e?0:e||0}function ta(t,e={}){if(Array.isArray(t))return ta(t[0]);if(typeof t=="string"){const[n,r]=t.split("#");return r?ta({type:"SpecificResource",source:{id:n,type:"Unknown"},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{id:n,type:e.typeMap&&e.typeMap[n]||"Unknown"},selector:null,selectors:[]}}if(t.type==="Choice"||t.type==="List"||t.type==="Composite"||t.type==="Independents")return ta(t.items[0]);if(t.type==="SpecificResource"){t.source.type==="Canvas"&&t.source.partOf&&typeof t.source.partOf=="string"&&(t.source.partOf=[{id:t.source.partOf,type:"Manifest"}]);const{selector:n,selectors:r}=t.selector?Qu(t.selector,e):{selector:null,selectors:[]};return{type:"SpecificResource",source:t.source,selector:n,selectors:r}}if(t.id){t.type==="Canvas"&&t.partOf&&typeof t.partOf=="string"&&(t.partOf=[{id:t.partOf,type:"Manifest"}]);const[n,r]=t.id.split("#");return r?ta({type:"SpecificResource",source:{...t,id:n},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{...t,id:n},selector:null,selectors:[]}}return{type:"SpecificResource",source:t,selector:null,selectors:[]}}function Yp(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=kn(),h=n||o.annotation,v=Zn(x=>h?x.iiif.entities.Annotation[h]:void 0,[h]),g=Zn(x=>v&&v.body?v.body.map(m=>m?m.type==="SpecificResource"?{...m,source:c.get(m)}:m?x.iiif.entities[m.type][m.id]:null:null).filter(Boolean):[],[v]);return C.useMemo(()=>{if(!v)return;const x={...v,body:g,target:ta(v.target,{typeMap:c.getState().iiif.mapping})};return r?r(x):x},[v,r,g,...e])}const u1=({id:t,style:e,className:n,interactive:r})=>{const o=Yp({id:t}),c=$u(o,"atlas"),h=$u(o,"html"),v=Hp(o,["atlas"]),g=$r(),x=C.useMemo(()=>bR(e,c),[e,c]);return g&&o&&o.target&&o.target.selector&&o.target.selector.type==="BoxSelector"&&o.target.source&&(o.target.source.id===g.id||o.target.source===g.id)?le.jsx(yR,{id:o.id,isEditing:!0,region:o.target.selector.spatial,style:x,className:(h==null?void 0:h.className)||n,interactive:!!(h!=null&&h.href||r),href:(h==null?void 0:h.href)||null,title:(h==null?void 0:h.title)||null,hrefTarget:(h==null?void 0:h.target)||null,onClick:()=>{},...v}):null};function c1(t={},e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.annotationPage,h=Zn(v=>c?v.iiif.entities.AnnotationPage[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,...e])}const Qp=({className:t,page:e})=>{var c;const n=c1({id:e.id})||e,r=$u(n,"atlas"),o=$u(n,"html");return Zn(h=>n.id?h.iiif.entities.AnnotationPage[n.id]:null,[]),le.jsx(C.Fragment,{children:(c=n.items)==null?void 0:c.map(h=>le.jsx(u1,{id:h.id,style:r,className:(o==null?void 0:o.className)||t},h.id))})};function f1({id:t,image:e,thumbnail:n,isStatic:r,x:o=0,y:c=0,children:h,selector:v,onClick:g,enableSizes:x}){var w,A;const m=C.useMemo(()=>{if(!(!v||v.spatial.x===0&&v.spatial.y===0))return v.spatial},[v]);return le.jsx("world-object",{x:o+e.target.spatial.x,y:c+e.target.spatial.y,width:e.target.spatial.width,height:e.target.spatial.height,onClick:g,children:e.service?le.jsxs(C.Fragment,{children:[le.jsx(SR,{tiles:{id:e.service.id||e.service["@id"]||"unknown",height:e.height,width:e.width,imageService:e.service,thumbnail:n&&n.type==="fixed"?n:void 0},enableSizes:x,x:0,y:0,width:(w=e.target)==null?void 0:w.spatial.width,height:(A=e.target)==null?void 0:A.spatial.height,crop:m}),h]},"service"):le.jsxs(C.Fragment,{children:[le.jsx("world-image",{onClick:g,uri:e.id,target:{x:0,y:0,width:e.target.spatial.width,height:e.target.spatial.height},display:e.width&&e.height?{width:e.width,height:e.height}:void 0,crop:m}),h]},"no-service")},t+(e.service?"server":"no-service"))}var bA=Object.defineProperty,xA=(t,e,n)=>e in t?bA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ud=(t,e,n)=>(xA(t,typeof e!="symbol"?e+"":e,n),n),EA=function(){function t(e,n){var r=[],o=!0,c=!1,h=void 0;try{for(var v=e[Symbol.iterator](),g;!(o=(g=v.next()).done)&&(r.push(g.value),!(n&&r.length===n));o=!0);}catch(x){c=!0,h=x}finally{try{!o&&v.return&&v.return()}finally{if(c)throw h}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Gu=Math.PI*2,Gp=function(t,e,n,r,o,c,h){var v=t.x,g=t.y;v*=e,g*=n;var x=r*v-o*g,m=o*v+r*g;return{x:x+c,y:m+h}},wA=function(t,e){var n=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),r=Math.cos(t),o=Math.sin(t),c=Math.cos(t+e),h=Math.sin(t+e);return[{x:r-o*n,y:o+r*n},{x:c+h*n,y:h-c*n},{x:c,y:h}]},d1=function(t,e,n,r){var o=t*r-e*n<0?-1:1,c=t*n+e*r;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},TA=function(t,e,n,r,o,c,h,v,g,x,m,w){var A=Math.pow(o,2),k=Math.pow(c,2),M=Math.pow(m,2),_=Math.pow(w,2),L=A*k-A*_-k*M;L<0&&(L=0),L/=A*_+k*M,L=Math.sqrt(L)*(h===v?-1:1);var P=L*o/c*w,O=L*-c/o*m,H=x*P-g*O+(t+n)/2,q=g*P+x*O+(e+r)/2,Q=(m-P)/o,B=(w-O)/c,J=(-m-P)/o,ie=(-w-O)/c,$=d1(1,0,Q,B),re=d1(Q,B,J,ie);return v===0&&re>0&&(re-=Gu),v===1&&re<0&&(re+=Gu),[H,q,$,re]},CA=function(t){var e=t.px,n=t.py,r=t.cx,o=t.cy,c=t.rx,h=t.ry,v=t.xAxisRotation,g=v===void 0?0:v,x=t.largeArcFlag,m=x===void 0?0:x,w=t.sweepFlag,A=w===void 0?0:w,k=[];if(c===0||h===0)return[];var M=Math.sin(g*Gu/360),_=Math.cos(g*Gu/360),L=_*(e-r)/2+M*(n-o)/2,P=-M*(e-r)/2+_*(n-o)/2;if(L===0&&P===0)return[];c=Math.abs(c),h=Math.abs(h);var O=Math.pow(L,2)/Math.pow(c,2)+Math.pow(P,2)/Math.pow(h,2);O>1&&(c*=Math.sqrt(O),h*=Math.sqrt(O));var H=TA(e,n,r,o,c,h,m,A,M,_,L,P),q=EA(H,4),Q=q[0],B=q[1],J=q[2],ie=q[3],$=Math.abs(ie)/(Gu/4);Math.abs(1-$)<1e-7&&($=1);var re=Math.max(Math.ceil($),1);ie/=re;for(var me=0;me<re;me++)k.push(wA(J,ie)),J+=ie;return k.map(function(Re){var Se=Gp(Re[0],c,h,_,M,Q,B),Fe=Se.x,ke=Se.y,Xe=Gp(Re[1],c,h,_,M,Q,B),ft=Xe.x,Te=Xe.y,it=Gp(Re[2],c,h,_,M,Q,B),ue=it.x,se=it.y;return{x1:Fe,y1:ke,x2:ft,y2:Te,x:ue,y:se}})},RA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function h1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var AA=OA,Xp={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},MA=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function OA(t){var e=[];return t.replace(MA,function(n,r,o){var c=r.toLowerCase();for(o=LA(o),c=="m"&&o.length>2&&(e.push([r].concat(o.splice(0,2))),c="l",r=r=="m"?"l":"L");;){if(o.length==Xp[c])return o.unshift(r),e.push(o);if(o.length<Xp[c])throw new Error("malformed path data");e.push([r].concat(o.splice(0,Xp[c])))}}),e}var DA=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function LA(t){var e=t.match(DA);return e?e.map(Number):[]}const PA=h1(AA);var kA=zA;function zA(t){var e=0,n=0,r=0,o=0;return t.map(function(c){c=c.slice();var h=c[0],v=h.toUpperCase();if(h!=v)switch(c[0]=v,h){case"a":c[6]+=r,c[7]+=o;break;case"v":c[1]+=o;break;case"h":c[1]+=r;break;default:for(var g=1;g<c.length;)c[g++]+=r,c[g++]+=o}switch(v){case"Z":r=e,o=n;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":r=e=c[1],o=n=c[2];break;default:r=c[c.length-2],o=c[c.length-1]}return c})}const NA=h1(kA);function _A(t){const e=PA(t),n=NA(e);let r,o=0,c=0,h=0,v=0,g,x,m=0,w=0;const A=[];for(let k=0;k<n.length;k++){let M=n[k];const _=M[0];switch(_){case"M":o=M[1],c=M[2];break;case"H":M=["L",M[1],c];break;case"V":M=["L",o,M[1]];break;case"S":{let L=m,P=w;(r==="C"||r=="S")&&(L+=L-h,P+=P-v),M=["C",L,P,M[1],M[2],M[3],M[4]]}break;case"T":r==="Q"||r=="T"?(g=m*2-g,x=w*2-x):(g=m,x=w),M=["Q",g,x,M[1],M[2]];break;case"Q":g=M[1],x=M[2];break;case"A":{const L=CA({px:m,py:w,cx:M[6],cy:M[7],rx:M[1],ry:M[2],xAxisRotation:M[3],largeArcFlag:M[4],sweepFlag:M[5]});if(!L.length)continue;for(const[P,O]of L.entries())M=["C",O.x1,O.y1,O.x2,O.y2,O.x,O.y],P<L.length-1&&A.push(M);M=M}break;case"Z":M=["L",o,c];break}r=_,m=M[M.length-2],w=M[M.length-1],["C","Q","A"].indexOf(_)>-1?(h=M[M.length-4],v=M[M.length-3]):(h=m,v=w),A.push(M)}return A}/** Code to "flatten" quadratic and cubic Bézier curves to polylines.
315
315
  *
316
316
  * All code in this module is based on JavaScript code by Raph Levien, published on his blog at
317
317
  * https://raphlinus.github.io/.
@@ -341,7 +341,7 @@ No matching component was found for:
341
341
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
342
342
  * See the License for the specific language governing permissions and
343
343
  * limitations under the License.
344
- */function UA(t,e,n,r=1){return new p1(t,e,n).subdivide(r)}function jA(t,e,n,r,o=1){return new Kp(new Float64Array([t.x,t.y,e.x,e.y,n.x,n.y,r.x,r.y])).subdivide(o)}function IA(t){return t.x*t.x+t.y*t.y}function Xu(t){return t/(1-.67+Math.pow(Math.pow(.67,4)+.25*t*t,.25))}function hl(t){return t*(1-.39+Math.sqrt(.39*.39+.25*t*t))}class p1{constructor(e,n,r){ud(this,"start"),ud(this,"control"),ud(this,"end"),this.start=e,this.control=n,this.end=r}eval(e){const n=1-e;return{x:this.start.x*n*n+2*this.control.x*n*e+this.end.x*e*e,y:this.start.y*n*n+2*this.control.y*n*e+this.end.y*e*e}}mapToBasic(){const{x:e,y:n}=this.start,{x:r,y:o}=this.control,{x:c,y:h}=this.end,v=2*r-e-c,g=2*o-n-h,x=(r-e)*v+(o-n)*g,m=(c-r)*v+(h-o)*g,w=(c-e)*g-(h-n)*v,A=x/w,P=m/w,M=Math.abs(w)/(Math.hypot(v,g)*Math.abs(P-A));return{x0:e,x2:c,scale:M,cross:w}}subdivide(e){const n=this.mapToBasic(),r=Xu(n.x0),o=Xu(n.x2),c=.5*Math.abs(o-r)*Math.sqrt(n.scale/e),h=Math.ceil(c),v=hl(r),g=hl(o),x=[0];for(let m=1;m<h;m++){const w=(hl(r+(o-r)*m/h)-v)/(g-v);x.push(w)}return x.push(1),x.map(m=>this.eval(m))}}class Kp{constructor(e){ud(this,"c"),this.c=e}weightsum(e,n,r,o){const c=e*this.c[0]+n*this.c[2]+r*this.c[4]+o*this.c[6],h=e*this.c[1]+n*this.c[3]+r*this.c[5]+o*this.c[7];return{x:c,y:h}}eval(e){const n=1-e,r=n*n*n,o=3*n*n*e,c=3*n*e*e,h=e*e*e;return this.weightsum(r,o,c,h)}deriv(e){const n=1-e,r=-3*n*n,o=3*e*e,c=-6*e*n-r,h=6*e*n-o;return this.weightsum(r,c,h,o)}midpoint_quadbez(){const e=this.weightsum(-.25,.75,.75,-.25);return new p1({x:this.c[0],y:this.c[1]},e,{x:this.c[6],y:this.c[7]})}subsegment(e,n){const r=new Float64Array(8),o=this.eval(e),c=this.eval(n);r[0]=o.x,r[1]=o.y;const h=(n-e)/3,v=this.deriv(e);r[2]=o.x+h*v.x,r[3]=o.y+h*v.y;const g=this.deriv(n);return r[4]=c.x-h*g.x,r[5]=c.y-h*g.y,r[6]=c.x,r[7]=c.y,new Kp(r)}subdivide(e){const n=.1*e,r=e-n,o=Math.sqrt(r),c=IA(this.weightsum(1,-3,3,-1)),h=Math.ceil(Math.pow(c/(432*n*n),1/6)),v=[];let g=0;for(let M=0;M<h;M++){const _=M/h,L=(M+1)/h,k=this.subsegment(_,L).midpoint_quadbez(),O=k.mapToBasic(),I=Xu(O.x0),q=Xu(O.x2),te=Math.sqrt(O.scale);let H=Math.abs(q-I)*te;if(Math.sign(O.x0)!=Math.sign(O.x2)){const J=o/te,re=o*Math.abs(q-I)/Xu(J);H=Math.max(H,re)}v.push({quad:k,a0:I,a2:q,val:H}),g+=H}const x=.5*g/o,m=Math.ceil(x),w=[{x:this.c[0],y:this.c[1]}];let A=0,P=0;for(let M=1;M<m;M++){const _=g*M/m;for(;A+v[P].val<_;)A+=v[P].val,P++;const L=v[P].a0,k=v[P].a2,O=hl(L),I=hl(k),q=L+(k-L)*(_-A)/v[P].val,te=(hl(q)-O)/(I-O);w.push(v[P].quad.eval(te))}return w.push({x:this.c[6],y:this.c[7]}),w}}const FA=/&?(xywh=)?(pixel:|percent:|pct:)?([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?)/,BA=/&?(t=)(npt:)?([0-9]+(.[0-9]+)?)?(,([0-9]+(.[0-9]+)?))?/,v1=/^rgba\((\d+),(\d+),(\d+),([0-9.]+)\)$/;function cd(t,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r}={}){if(Array.isArray(t))return wr(t.reduce((o,c)=>{const{selector:h,selectors:v,iiifRenderingHints:g}=cd(c,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});return h&&(o.selector||(o.selector=h),o.selectors.push(...v)),g&&(o.iiifRenderingHints=o.iiifRenderingHints||{type:"ImageApiSelector"},Object.assign(o.iiifRenderingHints,g)),o},{selector:null,selectors:[],iiifRenderingHints:r}));if(!t)return wr({selector:null,selectors:[],iiifRenderingHints:r});if(typeof t=="string"){const[o,c]=t.split("#");return c?cd({type:"FragmentSelector",value:c},{svgPreprocessor:n,iiifRenderingHints:r,domParser:e}):wr({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type&&t.type==="PointSelector"&&(t.t||t.t===0)){const o={type:"TemporalSelector",temporal:{startTime:t.t}};return wr({selector:o,selectors:[o],iiifRenderingHints:r})}if($A(t)){const o=[];if(t.region){const c=cd({type:"FragmentSelector",value:"xywh="+t.region},{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});o.push(...c.selectors)}return wr({selector:o[0],selectors:o,iiifRenderingHints:r?{...r,...t}:t})}if(t.type==="FragmentSelector"){const o=FA.exec(t.value);if(o){const h={type:"BoxSelector",spatial:{unit:o[2]==="percent:"||o[2]==="pct:"?"percent":"pixel",x:parseFloat(o[3]),y:parseFloat(o[4]),width:parseFloat(o[5]),height:parseFloat(o[6])}};return wr({selector:h,selectors:[h],iiifRenderingHints:r})}const c=t.value.match(BA);if(c){const h={type:"TemporalSelector",temporal:{startTime:c[4]?parseFloat(c[4]):0,endTime:c[7]?parseFloat(c[7]):void 0}};return wr({selector:h,selectors:[h],iiifRenderingHints:r})}return wr({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type==="SvgSelector"&&"value"in t){e||(typeof window<"u"?e=new window.DOMParser:console.warn("No DOMParser available, cannot parse SVG selector, `points`, `spatial` and `style` will be unavailable and the SVG will not be normalized."));let o=[],c,h,v=(n==null?void 0:n(t.value))??t.value,g;if(e){const m=e.parseFromString(t.value,"image/svg+xml").querySelector("svg");if(!m)return console.warn(`Illegal SVG selector: ${t.value}`),wr({selector:null,selectors:[],iiifRenderingHints:r});const w=m1(m);w&&(o=w.points,g=w.shapeType,c=[Math.min(...o.map(A=>A[0])),Math.min(...o.map(A=>A[1])),Math.max(...o.map(A=>A[0])),Math.max(...o.map(A=>A[1]))],{style:h,svg:v}=WA(w.element)??{svg:v})}const x={type:"SvgSelector",svg:v,svgShape:g,style:h,points:o.length?o:void 0,spatial:c?{unit:"pixel",x:c[0],y:c[1],width:c[2]-c[0],height:c[3]-c[1]}:void 0};return wr({selector:x,selectors:[x],iiifRenderingHints:r})}return wr({selector:null,selectors:[],iiifRenderingHints:r})}function HA(t){const e=t.map(r=>r[0]).reduce((r,o)=>(r[o]+=1,r),{C:0,Q:0,L:0,M:0}),n=new Set(t.map(r=>r[0]));if(e.C>0||e.Q>0)return"path";if(e.L>0&&(n.size===1||n.size===2&&n.has("M"))){if(e.L===4)return"rect";const r=t.slice(-1)[0];return t[0][0]==="M"&&r[0]==="L"&&r[1]==t[0][1]&&r[2]===t[0][2]||r[1]===0&&r[2]===0?"polygon":"polyline"}return"path"}function m1(t){var e;for(const n of Array.from(t.children))switch(n==null?void 0:n.tagName.toLowerCase()){case"g":{const r=m1(n);if(r)return r}continue;case"path":{const r=n.getAttribute("d");if(!r)continue;const o=_A(r);return{element:n,points:VA(o),shapeType:HA(o)}}case"circle":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("r")??"0");if(!c)continue;const h=[];for(let v=0;v<=360;v+=12){const g=v*Math.PI/180;h.push([r+c*Math.cos(g),o+c*Math.sin(g)])}return{element:n,points:h,shapeType:"circle"}}case"ellipse":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("rx")??"0"),h=parseFloat(n.getAttribute("ry")??"0");if(!c&&!h)continue;const v=[];for(let g=0;g<=360;g+=12){const x=Math.tan(g/360*Math.PI),m=c*(1-x**2)/(1+x**2),w=h*2*x/(1+x**2);v.push([r+m,o+w])}return{element:n,points:v,shapeType:"ellipse"}}case"line":{const r=parseFloat(n.getAttribute("x0")??"0"),o=parseFloat(n.getAttribute("y0")??"0"),c=parseFloat(n.getAttribute("x1")??"0"),h=parseFloat(n.getAttribute("y1")??"0");if(r===c&&o===h)continue;return{element:n,points:[[r,o],[c,h]],shapeType:"polyline"}}case"polygon":case"polyline":{const r=((e=n.getAttribute("points"))==null?void 0:e.split(" ").map(c=>c.split(",").map(parseFloat)))??[];if(!r.length)continue;let o="polyline";return n.tagName.toLowerCase()==="polygon"&&(r.push(r[0]),o="polygon"),{element:n,points:r,shapeType:o}}case"rect":{const r=parseFloat(n.getAttribute("x")??"0"),o=parseFloat(n.getAttribute("y")??"0"),c=parseFloat(n.getAttribute("width")??"0"),h=parseFloat(n.getAttribute("height")??"0");if(!c||!h)continue;return{element:n,points:[[r,o],[r+c,o],[r+c,o+h],[r,o+h],[r,o]],shapeType:"rect"}}default:continue}return null}function VA(t){const e=[];for(let n=0;n<t.length;n++){const r=e[e.length-1]??[0,0],o=t[n];switch(o[0]){case"M":case"L":e.push([o[1],o[2]]);continue;case"C":e.push(...jA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]},{x:o[5],y:o[6]}).map(c=>[c.x,c.y]).slice(1));continue;case"Q":e.push(...UA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]}).map(c=>[c.x,c.y]).slice(1));continue}}return e}function WA(t){const e={};if(t.hasAttribute("fill")?(e.fill=t.getAttribute("fill"),t.removeAttribute("fill")):t.style.fill&&(e.fill=t.style.fill),e.fill){const r=v1.exec(e.fill);r&&(e.fillOpacity=parseFloat(r[4]),e.fill=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}if(t.hasAttribute("fill-opacity")?(e.fillOpacity=parseFloat(t.getAttribute("fill-opacity")),t.removeAttribute("fill-opacity")):t.style.fillOpacity&&(e.fillOpacity=parseFloat(t.style.fillOpacity)),t.hasAttribute("stroke")?(e.stroke=t.getAttribute("stroke"),t.removeAttribute("stroke")):t.style.stroke&&(e.stroke=t.style.stroke),e.stroke){const r=v1.exec(e.stroke);r&&(e.strokeOpacity=parseFloat(r[4]),e.stroke=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}t.hasAttribute("stroke-opacity")?(e.strokeOpacity=parseFloat(t.getAttribute("stroke-opacity")),t.removeAttribute("stroke-opacity")):t.style.strokeOpacity&&(e.strokeOpacity=parseFloat(t.style.strokeOpacity)),t.hasAttribute("stroke-width")?(e.strokeWidth=t.getAttribute("stroke-width"),t.removeAttribute("stroke-width")):t.style.strokeWidth&&(e.strokeWidth=t.style.strokeWidth),t.hasAttribute("stroke-dasharray")?(e.strokeDasharray=t.getAttribute("stroke-dasharray"),t.removeAttribute("stroke-dasharray")):t.style.strokeDasharray&&(e.strokeDasharray=t.style.strokeDasharray);let n=t;for(;n.tagName.toLowerCase()!=="svg";)if(n=n.parentElement,n===null)throw new Error("Could not find root SVG element");return{svg:n.outerHTML,style:Object.keys(e).length>0?e:void 0}}function $A(t){return!!t&&t.type==="iiif:ImageApiSelector"&&t.type==="iiif:ImageApiSelector"}function wr(t){if(t.iiifRenderingHints){const e=t.iiifRenderingHints;if(e.rotation){const n=qA(e.rotation);if(n)if(t.selectors.length)for(const r of t.selectors)r.rotation=n;else t.selectors.push({type:"RotationSelector",rotation:n})}}else delete t.iiifRenderingHints;return t}function qA(t){let e=parseFloat(t);return e&&t.startsWith("!")&&(e=360-e),e&&(e=e%360),e!==e?0:e||0}function Ku(t,e={}){if(Array.isArray(t))return Ku(t[0]);if(typeof t=="string"){const[n,r]=t.split("#");return r?Ku({type:"SpecificResource",source:{id:n,type:"Unknown"},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{id:n,type:e.typeMap&&e.typeMap[n]||"Unknown"},selector:null,selectors:[]}}if(t.type==="Choice"||t.type==="List"||t.type==="Composite"||t.type==="Independents")return Ku(t.items[0]);if(t.type==="SpecificResource"){t.source.type==="Canvas"&&t.source.partOf&&typeof t.source.partOf=="string"&&(t.source.partOf=[{id:t.source.partOf,type:"Manifest"}]);const{selector:n,selectors:r}=t.selector?cd(t.selector,e):{selector:null,selectors:[]};return{type:"SpecificResource",source:t.source,selector:n,selectors:r}}if(t.id){t.type==="Canvas"&&t.partOf&&typeof t.partOf=="string"&&(t.partOf=[{id:t.partOf,type:"Manifest"}]);const[n,r]=t.id.split("#");return r?Ku({type:"SpecificResource",source:{...t,id:n},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{...t,id:n},selector:null,selectors:[]}}return{type:"SpecificResource",source:t,selector:null,selectors:[]}}var YA=Object.defineProperty,QA=(t,e,n)=>e in t?YA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,g1=(t,e,n)=>(QA(t,typeof e!="symbol"?e+"":e,n),n);function GA(t){return Array.isArray(t)?t:t?[t]:[]}const y1=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];function XA(t){if(typeof t>"u"||t===null)throw new Error("Null or undefined is not a valid entity.");if(Array.isArray(t))throw new Error("Array is not a valid entity");if(typeof t!="object")throw new Error(`${typeof t} is not a valid entity`);if(typeof t["@type"]=="string"){const e=y1.indexOf(t["@type"]);if(e!==-1)return y1[e]}if(t.profile)return"Service";if(t.format||t["@type"])return"ContentResource";throw new Error("Resource type is not known")}class Zp{constructor(e,n={}){g1(this,"traversals"),g1(this,"options"),this.traversals={collection:[],manifest:[],canvas:[],annotationList:[],sequence:[],annotation:[],contentResource:[],choice:[],range:[],service:[],layer:[],...e},this.options={convertPropsToArray:!0,mergeMemberProperties:!0,allowUndefinedReturn:!1,...n}}static all(e){return new Zp({collection:[e],manifest:[e],canvas:[e],annotationList:[e],sequence:[e],annotation:[e],contentResource:[e],choice:[e],range:[e],service:[e],layer:[e]})}traverseCollection(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCollectionItems(e))),this.traversals.collection)}traverseCollectionItems(e){if(this.options.mergeMemberProperties){const n=[...(e.manifests||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Manifest"}:r),...(e.collections||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Collection"}:r),...e.members||[]];delete e.collections,delete e.manifests,e.members=n}return e.manifests&&(e.manifests=e.manifests.map(n=>this.traverseManifest(typeof n=="string"?{"@id":n,"@type":"sc:Manifest"}:n))),e.collections&&(e.collections=e.collections.map(n=>this.traverseCollection(typeof n=="string"?{"@id":n,"@type":"sc:Collection"}:n))),e.members&&(e.members=e.members.map(n=>typeof n=="string"?n:this.traverseUnknown(n))),e}traverseManifest(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseManifestItems(e))),this.traversals.manifest)}traverseManifestItems(e){return e.sequences&&(e.sequences=e.sequences.map(n=>this.traverseSequence(n))),e.structures&&(e.structures=e.structures.map(n=>this.traverseRange(n))),e}traverseSequence(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseSequenceItems(e))),this.traversals.sequence)}traverseSequenceItems(e){return e.canvases&&(e.canvases=e.canvases.map(n=>this.traverseCanvas(n))),e}traverseCanvas(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCanvasItems(e))),this.traversals.canvas)}traverseCanvasItems(e){return e.images&&(e.images=e.images.map(n=>this.traverseAnnotation(n))),e.otherContent&&(e.otherContent=e.otherContent.map(n=>this.traverseAnnotationList(n))),e}traverseRange(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseRangeItems(e))),this.traversals.range)}traverseRangeItems(e){if(this.options.mergeMemberProperties){const n=[...(e.ranges||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Range"}:r),...(e.canvases||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Canvas"}:r),...e.members||[]];delete e.ranges,delete e.canvases,e.members=n.length?n.map(r=>this.traverseUnknown(r)):void 0}return e}traverseAnnotationList(e){const n=typeof e=="string"?{"@id":e,"@type":"sc:AnnotationList"}:e;return this.traverseType(this.traverseDescriptive(this.traverseAnnotationListItems(n)),this.traversals.annotationList)}traverseAnnotationListItems(e){return e.resources&&(e.resources=e.resources.map(n=>this.traverseAnnotation(n))),e}traverseAnnotation(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseAnnotationItems(e))),this.traversals.annotation)}traverseAnnotationItems(e){return e.resource&&(Array.isArray(e.resource)?e.resource=e.resource.map(n=>this.traverseContentResource(n)):e.resource=this.traverseContentResource(e.resource)),e.on,e}traverseLayer(e){return this.traverseType(this.traverseLinking(this.traverseLayerItems(e)),this.traversals.layer)}traverseLayerItems(e){return e.otherContent&&(e.otherContent=e.otherContent.map(n=>this.traverseAnnotationList(n))),e}traverseChoice(e){return this.traverseType(this.traverseChoiceItems(e),this.traversals.choice)}traverseChoiceItems(e){return e.default&&e.default!=="rdf:nil"&&(e.default=this.traverseContentResource(e.default)),e.item&&e.item!=="rdf:nil"&&(e.item=e.item.map(n=>this.traverseContentResource(n))),e}traverseService(e){return this.traverseType(this.traverseLinking(e),this.traversals.service)}traverseContentResource(e){return e["@type"]==="oa:Choice"?this.traverseChoice(e):this.traverseType(this.traverseDescriptive(this.traverseLinking(e)),this.traversals.contentResource)}traverseUnknown(e){if(!e["@type"]||typeof e=="string")return e;switch(XA(e)){case"sc:Collection":return this.traverseCollection(e);case"sc:Manifest":return this.traverseManifest(e);case"sc:Canvas":return this.traverseCanvas(e);case"sc:Sequence":return this.traverseSequence(e);case"sc:Range":return this.traverseRange(e);case"oa:Annotation":return this.traverseAnnotation(e);case"sc:AnnotationList":return this.traverseAnnotationList(e);case"sc:Layer":return this.traverseLayer(e);case"Service":return this.traverseService(e);case"oa:Choice":return this.traverseChoice(e);case"ContentResource":return this.traverseContentResource(e)}return e.profile?this.traverseService(e):e}traverseImageResource(e){const n=Array.isArray(e),r=Array.isArray(e)?e:[e],o=[];for(const c of r)typeof c=="string"?o.push(this.traverseContentResource({"@id":c,"@type":"dctypes:Image"})):o.push(this.traverseContentResource(c));return!n&&!this.options.convertPropsToArray?o[0]:o}traverseDescriptive(e){return e.thumbnail&&(e.thumbnail=this.traverseImageResource(e.thumbnail)),e.logo&&(e.logo=this.traverseImageResource(e.logo)),e}traverseOneOrMoreServices(e){const n=Array.isArray(e),r=Array.isArray(e)?e:[e],o=[];for(const c of r)o.push(this.traverseService(c));return!n&&!this.options.convertPropsToArray?o[0]:o}traverseLinking(e){return e.related&&(e.related=this.traverseOneOrManyType(e.related,this.traversals.contentResource)),e.rendering&&(e.rendering=this.traverseOneOrManyType(e.rendering,this.traversals.contentResource)),e.service&&(e.service=this.traverseOneOrMoreServices(e.service)),e.seeAlso&&(e.seeAlso=this.traverseOneOrManyType(e.seeAlso,this.traversals.contentResource)),e.within&&(typeof e.within=="string"||(e.within=this.traverseOneOrManyType(e.within,this.traversals.contentResource))),e.startCanvas&&(typeof e.startCanvas=="string"?e.startCanvas=this.traverseType({"@id":e.startCanvas,"@type":"sc:Canvas"},this.traversals.canvas):e.startCanvas&&this.traverseType(e.startCanvas,this.traversals.canvas)),e.contentLayer&&(typeof e.contentLayer=="string"?e.contentLayer=this.traverseLayer({"@id":e.contentLayer,"@type":"sc:Layer"}):e.contentLayer=this.traverseLayer(e.contentLayer)),e}traverseOneOrManyType(e,n){if(!Array.isArray(e))if(this.options.convertPropsToArray)e=[e];else return this.traverseType(e,n);return e.map(r=>this.traverseType(r,n))}traverseType(e,n){return n.reduce((r,o)=>{const c=o(r);return typeof c>"u"&&!this.options.allowUndefinedReturn?r:c},e)}}const KA="http://library.stanford.edu/iiif/image-api/compliance.html#level0",S1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",b1="http://library.stanford.edu/iiif/image-api/compliance.html#level2",ZA="http://library.stanford.edu/iiif/image-api/conformance.html#level0",x1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",E1="http://library.stanford.edu/iiif/image-api/conformance.html#level2",JA="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",w1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",T1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",eM="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",C1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",R1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",tM="http://iiif.io/api/image/1/level0.json",nM="http://iiif.io/api/image/1/profiles/level0.json",A1="http://iiif.io/api/image/1/level1.json",M1="http://iiif.io/api/image/1/profiles/level1.json",O1="http://iiif.io/api/image/1/level2.json",D1="http://iiif.io/api/image/1/profiles/level2.json",iM="http://iiif.io/api/image/2/level0.json",rM="http://iiif.io/api/image/2/profiles/level0.json",L1="http://iiif.io/api/image/2/level1.json",P1="http://iiif.io/api/image/2/profiles/level1.json",k1="http://iiif.io/api/image/2/level2.json",z1="http://iiif.io/api/image/2/profiles/level2.json",sM="level0",N1="level1",_1="level2",aM="http://iiif.io/api/image/2/level0",U1="http://iiif.io/api/image/2/level1",j1="http://iiif.io/api/image/2/level2",oM=[U1,j1,S1,b1,x1,E1,w1,T1,C1,R1,A1,M1,O1,D1,L1,P1,k1,z1,N1,_1],lM=[aM,U1,j1,KA,S1,b1,ZA,x1,E1,JA,w1,T1,eM,C1,R1,tM,nM,A1,M1,O1,D1,iM,rM,L1,P1,k1,z1,sM,N1,_1];function bs(t){for(const e in t)(typeof t[e]>"u"||t[e]===null)&&delete t[e];return t}const Jp={attributionLabel:"Attribution",lang:"none",providerId:"http://example.org/provider",providerName:"Unknown"};function Ba(t,e="none"){if(!t)return{};const n=Array.isArray(t)?t:[t],r={};for(const o of n){if(typeof o=="string"){r[e]=r[e]?r[e]:[],r[e].push(o||"");continue}if(!o["@language"]){r[e]=r[e]?r[e]:[],r[e].push(o["@value"]||"");continue}const c=o["@language"];r[c]=r[c]?r[c]:[],r[c].push(o["@value"]||"")}return r}function I1(t){if(Array.isArray(t))return I1(t.find(e=>typeof e=="string"));if(lM.indexOf(t)!==-1)return"level2";if(oM.indexOf(t)!==-1)return"level1";if(typeof t=="string")return t}function uM(t){const e=Array.isArray(t)?t:[t];for(const n of e)switch(n){case"http://iiif.io/api/image/2/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2":return"ImageService2";case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":return"ImageService1";case"http://iiif.io/api/annex/openannotation/context.json":return"ImageApiSelector"}}function cM(t){switch(t){case"http://iiif.io/api/image/2/level0.json":case"http://iiif.io/api/image/2/level1.json":case"http://iiif.io/api/image/2/level2.json":return"ImageService2";case"http://iiif.io/api/auth/1/kiosk":case"http://iiif.io/api/auth/1/login":case"http://iiif.io/api/auth/1/clickthrough":case"http://iiif.io/api/auth/1/external":case"http://iiif.io/api/auth/0/kiosk":case"http://iiif.io/api/auth/0/login":case"http://iiif.io/api/auth/0/clickthrough":case"http://iiif.io/api/auth/0/external":return"AuthCookieService1";case"http://iiif.io/api/auth/1/token":case"http://iiif.io/api/auth/0/token":return"AuthTokenService1";case"http://iiif.io/api/auth/1/logout":case"http://iiif.io/api/auth/0/logout":return"AuthLogoutService1";case"http://iiif.io/api/search/1/search":case"http://iiif.io/api/search/0/search":return"SearchService1";case"http://iiif.io/api/search/1/autocomplete":case"http://iiif.io/api/search/0/autocomplete":return"AutoCompleteService1"}}function F1(t){for(const e of["sc","oa","dcterms","dctypes","iiif"])if(t.startsWith(`${e}:`))return t.slice(e.length+1);return t}const fM=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function ev(t){const e=t["@id"]||t.id;let n=t["@type"]||t.type;const r=t.profile||void 0,o=t["@context"]||void 0;if(r){const c=cM(r);if(c)return c}if(o){const c=uM(o);if(c)return c}if(n){if(Array.isArray(n)){if(n.indexOf("oa:CssStylesheet")!==-1)return"CssStylesheet";if(n.indexOf("cnt:ContentAsText")!==-1)return"TextualBody";n=n[0]}for(const c of["sc","oa","dcterms","dctypes","iiif"])if(n.startsWith(`${c}:`)){n=n.slice(c.length+1);break}switch(n){case"Layer":return"AnnotationCollection";case"AnnotationList":return"AnnotationPage";case"cnt:ContentAsText":return"TextualBody"}}if(n&&fM.indexOf(n)!==-1)return n;if(t.format){if(t.format.startsWith("image/"))return"Image";if(t.format.startsWith("text/")||t.format==="application/pdf")return"Text";if(t.format.startsWith("application/"))return"Dataset"}return e&&(e.endsWith(".jpg")||e.endsWith(".png")||e.endsWith(".jpeg"))?"Image":n||"unknown"}const dM=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function hM(t){const e=t.match(dM);return e?e[0]:t}function pM(t,e="Rights/License",n="none"){let r=null;const o=[],c=Array.isArray(t)?t:[t];for(const h of c){const v=h?hM(h):void 0;if(v&&(v.indexOf("creativecommons.org")!==-1||v.indexOf("rightsstatements.org")!==-1)){v.startsWith("https://")?r=`http://${v.slice(8)}`:r=v;continue}v&&o.push({label:{[n]:[e]},value:{[n]:[v]}})}return[r,o]}const vM=["http://iiif.io/api/presentation/2/context.json","http://iiif.io/api/image/2/context.json","http://iiif.io/api/image/1/context.json","http://library.stanford.edu/iiif/image-api/1.1/context.json","http://iiif.io/api/search/1/context.json","http://iiif.io/api/search/0/context.json","http://iiif.io/api/auth/1/context.json","http://iiif.io/api/auth/0/context.json","http://iiif.io/api/annex/openannotation/context.json"];function mM(t){if(t){const e=Array.isArray(t)?t:[t],n=[];for(const r of e)r==="http://iiif.io/api/presentation/2/context.json"&&n.push("http://iiif.io/api/presentation/3/context.json"),vM.indexOf(r)===-1&&n.push(r);if(e.length)return n.length===1?n[0]:n}}function gM(t){return t?t.map(e=>({label:Ba(e.label),value:Ba(e.value)})):[]}let B1=0;function H1(t,e){const n=encodeURI(t.id||t["@id"]||"").trim();return n&&e?`${n}/${e}`:n||(B1++,`http://example.org/${t["@type"]}${e?`/${e}`:""}/${B1}`)}function xs(t){const e=[...t.behavior||[]];t.viewingHint&&e.push(t.viewingHint);let n;return Array.isArray(t.motivation)?n=t.motivation.map(F1):t.motivation&&(n=F1(t.motivation)),{"@context":t["@context"]?mM(t["@context"]):void 0,id:(t["@id"]||H1(t)).trim(),type:ev(t),behavior:e.length?e:void 0,height:t.height?t.height:void 0,width:t.width?t.width:void 0,motivation:n,viewingDirection:t.viewingDirection,profile:t.profile,format:t.format?t.format:void 0,duration:void 0,timeMode:void 0}}function Es(t){const[e,n]=pM(t.license),r=[...t.metadata?gM(t.metadata):[],...n];return{rights:e,metadata:r.length?r:void 0,label:t.label?Ba(t.label):void 0,requiredStatement:t.attribution?{label:Ba(Jp.attributionLabel),value:Ba(t.attribution)}:void 0,navDate:t.navDate,summary:t.description?Ba(t.description):void 0,thumbnail:yM(t.thumbnail)}}function yM(t){return t&&(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?{id:e,type:"Image"}:(e.type==="unknown"&&(e.type="Image"),e))}function SM(t){if(!t.within)return;const e=Array.isArray(t.within)?t.within:[t.within],n=[];for(const r of e)if(typeof r=="string"){if(r)switch(t["@type"]){case"sc:Manifest":n.push({id:r,type:"Collection"});break}}else r["@id"]&&n.push({id:r["@id"],type:ev(r)});return n.length?n:void 0}function na(t){const e=t.related?Array.isArray(t.related)?t.related:[t.related]:[],n=t.contentLayer;return{provider:t.logo||e.length?[{id:Jp.providerId,type:"Agent",homepage:e.length?[e[0]]:void 0,logo:t.logo?Array.isArray(t.logo)?t.logo:[t.logo]:void 0,label:Ba(Jp.providerName)}]:void 0,partOf:SM(t),rendering:t.rendering,seeAlso:t.seeAlso,start:t.startCanvas,service:t.service?GA(t.service):void 0,supplementary:n?[n]:void 0}}function bM(t){return{chars:t.chars,format:t.format?t.format:void 0,language:t.language}}function xM(t){return bs({...xs(t),...Es(t),...na(t),items:t.members})}function EM(t){const e=[],n=[];let r;for(const c of t.sequences||[])c.canvases.length&&e.push(...c.canvases),c.behavior&&n.push(...c.behavior),c.startCanvas&&(r=c.startCanvas);const o=xs(t);return n.length&&(o.behavior?o.behavior.push(...n):o.behavior=n),bs({...o,...Es(t),...na(t),start:r,items:e,structures:t.structures})}function wM(t){return bs({...xs(t),...Es(t),...na(t),annotations:t.otherContent&&t.otherContent.length?t.otherContent:void 0,items:t.images&&t.images.length?[{id:H1(t,"annotation-page"),type:"AnnotationPage",items:t.images}]:void 0})}function TM(t){return bs({...xs(t),...Es(t),...na(t),items:t.resources&&t.resources.length?t.resources:void 0})}function CM(t){return!t.canvases||t.canvases.length===0?{canvases:[],behavior:[]}:{canvases:t.canvases,behavior:t.viewingHint?[t.viewingHint]:[],startCanvas:t.startCanvas}}function RM(t){function e(n){if(Array.isArray(n)){if(n.length>1)return{type:"List",items:n.map(e)};n=n[0]}if(typeof n=="string")return encodeURI(n).trim();if("@type"in n){let r;if(typeof n.full=="string")r=n.full;else if(n.full["@type"]==="dctypes:Image")r={id:n.full["@id"],type:"Image"};else if(n.full["@type"]==="sc:Canvas")r={id:n.full["@id"],type:"Canvas"};else throw new Error(`Unsupported source type on annotation: ${n.full["@type"]}`);return{type:"SpecificResource",source:r,selector:nv(n.selector)}}else return encodeURI(n["@id"]).trim()}return bs({...xs(t),...Es(t),...na(t),target:e(t.on),body:Array.isArray(t.resource)?t.resource.map(tv):tv(t.resource)})}function tv(t){const e=t;return bs({...xs(e),...Es(e),...na(e),...bM(e)})}function AM(t){const e=[];return t.default&&t.default!=="rdf:nil"&&e.push(t.default),t.item&&t.item!=="rdf:nil"&&e.push(...t.item),{...xs(t),...Es(t),items:e}}function MM(t){return bs({...xs(t),...Es(t),...na(t),items:t.members})}function OM(t){const{"@id":e,"@type":n,"@context":r,profile:o,...c}=t,h={};return e&&(h["@id"]=e),h["@type"]=ev(t),h["@type"]==="unknown"&&(r&&r.length&&(h["@context"]=r),h["@type"]="Service"),o&&(h.profile=I1(o)),bs({...h,...c})}function DM(t){return bs({...xs(t),...Es(t),...na(t)})}new Zp({collection:[xM],manifest:[EM],canvas:[wM],annotationList:[TM],sequence:[CM],annotation:[RM],contentResource:[tv],choice:[AM],range:[MM],service:[OM],layer:[DM]});function nv(t){if((Array.isArray(t["@type"])&&t["@type"].includes("oa:SvgSelector")||t["@type"]=="oa:SvgSelector")&&("chars"in t||"value"in t))return{type:"SvgSelector",value:"chars"in t?t.chars:t.value};if(t["@type"]==="oa:FragmentSelector")return{type:"FragmentSelector",value:t.value};if(t["@type"]==="oa:Choice")return[nv(t.default),...(Array.isArray(t.item)?t.item:[t.item]).map(nv)];if(t["@type"]=="iiif:ImageApiSelector")return{type:"ImageApiSelector",region:"region"in t?t.region:void 0,rotation:"rotation"in t?t.rotation:void 0};throw new Error(`Unsupported selector type: ${t["@type"]}`)}var V1={exports:{}};(function(t,e){var n=Object.defineProperty,r=(c,h,v)=>h in c?n(c,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):c[h]=v,o=(c,h,v)=>(r(c,typeof h!="symbol"?h+"":h,v),v);(function(c,h){h(e)})(RA,function(c){const h="http://library.stanford.edu/iiif/image-api/compliance.html#level1",v="http://library.stanford.edu/iiif/image-api/compliance.html#level2",g="http://library.stanford.edu/iiif/image-api/conformance.html#level1",x="http://library.stanford.edu/iiif/image-api/conformance.html#level2",m="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",w="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",A="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",P="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",M="http://iiif.io/api/image/1/level1.json",_="http://iiif.io/api/image/1/profiles/level1.json",L="http://iiif.io/api/image/1/level2.json",k="http://iiif.io/api/image/1/profiles/level2.json",O="http://iiif.io/api/image/2/level1.json",I="http://iiif.io/api/image/2/profiles/level1.json",q="http://iiif.io/api/image/2/level2.json",te="http://iiif.io/api/image/2/profiles/level2.json",H="level1",J="level2",re="http://iiif.io/api/image/2/level1",$="http://iiif.io/api/image/2/level2",se=[re,$,h,v,g,x,m,w,A,P,M,_,L,k,O,I,q,te,H,J],ge=["http://iiif.io/api/image/2/level0",re,$,"http://library.stanford.edu/iiif/image-api/compliance.html#level0",h,v,"http://library.stanford.edu/iiif/image-api/conformance.html#level0",g,x,"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",m,w,"http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",A,P,"http://iiif.io/api/image/1/level0.json","http://iiif.io/api/image/1/profiles/level0.json",M,_,L,k,"http://iiif.io/api/image/2/level0.json","http://iiif.io/api/image/2/profiles/level0.json",O,I,q,te,"level0",H,J],Ce=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];class me{constructor(z,G={}){o(this,"traversals"),o(this,"options"),this.traversals={collection:[],manifest:[],canvas:[],annotationList:[],sequence:[],annotation:[],contentResource:[],choice:[],range:[],service:[],layer:[],...z},this.options={convertPropsToArray:!0,mergeMemberProperties:!0,allowUndefinedReturn:!1,...G}}static all(z){return new me({collection:[z],manifest:[z],canvas:[z],annotationList:[z],sequence:[z],annotation:[z],contentResource:[z],choice:[z],range:[z],service:[z],layer:[z]})}traverseCollection(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCollectionItems(z))),this.traversals.collection)}traverseCollectionItems(z){if(this.options.mergeMemberProperties){const G=[...(z.manifests||[]).map(Se=>typeof Se=="string"?{"@id":Se,"@type":"sc:Manifest"}:Se),...(z.collections||[]).map(Se=>typeof Se=="string"?{"@id":Se,"@type":"sc:Collection"}:Se),...z.members||[]];delete z.collections,delete z.manifests,z.members=G}return z.manifests&&(z.manifests=z.manifests.map(G=>this.traverseManifest(typeof G=="string"?{"@id":G,"@type":"sc:Manifest"}:G))),z.collections&&(z.collections=z.collections.map(G=>this.traverseCollection(typeof G=="string"?{"@id":G,"@type":"sc:Collection"}:G))),z.members&&(z.members=z.members.map(G=>typeof G=="string"?G:this.traverseUnknown(G))),z}traverseManifest(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseManifestItems(z))),this.traversals.manifest)}traverseManifestItems(z){return z.sequences&&(z.sequences=z.sequences.map(G=>this.traverseSequence(G))),z.structures&&(z.structures=z.structures.map(G=>this.traverseRange(G))),z}traverseSequence(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseSequenceItems(z))),this.traversals.sequence)}traverseSequenceItems(z){return z.canvases&&(z.canvases=z.canvases.map(G=>this.traverseCanvas(G))),z}traverseCanvas(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCanvasItems(z))),this.traversals.canvas)}traverseCanvasItems(z){return z.images&&(z.images=z.images.map(G=>this.traverseAnnotation(G))),z.otherContent&&(z.otherContent=z.otherContent.map(G=>this.traverseAnnotationList(G))),z}traverseRange(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseRangeItems(z))),this.traversals.range)}traverseRangeItems(z){if(this.options.mergeMemberProperties){const G=[...(z.ranges||[]).map(Se=>typeof Se=="string"?{"@id":Se,"@type":"sc:Range"}:Se),...(z.canvases||[]).map(Se=>typeof Se=="string"?{"@id":Se,"@type":"sc:Canvas"}:Se),...z.members||[]];delete z.ranges,delete z.canvases,z.members=G.length?G.map(Se=>this.traverseUnknown(Se)):void 0}return z}traverseAnnotationList(z){const G=typeof z=="string"?{"@id":z,"@type":"sc:AnnotationList"}:z;return this.traverseType(this.traverseDescriptive(this.traverseAnnotationListItems(G)),this.traversals.annotationList)}traverseAnnotationListItems(z){return z.resources&&(z.resources=z.resources.map(G=>this.traverseAnnotation(G))),z}traverseAnnotation(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseAnnotationItems(z))),this.traversals.annotation)}traverseAnnotationItems(z){return z.resource&&(Array.isArray(z.resource)?z.resource=z.resource.map(G=>this.traverseContentResource(G)):z.resource=this.traverseContentResource(z.resource)),z.on,z}traverseLayer(z){return this.traverseType(this.traverseLinking(this.traverseLayerItems(z)),this.traversals.layer)}traverseLayerItems(z){return z.otherContent&&(z.otherContent=z.otherContent.map(G=>this.traverseAnnotationList(G))),z}traverseChoice(z){return this.traverseType(this.traverseChoiceItems(z),this.traversals.choice)}traverseChoiceItems(z){return z.default&&z.default!=="rdf:nil"&&(z.default=this.traverseContentResource(z.default)),z.item&&z.item!=="rdf:nil"&&(z.item=z.item.map(G=>this.traverseContentResource(G))),z}traverseService(z){return this.traverseType(this.traverseLinking(z),this.traversals.service)}traverseContentResource(z){return z["@type"]==="oa:Choice"?this.traverseChoice(z):this.traverseType(this.traverseDescriptive(this.traverseLinking(z)),this.traversals.contentResource)}traverseUnknown(z){if(!z["@type"]||typeof z=="string")return z;switch(function(G){if(G==null)throw new Error("Null or undefined is not a valid entity.");if(Array.isArray(G))throw new Error("Array is not a valid entity");if(typeof G!="object")throw new Error(typeof G+" is not a valid entity");if(typeof G["@type"]=="string"){const Se=Ce.indexOf(G["@type"]);if(Se!==-1)return Ce[Se]}if(G.profile)return"Service";if(G.format||G["@type"])return"ContentResource";throw new Error("Resource type is not known")}(z)){case"sc:Collection":return this.traverseCollection(z);case"sc:Manifest":return this.traverseManifest(z);case"sc:Canvas":return this.traverseCanvas(z);case"sc:Sequence":return this.traverseSequence(z);case"sc:Range":return this.traverseRange(z);case"oa:Annotation":return this.traverseAnnotation(z);case"sc:AnnotationList":return this.traverseAnnotationList(z);case"sc:Layer":return this.traverseLayer(z);case"Service":return this.traverseService(z);case"oa:Choice":return this.traverseChoice(z);case"ContentResource":return this.traverseContentResource(z)}return z.profile?this.traverseService(z):z}traverseImageResource(z){const G=Array.isArray(z),Se=Array.isArray(z)?z:[z],st=[];for(const Ve of Se)typeof Ve=="string"?st.push(this.traverseContentResource({"@id":Ve,"@type":"dctypes:Image"})):st.push(this.traverseContentResource(Ve));return G||this.options.convertPropsToArray?st:st[0]}traverseDescriptive(z){return z.thumbnail&&(z.thumbnail=this.traverseImageResource(z.thumbnail)),z.logo&&(z.logo=this.traverseImageResource(z.logo)),z}traverseOneOrMoreServices(z){const G=Array.isArray(z),Se=Array.isArray(z)?z:[z],st=[];for(const Ve of Se)st.push(this.traverseService(Ve));return G||this.options.convertPropsToArray?st:st[0]}traverseLinking(z){return z.related&&(z.related=this.traverseOneOrManyType(z.related,this.traversals.contentResource)),z.rendering&&(z.rendering=this.traverseOneOrManyType(z.rendering,this.traversals.contentResource)),z.service&&(z.service=this.traverseOneOrMoreServices(z.service)),z.seeAlso&&(z.seeAlso=this.traverseOneOrManyType(z.seeAlso,this.traversals.contentResource)),z.within&&(typeof z.within=="string"||(z.within=this.traverseOneOrManyType(z.within,this.traversals.contentResource))),z.startCanvas&&(typeof z.startCanvas=="string"?z.startCanvas=this.traverseType({"@id":z.startCanvas,"@type":"sc:Canvas"},this.traversals.canvas):z.startCanvas&&this.traverseType(z.startCanvas,this.traversals.canvas)),z.contentLayer&&(typeof z.contentLayer=="string"?z.contentLayer=this.traverseLayer({"@id":z.contentLayer,"@type":"sc:Layer"}):z.contentLayer=this.traverseLayer(z.contentLayer)),z}traverseOneOrManyType(z,G){if(!Array.isArray(z)){if(!this.options.convertPropsToArray)return this.traverseType(z,G);z=[z]}return z.map(Se=>this.traverseType(Se,G))}traverseType(z,G){return G.reduce((Se,st)=>{const Ve=st(Se);return Ve!==void 0||this.options.allowUndefinedReturn?Ve:Se},z)}}function Ie(j){for(const z in j)j[z]!==void 0&&j[z]!==null||delete j[z];return j}const _e="Attribution",Ye="http://example.org/provider",gt="Unknown";function Z(j,z="none"){if(!j)return{};const G=Array.isArray(j)?j:[j],Se={};for(const st of G){if(typeof st=="string"){Se[z]=Se[z]?Se[z]:[],Se[z].push(st||"");continue}if(!st["@language"]){Se[z]=Se[z]?Se[z]:[],Se[z].push(st["@value"]||"");continue}const Ve=st["@language"];Se[Ve]=Se[Ve]?Se[Ve]:[],Se[Ve].push(st["@value"]||"")}return Se}function Ue(j){return Array.isArray(j)?Ue(j.find(z=>typeof z=="string")):ge.indexOf(j)!==-1?"level2":se.indexOf(j)!==-1?"level1":typeof j=="string"?j:void 0}function dt(j){for(const z of["sc","oa","dcterms","dctypes","iiif"])if(j.startsWith(`${z}:`))return j.slice(z.length+1);return j}const pe=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function je(j){const z=j["@id"]||j.id;let G=j["@type"]||j.type;const Se=j.profile||void 0,st=j["@context"]||void 0;if(Se){const Ve=function(gn){switch(gn){case"http://iiif.io/api/image/2/level0.json":case"http://iiif.io/api/image/2/level1.json":case"http://iiif.io/api/image/2/level2.json":return"ImageService2";case"http://iiif.io/api/auth/1/kiosk":case"http://iiif.io/api/auth/1/login":case"http://iiif.io/api/auth/1/clickthrough":case"http://iiif.io/api/auth/1/external":case"http://iiif.io/api/auth/0/kiosk":case"http://iiif.io/api/auth/0/login":case"http://iiif.io/api/auth/0/clickthrough":case"http://iiif.io/api/auth/0/external":return"AuthCookieService1";case"http://iiif.io/api/auth/1/token":case"http://iiif.io/api/auth/0/token":return"AuthTokenService1";case"http://iiif.io/api/auth/1/logout":case"http://iiif.io/api/auth/0/logout":return"AuthLogoutService1";case"http://iiif.io/api/search/1/search":case"http://iiif.io/api/search/0/search":return"SearchService1";case"http://iiif.io/api/search/1/autocomplete":case"http://iiif.io/api/search/0/autocomplete":return"AutoCompleteService1"}}(Se);if(Ve)return Ve}if(st){const Ve=function(gn){const ki=Array.isArray(gn)?gn:[gn];for(const be of ki)switch(be){case"http://iiif.io/api/image/2/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2":return"ImageService2";case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":return"ImageService1";case"http://iiif.io/api/annex/openannotation/context.json":return"ImageApiSelector"}}(st);if(Ve)return Ve}if(G){if(Array.isArray(G)){if(G.indexOf("oa:CssStylesheet")!==-1)return"CssStylesheet";if(G.indexOf("cnt:ContentAsText")!==-1)return"TextualBody";G=G[0]}for(const Ve of["sc","oa","dcterms","dctypes","iiif"])if(G.startsWith(`${Ve}:`)){G=G.slice(Ve.length+1);break}switch(G){case"Layer":return"AnnotationCollection";case"AnnotationList":return"AnnotationPage";case"cnt:ContentAsText":return"TextualBody"}}if(G&&pe.indexOf(G)!==-1)return G;if(j.format){if(j.format.startsWith("image/"))return"Image";if(j.format.startsWith("text/")||j.format==="application/pdf")return"Text";if(j.format.startsWith("application/"))return"Dataset"}return z&&(z.endsWith(".jpg")||z.endsWith(".png")||z.endsWith(".jpeg"))?"Image":G||"unknown"}const He=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function ut(j){const z=j.match(He);return z?z[0]:j}const pt=["http://iiif.io/api/presentation/2/context.json","http://iiif.io/api/image/2/context.json","http://iiif.io/api/image/1/context.json","http://library.stanford.edu/iiif/image-api/1.1/context.json","http://iiif.io/api/search/1/context.json","http://iiif.io/api/search/0/context.json","http://iiif.io/api/auth/1/context.json","http://iiif.io/api/auth/0/context.json","http://iiif.io/api/annex/openannotation/context.json"];function vn(j){if(j){const z=Array.isArray(j)?j:[j],G=[];for(const Se of z)Se==="http://iiif.io/api/presentation/2/context.json"&&G.push("http://iiif.io/api/presentation/3/context.json"),pt.indexOf(Se)===-1&&G.push(Se);if(z.length)return G.length===1?G[0]:G}}let Kt=0;function xt(j,z){const G=encodeURI(j.id||j["@id"]||"").trim();return G&&z?`${G}/${z}`:G||(Kt++,`http://example.org/${j["@type"]}${z?`/${z}`:""}/${Kt}`)}function ct(j){const z=[...j.behavior||[]];let G;return j.viewingHint&&z.push(j.viewingHint),Array.isArray(j.motivation)?G=j.motivation.map(dt):j.motivation&&(G=dt(j.motivation)),{"@context":j["@context"]?vn(j["@context"]):void 0,id:(j["@id"]||xt(j)).trim(),type:je(j),behavior:z.length?z:void 0,height:j.height?j.height:void 0,width:j.width?j.width:void 0,motivation:G,viewingDirection:j.viewingDirection,profile:j.profile,format:j.format?j.format:void 0,duration:void 0,timeMode:void 0}}function Ge(j){const[z,G]=function(Ve,gn="Rights/License",ki="none"){let be=null;const at=[],ui=Array.isArray(Ve)?Ve:[Ve];for(const Dt of ui){const et=Dt?ut(Dt):void 0;!et||et.indexOf("creativecommons.org")===-1&&et.indexOf("rightsstatements.org")===-1?et&&at.push({label:{[ki]:[gn]},value:{[ki]:[et]}}):be=et.startsWith("https://")?`http://${et.slice(8)}`:et}return[be,at]}(j.license),Se=[...j.metadata?(st=j.metadata,st?st.map(Ve=>({label:Z(Ve.label),value:Z(Ve.value)})):[]):[],...G];var st;return{rights:z,metadata:Se.length?Se:void 0,label:j.label?Z(j.label):void 0,requiredStatement:j.attribution?{label:Z(_e),value:Z(j.attribution)}:void 0,navDate:j.navDate,summary:j.description?Z(j.description):void 0,thumbnail:nt(j.thumbnail)}}function nt(j){return j&&(Array.isArray(j)?j:[j]).map(z=>typeof z=="string"?{id:z,type:"Image"}:(z.type==="unknown"&&(z.type="Image"),z))}function Ze(j){if(!j.within)return;const z=Array.isArray(j.within)?j.within:[j.within],G=[];for(const Se of z)typeof Se=="string"?Se&&j["@type"]==="sc:Manifest"&&G.push({id:Se,type:"Collection"}):Se["@id"]&&G.push({id:Se["@id"],type:je(Se)});return G.length?G:void 0}function ht(j){const z=j.related?Array.isArray(j.related)?j.related:[j.related]:[],G=j.contentLayer;return{provider:j.logo||z.length?[{id:Ye,type:"Agent",homepage:z.length?[z[0]]:void 0,logo:j.logo?Array.isArray(j.logo)?j.logo:[j.logo]:void 0,label:Z(gt)}]:void 0,partOf:Ze(j),rendering:j.rendering,seeAlso:j.seeAlso,start:j.startCanvas,service:j.service?(Se=j.service,Array.isArray(Se)?Se:Se?[Se]:[]):void 0,supplementary:G?[G]:void 0};var Se}function ft(j){const z=j;return Ie({...ct(z),...Ge(z),...ht(z),...(G=z,{chars:G.chars,format:G.format?G.format:void 0,language:G.language})});var G}const mn=new me({collection:[function(j){return Ie({...ct(j),...Ge(j),...ht(j),items:j.members})}],manifest:[function(j){const z=[],G=[];let Se;for(const Ve of j.sequences||[])Ve.canvases.length&&z.push(...Ve.canvases),Ve.behavior&&G.push(...Ve.behavior),Ve.startCanvas&&(Se=Ve.startCanvas);const st=ct(j);return G.length&&(st.behavior?st.behavior.push(...G):st.behavior=G),Ie({...st,...Ge(j),...ht(j),start:Se,items:z,structures:j.structures})}],canvas:[function(j){return Ie({...ct(j),...Ge(j),...ht(j),annotations:j.otherContent&&j.otherContent.length?j.otherContent:void 0,items:j.images&&j.images.length?[{id:xt(j,"annotation-page"),type:"AnnotationPage",items:j.images}]:void 0})}],annotationList:[function(j){return Ie({...ct(j),...Ge(j),...ht(j),items:j.resources&&j.resources.length?j.resources:void 0})}],sequence:[function(j){return j.canvases&&j.canvases.length!==0?{canvases:j.canvases,behavior:j.viewingHint?[j.viewingHint]:[],startCanvas:j.startCanvas}:{canvases:[],behavior:[]}}],annotation:[function(j){return Ie({...ct(j),...Ge(j),...ht(j),target:function z(G){if(Array.isArray(G)){if(G.length>1)return{type:"List",items:G.map(z)};G=G[0]}if(typeof G=="string")return encodeURI(G).trim();if("@type"in G){let Se;if(typeof G.full=="string")Se=G.full;else if(G.full["@type"]==="dctypes:Image")Se={id:G.full["@id"],type:"Image"};else{if(G.full["@type"]!=="sc:Canvas")throw new Error(`Unsupported source type on annotation: ${G.full["@type"]}`);Se={id:G.full["@id"],type:"Canvas"}}return{type:"SpecificResource",source:Se,selector:Qt(G.selector)}}return encodeURI(G["@id"]).trim()}(j.on),body:Array.isArray(j.resource)?j.resource.map(ft):ft(j.resource)})}],contentResource:[ft],choice:[function(j){const z=[];return j.default&&j.default!=="rdf:nil"&&z.push(j.default),j.item&&j.item!=="rdf:nil"&&z.push(...j.item),{...ct(j),...Ge(j),items:z}}],range:[function(j){return Ie({...ct(j),...Ge(j),...ht(j),items:j.members})}],service:[function(j){const{"@id":z,"@type":G,"@context":Se,profile:st,...Ve}=j,gn={};return z&&(gn["@id"]=z),gn["@type"]=je(j),gn["@type"]==="unknown"&&(Se&&Se.length&&(gn["@context"]=Se),gn["@type"]="Service"),st&&(gn.profile=Ue(st)),Ie({...gn,...Ve})}],layer:[function(j){return Ie({...ct(j),...Ge(j),...ht(j)})}]});function Qt(j){if((Array.isArray(j["@type"])&&j["@type"].includes("oa:SvgSelector")||j["@type"]=="oa:SvgSelector")&&("chars"in j||"value"in j))return{type:"SvgSelector",value:"chars"in j?j.chars:j.value};if(j["@type"]==="oa:FragmentSelector")return{type:"FragmentSelector",value:j.value};if(j["@type"]==="oa:Choice")return[Qt(j.default),...(Array.isArray(j.item)?j.item:[j.item]).map(Qt)];if(j["@type"]=="iiif:ImageApiSelector")return{type:"ImageApiSelector",region:"region"in j?j.region:void 0,rotation:"rotation"in j?j.rotation:void 0};throw new Error(`Unsupported selector type: ${j["@type"]}`)}const Gi=function(j){return j&&j["@context"]&&(j["@context"]==="http://iiif.io/api/presentation/2/context.json"||j["@context"].indexOf("http://iiif.io/api/presentation/2/context.json")!==-1||j["@context"]==="http://www.shared-canvas.org/ns/context.json")||j["@context"]==="http://iiif.io/api/image/2/context.json"?mn.traverseUnknown(j):j};c.upgrade=Gi,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})(V1,V1.exports);function LM(t){return t.type==="SpecificResource"?[t.source,{selector:t.selector}]:[t,{selector:null}]}function iv(t,e){const{selector:n,source:r}=Ku(e);if(r.id!==t.id)return[null,r];const o={type:"BoxSelector",spatial:{x:0,y:0,width:Number(t.width),height:Number(t.height)}};return[n?n.type==="TemporalSelector"?{type:"TemporalBoxSelector",temporal:n.temporal,spatial:o.spatial}:n:null,r]}const W1={makeChoice:()=>{}},fd={type:"unknown"},Mn=t=>({type:"unknown",reason:t,annotations:{pages:[]}}),$1=(t,e)=>({type:"empty",width:t,height:e,annotations:{pages:[]},image:null,images:[]});function PM(t,e){var r;const n=(r=t==null?void 0:t.iiif)==null?void 0:r.meta[e];return n?n.annotationPageManager:null}function kM(t,e){return Kn(n=>{const r=[];if(!t)return r;const o=Object.keys(n.iiif.entities.AnnotationPage);for(const c of o)if(!e||e.indexOf(c)!==-1){const h=PM(n,c);h&&h.views&&h.views[t]&&r.push(c)}return r},[t,e])}function q1({canvas:t,manifest:e,all:n,canvases:r}){const o=[];if(e)for(const c of e.annotations)o.indexOf(c.id)===-1&&o.push(c.id);if(n){if(r&&r.length)for(const c of r)for(const h of c.annotations)o.indexOf(h.id)===-1&&o.push(h.id)}else if(t)for(const c of t.annotations)o.indexOf(c.id)===-1&&o.push(c.id);return o}function zM(t,e){var r;const n=(r=t==null?void 0:t.iiif)==null?void 0:r.meta[e];return n?n.annotationPageManager:null}function Y1(t,e={}){const n=kn(),r=ea(),o=$r(),c=Up(),h=C.useMemo(()=>q1({all:e.all,manifest:r,canvas:o,canvases:c}),[e.all,o,c,r]),v=kM(t,e.all?void 0:h),g=C.useCallback(m=>{t&&n.setMetaValue([m,"annotationPageManager","views"],w=>w&&!w[t]?w:{...w||{},[t]:!1})},[t,n]),x=C.useCallback((m,w={})=>{if(!t)return;const A=n.getState(),P=[];if(w!=null&&w.deselectOthers){const M=Object.keys(A.iiif.entities.AnnotationPage);for(const _ of M){const L=zM(A,_);L&&L.views&&L.views[t]&&P.push(_)}}for(const M of P)g(M);n.setMetaValue([m,"annotationPageManager","views"],M=>M&&M[t]?M:{...M||{},[t]:!0})},[t,g,n]);return{availablePageIds:h,enabledPageIds:v,setPageEnabled:x,setPageDisabled:g}}function Q1(t,e){return Kn((n,r)=>r.get(t.map(o=>({id:o,type:e}))),[t,e])}const G1=C.createContext(new ka.ImageServiceLoader);function dd(){return C.useContext(G1)}function X1(){const t=dd(),[e,n]=C.useState({}),r=C.useRef(!1);return C.useEffect(()=>()=>{r.current=!0},[]),[C.useCallback((c,{height:h,width:v})=>{if(c){const g=c.id||c["@id"],x=t.loadServiceSync({id:g,width:c.width||v,height:c.height||h,source:c});x?c=x:e[g]||(r.current||n(m=>({...m,[g]:"loading"})),t.loadService({id:g,width:c.width||v,height:c.height||h}).then(()=>{r.current||n(m=>({...m,[g]:"done"}))}))}return c},[t,e]),e]}function hd(t={}){const e=Yp(),n=$r(t.canvasId?{id:t.canvasId}:void 0);return Kn((r,o)=>{if(!n)return[];if(e&&t.enableSingleAnnotation)return[e];const c=o.get(n.items),h=[];for(const v of c)h.push(...o.get(v.items));return h},[n])}function NM(t){return t.type==="SpecificResource"?[t.source,{selector:t.selector}]:[t,{selector:null}]}const pd={},K1={get(t){return t},setMetaValue([t,e,n],r){const o=K1.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;pd[t]={...pd[t]||{},[e]:{...(pd[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=pd[t];if(n)return e?n[e]:n}};function _M(t=K1){function e(o){const c=o?typeof o=="string"?t.get(o):o:null;if(!c)return[];const h=t.get(c.items,{parent:c}),v=[];for(const g of h)v.push(...t.get(g.items,{parent:g}));return v}function n(o,c=[]){const h=Array.isArray(o)?o:e(o),v=[];let g=null;const x=[];for(const m of h){if(m.type!=="Annotation")throw new Error("getPaintables() accept either a canvas or list of annotations");const w=Array.from(Array.isArray(m.body)?m.body:[m.body]);for(const A of w){const[P,{selector:M}]=NM(A),_=t.get(P),L=(_.type||"unknown").toLowerCase();if(L==="choice"){const k=t.get(_.items,{parent:_.id}),O=c.length?c.map(I=>k.find(q=>q.id===I)).filter(Boolean):[k[0]];O.length===0&&O.push(k[0]),g={type:"single-choice",items:k.map(I=>({id:I.id,label:I.label,selected:O.indexOf(I)!==-1})),label:P.label},w.push(...O);continue}v.indexOf(L)===-1&&v.push(L),x.push({type:L,annotationId:m.id,resource:_,target:m.target,selector:M})}}return{types:v,items:x,choice:g}}function r(o){const{choice:c}=n(o);return c}return{getAllPaintingAnnotations:e,getPaintables:n,extractChoices:r}}function Z1(t,e=[]){const n=kn(),r=C.useMemo(()=>_M(n),[]),o=hd({enableSingleAnnotation:t==null?void 0:t.enableSingleAnnotation}),[c,h]=C.useState((t==null?void 0:t.defaultChoices)||[]),v=C.useMemo(()=>r.getPaintables(o,c),[n,o,c,...e]),x={makeChoice:C.useCallback((m,{deselectOthers:w=!0,deselect:A=!1}={})=>{if(v.choice){if(v.choice.type!=="single-choice")throw new Error("Complex choice not supported yet");h(P=>{if(A){const _=P.filter(L=>L!==m);if(_.length===0){const L=v.items[0].resource.id;return L?[L]:[]}return _}if(w)return[m];const M=[...P];if(M.length===0&&v.items.length){const _=v.items[0].resource.id;_&&M.push(_)}return P.indexOf(m)!==-1?P:[...P,m]})}},[v.choice])};return[v,x]}const UM=["model/gltf-binary"];function J1(t,e){const r=e.items[0].resource;return r.format?UM.indexOf(r.format)===-1?Mn(`3D format: ${r.format} is unsupported`):{type:"3d-model",model:r}:Mn("Unknown format")}function jM(t,e){var r;if(!t.duration)return Mn("No duration on canvas");if(e.items.length>1)return Mn("Only one audio source supported");const n=(r=e.items[0])==null?void 0:r.resource;return n?n.format?{type:"media",media:{annotationId:e.items[0].annotationId,duration:t.duration,url:n.id,type:"Sound",target:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}},format:n.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}}},annotations:{pages:[]}}:Mn("Audio does not have format"):Mn("Unknown audio")}function eS(t,e,n){const r=[];for(const o of e.items){const c=o.resource&&o.resource.type==="SpecificResource"?o.resource.source:o.resource;if(!c.id)return Mn("No resource Identifier");let h;if(c.service){const P=ka.getImageServices(c);P[0]&&(h=n(P[0],t))}const v={type:"BoxSelector",spatial:{x:0,y:0,width:Number(t.width),height:Number(t.height)}},[g,x]=iv(t,o.target);if(x.id!==t.id)continue;o.resource.width&&o.resource.height&&(o.resource.width,o.resource.height);let m=o.resource.type==="SpecificResource"?ta(o.resource):null;if(o.selector){const P=ta({type:"SpecificResource",source:o.resource,selector:o.selector});P&&(m=P)}const w=m&&m.selector&&(m.selector.type==="BoxSelector"||m.selector.type==="TemporalBoxSelector")?{type:"BoxSelector",spatial:{x:m.selector.spatial.x,y:m.selector.spatial.y,width:m.selector.spatial.width,height:m.selector.spatial.height}}:void 0;h&&!h.id&&(h.id=h["@id"]);const A={id:c.id,type:"Image",annotationId:o.annotationId,width:Number(g||w?c.width:t.width),height:Number(g||w?c.height:t.height),service:h,sizes:h&&h.sizes?h.sizes:c.width&&c.height?[{width:c.width,height:c.height}]:[],target:g&&g.type!=="PointSelector"?g:v,selector:w};r.push(A)}return{type:"images",image:r[0],images:r,choice:e.choice}}function tS(t,e={},n){const r=t.language||n||"none";switch(t.type){case"TextualBody":{typeof t.value<"u"&&(e[r]=t.value);break}case"List":case"Composite":case"Choice":t.items&&t.items.forEach(o=>tS(o,e,r))}return e}function nS(t,e){const n=[];return e.items.forEach(r=>{if(r.resource){const[o]=iv(t,r.target);n.push({annotationId:r.annotationId,text:tS(r.resource),target:o})}}),{type:"textual-content",items:n}}const IM=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/)|(?:(?:watch)?\?vi?=|&vi?=))([^#&?]*).*/;function iS(t,e){var h;const n=e.items.filter(v=>v.type==="video");if(!t.duration)return Mn("No duration on canvas");if(n.length>1)return Mn("Only one video source supported");const r=(h=n[0])==null?void 0:h.resource,o=!!(r.service||[]).find(v=>(v.profile||"").includes("youtube.com"));if(!r)return Mn("Unknown video");if((!r.format||r.format==="text/html")&&!o)return Mn("Video does not have format");const c={annotationId:e.items[0].annotationId,duration:t.duration,url:r.id,type:"Video",items:[],target:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}},format:r.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}}};if(o){c.type="VideoYouTube";const v=r.id.match(IM);if(!v[1])return Mn("Video is not known youtube video");c.youTubeId=v[1]}return{type:"media",media:c,annotations:{pages:[]}}}function rS({canvas:t,paintables:e,supports:n,loadImageService:r}){if(!t)return console.log("No canvas"),fd;if(e.types.length===0)return n.indexOf("empty")!==-1?$1(t.width,t.height):(console.log("No paintables"),fd);if(e.types.length!==1)if(e.types.length===2&&e.types.indexOf("text")!==-1)e.types=e.types.filter(c=>c!=="text");else return n.indexOf("complex-timeline")===-1?Mn("Complex timeline not supported"):Mn("ComplexTimelineStrategy not yet supported");const o=e.types[0];return o==="image"?n.indexOf("images")===-1?Mn("Image not supported"):eS(t,e,r):o==="Model"||o==="model"?n.indexOf("3d-model")===-1?Mn("3D not supported"):J1(t,e):o==="textualbody"?n.indexOf("textual-content")===-1?Mn("Textual content not supported"):nS(t,e):o==="sound"||o==="audio"?n.indexOf("media")===-1?Mn("Media not supported"):jM(t,e):o==="video"?n.indexOf("media")===-1?Mn("Media not supported"):iS(t,e):fd}function sS(t){const e=ea(),n=$r(),r=kn(),[o,c]=X1(),{enabledPageIds:h}=Y1((t==null?void 0:t.annotationPageManagerId)||(e==null?void 0:e.id)||(n==null?void 0:n.id),{all:!1}),v=Q1(h,"AnnotationPage"),g=(t==null?void 0:t.strategies)||["empty","images","media","textual-content","complex-timeline"],[x,m]=Z1(t,[c]),w=C.useMemo(()=>rS({canvas:n,paintables:x,supports:g,loadImageService:o}),[n,x,r,m.makeChoice]);return C.useMemo(()=>w.type==="unknown"?[w,W1]:[{...w,annotations:{pages:v}},m],[w,v])}const aS=(t,e=[])=>{const n=kn();C.useEffect(()=>{t(n)},[n,...e])},vd={},oS={get(t){return t},setMetaValue([t,e,n],r){const o=oS.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;vd[t]={...vd[t]||{},[e]:{...(vd[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=vd[t];if(n)return e?n[e]:n}},FM=new ka.ImageServiceLoader;function BM(t=oS,e={}){const n=e.imageServiceLoader||FM;async function r(o,c,h=!1,v=[],g){const x=()=>n.getThumbnailFromResource(void 0,c,h,v);if(!o)return await n.getThumbnailFromResource(void 0,c,h,v);if(typeof o=="string"){const w=ka.getFixedSizeFromImage(o);return w&&v.push(w),await n.getThumbnailFromResource(void 0,c,h,v)}const m=t.get(o,{skipSelfReturn:!1});if(typeof m=="string")return{best:ka.getFixedSizeFromImage(m),fallback:[],log:[]};if(!m)return await x();switch(await(async w=>{if(w&&w.thumbnail&&w.thumbnail.length){const A=t.get(w.thumbnail[0]),P=await n.getImageCandidates(A,h);P&&P.length&&v.push(...P)}})(m),m.type){case"Annotation":{const w=Array.isArray(m.body)?m.body:[m.body],A=t.get(w[0]);return g&&!A.width&&(A.width=g.width,A.height=g.height),await n.getThumbnailFromResource(A,c,h,v)}case"Canvas":{const w=m;return r(w.items[0],c,h,v,{width:w.width,height:w.height})}case"AnnotationPage":return r(m.items[0],c,h,v,g);case"Choice":{const w=m;return!w.items||w.items[0]?await x():r(w.items[0],c,h,v,g)}case"Collection":{const w=m.items[0];return w?r(w,c,h,v,g):await x()}case"Manifest":{const w=m.items[0];return w?r(w,c,h,v,g):await x()}case"SpecificResource":case"Image":case"Dataset":case"Sound":case"Text":case"TextualBody":case"Video":return g&&!m.width&&(m.width=g.width,m.height=g.height),n.getThumbnailFromResource(m,c,h,v)}return await x()}return{getBestThumbnailAtSize:r}}function lS(t,e,{canvasId:n,manifestId:r}={}){const o=kn(),c=dd(),h=C.useMemo(()=>BM(o,{imageServiceLoader:c}),[o,c]),[v,g]=C.useState(),x=ea(r?{id:r}:void 0),m=$r(n?{id:n}:void 0),w=m||x,A=C.useRef(!1);if(C.useEffect(()=>(A.current=!1,()=>{A.current=!0}),[]),!w)throw new Error("Must be called under a manifest or canvas context.");return aS(P=>{h.getBestThumbnailAtSize(w,t,e).then(M=>{M.best&&!A.current&&g(M.best)})},[w]),v}function HM(t){return{isMuted:!1,playRequested:!1,isPlaying:!1,isFinished:!1,volume:100,duration:t}}function VM(t,e){switch(e.type){case"FINISHED":return{...t,isFinished:!0,isPlaying:!1,playRequested:!1};case"PLAY_PAUSE":return{...t,isFinished:!1,isPlaying:!t.isPlaying};case"PLAY_REQUESTED":return{...t,isFinished:!1,playRequested:!0};case"PAUSE":return{...t,isPlaying:!1};case"PLAY":return{...t,isFinished:!1,playRequested:!1,isPlaying:!0};case"MUTE":return{...t,isMuted:!0};case"SET_VOLUME":return{...t,volume:e.volume,isMuted:e.volume===0};case"TOGGLE_MUTE":return{...t,isMuted:!t.isMuted};case"UNMUTE":return{...t,isMuted:!1}}return t}function uS(t){const e=Math.round(t);return`${Math.floor(e/60)}:${`${e%60}`.padStart(2,"0")}`}function md(t){const[e,n]=C.useReducer(VM,HM(t.duration)),r=C.useRef(null),o=C.useRef(null),c=C.useRef(null),h=C.useRef(!1),v=C.useCallback(()=>{o.current&&r.current&&(o.current.innerHTML=uS(r.current.currentTime),c.current&&(c.current.style.width=`${r.current.currentTime/t.duration*100}%`),h.current!==r.current.muted&&(h.current=r.current.muted,n(r.current.muted?{type:"MUTE"}:{type:"UNMUTE"})))},[t.duration]),g=C.useCallback(()=>{r.current&&(n({type:"PLAY_REQUESTED"}),r.current.play().then(()=>{n({type:"PLAY"})}),v())},[v]),x=C.useCallback(()=>{r.current&&(r.current.duration>0&&r.current.paused?g():m())},[v]),m=C.useCallback(()=>{r.current&&(r.current.pause(),n({type:"PAUSE"}),v())},[v]),w=C.useCallback(()=>{r.current&&(r.current.muted=!r.current.muted,n(r.current.muted?{type:"MUTE"}:{type:"UNMUTE"}))},[]),A=C.useCallback(()=>{r.current&&(r.current.muted=!0,n({type:"MUTE"}))},[]),P=C.useCallback(()=>{r.current&&(r.current.muted=!1,n({type:"UNMUTE"}))},[]),M=C.useCallback(k=>{r.current&&(r.current.muted=!1,r.current.volume=k/100,n({type:"SET_VOLUME",volume:k}))},[]),_=C.useCallback(k=>{r.current&&(r.current.currentTime=Math.max(0,Math.min(k*t.duration,t.duration)),v())},[]),L=C.useCallback(k=>{r.current&&(r.current.currentTime=Math.max(0,Math.min(k,t.duration)),v())},[]);return C.useEffect(()=>{const k=setInterval(()=>{v()},350);return()=>clearInterval(k)},[v,t.duration]),C.useEffect(()=>{const k=()=>{n({type:"FINISHED"})},O=r.current;return O==null||O.addEventListener("ended",k),()=>O==null?void 0:O.removeEventListener("ended",k)},[]),[{element:r,currentTime:o,progress:c},e,{play:g,pause:m,playPause:x,mute:A,unmute:P,toggleMute:w,setVolume:M,setDurationPercent:_,setTime:L}]}const cS=C.createContext(null),fS=C.createContext(null),dS=C.createContext(null);function WM(){const t=C.useContext(cS);if(!t)throw new Error("Ctx not found");return t}function $M(){const t=C.useContext(fS);if(!t)throw new Error("Ctx not found");return t}function qM(){const t=C.useContext(dS);if(!t)throw new Error("Ctx not found");return t}function rv({actions:t,state:e,children:n,currentTime:r,progress:o,element:c}){return le.jsx(dS.Provider,{value:{currentTime:r,progress:o,element:c},children:le.jsx(fS.Provider,{value:t,children:le.jsx(cS.Provider,{value:e,children:n})})})}function hS({media:t,children:e}){const[{element:n,currentTime:r,progress:o},c,h]=md({duration:t.duration});return le.jsxs(rv,{state:c,actions:h,currentTime:r,progress:o,element:n,children:[le.jsx("audio",{ref:n,src:t.url}),e]})}function pS({media:t,mediaControlsDeps:e,children:n}){return fl("portal","audio",hS,{media:t,children:n},[t,...e||[]]),null}function vS({element:t,media:e,playPause:n}){return le.jsxs("div",{className:"video-container",part:"video-container",onClick:n,children:[le.jsx("style",{children:`
344
+ */function UA(t,e,n,r=1){return new p1(t,e,n).subdivide(r)}function jA(t,e,n,r,o=1){return new Kp(new Float64Array([t.x,t.y,e.x,e.y,n.x,n.y,r.x,r.y])).subdivide(o)}function IA(t){return t.x*t.x+t.y*t.y}function Xu(t){return t/(1-.67+Math.pow(Math.pow(.67,4)+.25*t*t,.25))}function hl(t){return t*(1-.39+Math.sqrt(.39*.39+.25*t*t))}class p1{constructor(e,n,r){ud(this,"start"),ud(this,"control"),ud(this,"end"),this.start=e,this.control=n,this.end=r}eval(e){const n=1-e;return{x:this.start.x*n*n+2*this.control.x*n*e+this.end.x*e*e,y:this.start.y*n*n+2*this.control.y*n*e+this.end.y*e*e}}mapToBasic(){const{x:e,y:n}=this.start,{x:r,y:o}=this.control,{x:c,y:h}=this.end,v=2*r-e-c,g=2*o-n-h,x=(r-e)*v+(o-n)*g,m=(c-r)*v+(h-o)*g,w=(c-e)*g-(h-n)*v,A=x/w,k=m/w,M=Math.abs(w)/(Math.hypot(v,g)*Math.abs(k-A));return{x0:e,x2:c,scale:M,cross:w}}subdivide(e){const n=this.mapToBasic(),r=Xu(n.x0),o=Xu(n.x2),c=.5*Math.abs(o-r)*Math.sqrt(n.scale/e),h=Math.ceil(c),v=hl(r),g=hl(o),x=[0];for(let m=1;m<h;m++){const w=(hl(r+(o-r)*m/h)-v)/(g-v);x.push(w)}return x.push(1),x.map(m=>this.eval(m))}}class Kp{constructor(e){ud(this,"c"),this.c=e}weightsum(e,n,r,o){const c=e*this.c[0]+n*this.c[2]+r*this.c[4]+o*this.c[6],h=e*this.c[1]+n*this.c[3]+r*this.c[5]+o*this.c[7];return{x:c,y:h}}eval(e){const n=1-e,r=n*n*n,o=3*n*n*e,c=3*n*e*e,h=e*e*e;return this.weightsum(r,o,c,h)}deriv(e){const n=1-e,r=-3*n*n,o=3*e*e,c=-6*e*n-r,h=6*e*n-o;return this.weightsum(r,c,h,o)}midpoint_quadbez(){const e=this.weightsum(-.25,.75,.75,-.25);return new p1({x:this.c[0],y:this.c[1]},e,{x:this.c[6],y:this.c[7]})}subsegment(e,n){const r=new Float64Array(8),o=this.eval(e),c=this.eval(n);r[0]=o.x,r[1]=o.y;const h=(n-e)/3,v=this.deriv(e);r[2]=o.x+h*v.x,r[3]=o.y+h*v.y;const g=this.deriv(n);return r[4]=c.x-h*g.x,r[5]=c.y-h*g.y,r[6]=c.x,r[7]=c.y,new Kp(r)}subdivide(e){const n=.1*e,r=e-n,o=Math.sqrt(r),c=IA(this.weightsum(1,-3,3,-1)),h=Math.ceil(Math.pow(c/(432*n*n),1/6)),v=[];let g=0;for(let M=0;M<h;M++){const _=M/h,L=(M+1)/h,P=this.subsegment(_,L).midpoint_quadbez(),O=P.mapToBasic(),H=Xu(O.x0),q=Xu(O.x2),Q=Math.sqrt(O.scale);let B=Math.abs(q-H)*Q;if(Math.sign(O.x0)!=Math.sign(O.x2)){const J=o/Q,ie=o*Math.abs(q-H)/Xu(J);B=Math.max(B,ie)}v.push({quad:P,a0:H,a2:q,val:B}),g+=B}const x=.5*g/o,m=Math.ceil(x),w=[{x:this.c[0],y:this.c[1]}];let A=0,k=0;for(let M=1;M<m;M++){const _=g*M/m;for(;A+v[k].val<_;)A+=v[k].val,k++;const L=v[k].a0,P=v[k].a2,O=hl(L),H=hl(P),q=L+(P-L)*(_-A)/v[k].val,Q=(hl(q)-O)/(H-O);w.push(v[k].quad.eval(Q))}return w.push({x:this.c[6],y:this.c[7]}),w}}const FA=/&?(xywh=)?(pixel:|percent:|pct:)?([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?)/,BA=/&?(t=)(npt:)?([0-9]+(.[0-9]+)?)?(,([0-9]+(.[0-9]+)?))?/,v1=/^rgba\((\d+),(\d+),(\d+),([0-9.]+)\)$/;function cd(t,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r}={}){if(Array.isArray(t))return wr(t.reduce((o,c)=>{const{selector:h,selectors:v,iiifRenderingHints:g}=cd(c,{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});return h&&(o.selector||(o.selector=h),o.selectors.push(...v)),g&&(o.iiifRenderingHints=o.iiifRenderingHints||{type:"ImageApiSelector"},Object.assign(o.iiifRenderingHints,g)),o},{selector:null,selectors:[],iiifRenderingHints:r}));if(!t)return wr({selector:null,selectors:[],iiifRenderingHints:r});if(typeof t=="string"){const[o,c]=t.split("#");return c?cd({type:"FragmentSelector",value:c},{svgPreprocessor:n,iiifRenderingHints:r,domParser:e}):wr({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type&&t.type==="PointSelector"&&(t.t||t.t===0)){const o={type:"TemporalSelector",temporal:{startTime:t.t}};return wr({selector:o,selectors:[o],iiifRenderingHints:r})}if($A(t)){const o=[];if(t.region){const c=cd({type:"FragmentSelector",value:"xywh="+t.region},{domParser:e,svgPreprocessor:n,iiifRenderingHints:r});o.push(...c.selectors)}return wr({selector:o[0],selectors:o,iiifRenderingHints:r?{...r,...t}:t})}if(t.type==="FragmentSelector"){const o=FA.exec(t.value);if(o){const h={type:"BoxSelector",spatial:{unit:o[2]==="percent:"||o[2]==="pct:"?"percent":"pixel",x:parseFloat(o[3]),y:parseFloat(o[4]),width:parseFloat(o[5]),height:parseFloat(o[6])}};return wr({selector:h,selectors:[h],iiifRenderingHints:r})}const c=t.value.match(BA);if(c){const h={type:"TemporalSelector",temporal:{startTime:c[4]?parseFloat(c[4]):0,endTime:c[7]?parseFloat(c[7]):void 0}};return wr({selector:h,selectors:[h],iiifRenderingHints:r})}return wr({selector:null,selectors:[],iiifRenderingHints:r})}if(t.type==="SvgSelector"&&"value"in t){e||(typeof window<"u"?e=new window.DOMParser:console.warn("No DOMParser available, cannot parse SVG selector, `points`, `spatial` and `style` will be unavailable and the SVG will not be normalized."));let o=[],c,h,v=(n==null?void 0:n(t.value))??t.value,g;if(e){const m=e.parseFromString(t.value,"image/svg+xml").querySelector("svg");if(!m)return console.warn(`Illegal SVG selector: ${t.value}`),wr({selector:null,selectors:[],iiifRenderingHints:r});const w=m1(m);w&&(o=w.points,g=w.shapeType,c=[Math.min(...o.map(A=>A[0])),Math.min(...o.map(A=>A[1])),Math.max(...o.map(A=>A[0])),Math.max(...o.map(A=>A[1]))],{style:h,svg:v}=VA(w.element)??{svg:v})}const x={type:"SvgSelector",svg:v,svgShape:g,style:h,points:o.length?o:void 0,spatial:c?{unit:"pixel",x:c[0],y:c[1],width:c[2]-c[0],height:c[3]-c[1]}:void 0};return wr({selector:x,selectors:[x],iiifRenderingHints:r})}return wr({selector:null,selectors:[],iiifRenderingHints:r})}function HA(t){const e=t.map(r=>r[0]).reduce((r,o)=>(r[o]+=1,r),{C:0,Q:0,L:0,M:0}),n=new Set(t.map(r=>r[0]));if(e.C>0||e.Q>0)return"path";if(e.L>0&&(n.size===1||n.size===2&&n.has("M"))){if(e.L===4)return"rect";const r=t.slice(-1)[0];return t[0][0]==="M"&&r[0]==="L"&&r[1]==t[0][1]&&r[2]===t[0][2]||r[1]===0&&r[2]===0?"polygon":"polyline"}return"path"}function m1(t){var e;for(const n of Array.from(t.children))switch(n==null?void 0:n.tagName.toLowerCase()){case"g":{const r=m1(n);if(r)return r}continue;case"path":{const r=n.getAttribute("d");if(!r)continue;const o=_A(r);return{element:n,points:WA(o),shapeType:HA(o)}}case"circle":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("r")??"0");if(!c)continue;const h=[];for(let v=0;v<=360;v+=12){const g=v*Math.PI/180;h.push([r+c*Math.cos(g),o+c*Math.sin(g)])}return{element:n,points:h,shapeType:"circle"}}case"ellipse":{const r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("rx")??"0"),h=parseFloat(n.getAttribute("ry")??"0");if(!c&&!h)continue;const v=[];for(let g=0;g<=360;g+=12){const x=Math.tan(g/360*Math.PI),m=c*(1-x**2)/(1+x**2),w=h*2*x/(1+x**2);v.push([r+m,o+w])}return{element:n,points:v,shapeType:"ellipse"}}case"line":{const r=parseFloat(n.getAttribute("x0")??"0"),o=parseFloat(n.getAttribute("y0")??"0"),c=parseFloat(n.getAttribute("x1")??"0"),h=parseFloat(n.getAttribute("y1")??"0");if(r===c&&o===h)continue;return{element:n,points:[[r,o],[c,h]],shapeType:"polyline"}}case"polygon":case"polyline":{const r=((e=n.getAttribute("points"))==null?void 0:e.split(" ").map(c=>c.split(",").map(parseFloat)))??[];if(!r.length)continue;let o="polyline";return n.tagName.toLowerCase()==="polygon"&&(r.push(r[0]),o="polygon"),{element:n,points:r,shapeType:o}}case"rect":{const r=parseFloat(n.getAttribute("x")??"0"),o=parseFloat(n.getAttribute("y")??"0"),c=parseFloat(n.getAttribute("width")??"0"),h=parseFloat(n.getAttribute("height")??"0");if(!c||!h)continue;return{element:n,points:[[r,o],[r+c,o],[r+c,o+h],[r,o+h],[r,o]],shapeType:"rect"}}default:continue}return null}function WA(t){const e=[];for(let n=0;n<t.length;n++){const r=e[e.length-1]??[0,0],o=t[n];switch(o[0]){case"M":case"L":e.push([o[1],o[2]]);continue;case"C":e.push(...jA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]},{x:o[5],y:o[6]}).map(c=>[c.x,c.y]).slice(1));continue;case"Q":e.push(...UA({x:r[0],y:r[1]},{x:o[1],y:o[2]},{x:o[3],y:o[4]}).map(c=>[c.x,c.y]).slice(1));continue}}return e}function VA(t){const e={};if(t.hasAttribute("fill")?(e.fill=t.getAttribute("fill"),t.removeAttribute("fill")):t.style.fill&&(e.fill=t.style.fill),e.fill){const r=v1.exec(e.fill);r&&(e.fillOpacity=parseFloat(r[4]),e.fill=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}if(t.hasAttribute("fill-opacity")?(e.fillOpacity=parseFloat(t.getAttribute("fill-opacity")),t.removeAttribute("fill-opacity")):t.style.fillOpacity&&(e.fillOpacity=parseFloat(t.style.fillOpacity)),t.hasAttribute("stroke")?(e.stroke=t.getAttribute("stroke"),t.removeAttribute("stroke")):t.style.stroke&&(e.stroke=t.style.stroke),e.stroke){const r=v1.exec(e.stroke);r&&(e.strokeOpacity=parseFloat(r[4]),e.stroke=`rgb(${r[1]}, ${r[2]}, ${r[3]})`)}t.hasAttribute("stroke-opacity")?(e.strokeOpacity=parseFloat(t.getAttribute("stroke-opacity")),t.removeAttribute("stroke-opacity")):t.style.strokeOpacity&&(e.strokeOpacity=parseFloat(t.style.strokeOpacity)),t.hasAttribute("stroke-width")?(e.strokeWidth=t.getAttribute("stroke-width"),t.removeAttribute("stroke-width")):t.style.strokeWidth&&(e.strokeWidth=t.style.strokeWidth),t.hasAttribute("stroke-dasharray")?(e.strokeDasharray=t.getAttribute("stroke-dasharray"),t.removeAttribute("stroke-dasharray")):t.style.strokeDasharray&&(e.strokeDasharray=t.style.strokeDasharray);let n=t;for(;n.tagName.toLowerCase()!=="svg";)if(n=n.parentElement,n===null)throw new Error("Could not find root SVG element");return{svg:n.outerHTML,style:Object.keys(e).length>0?e:void 0}}function $A(t){return!!t&&t.type==="iiif:ImageApiSelector"&&t.type==="iiif:ImageApiSelector"}function wr(t){if(t.iiifRenderingHints){const e=t.iiifRenderingHints;if(e.rotation){const n=qA(e.rotation);if(n)if(t.selectors.length)for(const r of t.selectors)r.rotation=n;else t.selectors.push({type:"RotationSelector",rotation:n})}}else delete t.iiifRenderingHints;return t}function qA(t){let e=parseFloat(t);return e&&t.startsWith("!")&&(e=360-e),e&&(e=e%360),e!==e?0:e||0}function Ku(t,e={}){if(Array.isArray(t))return Ku(t[0]);if(typeof t=="string"){const[n,r]=t.split("#");return r?Ku({type:"SpecificResource",source:{id:n,type:"Unknown"},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{id:n,type:e.typeMap&&e.typeMap[n]||"Unknown"},selector:null,selectors:[]}}if(t.type==="Choice"||t.type==="List"||t.type==="Composite"||t.type==="Independents")return Ku(t.items[0]);if(t.type==="SpecificResource"){t.source.type==="Canvas"&&t.source.partOf&&typeof t.source.partOf=="string"&&(t.source.partOf=[{id:t.source.partOf,type:"Manifest"}]);const{selector:n,selectors:r}=t.selector?cd(t.selector,e):{selector:null,selectors:[]};return{type:"SpecificResource",source:t.source,selector:n,selectors:r}}if(t.id){t.type==="Canvas"&&t.partOf&&typeof t.partOf=="string"&&(t.partOf=[{id:t.partOf,type:"Manifest"}]);const[n,r]=t.id.split("#");return r?Ku({type:"SpecificResource",source:{...t,id:n},selector:{type:"FragmentSelector",value:r}}):{type:"SpecificResource",source:{...t,id:n},selector:null,selectors:[]}}return{type:"SpecificResource",source:t,selector:null,selectors:[]}}var YA=Object.defineProperty,QA=(t,e,n)=>e in t?YA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,g1=(t,e,n)=>(QA(t,typeof e!="symbol"?e+"":e,n),n);function GA(t){return Array.isArray(t)?t:t?[t]:[]}const y1=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];function XA(t){if(typeof t>"u"||t===null)throw new Error("Null or undefined is not a valid entity.");if(Array.isArray(t))throw new Error("Array is not a valid entity");if(typeof t!="object")throw new Error(`${typeof t} is not a valid entity`);if(typeof t["@type"]=="string"){const e=y1.indexOf(t["@type"]);if(e!==-1)return y1[e]}if(t.profile)return"Service";if(t.format||t["@type"])return"ContentResource";throw new Error("Resource type is not known")}class Zp{constructor(e,n={}){g1(this,"traversals"),g1(this,"options"),this.traversals={collection:[],manifest:[],canvas:[],annotationList:[],sequence:[],annotation:[],contentResource:[],choice:[],range:[],service:[],layer:[],...e},this.options={convertPropsToArray:!0,mergeMemberProperties:!0,allowUndefinedReturn:!1,...n}}static all(e){return new Zp({collection:[e],manifest:[e],canvas:[e],annotationList:[e],sequence:[e],annotation:[e],contentResource:[e],choice:[e],range:[e],service:[e],layer:[e]})}traverseCollection(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCollectionItems(e))),this.traversals.collection)}traverseCollectionItems(e){if(this.options.mergeMemberProperties){const n=[...(e.manifests||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Manifest"}:r),...(e.collections||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Collection"}:r),...e.members||[]];delete e.collections,delete e.manifests,e.members=n}return e.manifests&&(e.manifests=e.manifests.map(n=>this.traverseManifest(typeof n=="string"?{"@id":n,"@type":"sc:Manifest"}:n))),e.collections&&(e.collections=e.collections.map(n=>this.traverseCollection(typeof n=="string"?{"@id":n,"@type":"sc:Collection"}:n))),e.members&&(e.members=e.members.map(n=>typeof n=="string"?n:this.traverseUnknown(n))),e}traverseManifest(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseManifestItems(e))),this.traversals.manifest)}traverseManifestItems(e){return e.sequences&&(e.sequences=e.sequences.map(n=>this.traverseSequence(n))),e.structures&&(e.structures=e.structures.map(n=>this.traverseRange(n))),e}traverseSequence(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseSequenceItems(e))),this.traversals.sequence)}traverseSequenceItems(e){return e.canvases&&(e.canvases=e.canvases.map(n=>this.traverseCanvas(n))),e}traverseCanvas(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCanvasItems(e))),this.traversals.canvas)}traverseCanvasItems(e){return e.images&&(e.images=e.images.map(n=>this.traverseAnnotation(n))),e.otherContent&&(e.otherContent=e.otherContent.map(n=>this.traverseAnnotationList(n))),e}traverseRange(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseRangeItems(e))),this.traversals.range)}traverseRangeItems(e){if(this.options.mergeMemberProperties){const n=[...(e.ranges||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Range"}:r),...(e.canvases||[]).map(r=>typeof r=="string"?{"@id":r,"@type":"sc:Canvas"}:r),...e.members||[]];delete e.ranges,delete e.canvases,e.members=n.length?n.map(r=>this.traverseUnknown(r)):void 0}return e}traverseAnnotationList(e){const n=typeof e=="string"?{"@id":e,"@type":"sc:AnnotationList"}:e;return this.traverseType(this.traverseDescriptive(this.traverseAnnotationListItems(n)),this.traversals.annotationList)}traverseAnnotationListItems(e){return e.resources&&(e.resources=e.resources.map(n=>this.traverseAnnotation(n))),e}traverseAnnotation(e){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseAnnotationItems(e))),this.traversals.annotation)}traverseAnnotationItems(e){return e.resource&&(Array.isArray(e.resource)?e.resource=e.resource.map(n=>this.traverseContentResource(n)):e.resource=this.traverseContentResource(e.resource)),e.on,e}traverseLayer(e){return this.traverseType(this.traverseLinking(this.traverseLayerItems(e)),this.traversals.layer)}traverseLayerItems(e){return e.otherContent&&(e.otherContent=e.otherContent.map(n=>this.traverseAnnotationList(n))),e}traverseChoice(e){return this.traverseType(this.traverseChoiceItems(e),this.traversals.choice)}traverseChoiceItems(e){return e.default&&e.default!=="rdf:nil"&&(e.default=this.traverseContentResource(e.default)),e.item&&e.item!=="rdf:nil"&&(e.item=e.item.map(n=>this.traverseContentResource(n))),e}traverseService(e){return this.traverseType(this.traverseLinking(e),this.traversals.service)}traverseContentResource(e){return e["@type"]==="oa:Choice"?this.traverseChoice(e):this.traverseType(this.traverseDescriptive(this.traverseLinking(e)),this.traversals.contentResource)}traverseUnknown(e){if(!e["@type"]||typeof e=="string")return e;switch(XA(e)){case"sc:Collection":return this.traverseCollection(e);case"sc:Manifest":return this.traverseManifest(e);case"sc:Canvas":return this.traverseCanvas(e);case"sc:Sequence":return this.traverseSequence(e);case"sc:Range":return this.traverseRange(e);case"oa:Annotation":return this.traverseAnnotation(e);case"sc:AnnotationList":return this.traverseAnnotationList(e);case"sc:Layer":return this.traverseLayer(e);case"Service":return this.traverseService(e);case"oa:Choice":return this.traverseChoice(e);case"ContentResource":return this.traverseContentResource(e)}return e.profile?this.traverseService(e):e}traverseImageResource(e){const n=Array.isArray(e),r=Array.isArray(e)?e:[e],o=[];for(const c of r)typeof c=="string"?o.push(this.traverseContentResource({"@id":c,"@type":"dctypes:Image"})):o.push(this.traverseContentResource(c));return!n&&!this.options.convertPropsToArray?o[0]:o}traverseDescriptive(e){return e.thumbnail&&(e.thumbnail=this.traverseImageResource(e.thumbnail)),e.logo&&(e.logo=this.traverseImageResource(e.logo)),e}traverseOneOrMoreServices(e){const n=Array.isArray(e),r=Array.isArray(e)?e:[e],o=[];for(const c of r)o.push(this.traverseService(c));return!n&&!this.options.convertPropsToArray?o[0]:o}traverseLinking(e){return e.related&&(e.related=this.traverseOneOrManyType(e.related,this.traversals.contentResource)),e.rendering&&(e.rendering=this.traverseOneOrManyType(e.rendering,this.traversals.contentResource)),e.service&&(e.service=this.traverseOneOrMoreServices(e.service)),e.seeAlso&&(e.seeAlso=this.traverseOneOrManyType(e.seeAlso,this.traversals.contentResource)),e.within&&(typeof e.within=="string"||(e.within=this.traverseOneOrManyType(e.within,this.traversals.contentResource))),e.startCanvas&&(typeof e.startCanvas=="string"?e.startCanvas=this.traverseType({"@id":e.startCanvas,"@type":"sc:Canvas"},this.traversals.canvas):e.startCanvas&&this.traverseType(e.startCanvas,this.traversals.canvas)),e.contentLayer&&(typeof e.contentLayer=="string"?e.contentLayer=this.traverseLayer({"@id":e.contentLayer,"@type":"sc:Layer"}):e.contentLayer=this.traverseLayer(e.contentLayer)),e}traverseOneOrManyType(e,n){if(!Array.isArray(e))if(this.options.convertPropsToArray)e=[e];else return this.traverseType(e,n);return e.map(r=>this.traverseType(r,n))}traverseType(e,n){return n.reduce((r,o)=>{const c=o(r);return typeof c>"u"&&!this.options.allowUndefinedReturn?r:c},e)}}const KA="http://library.stanford.edu/iiif/image-api/compliance.html#level0",S1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",b1="http://library.stanford.edu/iiif/image-api/compliance.html#level2",ZA="http://library.stanford.edu/iiif/image-api/conformance.html#level0",x1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",E1="http://library.stanford.edu/iiif/image-api/conformance.html#level2",JA="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",w1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",T1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",eM="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",C1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",R1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",tM="http://iiif.io/api/image/1/level0.json",nM="http://iiif.io/api/image/1/profiles/level0.json",A1="http://iiif.io/api/image/1/level1.json",M1="http://iiif.io/api/image/1/profiles/level1.json",O1="http://iiif.io/api/image/1/level2.json",D1="http://iiif.io/api/image/1/profiles/level2.json",iM="http://iiif.io/api/image/2/level0.json",rM="http://iiif.io/api/image/2/profiles/level0.json",L1="http://iiif.io/api/image/2/level1.json",P1="http://iiif.io/api/image/2/profiles/level1.json",k1="http://iiif.io/api/image/2/level2.json",z1="http://iiif.io/api/image/2/profiles/level2.json",sM="level0",N1="level1",_1="level2",aM="http://iiif.io/api/image/2/level0",U1="http://iiif.io/api/image/2/level1",j1="http://iiif.io/api/image/2/level2",oM=[U1,j1,S1,b1,x1,E1,w1,T1,C1,R1,A1,M1,O1,D1,L1,P1,k1,z1,N1,_1],lM=[aM,U1,j1,KA,S1,b1,ZA,x1,E1,JA,w1,T1,eM,C1,R1,tM,nM,A1,M1,O1,D1,iM,rM,L1,P1,k1,z1,sM,N1,_1];function bs(t){for(const e in t)(typeof t[e]>"u"||t[e]===null)&&delete t[e];return t}const Jp={attributionLabel:"Attribution",lang:"none",providerId:"http://example.org/provider",providerName:"Unknown"};function Ba(t,e="none"){if(!t)return{};const n=Array.isArray(t)?t:[t],r={};for(const o of n){if(typeof o=="string"){r[e]=r[e]?r[e]:[],r[e].push(o||"");continue}if(!o["@language"]){r[e]=r[e]?r[e]:[],r[e].push(o["@value"]||"");continue}const c=o["@language"];r[c]=r[c]?r[c]:[],r[c].push(o["@value"]||"")}return r}function I1(t){if(Array.isArray(t))return I1(t.find(e=>typeof e=="string"));if(lM.indexOf(t)!==-1)return"level2";if(oM.indexOf(t)!==-1)return"level1";if(typeof t=="string")return t}function uM(t){const e=Array.isArray(t)?t:[t];for(const n of e)switch(n){case"http://iiif.io/api/image/2/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2":return"ImageService2";case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":return"ImageService1";case"http://iiif.io/api/annex/openannotation/context.json":return"ImageApiSelector"}}function cM(t){switch(t){case"http://iiif.io/api/image/2/level0.json":case"http://iiif.io/api/image/2/level1.json":case"http://iiif.io/api/image/2/level2.json":return"ImageService2";case"http://iiif.io/api/auth/1/kiosk":case"http://iiif.io/api/auth/1/login":case"http://iiif.io/api/auth/1/clickthrough":case"http://iiif.io/api/auth/1/external":case"http://iiif.io/api/auth/0/kiosk":case"http://iiif.io/api/auth/0/login":case"http://iiif.io/api/auth/0/clickthrough":case"http://iiif.io/api/auth/0/external":return"AuthCookieService1";case"http://iiif.io/api/auth/1/token":case"http://iiif.io/api/auth/0/token":return"AuthTokenService1";case"http://iiif.io/api/auth/1/logout":case"http://iiif.io/api/auth/0/logout":return"AuthLogoutService1";case"http://iiif.io/api/search/1/search":case"http://iiif.io/api/search/0/search":return"SearchService1";case"http://iiif.io/api/search/1/autocomplete":case"http://iiif.io/api/search/0/autocomplete":return"AutoCompleteService1"}}function F1(t){for(const e of["sc","oa","dcterms","dctypes","iiif"])if(t.startsWith(`${e}:`))return t.slice(e.length+1);return t}const fM=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function ev(t){const e=t["@id"]||t.id;let n=t["@type"]||t.type;const r=t.profile||void 0,o=t["@context"]||void 0;if(r){const c=cM(r);if(c)return c}if(o){const c=uM(o);if(c)return c}if(n){if(Array.isArray(n)){if(n.indexOf("oa:CssStylesheet")!==-1)return"CssStylesheet";if(n.indexOf("cnt:ContentAsText")!==-1)return"TextualBody";n=n[0]}for(const c of["sc","oa","dcterms","dctypes","iiif"])if(n.startsWith(`${c}:`)){n=n.slice(c.length+1);break}switch(n){case"Layer":return"AnnotationCollection";case"AnnotationList":return"AnnotationPage";case"cnt:ContentAsText":return"TextualBody"}}if(n&&fM.indexOf(n)!==-1)return n;if(t.format){if(t.format.startsWith("image/"))return"Image";if(t.format.startsWith("text/")||t.format==="application/pdf")return"Text";if(t.format.startsWith("application/"))return"Dataset"}return e&&(e.endsWith(".jpg")||e.endsWith(".png")||e.endsWith(".jpeg"))?"Image":n||"unknown"}const dM=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function hM(t){const e=t.match(dM);return e?e[0]:t}function pM(t,e="Rights/License",n="none"){let r=null;const o=[],c=Array.isArray(t)?t:[t];for(const h of c){const v=h?hM(h):void 0;if(v&&(v.indexOf("creativecommons.org")!==-1||v.indexOf("rightsstatements.org")!==-1)){v.startsWith("https://")?r=`http://${v.slice(8)}`:r=v;continue}v&&o.push({label:{[n]:[e]},value:{[n]:[v]}})}return[r,o]}const vM=["http://iiif.io/api/presentation/2/context.json","http://iiif.io/api/image/2/context.json","http://iiif.io/api/image/1/context.json","http://library.stanford.edu/iiif/image-api/1.1/context.json","http://iiif.io/api/search/1/context.json","http://iiif.io/api/search/0/context.json","http://iiif.io/api/auth/1/context.json","http://iiif.io/api/auth/0/context.json","http://iiif.io/api/annex/openannotation/context.json"];function mM(t){if(t){const e=Array.isArray(t)?t:[t],n=[];for(const r of e)r==="http://iiif.io/api/presentation/2/context.json"&&n.push("http://iiif.io/api/presentation/3/context.json"),vM.indexOf(r)===-1&&n.push(r);if(e.length)return n.length===1?n[0]:n}}function gM(t){return t?t.map(e=>({label:Ba(e.label),value:Ba(e.value)})):[]}let B1=0;function H1(t,e){const n=encodeURI(t.id||t["@id"]||"").trim();return n&&e?`${n}/${e}`:n||(B1++,`http://example.org/${t["@type"]}${e?`/${e}`:""}/${B1}`)}function xs(t){const e=[...t.behavior||[]];t.viewingHint&&e.push(t.viewingHint);let n;return Array.isArray(t.motivation)?n=t.motivation.map(F1):t.motivation&&(n=F1(t.motivation)),{"@context":t["@context"]?mM(t["@context"]):void 0,id:(t["@id"]||H1(t)).trim(),type:ev(t),behavior:e.length?e:void 0,height:t.height?t.height:void 0,width:t.width?t.width:void 0,motivation:n,viewingDirection:t.viewingDirection,profile:t.profile,format:t.format?t.format:void 0,duration:void 0,timeMode:void 0}}function Es(t){const[e,n]=pM(t.license),r=[...t.metadata?gM(t.metadata):[],...n];return{rights:e,metadata:r.length?r:void 0,label:t.label?Ba(t.label):void 0,requiredStatement:t.attribution?{label:Ba(Jp.attributionLabel),value:Ba(t.attribution)}:void 0,navDate:t.navDate,summary:t.description?Ba(t.description):void 0,thumbnail:yM(t.thumbnail)}}function yM(t){return t&&(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?{id:e,type:"Image"}:(e.type==="unknown"&&(e.type="Image"),e))}function SM(t){if(!t.within)return;const e=Array.isArray(t.within)?t.within:[t.within],n=[];for(const r of e)if(typeof r=="string"){if(r)switch(t["@type"]){case"sc:Manifest":n.push({id:r,type:"Collection"});break}}else r["@id"]&&n.push({id:r["@id"],type:ev(r)});return n.length?n:void 0}function na(t){const e=t.related?Array.isArray(t.related)?t.related:[t.related]:[],n=t.contentLayer;return{provider:t.logo||e.length?[{id:Jp.providerId,type:"Agent",homepage:e.length?[e[0]]:void 0,logo:t.logo?Array.isArray(t.logo)?t.logo:[t.logo]:void 0,label:Ba(Jp.providerName)}]:void 0,partOf:SM(t),rendering:t.rendering,seeAlso:t.seeAlso,start:t.startCanvas,service:t.service?GA(t.service):void 0,supplementary:n?[n]:void 0}}function bM(t){return{chars:t.chars,format:t.format?t.format:void 0,language:t.language}}function xM(t){return bs({...xs(t),...Es(t),...na(t),items:t.members})}function EM(t){const e=[],n=[];let r;for(const c of t.sequences||[])c.canvases.length&&e.push(...c.canvases),c.behavior&&n.push(...c.behavior),c.startCanvas&&(r=c.startCanvas);const o=xs(t);return n.length&&(o.behavior?o.behavior.push(...n):o.behavior=n),bs({...o,...Es(t),...na(t),start:r,items:e,structures:t.structures})}function wM(t){return bs({...xs(t),...Es(t),...na(t),annotations:t.otherContent&&t.otherContent.length?t.otherContent:void 0,items:t.images&&t.images.length?[{id:H1(t,"annotation-page"),type:"AnnotationPage",items:t.images}]:void 0})}function TM(t){return bs({...xs(t),...Es(t),...na(t),items:t.resources&&t.resources.length?t.resources:void 0})}function CM(t){return!t.canvases||t.canvases.length===0?{canvases:[],behavior:[]}:{canvases:t.canvases,behavior:t.viewingHint?[t.viewingHint]:[],startCanvas:t.startCanvas}}function RM(t){function e(n){if(Array.isArray(n)){if(n.length>1)return{type:"List",items:n.map(e)};n=n[0]}if(typeof n=="string")return encodeURI(n).trim();if("@type"in n){let r;if(typeof n.full=="string")r=n.full;else if(n.full["@type"]==="dctypes:Image")r={id:n.full["@id"],type:"Image"};else if(n.full["@type"]==="sc:Canvas")r={id:n.full["@id"],type:"Canvas"};else throw new Error(`Unsupported source type on annotation: ${n.full["@type"]}`);return{type:"SpecificResource",source:r,selector:nv(n.selector)}}else return encodeURI(n["@id"]).trim()}return bs({...xs(t),...Es(t),...na(t),target:e(t.on),body:Array.isArray(t.resource)?t.resource.map(tv):tv(t.resource)})}function tv(t){const e=t;return bs({...xs(e),...Es(e),...na(e),...bM(e)})}function AM(t){const e=[];return t.default&&t.default!=="rdf:nil"&&e.push(t.default),t.item&&t.item!=="rdf:nil"&&e.push(...t.item),{...xs(t),...Es(t),items:e}}function MM(t){return bs({...xs(t),...Es(t),...na(t),items:t.members})}function OM(t){const{"@id":e,"@type":n,"@context":r,profile:o,...c}=t,h={};return e&&(h["@id"]=e),h["@type"]=ev(t),h["@type"]==="unknown"&&(r&&r.length&&(h["@context"]=r),h["@type"]="Service"),o&&(h.profile=I1(o)),bs({...h,...c})}function DM(t){return bs({...xs(t),...Es(t),...na(t)})}new Zp({collection:[xM],manifest:[EM],canvas:[wM],annotationList:[TM],sequence:[CM],annotation:[RM],contentResource:[tv],choice:[AM],range:[MM],service:[OM],layer:[DM]});function nv(t){if((Array.isArray(t["@type"])&&t["@type"].includes("oa:SvgSelector")||t["@type"]=="oa:SvgSelector")&&("chars"in t||"value"in t))return{type:"SvgSelector",value:"chars"in t?t.chars:t.value};if(t["@type"]==="oa:FragmentSelector")return{type:"FragmentSelector",value:t.value};if(t["@type"]==="oa:Choice")return[nv(t.default),...(Array.isArray(t.item)?t.item:[t.item]).map(nv)];if(t["@type"]=="iiif:ImageApiSelector")return{type:"ImageApiSelector",region:"region"in t?t.region:void 0,rotation:"rotation"in t?t.rotation:void 0};throw new Error(`Unsupported selector type: ${t["@type"]}`)}var W1={exports:{}};(function(t,e){var n=Object.defineProperty,r=(c,h,v)=>h in c?n(c,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):c[h]=v,o=(c,h,v)=>(r(c,typeof h!="symbol"?h+"":h,v),v);(function(c,h){h(e)})(RA,function(c){const h="http://library.stanford.edu/iiif/image-api/compliance.html#level1",v="http://library.stanford.edu/iiif/image-api/compliance.html#level2",g="http://library.stanford.edu/iiif/image-api/conformance.html#level1",x="http://library.stanford.edu/iiif/image-api/conformance.html#level2",m="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",w="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",A="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",k="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",M="http://iiif.io/api/image/1/level1.json",_="http://iiif.io/api/image/1/profiles/level1.json",L="http://iiif.io/api/image/1/level2.json",P="http://iiif.io/api/image/1/profiles/level2.json",O="http://iiif.io/api/image/2/level1.json",H="http://iiif.io/api/image/2/profiles/level1.json",q="http://iiif.io/api/image/2/level2.json",Q="http://iiif.io/api/image/2/profiles/level2.json",B="level1",J="level2",ie="http://iiif.io/api/image/2/level1",$="http://iiif.io/api/image/2/level2",re=[ie,$,h,v,g,x,m,w,A,k,M,_,L,P,O,H,q,Q,B,J],me=["http://iiif.io/api/image/2/level0",ie,$,"http://library.stanford.edu/iiif/image-api/compliance.html#level0",h,v,"http://library.stanford.edu/iiif/image-api/conformance.html#level0",g,x,"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",m,w,"http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",A,k,"http://iiif.io/api/image/1/level0.json","http://iiif.io/api/image/1/profiles/level0.json",M,_,L,P,"http://iiif.io/api/image/2/level0.json","http://iiif.io/api/image/2/profiles/level0.json",O,H,q,Q,"level0",B,J],Re=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];class Se{constructor(z,X={}){o(this,"traversals"),o(this,"options"),this.traversals={collection:[],manifest:[],canvas:[],annotationList:[],sequence:[],annotation:[],contentResource:[],choice:[],range:[],service:[],layer:[],...z},this.options={convertPropsToArray:!0,mergeMemberProperties:!0,allowUndefinedReturn:!1,...X}}static all(z){return new Se({collection:[z],manifest:[z],canvas:[z],annotationList:[z],sequence:[z],annotation:[z],contentResource:[z],choice:[z],range:[z],service:[z],layer:[z]})}traverseCollection(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCollectionItems(z))),this.traversals.collection)}traverseCollectionItems(z){if(this.options.mergeMemberProperties){const X=[...(z.manifests||[]).map(ye=>typeof ye=="string"?{"@id":ye,"@type":"sc:Manifest"}:ye),...(z.collections||[]).map(ye=>typeof ye=="string"?{"@id":ye,"@type":"sc:Collection"}:ye),...z.members||[]];delete z.collections,delete z.manifests,z.members=X}return z.manifests&&(z.manifests=z.manifests.map(X=>this.traverseManifest(typeof X=="string"?{"@id":X,"@type":"sc:Manifest"}:X))),z.collections&&(z.collections=z.collections.map(X=>this.traverseCollection(typeof X=="string"?{"@id":X,"@type":"sc:Collection"}:X))),z.members&&(z.members=z.members.map(X=>typeof X=="string"?X:this.traverseUnknown(X))),z}traverseManifest(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseManifestItems(z))),this.traversals.manifest)}traverseManifestItems(z){return z.sequences&&(z.sequences=z.sequences.map(X=>this.traverseSequence(X))),z.structures&&(z.structures=z.structures.map(X=>this.traverseRange(X))),z}traverseSequence(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseSequenceItems(z))),this.traversals.sequence)}traverseSequenceItems(z){return z.canvases&&(z.canvases=z.canvases.map(X=>this.traverseCanvas(X))),z}traverseCanvas(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCanvasItems(z))),this.traversals.canvas)}traverseCanvasItems(z){return z.images&&(z.images=z.images.map(X=>this.traverseAnnotation(X))),z.otherContent&&(z.otherContent=z.otherContent.map(X=>this.traverseAnnotationList(X))),z}traverseRange(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseRangeItems(z))),this.traversals.range)}traverseRangeItems(z){if(this.options.mergeMemberProperties){const X=[...(z.ranges||[]).map(ye=>typeof ye=="string"?{"@id":ye,"@type":"sc:Range"}:ye),...(z.canvases||[]).map(ye=>typeof ye=="string"?{"@id":ye,"@type":"sc:Canvas"}:ye),...z.members||[]];delete z.ranges,delete z.canvases,z.members=X.length?X.map(ye=>this.traverseUnknown(ye)):void 0}return z}traverseAnnotationList(z){const X=typeof z=="string"?{"@id":z,"@type":"sc:AnnotationList"}:z;return this.traverseType(this.traverseDescriptive(this.traverseAnnotationListItems(X)),this.traversals.annotationList)}traverseAnnotationListItems(z){return z.resources&&(z.resources=z.resources.map(X=>this.traverseAnnotation(X))),z}traverseAnnotation(z){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseAnnotationItems(z))),this.traversals.annotation)}traverseAnnotationItems(z){return z.resource&&(Array.isArray(z.resource)?z.resource=z.resource.map(X=>this.traverseContentResource(X)):z.resource=this.traverseContentResource(z.resource)),z.on,z}traverseLayer(z){return this.traverseType(this.traverseLinking(this.traverseLayerItems(z)),this.traversals.layer)}traverseLayerItems(z){return z.otherContent&&(z.otherContent=z.otherContent.map(X=>this.traverseAnnotationList(X))),z}traverseChoice(z){return this.traverseType(this.traverseChoiceItems(z),this.traversals.choice)}traverseChoiceItems(z){return z.default&&z.default!=="rdf:nil"&&(z.default=this.traverseContentResource(z.default)),z.item&&z.item!=="rdf:nil"&&(z.item=z.item.map(X=>this.traverseContentResource(X))),z}traverseService(z){return this.traverseType(this.traverseLinking(z),this.traversals.service)}traverseContentResource(z){return z["@type"]==="oa:Choice"?this.traverseChoice(z):this.traverseType(this.traverseDescriptive(this.traverseLinking(z)),this.traversals.contentResource)}traverseUnknown(z){if(!z["@type"]||typeof z=="string")return z;switch(function(X){if(X==null)throw new Error("Null or undefined is not a valid entity.");if(Array.isArray(X))throw new Error("Array is not a valid entity");if(typeof X!="object")throw new Error(typeof X+" is not a valid entity");if(typeof X["@type"]=="string"){const ye=Re.indexOf(X["@type"]);if(ye!==-1)return Re[ye]}if(X.profile)return"Service";if(X.format||X["@type"])return"ContentResource";throw new Error("Resource type is not known")}(z)){case"sc:Collection":return this.traverseCollection(z);case"sc:Manifest":return this.traverseManifest(z);case"sc:Canvas":return this.traverseCanvas(z);case"sc:Sequence":return this.traverseSequence(z);case"sc:Range":return this.traverseRange(z);case"oa:Annotation":return this.traverseAnnotation(z);case"sc:AnnotationList":return this.traverseAnnotationList(z);case"sc:Layer":return this.traverseLayer(z);case"Service":return this.traverseService(z);case"oa:Choice":return this.traverseChoice(z);case"ContentResource":return this.traverseContentResource(z)}return z.profile?this.traverseService(z):z}traverseImageResource(z){const X=Array.isArray(z),ye=Array.isArray(z)?z:[z],at=[];for(const Ve of ye)typeof Ve=="string"?at.push(this.traverseContentResource({"@id":Ve,"@type":"dctypes:Image"})):at.push(this.traverseContentResource(Ve));return X||this.options.convertPropsToArray?at:at[0]}traverseDescriptive(z){return z.thumbnail&&(z.thumbnail=this.traverseImageResource(z.thumbnail)),z.logo&&(z.logo=this.traverseImageResource(z.logo)),z}traverseOneOrMoreServices(z){const X=Array.isArray(z),ye=Array.isArray(z)?z:[z],at=[];for(const Ve of ye)at.push(this.traverseService(Ve));return X||this.options.convertPropsToArray?at:at[0]}traverseLinking(z){return z.related&&(z.related=this.traverseOneOrManyType(z.related,this.traversals.contentResource)),z.rendering&&(z.rendering=this.traverseOneOrManyType(z.rendering,this.traversals.contentResource)),z.service&&(z.service=this.traverseOneOrMoreServices(z.service)),z.seeAlso&&(z.seeAlso=this.traverseOneOrManyType(z.seeAlso,this.traversals.contentResource)),z.within&&(typeof z.within=="string"||(z.within=this.traverseOneOrManyType(z.within,this.traversals.contentResource))),z.startCanvas&&(typeof z.startCanvas=="string"?z.startCanvas=this.traverseType({"@id":z.startCanvas,"@type":"sc:Canvas"},this.traversals.canvas):z.startCanvas&&this.traverseType(z.startCanvas,this.traversals.canvas)),z.contentLayer&&(typeof z.contentLayer=="string"?z.contentLayer=this.traverseLayer({"@id":z.contentLayer,"@type":"sc:Layer"}):z.contentLayer=this.traverseLayer(z.contentLayer)),z}traverseOneOrManyType(z,X){if(!Array.isArray(z)){if(!this.options.convertPropsToArray)return this.traverseType(z,X);z=[z]}return z.map(ye=>this.traverseType(ye,X))}traverseType(z,X){return X.reduce((ye,at)=>{const Ve=at(ye);return Ve!==void 0||this.options.allowUndefinedReturn?Ve:ye},z)}}function Fe(j){for(const z in j)j[z]!==void 0&&j[z]!==null||delete j[z];return j}const ke="Attribution",Xe="http://example.org/provider",ft="Unknown";function Te(j,z="none"){if(!j)return{};const X=Array.isArray(j)?j:[j],ye={};for(const at of X){if(typeof at=="string"){ye[z]=ye[z]?ye[z]:[],ye[z].push(at||"");continue}if(!at["@language"]){ye[z]=ye[z]?ye[z]:[],ye[z].push(at["@value"]||"");continue}const Ve=at["@language"];ye[Ve]=ye[Ve]?ye[Ve]:[],ye[Ve].push(at["@value"]||"")}return ye}function it(j){return Array.isArray(j)?it(j.find(z=>typeof z=="string")):me.indexOf(j)!==-1?"level2":re.indexOf(j)!==-1?"level1":typeof j=="string"?j:void 0}function ue(j){for(const z of["sc","oa","dcterms","dctypes","iiif"])if(j.startsWith(`${z}:`))return j.slice(z.length+1);return j}const se=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function je(j){const z=j["@id"]||j.id;let X=j["@type"]||j.type;const ye=j.profile||void 0,at=j["@context"]||void 0;if(ye){const Ve=function(gn){switch(gn){case"http://iiif.io/api/image/2/level0.json":case"http://iiif.io/api/image/2/level1.json":case"http://iiif.io/api/image/2/level2.json":return"ImageService2";case"http://iiif.io/api/auth/1/kiosk":case"http://iiif.io/api/auth/1/login":case"http://iiif.io/api/auth/1/clickthrough":case"http://iiif.io/api/auth/1/external":case"http://iiif.io/api/auth/0/kiosk":case"http://iiif.io/api/auth/0/login":case"http://iiif.io/api/auth/0/clickthrough":case"http://iiif.io/api/auth/0/external":return"AuthCookieService1";case"http://iiif.io/api/auth/1/token":case"http://iiif.io/api/auth/0/token":return"AuthTokenService1";case"http://iiif.io/api/auth/1/logout":case"http://iiif.io/api/auth/0/logout":return"AuthLogoutService1";case"http://iiif.io/api/search/1/search":case"http://iiif.io/api/search/0/search":return"SearchService1";case"http://iiif.io/api/search/1/autocomplete":case"http://iiif.io/api/search/0/autocomplete":return"AutoCompleteService1"}}(ye);if(Ve)return Ve}if(at){const Ve=function(gn){const zi=Array.isArray(gn)?gn:[gn];for(const be of zi)switch(be){case"http://iiif.io/api/image/2/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2":return"ImageService2";case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":return"ImageService1";case"http://iiif.io/api/annex/openannotation/context.json":return"ImageApiSelector"}}(at);if(Ve)return Ve}if(X){if(Array.isArray(X)){if(X.indexOf("oa:CssStylesheet")!==-1)return"CssStylesheet";if(X.indexOf("cnt:ContentAsText")!==-1)return"TextualBody";X=X[0]}for(const Ve of["sc","oa","dcterms","dctypes","iiif"])if(X.startsWith(`${Ve}:`)){X=X.slice(Ve.length+1);break}switch(X){case"Layer":return"AnnotationCollection";case"AnnotationList":return"AnnotationPage";case"cnt:ContentAsText":return"TextualBody"}}if(X&&se.indexOf(X)!==-1)return X;if(j.format){if(j.format.startsWith("image/"))return"Image";if(j.format.startsWith("text/")||j.format==="application/pdf")return"Text";if(j.format.startsWith("application/"))return"Dataset"}return z&&(z.endsWith(".jpg")||z.endsWith(".png")||z.endsWith(".jpeg"))?"Image":X||"unknown"}const qe=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function ct(j){const z=j.match(qe);return z?z[0]:j}const dt=["http://iiif.io/api/presentation/2/context.json","http://iiif.io/api/image/2/context.json","http://iiif.io/api/image/1/context.json","http://library.stanford.edu/iiif/image-api/1.1/context.json","http://iiif.io/api/search/1/context.json","http://iiif.io/api/search/0/context.json","http://iiif.io/api/auth/1/context.json","http://iiif.io/api/auth/0/context.json","http://iiif.io/api/annex/openannotation/context.json"];function rn(j){if(j){const z=Array.isArray(j)?j:[j],X=[];for(const ye of z)ye==="http://iiif.io/api/presentation/2/context.json"&&X.push("http://iiif.io/api/presentation/3/context.json"),dt.indexOf(ye)===-1&&X.push(ye);if(z.length)return X.length===1?X[0]:X}}let Xt=0;function wt(j,z){const X=encodeURI(j.id||j["@id"]||"").trim();return X&&z?`${X}/${z}`:X||(Xt++,`http://example.org/${j["@type"]}${z?`/${z}`:""}/${Xt}`)}function ht(j){const z=[...j.behavior||[]];let X;return j.viewingHint&&z.push(j.viewingHint),Array.isArray(j.motivation)?X=j.motivation.map(ue):j.motivation&&(X=ue(j.motivation)),{"@context":j["@context"]?rn(j["@context"]):void 0,id:(j["@id"]||wt(j)).trim(),type:je(j),behavior:z.length?z:void 0,height:j.height?j.height:void 0,width:j.width?j.width:void 0,motivation:X,viewingDirection:j.viewingDirection,profile:j.profile,format:j.format?j.format:void 0,duration:void 0,timeMode:void 0}}function Ut(j){const[z,X]=function(Ve,gn="Rights/License",zi="none"){let be=null;const ot=[],ci=Array.isArray(Ve)?Ve:[Ve];for(const Dt of ci){const tt=Dt?ct(Dt):void 0;!tt||tt.indexOf("creativecommons.org")===-1&&tt.indexOf("rightsstatements.org")===-1?tt&&ot.push({label:{[zi]:[gn]},value:{[zi]:[tt]}}):be=tt.startsWith("https://")?`http://${tt.slice(8)}`:tt}return[be,ot]}(j.license),ye=[...j.metadata?(at=j.metadata,at?at.map(Ve=>({label:Te(Ve.label),value:Te(Ve.value)})):[]):[],...X];var at;return{rights:z,metadata:ye.length?ye:void 0,label:j.label?Te(j.label):void 0,requiredStatement:j.attribution?{label:Te(ke),value:Te(j.attribution)}:void 0,navDate:j.navDate,summary:j.description?Te(j.description):void 0,thumbnail:jt(j.thumbnail)}}function jt(j){return j&&(Array.isArray(j)?j:[j]).map(z=>typeof z=="string"?{id:z,type:"Image"}:(z.type==="unknown"&&(z.type="Image"),z))}function Ie(j){if(!j.within)return;const z=Array.isArray(j.within)?j.within:[j.within],X=[];for(const ye of z)typeof ye=="string"?ye&&j["@type"]==="sc:Manifest"&&X.push({id:ye,type:"Collection"}):ye["@id"]&&X.push({id:ye["@id"],type:je(ye)});return X.length?X:void 0}function We(j){const z=j.related?Array.isArray(j.related)?j.related:[j.related]:[],X=j.contentLayer;return{provider:j.logo||z.length?[{id:Xe,type:"Agent",homepage:z.length?[z[0]]:void 0,logo:j.logo?Array.isArray(j.logo)?j.logo:[j.logo]:void 0,label:Te(ft)}]:void 0,partOf:Ie(j),rendering:j.rendering,seeAlso:j.seeAlso,start:j.startCanvas,service:j.service?(ye=j.service,Array.isArray(ye)?ye:ye?[ye]:[]):void 0,supplementary:X?[X]:void 0};var ye}function Qe(j){const z=j;return Fe({...ht(z),...Ut(z),...We(z),...(X=z,{chars:X.chars,format:X.format?X.format:void 0,language:X.language})});var X}const St=new Se({collection:[function(j){return Fe({...ht(j),...Ut(j),...We(j),items:j.members})}],manifest:[function(j){const z=[],X=[];let ye;for(const Ve of j.sequences||[])Ve.canvases.length&&z.push(...Ve.canvases),Ve.behavior&&X.push(...Ve.behavior),Ve.startCanvas&&(ye=Ve.startCanvas);const at=ht(j);return X.length&&(at.behavior?at.behavior.push(...X):at.behavior=X),Fe({...at,...Ut(j),...We(j),start:ye,items:z,structures:j.structures})}],canvas:[function(j){return Fe({...ht(j),...Ut(j),...We(j),annotations:j.otherContent&&j.otherContent.length?j.otherContent:void 0,items:j.images&&j.images.length?[{id:wt(j,"annotation-page"),type:"AnnotationPage",items:j.images}]:void 0})}],annotationList:[function(j){return Fe({...ht(j),...Ut(j),...We(j),items:j.resources&&j.resources.length?j.resources:void 0})}],sequence:[function(j){return j.canvases&&j.canvases.length!==0?{canvases:j.canvases,behavior:j.viewingHint?[j.viewingHint]:[],startCanvas:j.startCanvas}:{canvases:[],behavior:[]}}],annotation:[function(j){return Fe({...ht(j),...Ut(j),...We(j),target:function z(X){if(Array.isArray(X)){if(X.length>1)return{type:"List",items:X.map(z)};X=X[0]}if(typeof X=="string")return encodeURI(X).trim();if("@type"in X){let ye;if(typeof X.full=="string")ye=X.full;else if(X.full["@type"]==="dctypes:Image")ye={id:X.full["@id"],type:"Image"};else{if(X.full["@type"]!=="sc:Canvas")throw new Error(`Unsupported source type on annotation: ${X.full["@type"]}`);ye={id:X.full["@id"],type:"Canvas"}}return{type:"SpecificResource",source:ye,selector:bt(X.selector)}}return encodeURI(X["@id"]).trim()}(j.on),body:Array.isArray(j.resource)?j.resource.map(Qe):Qe(j.resource)})}],contentResource:[Qe],choice:[function(j){const z=[];return j.default&&j.default!=="rdf:nil"&&z.push(j.default),j.item&&j.item!=="rdf:nil"&&z.push(...j.item),{...ht(j),...Ut(j),items:z}}],range:[function(j){return Fe({...ht(j),...Ut(j),...We(j),items:j.members})}],service:[function(j){const{"@id":z,"@type":X,"@context":ye,profile:at,...Ve}=j,gn={};return z&&(gn["@id"]=z),gn["@type"]=je(j),gn["@type"]==="unknown"&&(ye&&ye.length&&(gn["@context"]=ye),gn["@type"]="Service"),at&&(gn.profile=it(at)),Fe({...gn,...Ve})}],layer:[function(j){return Fe({...ht(j),...Ut(j),...We(j)})}]});function bt(j){if((Array.isArray(j["@type"])&&j["@type"].includes("oa:SvgSelector")||j["@type"]=="oa:SvgSelector")&&("chars"in j||"value"in j))return{type:"SvgSelector",value:"chars"in j?j.chars:j.value};if(j["@type"]==="oa:FragmentSelector")return{type:"FragmentSelector",value:j.value};if(j["@type"]==="oa:Choice")return[bt(j.default),...(Array.isArray(j.item)?j.item:[j.item]).map(bt)];if(j["@type"]=="iiif:ImageApiSelector")return{type:"ImageApiSelector",region:"region"in j?j.region:void 0,rotation:"rotation"in j?j.rotation:void 0};throw new Error(`Unsupported selector type: ${j["@type"]}`)}const zn=function(j){return j&&j["@context"]&&(j["@context"]==="http://iiif.io/api/presentation/2/context.json"||j["@context"].indexOf("http://iiif.io/api/presentation/2/context.json")!==-1||j["@context"]==="http://www.shared-canvas.org/ns/context.json")||j["@context"]==="http://iiif.io/api/image/2/context.json"?St.traverseUnknown(j):j};c.upgrade=zn,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})(W1,W1.exports);function LM(t){return t.type==="SpecificResource"?[t.source,{selector:t.selector}]:[t,{selector:null}]}function iv(t,e){const{selector:n,source:r}=Ku(e);if(r.id!==t.id)return[null,r];const o={type:"BoxSelector",spatial:{x:0,y:0,width:Number(t.width),height:Number(t.height)}};return[n?n.type==="TemporalSelector"?{type:"TemporalBoxSelector",temporal:n.temporal,spatial:o.spatial}:n:null,r]}const V1={makeChoice:()=>{}},fd={type:"unknown"},Mn=t=>({type:"unknown",reason:t,annotations:{pages:[]}}),$1=(t,e)=>({type:"empty",width:t,height:e,annotations:{pages:[]},image:null,images:[]});function PM(t,e){var r;const n=(r=t==null?void 0:t.iiif)==null?void 0:r.meta[e];return n?n.annotationPageManager:null}function kM(t,e){return Zn(n=>{const r=[];if(!t)return r;const o=Object.keys(n.iiif.entities.AnnotationPage);for(const c of o)if(!e||e.indexOf(c)!==-1){const h=PM(n,c);h&&h.views&&h.views[t]&&r.push(c)}return r},[t,e])}function q1({canvas:t,manifest:e,all:n,canvases:r}){const o=[];if(e)for(const c of e.annotations)o.indexOf(c.id)===-1&&o.push(c.id);if(n){if(r&&r.length)for(const c of r)for(const h of c.annotations)o.indexOf(h.id)===-1&&o.push(h.id)}else if(t)for(const c of t.annotations)o.indexOf(c.id)===-1&&o.push(c.id);return o}function zM(t,e){var r;const n=(r=t==null?void 0:t.iiif)==null?void 0:r.meta[e];return n?n.annotationPageManager:null}function Y1(t,e={}){const n=kn(),r=ea(),o=$r(),c=Up(),h=C.useMemo(()=>q1({all:e.all,manifest:r,canvas:o,canvases:c}),[e.all,o,c,r]),v=kM(t,e.all?void 0:h),g=C.useCallback(m=>{t&&n.setMetaValue([m,"annotationPageManager","views"],w=>w&&!w[t]?w:{...w||{},[t]:!1})},[t,n]),x=C.useCallback((m,w={})=>{if(!t)return;const A=n.getState(),k=[];if(w!=null&&w.deselectOthers){const M=Object.keys(A.iiif.entities.AnnotationPage);for(const _ of M){const L=zM(A,_);L&&L.views&&L.views[t]&&k.push(_)}}for(const M of k)g(M);n.setMetaValue([m,"annotationPageManager","views"],M=>M&&M[t]?M:{...M||{},[t]:!0})},[t,g,n]);return{availablePageIds:h,enabledPageIds:v,setPageEnabled:x,setPageDisabled:g}}function Q1(t,e){return Zn((n,r)=>r.get(t.map(o=>({id:o,type:e}))),[t,e])}const G1=C.createContext(new ka.ImageServiceLoader);function dd(){return C.useContext(G1)}function X1(){const t=dd(),[e,n]=C.useState({}),r=C.useRef(!1);return C.useEffect(()=>()=>{r.current=!0},[]),[C.useCallback((c,{height:h,width:v})=>{if(c){const g=c.id||c["@id"],x=t.loadServiceSync({id:g,width:c.width||v,height:c.height||h,source:c});x?c=x:e[g]||(r.current||n(m=>({...m,[g]:"loading"})),t.loadService({id:g,width:c.width||v,height:c.height||h}).then(()=>{r.current||n(m=>({...m,[g]:"done"}))}))}return c},[t,e]),e]}function hd(t={}){const e=Yp(),n=$r(t.canvasId?{id:t.canvasId}:void 0);return Zn((r,o)=>{if(!n)return[];if(e&&t.enableSingleAnnotation)return[e];const c=o.get(n.items),h=[];for(const v of c)h.push(...o.get(v.items));return h},[n])}function NM(t){return t.type==="SpecificResource"?[t.source,{selector:t.selector}]:[t,{selector:null}]}const pd={},K1={get(t){return t},setMetaValue([t,e,n],r){const o=K1.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;pd[t]={...pd[t]||{},[e]:{...(pd[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=pd[t];if(n)return e?n[e]:n}};function _M(t=K1){function e(o){const c=o?typeof o=="string"?t.get(o):o:null;if(!c)return[];const h=t.get(c.items,{parent:c}),v=[];for(const g of h)v.push(...t.get(g.items,{parent:g}));return v}function n(o,c=[]){const h=Array.isArray(o)?o:e(o),v=[];let g=null;const x=[];for(const m of h){if(m.type!=="Annotation")throw new Error("getPaintables() accept either a canvas or list of annotations");const w=Array.from(Array.isArray(m.body)?m.body:[m.body]);for(const A of w){const[k,{selector:M}]=NM(A),_=t.get(k),L=(_.type||"unknown").toLowerCase();if(L==="choice"){const P=t.get(_.items,{parent:_.id}),O=c.length?c.map(H=>P.find(q=>q.id===H)).filter(Boolean):[P[0]];O.length===0&&O.push(P[0]),g={type:"single-choice",items:P.map(H=>({id:H.id,label:H.label,selected:O.indexOf(H)!==-1})),label:k.label},w.push(...O);continue}v.indexOf(L)===-1&&v.push(L),x.push({type:L,annotationId:m.id,resource:_,target:m.target,selector:M})}}return{types:v,items:x,choice:g}}function r(o){const{choice:c}=n(o);return c}return{getAllPaintingAnnotations:e,getPaintables:n,extractChoices:r}}function Z1(t,e=[]){const n=kn(),r=C.useMemo(()=>_M(n),[]),o=hd({enableSingleAnnotation:t==null?void 0:t.enableSingleAnnotation}),[c,h]=C.useState((t==null?void 0:t.defaultChoices)||[]),v=C.useMemo(()=>r.getPaintables(o,c),[n,o,c,...e]),x={makeChoice:C.useCallback((m,{deselectOthers:w=!0,deselect:A=!1}={})=>{if(v.choice){if(v.choice.type!=="single-choice")throw new Error("Complex choice not supported yet");h(k=>{if(A){const _=k.filter(L=>L!==m);if(_.length===0){const L=v.items[0].resource.id;return L?[L]:[]}return _}if(w)return[m];const M=[...k];if(M.length===0&&v.items.length){const _=v.items[0].resource.id;_&&M.push(_)}return k.indexOf(m)!==-1?k:[...k,m]})}},[v.choice])};return[v,x]}const UM=["model/gltf-binary"];function J1(t,e){const r=e.items[0].resource;return r.format?UM.indexOf(r.format)===-1?Mn(`3D format: ${r.format} is unsupported`):{type:"3d-model",model:r}:Mn("Unknown format")}function jM(t,e){var r;if(!t.duration)return Mn("No duration on canvas");if(e.items.length>1)return Mn("Only one audio source supported");const n=(r=e.items[0])==null?void 0:r.resource;return n?n.format?{type:"media",media:{annotationId:e.items[0].annotationId,duration:t.duration,url:n.id,type:"Sound",target:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}},format:n.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}}},annotations:{pages:[]}}:Mn("Audio does not have format"):Mn("Unknown audio")}function eS(t,e,n){const r=[];for(const o of e.items){const c=o.resource&&o.resource.type==="SpecificResource"?o.resource.source:o.resource;if(!c.id)return Mn("No resource Identifier");let h;if(c.service){const k=ka.getImageServices(c);k[0]&&(h=n(k[0],t))}const v={type:"BoxSelector",spatial:{x:0,y:0,width:Number(t.width),height:Number(t.height)}},[g,x]=iv(t,o.target);if(x.id!==t.id)continue;o.resource.width&&o.resource.height&&(o.resource.width,o.resource.height);let m=o.resource.type==="SpecificResource"?ta(o.resource):null;if(o.selector){const k=ta({type:"SpecificResource",source:o.resource,selector:o.selector});k&&(m=k)}const w=m&&m.selector&&(m.selector.type==="BoxSelector"||m.selector.type==="TemporalBoxSelector")?{type:"BoxSelector",spatial:{x:m.selector.spatial.x,y:m.selector.spatial.y,width:m.selector.spatial.width,height:m.selector.spatial.height}}:void 0;h&&!h.id&&(h.id=h["@id"]);const A={id:c.id,type:"Image",annotationId:o.annotationId,width:Number(g||w?c.width:t.width),height:Number(g||w?c.height:t.height),service:h,sizes:h&&h.sizes?h.sizes:c.width&&c.height?[{width:c.width,height:c.height}]:[],target:g&&g.type!=="PointSelector"?g:v,selector:w};r.push(A)}return{type:"images",image:r[0],images:r,choice:e.choice}}function tS(t,e={},n){const r=t.language||n||"none";switch(t.type){case"TextualBody":{typeof t.value<"u"&&(e[r]=t.value);break}case"List":case"Composite":case"Choice":t.items&&t.items.forEach(o=>tS(o,e,r))}return e}function nS(t,e){const n=[];return e.items.forEach(r=>{if(r.resource){const[o]=iv(t,r.target);n.push({annotationId:r.annotationId,text:tS(r.resource),target:o})}}),{type:"textual-content",items:n}}const IM=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/)|(?:(?:watch)?\?vi?=|&vi?=))([^#&?]*).*/;function iS(t,e){var h;const n=e.items.filter(v=>v.type==="video");if(!t.duration)return Mn("No duration on canvas");if(n.length>1)return Mn("Only one video source supported");const r=(h=n[0])==null?void 0:h.resource,o=!!(r.service||[]).find(v=>(v.profile||"").includes("youtube.com"));if(!r)return Mn("Unknown video");if((!r.format||r.format==="text/html")&&!o)return Mn("Video does not have format");const c={annotationId:e.items[0].annotationId,duration:t.duration,url:r.id,type:"Video",items:[],target:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}},format:r.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}}};if(o){c.type="VideoYouTube";const v=r.id.match(IM);if(!v[1])return Mn("Video is not known youtube video");c.youTubeId=v[1]}return{type:"media",media:c,annotations:{pages:[]}}}function rS({canvas:t,paintables:e,supports:n,loadImageService:r}){if(!t)return console.log("No canvas"),fd;if(e.types.length===0)return n.indexOf("empty")!==-1?$1(t.width,t.height):(console.log("No paintables"),fd);if(e.types.length!==1)if(e.types.length===2&&e.types.indexOf("text")!==-1)e.types=e.types.filter(c=>c!=="text");else return n.indexOf("complex-timeline")===-1?Mn("Complex timeline not supported"):Mn("ComplexTimelineStrategy not yet supported");const o=e.types[0];return o==="image"?n.indexOf("images")===-1?Mn("Image not supported"):eS(t,e,r):o==="Model"||o==="model"?n.indexOf("3d-model")===-1?Mn("3D not supported"):J1(t,e):o==="textualbody"?n.indexOf("textual-content")===-1?Mn("Textual content not supported"):nS(t,e):o==="sound"||o==="audio"?n.indexOf("media")===-1?Mn("Media not supported"):jM(t,e):o==="video"?n.indexOf("media")===-1?Mn("Media not supported"):iS(t,e):fd}function sS(t){const e=ea(),n=$r(),r=kn(),[o,c]=X1(),{enabledPageIds:h}=Y1((t==null?void 0:t.annotationPageManagerId)||(e==null?void 0:e.id)||(n==null?void 0:n.id),{all:!1}),v=Q1(h,"AnnotationPage"),g=(t==null?void 0:t.strategies)||["empty","images","media","textual-content","complex-timeline"],[x,m]=Z1(t,[c]),w=C.useMemo(()=>rS({canvas:n,paintables:x,supports:g,loadImageService:o}),[n,x,r,m.makeChoice]);return C.useMemo(()=>w.type==="unknown"?[w,V1]:[{...w,annotations:{pages:v}},m],[w,v])}const aS=(t,e=[])=>{const n=kn();C.useEffect(()=>{t(n)},[n,...e])},vd={},oS={get(t){return t},setMetaValue([t,e,n],r){const o=oS.getResourceMeta(t,e),c=o?o[n]:void 0,h=typeof r=="function"?r(c):r;vd[t]={...vd[t]||{},[e]:{...(vd[t]||{})[e]||{},[n]:h}}},getResourceMeta:(t,e)=>{const n=vd[t];if(n)return e?n[e]:n}},FM=new ka.ImageServiceLoader;function BM(t=oS,e={}){const n=e.imageServiceLoader||FM;async function r(o,c,h=!1,v=[],g){const x=()=>n.getThumbnailFromResource(void 0,c,h,v);if(!o)return await n.getThumbnailFromResource(void 0,c,h,v);if(typeof o=="string"){const w=ka.getFixedSizeFromImage(o);return w&&v.push(w),await n.getThumbnailFromResource(void 0,c,h,v)}const m=t.get(o,{skipSelfReturn:!1});if(typeof m=="string")return{best:ka.getFixedSizeFromImage(m),fallback:[],log:[]};if(!m)return await x();switch(await(async w=>{if(w&&w.thumbnail&&w.thumbnail.length){const A=t.get(w.thumbnail[0]),k=await n.getImageCandidates(A,h);k&&k.length&&v.push(...k)}})(m),m.type){case"Annotation":{const w=Array.isArray(m.body)?m.body:[m.body],A=t.get(w[0]);return g&&!A.width&&(A.width=g.width,A.height=g.height),await n.getThumbnailFromResource(A,c,h,v)}case"Canvas":{const w=m;return r(w.items[0],c,h,v,{width:w.width,height:w.height})}case"AnnotationPage":return r(m.items[0],c,h,v,g);case"Choice":{const w=m;return!w.items||w.items[0]?await x():r(w.items[0],c,h,v,g)}case"Collection":{const w=m.items[0];return w?r(w,c,h,v,g):await x()}case"Manifest":{const w=m.items[0];return w?r(w,c,h,v,g):await x()}case"SpecificResource":case"Image":case"Dataset":case"Sound":case"Text":case"TextualBody":case"Video":return g&&!m.width&&(m.width=g.width,m.height=g.height),n.getThumbnailFromResource(m,c,h,v)}return await x()}return{getBestThumbnailAtSize:r}}function lS(t,e,{canvasId:n,manifestId:r}={}){const o=kn(),c=dd(),h=C.useMemo(()=>BM(o,{imageServiceLoader:c}),[o,c]),[v,g]=C.useState(),x=ea(r?{id:r}:void 0),m=$r(n?{id:n}:void 0),w=m||x,A=C.useRef(!1);if(C.useEffect(()=>(A.current=!1,()=>{A.current=!0}),[]),!w)throw new Error("Must be called under a manifest or canvas context.");return aS(k=>{h.getBestThumbnailAtSize(w,t,e).then(M=>{M.best&&!A.current&&g(M.best)})},[w]),v}function HM(t){return{isMuted:!1,playRequested:!1,isPlaying:!1,isFinished:!1,volume:100,duration:t}}function WM(t,e){switch(e.type){case"FINISHED":return{...t,isFinished:!0,isPlaying:!1,playRequested:!1};case"PLAY_PAUSE":return{...t,isFinished:!1,isPlaying:!t.isPlaying};case"PLAY_REQUESTED":return{...t,isFinished:!1,playRequested:!0};case"PAUSE":return{...t,isPlaying:!1};case"PLAY":return{...t,isFinished:!1,playRequested:!1,isPlaying:!0};case"MUTE":return{...t,isMuted:!0};case"SET_VOLUME":return{...t,volume:e.volume,isMuted:e.volume===0};case"TOGGLE_MUTE":return{...t,isMuted:!t.isMuted};case"UNMUTE":return{...t,isMuted:!1}}return t}function uS(t){const e=Math.round(t);return`${Math.floor(e/60)}:${`${e%60}`.padStart(2,"0")}`}function md(t){const[e,n]=C.useReducer(WM,HM(t.duration)),r=C.useRef(null),o=C.useRef(null),c=C.useRef(null),h=C.useRef(!1),v=C.useCallback(()=>{o.current&&r.current&&(o.current.innerHTML=uS(r.current.currentTime),c.current&&(c.current.style.width=`${r.current.currentTime/t.duration*100}%`),h.current!==r.current.muted&&(h.current=r.current.muted,n(r.current.muted?{type:"MUTE"}:{type:"UNMUTE"})))},[t.duration]),g=C.useCallback(()=>{r.current&&(n({type:"PLAY_REQUESTED"}),r.current.play().then(()=>{n({type:"PLAY"})}),v())},[v]),x=C.useCallback(()=>{r.current&&(r.current.duration>0&&r.current.paused?g():m())},[v]),m=C.useCallback(()=>{r.current&&(r.current.pause(),n({type:"PAUSE"}),v())},[v]),w=C.useCallback(()=>{r.current&&(r.current.muted=!r.current.muted,n(r.current.muted?{type:"MUTE"}:{type:"UNMUTE"}))},[]),A=C.useCallback(()=>{r.current&&(r.current.muted=!0,n({type:"MUTE"}))},[]),k=C.useCallback(()=>{r.current&&(r.current.muted=!1,n({type:"UNMUTE"}))},[]),M=C.useCallback(P=>{r.current&&(r.current.muted=!1,r.current.volume=P/100,n({type:"SET_VOLUME",volume:P}))},[]),_=C.useCallback(P=>{r.current&&(r.current.currentTime=Math.max(0,Math.min(P*t.duration,t.duration)),v())},[]),L=C.useCallback(P=>{r.current&&(r.current.currentTime=Math.max(0,Math.min(P,t.duration)),v())},[]);return C.useEffect(()=>{const P=setInterval(()=>{v()},350);return()=>clearInterval(P)},[v,t.duration]),C.useEffect(()=>{const P=()=>{n({type:"FINISHED"})},O=r.current;return O==null||O.addEventListener("ended",P),()=>O==null?void 0:O.removeEventListener("ended",P)},[]),[{element:r,currentTime:o,progress:c},e,{play:g,pause:m,playPause:x,mute:A,unmute:k,toggleMute:w,setVolume:M,setDurationPercent:_,setTime:L}]}const cS=C.createContext(null),fS=C.createContext(null),dS=C.createContext(null);function VM(){const t=C.useContext(cS);if(!t)throw new Error("Ctx not found");return t}function $M(){const t=C.useContext(fS);if(!t)throw new Error("Ctx not found");return t}function qM(){const t=C.useContext(dS);if(!t)throw new Error("Ctx not found");return t}function rv({actions:t,state:e,children:n,currentTime:r,progress:o,element:c}){return le.jsx(dS.Provider,{value:{currentTime:r,progress:o,element:c},children:le.jsx(fS.Provider,{value:t,children:le.jsx(cS.Provider,{value:e,children:n})})})}function hS({media:t,children:e}){const[{element:n,currentTime:r,progress:o},c,h]=md({duration:t.duration});return le.jsxs(rv,{state:c,actions:h,currentTime:r,progress:o,element:n,children:[le.jsx("audio",{ref:n,src:t.url}),e]})}function pS({media:t,mediaControlsDeps:e,children:n}){return fl("portal","audio",hS,{media:t,children:n},[t,...e||[]]),null}function vS({element:t,media:e,playPause:n}){return le.jsxs("div",{className:"video-container",part:"video-container",onClick:n,children:[le.jsx("style",{children:`
345
345
  .video-container {
346
346
  position: absolute;
347
347
  top: 0;
@@ -387,5 +387,5 @@ No matching component was found for:
387
387
  width: 100%;
388
388
  object-fit: contain;
389
389
  }
390
- `}),le.jsx("iframe",{className:"video-yt",ref:r,src:`https://www.youtube.com/embed/${e.youTubeId}?enablejsapi=1&origin=${window.location.host}`,referrerPolicy:"no-referrer",sandbox:"allow-scripts allow-same-origin allow-presentation"})]}):null}function XM({media:t,mediaControlsDeps:e,children:n}){const[{element:r,currentTime:o,progress:c},h,v]=md({duration:t.duration});return fl("overlay","video-element",GM,{element:r,media:t,playPause:v.playPause}),null}function AS({x:t,y:e,onChoiceChange:n,registerActions:r,defaultChoices:o,isStatic:c,renderViewerControls:h,renderMediaControls:v,viewControlsDeps:g,mediaControlsDeps:x,strategies:m,throwOnUnknown:w,backgroundStyle:A,alwaysShowBackground:P,keepCanvasScale:M=!1,enableSizes:_=!1,enableYouTube:L=!0,onClickPaintingAnnotation:k,children:O}){const I=$r(),q=Hp(I,["deep-zoom"]),[te]=Y0(),H=G0(),J=kn(),re=C.useMemo(()=>Vp(J),[J]),[$,se]=sS({strategies:m||["images"],defaultChoices:o==null?void 0:o.map(({id:Z})=>Z)}),ge=$.type==="images"?$.choice:void 0,Ce=C.useMemo(()=>M?1:Math.max(1,...$.type==="images"?$.images.map(Z=>{var Ue;return(Z.width||0)/((Ue=Z.target)==null?void 0:Ue.spatial.width)}):[]),[M,$]);QR(Ce),C.useEffect(()=>{r&&r(se)},[$.annotations]),C.useEffect(()=>{if(o)for(const Z of o)typeof Z.opacity<"u"&&re.applyStyles({id:Z.id},"atlas",{opacity:Z.opacity})},[o]),C.useLayoutEffect(()=>{n&&n(ge)},[ge]),fl(H&&($.type==="images"||$.type==="empty"||$.type==="textual-content"&&h)?"overlay":"none",`canvas-portal-controls-${I==null?void 0:I.id}`,sd.Provider,h?{value:H||null,children:h($)}:{},[I,H,$,...g||[]]);const me=lS({maxWidth:256,maxHeight:256});if(!I)return null;const Ie=I.accompanyingCanvas,_e=me&&me.type==="fixed"?le.jsx("world-object",{height:I.height,width:I.width,x:t,y:e,children:le.jsx("world-image",{uri:me.id,target:{x:0,y:0,width:I.width,height:I.height},display:me.width&&me.height?{width:me.width,height:me.height}:void 0,crop:void 0})}):null;if($.type==="unknown"){if(_e)return _e;if(w)throw new Error($.reason||"Unknown image strategy");return null}const Ye=le.jsxs(C.Fragment,{children:[te?le.jsx(Qp,{page:te}):null,$.annotations&&$.annotations.pages?$.annotations.pages.map(Z=>le.jsx(Qp,{page:Z},Z.id)):null,O]}),gt=$.type==="images"?$.images.length:0;return le.jsxs(le.Fragment,{children:[le.jsxs("world-object",{height:I.height,width:I.width,x:t,y:e,...q,children:[$.type==="empty"||P?le.jsx(SS,{style:A}):null,$.type==="textual-content"?$.items.map((Z,Ue)=>{var dt;return le.jsxs(le.Fragment,{children:[le.jsx(kp,{onClick:k?pe=>{pe.stopPropagation(),k(Z.annotationId,Z,pe)}:void 0,target:((dt=Z.target)==null?void 0:dt.spatial)||void 0,children:le.jsx("div",{"data-textual-content":!0,children:le.jsx(RS,{enableDangerouslySetInnerHTML:!0,children:Z.text})})},Ue),Ye]})}):null,$.type==="images"?le.jsxs(le.Fragment,{children:[$.images.map((Z,Ue)=>le.jsx(f1,{isStatic:c,image:Z,id:Z.id,thumbnail:Ue===0?me:void 0,selector:Z.selector,enableSizes:_,onClick:k?dt=>{dt.stopPropagation(),k(Z.annotationId,Z,dt)}:void 0},Z.id+Ue)),Ye]}):null,$.type==="3d-model"?le.jsx(yS,{model:$.model}):null,$.type==="media"?le.jsx(le.Fragment,{children:$.media.type==="Sound"?le.jsxs(pS,{media:$.media,mediaControlsDeps:x,children:[_e,v?v($):null]}):$.media.type==="Video"?le.jsxs(mS,{media:$.media,mediaControlsDeps:x,children:[_e,v?v($):null]}):$.media.type==="VideoYouTube"&&L?le.jsxs(XM,{media:$.media,mediaControlsDeps:x,children:[_e,v?v($):null]}):null}):null]},`${I.id}/${$.type}/${gt}`),$.type==="media"&&$.media.type==="Sound"&&Ie?le.jsx(rd,{canvas:Ie.id,children:le.jsx(AS,{renderViewerControls:h})}):null]})}function MS(){const t=C.useContext(Bu);return t&&t.vault?t.vault:cf.globalVault()}const KM=C.forwardRef(function(e,n){const r=ea(),o=Up(),c=F0(),{ViewerControls:h,MediaControls:v}=e.components||{};if(C.useImperativeHandle(n,()=>c,[c]),!r)return le.jsx("div",{});let g=0;return le.jsxs(le.Fragment,{children:[e.header,le.jsx(Si.Viewer,{height:e.height,mode:e.mode,children:o.map((x,m)=>{const w=g;return g+=x.width+(e.spacing||0),le.jsx(rd,{canvas:x.id,children:le.jsx(Si.RenderCanvas,{strategies:["3d-model","media","images","empty","textual-content"],renderViewerControls:m===0&&h?()=>le.jsx(h,{}):void 0,renderMediaControls:m===0&&v?()=>le.jsx(v,{}):void 0,x:w,...e.canvasProps||{},children:e.annotations},x.id)},x.id)})},e.reuseAtlas?"":c.currentSequenceIndex),e.children]})}),Si=C.forwardRef(function({children:e,height:n,annotations:r,canvasProps:o,spacing:c,header:h,components:v,mode:g,...x},m){const w=MS();return le.jsx(Np,{vault:w,children:le.jsx(I0,{...x,children:le.jsx(KM,{ref:m,height:n,components:v,spacing:c,canvasProps:o,annotations:r,header:h,mode:g,children:e})})})});Si.RenderImage=f1,Si.RenderCanvas=AS,Si.RenderAnnotationPage=Qp,Si.RenderAnnotation=u1,Si.Viewer=GR,Si.CanvasBackground=SS,Si.Audio=pS,Si.Video=mS,Si.Model=yS,Si.AudioHTML=hS,Si.VideoHTML=vS,Si.ModelHTML=gS;function ZM({annotation:t,children:e}){return le.jsx(Js,{value:{annotation:t},children:e})}function JM({annotationPage:t,children:e}){return le.jsx(Js,{value:{annotationPage:t},children:e})}function eO({collection:t,children:e}){return le.jsx(Js,{value:{collection:t},children:e})}function tO(t,e={}){return hd(e)}function nO(t,e=!1){}function iO(t){const n=Ss().manifest,r=t?t.map(o=>typeof o=="string"?o:o==null?void 0:o.id):[];return Kn(o=>{const c=n?o.iiif.entities.Manifest[n]:void 0,h=(c==null?void 0:c.items)||[];if(typeof t>"u")return h;const v=[];for(const g of(c==null?void 0:c.items)||[])r.indexOf(g.id)!==-1&&v.push(g);return v},[r.join("/")])}function rO(t,e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.collection,h=Kn(v=>c?v.iiif.entities.Collection[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}function sO(t,e,n,r,o=[]){const c=kn(),h=C.useMemo(()=>e1(c),[c]);C.useEffect(()=>{const v=t;return v?(h.addEventListener(v,e,n,r),()=>{h.removeEventListener(v,e,n)}):()=>{}},[h,t,e,...o])}function aO(t,e){const{id:n,isLoaded:r,error:o,resource:c,requestId:h,cached:v}=_p(t,e);return{id:n,isLoaded:r,error:o,manifest:c,requestId:h,cached:v}}function OS({cacheKey:t}={}){const e=$r(),n=hd(),r=kn(),o=dd(),[c,h]=C.useState(void 0),[v,g]=C.useState(!1),[x,m]=C.useState("idle"),[w,A]=C.useState(void 0),P=e?e.id:"undefined",M=C.useMemo(()=>{try{if(e&&n.length){const L=n[0],k=r.get(L.body[0]),I=ka.getImageServices(k)[0];return I&&o.loadServiceSync({id:I.id||I["@id"],width:I.width||e.width,height:I.height||e.height})||void 0}}catch(L){console.error(L)}},[P,t,e]),_=x==="success"&&c?c:M;return C.useEffect(()=>{(async()=>{try{if(e&&n.length){const L=n[0],k=r.get(L.body[0]),I=ka.getImageServices(k)[0];if(!I)return;g(!0),m("loading");try{const q=await o.loadService({id:I.id||I["@id"],width:I.width||e.width,height:I.height||e.height})||void 0;h(q),m("success"),g(!1)}catch(q){m("error"),A(q)}}}catch(L){m("error"),A(L)}})()},[P,t]),C.useMemo(()=>({data:_,isFetching:v,status:x,error:w}),[_,v,x,w])}function oO(){const t=OS();return{isLoading:t.isFetching,tile:t.data?{id:t.data.id||t.data["@id"],width:t.data.width,height:t.data.height,imageService:t.data,thumbnail:void 0}:null}}function lO(){const t=ea();return t?t.service.find(e=>e.profile==="SearchService1"||e.profile==="http://iiif.io/api/search/1/search"):void 0}function uO(){const t=kn();return C.useMemo(()=>Vp(t),[t])}var pl={},sv,av,Zu=vg;if(process.env.NODE_ENV==="production")av=pl.createRoot=Zu.createRoot,sv=pl.hydrateRoot=Zu.hydrateRoot;else{var yd=Zu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;av=pl.createRoot=function(t,e){yd.usingClientEntryPoint=!0;try{return Zu.createRoot(t,e)}finally{yd.usingClientEntryPoint=!1}},sv=pl.hydrateRoot=function(t,e,n){yd.usingClientEntryPoint=!0;try{return Zu.hydrateRoot(t,e,n)}finally{yd.usingClientEntryPoint=!1}}}const cO=Fx({__proto__:null,get createRoot(){return av},default:pl,get hydrateRoot(){return sv}},[pl]);fe.AnnotationContext=ZM,fe.AnnotationPageContext=JM,fe.CanvasContext=rd,fe.CanvasPanel=Si,fe.CollectionContext=eO,fe.ContextBridge=H0,fe.ImageServiceLoaderContext=G1,fe.InnerViewerProvider=j0,fe.LanguageProvider=YM,fe.LanguageString=ES,fe.LocaleString=RS,fe.ManifestContext=k0,fe.MediaPlayerProvider=rv,fe.RangeContext=z0,fe.ReactVaultContext=Bu,fe.ResourceProvider=Js,fe.ResourceReactContext=id,fe.SimpleViewerProvider=I0,fe.SimpleViewerReactContext=Wu,fe.VaultProvider=Np,fe.ViewerPresetContext=sd,fe.VirtualAnnotationProvider=Q0,fe.VisibleCanvasReactContext=Hu,fe.emptyActions=W1,fe.emptyStrategy=$1,fe.expandTarget=ta,fe.findAllCanvasesInRange=jp,fe.findFirstCanvasFromRange=N0,fe.findManifestSelectedRange=CR,fe.findSelectedRange=Ip,fe.flattenAnnotationPageIds=q1,fe.formatTime=uS,fe.get3dStrategy=J1,fe.getImageStrategy=eS,fe.getManifestSequence=Fp,fe.getParsedTargetSelector=iv,fe.getRenderingStrategy=rS,fe.getTextualContentStrategy=nS,fe.getVideoStrategy=iS,fe.getVisibleCanvasesFromCanvasId=RR,fe.isImageApiSelector=o1,fe.parseRotation=l1,fe.parseSelector=Qu,fe.parseSpecificResource=LM,fe.unknownResponse=fd,fe.unsupportedStrategy=Mn,fe.useAnnotation=Yp,fe.useAnnotationPage=c1,fe.useAnnotationPageManager=Y1,fe.useAnnotationsAtTime=tO,fe.useCanvas=$r,fe.useCanvasClock=nO,fe.useCanvasSequence=U0,fe.useCanvasSubset=iO,fe.useClosestLanguage=TS,fe.useCollection=rO,fe.useContextBridge=B0,fe.useCreateLocaleString=QM,fe.useDispatch=V0,fe.useEventListener=sO,fe.useExistingVault=MS,fe.useExternalCollection=aO,fe.useExternalManifest=P0,fe.useExternalResource=_p,fe.useIIIFLanguage=gd,fe.useImageService=OS,fe.useImageServiceLoader=dd,fe.useImageTile=oO,fe.useLoadImageService=X1,fe.useLocaleString=CS,fe.useManifest=ea,fe.useMediaActions=$M,fe.useMediaElements=qM,fe.useMediaState=WM,fe.usePaintables=Z1,fe.usePaintingAnnotations=hd,fe.useRange=_0,fe.useRenderingStrategy=sS,fe.useResourceContext=Ss,fe.useResourceEvents=Hp,fe.useResources=Q1,fe.useSearchService=lO,fe.useSimpleMediaPlayer=md,fe.useSimpleViewer=F0,fe.useStyleHelper=uO,fe.useStyles=$u,fe.useThumbnail=lS,fe.useVault=kn,fe.useVaultEffect=aS,fe.useVaultSelector=Kn,fe.useViewerPreset=G0,fe.useVirtualAnnotationPage=$0,fe.useVirtualAnnotationPageContext=Y0,fe.useVisibleCanvases=Up,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});
390
+ `}),le.jsx("iframe",{className:"video-yt",ref:r,src:`https://www.youtube.com/embed/${e.youTubeId}?enablejsapi=1&origin=${window.location.host}`,referrerPolicy:"no-referrer",sandbox:"allow-scripts allow-same-origin allow-presentation"})]}):null}function XM({media:t,mediaControlsDeps:e,children:n}){const[{element:r,currentTime:o,progress:c},h,v]=md({duration:t.duration});return fl("overlay","video-element",GM,{element:r,media:t,playPause:v.playPause}),null}function AS({x:t,y:e,onChoiceChange:n,registerActions:r,defaultChoices:o,isStatic:c,renderViewerControls:h,renderMediaControls:v,viewControlsDeps:g,mediaControlsDeps:x,strategies:m,throwOnUnknown:w,backgroundStyle:A,alwaysShowBackground:k,keepCanvasScale:M=!1,enableSizes:_=!1,enableYouTube:L=!0,onClickPaintingAnnotation:P,children:O}){const H=$r(),q=Hp(H,["deep-zoom"]),[Q]=Y0(),B=G0(),J=kn(),ie=C.useMemo(()=>Wp(J),[J]),[$,re]=sS({strategies:m||["images"],defaultChoices:o==null?void 0:o.map(({id:Te})=>Te)}),me=$.type==="images"?$.choice:void 0,Re=C.useMemo(()=>M?1:Math.max(1,...$.type==="images"?$.images.map(Te=>{var it;return(Te.width||0)/((it=Te.target)==null?void 0:it.spatial.width)}):[]),[M,$]);QR(Re),C.useEffect(()=>{r&&r(re)},[$.annotations]),C.useEffect(()=>{if(o)for(const Te of o)typeof Te.opacity<"u"&&ie.applyStyles({id:Te.id},"atlas",{opacity:Te.opacity})},[o]),C.useLayoutEffect(()=>{n&&n(me)},[me]),fl(B&&($.type==="images"||$.type==="empty"||$.type==="textual-content"&&h)?"overlay":"none",`canvas-portal-controls-${H==null?void 0:H.id}`,sd.Provider,h?{value:B||null,children:h($)}:{},[H,B,$,...g||[]]);const Se=lS({maxWidth:256,maxHeight:256});if(!H)return null;const Fe=H.accompanyingCanvas,ke=Se&&Se.type==="fixed"?le.jsx("world-object",{height:H.height,width:H.width,x:t,y:e,children:le.jsx("world-image",{uri:Se.id,target:{x:0,y:0,width:H.width,height:H.height},display:Se.width&&Se.height?{width:Se.width,height:Se.height}:void 0,crop:void 0})}):null;if($.type==="unknown"){if(ke)return ke;if(w)throw new Error($.reason||"Unknown image strategy");return null}const Xe=le.jsxs(C.Fragment,{children:[Q?le.jsx(Qp,{page:Q}):null,$.annotations&&$.annotations.pages?$.annotations.pages.map(Te=>le.jsx(Qp,{page:Te},Te.id)):null,O]}),ft=$.type==="images"?$.images.length:0;return le.jsxs(le.Fragment,{children:[le.jsxs("world-object",{height:H.height,width:H.width,x:t,y:e,...q,children:[$.type==="empty"||k?le.jsx(SS,{style:A}):null,$.type==="textual-content"?$.items.map((Te,it)=>{var ue;return le.jsxs(le.Fragment,{children:[le.jsx(kp,{onClick:P?se=>{se.stopPropagation(),P(Te.annotationId,Te,se)}:void 0,target:((ue=Te.target)==null?void 0:ue.spatial)||void 0,children:le.jsx("div",{"data-textual-content":!0,children:le.jsx(RS,{enableDangerouslySetInnerHTML:!0,children:Te.text})})},it),Xe]})}):null,$.type==="images"?le.jsxs(le.Fragment,{children:[$.images.map((Te,it)=>le.jsx(f1,{isStatic:c,image:Te,id:Te.id,thumbnail:it===0?Se:void 0,selector:Te.selector,enableSizes:_,onClick:P?ue=>{ue.stopPropagation(),P(Te.annotationId,Te,ue)}:void 0},Te.id+it)),Xe]}):null,$.type==="3d-model"?le.jsx(yS,{model:$.model}):null,$.type==="media"?le.jsx(le.Fragment,{children:$.media.type==="Sound"?le.jsxs(pS,{media:$.media,mediaControlsDeps:x,children:[ke,v?v($):null]}):$.media.type==="Video"?le.jsxs(mS,{media:$.media,mediaControlsDeps:x,children:[ke,v?v($):null]}):$.media.type==="VideoYouTube"&&L?le.jsxs(XM,{media:$.media,mediaControlsDeps:x,children:[ke,v?v($):null]}):null}):null]},`${H.id}/${$.type}/${ft}`),$.type==="media"&&$.media.type==="Sound"&&Fe?le.jsx(rd,{canvas:Fe.id,children:le.jsx(AS,{renderViewerControls:h})}):null]})}function MS(){const t=C.useContext(Bu);return t&&t.vault?t.vault:cf.globalVault()}const KM=C.forwardRef(function(e,n){const r=ea(),o=Up(),c=F0(),{ViewerControls:h,MediaControls:v}=e.components||{};if(C.useImperativeHandle(n,()=>c,[c]),!r)return le.jsx("div",{});let g=0;return le.jsxs(le.Fragment,{children:[e.header,le.jsx(bi.Viewer,{height:e.height,mode:e.mode,children:o.map((x,m)=>{const w=g;return g+=x.width+(e.spacing||0),le.jsx(rd,{canvas:x.id,children:le.jsx(bi.RenderCanvas,{strategies:["3d-model","media","images","empty","textual-content"],renderViewerControls:m===0&&h?()=>le.jsx(h,{}):void 0,renderMediaControls:m===0&&v?()=>le.jsx(v,{}):void 0,x:w,...e.canvasProps||{},children:e.annotations},x.id)},x.id)})},e.reuseAtlas?"":c.currentSequenceIndex),e.children]})}),bi=C.forwardRef(function({children:e,height:n,annotations:r,canvasProps:o,spacing:c,header:h,components:v,mode:g,...x},m){const w=MS();return le.jsx(Np,{vault:w,children:le.jsx(I0,{...x,children:le.jsx(KM,{ref:m,height:n,components:v,spacing:c,canvasProps:o,annotations:r,header:h,mode:g,children:e})})})});bi.RenderImage=f1,bi.RenderCanvas=AS,bi.RenderAnnotationPage=Qp,bi.RenderAnnotation=u1,bi.Viewer=GR,bi.CanvasBackground=SS,bi.Audio=pS,bi.Video=mS,bi.Model=yS,bi.AudioHTML=hS,bi.VideoHTML=vS,bi.ModelHTML=gS;function ZM({annotation:t,children:e}){return le.jsx(Js,{value:{annotation:t},children:e})}function JM({annotationPage:t,children:e}){return le.jsx(Js,{value:{annotationPage:t},children:e})}function eO({collection:t,children:e}){return le.jsx(Js,{value:{collection:t},children:e})}function tO(t,e={}){return hd(e)}function nO(t,e=!1){}function iO(t){const n=Ss().manifest,r=t?t.map(o=>typeof o=="string"?o:o==null?void 0:o.id):[];return Zn(o=>{const c=n?o.iiif.entities.Manifest[n]:void 0,h=(c==null?void 0:c.items)||[];if(typeof t>"u")return h;const v=[];for(const g of(c==null?void 0:c.items)||[])r.indexOf(g.id)!==-1&&v.push(g);return v},[r.join("/")])}function rO(t,e=[]){const{id:n,selector:r}=t,o=Ss(),c=n||o.collection,h=Zn(v=>c?v.iiif.entities.Collection[c]:void 0,[c]);return C.useMemo(()=>{if(h)return r?r(h):h},[h,r,...e])}function sO(t,e,n,r,o=[]){const c=kn(),h=C.useMemo(()=>e1(c),[c]);C.useEffect(()=>{const v=t;return v?(h.addEventListener(v,e,n,r),()=>{h.removeEventListener(v,e,n)}):()=>{}},[h,t,e,...o])}function aO(t,e){const{id:n,isLoaded:r,error:o,resource:c,requestId:h,cached:v}=_p(t,e);return{id:n,isLoaded:r,error:o,manifest:c,requestId:h,cached:v}}function OS({cacheKey:t}={}){const e=$r(),n=hd(),r=kn(),o=dd(),[c,h]=C.useState(void 0),[v,g]=C.useState(!1),[x,m]=C.useState("idle"),[w,A]=C.useState(void 0),k=e?e.id:"undefined",M=C.useMemo(()=>{try{if(e&&n.length){const L=n[0],P=r.get(L.body[0]),H=ka.getImageServices(P)[0];return H&&o.loadServiceSync({id:H.id||H["@id"],width:H.width||e.width,height:H.height||e.height})||void 0}}catch(L){console.error(L)}},[k,t,e]),_=x==="success"&&c?c:M;return C.useEffect(()=>{(async()=>{try{if(e&&n.length){const L=n[0],P=r.get(L.body[0]),H=ka.getImageServices(P)[0];if(!H)return;g(!0),m("loading");try{const q=await o.loadService({id:H.id||H["@id"],width:H.width||e.width,height:H.height||e.height})||void 0;h(q),m("success"),g(!1)}catch(q){m("error"),A(q)}}}catch(L){m("error"),A(L)}})()},[k,t]),C.useMemo(()=>({data:_,isFetching:v,status:x,error:w}),[_,v,x,w])}function oO(){const t=OS();return{isLoading:t.isFetching,tile:t.data?{id:t.data.id||t.data["@id"],width:t.data.width,height:t.data.height,imageService:t.data,thumbnail:void 0}:null}}function lO(){const t=ea();return t?t.service.find(e=>e.profile==="SearchService1"||e.profile==="http://iiif.io/api/search/1/search"):void 0}function uO(){const t=kn();return C.useMemo(()=>Wp(t),[t])}var pl={},sv,av,Zu=vg;if(process.env.NODE_ENV==="production")av=pl.createRoot=Zu.createRoot,sv=pl.hydrateRoot=Zu.hydrateRoot;else{var yd=Zu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;av=pl.createRoot=function(t,e){yd.usingClientEntryPoint=!0;try{return Zu.createRoot(t,e)}finally{yd.usingClientEntryPoint=!1}},sv=pl.hydrateRoot=function(t,e,n){yd.usingClientEntryPoint=!0;try{return Zu.hydrateRoot(t,e,n)}finally{yd.usingClientEntryPoint=!1}}}const cO=Fx({__proto__:null,get createRoot(){return av},default:pl,get hydrateRoot(){return sv}},[pl]);de.AnnotationContext=ZM,de.AnnotationPageContext=JM,de.CanvasContext=rd,de.CanvasPanel=bi,de.CollectionContext=eO,de.ContextBridge=H0,de.ImageServiceLoaderContext=G1,de.InnerViewerProvider=j0,de.LanguageProvider=YM,de.LanguageString=ES,de.LocaleString=RS,de.ManifestContext=k0,de.MediaPlayerProvider=rv,de.RangeContext=z0,de.ReactVaultContext=Bu,de.ResourceProvider=Js,de.ResourceReactContext=id,de.SimpleViewerProvider=I0,de.SimpleViewerReactContext=Vu,de.VaultProvider=Np,de.ViewerPresetContext=sd,de.VirtualAnnotationProvider=Q0,de.VisibleCanvasReactContext=Hu,de.emptyActions=V1,de.emptyStrategy=$1,de.expandTarget=ta,de.findAllCanvasesInRange=jp,de.findFirstCanvasFromRange=N0,de.findManifestSelectedRange=CR,de.findSelectedRange=Ip,de.flattenAnnotationPageIds=q1,de.formatTime=uS,de.get3dStrategy=J1,de.getImageStrategy=eS,de.getManifestSequence=Fp,de.getParsedTargetSelector=iv,de.getRenderingStrategy=rS,de.getTextualContentStrategy=nS,de.getVideoStrategy=iS,de.getVisibleCanvasesFromCanvasId=RR,de.isImageApiSelector=o1,de.parseRotation=l1,de.parseSelector=Qu,de.parseSpecificResource=LM,de.unknownResponse=fd,de.unsupportedStrategy=Mn,de.useAnnotation=Yp,de.useAnnotationPage=c1,de.useAnnotationPageManager=Y1,de.useAnnotationsAtTime=tO,de.useCanvas=$r,de.useCanvasClock=nO,de.useCanvasSequence=U0,de.useCanvasSubset=iO,de.useClosestLanguage=TS,de.useCollection=rO,de.useContextBridge=B0,de.useCreateLocaleString=QM,de.useDispatch=W0,de.useEventListener=sO,de.useExistingVault=MS,de.useExternalCollection=aO,de.useExternalManifest=P0,de.useExternalResource=_p,de.useIIIFLanguage=gd,de.useImageService=OS,de.useImageServiceLoader=dd,de.useImageTile=oO,de.useLoadImageService=X1,de.useLocaleString=CS,de.useManifest=ea,de.useMediaActions=$M,de.useMediaElements=qM,de.useMediaState=VM,de.usePaintables=Z1,de.usePaintingAnnotations=hd,de.useRange=_0,de.useRenderingStrategy=sS,de.useResourceContext=Ss,de.useResourceEvents=Hp,de.useResources=Q1,de.useSearchService=lO,de.useSimpleMediaPlayer=md,de.useSimpleViewer=F0,de.useStyleHelper=uO,de.useStyles=$u,de.useThumbnail=lS,de.useVault=kn,de.useVaultEffect=aS,de.useVaultSelector=Zn,de.useViewerPreset=G0,de.useVirtualAnnotationPage=$0,de.useVirtualAnnotationPageContext=Y0,de.useVisibleCanvases=Up,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});
391
391
  //# sourceMappingURL=index.umd.js.map