react-iiif-vault 1.0.7 → 1.0.9
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/.build/types/canvas-panel/Viewer.d.ts +1 -1
- package/.build/types/canvas-panel/index.d.ts +2 -1
- package/.build/types/canvas-panel/render/Audio.d.ts +1 -1
- package/.build/types/canvas-panel/render/Canvas.d.ts +2 -2
- package/.build/types/canvas-panel/render/CanvasBackground.d.ts +1 -1
- package/.build/types/canvas-panel/render/DefaultCanvasFallback.d.ts +1 -1
- package/.build/types/canvas-panel/render/Image.d.ts +1 -1
- package/.build/types/canvas-panel/render/Model.d.ts +1 -1
- package/.build/types/canvas-panel/render/Video.d.ts +1 -1
- package/.build/types/canvas-panel/render/VideoYouTube.d.ts +1 -1
- package/.build/types/components/CanvasAnnotations.d.ts +10 -0
- package/.build/types/components/CombinedMetadata.d.ts +4 -0
- package/.build/types/components/Image.d.ts +15 -0
- package/.build/types/components/ManifestMetadata.d.ts +4 -0
- package/.build/types/components/Metadata.d.ts +39 -0
- package/.build/types/components/SequenceThumbnails.d.ts +29 -0
- package/.build/types/components/SingleCanvasThumbnail.d.ts +20 -0
- package/.build/types/context/AnnotationContext.d.ts +1 -1
- package/.build/types/context/AnnotationPageContext.d.ts +1 -1
- package/.build/types/context/CanvasContext.d.ts +1 -1
- package/.build/types/context/CollectionContext.d.ts +1 -1
- package/.build/types/context/ContextBridge.d.ts +1 -1
- package/.build/types/context/ManifestContext.d.ts +1 -1
- package/.build/types/context/MediaContext.d.ts +1 -1
- package/.build/types/context/RangeContext.d.ts +1 -1
- package/.build/types/context/ResourceContext.d.ts +2 -2
- package/.build/types/context/VaultContext.d.ts +1 -1
- package/.build/types/demo/media-controls.d.ts +1 -1
- package/.build/types/demo/viewer-controls.d.ts +1 -1
- package/.build/types/features/rendering-strategy/3d-strategy.d.ts +1 -1
- package/.build/types/features/rendering-strategy/image-strategy.d.ts +1 -1
- package/.build/types/features/rendering-strategy/resource-types.d.ts +7 -7
- package/.build/types/features/rendering-strategy/strategies.d.ts +5 -5
- package/.build/types/features/rendering-strategy/textual-content-strategy.d.ts +1 -1
- package/.build/types/hooks/useEventListener.d.ts +1 -1
- package/.build/types/hooks/useExternalResource.d.ts +1 -1
- package/.build/types/hooks/useImage.d.ts +10 -0
- package/.build/types/hooks/useLoadImageService.d.ts +1 -1
- package/.build/types/hooks/useRenderingStrategy.d.ts +3 -3
- package/.build/types/hooks/useSimpleMediaPlayer.d.ts +2 -2
- package/.build/types/hooks/useVirtualAnnotationPageContext.d.ts +81 -81
- package/.build/types/index.d.ts +8 -0
- package/.build/types/utility/i18n-utils.d.ts +8 -6
- package/.build/types/viewers/SimpleViewerContext.d.ts +2 -2
- package/.build/types/viewers/SimpleViewerContext.hooks.d.ts +2 -0
- package/.build/types/viewers/SimpleViewerContext.types.d.ts +6 -4
- package/dist/bundle/cjs/index.js +7 -6
- package/dist/bundle/cjs/index.js.map +1 -1
- package/dist/bundle/esm/index.mjs +2388 -1171
- package/dist/bundle/esm/index.mjs.map +1 -1
- package/dist/canvas-panel/cjs/canvas-panel.js +5 -5
- package/dist/canvas-panel/cjs/canvas-panel.js.map +1 -1
- package/dist/canvas-panel/esm/canvas-panel.mjs +581 -520
- package/dist/canvas-panel/esm/canvas-panel.mjs.map +1 -1
- package/dist/index.umd.js +78 -76
- package/dist/index.umd.js.map +1 -1
- package/dist/react17/cjs/index.js +7 -6
- package/dist/react17/cjs/index.js.map +1 -1
- package/dist/react17/esm/index.mjs +2388 -1171
- package/dist/react17/esm/index.mjs.map +1 -1
- package/dist/utils/cjs/utils.js +1 -1
- package/dist/utils/cjs/utils.js.map +1 -1
- package/dist/utils/esm/utils.mjs +108 -107
- package/dist/utils/esm/utils.mjs.map +1 -1
- package/package.json +24 -22
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(me,T){typeof exports=="object"&&typeof module<"u"?T(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"],T):(me=typeof globalThis<"u"?globalThis:me||self,T(me.ReactIIIFVault={},me.React,me.ReactDOM,me.IIIFVault,me.IIIFImageApi))})(this,function(me,T,Xh,hf,Ss){"use strict";function qx(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function Yx(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in t)){const c=Object.getOwnPropertyDescriptor(i,a);c&&Object.defineProperty(t,a,c.get?c:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ve=qx(T);function Qx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kh={exports:{}},Tu={};/**
|
|
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
|
|
10
|
-
`+
|
|
11
|
-
`),
|
|
12
|
-
`),
|
|
13
|
-
`+
|
|
9
|
+
*/var Eg;function Gx(){return Eg||(Eg=1,process.env.NODE_ENV!=="production"&&function(){var t=T,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=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"),R=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),A=Symbol.iterator,z="@@iterator";function P(U){if(U===null||typeof U!="object")return null;var xe=A&&U[A]||U[z];return typeof xe=="function"?xe:null}var L=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(U){{for(var xe=arguments.length,je=new Array(xe>1?xe-1:0),dt=1;dt<xe;dt++)je[dt-1]=arguments[dt];F("error",U,je)}}function F(U,xe,je){{var dt=L.ReactDebugCurrentFrame,Dt=dt.getStackAddendum();Dt!==""&&(xe+="%s",je=je.concat([Dt]));var Ht=je.map(function(Rt){return String(Rt)});Ht.unshift("Warning: "+xe),Function.prototype.apply.call(console[U],console,Ht)}}var $=!1,Q=!1,j=!1,K=!1,ee=!1,V;V=Symbol.for("react.module.reference");function ae(U){return!!(typeof U=="string"||typeof U=="function"||U===i||U===c||ee||U===a||U===x||U===m||K||U===D||$||Q||j||typeof U=="object"&&U!==null&&(U.$$typeof===R||U.$$typeof===w||U.$$typeof===f||U.$$typeof===p||U.$$typeof===g||U.$$typeof===V||U.getModuleId!==void 0))}function ge(U,xe,je){var dt=U.displayName;if(dt)return dt;var Dt=xe.displayName||xe.name||"";return Dt!==""?je+"("+Dt+")":je}function we(U){return U.displayName||"Context"}function Ee(U){if(U==null)return null;if(typeof U.tag=="number"&&M("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 i:return"Fragment";case n:return"Portal";case c:return"Profiler";case a:return"StrictMode";case x:return"Suspense";case m:return"SuspenseList"}if(typeof U=="object")switch(U.$$typeof){case p:var xe=U;return we(xe)+".Consumer";case f:var je=U;return we(je._context)+".Provider";case g:return ge(U,U.render,"ForwardRef");case w:var dt=U.displayName||null;return dt!==null?dt:Ee(U.type)||"Memo";case R:{var Dt=U,Ht=Dt._payload,Rt=Dt._init;try{return Ee(Rt(Ht))}catch{return null}}}return null}var Ue=Object.assign,Fe=0,Be,vt,Oe,it,nt,W,Re;function Ie(){}Ie.__reactDisabledLog=!0;function tt(){{if(Fe===0){Be=console.log,vt=console.info,Oe=console.warn,it=console.error,nt=console.group,W=console.groupCollapsed,Re=console.groupEnd;var U={configurable:!0,enumerable:!0,value:Ie,writable:!0};Object.defineProperties(console,{info:U,log:U,warn:U,error:U,group:U,groupCollapsed:U,groupEnd:U})}Fe++}}function at(){{if(Fe--,Fe===0){var U={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ue({},U,{value:Be}),info:Ue({},U,{value:vt}),warn:Ue({},U,{value:Oe}),error:Ue({},U,{value:it}),group:Ue({},U,{value:nt}),groupCollapsed:Ue({},U,{value:W}),groupEnd:Ue({},U,{value:Re})})}Fe<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $t=L.ReactCurrentDispatcher,_t;function yt(U,xe,je){{if(_t===void 0)try{throw Error()}catch(Dt){var dt=Dt.stack.trim().match(/\n( *(at )?)/);_t=dt&&dt[1]||""}return`
|
|
10
|
+
`+_t+U}}var xt=!1,Pt;{var St=typeof WeakMap=="function"?WeakMap:Map;Pt=new St}function ht(U,xe){if(!U||xt)return"";{var je=Pt.get(U);if(je!==void 0)return je}var dt;xt=!0;var Dt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ht;Ht=$t.current,$t.current=null,tt();try{if(xe){var Rt=function(){throw Error()};if(Object.defineProperty(Rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Rt,[])}catch(Ot){dt=Ot}Reflect.construct(U,[],Rt)}else{try{Rt.call()}catch(Ot){dt=Ot}U.call(Rt.prototype)}}else{try{throw Error()}catch(Ot){dt=Ot}U()}}catch(Ot){if(Ot&&dt&&typeof Ot.stack=="string"){for(var Et=Ot.stack.split(`
|
|
11
|
+
`),An=dt.stack.split(`
|
|
12
|
+
`),Zt=Et.length-1,rn=An.length-1;Zt>=1&&rn>=0&&Et[Zt]!==An[rn];)rn--;for(;Zt>=1&&rn>=0;Zt--,rn--)if(Et[Zt]!==An[rn]){if(Zt!==1||rn!==1)do if(Zt--,rn--,rn<0||Et[Zt]!==An[rn]){var Wn=`
|
|
13
|
+
`+Et[Zt].replace(" at new "," at ");return U.displayName&&Wn.includes("<anonymous>")&&(Wn=Wn.replace("<anonymous>",U.displayName)),typeof U=="function"&&Pt.set(U,Wn),Wn}while(Zt>=1&&rn>=0);break}}}finally{xt=!1,$t.current=Ht,at(),Error.prepareStackTrace=Dt}var ar=U?U.displayName||U.name:"",Vr=ar?yt(ar):"";return typeof U=="function"&&Pt.set(U,Vr),Vr}function ke(U,xe,je){return ht(U,!1)}function qe(U){var xe=U.prototype;return!!(xe&&xe.isReactComponent)}function st(U,xe,je){if(U==null)return"";if(typeof U=="function")return ht(U,qe(U));if(typeof U=="string")return yt(U);switch(U){case x:return yt("Suspense");case m:return yt("SuspenseList")}if(typeof U=="object")switch(U.$$typeof){case g:return ke(U.render);case w:return st(U.type,xe,je);case R:{var dt=U,Dt=dt._payload,Ht=dt._init;try{return st(Ht(Dt),xe,je)}catch{}}}return""}var wt=Object.prototype.hasOwnProperty,vn={},I=L.ReactDebugCurrentFrame;function N(U){if(U){var xe=U._owner,je=st(U.type,U._source,xe?xe.type:null);I.setExtraStackFrame(je)}else I.setExtraStackFrame(null)}function Z(U,xe,je,dt,Dt){{var Ht=Function.call.bind(wt);for(var Rt in U)if(Ht(U,Rt)){var Et=void 0;try{if(typeof U[Rt]!="function"){var An=Error((dt||"React class")+": "+je+" type `"+Rt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof U[Rt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw An.name="Invariant Violation",An}Et=U[Rt](xe,Rt,dt,je,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Zt){Et=Zt}Et&&!(Et instanceof Error)&&(N(Dt),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).",dt||"React class",je,Rt,typeof Et),N(null)),Et instanceof Error&&!(Et.message in vn)&&(vn[Et.message]=!0,N(Dt),M("Failed %s type: %s",je,Et.message),N(null))}}}var Me=Array.isArray;function ft(U){return Me(U)}function et(U){{var xe=typeof Symbol=="function"&&Symbol.toStringTag,je=xe&&U[Symbol.toStringTag]||U.constructor.name||"Object";return je}}function Ft(U){try{return mn(U),!1}catch{return!0}}function mn(U){return""+U}function Le(U){if(Ft(U))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",et(U)),mn(U)}var oe=L.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0},de,le,he;he={};function be(U){if(wt.call(U,"ref")){var xe=Object.getOwnPropertyDescriptor(U,"ref").get;if(xe&&xe.isReactWarning)return!1}return U.ref!==void 0}function Ve(U){if(wt.call(U,"key")){var xe=Object.getOwnPropertyDescriptor(U,"key").get;if(xe&&xe.isReactWarning)return!1}return U.key!==void 0}function J(U,xe){if(typeof U.ref=="string"&&oe.current&&xe&&oe.current.stateNode!==xe){var je=Ee(oe.current.type);he[je]||(M('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',Ee(oe.current.type),U.ref),he[je]=!0)}}function ne(U,xe){{var je=function(){de||(de=!0,M("%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)",xe))};je.isReactWarning=!0,Object.defineProperty(U,"key",{get:je,configurable:!0})}}function De(U,xe){{var je=function(){le||(le=!0,M("%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)",xe))};je.isReactWarning=!0,Object.defineProperty(U,"ref",{get:je,configurable:!0})}}var Ae=function(U,xe,je,dt,Dt,Ht,Rt){var Et={$$typeof:e,type:U,key:xe,ref:je,props:Rt,_owner:Ht};return Et._store={},Object.defineProperty(Et._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Et,"_self",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.defineProperty(Et,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Dt}),Object.freeze&&(Object.freeze(Et.props),Object.freeze(Et)),Et};function Ne(U,xe,je,dt,Dt){{var Ht,Rt={},Et=null,An=null;je!==void 0&&(Le(je),Et=""+je),Ve(xe)&&(Le(xe.key),Et=""+xe.key),be(xe)&&(An=xe.ref,J(xe,Dt));for(Ht in xe)wt.call(xe,Ht)&&!X.hasOwnProperty(Ht)&&(Rt[Ht]=xe[Ht]);if(U&&U.defaultProps){var Zt=U.defaultProps;for(Ht in Zt)Rt[Ht]===void 0&&(Rt[Ht]=Zt[Ht])}if(Et||An){var rn=typeof U=="function"?U.displayName||U.name||"Unknown":U;Et&&ne(Rt,rn),An&&De(Rt,rn)}return Ae(U,Et,An,Dt,dt,oe.current,Rt)}}var Je=L.ReactCurrentOwner,Ct=L.ReactDebugCurrentFrame;function Nt(U){if(U){var xe=U._owner,je=st(U.type,U._source,xe?xe.type:null);Ct.setExtraStackFrame(je)}else Ct.setExtraStackFrame(null)}var jt;jt=!1;function gn(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function qt(){{if(Je.current){var U=Ee(Je.current.type);if(U)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+U+"`."}return""}}function
|
|
15
|
+
Check the render method of \``+U+"`."}return""}}function Bt(U){{if(U!==void 0){var xe=U.fileName.replace(/^.*[\\\/]/,""),je=U.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+
|
|
17
|
+
Check your code at `+xe+":"+je+"."}return""}}var Mr={};function Pr(U){{var xe=qt();if(!xe){var je=typeof U=="string"?U:U.displayName||U.name;je&&(xe=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+
|
|
19
|
+
Check the top-level render call using <`+je+">.")}return xe}}function Hr(U,xe){{if(!U._store||U._store.validated||U.key!=null)return;U._store.validated=!0;var je=Pr(xe);if(Mr[je])return;Mr[je]=!0;var dt="";U&&U._owner&&U._owner!==Je.current&&(dt=" It was passed a child from "+Ee(U._owner.type)+"."),Nt(U),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',je,dt),Nt(null)}}function br(U,xe){{if(typeof U!="object")return;if(ft(U))for(var je=0;je<U.length;je++){var dt=U[je];gn(dt)&&Hr(dt,xe)}else if(gn(U))U._store&&(U._store.validated=!0);else if(U){var Dt=P(U);if(typeof Dt=="function"&&Dt!==U.entries)for(var Ht=Dt.call(U),Rt;!(Rt=Ht.next()).done;)gn(Rt.value)&&Hr(Rt.value,xe)}}}function Ps(U){{var xe=U.type;if(xe==null||typeof xe=="string")return;var je;if(typeof xe=="function")je=xe.propTypes;else if(typeof xe=="object"&&(xe.$$typeof===g||xe.$$typeof===w))je=xe.propTypes;else return;if(je){var dt=Ee(xe);Z(je,U.props,"prop",dt,U)}else if(xe.PropTypes!==void 0&&!jt){jt=!0;var Dt=Ee(xe);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Dt||"Unknown")}typeof xe.getDefaultProps=="function"&&!xe.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gl(U){{for(var xe=Object.keys(U.props),je=0;je<xe.length;je++){var dt=xe[je];if(dt!=="children"&&dt!=="key"){Nt(U),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",dt),Nt(null);break}}U.ref!==null&&(Nt(U),M("Invalid attribute `ref` supplied to `React.Fragment`."),Nt(null))}}function es(U,xe,je,dt,Dt,Ht){{var Rt=ae(U);if(!Rt){var Et="";(U===void 0||typeof U=="object"&&U!==null&&Object.keys(U).length===0)&&(Et+=" 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 An=Bt(Dt);An?Et+=An:Et+=qt();var Zt;U===null?Zt="null":ft(U)?Zt="array":U!==void 0&&U.$$typeof===e?(Zt="<"+(Ee(U.type)||"Unknown")+" />",Et=" Did you accidentally export a JSX literal instead of a component?"):Zt=typeof U,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Zt,Et)}var rn=Ne(U,xe,je,Dt,Ht);if(rn==null)return rn;if(Rt){var Wn=xe.children;if(Wn!==void 0)if(dt)if(ft(Wn)){for(var ar=0;ar<Wn.length;ar++)br(Wn[ar],U);Object.freeze&&Object.freeze(Wn)}else M("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 br(Wn,U)}return U===i?gl(rn):Ps(rn),rn}}function nc(U,xe,je){return es(U,xe,je,!0)}function rc(U,xe,je){return es(U,xe,je,!1)}var yl=rc,bl=nc;Tu.Fragment=i,Tu.jsx=yl,Tu.jsxs=bl}()),Tu}var Cu={};/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
22
22
|
*
|
|
@@ -24,120 +24,120 @@ Check the top-level render call using <`+we+">.")}return he}}function ws(U,he){{
|
|
|
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
|
|
27
|
+
*/var Tg;function Xx(){if(Tg)return Cu;Tg=1;var t=T,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function f(p,g,x){var m,w={},R=null,D=null;x!==void 0&&(R=""+x),g.key!==void 0&&(R=""+g.key),g.ref!==void 0&&(D=g.ref);for(m in g)i.call(g,m)&&!c.hasOwnProperty(m)&&(w[m]=g[m]);if(p&&p.defaultProps)for(m in g=p.defaultProps,g)w[m]===void 0&&(w[m]=g[m]);return{$$typeof:e,type:p,key:R,ref:D,props:w,_owner:a.current}}return Cu.Fragment=n,Cu.jsx=f,Cu.jsxs=f,Cu}process.env.NODE_ENV==="production"?Kh.exports=Xx():Kh.exports=Gx();var re=Kh.exports,Zh={exports:{}},pf={exports:{}};/*
|
|
28
28
|
object-assign
|
|
29
29
|
(c) Sindre Sorhus
|
|
30
30
|
@license MIT
|
|
31
|
-
*/var
|
|
31
|
+
*/var Jh,Cg;function Rg(){if(Cg)return Jh;Cg=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function a(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var f={},p=0;p<10;p++)f["_"+String.fromCharCode(p)]=p;var g=Object.getOwnPropertyNames(f).map(function(m){return f[m]});if(g.join("")!=="0123456789")return!1;var x={};return"abcdefghijklmnopqrst".split("").forEach(function(m){x[m]=m}),Object.keys(Object.assign({},x)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jh=a()?Object.assign:function(c,f){for(var p,g=i(c),x,m=1;m<arguments.length;m++){p=Object(arguments[m]);for(var w in p)e.call(p,w)&&(g[w]=p[w]);if(t){x=t(p);for(var R=0;R<x.length;R++)n.call(p,x[R])&&(g[x[R]]=p[x[R]])}}return g},Jh}var vf={exports:{}},ep={};/** @license React v0.20.2
|
|
32
32
|
* scheduler.development.js
|
|
33
33
|
*
|
|
34
34
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
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
|
|
38
|
+
*/var Og;function Kx(){return Og||(Og=1,function(t){process.env.NODE_ENV!=="production"&&function(){var e=!1,n=!1,i,a,c,f,p=typeof performance=="object"&&typeof performance.now=="function";if(p){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,R=null,D=function(){if(w!==null)try{var he=t.unstable_now(),be=!0;w(be,he),w=null}catch(Ve){throw setTimeout(D,0),Ve}};i=function(he){w!==null?setTimeout(i,0,he):(w=he,setTimeout(D,0))},a=function(he,be){R=setTimeout(he,be)},c=function(){clearTimeout(R)},t.unstable_shouldYield=function(){return!1},f=t.unstable_forceFrameRate=function(){}}else{var A=window.setTimeout,z=window.clearTimeout;if(typeof console<"u"){var P=window.requestAnimationFrame,L=window.cancelAnimationFrame;typeof P!="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 L!="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,F=null,$=-1,Q=5,j=0;t.unstable_shouldYield=function(){return t.unstable_now()>=j},f=function(){},t.unstable_forceFrameRate=function(he){if(he<0||he>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}he>0?Q=Math.floor(1e3/he):Q=5};var K=function(){if(F!==null){var he=t.unstable_now();j=he+Q;var be=!0;try{var Ve=F(be,he);Ve?V.postMessage(null):(M=!1,F=null)}catch(J){throw V.postMessage(null),J}}else M=!1},ee=new MessageChannel,V=ee.port2;ee.port1.onmessage=K,i=function(he){F=he,M||(M=!0,V.postMessage(null))},a=function(he,be){$=A(function(){he(t.unstable_now())},be)},c=function(){z($),$=-1}}function ae(he,be){var Ve=he.length;he.push(be),Ee(he,be,Ve)}function ge(he){var be=he[0];return be===void 0?null:be}function we(he){var be=he[0];if(be!==void 0){var Ve=he.pop();return Ve!==be&&(he[0]=Ve,Ue(he,Ve,0)),be}else return null}function Ee(he,be,Ve){for(var J=Ve;;){var ne=J-1>>>1,De=he[ne];if(De!==void 0&&Fe(De,be)>0)he[ne]=be,he[J]=De,J=ne;else return}}function Ue(he,be,Ve){for(var J=Ve,ne=he.length;J<ne;){var De=(J+1)*2-1,Ae=he[De],Ne=De+1,Je=he[Ne];if(Ae!==void 0&&Fe(Ae,be)<0)Je!==void 0&&Fe(Je,Ae)<0?(he[J]=Je,he[Ne]=be,J=Ne):(he[J]=Ae,he[De]=be,J=De);else if(Je!==void 0&&Fe(Je,be)<0)he[J]=Je,he[Ne]=be,J=Ne;else return}}function Fe(he,be){var Ve=he.sortIndex-be.sortIndex;return Ve!==0?Ve:he.id-be.id}var Be=1,vt=2,Oe=3,it=4,nt=5;function W(he,be){}var Re=1073741823,Ie=-1,tt=250,at=5e3,$t=1e4,_t=Re,yt=[],xt=[],Pt=1,St=null,ht=Oe,ke=!1,qe=!1,st=!1;function wt(he){for(var be=ge(xt);be!==null;){if(be.callback===null)we(xt);else if(be.startTime<=he)we(xt),be.sortIndex=be.expirationTime,ae(yt,be);else return;be=ge(xt)}}function vn(he){if(st=!1,wt(he),!qe)if(ge(yt)!==null)qe=!0,i(I);else{var be=ge(xt);be!==null&&a(vn,be.startTime-he)}}function I(he,be){qe=!1,st&&(st=!1,c()),ke=!0;var Ve=ht;try{var J;if(!n)return N(he,be)}finally{St=null,ht=Ve,ke=!1}}function N(he,be){var Ve=be;for(wt(Ve),St=ge(yt);St!==null&&!e&&!(St.expirationTime>Ve&&(!he||t.unstable_shouldYield()));){var J=St.callback;if(typeof J=="function"){St.callback=null,ht=St.priorityLevel;var ne=St.expirationTime<=Ve,De=J(ne);Ve=t.unstable_now(),typeof De=="function"?St.callback=De:St===ge(yt)&&we(yt),wt(Ve)}else we(yt);St=ge(yt)}if(St!==null)return!0;var Ae=ge(xt);return Ae!==null&&a(vn,Ae.startTime-Ve),!1}function Z(he,be){switch(he){case Be:case vt:case Oe:case it:case nt:break;default:he=Oe}var Ve=ht;ht=he;try{return be()}finally{ht=Ve}}function Me(he){var be;switch(ht){case Be:case vt:case Oe:be=Oe;break;default:be=ht;break}var Ve=ht;ht=be;try{return he()}finally{ht=Ve}}function ft(he){var be=ht;return function(){var Ve=ht;ht=be;try{return he.apply(this,arguments)}finally{ht=Ve}}}function et(he,be,Ve){var J=t.unstable_now(),ne;if(typeof Ve=="object"&&Ve!==null){var De=Ve.delay;typeof De=="number"&&De>0?ne=J+De:ne=J}else ne=J;var Ae;switch(he){case Be:Ae=Ie;break;case vt:Ae=tt;break;case nt:Ae=_t;break;case it:Ae=$t;break;case Oe:default:Ae=at;break}var Ne=ne+Ae,Je={id:Pt++,callback:be,priorityLevel:he,startTime:ne,expirationTime:Ne,sortIndex:-1};return ne>J?(Je.sortIndex=ne,ae(xt,Je),ge(yt)===null&&Je===ge(xt)&&(st?c():st=!0,a(vn,ne-J))):(Je.sortIndex=Ne,ae(yt,Je),!qe&&!ke&&(qe=!0,i(I))),Je}function Ft(){}function mn(){!qe&&!ke&&(qe=!0,i(I))}function Le(){return ge(yt)}function oe(he){he.callback=null}function X(){return ht}var de=f,le=null;t.unstable_IdlePriority=nt,t.unstable_ImmediatePriority=Be,t.unstable_LowPriority=it,t.unstable_NormalPriority=Oe,t.unstable_Profiling=le,t.unstable_UserBlockingPriority=vt,t.unstable_cancelCallback=oe,t.unstable_continueExecution=mn,t.unstable_getCurrentPriorityLevel=X,t.unstable_getFirstCallbackNode=Le,t.unstable_next=Me,t.unstable_pauseExecution=Ft,t.unstable_requestPaint=de,t.unstable_runWithPriority=Z,t.unstable_scheduleCallback=et,t.unstable_wrapCallback=ft}()}(ep)),ep}var tp={};/** @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
|
|
45
|
+
*/var Ag;function Zx(){return Ag||(Ag=1,function(t){var e,n,i,a;if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();t.unstable_now=function(){return f.now()-p}}if(typeof window>"u"||typeof MessageChannel!="function"){var g=null,x=null,m=function(){if(g!==null)try{var W=t.unstable_now();g(!0,W),g=null}catch(Re){throw setTimeout(m,0),Re}};e=function(W){g!==null?setTimeout(e,0,W):(g=W,setTimeout(m,0))},n=function(W,Re){x=setTimeout(W,Re)},i=function(){clearTimeout(x)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var w=window.setTimeout,R=window.clearTimeout;if(typeof console<"u"){var D=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 D!="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 A=!1,z=null,P=-1,L=5,M=0;t.unstable_shouldYield=function(){return t.unstable_now()>=M},a=function(){},t.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<W?Math.floor(1e3/W):5};var F=new MessageChannel,$=F.port2;F.port1.onmessage=function(){if(z!==null){var W=t.unstable_now();M=W+L;try{z(!0,W)?$.postMessage(null):(A=!1,z=null)}catch(Re){throw $.postMessage(null),Re}}else A=!1},e=function(W){z=W,A||(A=!0,$.postMessage(null))},n=function(W,Re){P=w(function(){W(t.unstable_now())},Re)},i=function(){R(P),P=-1}}function Q(W,Re){var Ie=W.length;W.push(Re);e:for(;;){var tt=Ie-1>>>1,at=W[tt];if(at!==void 0&&0<ee(at,Re))W[tt]=Re,W[Ie]=at,Ie=tt;else break e}}function j(W){return W=W[0],W===void 0?null:W}function K(W){var Re=W[0];if(Re!==void 0){var Ie=W.pop();if(Ie!==Re){W[0]=Ie;e:for(var tt=0,at=W.length;tt<at;){var $t=2*(tt+1)-1,_t=W[$t],yt=$t+1,xt=W[yt];if(_t!==void 0&&0>ee(_t,Ie))xt!==void 0&&0>ee(xt,_t)?(W[tt]=xt,W[yt]=Ie,tt=yt):(W[tt]=_t,W[$t]=Ie,tt=$t);else if(xt!==void 0&&0>ee(xt,Ie))W[tt]=xt,W[yt]=Ie,tt=yt;else break e}}return Re}return null}function ee(W,Re){var Ie=W.sortIndex-Re.sortIndex;return Ie!==0?Ie:W.id-Re.id}var V=[],ae=[],ge=1,we=null,Ee=3,Ue=!1,Fe=!1,Be=!1;function vt(W){for(var Re=j(ae);Re!==null;){if(Re.callback===null)K(ae);else if(Re.startTime<=W)K(ae),Re.sortIndex=Re.expirationTime,Q(V,Re);else break;Re=j(ae)}}function Oe(W){if(Be=!1,vt(W),!Fe)if(j(V)!==null)Fe=!0,e(it);else{var Re=j(ae);Re!==null&&n(Oe,Re.startTime-W)}}function it(W,Re){Fe=!1,Be&&(Be=!1,i()),Ue=!0;var Ie=Ee;try{for(vt(Re),we=j(V);we!==null&&(!(we.expirationTime>Re)||W&&!t.unstable_shouldYield());){var tt=we.callback;if(typeof tt=="function"){we.callback=null,Ee=we.priorityLevel;var at=tt(we.expirationTime<=Re);Re=t.unstable_now(),typeof at=="function"?we.callback=at:we===j(V)&&K(V),vt(Re)}else K(V);we=j(V)}if(we!==null)var $t=!0;else{var _t=j(ae);_t!==null&&n(Oe,_t.startTime-Re),$t=!1}return $t}finally{we=null,Ee=Ie,Ue=!1}}var nt=a;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(W){W.callback=null},t.unstable_continueExecution=function(){Fe||Ue||(Fe=!0,e(it))},t.unstable_getCurrentPriorityLevel=function(){return Ee},t.unstable_getFirstCallbackNode=function(){return j(V)},t.unstable_next=function(W){switch(Ee){case 1:case 2:case 3:var Re=3;break;default:Re=Ee}var Ie=Ee;Ee=Re;try{return W()}finally{Ee=Ie}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=nt,t.unstable_runWithPriority=function(W,Re){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var Ie=Ee;Ee=W;try{return Re()}finally{Ee=Ie}},t.unstable_scheduleCallback=function(W,Re,Ie){var tt=t.unstable_now();switch(typeof Ie=="object"&&Ie!==null?(Ie=Ie.delay,Ie=typeof Ie=="number"&&0<Ie?tt+Ie:tt):Ie=tt,W){case 1:var at=-1;break;case 2:at=250;break;case 5:at=1073741823;break;case 4:at=1e4;break;default:at=5e3}return at=Ie+at,W={id:ge++,callback:Re,priorityLevel:W,startTime:Ie,expirationTime:at,sortIndex:-1},Ie>tt?(W.sortIndex=Ie,Q(ae,W),j(V)===null&&W===j(ae)&&(Be?i():Be=!0,n(Oe,Ie-tt))):(W.sortIndex=at,Q(V,W),Fe||Ue||(Fe=!0,e(it))),W},t.unstable_wrapCallback=function(W){var Re=Ee;return function(){var Ie=Ee;Ee=Re;try{return W.apply(this,arguments)}finally{Ee=Ie}}}}(tp)),tp}var Mg;function Pg(){return Mg||(Mg=1,process.env.NODE_ENV==="production"?vf.exports=Zx():vf.exports=Kx()),vf.exports}var mf={exports:{}},np={};/** @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
|
|
52
|
+
*/var Lg;function Jx(){return Lg||(Lg=1,function(t){process.env.NODE_ENV!=="production"&&function(){var e=0,n=0,i=0;t.__interactionsRef=null,t.__subscriberRef=null,t.__interactionsRef={current:new Set},t.__subscriberRef={current:null};function a(M){var F=t.__interactionsRef.current;t.__interactionsRef.current=new Set;try{return M()}finally{t.__interactionsRef.current=F}}function c(){return t.__interactionsRef.current}function f(){return++i}function p(M,F,$){var Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,j={__count:1,id:n++,name:M,timestamp:F},K=t.__interactionsRef.current,ee=new Set(K);ee.add(j),t.__interactionsRef.current=ee;var V=t.__subscriberRef.current,ae;try{V!==null&&V.onInteractionTraced(j)}finally{try{V!==null&&V.onWorkStarted(ee,Q)}finally{try{ae=$()}finally{t.__interactionsRef.current=K;try{V!==null&&V.onWorkStopped(ee,Q)}finally{j.__count--,V!==null&&j.__count===0&&V.onInteractionScheduledWorkCompleted(j)}}}}return ae}function g(M){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,$=t.__interactionsRef.current,Q=t.__subscriberRef.current;Q!==null&&Q.onWorkScheduled($,F),$.forEach(function(ee){ee.__count++});var j=!1;function K(){var ee=t.__interactionsRef.current;t.__interactionsRef.current=$,Q=t.__subscriberRef.current;try{var V;try{Q!==null&&Q.onWorkStarted($,F)}finally{try{V=M.apply(void 0,arguments)}finally{t.__interactionsRef.current=ee,Q!==null&&Q.onWorkStopped($,F)}}return V}finally{j||(j=!0,$.forEach(function(ae){ae.__count--,Q!==null&&ae.__count===0&&Q.onInteractionScheduledWorkCompleted(ae)}))}}return K.cancel=function(){Q=t.__subscriberRef.current;try{Q!==null&&Q.onWorkCanceled($,F)}finally{$.forEach(function(V){V.__count--,Q&&V.__count===0&&Q.onInteractionScheduledWorkCompleted(V)})}},K}var x=null;x=new Set;function m(M){x.add(M),x.size===1&&(t.__subscriberRef.current={onInteractionScheduledWorkCompleted:D,onInteractionTraced:R,onWorkCanceled:L,onWorkScheduled:A,onWorkStarted:z,onWorkStopped:P})}function w(M){x.delete(M),x.size===0&&(t.__subscriberRef.current=null)}function R(M){var F=!1,$=null;if(x.forEach(function(Q){try{Q.onInteractionTraced(M)}catch(j){F||(F=!0,$=j)}}),F)throw $}function D(M){var F=!1,$=null;if(x.forEach(function(Q){try{Q.onInteractionScheduledWorkCompleted(M)}catch(j){F||(F=!0,$=j)}}),F)throw $}function A(M,F){var $=!1,Q=null;if(x.forEach(function(j){try{j.onWorkScheduled(M,F)}catch(K){$||($=!0,Q=K)}}),$)throw Q}function z(M,F){var $=!1,Q=null;if(x.forEach(function(j){try{j.onWorkStarted(M,F)}catch(K){$||($=!0,Q=K)}}),$)throw Q}function P(M,F){var $=!1,Q=null;if(x.forEach(function(j){try{j.onWorkStopped(M,F)}catch(K){$||($=!0,Q=K)}}),$)throw Q}function L(M,F){var $=!1,Q=null;if(x.forEach(function(j){try{j.onWorkCanceled(M,F)}catch(K){$||($=!0,Q=K)}}),$)throw Q}t.unstable_clear=a,t.unstable_getCurrent=c,t.unstable_getThreadID=f,t.unstable_subscribe=m,t.unstable_trace=p,t.unstable_unsubscribe=w,t.unstable_wrap=g}()}(np)),np}var Ai={};/** @license React v0.20.2
|
|
53
53
|
* scheduler-tracing.production.min.js
|
|
54
54
|
*
|
|
55
55
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the MIT license found in the
|
|
58
58
|
* LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/var
|
|
59
|
+
*/var Dg;function ew(){if(Dg)return Ai;Dg=1;var t=0;return Ai.__interactionsRef=null,Ai.__subscriberRef=null,Ai.unstable_clear=function(e){return e()},Ai.unstable_getCurrent=function(){return null},Ai.unstable_getThreadID=function(){return++t},Ai.unstable_subscribe=function(){},Ai.unstable_trace=function(e,n,i){return i()},Ai.unstable_unsubscribe=function(){},Ai.unstable_wrap=function(e){return e},Ai}var kg;function tw(){return kg||(kg=1,process.env.NODE_ENV==="production"?mf.exports=ew():mf.exports=Jx()),mf.exports}/** @license React v0.26.2
|
|
60
60
|
* react-reconciler.development.js
|
|
61
61
|
*
|
|
62
62
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
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
|
-
*/
|
|
67
|
-
`+
|
|
68
|
-
`),
|
|
69
|
-
`),
|
|
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 je:return Ar("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case Ut:return la(i.render);case Be:return Pl(i.type,s,u);case yt: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 xn={},zt=99,Ri=98,Wi=97,Ln=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 Ln;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 Ln: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),xn}function ga(i){i!==xn&&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,Pn=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 Rn=typeof Object.is=="function"?Object.is:vi,Nr=Object.prototype.hasOwnProperty;function ks(i,s){if(Rn(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])||!Rn(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
|
-
Error generating stack: `+
|
|
72
|
-
`+
|
|
66
|
+
*/pf.exports;var Ng;function nw(){return Ng||(Ng=1,function(t){process.env.NODE_ENV!=="production"&&(t.exports=function(n){var i={},a=T,c=Rg(),f=Pg(),p=tw(),g=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(r){{for(var s=arguments.length,u=new Array(s>1?s-1:0),h=1;h<s;h++)u[h-1]=arguments[h];w("warn",r,u)}}function m(r){{for(var s=arguments.length,u=new Array(s>1?s-1:0),h=1;h<s;h++)u[h-1]=arguments[h];w("error",r,u)}}function w(r,s,u){{var h=g.ReactDebugCurrentFrame,v=h.getStackAddendum();v!==""&&(s+="%s",u=u.concat([v]));var b=u.map(function(E){return""+E});b.unshift("Warning: "+s),Function.prototype.apply.call(console[r],console,b)}}var R=0,D=1,A=2,z=3,P=4,L=5,M=6,F=7,$=8,Q=9,j=10,K=11,ee=12,V=13,ae=14,ge=15,we=16,Ee=17,Ue=18,Fe=19,Be=20,vt=21,Oe=22,it=23,nt=24;function W(r){return r._reactInternals}function Re(r,s){r._reactInternals=s}var Ie=60103,tt=60106,at=60107,$t=60108,_t=60114,yt=60109,xt=60110,Pt=60112,St=60113,ht=60120,ke=60115,qe=60116,st=60121,wt=60119,vn=60129,I=60130,N=60131;if(typeof Symbol=="function"&&Symbol.for){var Z=Symbol.for;Ie=Z("react.element"),tt=Z("react.portal"),at=Z("react.fragment"),$t=Z("react.strict_mode"),_t=Z("react.profiler"),yt=Z("react.provider"),xt=Z("react.context"),Pt=Z("react.forward_ref"),St=Z("react.suspense"),ht=Z("react.suspense_list"),ke=Z("react.memo"),qe=Z("react.lazy"),st=Z("react.block"),Z("react.server.block"),Z("react.fundamental"),wt=Z("react.scope"),Z("react.opaque.id"),vn=Z("react.debug_trace_mode"),I=Z("react.offscreen"),N=Z("react.legacy_hidden")}var Me=typeof Symbol=="function"&&Symbol.iterator,ft="@@iterator";function et(r){if(r===null||typeof r!="object")return null;var s=Me&&r[Me]||r[ft];return typeof s=="function"?s:null}function Ft(r,s,u){var h=s.displayName||s.name||"";return r.displayName||(h!==""?u+"("+h+")":u)}function mn(r){return r.displayName||"Context"}function Le(r){if(r==null)return null;if(typeof r.tag=="number"&&m("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case at:return"Fragment";case tt:return"Portal";case _t:return"Profiler";case $t:return"StrictMode";case St:return"Suspense";case ht:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case xt:var s=r;return mn(s)+".Consumer";case yt:var u=r;return mn(u._context)+".Provider";case Pt:return Ft(r,r.render,"ForwardRef");case ke:return Le(r.type);case st:return Le(r._render);case qe:{var h=r,v=h._payload,b=h._init;try{return Le(b(v))}catch{return null}}}return null}var oe=0,X=1,de=2,le=4,he=6,be=8,Ve=16,J=32,ne=64,De=128,Ae=256,Ne=512,Je=8192,Ct=1024,Nt=1028,jt=932,gn=2047,qt=2048,Bt=4096,Mr=16384,Pr=!0,Hr=!1,br=!1,Ps=!1,gl=g.ReactCurrentOwner;function es(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{var h=s;do s=h,(s.flags&(de|Ct))!==oe&&(u=s.return),h=s.return;while(h)}return s.tag===z?u:null}function nc(r){return es(r)===r}function rc(r){{var s=gl.current;if(s!==null&&s.tag===D){var u=s,h=u.stateNode;h._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.",Le(u.type)||"A component"),h._warnedAboutRefsInRender=!0}}var v=W(r);return v?es(v)===v:!1}function yl(r){if(es(r)!==r)throw Error("Unable to find node on an unmounted component.")}function bl(r){var s=r.alternate;if(!s){var u=es(r);if(u===null)throw Error("Unable to find node on an unmounted component.");return u!==r?null:r}for(var h=r,v=s;;){var b=h.return;if(b===null)break;var E=b.alternate;if(E===null){var O=b.return;if(O!==null){h=v=O;continue}break}if(b.child===E.child){for(var k=b.child;k;){if(k===h)return yl(b),r;if(k===v)return yl(b),s;k=k.sibling}throw Error("Unable to find node on an unmounted component.")}if(h.return!==v.return)h=b,v=E;else{for(var B=!1,Y=b.child;Y;){if(Y===h){B=!0,h=b,v=E;break}if(Y===v){B=!0,v=b,h=E;break}Y=Y.sibling}if(!B){for(Y=E.child;Y;){if(Y===h){B=!0,h=E,v=b;break}if(Y===v){B=!0,v=E,h=b;break}Y=Y.sibling}if(!B)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(h.alternate!==v)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(h.tag!==z)throw Error("Unable to find node on an unmounted component.");return h.stateNode.current===h?r:s}function U(r){var s=bl(r);if(!s)return null;for(var u=s;;){if(u.tag===L||u.tag===M)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 xe(r){var s=bl(r);if(!s)return null;for(var u=s;;){if(u.tag===L||u.tag===M||Hr)return u;if(u.child&&u.tag!==P){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 je(r,s){for(var u=s,h=r.alternate;u!==null;){if(u===r||u===h)return!0;u=u.return}return!1}var dt=n.getPublicInstance,Dt=n.getRootHostContext,Ht=n.getChildHostContext,Rt=n.prepareForCommit,Et=n.resetAfterCommit,An=n.createInstance,Zt=n.appendInitialChild,rn=n.finalizeInitialChildren,Wn=n.prepareUpdate,ar=n.shouldSetTextContent,Vr=n.createTextInstance,Ot=n.scheduleTimeout,Sn=n.cancelTimeout,gi=n.noTimeout;n.now;var xn=n.isPrimaryRenderer,Xn=n.warnsIfNotActing,$n=n.supportsMutation,yi=n.supportsPersistence,dn=n.supportsHydration;n.getFundamentalComponentInstance,n.mountFundamentalComponent,n.shouldUpdateFundamentalComponent;var Sl=n.getInstanceFromNode;n.isOpaqueHydratingObject;var Sd=n.makeOpaqueHydratingObject;n.makeClientId;var xd=n.makeClientIdInDEV,Qo=n.beforeActiveInstanceBlur,wd=n.afterActiveInstanceBlur,ic=n.preparePortalMount;n.preparePortalMount,n.getInstanceFromScope;var Wr=n.supportsTestSelectors,vv=n.findFiberRoot,xl=n.getBoundingRect,sn=n.getTextContent,ii=n.isHiddenSubtree,mv=n.matchAccessibilityRole,gv=n.setFocusIfFocusable,Go=n.setupIntersectionObserver,Ed=n.appendChild,wl=n.appendChildToContainer,uo=n.commitTextUpdate,sc=n.commitMount,El=n.commitUpdate,ts=n.insertBefore,yv=n.insertInContainerBefore,bv=n.removeChild,Sv=n.removeChildFromContainer,Td=n.resetTextContent,oc=n.hideInstance,ac=n.hideTextInstance,xv=n.unhideInstance,Cd=n.unhideTextInstance;n.updateFundamentalComponent,n.unmountFundamentalComponent;var Xo=n.clearContainer,wv=n.cloneInstance,Ko=n.createContainerChildSet,lc=n.appendChildToContainerChildSet,Rd=n.finalizeContainerChildren,uc=n.replaceContainerChildren,cc=n.cloneHiddenInstance,Tl=n.cloneHiddenTextInstance;n.cloneInstance;var Ev=n.canHydrateInstance,Di=n.canHydrateTextInstance;n.canHydrateSuspenseInstance;var Cl=n.isSuspenseInstancePending,fc=n.isSuspenseInstanceFallback;n.registerSuspenseInstanceRetry;var Rl=n.getNextHydratableSibling,Fn=n.getFirstHydratableChild,co=n.hydrateInstance,Od=n.hydrateTextInstance;n.hydrateSuspenseInstance;var ki=n.getNextHydratableInstanceAfterSuspenseInstance,fo=n.commitHydratedContainer,$r=n.commitHydratedSuspenseInstance;n.clearSuspenseBoundary,n.clearSuspenseBoundaryFromContainer;var Ad=n.didNotMatchHydratedContainerTextInstance,Tv=n.didNotMatchHydratedTextInstance,Cv=n.didNotHydrateContainerInstance,qr=n.didNotHydrateInstance,Rv=n.didNotFindHydratableContainerInstance,Ol=n.didNotFindHydratableContainerTextInstance,Ov=n.didNotFindHydratableContainerSuspenseInstance,si=n.didNotFindHydratableInstance,Al=n.didNotFindHydratableTextInstance,Ml=n.didNotFindHydratableSuspenseInstance,bi=0,Zo,Pl,dc,Ll,hc,Ls,Lr;function Ni(){}Ni.__reactDisabledLog=!0;function Yr(){{if(bi===0){Zo=console.log,Pl=console.info,dc=console.warn,Ll=console.error,hc=console.group,Ls=console.groupCollapsed,Lr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Ni,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}bi++}}function oi(){{if(bi--,bi===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:c({},r,{value:Zo}),info:c({},r,{value:Pl}),warn:c({},r,{value:dc}),error:c({},r,{value:Ll}),group:c({},r,{value:hc}),groupCollapsed:c({},r,{value:Ls}),groupEnd:c({},r,{value:Lr})})}bi<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Si=g.ReactCurrentDispatcher,xi;function zi(r,s,u){{if(xi===void 0)try{throw Error()}catch(v){var h=v.stack.trim().match(/\n( *(at )?)/);xi=h&&h[1]||""}return`
|
|
67
|
+
`+xi+r}}var Ds=!1,Jo;{var Md=typeof WeakMap=="function"?WeakMap:Map;Jo=new Md}function ho(r,s){if(!r||Ds)return"";{var u=Jo.get(r);if(u!==void 0)return u}var h;Ds=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=Si.current,Si.current=null,Yr();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(Pe){h=Pe}Reflect.construct(r,[],E)}else{try{E.call()}catch(Pe){h=Pe}r.call(E.prototype)}}else{try{throw Error()}catch(Pe){h=Pe}r()}}catch(Pe){if(Pe&&h&&typeof Pe.stack=="string"){for(var O=Pe.stack.split(`
|
|
68
|
+
`),k=h.stack.split(`
|
|
69
|
+
`),B=O.length-1,Y=k.length-1;B>=1&&Y>=0&&O[B]!==k[Y];)Y--;for(;B>=1&&Y>=0;B--,Y--)if(O[B]!==k[Y]){if(B!==1||Y!==1)do if(B--,Y--,Y<0||O[B]!==k[Y]){var ie=`
|
|
70
|
+
`+O[B].replace(" at new "," at ");return typeof r=="function"&&Jo.set(r,ie),ie}while(B>=1&&Y>=0);break}}}finally{Ds=!1,Si.current=b,oi(),Error.prepareStackTrace=v}var ue=r?r.displayName||r.name:"",Te=ue?zi(ue):"";return typeof r=="function"&&Jo.set(r,Te),Te}function Dl(r,s,u){return ho(r,!0)}function po(r,s,u){return ho(r,!1)}function Pd(r){var s=r.prototype;return!!(s&&s.isReactComponent)}function kl(r,s,u){if(r==null)return"";if(typeof r=="function")return ho(r,Pd(r));if(typeof r=="string")return zi(r);switch(r){case St:return zi("Suspense");case ht:return zi("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case Pt:return po(r.render);case ke:return kl(r.type,s,u);case st:return po(r._render);case qe:{var h=r,v=h._payload,b=h._init;try{return kl(b(v),s,u)}catch{}}}return""}var Nl={},ea=g.ReactDebugCurrentFrame;function ns(r){if(r){var s=r._owner,u=kl(r.type,r._source,s?s.type:null);ea.setExtraStackFrame(u)}else ea.setExtraStackFrame(null)}function Sr(r,s,u,h,v){{var b=Function.call.bind(Object.prototype.hasOwnProperty);for(var E in r)if(b(r,E)){var O=void 0;try{if(typeof r[E]!="function"){var k=Error((h||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}O=r[E](s,E,h,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(B){O=B}O&&!(O instanceof Error)&&(ns(v),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).",h||"React class",u,E,typeof O),ns(null)),O instanceof Error&&!(O.message in Nl)&&(Nl[O.message]=!0,ns(v),m("Failed %s type: %s",u,O.message),ns(null))}}}var zl=[],ks;ks=[];var wi=-1;function Qr(r){return{current:r}}function Jt(r,s){if(wi<0){m("Unexpected pop.");return}s!==ks[wi]&&m("Unexpected Fiber popped."),r.current=zl[wi],zl[wi]=null,ks[wi]=null,wi--}function Mn(r,s,u){wi++,zl[wi]=r.current,ks[wi]=u,r.current=s}var rs;rs={};var wn={};Object.freeze(wn);var ai=Qr(wn),lr=Qr(!1),_l=wn;function is(r,s,u){return u&&Kn(s)?_l:ai.current}function yn(r,s,u){{var h=r.stateNode;h.__reactInternalMemoizedUnmaskedChildContext=s,h.__reactInternalMemoizedMaskedChildContext=u}}function _i(r,s){{var u=r.type,h=u.contextTypes;if(!h)return wn;var v=r.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===s)return v.__reactInternalMemoizedMaskedChildContext;var b={};for(var E in h)b[E]=s[E];{var O=Le(u)||"Unknown";Sr(h,b,"context",O)}return v&&yn(r,s,b),b}}function Gr(){return lr.current}function Kn(r){{var s=r.childContextTypes;return s!=null}}function Dr(r){Jt(lr,r),Jt(ai,r)}function jl(r){Jt(lr,r),Jt(ai,r)}function pc(r,s,u){{if(ai.current!==wn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Mn(ai,s,r),Mn(lr,u,r)}}function Il(r,s,u){{var h=r.stateNode,v=s.childContextTypes;if(typeof h.getChildContext!="function"){{var b=Le(s)||"Unknown";rs[b]||(rs[b]=!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.",b,b))}return u}var E=h.getChildContext();for(var O in E)if(!(O in v))throw Error((Le(s)||"Unknown")+'.getChildContext(): key "'+O+'" is not defined in childContextTypes.');{var k=Le(s)||"Unknown";Sr(v,E,"child context",k)}return c({},u,E)}}function ta(r){{var s=r.stateNode,u=s&&s.__reactInternalMemoizedMergedChildContext||wn;return _l=ai.current,Mn(ai,u,r),Mn(lr,lr.current,r),!0}}function na(r,s,u){{var h=r.stateNode;if(!h)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 v=Il(r,s,_l);h.__reactInternalMemoizedMergedChildContext=v,Jt(lr,r),Jt(ai,r),Mn(ai,v,r),Mn(lr,u,r)}else Jt(lr,r),Mn(lr,u,r)}}function vc(r){{if(!(nc(r)&&r.tag===D))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=r;do{switch(s.tag){case z:return s.stateNode.context;case D:{var u=s.type;if(Kn(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 Ns=0,Ul=1,vo=2,ur=null,xr=null,on=!1,Zn=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function qn(r){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{ur=s.inject(r),xr=s}catch(u){m("React instrumentation encountered an error: %s.",u)}return!0}function Fl(r,s){if(xr&&typeof xr.onScheduleFiberRoot=="function")try{xr.onScheduleFiberRoot(ur,r,s)}catch(u){on||(on=!0,m("React instrumentation encountered an error: %s",u))}}function ra(r,s){if(xr&&typeof xr.onCommitFiberRoot=="function")try{var u=(r.current.flags&ne)===ne;Pr&&xr.onCommitFiberRoot(ur,r,s,u)}catch(h){on||(on=!0,m("React instrumentation encountered an error: %s",h))}}function wr(r){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(ur,r)}catch(s){on||(on=!0,m("React instrumentation encountered an error: %s",s))}}var mc=f.unstable_now;if(!(p.__interactionsRef!=null&&p.__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 Bl=99,ss=98,os=97,Ei=96,mo=95,ia=90;mc();var zs=15,sa=14,gc=13,as=12,oa=11,_s=10,aa=9,ji=8,Hl=7,la=6,go=5,yc=4,bc=3,ua=2,Vl=1,Ii=0,Ld=31,ye=0,Jn=0,zt=1,ca=2,Wl=4,$l=24,Dd=32,Xr=192,cr=256,ql=3584,Sc=4096,js=4186112,yo=62914560,Is=33554432,fa=67108864,xc=134217727,Yl=134217728,Ql=805306368,kr=1073741824,bn=-1,wc=Ii;function Ec(){return wc}function Tc(r){wc=r}var en=ji;function Ui(r){if((zt&r)!==ye)return en=zs,zt;if((ca&r)!==ye)return en=sa,ca;if((Wl&r)!==ye)return en=gc,Wl;var s=$l&r;if(s!==ye)return en=as,s;if((r&Dd)!==ye)return en=oa,Dd;var u=Xr&r;if(u!==ye)return en=_s,u;if((r&cr)!==ye)return en=aa,cr;var h=ql&r;if(h!==ye)return en=ji,h;if((r&Sc)!==ye)return en=Hl,Sc;var v=js&r;if(v!==ye)return en=la,v;var b=yo&r;if(b!==ye)return en=go,b;if(r&fa)return en=yc,fa;if((r&Yl)!==ye)return en=bc,Yl;var E=Ql&r;return E!==ye?(en=ua,E):(kr&r)!==ye?(en=Vl,kr):(m("Should have found matching lanes. This is a bug in React."),en=ji,r)}function kd(r){switch(r){case Bl:return zs;case ss:return _s;case os:case Ei:return ji;case mo:return ua;default:return Ii}}function Fi(r){switch(r){case zs:case sa:return Bl;case gc:case as:case oa:case _s:return ss;case aa:case ji:case Hl:case la:case yc:case go:return os;case bc:case ua:case Vl:return mo;case Ii:return ia;default:throw Error("Invalid update priority: "+r+". This is a bug in React.")}}function Er(r,s){var u=r.pendingLanes;if(u===ye)return en=Ii,ye;var h=ye,v=Ii,b=r.expiredLanes,E=r.suspendedLanes,O=r.pingedLanes;if(b!==ye)h=b,v=en=zs;else{var k=u&xc;if(k!==ye){var B=k&~E;if(B!==ye)h=Ui(B),v=en;else{var Y=k&O;Y!==ye&&(h=Ui(Y),v=en)}}else{var ie=u&~E;ie!==ye?(h=Ui(ie),v=en):O!==ye&&(h=Ui(O),v=en)}}if(h===ye)return ye;if(h=u&Id(h),s!==ye&&s!==h&&(s&E)===ye){Ui(s);var ue=en;if(v<=ue)return s;en=v}var Te=r.entangledLanes;if(Te!==ye)for(var Pe=r.entanglements,_e=h&Te;_e>0;){var pt=ls(_e),Mt=1<<pt;h|=Pe[pt],_e&=~Mt}return h}function da(r,s){for(var u=r.eventTimes,h=bn;s>0;){var v=ls(s),b=1<<v,E=u[v];E>h&&(h=E),s&=~b}return h}function ha(r,s){Ui(r);var u=en;return u>=_s?s+250:u>=la?s+5e3:bn}function Gl(r,s){for(var u=r.pendingLanes,h=r.suspendedLanes,v=r.pingedLanes,b=r.expirationTimes,E=u;E>0;){var O=ls(E),k=1<<O,B=b[O];B===bn?((k&h)===ye||(k&v)!==ye)&&(b[O]=ha(k,s)):B<=s&&(r.expiredLanes|=k),E&=~k}}function Xl(r){return Ui(r.pendingLanes)}function Cc(r){var s=r.pendingLanes&~kr;return s!==ye?s:s&kr?kr:ye}function pa(){return en}function Nd(r){return(r&xc)!==ye}function zd(r){return(r&yo)===r}function Rc(r){return(r&js)===r}function bo(r,s){switch(r){case Ii:break;case zs:return zt;case sa:return ca;case as:{var u=fr($l&~s);return u===Jn?bo(_s,s):u}case _s:{var h=fr(Xr&~s);return h===Jn?bo(ji,s):h}case ji:{var v=fr(ql&~s);return v===Jn&&(v=fr(js&~s),v===Jn&&(v=fr(ql))),v}case la:case go:break;case ua:var b=fr(Ql&~s);return b===Jn&&(b=fr(Ql)),b}throw Error("Invalid update priority: "+r+". This is a bug in React.")}function Av(r,s){var u=fr(js&~s);return u===Jn&&(u=fr(js&~r),u===Jn&&(u=fr(js))),u}function _d(r){var s=fr(yo&~r);return s===Jn&&(s=fr(yo)),s}function jd(r){return r&-r}function Mv(r){var s=31-ya(r);return s<0?ye:1<<s}function Id(r){return(Mv(r)<<1)-1}function fr(r){return jd(r)}function ls(r){return 31-ya(r)}function Pv(r){return ls(r)}function Yn(r,s){return(r&s)!==ye}function us(r,s){return(r&s)===s}function It(r,s){return r|s}function va(r,s){return r&~s}function Lv(r){return r}function Ud(r,s){return r!==Jn&&r<s?r:s}function ma(r){for(var s=[],u=0;u<Ld;u++)s.push(r);return s}function So(r,s,u){r.pendingLanes|=s;var h=s-1;r.suspendedLanes&=h,r.pingedLanes&=h;var v=r.eventTimes,b=Pv(s);v[b]=u}function Fd(r,s){r.suspendedLanes|=s,r.pingedLanes&=~s;for(var u=r.expirationTimes,h=s;h>0;){var v=ls(h),b=1<<v;u[v]=bn,h&=~b}}function Kl(r,s,u){r.pingedLanes|=r.suspendedLanes&s}function Bd(r,s){r.expiredLanes|=s&r.pendingLanes}function Zl(r){r.expiredLanes|=$l&r.pendingLanes}function Dv(r){return(r&$l)!==ye}function ga(r,s){r.mutableReadLanes|=s&r.pendingLanes}function Jl(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s;for(var h=r.entanglements,v=r.eventTimes,b=r.expirationTimes,E=u;E>0;){var O=ls(E),k=1<<O;h[O]=ye,v[O]=bn,b[O]=bn,E&=~k}}function eu(r,s){r.entangledLanes|=s;for(var u=r.entanglements,h=s;h>0;){var v=ls(h),b=1<<v;u[v]|=s,h&=~b}}var ya=Math.clz32?Math.clz32:Oc,tu=Math.log,ba=Math.LN2;function Oc(r){return r===0?32:31-(tu(r)/ba|0)|0}var Ac=f.unstable_runWithPriority,Sa=f.unstable_scheduleCallback,Mc=f.unstable_cancelCallback,Pc=f.unstable_shouldYield,xa=f.unstable_requestPaint,Lc=f.unstable_now,kv=f.unstable_getCurrentPriorityLevel,Us=f.unstable_ImmediatePriority,nu=f.unstable_UserBlockingPriority,ru=f.unstable_NormalPriority,ct=f.unstable_LowPriority,er=f.unstable_IdlePriority;if(!(p.__interactionsRef!=null&&p.__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 Pn={},Gt=99,Nr=98,Kr=97,Bn=96,wa=95,cs=90,Ea=Pc,xo=xa!==void 0?xa:function(){},li=null,wo=null,Ta=!1,iu=Lc(),hn=iu<1e4?Lc:function(){return Lc()-iu};function Ye(){switch(kv()){case Us:return Gt;case nu:return Nr;case ru:return Kr;case ct:return Bn;case er:return wa;default:throw Error("Unknown priority level.")}}function Ca(r){switch(r){case Gt:return Us;case Nr:return nu;case Kr:return ru;case Bn:return ct;case wa:return er;default:throw Error("Unknown priority level.")}}function ui(r,s){var u=Ca(r);return Ac(u,s)}function Qn(r,s,u){var h=Ca(r);return Sa(h,s,u)}function fs(r){return li===null?(li=[r],wo=Sa(Us,su)):li.push(r),Pn}function Eo(r){r!==Pn&&Mc(r)}function tr(){if(wo!==null){var r=wo;wo=null,Mc(r)}su()}function su(){if(!Ta&&li!==null){Ta=!0;var r=0;try{var s=!0,u=li;ui(Gt,function(){for(;r<u.length;r++){var h=u[r];do h=h(s);while(h!==null)}}),li=null}catch(h){throw li!==null&&(li=li.slice(r+1)),Sa(Us,tr),h}finally{Ta=!1}}}var an=0,Vt=1,Hn=2,Bi=4,nr=8,Hi=16,ou=g.ReactCurrentBatchConfig,Ra=0;function Oa(){return ou.transition}function Tr(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var zn=typeof Object.is=="function"?Object.is:Tr,Vi=Object.prototype.hasOwnProperty;function Fs(r,s){if(zn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),h=Object.keys(s);if(u.length!==h.length)return!1;for(var v=0;v<u.length;v++)if(!Vi.call(s,u[v])||!zn(r[u[v]],s[u[v]]))return!1;return!0}function zr(r){switch(r._debugOwner&&r._debugOwner.type,r._debugSource,r.tag){case L:return zi(r.type);case we:return zi("Lazy");case V:return zi("Suspense");case Fe:return zi("SuspenseList");case R:case A:case ge:return po(r.type);case K:return po(r.type.render);case Oe:return po(r.type._render);case D:return Dl(r.type);default:return""}}function Dc(r){try{var s="",u=r;do s+=zr(u),u=u.return;while(u);return s}catch(h){return`
|
|
71
|
+
Error generating stack: `+h.message+`
|
|
72
|
+
`+h.stack}}var Bs=g.ReactDebugCurrentFrame,rr=null,To=!1;function Hd(){{if(rr===null)return null;var r=rr._debugOwner;if(r!==null&&typeof r<"u")return Le(r.type)}return null}function Vd(){return rr===null?"":Dc(rr)}function Gn(){Bs.getCurrentStack=null,rr=null,To=!1}function Ln(r){Bs.getCurrentStack=Vd,rr=r,To=!1}function dr(r){To=r}function Wd(){return To}var Zr={recordUnsafeLifecycleWarnings:function(r,s){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(r,s){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var Aa=function(r){for(var s=null,u=r;u!==null;)u.mode&Vt&&(s=u),u=u.return;return s},Hs=function(r){var s=[];return r.forEach(function(u){s.push(u)}),s.sort().join(", ")},Ma=[],Co=[],Ro=[],ci=[],Pa=[],La=[],hr=new Set;Zr.recordUnsafeLifecycleWarnings=function(r,s){hr.has(r.type)||(typeof s.componentWillMount=="function"&&s.componentWillMount.__suppressDeprecationWarning!==!0&&Ma.push(r),r.mode&Vt&&typeof s.UNSAFE_componentWillMount=="function"&&Co.push(r),typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Ro.push(r),r.mode&Vt&&typeof s.UNSAFE_componentWillReceiveProps=="function"&&ci.push(r),typeof s.componentWillUpdate=="function"&&s.componentWillUpdate.__suppressDeprecationWarning!==!0&&Pa.push(r),r.mode&Vt&&typeof s.UNSAFE_componentWillUpdate=="function"&&La.push(r))},Zr.flushPendingUnsafeLifecycleWarnings=function(){var r=new Set;Ma.length>0&&(Ma.forEach(function(ue){r.add(Le(ue.type)||"Component"),hr.add(ue.type)}),Ma=[]);var s=new Set;Co.length>0&&(Co.forEach(function(ue){s.add(Le(ue.type)||"Component"),hr.add(ue.type)}),Co=[]);var u=new Set;Ro.length>0&&(Ro.forEach(function(ue){u.add(Le(ue.type)||"Component"),hr.add(ue.type)}),Ro=[]);var h=new Set;ci.length>0&&(ci.forEach(function(ue){h.add(Le(ue.type)||"Component"),hr.add(ue.type)}),ci=[]);var v=new Set;Pa.length>0&&(Pa.forEach(function(ue){v.add(Le(ue.type)||"Component"),hr.add(ue.type)}),Pa=[]);var b=new Set;if(La.length>0&&(La.forEach(function(ue){b.add(Le(ue.type)||"Component"),hr.add(ue.type)}),La=[]),s.size>0){var E=Hs(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
|
|
|
76
|
-
Please update the following components: %s`,E)}if(
|
|
76
|
+
Please update the following components: %s`,E)}if(h.size>0){var O=Hs(h);m(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
77
77
|
|
|
78
78
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
79
79
|
* 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
|
|
80
80
|
|
|
81
|
-
Please update the following components: %s`,
|
|
81
|
+
Please update the following components: %s`,O)}if(b.size>0){var k=Hs(b);m(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
82
82
|
|
|
83
83
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
84
84
|
|
|
85
|
-
Please update the following components: %s`,
|
|
85
|
+
Please update the following components: %s`,k)}if(r.size>0){var B=Hs(r);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`,
|
|
90
|
+
Please update the following components: %s`,B)}if(u.size>0){var Y=Hs(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`,
|
|
96
|
+
Please update the following components: %s`,Y)}if(v.size>0){var ie=Hs(v);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`,
|
|
101
|
+
Please update the following components: %s`,ie)}};var au=new Map,kc=new Set;Zr.recordLegacyContextWarning=function(r,s){var u=Aa(r);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(!kc.has(r.type)){var h=au.get(u);(r.type.contextTypes!=null||r.type.childContextTypes!=null||s!==null&&typeof s.getChildContext=="function")&&(h===void 0&&(h=[],au.set(u,h)),h.push(r))}},Zr.flushLegacyContextWarning=function(){au.forEach(function(r,s){if(r.length!==0){var u=r[0],h=new Set;r.forEach(function(b){h.add(Le(b.type)||"Component"),kc.add(b.type)});var v=Hs(h);try{Ln(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{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(Rn(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,Cn=rt.eventTime;if(is(d,Zt)){if(gt!==null){var oe={eventTime:Cn,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:Cn,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,He,Je,Me,Pt,Qt,Oi,G,W,ne,Ae;{He=new Set,Je=new Set,Me=new Set,Pt=new Set,W=new Set,Qt=new Set,ne=new Set,Ae=new Set;var We=new Set;G=function(i,s){if(!(i===null||typeof i=="function")){var u=s+"_"+i;We.has(u)||(We.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 wn(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,Ie(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.
|
|
107
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,v)}finally{Gn()}}})},Zr.discardPendingWarnings=function(){Ma=[],Co=[],Ro=[],ci=[],Pa=[],La=[],au=new Map}}function fi(r,s){if(r&&r.defaultProps){var u=c({},s),h=r.defaultProps;for(var v in h)u[v]===void 0&&(u[v]=h[v]);return u}return s}var Da=1073741823,di=Qr(null),ka;ka={};var lu=null,Vs=null,Ws=null,Oo=!1;function Na(){lu=null,Vs=null,Ws=null,Oo=!1}function uu(){Oo=!0}function Nc(){Oo=!1}function za(r,s){var u=r.type._context;xn?(Mn(di,u._currentValue,r),u._currentValue=s,u._currentRenderer!==void 0&&u._currentRenderer!==null&&u._currentRenderer!==ka&&m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer=ka):(Mn(di,u._currentValue2,r),u._currentValue2=s,u._currentRenderer2!==void 0&&u._currentRenderer2!==null&&u._currentRenderer2!==ka&&m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),u._currentRenderer2=ka)}function cu(r){var s=di.current;Jt(di,r);var u=r.type._context;xn?u._currentValue=s:u._currentValue2=s}function Nv(r,s,u){if(zn(u,s))return 0;var h=typeof r._calculateChangedBits=="function"?r._calculateChangedBits(u,s):Da;return(h&Da)!==h&&m("calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",h),h|0}function _r(r,s){for(var u=r;u!==null;){var h=u.alternate;if(!us(u.childLanes,s))u.childLanes=It(u.childLanes,s),h!==null&&(h.childLanes=It(h.childLanes,s));else if(h!==null&&!us(h.childLanes,s))h.childLanes=It(h.childLanes,s);else break;u=u.return}}function zc(r,s,u,h){var v=r.child;for(v!==null&&(v.return=r);v!==null;){var b=void 0,E=v.dependencies;if(E!==null){b=v.child;for(var O=E.firstContext;O!==null;){if(O.context===s&&O.observedBits&u){if(v.tag===D){var k=ds(bn,fr(h));k.tag=Mo,hs(v,k)}v.lanes=It(v.lanes,h);var B=v.alternate;B!==null&&(B.lanes=It(B.lanes,h)),_r(v.return,h),E.lanes=It(E.lanes,h);break}O=O.next}}else v.tag===j?b=v.type===r.type?null:v.child:b=v.child;if(b!==null)b.return=v;else for(b=v;b!==null;){if(b===r){b=null;break}var Y=b.sibling;if(Y!==null){Y.return=b.return,b=Y;break}b=b.return}v=b}}function Ao(r,s){lu=r,Vs=null,Ws=null;var u=r.dependencies;if(u!==null){var h=u.firstContext;h!==null&&(Yn(u.lanes,s)&&Mm(),u.firstContext=null)}}function tn(r,s){if(Oo&&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()."),Ws!==r){if(!(s===!1||s===0)){var u;typeof s!="number"||s===Da?(Ws=r,u=Da):u=s;var h={context:r,observedBits:u,next:null};if(Vs===null){if(lu===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().");Vs=h,lu.dependencies={lanes:ye,firstContext:h,responders:null}}else Vs=Vs.next=h}}return xn?r._currentValue:r._currentValue2}var _a=0,$s=1,Mo=2,ja=3,Po=!1,_c,Ia;_c=!1,Ia=null;function fu(r){var s={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null};r.updateQueue=s}function Ua(r,s){var u=s.updateQueue,h=r.updateQueue;if(u===h){var v={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects};s.updateQueue=v}}function ds(r,s){var u={eventTime:r,lane:s,tag:_a,payload:null,callback:null,next:null};return u}function hs(r,s){var u=r.updateQueue;if(u!==null){var h=u.shared,v=h.pending;v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,Ia===h&&!_c&&(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."),_c=!0)}}function o(r,s){var u=r.updateQueue,h=r.alternate;if(h!==null){var v=h.updateQueue;if(u===v){var b=null,E=null,O=u.firstBaseUpdate;if(O!==null){var k=O;do{var B={eventTime:k.eventTime,lane:k.lane,tag:k.tag,payload:k.payload,callback:k.callback,next:null};E===null?b=E=B:(E.next=B,E=B),k=k.next}while(k!==null);E===null?b=E=s:(E.next=s,E=s)}else b=E=s;u={baseState:v.baseState,firstBaseUpdate:b,lastBaseUpdate:E,shared:v.shared,effects:v.effects},r.updateQueue=u;return}}var Y=u.lastBaseUpdate;Y===null?u.firstBaseUpdate=s:Y.next=s,u.lastBaseUpdate=s}function l(r,s,u,h,v,b){switch(u.tag){case $s:{var E=u.payload;if(typeof E=="function"){uu();var O=E.call(b,h,v);{if(r.mode&Vt){Yr();try{E.call(b,h,v)}finally{oi()}}Nc()}return O}return E}case ja:r.flags=r.flags&~Bt|ne;case _a:{var k=u.payload,B;if(typeof k=="function"){uu(),B=k.call(b,h,v);{if(r.mode&Vt){Yr();try{k.call(b,h,v)}finally{oi()}}Nc()}}else B=k;return B==null?h:c({},h,B)}case Mo:return Po=!0,h}return h}function d(r,s,u,h){var v=r.updateQueue;Po=!1,Ia=v.shared;var b=v.firstBaseUpdate,E=v.lastBaseUpdate,O=v.shared.pending;if(O!==null){v.shared.pending=null;var k=O,B=k.next;k.next=null,E===null?b=B:E.next=B,E=k;var Y=r.alternate;if(Y!==null){var ie=Y.updateQueue,ue=ie.lastBaseUpdate;ue!==E&&(ue===null?ie.firstBaseUpdate=B:ue.next=B,ie.lastBaseUpdate=k)}}if(b!==null){var Te=v.baseState,Pe=ye,_e=null,pt=null,Mt=null,bt=b;do{var fn=bt.lane,Nn=bt.eventTime;if(us(h,fn)){if(Mt!==null){var pe={eventTime:Nn,lane:Jn,tag:bt.tag,payload:bt.payload,callback:bt.callback,next:null};Mt=Mt.next=pe}Te=l(r,v,bt,Te,s,u);var G=bt.callback;if(G!==null){r.flags|=J;var Ce=v.effects;Ce===null?v.effects=[bt]:Ce.push(bt)}}else{var se={eventTime:Nn,lane:fn,tag:bt.tag,payload:bt.payload,callback:bt.callback,next:null};Mt===null?(pt=Mt=se,_e=Te):Mt=Mt.next=se,Pe=It(Pe,fn)}if(bt=bt.next,bt===null){if(O=v.shared.pending,O===null)break;var Qe=O,Ke=Qe.next;Qe.next=null,bt=Ke,v.lastBaseUpdate=Qe,v.shared.pending=null}}while(!0);Mt===null&&(_e=Te),v.baseState=_e,v.firstBaseUpdate=pt,v.lastBaseUpdate=Mt,tg(Pe),r.lanes=Pe,r.memoizedState=Te}Ia=null}function y(r,s){if(typeof r!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+r);r.call(s)}function S(){Po=!1}function C(){return Po}function _(r,s,u){var h=s.effects;if(s.effects=null,h!==null)for(var v=0;v<h.length;v++){var b=h[v],E=b.callback;E!==null&&(b.callback=null,y(E,u))}}var H={},ce=Array.isArray,ze=new a.Component().refs,rt,mt,We,Yt,ln,jr,te,q,fe,He;{rt=new Set,mt=new Set,We=new Set,Yt=new Set,q=new Set,ln=new Set,fe=new Set,He=new Set;var ot=new Set;te=function(r,s){if(!(r===null||typeof r=="function")){var u=s+"_"+r;ot.has(u)||(ot.add(u),m("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",s,r))}},jr=function(r,s){if(s===void 0){var u=Le(r)||"Component";ln.has(u)||(ln.add(u),m("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",u))}},Object.defineProperty(H,"_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(H)}function Qt(r,s,u,h){var v=r.memoizedState;if(r.mode&Vt){Yr();try{u(h,v)}finally{oi()}}var b=u(h,v);jr(s,b);var E=b==null?v:c({},v,b);if(r.memoizedState=E,r.lanes===ye){var O=r.updateQueue;O.baseState=E}}var gt={isMounted:rc,enqueueSetState:function(r,s,u){var h=W(r),v=ni(),b=zo(h),E=ds(v,b);E.payload=s,u!=null&&(te(u,"setState"),E.callback=u),hs(h,E),vr(h,b,v)},enqueueReplaceState:function(r,s,u){var h=W(r),v=ni(),b=zo(h),E=ds(v,b);E.tag=$s,E.payload=s,u!=null&&(te(u,"replaceState"),E.callback=u),hs(h,E),vr(h,b,v)},enqueueForceUpdate:function(r,s){var u=W(r),h=ni(),v=zo(u),b=ds(h,v);b.tag=Mo,s!=null&&(te(s,"forceUpdate"),b.callback=s),hs(u,b),vr(u,v,h)}};function Ut(r,s,u,h,v,b,E){var O=r.stateNode;if(typeof O.shouldComponentUpdate=="function"){if(r.mode&Vt){Yr();try{O.shouldComponentUpdate(h,b,E)}finally{oi()}}var k=O.shouldComponentUpdate(h,b,E);return k===void 0&&m("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Le(s)||"Component"),k}return s.prototype&&s.prototype.isPureReactComponent?!Fs(u,h)||!Fs(v,b):!0}function Dn(r,s,u){var h=r.stateNode;{var v=Le(s)||"Component",b=h.render;b||(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?",v):m("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",v)),h.getInitialState&&!h.getInitialState.isReactClassApproved&&!h.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?",v),h.getDefaultProps&&!h.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.",v),h.propTypes&&m("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",v),h.contextType&&m("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",v),h.contextTypes&&m("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",v),s.contextType&&s.contextTypes&&!fe.has(s)&&(fe.add(s),m("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",v)),typeof h.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.",v),s.prototype&&s.prototype.isPureReactComponent&&typeof h.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.",Le(s)||"A pure component"),typeof h.componentDidUnmount=="function"&&m("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",v),typeof h.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().",v),typeof h.componentWillRecieveProps=="function"&&m("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",v),typeof h.UNSAFE_componentWillRecieveProps=="function"&&m("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",v);var E=h.props!==u;h.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.",v,v),h.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.",v,v),typeof h.getSnapshotBeforeUpdate=="function"&&typeof h.componentDidUpdate!="function"&&!We.has(s)&&(We.add(s),m("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Le(s))),typeof h.getDerivedStateFromProps=="function"&&m("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",v),typeof h.getDerivedStateFromError=="function"&&m("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",v),typeof s.getSnapshotBeforeUpdate=="function"&&m("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",v);var O=h.state;O&&(typeof O!="object"||ce(O))&&m("%s.state: must be set to an object or null",v),typeof h.getChildContext=="function"&&typeof s.childContextTypes!="object"&&m("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",v)}}function At(r,s){s.updater=gt,r.stateNode=s,Re(s,r),s._reactInternalInstance=H}function Wi(r,s,u){var h=!1,v=wn,b=wn,E=s.contextType;if("contextType"in s){var O=E===null||E!==void 0&&E.$$typeof===xt&&E._context===void 0;if(!O&&!He.has(s)){He.add(s);var k="";E===void 0?k=" 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"?k=" However, it is set to a "+typeof E+".":E.$$typeof===yt?k=" Did you accidentally pass the Context.Provider instead?":E._context!==void 0?k=" Did you accidentally pass the Context.Consumer instead?":k=" 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",Le(s)||"Component",k)}}if(typeof E=="object"&&E!==null)b=tn(E);else{v=is(r,s,!0);var B=s.contextTypes;h=B!=null,b=h?_i(r,v):wn}if(r.mode&Vt){Yr();try{new s(u,b)}finally{oi()}}var Y=new s(u,b),ie=r.memoizedState=Y.state!==null&&Y.state!==void 0?Y.state:null;At(r,Y);{if(typeof s.getDerivedStateFromProps=="function"&&ie===null){var ue=Le(s)||"Component";mt.has(ue)||(mt.add(ue),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.",ue,Y.state===null?"null":"undefined",ue))}if(typeof s.getDerivedStateFromProps=="function"||typeof Y.getSnapshotBeforeUpdate=="function"){var Te=null,Pe=null,_e=null;if(typeof Y.componentWillMount=="function"&&Y.componentWillMount.__suppressDeprecationWarning!==!0?Te="componentWillMount":typeof Y.UNSAFE_componentWillMount=="function"&&(Te="UNSAFE_componentWillMount"),typeof Y.componentWillReceiveProps=="function"&&Y.componentWillReceiveProps.__suppressDeprecationWarning!==!0?Pe="componentWillReceiveProps":typeof Y.UNSAFE_componentWillReceiveProps=="function"&&(Pe="UNSAFE_componentWillReceiveProps"),typeof Y.componentWillUpdate=="function"&&Y.componentWillUpdate.__suppressDeprecationWarning!==!0?_e="componentWillUpdate":typeof Y.UNSAFE_componentWillUpdate=="function"&&(_e="UNSAFE_componentWillUpdate"),Te!==null||Pe!==null||_e!==null){var pt=Le(s)||"Component",Mt=typeof s.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Yt.has(pt)||(Yt.add(pt),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`,
|
|
113
|
-
`+
|
|
114
|
-
`+
|
|
115
|
-
`+
|
|
112
|
+
https://reactjs.org/link/unsafe-component-lifecycles`,pt,Mt,Te!==null?`
|
|
113
|
+
`+Te:"",Pe!==null?`
|
|
114
|
+
`+Pe:"",_e!==null?`
|
|
115
|
+
`+_e:""))}}}return h&&yn(r,v,b),Y}function zv(r,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.",Le(r.type)||"Component"),gt.enqueueReplaceState(s,s.state,null))}function j1(r,s,u,h){var v=s.state;if(typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,h),s.state!==v){{var b=Le(r.type)||"Component";rt.has(b)||(rt.add(b),m("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",b))}gt.enqueueReplaceState(s,s.state,null)}}function _v(r,s,u,h){Dn(r,s,u);var v=r.stateNode;v.props=u,v.state=r.memoizedState,v.refs=ze,fu(r);var b=s.contextType;if(typeof b=="object"&&b!==null)v.context=tn(b);else{var E=is(r,s,!0);v.context=_i(r,E)}{if(v.state===u){var O=Le(s)||"Component";q.has(O)||(q.add(O),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.",O))}r.mode&Vt&&Zr.recordLegacyContextWarning(r,v),Zr.recordUnsafeLifecycleWarnings(r,v)}d(r,u,v,h),v.state=r.memoizedState;var k=s.getDerivedStateFromProps;typeof k=="function"&&(Qt(r,s,k,u),v.state=r.memoizedState),typeof s.getDerivedStateFromProps!="function"&&typeof v.getSnapshotBeforeUpdate!="function"&&(typeof v.UNSAFE_componentWillMount=="function"||typeof v.componentWillMount=="function")&&(zv(r,v),d(r,u,v,h),v.state=r.memoizedState),typeof v.componentDidMount=="function"&&(r.flags|=le)}function MM(r,s,u,h){var v=r.stateNode,b=r.memoizedProps;v.props=b;var E=v.context,O=s.contextType,k=wn;if(typeof O=="object"&&O!==null)k=tn(O);else{var B=is(r,s,!0);k=_i(r,B)}var Y=s.getDerivedStateFromProps,ie=typeof Y=="function"||typeof v.getSnapshotBeforeUpdate=="function";!ie&&(typeof v.UNSAFE_componentWillReceiveProps=="function"||typeof v.componentWillReceiveProps=="function")&&(b!==u||E!==k)&&j1(r,v,u,k),S();var ue=r.memoizedState,Te=v.state=ue;if(d(r,u,v,h),Te=r.memoizedState,b===u&&ue===Te&&!Gr()&&!C())return typeof v.componentDidMount=="function"&&(r.flags|=le),!1;typeof Y=="function"&&(Qt(r,s,Y,u),Te=r.memoizedState);var Pe=C()||Ut(r,s,b,u,ue,Te,k);return Pe?(!ie&&(typeof v.UNSAFE_componentWillMount=="function"||typeof v.componentWillMount=="function")&&(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(r.flags|=le)):(typeof v.componentDidMount=="function"&&(r.flags|=le),r.memoizedProps=u,r.memoizedState=Te),v.props=u,v.state=Te,v.context=k,Pe}function PM(r,s,u,h,v){var b=s.stateNode;Ua(r,s);var E=s.memoizedProps,O=s.type===s.elementType?E:fi(s.type,E);b.props=O;var k=s.pendingProps,B=b.context,Y=u.contextType,ie=wn;if(typeof Y=="object"&&Y!==null)ie=tn(Y);else{var ue=is(s,u,!0);ie=_i(s,ue)}var Te=u.getDerivedStateFromProps,Pe=typeof Te=="function"||typeof b.getSnapshotBeforeUpdate=="function";!Pe&&(typeof b.UNSAFE_componentWillReceiveProps=="function"||typeof b.componentWillReceiveProps=="function")&&(E!==k||B!==ie)&&j1(s,b,h,ie),S();var _e=s.memoizedState,pt=b.state=_e;if(d(s,h,b,v),pt=s.memoizedState,E===k&&_e===pt&&!Gr()&&!C())return typeof b.componentDidUpdate=="function"&&(E!==r.memoizedProps||_e!==r.memoizedState)&&(s.flags|=le),typeof b.getSnapshotBeforeUpdate=="function"&&(E!==r.memoizedProps||_e!==r.memoizedState)&&(s.flags|=Ae),!1;typeof Te=="function"&&(Qt(s,u,Te,h),pt=s.memoizedState);var Mt=C()||Ut(s,u,O,h,_e,pt,ie);return Mt?(!Pe&&(typeof b.UNSAFE_componentWillUpdate=="function"||typeof b.componentWillUpdate=="function")&&(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,pt,ie),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,pt,ie)),typeof b.componentDidUpdate=="function"&&(s.flags|=le),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=Ae)):(typeof b.componentDidUpdate=="function"&&(E!==r.memoizedProps||_e!==r.memoizedState)&&(s.flags|=le),typeof b.getSnapshotBeforeUpdate=="function"&&(E!==r.memoizedProps||_e!==r.memoizedState)&&(s.flags|=Ae),s.memoizedProps=h,s.memoizedState=pt),b.props=h,b.state=pt,b.context=ie,Mt}var jv,Iv,Uv,Fv,Bv,I1=function(r,s){};jv=!1,Iv=!1,Uv={},Fv={},Bv={},I1=function(r,s){if(!(r===null||typeof r!="object")&&!(!r._store||r._store.validated||r.key!=null)){if(typeof r._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.");r._store.validated=!0;var u=Le(s.type)||"Component";Fv[u]||(Fv[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 $d=Array.isArray;function jc(r,s,u){var h=u.ref;if(h!==null&&typeof h!="function"&&typeof h!="object"){if((r.mode&Vt||Ps)&&!(u._owner&&u._self&&u._owner.stateNode!==u._self)){var v=Le(r.type)||"Component";Uv[v]||(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',h),Uv[v]=!0)}if(u._owner){var b=u._owner,E;if(b){var O=b;if(O.tag!==D)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=O.stateNode}if(!E)throw Error("Missing owner for string ref "+h+". This error is likely caused by a bug in React. Please file an issue.");var k=""+h;if(s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===k)return s.ref;var B=function(Y){var ie=E.refs;ie===ze&&(ie=E.refs={}),Y===null?delete ie[k]:ie[k]=Y};return B._stringRef=k,B}else{if(typeof h!="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 ("+h+`) 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(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 bt=p(oe,Y);return bt.return=Z,bt}}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 bt=Jo(oe,Z.mode,Y,null);return bt.return=Z,bt}$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 bt=Z.get(ve.key===null?Y:ve.key)||null;return ve.type===dt?V(oe,bt,ve.props.children,Le,ve.key):D(oe,bt,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 bt=Y[_e];Le=ge(bt,Le,Z)}for(var nn=null,hn=null,Nt=oe,kn=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),kn=S(Kn,kn,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 An=K(Z,Y[Ot],ve);An!==null&&(kn=S(An,kn,Ot),hn===null?nn=An:hn.sibling=An,hn=An)}return nn}for(var ds=d(Z,Nt);Ot<Y.length;Ot++){var Mn=pe(ds,Z,Ot,Y[Ot],ve);Mn!==null&&(i&&Mn.alternate!==null&&ds.delete(Mn.key===null?Ot:Mn.key),kn=S(Mn,kn,Ot),hn===null?nn=Mn:hn.sibling=Mn,hn=Mn)}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 bt=null,nn=_e.next();!nn.done;nn=_e.next()){var hn=nn.value;bt=ge(hn,bt,Z)}}var Nt=Le.call(Y);if(Nt==null)throw Error("An iterable object provided no iterator.");for(var kn=null,Ot=null,pn=oe,Kn=0,An=0,ds=null,Mn=Nt.next();pn!==null&&!Mn.done;An++,Mn=Nt.next()){pn.index>An?(ds=pn,pn=null):ds=pn.sibling;var hs=ee(Z,pn,Mn.value,ve);if(hs===null){pn===null&&(pn=ds);break}i&&pn&&hs.alternate===null&&s(Z,pn),Kn=S(hs,Kn,An),Ot===null?kn=hs:Ot.sibling=hs,Ot=hs,pn=ds}if(Mn.done)return u(Z,pn),kn;if(pn===null){for(;!Mn.done;An++,Mn=Nt.next()){var el=K(Z,Mn.value,ve);el!==null&&(Kn=S(el,Kn,An),Ot===null?kn=el:Ot.sibling=el,Ot=el)}return kn}for(var pg=d(Z,pn);!Mn.done;An++,Mn=Nt.next()){var Pa=pe(pg,Z,An,Mn.value,ve);Pa!==null&&(i&&Pa.alternate!==null&&pg.delete(Pa.key===null?An:Pa.key),Kn=S(Pa,Kn,An),Ot===null?kn=Pa:Ot.sibling=Pa,Ot=Pa)}return i&&pg.forEach(function(hP){return s(Z,hP)}),kn}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 bt=p(_e,Y.props.children);return bt.return=Z,bt._debugSource=Y._source,bt._debugOwner=Y._owner,bt}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 bt=p(_e,Y.children||[]);return bt.return=Z,bt}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 Cn(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 bt=Z.stateNode;if(bt.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 Cn}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=Dn(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=Dn(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
|
-
`,u+=
|
|
119
|
+
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return h}function qd(r,s){if(r.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 Yd(r){{var s=Le(r.type)||"Component";if(Bv[s])return;Bv[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 U1(r){function s(se,pe){if(r){var G=se.lastEffect;G!==null?(G.nextEffect=pe,se.lastEffect=pe):se.firstEffect=se.lastEffect=pe,pe.nextEffect=null,pe.flags=be}}function u(se,pe){if(!r)return null;for(var G=pe;G!==null;)s(se,G),G=G.sibling;return null}function h(se,pe){for(var G=new Map,Ce=pe;Ce!==null;)Ce.key!==null?G.set(Ce.key,Ce):G.set(Ce.index,Ce),Ce=Ce.sibling;return G}function v(se,pe){var G=el(se,pe);return G.index=0,G.sibling=null,G}function b(se,pe,G){if(se.index=G,!r)return pe;var Ce=se.alternate;if(Ce!==null){var Qe=Ce.index;return Qe<pe?(se.flags=de,pe):Qe}else return se.flags=de,pe}function E(se){return r&&se.alternate===null&&(se.flags=de),se}function O(se,pe,G,Ce){if(pe===null||pe.tag!==M){var Qe=gg(G,se.mode,Ce);return Qe.return=se,Qe}else{var Ke=v(pe,G);return Ke.return=se,Ke}}function k(se,pe,G,Ce){if(pe!==null&&(pe.elementType===G.type||Tx(pe,G))){var Qe=v(pe,G.props);return Qe.ref=jc(se,pe,G),Qe.return=se,Qe._debugSource=G._source,Qe._debugOwner=G._owner,Qe}var Ke=vg(G,se.mode,Ce);return Ke.ref=jc(se,pe,G),Ke.return=se,Ke}function B(se,pe,G,Ce){if(pe===null||pe.tag!==P||pe.stateNode.containerInfo!==G.containerInfo||pe.stateNode.implementation!==G.implementation){var Qe=yg(G,se.mode,Ce);return Qe.return=se,Qe}else{var Ke=v(pe,G.children||[]);return Ke.return=se,Ke}}function Y(se,pe,G,Ce,Qe){if(pe===null||pe.tag!==F){var Ke=tl(G,se.mode,Ce,Qe);return Ke.return=se,Ke}else{var Lt=v(pe,G);return Lt.return=se,Lt}}function ie(se,pe,G){if(typeof pe=="string"||typeof pe=="number"){var Ce=gg(""+pe,se.mode,G);return Ce.return=se,Ce}if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case Ie:{var Qe=vg(pe,se.mode,G);return Qe.ref=jc(se,null,pe),Qe.return=se,Qe}case tt:{var Ke=yg(pe,se.mode,G);return Ke.return=se,Ke}}if($d(pe)||et(pe)){var Lt=tl(pe,se.mode,G,null);return Lt.return=se,Lt}qd(se,pe)}return typeof pe=="function"&&Yd(se),null}function ue(se,pe,G,Ce){var Qe=pe!==null?pe.key:null;if(typeof G=="string"||typeof G=="number")return Qe!==null?null:O(se,pe,""+G,Ce);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case Ie:return G.key===Qe?G.type===at?Y(se,pe,G.props.children,Ce,Qe):k(se,pe,G,Ce):null;case tt:return G.key===Qe?B(se,pe,G,Ce):null}if($d(G)||et(G))return Qe!==null?null:Y(se,pe,G,Ce,null);qd(se,G)}return typeof G=="function"&&Yd(se),null}function Te(se,pe,G,Ce,Qe){if(typeof Ce=="string"||typeof Ce=="number"){var Ke=se.get(G)||null;return O(pe,Ke,""+Ce,Qe)}if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case Ie:{var Lt=se.get(Ce.key===null?G:Ce.key)||null;return Ce.type===at?Y(pe,Lt,Ce.props.children,Qe,Ce.key):k(pe,Lt,Ce,Qe)}case tt:{var pn=se.get(Ce.key===null?G:Ce.key)||null;return B(pe,pn,Ce,Qe)}}if($d(Ce)||et(Ce)){var Tn=se.get(G)||null;return Y(pe,Tn,Ce,Qe,null)}qd(pe,Ce)}return typeof Ce=="function"&&Yd(pe),null}function Pe(se,pe,G){{if(typeof se!="object"||se===null)return pe;switch(se.$$typeof){case Ie:case tt:I1(se,G);var Ce=se.key;if(typeof Ce!="string")break;if(pe===null){pe=new Set,pe.add(Ce);break}if(!pe.has(Ce)){pe.add(Ce);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.",Ce);break}}return pe}function _e(se,pe,G,Ce){for(var Qe=null,Ke=0;Ke<G.length;Ke++){var Lt=G[Ke];Qe=Pe(Lt,Qe,se)}for(var pn=null,Tn=null,Xt=pe,Vn=0,Wt=0,Cn=null;Xt!==null&&Wt<G.length;Wt++){Xt.index>Wt?(Cn=Xt,Xt=null):Cn=Xt.sibling;var sr=ue(se,Xt,G[Wt],Ce);if(sr===null){Xt===null&&(Xt=Cn);break}r&&Xt&&sr.alternate===null&&s(se,Xt),Vn=b(sr,Vn,Wt),Tn===null?pn=sr:Tn.sibling=sr,Tn=sr,Xt=Cn}if(Wt===G.length)return u(se,Xt),pn;if(Xt===null){for(;Wt<G.length;Wt++){var _n=ie(se,G[Wt],Ce);_n!==null&&(Vn=b(_n,Vn,Wt),Tn===null?pn=_n:Tn.sibling=_n,Tn=_n)}return pn}for(var ys=h(se,Xt);Wt<G.length;Wt++){var jn=Te(ys,se,Wt,G[Wt],Ce);jn!==null&&(r&&jn.alternate!==null&&ys.delete(jn.key===null?Wt:jn.key),Vn=b(jn,Vn,Wt),Tn===null?pn=jn:Tn.sibling=jn,Tn=jn)}return r&&ys.forEach(function(bs){return s(se,bs)}),pn}function pt(se,pe,G,Ce){var Qe=et(G);if(typeof Qe!="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"&&G[Symbol.toStringTag]==="Generator"&&(Iv||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."),Iv=!0),G.entries===Qe&&(jv||m("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),jv=!0);var Ke=Qe.call(G);if(Ke)for(var Lt=null,pn=Ke.next();!pn.done;pn=Ke.next()){var Tn=pn.value;Lt=Pe(Tn,Lt,se)}}var Xt=Qe.call(G);if(Xt==null)throw Error("An iterable object provided no iterator.");for(var Vn=null,Wt=null,Cn=pe,sr=0,_n=0,ys=null,jn=Xt.next();Cn!==null&&!jn.done;_n++,jn=Xt.next()){Cn.index>_n?(ys=Cn,Cn=null):ys=Cn.sibling;var bs=ue(se,Cn,jn.value,Ce);if(bs===null){Cn===null&&(Cn=ys);break}r&&Cn&&bs.alternate===null&&s(se,Cn),sr=b(bs,sr,_n),Wt===null?Vn=bs:Wt.sibling=bs,Wt=bs,Cn=ys}if(jn.done)return u(se,Cn),Vn;if(Cn===null){for(;!jn.done;_n++,jn=Xt.next()){var nl=ie(se,jn.value,Ce);nl!==null&&(sr=b(nl,sr,_n),Wt===null?Vn=nl:Wt.sibling=nl,Wt=nl)}return Vn}for(var wg=h(se,Cn);!jn.done;_n++,jn=Xt.next()){var Io=Te(wg,se,_n,jn.value,Ce);Io!==null&&(r&&Io.alternate!==null&&wg.delete(Io.key===null?_n:Io.key),sr=b(Io,sr,_n),Wt===null?Vn=Io:Wt.sibling=Io,Wt=Io)}return r&&wg.forEach(function(LD){return s(se,LD)}),Vn}function Mt(se,pe,G,Ce){if(pe!==null&&pe.tag===M){u(se,pe.sibling);var Qe=v(pe,G);return Qe.return=se,Qe}u(se,pe);var Ke=gg(G,se.mode,Ce);return Ke.return=se,Ke}function bt(se,pe,G,Ce){for(var Qe=G.key,Ke=pe;Ke!==null;){if(Ke.key===Qe){switch(Ke.tag){case F:{if(G.type===at){u(se,Ke.sibling);var Lt=v(Ke,G.props.children);return Lt.return=se,Lt._debugSource=G._source,Lt._debugOwner=G._owner,Lt}break}case Oe:default:{if(Ke.elementType===G.type||Tx(Ke,G)){u(se,Ke.sibling);var pn=v(Ke,G.props);return pn.ref=jc(se,Ke,G),pn.return=se,pn._debugSource=G._source,pn._debugOwner=G._owner,pn}break}}u(se,Ke);break}else s(se,Ke);Ke=Ke.sibling}if(G.type===at){var Tn=tl(G.props.children,se.mode,Ce,G.key);return Tn.return=se,Tn}else{var Xt=vg(G,se.mode,Ce);return Xt.ref=jc(se,pe,G),Xt.return=se,Xt}}function fn(se,pe,G,Ce){for(var Qe=G.key,Ke=pe;Ke!==null;){if(Ke.key===Qe)if(Ke.tag===P&&Ke.stateNode.containerInfo===G.containerInfo&&Ke.stateNode.implementation===G.implementation){u(se,Ke.sibling);var Lt=v(Ke,G.children||[]);return Lt.return=se,Lt}else{u(se,Ke);break}else s(se,Ke);Ke=Ke.sibling}var pn=yg(G,se.mode,Ce);return pn.return=se,pn}function Nn(se,pe,G,Ce){var Qe=typeof G=="object"&&G!==null&&G.type===at&&G.key===null;Qe&&(G=G.props.children);var Ke=typeof G=="object"&&G!==null;if(Ke)switch(G.$$typeof){case Ie:return E(bt(se,pe,G,Ce));case tt:return E(fn(se,pe,G,Ce))}if(typeof G=="string"||typeof G=="number")return E(Mt(se,pe,""+G,Ce));if($d(G))return _e(se,pe,G,Ce);if(et(G))return pt(se,pe,G,Ce);if(Ke&&qd(se,G),typeof G=="function"&&Yd(se),typeof G>"u"&&!Qe)switch(se.tag){case D:{var Lt=se.stateNode;if(Lt.render._isMockFunction)break}case Oe:case R:case K:case ge:throw Error((Le(se.type)||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}return u(se,pe)}return Nn}var Qd=U1(!0),F1=U1(!1);function LM(r,s){if(!(r===null||s.child===r.child))throw Error("Resuming work not yet implemented.");if(s.child!==null){var u=s.child,h=el(u,u.pendingProps);for(s.child=h,h.return=s;u.sibling!==null;)u=u.sibling,h=h.sibling=el(u,u.pendingProps),h.return=s;h.sibling=null}}function DM(r,s){for(var u=r.child;u!==null;)sD(u,s),u=u.sibling}var Ic={},Lo=Qr(Ic),Uc=Qr(Ic),Gd=Qr(Ic);function Xd(r){if(r===Ic)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return r}function Hv(){var r=Xd(Gd.current);return r}function Vv(r,s){Mn(Gd,s,r),Mn(Uc,r,r),Mn(Lo,Ic,r);var u=Dt(s);Jt(Lo,r),Mn(Lo,u,r)}function du(r){Jt(Lo,r),Jt(Uc,r),Jt(Gd,r)}function Fc(){var r=Xd(Lo.current);return r}function B1(r){var s=Xd(Gd.current),u=Xd(Lo.current),h=Ht(u,r.type,s);u!==h&&(Mn(Uc,r,r),Mn(Lo,h,r))}function Wv(r){Uc.current===r&&(Jt(Lo,r),Jt(Uc,r))}var kM=0,H1=1,$v=1,Bc=2,$i=Qr(kM);function Kd(r,s){return(r&s)!==0}function Hc(r){return r&H1}function qv(r,s){return r&H1|s}function NM(r,s){return r|s}function Fa(r,s){Mn($i,s,r)}function hu(r){Jt($i,r)}function zM(r,s){var u=r.memoizedState;if(u!==null)return u.dehydrated!==null;var h=r.memoizedProps;return h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!s}function Zd(r){for(var s=r;s!==null;){if(s.tag===V){var u=s.memoizedState;if(u!==null){var h=u.dehydrated;if(h===null||Cl(h)||fc(h))return s}}else if(s.tag===Fe&&s.memoizedProps.revealOrder!==void 0){var v=(s.flags&ne)!==oe;if(v)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)return null;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Yv=0,Ba=1,Ha=2,Vc=4,Ti=null,Va=null,Do=!1;function _M(r){if(!dn)return!1;var s=r.stateNode.containerInfo;return Va=Fn(s),Ti=r,Do=!0,!0}function V1(r,s){switch(r.tag){case z:Cv(r.stateNode.containerInfo,s);break;case L:qr(r.type,r.memoizedProps,r.stateNode,s);break}var u=fD();u.stateNode=s,u.return=r,u.flags=be,r.lastEffect!==null?(r.lastEffect.nextEffect=u,r.lastEffect=u):r.firstEffect=r.lastEffect=u}function W1(r,s){switch(s.flags=s.flags&~Ct|de,r.tag){case z:{var u=r.stateNode.containerInfo;switch(s.tag){case L:var h=s.type,v=s.pendingProps;Rv(u,h,v);break;case M:var b=s.pendingProps;Ol(u,b);break;case V:Ov(u);break}break}case L:{var E=r.type,O=r.memoizedProps,k=r.stateNode;switch(s.tag){case L:var B=s.type,Y=s.pendingProps;si(E,O,k,B,Y);break;case M:var ie=s.pendingProps;Al(E,O,k,ie);break;case V:Ml(E,O,k);break}break}default:return}}function $1(r,s){switch(r.tag){case L:{var u=r.type,h=r.pendingProps,v=Ev(s,u,h);return v!==null?(r.stateNode=v,!0):!1}case M:{var b=r.pendingProps,E=Di(s,b);return E!==null?(r.stateNode=E,!0):!1}case V:return!1;default:return!1}}function Qv(r){if(Do){var s=Va;if(!s){W1(Ti,r),Do=!1,Ti=r;return}var u=s;if(!$1(r,s)){if(s=Rl(u),!s||!$1(r,s)){W1(Ti,r),Do=!1,Ti=r;return}V1(Ti,u)}Ti=r,Va=Fn(s)}}function jM(r,s,u){if(!dn)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var h=r.stateNode,v=co(h,r.type,r.memoizedProps,s,u,r);return r.updateQueue=v,v!==null}function IM(r){if(!dn)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var s=r.stateNode,u=r.memoizedProps,h=Od(s,u,r);if(h){var v=Ti;if(v!==null)switch(v.tag){case z:{var b=v.stateNode.containerInfo;Ad(b,s,u);break}case L:{var E=v.type,O=v.memoizedProps,k=v.stateNode;Tv(E,O,k,s,u);break}}}return h}function UM(r){if(!dn)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var s=r.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 ki(u)}function q1(r){for(var s=r.return;s!==null&&s.tag!==L&&s.tag!==z&&s.tag!==V;)s=s.return;Ti=s}function Jd(r){if(!dn||r!==Ti)return!1;if(!Do)return q1(r),Do=!0,!1;var s=r.type;if(r.tag!==L||s!=="head"&&s!=="body"&&!ar(s,r.memoizedProps))for(var u=Va;u;)V1(r,u),u=Rl(u);return q1(r),r.tag===V?Va=UM(r):Va=Ti?Rl(r.stateNode):null,!0}function Gv(){dn&&(Ti=null,Va=null,Do=!1)}function Xv(){return Do}var Wc=[],$c;$c={};function FM(r){Wc.push(r)}function Kv(){for(var r=0;r<Wc.length;r++){var s=Wc[r];xn?s._workInProgressVersionPrimary=null:s._workInProgressVersionSecondary=null}Wc.length=0}function BM(r){return xn?r._workInProgressVersionPrimary:r._workInProgressVersionSecondary}function Y1(r,s){xn?r._workInProgressVersionPrimary=s:r._workInProgressVersionSecondary=s,Wc.push(r)}function HM(r){xn?r._currentPrimaryRenderer==null?r._currentPrimaryRenderer=$c:r._currentPrimaryRenderer!==$c&&m("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported."):r._currentSecondaryRenderer==null?r._currentSecondaryRenderer=$c:r._currentSecondaryRenderer!==$c&&m("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported.")}var $e=g.ReactCurrentDispatcher,Ci=g.ReactCurrentBatchConfig,Zv,Jv;Jv={},Zv=new Set;var qc=ye,cn=null,Cr=null,ir=null,eh=!1,Yc=!1,VM=25,Se=null,Ri=null,ko=-1,em=!1;function un(){{var r=Se;Ri===null?Ri=[r]:Ri.push(r)}}function Ge(){{var r=Se;Ri!==null&&(ko++,Ri[ko]!==r&&WM(r))}}function Qc(r){r!=null&&!Array.isArray(r)&&m("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Se,typeof r)}function WM(r){{var s=Le(cn.type);if(!Zv.has(s)&&(Zv.add(s),Ri!==null)){for(var u="",h=30,v=0;v<=ko;v++){for(var b=Ri[v],E=v===ko?r:b,O=v+1+". "+b;O.length<h;)O+=" ";O+=E+`
|
|
120
|
+
`,u+=O}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
|
|
125
|
+
`,s,u)}}}function Jr(){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
|
|
129
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function tm(r,s){if(em)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.",Se),!1;r.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`,fe,"["+s.join(", ")+"]","["+i.join(", ")+"]");for(var u=0;u<s.length&&u<i.length;u++)if(!Rn(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,Rn(K,d.memoizedState)||xm(),d.memoizedState=K,d.baseState=ee,d.baseQueue=ge,p.lastRenderedState=K}var Cn=p.dispatch;return[d.memoizedState,Cn]}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);Rn(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 Cn=S(s._source);if(!Rn(E,Cn)){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."),!Rn(K,Z)){V(Z);var oe=Oa(rt);vo(p,oe)}Jl(p,p.mutableReadLanes)}},[u,s,d]),R.useEffect(function(){var Cn=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,Cn);return typeof Z!="function"&&m("Mutable source subscribe function must return an unsubscribe function."),Z},[s,d]),!Rn(Ee,u)||!Rn(Ze,s)||!Rn(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&Pn)===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,Rn(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+=`
|
|
132
|
+
Incoming: %s`,Se,"["+s.join(", ")+"]","["+r.join(", ")+"]");for(var u=0;u<s.length&&u<r.length;u++)if(!zn(r[u],s[u]))return!1;return!0}function pu(r,s,u,h,v,b){qc=b,cn=s,Ri=r!==null?r._debugHookTypes:null,ko=-1,em=r!==null&&r.type!==s.type,s.memoizedState=null,s.updateQueue=null,s.lanes=ye,r!==null&&r.memoizedState!==null?$e.current=lS:Ri!==null?$e.current=aS:$e.current=oS;var E=u(h,v);if(Yc){var O=0;do{if(Yc=!1,!(O<VM))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");O+=1,em=!1,Cr=null,ir=null,s.updateQueue=null,ko=-1,$e.current=uS,E=u(h,v)}while(Yc)}$e.current=dh,s._debugHookTypes=Ri;var k=Cr!==null&&Cr.next!==null;if(qc=ye,cn=null,Cr=null,ir=null,Se=null,Ri=null,ko=-1,eh=!1,k)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return E}function Q1(r,s,u){s.updateQueue=r.updateQueue,s.flags&=~(Ne|le),r.lanes=va(r.lanes,u)}function G1(){if($e.current=dh,eh){for(var r=cn.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eh=!1}qc=ye,cn=null,Cr=null,ir=null,Ri=null,ko=-1,Se=null,fh=!1,Yc=!1}function Wa(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ir===null?cn.memoizedState=ir=r:ir=ir.next=r,ir}function $a(){var r;if(Cr===null){var s=cn.alternate;s!==null?r=s.memoizedState:r=null}else r=Cr.next;var u;if(ir===null?u=cn.memoizedState:u=ir.next,u!==null)ir=u,u=ir.next,Cr=r;else{if(r===null)throw Error("Rendered more hooks than during the previous render.");Cr=r;var h={memoizedState:Cr.memoizedState,baseState:Cr.baseState,baseQueue:Cr.baseQueue,queue:Cr.queue,next:null};ir===null?cn.memoizedState=ir=h:ir=ir.next=h}return ir}function $M(){return{lastEffect:null}}function th(r,s){return typeof s=="function"?s(r):s}function nm(r,s,u){var h=Wa(),v;u!==void 0?v=u(s):v=s,h.memoizedState=h.baseState=v;var b=h.queue={pending:null,dispatch:null,lastRenderedReducer:r,lastRenderedState:v},E=b.dispatch=vm.bind(null,cn,b);return[h.memoizedState,E]}function rm(r,s,u){var h=$a(),v=h.queue;if(v===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");v.lastRenderedReducer=r;var b=Cr,E=b.baseQueue,O=v.pending;if(O!==null){if(E!==null){var k=E.next,B=O.next;E.next=B,O.next=k}b.baseQueue!==E&&m("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),b.baseQueue=E=O,v.pending=null}if(E!==null){var Y=E.next,ie=b.baseState,ue=null,Te=null,Pe=null,_e=Y;do{var pt=_e.lane;if(us(qc,pt)){if(Pe!==null){var bt={lane:Jn,action:_e.action,eagerReducer:_e.eagerReducer,eagerState:_e.eagerState,next:null};Pe=Pe.next=bt}if(_e.eagerReducer===r)ie=_e.eagerState;else{var fn=_e.action;ie=r(ie,fn)}}else{var Mt={lane:pt,action:_e.action,eagerReducer:_e.eagerReducer,eagerState:_e.eagerState,next:null};Pe===null?(Te=Pe=Mt,ue=ie):Pe=Pe.next=Mt,cn.lanes=It(cn.lanes,pt),tg(pt)}_e=_e.next}while(_e!==null&&_e!==Y);Pe===null?ue=ie:Pe.next=Te,zn(ie,h.memoizedState)||Mm(),h.memoizedState=ie,h.baseState=ue,h.baseQueue=Pe,v.lastRenderedState=ie}var Nn=v.dispatch;return[h.memoizedState,Nn]}function im(r,s,u){var h=$a(),v=h.queue;if(v===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");v.lastRenderedReducer=r;var b=v.dispatch,E=v.pending,O=h.memoizedState;if(E!==null){v.pending=null;var k=E.next,B=k;do{var Y=B.action;O=r(O,Y),B=B.next}while(B!==k);zn(O,h.memoizedState)||Mm(),h.memoizedState=O,h.baseQueue===null&&(h.baseState=O),v.lastRenderedState=O}return[O,b]}function X1(r,s,u){HM(s);var h=s._getVersion,v=h(s._source),b=!1,E=BM(s);if(E!==null?b=E===v:(b=us(qc,r.mutableReadLanes),b&&Y1(s,v)),b){var O=u(s._source);return typeof O=="function"&&m("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),O}else throw FM(s),Error("Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.")}function K1(r,s,u,h){var v=oL();if(v===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");var b=s._getVersion,E=b(s._source),O=$e.current,k=O.useState(function(){return X1(v,s,u)}),B=k[0],Y=k[1],ie=B,ue=ir,Te=r.memoizedState,Pe=Te.refs,_e=Pe.getSnapshot,pt=Te.source,Mt=Te.subscribe,bt=cn;if(r.memoizedState={refs:Pe,source:s,subscribe:h},O.useEffect(function(){Pe.getSnapshot=u,Pe.setSnapshot=Y;var Nn=b(s._source);if(!zn(E,Nn)){var se=u(s._source);if(typeof se=="function"&&m("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),!zn(ie,se)){Y(se);var pe=zo(bt);ga(v,pe)}eu(v,v.mutableReadLanes)}},[u,s,h]),O.useEffect(function(){var Nn=function(){var pe=Pe.getSnapshot,G=Pe.setSnapshot;try{G(pe(s._source));var Ce=zo(bt);ga(v,Ce)}catch(Qe){G(function(){throw Qe})}},se=h(s._source,Nn);return typeof se!="function"&&m("Mutable source subscribe function must return an unsubscribe function."),se},[s,h]),!zn(_e,u)||!zn(pt,s)||!zn(Mt,h)){var fn={pending:null,dispatch:null,lastRenderedReducer:th,lastRenderedState:ie};fn.dispatch=Y=vm.bind(null,cn,fn),ue.queue=fn,ue.baseQueue=null,ie=X1(v,s,u),ue.memoizedState=ue.baseState=ie}return ie}function sm(r,s,u){var h=Wa();return h.memoizedState={refs:{getSnapshot:s,setSnapshot:null},source:r,subscribe:u},K1(h,r,s,u)}function nh(r,s,u){var h=$a();return K1(h,r,s,u)}function qa(r){var s=Wa();typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r;var u=s.queue={pending:null,dispatch:null,lastRenderedReducer:th,lastRenderedState:r},h=u.dispatch=vm.bind(null,cn,u);return[s.memoizedState,h]}function Gc(r){return rm(th)}function Xc(r){return im(th)}function rh(r,s,u,h){var v={tag:r,create:s,destroy:u,deps:h,next:null},b=cn.updateQueue;if(b===null)b=$M(),cn.updateQueue=b,b.lastEffect=v.next=v;else{var E=b.lastEffect;if(E===null)b.lastEffect=v.next=v;else{var O=E.next;E.next=v,v.next=O,b.lastEffect=v}}return v}function ih(r){var s=Wa(),u={current:r};return Object.seal(u),s.memoizedState=u,u}function vu(r){var s=$a();return s.memoizedState}function om(r,s,u,h){var v=Wa(),b=h===void 0?null:h;cn.flags|=r,v.memoizedState=rh(Ba|s,u,void 0,b)}function am(r,s,u,h){var v=$a(),b=h===void 0?null:h,E=void 0;if(Cr!==null){var O=Cr.memoizedState;if(E=O.destroy,b!==null){var k=O.deps;if(tm(b,k)){rh(s,u,E,b);return}}}cn.flags|=r,v.memoizedState=rh(Ba|s,u,E,b)}function sh(r,s){return typeof jest<"u"&&vx(cn),om(le|Ne,Vc,r,s)}function mu(r,s){return typeof jest<"u"&&vx(cn),am(le|Ne,Vc,r,s)}function lm(r,s){return om(le,Ha,r,s)}function oh(r,s){return am(le,Ha,r,s)}function Z1(r,s){if(typeof s=="function"){var u=s,h=r();return u(h),function(){u(null)}}else if(s!=null){var v=s;v.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(v).join(", ")+"}");var b=r();return v.current=b,function(){v.current=null}}}function um(r,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 h=u!=null?u.concat([r]):null;return om(le,Ha,Z1.bind(null,s,r),h)}function ah(r,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 h=u!=null?u.concat([r]):null;return am(le,Ha,Z1.bind(null,s,r),h)}function qM(r,s){}var lh=qM;function cm(r,s){var u=Wa(),h=s===void 0?null:s;return u.memoizedState=[r,h],r}function uh(r,s){var u=$a(),h=s===void 0?null:s,v=u.memoizedState;if(v!==null&&h!==null){var b=v[1];if(tm(h,b))return v[0]}return u.memoizedState=[r,h],r}function fm(r,s){var u=Wa(),h=s===void 0?null:s,v=r();return u.memoizedState=[v,h],v}function ch(r,s){var u=$a(),h=s===void 0?null:s,v=u.memoizedState;if(v!==null&&h!==null){var b=v[1];if(tm(h,b))return v[0]}var E=r();return u.memoizedState=[E,h],E}function dm(r){var s=qa(r),u=s[0],h=s[1];return sh(function(){var v=Ci.transition;Ci.transition=1;try{h(r)}finally{Ci.transition=v}},[r]),u}function J1(r){var s=Gc(),u=s[0],h=s[1];return mu(function(){var v=Ci.transition;Ci.transition=1;try{h(r)}finally{Ci.transition=v}},[r]),u}function eS(r){var s=Xc(),u=s[0],h=s[1];return mu(function(){var v=Ci.transition;Ci.transition=1;try{h(r)}finally{Ci.transition=v}},[r]),u}function YM(r,s){var u=Ye();ui(u<Nr?Nr:u,function(){r(!0)}),ui(u>Kr?Kr:u,function(){var h=Ci.transition;Ci.transition=1;try{r(!1),s()}finally{Ci.transition=h}})}function hm(){var r=qa(!1),s=r[0],u=r[1],h=YM.bind(null,u);return ih(h),[h,s]}function tS(){var r=Gc(),s=r[0],u=vu(),h=u.current;return[h,s]}function nS(){var r=Xc(),s=r[0],u=vu(),h=u.current;return[h,s]}var fh=!1;function QM(){return fh}function rS(r){{var s=Le(r.type)||"Unknown";Wd()&&!Jv[s]&&(m("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly."),Jv[s]=!0)}}function pm(){var r=xd.bind(null,rS.bind(null,cn));if(Xv()){var s=!1,u=cn,h=function(){throw s||(s=!0,fh=!0,b(r()),fh=!1,rS(u)),Error("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.")},v=Sd(h),b=qa(v)[1];return(cn.mode&Hn)===an&&(cn.flags|=le|Ne,rh(Ba|Vc,function(){b(r())},void 0,null)),v}else{var E=r();return qa(E),E}}function iS(){var r=Gc()[0];return r}function sS(){var r=Xc()[0];return r}function vm(r,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 h=ni(),v=zo(r),b={lane:v,action:u,eagerReducer:null,eagerState:null,next:null},E=s.pending;E===null?b.next=b:(b.next=E.next,E.next=b),s.pending=b;var O=r.alternate;if(r===cn||O!==null&&O===cn)Yc=eh=!0;else{if(r.lanes===ye&&(O===null||O.lanes===ye)){var k=s.lastRenderedReducer;if(k!==null){var B;B=$e.current,$e.current=qi;try{var Y=s.lastRenderedState,ie=k(Y,u);if(b.eagerReducer=k,b.eagerState=ie,zn(ie,Y))return}catch{}finally{$e.current=B}}}typeof jest<"u"&&(px(r),qL(r)),vr(r,v,h)}}var dh={readContext:tn,useCallback:Jr,useContext:Jr,useEffect:Jr,useImperativeHandle:Jr,useLayoutEffect:Jr,useMemo:Jr,useReducer:Jr,useRef:Jr,useState:Jr,useDebugValue:Jr,useDeferredValue:Jr,useTransition:Jr,useMutableSource:Jr,useOpaqueIdentifier:Jr,unstable_isNewReconciler:br},oS=null,aS=null,lS=null,uS=null,ps=null,qi=null,hh=null;{var mm=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().")},Tt=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")};oS={readContext:function(r,s){return tn(r,s)},useCallback:function(r,s){return Se="useCallback",un(),Qc(s),cm(r,s)},useContext:function(r,s){return Se="useContext",un(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",un(),Qc(s),sh(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",un(),Qc(u),um(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",un(),Qc(s),lm(r,s)},useMemo:function(r,s){Se="useMemo",un(),Qc(s);var u=$e.current;$e.current=ps;try{return fm(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",un();var h=$e.current;$e.current=ps;try{return nm(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",un(),ih(r)},useState:function(r){Se="useState",un();var s=$e.current;$e.current=ps;try{return qa(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",un(),void 0},useDeferredValue:function(r){return Se="useDeferredValue",un(),dm(r)},useTransition:function(){return Se="useTransition",un(),hm()},useMutableSource:function(r,s,u){return Se="useMutableSource",un(),sm(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",un(),pm()},unstable_isNewReconciler:br},aS={readContext:function(r,s){return tn(r,s)},useCallback:function(r,s){return Se="useCallback",Ge(),cm(r,s)},useContext:function(r,s){return Se="useContext",Ge(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",Ge(),sh(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",Ge(),um(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",Ge(),lm(r,s)},useMemo:function(r,s){Se="useMemo",Ge();var u=$e.current;$e.current=ps;try{return fm(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",Ge();var h=$e.current;$e.current=ps;try{return nm(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",Ge(),ih(r)},useState:function(r){Se="useState",Ge();var s=$e.current;$e.current=ps;try{return qa(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",Ge(),void 0},useDeferredValue:function(r){return Se="useDeferredValue",Ge(),dm(r)},useTransition:function(){return Se="useTransition",Ge(),hm()},useMutableSource:function(r,s,u){return Se="useMutableSource",Ge(),sm(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",Ge(),pm()},unstable_isNewReconciler:br},lS={readContext:function(r,s){return tn(r,s)},useCallback:function(r,s){return Se="useCallback",Ge(),uh(r,s)},useContext:function(r,s){return Se="useContext",Ge(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",Ge(),mu(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",Ge(),ah(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",Ge(),oh(r,s)},useMemo:function(r,s){Se="useMemo",Ge();var u=$e.current;$e.current=qi;try{return ch(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",Ge();var h=$e.current;$e.current=qi;try{return rm(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",Ge(),vu()},useState:function(r){Se="useState",Ge();var s=$e.current;$e.current=qi;try{return Gc(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",Ge(),lh()},useDeferredValue:function(r){return Se="useDeferredValue",Ge(),J1(r)},useTransition:function(){return Se="useTransition",Ge(),tS()},useMutableSource:function(r,s,u){return Se="useMutableSource",Ge(),nh(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",Ge(),iS()},unstable_isNewReconciler:br},uS={readContext:function(r,s){return tn(r,s)},useCallback:function(r,s){return Se="useCallback",Ge(),uh(r,s)},useContext:function(r,s){return Se="useContext",Ge(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",Ge(),mu(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",Ge(),ah(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",Ge(),oh(r,s)},useMemo:function(r,s){Se="useMemo",Ge();var u=$e.current;$e.current=hh;try{return ch(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",Ge();var h=$e.current;$e.current=hh;try{return im(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",Ge(),vu()},useState:function(r){Se="useState",Ge();var s=$e.current;$e.current=hh;try{return Xc(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",Ge(),lh()},useDeferredValue:function(r){return Se="useDeferredValue",Ge(),eS(r)},useTransition:function(){return Se="useTransition",Ge(),nS()},useMutableSource:function(r,s,u){return Se="useMutableSource",Ge(),nh(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",Ge(),sS()},unstable_isNewReconciler:br},ps={readContext:function(r,s){return mm(),tn(r,s)},useCallback:function(r,s){return Se="useCallback",Tt(),un(),cm(r,s)},useContext:function(r,s){return Se="useContext",Tt(),un(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",Tt(),un(),sh(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",Tt(),un(),um(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",Tt(),un(),lm(r,s)},useMemo:function(r,s){Se="useMemo",Tt(),un();var u=$e.current;$e.current=ps;try{return fm(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",Tt(),un();var h=$e.current;$e.current=ps;try{return nm(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",Tt(),un(),ih(r)},useState:function(r){Se="useState",Tt(),un();var s=$e.current;$e.current=ps;try{return qa(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",Tt(),un(),void 0},useDeferredValue:function(r){return Se="useDeferredValue",Tt(),un(),dm(r)},useTransition:function(){return Se="useTransition",Tt(),un(),hm()},useMutableSource:function(r,s,u){return Se="useMutableSource",Tt(),un(),sm(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",Tt(),un(),pm()},unstable_isNewReconciler:br},qi={readContext:function(r,s){return mm(),tn(r,s)},useCallback:function(r,s){return Se="useCallback",Tt(),Ge(),uh(r,s)},useContext:function(r,s){return Se="useContext",Tt(),Ge(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",Tt(),Ge(),mu(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",Tt(),Ge(),ah(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",Tt(),Ge(),oh(r,s)},useMemo:function(r,s){Se="useMemo",Tt(),Ge();var u=$e.current;$e.current=qi;try{return ch(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",Tt(),Ge();var h=$e.current;$e.current=qi;try{return rm(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",Tt(),Ge(),vu()},useState:function(r){Se="useState",Tt(),Ge();var s=$e.current;$e.current=qi;try{return Gc(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",Tt(),Ge(),lh()},useDeferredValue:function(r){return Se="useDeferredValue",Tt(),Ge(),J1(r)},useTransition:function(){return Se="useTransition",Tt(),Ge(),tS()},useMutableSource:function(r,s,u){return Se="useMutableSource",Tt(),Ge(),nh(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",Tt(),Ge(),iS()},unstable_isNewReconciler:br},hh={readContext:function(r,s){return mm(),tn(r,s)},useCallback:function(r,s){return Se="useCallback",Tt(),Ge(),uh(r,s)},useContext:function(r,s){return Se="useContext",Tt(),Ge(),tn(r,s)},useEffect:function(r,s){return Se="useEffect",Tt(),Ge(),mu(r,s)},useImperativeHandle:function(r,s,u){return Se="useImperativeHandle",Tt(),Ge(),ah(r,s,u)},useLayoutEffect:function(r,s){return Se="useLayoutEffect",Tt(),Ge(),oh(r,s)},useMemo:function(r,s){Se="useMemo",Tt(),Ge();var u=$e.current;$e.current=qi;try{return ch(r,s)}finally{$e.current=u}},useReducer:function(r,s,u){Se="useReducer",Tt(),Ge();var h=$e.current;$e.current=qi;try{return im(r,s,u)}finally{$e.current=h}},useRef:function(r){return Se="useRef",Tt(),Ge(),vu()},useState:function(r){Se="useState",Tt(),Ge();var s=$e.current;$e.current=qi;try{return Xc(r)}finally{$e.current=s}},useDebugValue:function(r,s){return Se="useDebugValue",Tt(),Ge(),lh()},useDeferredValue:function(r){return Se="useDeferredValue",Tt(),Ge(),eS(r)},useTransition:function(){return Se="useTransition",Tt(),Ge(),nS()},useMutableSource:function(r,s,u){return Se="useMutableSource",Tt(),Ge(),nh(r,s,u)},useOpaqueIdentifier:function(){return Se="useOpaqueIdentifier",Tt(),Ge(),sS()},unstable_isNewReconciler:br}}var ph=f.unstable_now,cS=0,Kc=-1;function GM(){return cS}function fS(){cS=ph()}function gm(r){Kc=ph(),r.actualStartTime<0&&(r.actualStartTime=ph())}function dS(r){Kc=-1}function vh(r,s){if(Kc>=0){var u=ph()-Kc;r.actualDuration+=u,s&&(r.selfBaseDuration=u),Kc=-1}}function ym(r){for(var s=r.child;s;)r.actualDuration+=s.actualDuration,s=s.sibling}var Zc=g.ReactCurrentOwner,vs=!1,bm,Jc,Sm,xm,wm,Ya,Em,mh;bm={},Jc={},Sm={},xm={},wm={},Ya=!1,Em={},mh={};function ei(r,s,u,h){r===null?s.child=F1(s,null,u,h):s.child=Qd(s,r.child,u,h)}function XM(r,s,u,h){s.child=Qd(s,r.child,null,h),s.child=Qd(s,null,u,h)}function hS(r,s,u,h,v){if(s.type!==s.elementType){var b=u.propTypes;b&&Sr(b,h,"prop",Le(u))}var E=u.render,O=s.ref,k;Ao(s,v);{if(Zc.current=s,dr(!0),k=pu(r,s,E,h,O,v),s.mode&Vt){Yr();try{k=pu(r,s,E,h,O,v)}finally{oi()}}dr(!1)}return r!==null&&!vs?(Q1(r,s,v),qs(r,s,v)):(s.flags|=X,ei(r,s,k,v),s.child)}function pS(r,s,u,h,v,b){if(r===null){var E=u.type;if(rD(E)&&u.compare===null&&u.defaultProps===void 0){var O=E;return O=Eu(E),s.tag=ge,s.type=O,Om(s,E),vS(r,s,O,h,v,b)}{var k=E.propTypes;k&&Sr(k,h,"prop",Le(E))}var B=pg(u.type,null,h,s,s.mode,b);return B.ref=s.ref,B.return=s,s.child=B,B}{var Y=u.type,ie=Y.propTypes;ie&&Sr(ie,h,"prop",Le(Y))}var ue=r.child;if(!Yn(v,b)){var Te=ue.memoizedProps,Pe=u.compare;if(Pe=Pe!==null?Pe:Fs,Pe(Te,h)&&r.ref===s.ref)return qs(r,s,b)}s.flags|=X;var _e=el(ue,h);return _e.ref=s.ref,_e.return=s,s.child=_e,_e}function vS(r,s,u,h,v,b){if(s.type!==s.elementType){var E=s.elementType;if(E.$$typeof===qe){var O=E,k=O._payload,B=O._init;try{E=B(k)}catch{E=null}var Y=E&&E.propTypes;Y&&Sr(Y,h,"prop",Le(E))}}if(r!==null){var ie=r.memoizedProps;if(Fs(ie,h)&&r.ref===s.ref&&s.type===r.type)if(vs=!1,Yn(b,v))(r.flags&Mr)!==oe&&(vs=!0);else return s.lanes=r.lanes,qs(r,s,b)}return Cm(r,s,u,h,b)}function Tm(r,s,u){var h=s.pendingProps,v=h.children,b=r!==null?r.memoizedState:null;if(h.mode==="hidden"||h.mode==="unstable-defer-without-hiding")if((s.mode&Bi)===an){var E={baseLanes:ye};s.memoizedState=E,Vh(s,u)}else if(Yn(u,kr)){var Y={baseLanes:ye};s.memoizedState=Y;var ie=b!==null?b.baseLanes:u;Vh(s,ie)}else{var O;if(b!==null){var k=b.baseLanes;O=It(k,u)}else O=u;Qh(kr),s.lanes=s.childLanes=kr;var B={baseLanes:O};return s.memoizedState=B,Vh(s,O),null}else{var ue;b!==null?(ue=It(b.baseLanes,u),s.memoizedState=null):ue=u,Vh(s,ue)}return ei(r,s,v,u),s.child}var KM=Tm;function ZM(r,s,u){var h=s.pendingProps;return ei(r,s,h,u),s.child}function JM(r,s,u){var h=s.pendingProps.children;return ei(r,s,h,u),s.child}function eP(r,s,u){{s.flags|=le;var h=s.stateNode;h.effectDuration=0,h.passiveEffectDuration=0}var v=s.pendingProps,b=v.children;return ei(r,s,b,u),s.child}function mS(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=De)}function Cm(r,s,u,h,v){if(s.type!==s.elementType){var b=u.propTypes;b&&Sr(b,h,"prop",Le(u))}var E;{var O=is(s,u,!0);E=_i(s,O)}var k;Ao(s,v);{if(Zc.current=s,dr(!0),k=pu(r,s,u,h,E,v),s.mode&Vt){Yr();try{k=pu(r,s,u,h,E,v)}finally{oi()}}dr(!1)}return r!==null&&!vs?(Q1(r,s,v),qs(r,s,v)):(s.flags|=X,ei(r,s,k,v),s.child)}function gS(r,s,u,h,v){if(s.type!==s.elementType){var b=u.propTypes;b&&Sr(b,h,"prop",Le(u))}var E;Kn(u)?(E=!0,ta(s)):E=!1,Ao(s,v);var O=s.stateNode,k;O===null?(r!==null&&(r.alternate=null,s.alternate=null,s.flags|=de),Wi(s,u,h),_v(s,u,h,v),k=!0):r===null?k=MM(s,u,h,v):k=PM(r,s,u,h,v);var B=Rm(r,s,u,k,E,v);{var Y=s.stateNode;k&&Y.props!==h&&(Ya||m("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Le(s.type)||"a component"),Ya=!0)}return B}function Rm(r,s,u,h,v,b){mS(r,s);var E=(s.flags&ne)!==oe;if(!h&&!E)return v&&na(s,u,!1),qs(r,s,b);var O=s.stateNode;Zc.current=s;var k;if(E&&typeof u.getDerivedStateFromError!="function")k=null,dS();else{if(dr(!0),k=O.render(),s.mode&Vt){Yr();try{O.render()}finally{oi()}}dr(!1)}return s.flags|=X,r!==null&&E?XM(r,s,k,b):ei(r,s,k,b),s.memoizedState=O.state,v&&na(s,u,!0),s.child}function yS(r){var s=r.stateNode;s.pendingContext?pc(r,s.pendingContext,s.pendingContext!==s.context):s.context&&pc(r,s.context,!1),Vv(r,s.containerInfo)}function tP(r,s,u){yS(s);var h=s.updateQueue;if(!(r!==null&&h!==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 v=s.pendingProps,b=s.memoizedState,E=b!==null?b.element:null;Ua(r,s),d(s,v,null,u);var O=s.memoizedState,k=O.element;if(k===E)return Gv(),qs(r,s,u);var B=s.stateNode;if(B.hydrate&&_M(s)){if(dn){var Y=B.mutableSourceEagerHydrationData;if(Y!=null)for(var ie=0;ie<Y.length;ie+=2){var ue=Y[ie],Te=Y[ie+1];Y1(ue,Te)}}var Pe=F1(s,null,k,u);s.child=Pe;for(var _e=Pe;_e;)_e.flags=_e.flags&~de|Ct,_e=_e.sibling}else ei(r,s,k,u),Gv();return s.child}function nP(r,s,u){B1(s),r===null&&Qv(s);var h=s.type,v=s.pendingProps,b=r!==null?r.memoizedProps:null,E=v.children,O=ar(h,v);return O?E=null:b!==null&&ar(h,b)&&(s.flags|=Ve),mS(r,s),ei(r,s,E,u),s.child}function rP(r,s){return r===null&&Qv(s),null}function iP(r,s,u,h,v){r!==null&&(r.alternate=null,s.alternate=null,s.flags|=de);var b=s.pendingProps,E=u,O=E._payload,k=E._init,B=k(O);s.type=B;var Y=s.tag=iD(B),ie=fi(B,b),ue;switch(Y){case R:return Om(s,B),s.type=B=Eu(B),ue=Cm(null,s,B,ie,v),ue;case D:return s.type=B=lg(B),ue=gS(null,s,B,ie,v),ue;case K:return s.type=B=ug(B),ue=hS(null,s,B,ie,v),ue;case ae:{if(s.type!==s.elementType){var Te=B.propTypes;Te&&Sr(Te,ie,"prop",Le(B))}return ue=pS(null,s,B,fi(B.type,ie),h,v),ue}}var Pe="";throw B!==null&&typeof B=="object"&&B.$$typeof===qe&&(Pe=" Did you wrap a component in React.lazy() more than once?"),Error("Element type is invalid. Received a promise that resolves to: "+B+". Lazy element type must resolve to a class or function."+Pe)}function sP(r,s,u,h,v){r!==null&&(r.alternate=null,s.alternate=null,s.flags|=de),s.tag=D;var b;return Kn(u)?(b=!0,ta(s)):b=!1,Ao(s,v),Wi(s,u,h),_v(s,u,h,v),Rm(null,s,u,!0,b,v)}function oP(r,s,u,h){r!==null&&(r.alternate=null,s.alternate=null,s.flags|=de);var v=s.pendingProps,b;{var E=is(s,u,!1);b=_i(s,E)}Ao(s,h);var O;{if(u.prototype&&typeof u.prototype.render=="function"){var k=Le(u)||"Unknown";bm[k]||(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.",k,k),bm[k]=!0)}s.mode&Vt&&Zr.recordLegacyContextWarning(s,null),dr(!0),Zc.current=s,O=pu(null,s,u,v,b,h),dr(!1)}if(s.flags|=X,typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0){var B=Le(u)||"Unknown";Jc[B]||(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.",B,B,B),Jc[B]=!0)}if(typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0){{var Y=Le(u)||"Unknown";Jc[Y]||(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.",Y,Y,Y),Jc[Y]=!0)}s.tag=D,s.memoizedState=null,s.updateQueue=null;var ie=!1;Kn(u)?(ie=!0,ta(s)):ie=!1,s.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,fu(s);var ue=u.getDerivedStateFromProps;return typeof ue=="function"&&Qt(s,u,ue,v),At(s,O),_v(s,u,v,h),Rm(null,s,u,!0,ie,h)}else{if(s.tag=R,s.mode&Vt){Yr();try{O=pu(null,s,u,v,b,h)}finally{oi()}}return ei(null,s,O,h),Om(s,u),s.child}}function Om(r,s){{if(s&&s.childContextTypes&&m("%s(...): childContextTypes cannot be defined on a function component.",s.displayName||s.name||"Component"),r.ref!==null){var u="",h=Hd();h&&(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:$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,Cn=gb(i,s,Zt,u);return s.memoizedState=null,Cn}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,bt=gb(i,s,_e,u);return s.memoizedState=null,bt}}}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&Pn)===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&Pn)===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&Pn)===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&Pn)===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,Cn=s.elementType===rt?Zt:rr(rt,Zt);return gm(i,s,rt,Cn,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 bt=s.type,nn=s.pendingProps,hn=rr(bt,nn);if(s.type!==s.elementType){var Nt=bt.propTypes;Nt&&fi(Nt,hn,"prop",be(bt))}return hn=rr(bt.type,hn),ob(i,s,bt,hn,d,u)}case me:return lb(i,s,s.type,s.pendingProps,d,u);case Se:{var kn=s.type,Ot=s.pendingProps,pn=s.elementType===kn?Ot:rr(kn,Ot);return BO(i,s,kn,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 Cn=i.memoizedState;Zt=Cn!==null}if(rt&&!Zt&&(s.mode&Pn)!==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 bt=s.child;bt!==null;){var nn=Kd(bt);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}bt=bt.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 kn=Nt.updateQueue;if(kn!==null&&(s.updateQueue=kn,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 An=Ur.current;return ve?An=jv(An,jc):An=Ic(An),jo(s,An),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,Mn=i.memoizedState,hs=Mn!==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
|
|
134
|
+
Check the render method of \``+h+"`.");var v=h||r._debugID||"",b=r._debugSource;b&&(v=b.fileName+":"+b.lineNumber),wm[v]||(wm[v]=!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=Le(s)||"Unknown";xm[E]||(m("%s: Function components do not support getDerivedStateFromProps.",E),xm[E]=!0)}if(typeof s.contextType=="object"&&s.contextType!==null){var O=Le(s)||"Unknown";Sm[O]||(m("%s: Function components do not support contextType.",O),Sm[O]=!0)}}}var gh={dehydrated:null,retryLane:Jn};function yh(r){return{baseLanes:r}}function bS(r,s){return{baseLanes:It(r.baseLanes,s)}}function aP(r,s,u,h){if(s!==null){var v=s.memoizedState;if(v===null)return!1}return Kd(r,Bc)}function SS(r,s){return va(r.childLanes,s)}function xS(r,s,u){var h=s.pendingProps;Lx(s)&&(s.flags|=ne);var v=$i.current,b=!1,E=(s.flags&ne)!==oe;if(E||aP(v,r)?(b=!0,s.flags&=~ne):(r===null||r.memoizedState!==null)&&h.fallback!==void 0&&h.unstable_avoidThisFallback!==!0&&(v=NM(v,$v)),v=Hc(v),Fa(s,v),r===null){h.fallback!==void 0&&Qv(s);var O=h.children,k=h.fallback;if(b){var B=wS(s,O,k,u),Y=s.child;return Y.memoizedState=yh(u),s.memoizedState=gh,B}else if(typeof h.unstable_expectedLoadTime=="number"){var ie=wS(s,O,k,u),ue=s.child;return ue.memoizedState=yh(u),s.memoizedState=gh,s.lanes=Is,Qh(Is),ie}else return lP(s,O,u)}else{var Te=r.memoizedState;if(Te!==null)if(b){var Pe=h.fallback,_e=h.children,pt=CS(r,s,_e,Pe,u),Mt=s.child,bt=r.child.memoizedState;return Mt.memoizedState=bt===null?yh(u):bS(bt,u),Mt.childLanes=SS(r,u),s.memoizedState=gh,pt}else{var fn=h.children,Nn=TS(r,s,fn,u);return s.memoizedState=null,Nn}else if(b){var se=h.fallback,pe=h.children,G=CS(r,s,pe,se,u),Ce=s.child,Qe=r.child.memoizedState;return Ce.memoizedState=Qe===null?yh(u):bS(Qe,u),Ce.childLanes=SS(r,u),s.memoizedState=gh,G}else{var Ke=h.children,Lt=TS(r,s,Ke,u);return s.memoizedState=null,Lt}}}function lP(r,s,u){var h=r.mode,v={mode:"visible",children:s},b=mg(v,h,u,null);return b.return=r,r.child=b,b}function wS(r,s,u,h){var v=r.mode,b=r.child,E={mode:"hidden",children:s},O,k;return(v&Hn)===an&&b!==null?(O=b,O.childLanes=ye,O.pendingProps=E,r.mode&nr&&(O.actualDuration=0,O.actualStartTime=-1,O.selfBaseDuration=0,O.treeBaseDuration=0),k=tl(u,v,h,null)):(O=mg(E,v,ye,null),k=tl(u,v,h,null)),O.return=r,k.return=r,O.sibling=k,r.child=O,k}function ES(r,s){return el(r,s)}function TS(r,s,u,h){var v=r.child,b=v.sibling,E=ES(v,{mode:"visible",children:u});return(s.mode&Hn)===an&&(E.lanes=h),E.return=s,E.sibling=null,b!==null&&(b.nextEffect=null,b.flags=be,s.firstEffect=s.lastEffect=b),s.child=E,E}function CS(r,s,u,h,v){var b=s.mode,E=r.child,O=E.sibling,k={mode:"hidden",children:u},B;if((b&Hn)===an&&s.child!==E){var Y=s.child;B=Y,B.childLanes=ye,B.pendingProps=k,s.mode&nr&&(B.actualDuration=0,B.actualStartTime=-1,B.selfBaseDuration=E.selfBaseDuration,B.treeBaseDuration=E.treeBaseDuration);var ie=B.lastEffect;ie!==null?(s.firstEffect=B.firstEffect,s.lastEffect=ie,ie.nextEffect=null):s.firstEffect=s.lastEffect=null}else B=ES(E,k);var ue;return O!==null?ue=el(O,h):(ue=tl(h,b,v,null),ue.flags|=de),ue.return=s,B.return=s,B.sibling=ue,s.child=B,ue}function RS(r,s){r.lanes=It(r.lanes,s);var u=r.alternate;u!==null&&(u.lanes=It(u.lanes,s)),_r(r.return,s)}function uP(r,s,u){for(var h=s;h!==null;){if(h.tag===V){var v=h.memoizedState;v!==null&&RS(h,u)}else if(h.tag===Fe)RS(h,u);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)return;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}}function cP(r){for(var s=r,u=null;s!==null;){var h=s.alternate;h!==null&&Zd(h)===null&&(u=s),s=s.sibling}return u}function fP(r){if(r!==void 0&&r!=="forwards"&&r!=="backwards"&&r!=="together"&&!Em[r])if(Em[r]=!0,typeof r=="string")switch(r.toLowerCase()){case"together":case"forwards":case"backwards":{m('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',r,r.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.',r,r.toLowerCase());break}default:m('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',r);break}else m('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',r)}function dP(r,s){r!==void 0&&!mh[r]&&(r!=="collapsed"&&r!=="hidden"?(mh[r]=!0,m('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',r)):s!=="forwards"&&s!=="backwards"&&(mh[r]=!0,m('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',r)))}function OS(r,s){{var u=Array.isArray(r),h=!u&&typeof et(r)=="function";if(u||h){var v=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>",v,s,v),!1}}return!0}function hP(r,s){if((s==="forwards"||s==="backwards")&&r!==void 0&&r!==null&&r!==!1)if(Array.isArray(r)){for(var u=0;u<r.length;u++)if(!OS(r[u],u))return}else{var h=et(r);if(typeof h=="function"){var v=h.call(r);if(v)for(var b=v.next(),E=0;!b.done;b=v.next()){if(!OS(b.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 Am(r,s,u,h,v,b){var E=r.memoizedState;E===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:v,lastEffect:b}:(E.isBackwards=s,E.rendering=null,E.renderingStartTime=0,E.last=h,E.tail=u,E.tailMode=v,E.lastEffect=b)}function AS(r,s,u){var h=s.pendingProps,v=h.revealOrder,b=h.tail,E=h.children;fP(v),dP(b,v),hP(E,v),ei(r,s,E,u);var O=$i.current,k=Kd(O,Bc);if(k)O=qv(O,Bc),s.flags|=ne;else{var B=r!==null&&(r.flags&ne)!==oe;B&&uP(s,s.child,u),O=Hc(O)}if(Fa(s,O),(s.mode&Hn)===an)s.memoizedState=null;else switch(v){case"forwards":{var Y=cP(s.child),ie;Y===null?(ie=s.child,s.child=null):(ie=Y.sibling,Y.sibling=null),Am(s,!1,ie,Y,b,s.lastEffect);break}case"backwards":{var ue=null,Te=s.child;for(s.child=null;Te!==null;){var Pe=Te.alternate;if(Pe!==null&&Zd(Pe)===null){s.child=Te;break}var _e=Te.sibling;Te.sibling=ue,ue=Te,Te=_e}Am(s,!0,ue,null,b,s.lastEffect);break}case"together":{Am(s,!1,null,null,void 0,s.lastEffect);break}default:s.memoizedState=null}return s.child}function pP(r,s,u){Vv(s,s.stateNode.containerInfo);var h=s.pendingProps;return r===null?s.child=Qd(s,null,h,u):ei(r,s,h,u),s.child}var MS=!1;function vP(r,s,u){var h=s.type,v=h._context,b=s.pendingProps,E=s.memoizedProps,O=b.value;{"value"in b||MS||(MS=!0,m("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var k=s.type.propTypes;k&&Sr(k,b,"prop","Context.Provider")}if(za(s,O),E!==null){var B=E.value,Y=Nv(v,O,B);if(Y===0){if(E.children===b.children&&!Gr())return qs(r,s,u)}else zc(s,v,Y,u)}var ie=b.children;return ei(r,s,ie,u),s.child}var PS=!1;function mP(r,s,u){var h=s.type;h._context===void 0?h!==h.Consumer&&(PS||(PS=!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?"))):h=h._context;var v=s.pendingProps,b=v.children;typeof b!="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."),Ao(s,u);var E=tn(h,v.unstable_observedBits),O;return Zc.current=s,dr(!0),O=b(E),dr(!1),s.flags|=X,ei(r,s,O,u),s.child}function Mm(){vs=!0}function qs(r,s,u){return r!==null&&(s.dependencies=r.dependencies),dS(),tg(s.lanes),Yn(u,s.childLanes)?(LM(r,s),s.child):null}function gP(r,s,u){{var h=s.return;if(h===null)throw new Error("Cannot swap the root fiber.");if(r.alternate=null,s.alternate=null,u.index=s.index,u.sibling=s.sibling,u.return=s.return,u.ref=s.ref,s===h.child)h.child=u;else{var v=h.child;if(v===null)throw new Error("Expected parent to have a child.");for(;v.sibling!==s;)if(v=v.sibling,v===null)throw new Error("Expected to find the previous sibling.");v.sibling=u}var b=h.lastEffect;return b!==null?(b.nextEffect=r,h.lastEffect=r):h.firstEffect=h.lastEffect=r,r.nextEffect=null,r.flags=be,u.flags|=de,u}}function LS(r,s,u){var h=s.lanes;if(s._debugNeedsRemount&&r!==null)return gP(r,s,pg(s.type,s.key,s.pendingProps,s._debugOwner||null,s.mode,s.lanes));if(r!==null){var v=r.memoizedProps,b=s.pendingProps;if(v!==b||Gr()||s.type!==r.type)vs=!0;else if(Yn(u,h))(r.flags&Mr)!==oe?vs=!0:vs=!1;else{switch(vs=!1,s.tag){case z:yS(s),Gv();break;case L:B1(s);break;case D:{var E=s.type;Kn(E)&&ta(s);break}case P:Vv(s,s.stateNode.containerInfo);break;case j:{var O=s.memoizedProps.value;za(s,O);break}case ee:{var k=Yn(u,s.childLanes);k&&(s.flags|=le);var B=s.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}break;case V:{var Y=s.memoizedState;if(Y!==null){var ie=s.child,ue=ie.childLanes;if(Yn(u,ue))return xS(r,s,u);Fa(s,Hc($i.current));var Te=qs(r,s,u);return Te!==null?Te.sibling:null}else Fa(s,Hc($i.current));break}case Fe:{var Pe=(r.flags&ne)!==oe,_e=Yn(u,s.childLanes);if(Pe){if(_e)return AS(r,s,u);s.flags|=ne}var pt=s.memoizedState;if(pt!==null&&(pt.rendering=null,pt.tail=null,pt.lastEffect=null),Fa(s,$i.current),_e)break;return null}case it:case nt:return s.lanes=ye,Tm(r,s,u)}return qs(r,s,u)}}else vs=!1;switch(s.lanes=ye,s.tag){case A:return oP(r,s,s.type,u);case we:{var Mt=s.elementType;return iP(r,s,Mt,h,u)}case R:{var bt=s.type,fn=s.pendingProps,Nn=s.elementType===bt?fn:fi(bt,fn);return Cm(r,s,bt,Nn,u)}case D:{var se=s.type,pe=s.pendingProps,G=s.elementType===se?pe:fi(se,pe);return gS(r,s,se,G,u)}case z:return tP(r,s,u);case L:return nP(r,s,u);case M:return rP(r,s);case V:return xS(r,s,u);case P:return pP(r,s,u);case K:{var Ce=s.type,Qe=s.pendingProps,Ke=s.elementType===Ce?Qe:fi(Ce,Qe);return hS(r,s,Ce,Ke,u)}case F:return ZM(r,s,u);case $:return JM(r,s,u);case ee:return eP(r,s,u);case j:return vP(r,s,u);case Q:return mP(r,s,u);case ae:{var Lt=s.type,pn=s.pendingProps,Tn=fi(Lt,pn);if(s.type!==s.elementType){var Xt=Lt.propTypes;Xt&&Sr(Xt,Tn,"prop",Le(Lt))}return Tn=fi(Lt.type,Tn),pS(r,s,Lt,Tn,h,u)}case ge:return vS(r,s,s.type,s.pendingProps,h,u);case Ee:{var Vn=s.type,Wt=s.pendingProps,Cn=s.elementType===Vn?Wt:fi(Vn,Wt);return sP(r,s,Vn,Cn,u)}case Fe:return AS(r,s,u);case Be:break;case vt:break;case Oe:break;case it:return Tm(r,s,u);case nt:return KM(r,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 ms(r){r.flags|=le}function DS(r){r.flags|=De}var ef,tf,bh,Sh;if($n)ef=function(r,s,u,h){for(var v=s.child;v!==null;){if(v.tag===L||v.tag===M)Zt(r,v.stateNode);else if(v.tag!==P){if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===s)return;for(;v.sibling===null;){if(v.return===null||v.return===s)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},tf=function(r){},bh=function(r,s,u,h,v){var b=r.memoizedProps;if(b!==h){var E=s.stateNode,O=Fc(),k=Wn(E,u,b,h,v,O);s.updateQueue=k,k&&ms(s)}},Sh=function(r,s,u,h){u!==h&&ms(s)};else if(yi){ef=function(r,s,u,h){for(var v=s.child;v!==null;){if(v.tag===L){var b=v.stateNode;if(u&&h){var E=v.memoizedProps,O=v.type;b=cc(b,O,E,v)}Zt(r,b)}else if(v.tag===M){var k=v.stateNode;if(u&&h){var B=v.memoizedProps;k=Tl(k,B,v)}Zt(r,k)}else if(v.tag!==P){if(v.tag===V){if((v.flags&le)!==oe){var Y=v.memoizedState!==null;if(Y){var ie=v.child;if(ie!==null){ie.child!==null&&(ie.child.return=ie,ef(r,ie,!0,Y));var ue=ie.sibling;if(ue!==null){ue.return=v,v=ue;continue}}}}if(v.child!==null){v.child.return=v,v=v.child;continue}}else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v=v,v===s)return;for(;v.sibling===null;){if(v.return===null||v.return===s)return;v=v.return}v.sibling.return=v.return,v=v.sibling}};var kS=function(r,s,u,h){for(var v=s.child;v!==null;){if(v.tag===L){var b=v.stateNode;if(u&&h){var E=v.memoizedProps,O=v.type;b=cc(b,O,E,v)}lc(r,b)}else if(v.tag===M){var k=v.stateNode;if(u&&h){var B=v.memoizedProps;k=Tl(k,B,v)}lc(r,k)}else if(v.tag!==P){if(v.tag===V){if((v.flags&le)!==oe){var Y=v.memoizedState!==null;if(Y){var ie=v.child;if(ie!==null){ie.child!==null&&(ie.child.return=ie,kS(r,ie,!0,Y));var ue=ie.sibling;if(ue!==null){ue.return=v,v=ue;continue}}}}if(v.child!==null){v.child.return=v,v=v.child;continue}}else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v=v,v===s)return;for(;v.sibling===null;){if(v.return===null||v.return===s)return;v=v.return}v.sibling.return=v.return,v=v.sibling}};tf=function(r){var s=r.stateNode,u=r.firstEffect===null;if(!u){var h=s.containerInfo,v=Ko(h);kS(v,r,!1,!1),s.pendingChildren=v,ms(r),Rd(h,v)}},bh=function(r,s,u,h,v){var b=r.stateNode,E=r.memoizedProps,O=s.firstEffect===null;if(O&&E===h){s.stateNode=b;return}var k=s.stateNode,B=Fc(),Y=null;if(E!==h&&(Y=Wn(k,u,E,h,v,B)),O&&Y===null){s.stateNode=b;return}var ie=wv(b,Y,u,E,h,s,O,k);rn(ie,u,h,v,B)&&ms(s),s.stateNode=ie,O?ms(s):ef(ie,s,!1,!1)},Sh=function(r,s,u,h){if(u!==h){var v=Hv(),b=Fc();s.stateNode=Vr(h,v,b,s),ms(s)}else s.stateNode=r.stateNode}}else tf=function(r){},bh=function(r,s,u,h,v){},Sh=function(r,s,u,h){};function nf(r,s){if(!Xv())switch(r.tailMode){case"hidden":{for(var u=r.tail,h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?r.tail=null:h.sibling=null;break}case"collapsed":{for(var v=r.tail,b=null;v!==null;)v.alternate!==null&&(b=v),v=v.sibling;b===null?!s&&r.tail!==null?r.tail.sibling=null:r.tail=null:b.sibling=null;break}}}function NS(r,s,u){var h=s.pendingProps;switch(s.tag){case A:case we:case ge:case R:case K:case F:case $:case ee:case Q:case ae:return null;case D:{var v=s.type;return Kn(v)&&Dr(s),null}case z:{du(s),jl(s),Kv();var b=s.stateNode;if(b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),r===null||r.child===null){var E=Jd(s);E?ms(s):b.hydrate||(s.flags|=Ae)}return tf(s),null}case L:{Wv(s);var O=Hv(),k=s.type;if(r!==null&&s.stateNode!=null)bh(r,s,k,h,O),r.ref!==s.ref&&DS(s);else{if(!h){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 B=Fc(),Y=Jd(s);if(Y)jM(s,O,B)&&ms(s);else{var ie=An(k,h,O,B,s);ef(ie,s,!1,!1),s.stateNode=ie,rn(ie,k,h,O,B)&&ms(s)}s.ref!==null&&DS(s)}return null}case M:{var ue=h;if(r&&s.stateNode!=null){var Te=r.memoizedProps;Sh(r,s,Te,ue)}else{if(typeof ue!="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 Pe=Hv(),_e=Fc(),pt=Jd(s);pt?IM(s)&&ms(s):s.stateNode=Vr(ue,Pe,_e,s)}return null}case V:{hu(s);var Mt=s.memoizedState;if((s.flags&ne)!==oe)return s.lanes=u,(s.mode&nr)!==an&&ym(s),s;var bt=Mt!==null,fn=!1;if(r===null)s.memoizedProps.fallback!==void 0&&Jd(s);else{var Nn=r.memoizedState;fn=Nn!==null}if(bt&&!fn&&(s.mode&Hn)!==an){var se=r===null&&s.memoizedProps.unstable_avoidThisFallback!==!0;se||Kd($i.current,$v)?yL():bL()}return yi&&bt&&(s.flags|=le),$n&&(bt||fn)&&(s.flags|=le),null}case P:return du(s),tf(s),r===null&&ic(s.stateNode.containerInfo),null;case j:return cu(s),null;case Ee:{var pe=s.type;return Kn(pe)&&Dr(s),null}case Fe:{hu(s);var G=s.memoizedState;if(G===null)return null;var Ce=(s.flags&ne)!==oe,Qe=G.rendering;if(Qe===null)if(Ce)nf(G,!1);else{var Ke=xL()&&(r===null||(r.flags&ne)===oe);if(!Ke)for(var Lt=s.child;Lt!==null;){var pn=Zd(Lt);if(pn!==null){Ce=!0,s.flags|=ne,nf(G,!1);var Tn=pn.updateQueue;return Tn!==null&&(s.updateQueue=Tn,s.flags|=le),G.lastEffect===null&&(s.firstEffect=null),s.lastEffect=G.lastEffect,DM(s,u),Fa(s,qv($i.current,Bc)),s.child}Lt=Lt.sibling}G.tail!==null&&hn()>nx()&&(s.flags|=ne,Ce=!0,nf(G,!1),s.lanes=Is,Qh(Is))}else{if(!Ce){var Xt=Zd(Qe);if(Xt!==null){s.flags|=ne,Ce=!0;var Vn=Xt.updateQueue;if(Vn!==null&&(s.updateQueue=Vn,s.flags|=le),nf(G,!0),G.tail===null&&G.tailMode==="hidden"&&!Qe.alternate&&!Xv()){var Wt=s.lastEffect=G.lastEffect;return Wt!==null&&(Wt.nextEffect=null),null}}else hn()*2-G.renderingStartTime>nx()&&u!==kr&&(s.flags|=ne,Ce=!0,nf(G,!1),s.lanes=Is,Qh(Is))}if(G.isBackwards)Qe.sibling=s.child,s.child=Qe;else{var Cn=G.last;Cn!==null?Cn.sibling=Qe:s.child=Qe,G.last=Qe}}if(G.tail!==null){var sr=G.tail;G.rendering=sr,G.tail=sr.sibling,G.lastEffect=s.lastEffect,G.renderingStartTime=hn(),sr.sibling=null;var _n=$i.current;return Ce?_n=qv(_n,Bc):_n=Hc(_n),Fa(s,_n),sr}return null}case Be:break;case vt:break;case Oe:break;case it:case nt:{if(eg(s),r!==null){var ys=s.memoizedState,jn=r.memoizedState,bs=jn!==null,nl=ys!==null;bs!==nl&&h.mode!=="unstable-defer-without-hiding"&&(s.flags|=le)}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 yP(r,s){switch(r.tag){case D:{var u=r.type;Kn(u)&&Dr(r);var h=r.flags;return h&Bt?(r.flags=h&~Bt|ne,(r.mode&nr)!==an&&ym(r),r):null}case z:{du(r),jl(r),Kv();var v=r.flags;if((v&ne)!==oe)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return r.flags=v&~Bt|ne,r}case L:return Wv(r),null;case V:{hu(r);var b=r.flags;return b&Bt?(r.flags=b&~Bt|ne,(r.mode&nr)!==an&&ym(r),r):null}case Fe:return hu(r),null;case P:return du(r),null;case j:return cu(r),null;case it:case nt:return eg(r),null;default:return null}}function zS(r){switch(r.tag){case D:{var s=r.type.childContextTypes;s!=null&&Dr(r);break}case z:{du(r),jl(r),Kv();break}case L:{Wv(r);break}case P:du(r);break;case V:hu(r);break;case Fe:hu(r);break;case j:cu(r);break;case it:case nt:eg(r);break}}function Pm(r,s){return{value:r,source:s,stack:Dc(s)}}function bP(r,s){return!0}function Lm(r,s){try{var u=bP(r,s);if(u===!1)return;var h=s.value,v=s.source,b=s.stack,E=b!==null?b:"";if(h!=null&&h._suppressLogging){if(r.tag===D)return;console.error(h)}var O=v?Le(v.type):null,k=O?"The above error occurred in the <"+O+"> component:":"The above error occurred in one of your React components:",B,Y=Le(r.type);Y?B="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+Y+"."):B=`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 ie=k+`
|
|
136
136
|
`+E+`
|
|
137
137
|
|
|
138
|
-
`+(""+
|
|
138
|
+
`+(""+B);console.error(ie)}catch(ue){setTimeout(function(){throw ue})}}var SP=typeof WeakMap=="function"?WeakMap:Map;function _S(r,s,u){var h=ds(bn,u);h.tag=ja,h.payload={element:null};var v=s.value;return h.callback=function(){zL(v),Lm(r,s)},h}function jS(r,s,u){var h=ds(bn,u);h.tag=ja;var v=r.type.getDerivedStateFromError;if(typeof v=="function"){var b=s.value;h.payload=function(){return Lm(r,s),v(b)}}var E=r.stateNode;return E!==null&&typeof E.componentDidCatch=="function"?h.callback=function(){Cx(r),typeof v!="function"&&(kL(this),Lm(r,s));var k=s.value,B=s.stack;this.componentDidCatch(k,{componentStack:B!==null?B:""}),typeof v!="function"&&(Yn(r.lanes,zt)||m("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Le(r.type)||"Unknown"))}:h.callback=function(){Cx(r)},h}function xP(r,s,u){var h=r.pingCache,v;if(h===null?(h=r.pingCache=new SP,v=new Set,h.set(s,v)):(v=h.get(s),v===void 0&&(v=new Set,h.set(s,v))),!v.has(u)){v.add(u);var b=_L.bind(null,r,s,u);s.then(b,b)}}function wP(r,s,u,h,v){if(u.flags|=qt,u.firstEffect=u.lastEffect=null,h!==null&&typeof h=="object"&&typeof h.then=="function"){var b=h;if((u.mode&Hn)===an){var E=u.alternate;E?(u.updateQueue=E.updateQueue,u.memoizedState=E.memoizedState,u.lanes=E.lanes):(u.updateQueue=null,u.memoizedState=null)}var O=Kd($i.current,$v),k=s;do{if(k.tag===V&&zM(k,O)){var B=k.updateQueue;if(B===null){var Y=new Set;Y.add(b),k.updateQueue=Y}else B.add(b);if((k.mode&Hn)===an){if(k.flags|=ne,u.flags|=Mr,u.flags&=~(jt|qt),u.tag===D){var ie=u.alternate;if(ie===null)u.tag=Ee;else{var ue=ds(bn,zt);ue.tag=Mo,hs(u,ue)}}u.lanes=It(u.lanes,zt);return}xP(r,b,v),k.flags|=Bt,k.lanes=v;return}k=k.return}while(k!==null);h=new Error((Le(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.`)}
|
|
140
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}SL(),h=Pm(h,u);var Te=s;do{switch(Te.tag){case z:{var Pe=h;Te.flags|=Bt;var _e=fr(v);Te.lanes=It(Te.lanes,_e);var pt=_S(Te,Pe,_e);o(Te,pt);return}case D:var Mt=h,bt=Te.type,fn=Te.stateNode;if((Te.flags&ne)===oe&&(typeof bt.getDerivedStateFromError=="function"||fn!==null&&typeof fn.componentDidCatch=="function"&&!ng(fn))){Te.flags|=Bt;var Nn=fr(v);Te.lanes=It(Te.lanes,Nn);var se=jS(Te,Mt,Nn);o(Te,se);return}break}Te=Te.return}while(Te!==null)}function IS(r,s,u,h,v,b,E,O,k){var B=Array.prototype.slice.call(arguments,3);try{s.apply(u,B)}catch(Y){this.onError(Y)}}var US=IS;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Dm=document.createElement("react");US=function(s,u,h,v,b,E,O,k,B){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 Y=document.createEvent("Event"),ie=!1,ue=!0,Te=window.event,Pe=Object.getOwnPropertyDescriptor(window,"event");function _e(){Dm.removeEventListener(pe,Mt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Te)}var pt=Array.prototype.slice.call(arguments,3);function Mt(){ie=!0,_e(),u.apply(h,pt),ue=!1}var bt,fn=!1,Nn=!1;function se(G){if(bt=G.error,fn=!0,bt===null&&G.colno===0&&G.lineno===0&&(Nn=!0),G.defaultPrevented&&bt!=null&&typeof bt=="object")try{bt._suppressLogging=!0}catch{}}var pe="react-"+(s||"invokeguardedcallback");if(window.addEventListener("error",se),Dm.addEventListener(pe,Mt,!1),Y.initEvent(pe,!1,!1),Dm.dispatchEvent(Y),Pe&&Object.defineProperty(window,"event",Pe),ie&&ue&&(fn?Nn&&(bt=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.")):bt=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(bt)),window.removeEventListener("error",se),!ie)return _e(),IS.apply(this,arguments)}}var EP=US,rf=!1,xh=null,TP={onError:function(r){rf=!0,xh=r}};function Ys(r,s,u,h,v,b,E,O,k){rf=!1,xh=null,EP.apply(TP,arguments)}function Qs(){return rf}function Gs(){if(rf){var r=xh;return rf=!1,xh=null,r}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 FS=null;FS=new Set;var CP=typeof WeakSet=="function"?WeakSet:Set,RP=function(r,s){s.props=r.memoizedProps,s.state=r.memoizedState,s.componentWillUnmount()};function OP(r,s){if(Ys(null,RP,null,r,s),Qs()){var u=Gs();_o(r,u)}}function BS(r){var s=r.ref;if(s!==null)if(typeof s=="function"){if(Ys(null,s,null,null),Qs()){var u=Gs();_o(r,u)}}else s.current=null}function AP(r,s){if(Ys(null,s,null),Qs()){var u=Gs();_o(r,u)}}function MP(r,s){switch(s.tag){case R:case K:case ge:case Oe:return;case D:{if(s.flags&Ae&&r!==null){var u=r.memoizedProps,h=r.memoizedState,v=s.stateNode;s.type===s.elementType&&!Ya&&(v.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.",Le(s.type)||"instance"),v.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.",Le(s.type)||"instance"));var b=v.getSnapshotBeforeUpdate(s.elementType===s.type?u:fi(s.type,u),h);{var E=FS;b===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.",Le(s.type)))}v.__reactInternalSnapshotBeforeUpdate=b}return}case z:{if($n&&s.flags&Ae){var O=s.stateNode;Xo(O.containerInfo)}return}case L:case M:case P:case Ee: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 HS(r,s){var u=s.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var v=h.next,b=v;do{if((b.tag&r)===r){var E=b.destroy;b.destroy=void 0,E!==void 0&&E()}b=b.next}while(b!==v)}}function PP(r,s){var u=s.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var v=h.next,b=v;do{if((b.tag&r)===r){var E=b.create;b.destroy=E();{var O=b.destroy;if(O!==void 0&&typeof O!="function"){var k=void 0;O===null?k=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof O.then=="function"?k=`
|
|
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 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
|
-
`+(" "+
|
|
153
|
+
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:k=" You returned: "+O,m("An effect function must not return anything besides a function, which is used for clean-up.%s",k)}}}b=b.next}while(b!==v)}}function LP(r){var s=r.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var h=u.next,v=h;do{var b=v,E=b.next,O=b.tag;(O&Vc)!==Yv&&(O&Ba)!==Yv&&(cx(r,v),PL(r,v)),v=E}while(v!==h)}}function DP(r,s,u,h){switch(u.tag){case R:case K:case ge:case Oe:{PP(Ha|Ba,u),LP(u);return}case D:{var v=u.stateNode;if(u.flags&le)if(s===null)u.type===u.elementType&&!Ya&&(v.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.",Le(u.type)||"instance"),v.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.",Le(u.type)||"instance")),v.componentDidMount();else{var b=u.elementType===u.type?s.memoizedProps:fi(u.type,s.memoizedProps),E=s.memoizedState;u.type===u.elementType&&!Ya&&(v.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.",Le(u.type)||"instance"),v.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.",Le(u.type)||"instance")),v.componentDidUpdate(b,E,v.__reactInternalSnapshotBeforeUpdate)}var O=u.updateQueue;O!==null&&(u.type===u.elementType&&!Ya&&(v.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.",Le(u.type)||"instance"),v.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.",Le(u.type)||"instance")),_(u,O,v));return}case z:{var k=u.updateQueue;if(k!==null){var B=null;if(u.child!==null)switch(u.child.tag){case L:B=dt(u.child.stateNode);break;case D:B=u.child.stateNode;break}_(u,k,B)}return}case L:{var Y=u.stateNode;if(s===null&&u.flags&le){var ie=u.type,ue=u.memoizedProps;sc(Y,ie,ue,u)}return}case M:return;case P:return;case ee:{{var Te=u.memoizedProps;Te.onCommit;var Pe=Te.onRender;u.stateNode.effectDuration;var _e=GM();typeof Pe=="function"&&Pe(u.memoizedProps.id,s===null?"mount":"update",u.actualDuration,u.treeBaseDuration,u.actualStartTime,_e,r.memoizedInteractions)}return}case V:{FP(r,u);return}case Fe:case Ee:case Be:case vt:case it:case nt: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 VS(r,s){if($n)for(var u=r;;){if(u.tag===L){var h=u.stateNode;s?oc(h):xv(u.stateNode,u.memoizedProps)}else if(u.tag===M){var v=u.stateNode;s?ac(v):Cd(v,u.memoizedProps)}else if(!((u.tag===it||u.tag===nt)&&u.memoizedState!==null&&u!==r)){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===r)return;for(;u.sibling===null;){if(u.return===null||u.return===r)return;u=u.return}u.sibling.return=u.return,u=u.sibling}}function kP(r){var s=r.ref;if(s!==null){var u=r.stateNode,h;switch(r.tag){case L:h=dt(u);break;default:h=u}typeof s=="function"?s(h):(s.hasOwnProperty("current")||m("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Le(r.type)),s.current=h)}}function NP(r){var s=r.ref;s!==null&&(typeof s=="function"?s(null):s.current=null)}function WS(r,s,u){switch(wr(s),s.tag){case R:case K:case ae:case ge:case Oe:{var h=s.updateQueue;if(h!==null){var v=h.lastEffect;if(v!==null){var b=v.next,E=b;do{var O=E,k=O.destroy,B=O.tag;k!==void 0&&((B&Vc)!==Yv?cx(s,E):AP(s,k)),E=E.next}while(E!==b)}}return}case D:{BS(s);var Y=s.stateNode;typeof Y.componentWillUnmount=="function"&&OP(s,Y);return}case L:{BS(s);return}case P:{$n?GS(r,s):yi&&zP(s);return}case Be:return;case Ue:return;case vt:return}}function $S(r,s,u){for(var h=s;;){if(WS(r,h),h.child!==null&&(!$n||h.tag!==P)){h.child.return=h,h=h.child;continue}if(h===s)return;for(;h.sibling===null;){if(h.return===null||h.return===s)return;h=h.return}h.sibling.return=h.return,h=h.sibling}}function qS(r){r.alternate=null,r.child=null,r.dependencies=null,r.firstEffect=null,r.lastEffect=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.return=null,r.updateQueue=null,r._debugOwner=null}function zP(r){if(yi){var s=r.stateNode,u=s.containerInfo,h=Ko(u);uc(u,h)}}function _P(r){if(yi){switch(r.tag){case D:case L:case M:case Be:return;case z:case P:{var s=r.stateNode,u=s.containerInfo,h=s.pendingChildren;uc(u,h);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 jP(r){for(var s=r.return;s!==null;){if(YS(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 YS(r){return r.tag===L||r.tag===z||r.tag===P}function IP(r){var s=r;e:for(;;){for(;s.sibling===null;){if(s.return===null||YS(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==L&&s.tag!==M&&s.tag!==Ue;){if(s.flags&de||s.child===null||s.tag===P)continue e;s.child.return=s,s=s.child}if(!(s.flags&de))return s.stateNode}}function QS(r){if($n){var s=jP(r),u,h,v=s.stateNode;switch(s.tag){case L:u=v,h=!1;break;case z:u=v.containerInfo,h=!0;break;case P:u=v.containerInfo,h=!0;break;case Be:default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}s.flags&Ve&&(Td(u),s.flags&=~Ve);var b=IP(r);h?km(r,b,u):Nm(r,b,u)}}function km(r,s,u){var h=r.tag,v=h===L||h===M;if(v||Hr){var b=v?r.stateNode:r.stateNode.instance;s?yv(u,b,s):wl(u,b)}else if(h!==P){var E=r.child;if(E!==null){km(E,s,u);for(var O=E.sibling;O!==null;)km(O,s,u),O=O.sibling}}}function Nm(r,s,u){var h=r.tag,v=h===L||h===M;if(v||Hr){var b=v?r.stateNode:r.stateNode.instance;s?ts(u,b,s):Ed(u,b)}else if(h!==P){var E=r.child;if(E!==null){Nm(E,s,u);for(var O=E.sibling;O!==null;)Nm(O,s,u),O=O.sibling}}}function GS(r,s,u){for(var h=s,v=!1,b,E;;){if(!v){var O=h.return;e:for(;;){if(O===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");var k=O.stateNode;switch(O.tag){case L:b=k,E=!1;break e;case z:b=k.containerInfo,E=!0;break e;case P:b=k.containerInfo,E=!0;break e}O=O.return}v=!0}if(h.tag===L||h.tag===M)$S(r,h),E?Sv(b,h.stateNode):bv(b,h.stateNode);else if(h.tag===P){if(h.child!==null){b=h.stateNode.containerInfo,E=!0,h.child.return=h,h=h.child;continue}}else if(WS(r,h),h.child!==null){h.child.return=h,h=h.child;continue}if(h===s)return;for(;h.sibling===null;){if(h.return===null||h.return===s)return;h=h.return,h.tag===P&&(v=!1)}h.sibling.return=h.return,h=h.sibling}}function UP(r,s,u){$n?GS(r,s):$S(r,s);var h=s.alternate;qS(s),h!==null&&qS(h)}function zm(r,s){if(!$n){switch(s.tag){case R:case K:case ae:case ge:case Oe:{HS(Ha|Ba,s);return}case ee:return;case V:{XS(s),wh(s);return}case Fe:{wh(s);return}case z:{if(dn){var u=s.stateNode;u.hydrate&&(u.hydrate=!1,fo(u.containerInfo))}break}case it:case nt:return}_P(s);return}switch(s.tag){case R:case K:case ae:case ge:case Oe:{HS(Ha|Ba,s);return}case D:return;case L:{var h=s.stateNode;if(h!=null){var v=s.memoizedProps,b=r!==null?r.memoizedProps:v,E=s.type,O=s.updateQueue;s.updateQueue=null,O!==null&&El(h,O,E,b,v,s)}return}case M:{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 k=s.stateNode,B=s.memoizedProps,Y=r!==null?r.memoizedProps:B;uo(k,Y,B);return}case z:{if(dn){var ie=s.stateNode;ie.hydrate&&(ie.hydrate=!1,fo(ie.containerInfo))}return}case ee:return;case V:{XS(s),wh(s);return}case Fe:{wh(s);return}case Ee:return;case Be:break;case vt:break;case it:case nt:{var ue=s.memoizedState,Te=ue!==null;VS(s,Te);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 XS(r){var s=r.memoizedState;if(s!==null&&(gL(),$n)){var u=r.child;VS(u,!0)}}function FP(r,s){if(dn){var u=s.memoizedState;if(u===null){var h=s.alternate;if(h!==null){var v=h.memoizedState;if(v!==null){var b=v.dehydrated;b!==null&&$r(b)}}}}}function wh(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new CP),s.forEach(function(h){var v=IL.bind(null,r,h);u.has(h)||(h.__reactDoNotTraceInteractions!==!0&&(v=p.unstable_wrap(v)),u.add(h),h.then(v,v))})}}function BP(r,s){if(r!==null){var u=r.memoizedState;if(u===null||u.dehydrated!==null){var h=s.memoizedState;return h!==null&&h.dehydrated===null}}return!1}function HP(r){$n&&Td(r.stateNode)}var Eh=0,Th=1,Ch=2,Rh=3,Oh=4;if(typeof Symbol=="function"&&Symbol.for){var sf=Symbol.for;Eh=sf("selector.component"),Th=sf("selector.has_pseudo_class"),Ch=sf("selector.role"),Rh=sf("selector.test_id"),Oh=sf("selector.text")}function VP(r){return{$$typeof:Eh,value:r}}function WP(r){return{$$typeof:Th,value:r}}function $P(r){return{$$typeof:Ch,value:r}}function qP(r){return{$$typeof:Oh,value:r}}function YP(r){return{$$typeof:Rh,value:r}}function _m(r){var s=Sl(r);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=vv(r);if(u===null)throw Error("Could not find React container within specified host subtree.");return u.stateNode.current}}function jm(r,s){switch(s.$$typeof){case Eh:if(r.type===s.value)return!0;break;case Th:return QP(r,s.value);case Ch:if(r.tag===L){var u=r.stateNode;if(mv(u,s.value))return!0}break;case Oh:if(r.tag===L||r.tag===M){var h=sn(r);if(h!==null&&h.indexOf(s.value)>=0)return!0}break;case Rh:if(r.tag===L){var v=r.memoizedProps["data-testname"];if(typeof v=="string"&&v.toLowerCase()===s.value.toLowerCase())return!0}break;default:throw Error("Invalid selector type "+s+" specified.")}return!1}function Im(r){switch(r.$$typeof){case Eh:var s=Le(r.value)||"Unknown";return"<"+s+">";case Th:return":has("+(Im(r)||"")+")";case Ch:return'[role="'+r.value+'"]';case Oh:return'"'+r.value+'"';case Rh:return'[data-testname="'+r.value+'"]';default:throw Error("Invalid selector type "+r+" specified.")}}function KS(r,s){for(var u=[],h=[r,0],v=0;v<h.length;){var b=h[v++],E=h[v++],O=s[E];if(!(b.tag===L&&ii(b))){for(;O!=null&&jm(b,O);)E++,O=s[E];if(E===s.length)u.push(b);else for(var k=b.child;k!==null;)h.push(k,E),k=k.sibling}}return u}function QP(r,s){for(var u=[r,0],h=0;h<u.length;){var v=u[h++],b=u[h++],E=s[b];if(!(v.tag===L&&ii(v))){for(;E!=null&&jm(v,E);)b++,E=s[b];if(b===s.length)return!0;for(var O=v.child;O!==null;)u.push(O,b),O=O.sibling}}return!1}function Ah(r,s){if(!Wr)throw Error("Test selector API is not supported by this renderer.");for(var u=_m(r),h=KS(u,s),v=[],b=Array.from(h),E=0;E<b.length;){var O=b[E++];if(O.tag===L){if(ii(O))continue;v.push(O.stateNode)}else for(var k=O.child;k!==null;)b.push(k),k=k.sibling}return v}function GP(r,s){if(!Wr)throw Error("Test selector API is not supported by this renderer.");for(var u=_m(r),h=0,v=[],b=[u,0],E=0;E<b.length;){var O=b[E++],k=b[E++],B=s[k];if(!(O.tag===L&&ii(O))&&(jm(O,B)&&(v.push(Im(B)),k++,k>h&&(h=k)),k<s.length))for(var Y=O.child;Y!==null;)b.push(Y,k),Y=Y.sibling}if(h<s.length){for(var ie=[],ue=h;ue<s.length;ue++)ie.push(Im(s[ue]));return`findAllNodes was able to match part of the selector:
|
|
154
|
+
`+(" "+v.join(" > ")+`
|
|
155
155
|
|
|
156
156
|
`)+`No matching component was found for:
|
|
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,Tn=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&Pn)===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&Pn)===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)),Tn!==null)for(var d=Tn.return;d!==null;)Mb(d),d=d.return;Di=i,Tn=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=Tn;try{if(Po(),HS(),Fn(),Pm.current=null,u===null||u.return===null){ai=Dh,zh=s,Tn=null;return}Va&&u.mode&Qn&&ph(u,!0),rD(i,u.return,u,s,Li),nx(u)}catch(d){s=d,Tn===u&&u!==null?(u=u.return,Tn=u):u=Tn;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),Tn!==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(;Tn!==null;)tx(Tn)}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,Tn!==null?Ws:(Di=null,Li=ce,ai)}function aL(){for(;Tn!==null&&!xo();)tx(Tn)}function tx(i){var s=i.alternate;En(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):Tn=u,Pm.current=null}function nx(i){var s=i;do{var u=s.alternate,d=s.return;if((s.flags&Yr)===ot){En(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){Tn=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,Tn=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){Tn=I;return}s=d,Tn=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,Tn=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&&(En(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;){En(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;){En(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(En(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(En(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&(Pn|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{En(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?En(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{En(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?En(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=Tn&&be(Tn.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{En(i),m(`It looks like you're using the wrong act() around your test interactions.
|
|
157
|
+
`+(" "+ie.join(" > "))}return null}function XP(r,s){if(!Wr)throw Error("Test selector API is not supported by this renderer.");for(var u=Ah(r,s),h=[],v=0;v<u.length;v++)h.push(xl(u[v]));for(var b=h.length-1;b>0;b--)for(var E=h[b],O=E.x,k=O+E.width,B=E.y,Y=B+E.height,ie=b-1;ie>=0;ie--)if(b!==ie){var ue=h[ie],Te=ue.x,Pe=Te+ue.width,_e=ue.y,pt=_e+ue.height;if(O>=Te&&B>=_e&&k<=Pe&&Y<=pt){h.splice(b,1);break}else if(O===Te&&E.width===ue.width&&!(pt<B)&&!(_e>Y)){_e>B&&(ue.height+=_e-B,ue.y=B),pt<Y&&(ue.height=Y-_e),h.splice(b,1);break}else if(B===_e&&E.height===ue.height&&!(Pe<O)&&!(Te>k)){Te>O&&(ue.width+=Te-O,ue.x=O),Pe<k&&(ue.width=k-Te),h.splice(b,1);break}}return h}function KP(r,s){if(!Wr)throw Error("Test selector API is not supported by this renderer.");for(var u=_m(r),h=KS(u,s),v=Array.from(h),b=0;b<v.length;){var E=v[b++];if(!ii(E)){if(E.tag===L){var O=E.stateNode;if(gv(O))return!0}for(var k=E.child;k!==null;)v.push(k),k=k.sibling}}return!1}var Mh=[];function ZP(){Wr&&Mh.forEach(function(r){return r()})}function JP(r,s,u,h){if(!Wr)throw Error("Test selector API is not supported by this renderer.");var v=Ah(r,s),b=Go(v,u,h),E=b.disconnect,O=b.observe,k=b.unobserve,B=function(){var Y=Ah(r,s);v.forEach(function(ie){Y.indexOf(ie)<0&&k(ie)}),Y.forEach(function(ie){v.indexOf(ie)<0&&O(ie)})};return Mh.push(B),{disconnect:function(){var Y=Mh.indexOf(B);Y>=0&&Mh.splice(Y,1),E()}}}var ZS=!1,Ph=null;function eL(r){if(Ph===null)try{var s=("require"+Math.random()).slice(0,7),u=t&&t[s];Ph=u.call(t,"timers").setImmediate}catch{Ph=function(v){ZS===!1&&(ZS=!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 b=new MessageChannel;b.port1.onmessage=v,b.port2.postMessage(void 0)}}return Ph(r)}var tL=Math.ceil,Um=g.ReactCurrentDispatcher,Fm=g.ReactCurrentOwner,gu=g.IsSomeRendererActing,En=0,of=1,nL=2,Bm=4,Hm=8,ti=16,Yi=32,JS=64,Xs=0,Lh=1,Dh=2,kh=3,Nh=4,Vm=5,ut=En,Ir=null,kn=null,Ur=ye,gs=ye,Wm=Qr(ye),pr=Xs,zh=null,Qa=ye,_h=ye,Ga=ye,jh=ye,$m=null,qm=0,ex=500,tx=1/0,rL=500;function No(){tx=hn()+rL}function nx(){return tx}var Xe=null,Ih=!1,Ym=null,yu=null,Ks=!1,bu=null,af=cs,Qm=ye,Gm=[],Xm=[],Zs=null,iL=50,lf=0,Km=null,sL=50,Uh=0,Xa=null,uf=bn,Js=ye,Fh=ye,Zm=!1,cf=null,ff=!1;function oL(){return Ir}function ni(){return(ut&(ti|Yi))!==En?hn():(uf!==bn||(uf=hn()),uf)}function zo(r){var s=r.mode;if((s&Hn)===an)return zt;if((s&Bi)===an)return Ye()===Gt?zt:ca;Js===ye&&(Js=Qa);var u=Oa()!==Ra;if(u)return Fh!==ye&&(Fh=$m!==null?$m.pendingLanes:ye),Av(Js,Fh);var h=Ye(),v;if((ut&Bm)!==En&&h===Nr)v=bo(as,Js);else{var b=kd(h);v=bo(b,Js)}return v}function aL(r){var s=r.mode;return(s&Hn)===an?zt:(s&Bi)===an?Ye()===Gt?zt:ca:(Js===ye&&(Js=Qa),_d(Js))}function vr(r,s,u){FL(),WL(r);var h=Bh(r,s);if(h===null)return HL(r),null;So(h,s,u),h===Ir&&(Ga=It(Ga,s),pr===Nh&&Su(h,Ur));var v=Ye();s===zt?(ut&Hm)!==En&&(ut&(ti|Yi))===En?(jo(h,s),Jm(h)):(hi(h,u),jo(h,s),ut===En&&(No(),tr())):((ut&Bm)!==En&&(v===Nr||v===Gt)&&(Zs===null?Zs=new Set([h]):Zs.add(h)),hi(h,u),jo(h,s)),$m=h}function Bh(r,s){r.lanes=It(r.lanes,s);var u=r.alternate;u!==null&&(u.lanes=It(u.lanes,s)),u===null&&(r.flags&(de|Ct))!==oe&&dx(r);for(var h=r,v=r.return;v!==null;)v.childLanes=It(v.childLanes,s),u=v.alternate,u!==null?u.childLanes=It(u.childLanes,s):(v.flags&(de|Ct))!==oe&&dx(r),h=v,v=v.return;if(h.tag===z){var b=h.stateNode;return b}else return null}function hi(r,s){var u=r.callbackNode;Gl(r,s);var h=Er(r,r===Ir?Ur:ye),v=pa();if(h===ye){u!==null&&(Eo(u),r.callbackNode=null,r.callbackPriority=Ii);return}if(u!==null){var b=r.callbackPriority;if(b===v)return;Eo(u)}var E;if(v===zs)E=fs(Jm.bind(null,r));else if(v===sa)E=Qn(Gt,Jm.bind(null,r));else{var O=Fi(v);E=Qn(O,rx.bind(null,r))}r.callbackPriority=v,r.callbackNode=E}function rx(r){if(uf=bn,Js=ye,Fh=ye,(ut&(ti|Yi))!==En)throw Error("Should not already be working.");var s=r.callbackNode,u=Qi();if(u&&r.callbackNode!==s)return null;var h=Er(r,r===Ir?Ur:ye);if(h===ye)return null;var v=EL(r,h);if(Yn(Qa,Ga))xu(r,ye);else if(v!==Xs){if(v===Dh&&(ut|=JS,r.hydrate&&(r.hydrate=!1,Xo(r.containerInfo)),h=Cc(r),h!==ye&&(v=df(r,h))),v===Lh){var b=zh;throw xu(r,ye),Su(r,h),hi(r,hn()),b}var E=r.current.alternate;r.finishedWork=E,r.finishedLanes=h,lL(r,v,h)}return hi(r,hn()),r.callbackNode===s?rx.bind(null,r):null}function lL(r,s,u){switch(s){case Xs:case Lh:throw Error("Root did not complete. This is a bug in React.");case Dh:{Ka(r);break}case kh:{if(Su(r,u),zd(u)&&!Sx()){var h=qm+ex-hn();if(h>10){var v=Er(r,ye);if(v!==ye)break;var b=r.suspendedLanes;if(!us(b,u)){ni(),Kl(r,b);break}r.timeoutHandle=Ot(Ka.bind(null,r),h);break}}Ka(r);break}case Nh:{if(Su(r,u),Rc(u))break;if(!Sx()){var E=da(r,u),O=E,k=hn()-O,B=UL(k)-k;if(B>10){r.timeoutHandle=Ot(Ka.bind(null,r),B);break}}Ka(r);break}case Vm:{Ka(r);break}default:throw Error("Unknown root exit status.")}}function Su(r,s){s=va(s,jh),s=va(s,Ga),Fd(r,s)}function Jm(r){if((ut&(ti|Yi))!==En)throw Error("Should not already be working.");Qi();var s,u;if(r===Ir&&Yn(r.expiredLanes,Ur)?(s=Ur,u=df(r,s),Yn(Qa,Ga)&&(s=Er(r,s),u=df(r,s))):(s=Er(r,ye),u=df(r,s)),r.tag!==Ns&&u===Dh&&(ut|=JS,r.hydrate&&(r.hydrate=!1,Xo(r.containerInfo)),s=Cc(r),s!==ye&&(u=df(r,s))),u===Lh){var h=zh;throw xu(r,ye),Su(r,s),hi(r,hn()),h}var v=r.current.alternate;return r.finishedWork=v,r.finishedLanes=s,Ka(r),hi(r,hn()),null}function uL(r,s){Bd(r,s),hi(r,hn()),(ut&(ti|Yi))===En&&(No(),tr())}function cL(){if((ut&(of|ti|Yi))!==En){(ut&ti)!==En&&m("unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}dL(),Qi()}function fL(r){return ui(Kr,r)}function dL(){if(Zs!==null){var r=Zs;Zs=null,r.forEach(function(s){Zl(s),hi(s,hn())})}tr()}function ix(r,s){var u=ut;ut|=of;try{return r(s)}finally{ut=u,ut===En&&(No(),tr())}}function hL(r,s){var u=ut;ut|=nL;try{return r(s)}finally{ut=u,ut===En&&(No(),tr())}}function pL(r,s,u,h,v){var b=ut;ut|=Bm;try{return ui(Nr,r.bind(null,s,u,h,v))}finally{ut=b,ut===En&&(No(),tr())}}function vL(r,s){var u=ut;ut&=~of,ut|=Hm;try{return r(s)}finally{ut=u,ut===En&&(No(),tr())}}function Hh(r,s){var u=ut;if((u&(ti|Yi))!==En)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."),r(s);ut|=of;try{return r?ui(Gt,r.bind(null,s)):void 0}finally{ut=u,tr()}}function mL(r){var s=ut;ut|=of;try{ui(Gt,r)}finally{ut=s,ut===En&&(No(),tr())}}function Vh(r,s){Mn(Wm,gs,r),gs=It(gs,s),Qa=It(Qa,s)}function eg(r){gs=Wm.current,Jt(Wm,r)}function xu(r,s){r.finishedWork=null,r.finishedLanes=ye;var u=r.timeoutHandle;if(u!==gi&&(r.timeoutHandle=gi,Sn(u)),kn!==null)for(var h=kn.return;h!==null;)zS(h),h=h.return;Ir=r,kn=el(r.current,null),Ur=gs=Qa=s,pr=Xs,zh=null,_h=ye,Ga=ye,jh=ye,Xa=null,Zr.discardPendingWarnings()}function sx(r,s){do{var u=kn;try{if(Na(),G1(),Gn(),Fm.current=null,u===null||u.return===null){pr=Lh,zh=s,kn=null;return}Pr&&u.mode&nr&&vh(u,!0),wP(r,u.return,u,s,Ur),ux(u)}catch(h){s=h,kn===u&&u!==null?(u=u.return,kn=u):u=kn;continue}return}while(!0)}function ox(){var r=Um.current;return Um.current=dh,r===null?dh:r}function ax(r){Um.current=r}function Wh(r){{var s=p.__interactionsRef.current;return p.__interactionsRef.current=r.memoizedInteractions,s}}function $h(r){p.__interactionsRef.current=r}function gL(){qm=hn()}function tg(r){_h=It(r,_h)}function yL(){pr===Xs&&(pr=kh)}function bL(){(pr===Xs||pr===kh)&&(pr=Nh),Ir!==null&&(Nd(_h)||Nd(Ga))&&Su(Ir,Ur)}function SL(){pr!==Vm&&(pr=Dh)}function xL(){return pr===Xs}function df(r,s){var u=ut;ut|=ti;var h=ox();(Ir!==r||Ur!==s)&&(xu(r,s),yx(r,s));var v=Wh(r);do try{wL();break}catch(b){sx(r,b)}while(!0);if(Na(),$h(v),ut=u,ax(h),kn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Ir=null,Ur=ye,pr}function wL(){for(;kn!==null;)lx(kn)}function EL(r,s){var u=ut;ut|=ti;var h=ox();(Ir!==r||Ur!==s)&&(No(),xu(r,s),yx(r,s));var v=Wh(r);do try{TL();break}catch(b){sx(r,b)}while(!0);return Na(),$h(v),ax(h),ut=u,kn!==null?Xs:(Ir=null,Ur=ye,pr)}function TL(){for(;kn!==null&&!Ea();)lx(kn)}function lx(r){var s=r.alternate;Ln(r);var u;(r.mode&nr)!==an?(gm(r),u=rg(s,r,gs),vh(r,!0)):u=rg(s,r,gs),Gn(),r.memoizedProps=r.pendingProps,u===null?ux(r):kn=u,Fm.current=null}function ux(r){var s=r;do{var u=s.alternate,h=s.return;if((s.flags&qt)===oe){Ln(s);var v=void 0;if((s.mode&nr)===an?v=NS(u,s,gs):(gm(s),v=NS(u,s,gs),vh(s,!1)),Gn(),v!==null){kn=v;return}if(CL(s),h!==null&&(h.flags&qt)===oe){h.firstEffect===null&&(h.firstEffect=s.firstEffect),s.lastEffect!==null&&(h.lastEffect!==null&&(h.lastEffect.nextEffect=s.firstEffect),h.lastEffect=s.lastEffect);var b=s.flags;b>X&&(h.lastEffect!==null?h.lastEffect.nextEffect=s:h.firstEffect=s,h.lastEffect=s)}}else{var E=yP(s);if(E!==null){E.flags&=gn,kn=E;return}if((s.mode&nr)!==an){vh(s,!1);for(var O=s.actualDuration,k=s.child;k!==null;)O+=k.actualDuration,k=k.sibling;s.actualDuration=O}h!==null&&(h.firstEffect=h.lastEffect=null,h.flags|=qt)}var B=s.sibling;if(B!==null){kn=B;return}s=h,kn=s}while(s!==null);pr===Xs&&(pr=Vm)}function CL(r){if(!((r.tag===nt||r.tag===it)&&r.memoizedState!==null&&!Yn(gs,kr)&&(r.mode&Bi)!==ye)){var s=ye;if((r.mode&nr)!==an){for(var u=r.actualDuration,h=r.selfBaseDuration,v=r.alternate===null||r.child!==r.alternate.child,b=r.child;b!==null;)s=It(s,It(b.lanes,b.childLanes)),v&&(u+=b.actualDuration),h+=b.treeBaseDuration,b=b.sibling;var E=r.tag===V&&r.memoizedState!==null;if(E){var O=r.child;O!==null&&(h-=O.treeBaseDuration)}r.actualDuration=u,r.treeBaseDuration=h}else for(var k=r.child;k!==null;)s=It(s,It(k.lanes,k.childLanes)),k=k.sibling;r.childLanes=s}}function Ka(r){var s=Ye();return ui(Gt,RL.bind(null,r,s)),null}function RL(r,s){do Qi();while(bu!==null);if(BL(),(ut&(ti|Yi))!==En)throw Error("Should not already be working.");var u=r.finishedWork,h=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=ye,u===r.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");r.callbackNode=null;var v=It(u.lanes,u.childLanes);Jl(r,v),Zs!==null&&!Dv(v)&&Zs.has(r)&&Zs.delete(r),r===Ir&&(Ir=null,kn=null,Ur=ye);var b;if(u.flags>X?u.lastEffect!==null?(u.lastEffect.nextEffect=u,b=u.firstEffect):b=u:b=u.firstEffect,b!==null){var E=ut;ut|=Yi;var O=Wh(r);Fm.current=null,cf=Rt(r.containerInfo),ff=!1,Xe=b;do if(Ys(null,OL,null),Qs()){if(Xe===null)throw Error("Should be working on an effect.");var k=Gs();_o(Xe,k),Xe=Xe.nextEffect}while(Xe!==null);cf=null,fS(),Xe=b;do if(Ys(null,AL,null,r,s),Qs()){if(Xe===null)throw Error("Should be working on an effect.");var B=Gs();_o(Xe,B),Xe=Xe.nextEffect}while(Xe!==null);ff&&wd(),Et(r.containerInfo),r.current=u,Xe=b;do if(Ys(null,ML,null,r,h),Qs()){if(Xe===null)throw Error("Should be working on an effect.");var Y=Gs();_o(Xe,Y),Xe=Xe.nextEffect}while(Xe!==null);Xe=null,xo(),$h(O),ut=E}else r.current=u,fS();var ie=Ks;if(Ks)Ks=!1,bu=r,Qm=h,af=s;else for(Xe=b;Xe!==null;){var ue=Xe.nextEffect;Xe.nextEffect=null,Xe.flags&be&&Ex(Xe),Xe=ue}if(v=r.pendingLanes,v!==ye){if(Xa!==null){var Te=Xa;Xa=null;for(var Pe=0;Pe<Te.length;Pe++)gx(r,Te[Pe],r.memoizedInteractions)}jo(r,v)}else yu=null;if(ie||bx(r,h),v===zt?r===Km?lf++:(lf=0,Km=r):lf=0,ra(u.stateNode,s),ZP(),hi(r,hn()),Ih){Ih=!1;var _e=Ym;throw Ym=null,_e}return(ut&Hm)!==En||tr(),null}function OL(){for(;Xe!==null;){var r=Xe.alternate;!ff&&cf!==null&&((Xe.flags&be)!==oe?je(Xe,cf)&&(ff=!0,Qo()):Xe.tag===V&&BP(r,Xe)&&je(Xe,cf)&&(ff=!0,Qo()));var s=Xe.flags;(s&Ae)!==oe&&(Ln(Xe),MP(r,Xe),Gn()),(s&Ne)!==oe&&(Ks||(Ks=!0,Qn(Kr,function(){return Qi(),null}))),Xe=Xe.nextEffect}}function AL(r,s){for(;Xe!==null;){Ln(Xe);var u=Xe.flags;if(u&Ve&&HP(Xe),u&De){var h=Xe.alternate;h!==null&&NP(h)}var v=u&(de|le|be|Ct);switch(v){case de:{QS(Xe),Xe.flags&=~de;break}case he:{QS(Xe),Xe.flags&=~de;var b=Xe.alternate;zm(b,Xe);break}case Ct:{Xe.flags&=~Ct;break}case Nt:{Xe.flags&=~Ct;var E=Xe.alternate;zm(E,Xe);break}case le:{var O=Xe.alternate;zm(O,Xe);break}case be:{UP(r,Xe);break}}Gn(),Xe=Xe.nextEffect}}function ML(r,s){for(;Xe!==null;){Ln(Xe);var u=Xe.flags;if(u&(le|J)){var h=Xe.alternate;DP(r,h,Xe)}u&De&&kP(Xe),Gn(),Xe=Xe.nextEffect}}function Qi(){if(af!==cs){var r=af>Kr?Kr:af;return af=cs,ui(r,DL)}return!1}function PL(r,s){Gm.push(s,r),Ks||(Ks=!0,Qn(Kr,function(){return Qi(),null}))}function cx(r,s){Xm.push(s,r);{r.flags|=Je;var u=r.alternate;u!==null&&(u.flags|=Je)}Ks||(Ks=!0,Qn(Kr,function(){return Qi(),null}))}function LL(r){var s=r.create;r.destroy=s()}function DL(){if(bu===null)return!1;var r=bu,s=Qm;if(bu=null,Qm=ye,(ut&(ti|Yi))!==En)throw Error("Cannot flush passive effects while already rendering.");Zm=!0;var u=ut;ut|=Yi;var h=Wh(r),v=Xm;Xm=[];for(var b=0;b<v.length;b+=2){var E=v[b],O=v[b+1],k=E.destroy;E.destroy=void 0;{O.flags&=~Je;var B=O.alternate;B!==null&&(B.flags&=~Je)}if(typeof k=="function"){if(Ln(O),Ys(null,k,null),Qs()){if(O===null)throw Error("Should be working on an effect.");var Y=Gs();_o(O,Y)}Gn()}}var ie=Gm;Gm=[];for(var ue=0;ue<ie.length;ue+=2){var Te=ie[ue],Pe=ie[ue+1];{if(Ln(Pe),Ys(null,LL,null,Te),Qs()){if(Pe===null)throw Error("Should be working on an effect.");var _e=Gs();_o(Pe,_e)}Gn()}}for(var pt=r.current.firstEffect;pt!==null;){var Mt=pt.nextEffect;pt.nextEffect=null,pt.flags&be&&Ex(pt),pt=Mt}return $h(h),bx(r,s),Zm=!1,ut=u,tr(),Uh=bu===null?0:Uh+1,!0}function ng(r){return yu!==null&&yu.has(r)}function kL(r){yu===null?yu=new Set([r]):yu.add(r)}function NL(r){Ih||(Ih=!0,Ym=r)}var zL=NL;function fx(r,s,u){var h=Pm(u,s),v=_S(r,h,zt);hs(r,v);var b=ni(),E=Bh(r,zt);E!==null&&(So(E,zt,b),hi(E,b),jo(E,zt))}function _o(r,s){if(r.tag===z){fx(r,r,s);return}for(var u=r.return;u!==null;){if(u.tag===z){fx(u,r,s);return}else if(u.tag===D){var h=u.type,v=u.stateNode;if(typeof h.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&!ng(v)){var b=Pm(s,r),E=jS(u,b,zt);hs(u,E);var O=ni(),k=Bh(u,zt);if(k!==null)So(k,zt,O),hi(k,O),jo(k,zt);else if(typeof v.componentDidCatch=="function"&&!ng(v))try{v.componentDidCatch(s,b)}catch{}return}}u=u.return}}function _L(r,s,u){var h=r.pingCache;h!==null&&h.delete(s);var v=ni();Kl(r,u),Ir===r&&us(Ur,u)&&(pr===Nh||pr===kh&&zd(Ur)&&hn()-qm<ex?xu(r,ye):jh=It(jh,u)),hi(r,v),jo(r,u)}function jL(r,s){s===Jn&&(s=aL(r));var u=ni(),h=Bh(r,s);h!==null&&(So(h,s,u),hi(h,u),jo(h,s))}function IL(r,s){var u=Jn,h;h=r.stateNode,h!==null&&h.delete(s),jL(r,u)}function UL(r){return r<120?120:r<480?480:r<1080?1080:r<1920?1920:r<3e3?3e3:r<4320?4320:tL(r/1960)*1960}function FL(){if(lf>iL)throw lf=0,Km=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.");Uh>sL&&(Uh=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 BL(){Zr.flushLegacyContextWarning(),Zr.flushPendingUnsafeLifecycleWarnings()}var qh=null;function dx(r){{if((ut&ti)!==En||!(r.mode&(Hn|Bi)))return;var s=r.tag;if(s!==A&&s!==z&&s!==D&&s!==R&&s!==K&&s!==ae&&s!==ge&&s!==Oe)return;var u=Le(r.type)||"ReactComponent";if(qh!==null){if(qh.has(u))return;qh.add(u)}else qh=new Set([u]);var h=rr;try{Ln(r),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{h?Ln(r):Gn()}}}var Yh=null;function HL(r){{var s=r.tag;if(s!==z&&s!==D&&s!==R&&s!==K&&s!==ae&&s!==ge&&s!==Oe||(r.flags&Je)!==oe)return;var u=Le(r.type)||"ReactComponent";if(Yh!==null){if(Yh.has(u))return;Yh.add(u)}else Yh=new Set([u]);if(!Zm){var h=rr;try{Ln(r),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===D?"the componentWillUnmount method":"a useEffect cleanup function")}finally{h?Ln(r):Gn()}}}}var rg;{var VL=null;rg=function(r,s,u){var h=Ox(VL,s);try{return LS(r,s,u)}catch(b){if(b!==null&&typeof b=="object"&&typeof b.then=="function")throw b;if(Na(),G1(),zS(s),Ox(s,h),s.mode&nr&&gm(s),Ys(null,LS,null,r,s,u),Qs()){var v=Gs();throw v}else throw b}}}var hx=!1,ig;ig=new Set;function WL(r){if(To&&(ut&ti)!==En&&!QM())switch(r.tag){case R:case K:case ge:{var s=kn&&Le(kn.type)||"Unknown",u=s;if(!ig.has(u)){ig.add(u);var h=Le(r.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",h,s,s)}break}case D:{hx||(m("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),hx=!0);break}}}var Za={current:!1};function px(r){if(Xn===!0&&gu.current===!0&&Za.current!==!0){var s=rr;try{Ln(r),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?
|
|
169
|
+
act(() => ...);`)}finally{s?Ln(r):Gn()}}}function vx(r){Xn===!0&&(r.mode&Vt)!==an&&gu.current===!1&&Za.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`,
|
|
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`,Le(r.type))}function $L(r){if(Xn===!0&&ut===En&&gu.current===!1&&Za.current===!1){var s=rr;try{Ln(r),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`,
|
|
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`,Le(r.type))}finally{s?Ln(r):Gn()}}}var qL=$L,mx=!1;function YL(r){mx===!1&&f.unstable_flushAllWithoutAsserting===void 0&&(r.mode&Hn||r.mode&Bi)&&(mx=!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
|
|
190
|
+
For more info, visit https://reactjs.org/link/mock-scheduler`))}function sg(r,s){return s*1e3+r.interactionThreadID}function Qh(r){Xa===null?Xa=[r]:Xa.push(r)}function gx(r,s,u){if(u.size>0){var h=r.pendingInteractionMap,v=h.get(s);v!=null?u.forEach(function(O){v.has(O)||O.__count++,v.add(O)}):(h.set(s,new Set(u)),u.forEach(function(O){O.__count++}));var b=p.__subscriberRef.current;if(b!==null){var E=sg(r,s);b.onWorkScheduled(u,E)}}}function jo(r,s){gx(r,s,p.__interactionsRef.current)}function yx(r,s){var u=new Set;if(r.pendingInteractionMap.forEach(function(b,E){Yn(s,E)&&b.forEach(function(O){return u.add(O)})}),r.memoizedInteractions=u,u.size>0){var h=p.__subscriberRef.current;if(h!==null){var v=sg(r,s);try{h.onWorkStarted(u,v)}catch(b){Qn(Gt,function(){throw b})}}}}function bx(r,s){var u=r.pendingLanes,h;try{if(h=p.__subscriberRef.current,h!==null&&r.memoizedInteractions.size>0){var v=sg(r,s);h.onWorkStopped(r.memoizedInteractions,v)}}catch(E){Qn(Gt,function(){throw E})}finally{var b=r.pendingInteractionMap;b.forEach(function(E,O){Yn(u,O)||(b.delete(O),E.forEach(function(k){if(k.__count--,h!==null&&k.__count===0)try{h.onInteractionScheduledWorkCompleted(k)}catch(B){Qn(Gt,function(){throw B})}}))})}}function Sx(){return Ja>0}var og=f.unstable_flushAllWithoutAsserting,xx=typeof og=="function";function ag(){if(og!==void 0)try{return og()}finally{}else try{for(var r=!1;Qi();)r=!0;return r}finally{}}function wx(r){try{ag(),eL(function(){ag()?wx(r):r()})}catch(s){r(s)}}var Ja=0;function QL(r){var s=Ja;Ja++;var u=gu.current,h=Za.current;gu.current=!0,Za.current=!0;function v(){Ja--,gu.current=u,Za.current=h,Ja>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 b;try{b=ix(r)}catch(O){throw v(),O}if(b!==null&&typeof b=="object"&&typeof b.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(O,k){E=!0,b.then(function(){if(Ja>1||xx===!0&&u===!0){v(),O();return}wx(function(B){v(),B?k(B):O()})},function(B){v(),k(B)})}}}else{b!==void 0&&m("The callback passed to act(...) function must return undefined, or a Promise. You returned %s",b);try{Ja===1&&(xx===!1||u===!1)&&ag(),v()}catch(O){throw v(),O}return{then:function(O){m("Do not await the result of calling act(...) with sync logic, it is not a Promise."),O()}}}}function Ex(r){r.sibling=null,r.stateNode=null}var Oi=null,wu=null,GL=function(r){Oi=r};function Eu(r){{if(Oi===null)return r;var s=Oi(r);return s===void 0?r:s.current}}function lg(r){return Eu(r)}function ug(r){{if(Oi===null)return r;var s=Oi(r);if(s===void 0){if(r!=null&&typeof r.render=="function"){var u=Eu(r.render);if(r.render!==u){var h={$$typeof:Pt,render:u};return r.displayName!==void 0&&(h.displayName=r.displayName),h}}return r}return s.current}}function Tx(r,s){{if(Oi===null)return!1;var u=r.elementType,h=s.type,v=!1,b=typeof h=="object"&&h!==null?h.$$typeof:null;switch(r.tag){case D:{typeof h=="function"&&(v=!0);break}case R:{(typeof h=="function"||b===qe)&&(v=!0);break}case K:{(b===Pt||b===qe)&&(v=!0);break}case ae:case ge:{(b===ke||b===qe)&&(v=!0);break}default:return!1}if(v){var E=Oi(u);if(E!==void 0&&E===Oi(h))return!0}return!1}}function Cx(r){{if(Oi===null||typeof WeakSet!="function")return;wu===null&&(wu=new WeakSet),wu.add(r)}}var XL=function(r,s){{if(Oi===null)return;var u=s.staleFamilies,h=s.updatedFamilies;Qi(),Hh(function(){cg(r.current,h,u)})}},KL=function(r,s){{if(r.context!==wn)return;Qi(),Hh(function(){Ax(s,r,null,null)})}};function cg(r,s,u){{var h=r.alternate,v=r.child,b=r.sibling,E=r.tag,O=r.type,k=null;switch(E){case R:case ge:case D:k=O;break;case K:k=O.render;break}if(Oi===null)throw new Error("Expected resolveFamily to be set during hot reload.");var B=!1,Y=!1;if(k!==null){var ie=Oi(k);ie!==void 0&&(u.has(ie)?Y=!0:s.has(ie)&&(E===D?Y=!0:B=!0))}wu!==null&&(wu.has(r)||h!==null&&wu.has(h))&&(Y=!0),Y&&(r._debugNeedsRemount=!0),(Y||B)&&vr(r,zt,bn),v!==null&&!Y&&cg(v,s,u),b!==null&&cg(b,s,u)}}var ZL=function(r,s){{var u=new Set,h=new Set(s.map(function(v){return v.current}));return fg(r.current,h,u),u}};function fg(r,s,u){{var h=r.child,v=r.sibling,b=r.tag,E=r.type,O=null;switch(b){case R:case ge:case D:O=E;break;case K:O=E.render;break}var k=!1;O!==null&&s.has(O)&&(k=!0),k?JL(r,u):h!==null&&fg(h,s,u),v!==null&&fg(v,s,u)}}function JL(r,s){{var u=eD(r,s);if(u)return;for(var h=r;;){switch(h.tag){case L:s.add(h.stateNode);return;case P:s.add(h.stateNode.containerInfo);return;case z:s.add(h.stateNode.containerInfo);return}if(h.return===null)throw new Error("Expected to reach root first.");h=h.return}}}function eD(r,s){for(var u=r,h=!1;;){if(u.tag===L)h=!0,s.add(u.stateNode);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===r)return h;for(;u.sibling===null;){if(u.return===null||u.return===r)return h;u=u.return}u.sibling.return=u.return,u=u.sibling}return!1}var dg;{dg=!1;try{var Rx=Object.preventExtensions({})}catch{dg=!0}}var tD=1;function nD(r,s,u,h){this.tag=r,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=h,this.flags=oe,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.lanes=ye,this.childLanes=ye,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=tD++,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!dg&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var pi=function(r,s,u,h){return new nD(r,s,u,h)};function hg(r){var s=r.prototype;return!!(s&&s.isReactComponent)}function rD(r){return typeof r=="function"&&!hg(r)&&r.defaultProps===void 0}function iD(r){if(typeof r=="function")return hg(r)?D:R;if(r!=null){var s=r.$$typeof;if(s===Pt)return K;if(s===ke)return ae}return A}function el(r,s){var u=r.alternate;u===null?(u=pi(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u._debugID=r._debugID,u._debugSource=r._debugSource,u._debugOwner=r._debugOwner,u._debugHookTypes=r._debugHookTypes,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=oe,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,u.actualDuration=0,u.actualStartTime=-1),u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue;var h=r.dependencies;switch(u.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.selfBaseDuration=r.selfBaseDuration,u.treeBaseDuration=r.treeBaseDuration,u._debugNeedsRemount=r._debugNeedsRemount,u.tag){case A:case R:case ge:u.type=Eu(r.type);break;case D:u.type=lg(r.type);break;case K:u.type=ug(r.type);break}return u}function sD(r,s){r.flags&=de,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null;var u=r.alternate;if(u===null)r.childLanes=ye,r.lanes=s,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null,r.selfBaseDuration=0,r.treeBaseDuration=0;else{r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type;var h=u.dependencies;r.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},r.selfBaseDuration=u.selfBaseDuration,r.treeBaseDuration=u.treeBaseDuration}return r}function oD(r){var s;return r===vo?s=Bi|Hn|Vt:r===Ul?s=Hn|Vt:s=an,Zn&&(s|=nr),pi(z,null,null,s)}function pg(r,s,u,h,v,b){var E=A,O=r;if(typeof r=="function")hg(r)?(E=D,O=lg(O)):O=Eu(O);else if(typeof r=="string")E=L;else e:switch(r){case at:return tl(u.children,v,b,s);case vn:E=$,v|=Hi;break;case $t:E=$,v|=Vt;break;case _t:return aD(u,v,b,s);case St:return lD(u,v,b,s);case ht:return uD(u,v,b,s);case I:return mg(u,v,b,s);case N:return cD(u,v,b,s);case wt:default:{if(typeof r=="object"&&r!==null)switch(r.$$typeof){case yt:E=j;break e;case xt:E=Q;break e;case Pt:E=K,O=ug(O);break e;case ke:E=ae;break e;case qe:E=we,O=null;break e;case st:E=Oe;break e}var k="";{(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(k+=" 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 B=h?Le(h.type):null;B&&(k+=`
|
|
191
191
|
|
|
192
|
-
Check the render method of \``+
|
|
192
|
+
Check the render method of \``+B+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(r==null?r:typeof r)+"."+k)}}var Y=pi(E,u,s,v);return Y.elementType=r,Y.type=O,Y.lanes=b,Y._debugOwner=h,Y}function vg(r,s,u){var h=null;h=r._owner;var v=r.type,b=r.key,E=r.props,O=pg(v,b,E,h,s,u);return O._debugSource=r._source,O._debugOwner=r._owner,O}function tl(r,s,u,h){var v=pi(F,r,h,s);return v.lanes=u,v}function aD(r,s,u,h){typeof r.id!="string"&&m('Profiler must specify an "id" as a prop');var v=pi(ee,r,h,s|nr);return v.elementType=_t,v.type=_t,v.lanes=u,v.stateNode={effectDuration:0,passiveEffectDuration:0},v}function lD(r,s,u,h){var v=pi(V,r,h,s);return v.type=St,v.elementType=St,v.lanes=u,v}function uD(r,s,u,h){var v=pi(Fe,r,h,s);return v.type=ht,v.elementType=ht,v.lanes=u,v}function mg(r,s,u,h){var v=pi(it,r,h,s);return v.type=I,v.elementType=I,v.lanes=u,v}function cD(r,s,u,h){var v=pi(nt,r,h,s);return v.type=N,v.elementType=N,v.lanes=u,v}function gg(r,s,u){var h=pi(M,r,null,s);return h.lanes=u,h}function fD(){var r=pi(L,null,null,an);return r.elementType="DELETED",r.type="DELETED",r}function yg(r,s,u){var h=r.children!==null?r.children:[],v=pi(P,h,r.key,s);return v.lanes=u,v.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},v}function Ox(r,s){return r===null&&(r=pi(A,null,null,an)),r.tag=s.tag,r.key=s.key,r.elementType=s.elementType,r.type=s.type,r.stateNode=s.stateNode,r.return=s.return,r.child=s.child,r.sibling=s.sibling,r.index=s.index,r.ref=s.ref,r.pendingProps=s.pendingProps,r.memoizedProps=s.memoizedProps,r.updateQueue=s.updateQueue,r.memoizedState=s.memoizedState,r.dependencies=s.dependencies,r.mode=s.mode,r.flags=s.flags,r.nextEffect=s.nextEffect,r.firstEffect=s.firstEffect,r.lastEffect=s.lastEffect,r.lanes=s.lanes,r.childLanes=s.childLanes,r.alternate=s.alternate,r.actualDuration=s.actualDuration,r.actualStartTime=s.actualStartTime,r.selfBaseDuration=s.selfBaseDuration,r.treeBaseDuration=s.treeBaseDuration,r._debugID=s._debugID,r._debugSource=s._debugSource,r._debugOwner=s._debugOwner,r._debugNeedsRemount=s._debugNeedsRemount,r._debugHookTypes=s._debugHookTypes,r}function dD(r,s,u){switch(this.tag=s,this.containerInfo=r,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=gi,this.context=null,this.pendingContext=null,this.hydrate=u,this.callbackNode=null,this.callbackPriority=Ii,this.eventTimes=ma(ye),this.expirationTimes=ma(bn),this.pendingLanes=ye,this.suspendedLanes=ye,this.pingedLanes=ye,this.expiredLanes=ye,this.mutableReadLanes=ye,this.finishedLanes=ye,this.entangledLanes=ye,this.entanglements=ma(ye),dn&&(this.mutableSourceEagerHydrationData=null),this.interactionThreadID=p.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map,s){case Ul:this._debugRootType="createBlockingRoot()";break;case vo:this._debugRootType="createRoot()";break;case Ns:this._debugRootType="createLegacyRoot()";break}}function hD(r,s,u,h){var v=new dD(r,s,u),b=oD(s);return v.current=b,b.stateNode=v,fu(b),v}function pD(r,s){var u=s._getVersion,h=u(s._source);r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[s,h]:r.mutableSourceEagerHydrationData.push(s,h)}function vD(r,s,u){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tt,key:h==null?null:""+h,children:r,containerInfo:s,implementation:u}}var bg,Sg;bg=!1,Sg={};function mD(r){if(!r)return wn;var s=W(r),u=vc(s);if(s.tag===D){var h=s.type;if(Kn(h))return Il(s,h,u)}return u}function gD(r){var s=W(r);if(s===void 0)throw typeof r.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(r));var u=U(s);return u===null?null:u.stateNode}function yD(r,s){{var u=W(r);if(u===void 0)throw typeof r.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(r));var h=U(u);if(h===null)return null;if(h.mode&Vt){var v=Le(u.type)||"Component";if(!Sg[v]){Sg[v]=!0;var b=rr;try{Ln(h),u.mode&Vt?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,v):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,v)}finally{b?Ln(b):Gn()}}}return h.stateNode}}function bD(r,s,u,h){return hD(r,s,u)}function Ax(r,s,u,h){Fl(s,r);var v=s.current,b=ni();typeof jest<"u"&&(YL(v),px(v));var E=zo(v),O=mD(u);s.context===null?s.context=O:s.pendingContext=O,To&&rr!==null&&!bg&&(bg=!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.`,
|
|
194
|
+
Check the render method of %s.`,Le(rr.type)||"Unknown"));var k=ds(b,E);return k.payload={element:r},h=h===void 0?null:h,h!==null&&(typeof h!="function"&&m("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",h),k.callback=h),hs(v,k),vr(v,E,b),E}function SD(r){var s=r.current;if(!s.child)return null;switch(s.child.tag){case L:return dt(s.child.stateNode);default:return s.child.stateNode}}function xD(r){switch(r.tag){case z:var s=r.stateNode;if(s.hydrate){var u=Xl(s);uL(s,u)}break;case V:var h=ni();Hh(function(){return vr(r,zt,h)});var v=Wl;Gh(r,v);break}}function Mx(r,s){var u=r.memoizedState;u!==null&&u.dehydrated!==null&&(u.retryLane=Ud(u.retryLane,s))}function Gh(r,s){Mx(r,s);var u=r.alternate;u&&Mx(u,s)}function wD(r){if(r.tag===V){var s=ni(),u=Wl;vr(r,u,s),Gh(r,u)}}function ED(r){if(r.tag===V){var s=ni(),u=fa;vr(r,u,s),Gh(r,u)}}function TD(r){if(r.tag===V){var s=ni(),u=zo(r);vr(r,u,s),Gh(r,u)}}function CD(r,s){var u=Ec();try{return Tc(r),s()}finally{Tc(u)}}function RD(r){var s=xe(r);return s===null?null:s.tag===Be?s.stateNode.instance:s.stateNode}var Px=function(r){return!1};function Lx(r){return Px(r)}var Dx=null,kx=null,Nx=null,zx=null,_x=null,jx=null,Ix=null,Ux=null;{var Fx=function(r,s,u){var h=s[u],v=Array.isArray(r)?r.slice():c({},r);return u+1===s.length?(Array.isArray(v)?v.splice(h,1):delete v[h],v):(v[h]=Fx(r[h],s,u+1),v)},Bx=function(r,s){return Fx(r,s,0)},Hx=function(r,s,u,h){var v=s[h],b=Array.isArray(r)?r.slice():c({},r);if(h+1===s.length){var E=u[h];b[E]=b[v],Array.isArray(b)?b.splice(v,1):delete b[v]}else b[v]=Hx(r[v],s,u,h+1);return b},Vx=function(r,s,u){if(s.length!==u.length){x("copyWithRename() expects paths of the same length");return}else for(var h=0;h<u.length-1;h++)if(s[h]!==u[h]){x("copyWithRename() expects paths to be the same except for the deepest key");return}return Hx(r,s,u,0)},Wx=function(r,s,u,h){if(u>=s.length)return h;var v=s[u],b=Array.isArray(r)?r.slice():c({},r);return b[v]=Wx(r[v],s,u+1,h),b},$x=function(r,s,u){return Wx(r,s,0,u)},xg=function(r,s){for(var u=r.memoizedState;u!==null&&s>0;)u=u.next,s--;return u};Dx=function(r,s,u,h){var v=xg(r,s);if(v!==null){var b=$x(v.memoizedState,u,h);v.memoizedState=b,v.baseState=b,r.memoizedProps=c({},r.memoizedProps),vr(r,zt,bn)}},kx=function(r,s,u){var h=xg(r,s);if(h!==null){var v=Bx(h.memoizedState,u);h.memoizedState=v,h.baseState=v,r.memoizedProps=c({},r.memoizedProps),vr(r,zt,bn)}},Nx=function(r,s,u,h){var v=xg(r,s);if(v!==null){var b=Vx(v.memoizedState,u,h);v.memoizedState=b,v.baseState=b,r.memoizedProps=c({},r.memoizedProps),vr(r,zt,bn)}},zx=function(r,s,u){r.pendingProps=$x(r.memoizedProps,s,u),r.alternate&&(r.alternate.pendingProps=r.pendingProps),vr(r,zt,bn)},_x=function(r,s){r.pendingProps=Bx(r.memoizedProps,s),r.alternate&&(r.alternate.pendingProps=r.pendingProps),vr(r,zt,bn)},jx=function(r,s,u){r.pendingProps=Vx(r.memoizedProps,s,u),r.alternate&&(r.alternate.pendingProps=r.pendingProps),vr(r,zt,bn)},Ix=function(r){vr(r,zt,bn)},Ux=function(r){Px=r}}function OD(r){var s=U(r);return s===null?null:s.stateNode}function AD(r){return null}function MD(){return rr}function PD(r){var s=r.findFiberByHostInstance,u=g.ReactCurrentDispatcher;return qn({bundleType:r.bundleType,version:r.version,rendererPackageName:r.rendererPackageName,rendererConfig:r.rendererConfig,overrideHookState:Dx,overrideHookStateDeletePath:kx,overrideHookStateRenamePath:Nx,overrideProps:zx,overridePropsDeletePath:_x,overridePropsRenamePath:jx,setSuspenseHandler:Ux,scheduleUpdate:Ix,currentDispatcherRef:u,findHostInstanceByFiber:OD,findFiberByHostInstance:s||AD,findHostInstancesForRefresh:ZL,scheduleRefresh:XL,scheduleRoot:KL,setRefreshHandler:GL,getCurrentFiber:MD})}return i.IsThisRendererActing=Za,i.act=QL,i.attemptContinuousHydration=ED,i.attemptHydrationAtCurrentPriority=TD,i.attemptSynchronousHydration=xD,i.attemptUserBlockingHydration=wD,i.batchedEventUpdates=hL,i.batchedUpdates=ix,i.createComponentSelector=VP,i.createContainer=bD,i.createHasPsuedoClassSelector=WP,i.createPortal=vD,i.createRoleSelector=$P,i.createTestNameSelector=YP,i.createTextSelector=qP,i.deferredUpdates=fL,i.discreteUpdates=pL,i.findAllNodes=Ah,i.findBoundingRects=XP,i.findHostInstance=gD,i.findHostInstanceWithNoPortals=RD,i.findHostInstanceWithWarning=yD,i.flushControlled=mL,i.flushDiscreteUpdates=cL,i.flushPassiveEffects=Qi,i.flushSync=Hh,i.focusWithin=KP,i.getCurrentUpdateLanePriority=Ec,i.getFindAllNodesFailureDescription=GP,i.getPublicRootInstance=SD,i.injectIntoDevTools=PD,i.observeVisibleRects=JP,i.registerMutableSourceForHydration=pD,i.runWithPriority=CD,i.shouldSuspend=Lx,i.unbatchedUpdates=vL,i.updateContainer=Ax,i})}(pf)),pf.exports}var gf={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
|
-
*/
|
|
202
|
-
`+
|
|
203
|
-
`),
|
|
204
|
-
`),
|
|
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(),Dn=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,Be?(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,Be?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 Be?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 He=a.alternate;if(He!==null){He=He.updateQueue;var Je=He.lastBaseUpdate;Je!==N&&(Je===null?He.firstBaseUpdate=xe:Je.next=xe,He.lastBaseUpdate=te)}}if(T!==null){Je=b.baseState,N=0,He=xe=te=null;do{F=T.lane;var Me=T.eventTime;if((y&F)===F){He!==null&&(He=He.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},He===null?(xe=He=Me,te=Je):He=He.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);He===null&&(te=Je),b.baseState=te,b.firstBaseUpdate=xe,b.lastBaseUpdate=He,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=Rn(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=Rn(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=Rn(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 He(G,W,ne,Ae,We){return W===null||W.tag!==7?(W=js(ne,G.mode,Ae,We),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 We=W!==null?W.key:null;if(typeof ne=="string"||typeof ne=="number")return We!==null?null:F(G,W,""+ne,Ae);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return ne.key===We?ne.type===w?He(G,W,ne.props.children,Ae,We):te(G,W,ne,Ae):null;case m:return ne.key===We?xe(G,W,ne,Ae):null}if(Ka(ne)||me(ne))return We!==null?null:He(G,W,ne,Ae,null);fi(G,ne)}return null}function Pt(G,W,ne,Ae,We){if(typeof Ae=="string"||typeof Ae=="number")return G=G.get(ne)||null,F(W,G,""+Ae,We);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?He(W,G,Ae.props.children,We,Ae.key):te(W,G,Ae,We);case m:return G=G.get(Ae.key===null?ne:Ae.key)||null,xe(W,G,Ae,We)}if(Ka(Ae)||me(Ae))return G=G.get(ne)||null,He(W,G,Ae,We,null);fi(W,Ae)}return null}function Qt(G,W,ne,Ae){for(var We=null,kt=null,et=W,Rt=W=0,wn=null;et!==null&&Rt<ne.length;Rt++){et.index>Rt?(wn=et,et=null):wn=et.sibling;var mt=Me(G,et,ne[Rt],Ae);if(mt===null){et===null&&(et=wn);break}a&&et&&mt.alternate===null&&l(G,et),W=T(mt,W,Rt),kt===null?We=mt:kt.sibling=mt,kt=mt,et=wn}if(Rt===ne.length)return f(G,et),We;if(et===null){for(;Rt<ne.length;Rt++)et=Je(G,ne[Rt],Ae),et!==null&&(W=T(et,W,Rt),kt===null?We=et:kt.sibling=et,kt=et);return We}for(et=y(G,et);Rt<ne.length;Rt++)wn=Pt(et,G,Rt,ne[Rt],Ae),wn!==null&&(a&&wn.alternate!==null&&et.delete(wn.key===null?Rt:wn.key),W=T(wn,W,Rt),kt===null?We=wn:kt.sibling=wn,kt=wn);return a&&et.forEach(function(_r){return l(G,_r)}),We}function Oi(G,W,ne,Ae){var We=me(ne);if(typeof We!="function")throw Error(v(150));if(ne=We.call(ne),ne==null)throw Error(v(151));for(var kt=We=null,et=W,Rt=W=0,wn=null,mt=ne.next();et!==null&&!mt.done;Rt++,mt=ne.next()){et.index>Rt?(wn=et,et=null):wn=et.sibling;var _r=Me(G,et,mt.value,Ae);if(_r===null){et===null&&(et=wn);break}a&&et&&_r.alternate===null&&l(G,et),W=T(_r,W,Rt),kt===null?We=_r:kt.sibling=_r,kt=_r,et=wn}if(mt.done)return f(G,et),We;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?We=mt:kt.sibling=mt,kt=mt);return We}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?We=mt:kt.sibling=mt,kt=mt);return a&&et.forEach(function(Av){return l(G,Av)}),We}return function(G,W,ne,Ae){var We=typeof ne=="object"&&ne!==null&&ne.type===w&&ne.key===null;We&&(ne=ne.props.children);var kt=typeof ne=="object"&&ne!==null;if(kt)switch(ne.$$typeof){case x:e:{for(kt=ne.key,We=W;We!==null;){if(We.key===kt){switch(We.tag){case 7:if(ne.type===w){f(G,We.sibling),W=b(We,ne.props.children),W.return=G,G=W;break e}break;default:if(We.elementType===ne.type){f(G,We.sibling),W=b(We,ne.props),W.ref=Xr(G,We,ne),W.return=G,G=W;break e}}f(G,We);break}else l(G,We);We=We.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(We=ne.key;W!==null;){if(W.key===We)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"&&!We)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(!St||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(!St)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(){St&&(Wn=Bi=null,Ti=!1)}var As=[];function jl(){for(var a=0;a<As.length;a++){var l=As[a];Be?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 He={lane:xe,action:te.action,eagerReducer:te.eagerReducer,eagerState:te.eagerState,next:null};F===null?(N=F=He,T=y):F=F.next=He,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=Be?l._workInProgressVersionPrimary:l._workInProgressVersionSecondary;if(b!==null?a=b===y:(a=a.mutableReadLanes,(a=(di&a)===a)&&(Be?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],He=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(He,G)||(xe(G),G=Rn(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),We=1<<Ae;W[Ae]|=G,ne&=~We}}},[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=Rn(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:He},a.dispatch=xe=$n.bind(null,qt,a),te.queue=a,te.baseQueue=null,He=Ms(b,l,f),te.memoizedState=te.baseState=He),He}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=Rn(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 He=f.getDerivedStateFromProps,Je=typeof He=="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 He=="function"&&(oa(l,f,He,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;(He=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))?(He||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(yt){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(!St)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(!St)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?Ln===0&&(Ln=3):((Ln===0||Ln===3)&&(Ln=4),qn===null||!(xo&134217727)&&!(va&134217727)||zs(qn,zt))),yt&&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(Ln!==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&&Dn()>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*Dn()-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=Dn(),a.sibling=null,l=an.current,un(an,b?l&1|2:l&1),a):null;case 23:case 24:return En(),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 En(),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
|
-
Error generating stack: `+
|
|
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:St&&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):yt&&yt&&(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:St&&(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:St&&(f=l.stateNode,f.hydrate&&(f.hydrate=!1,At(f.containerInfo)));break;case 23:case 24:return}e:if(yt){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=Dn(),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=bn(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,xn=null,zt=0,Ri=0,Wi=Ni(0),Ln=0,bo=null,rs=0,xo=0,va=0,tr=0,ma=null,Eo=0,iu=1/0;function tn(){iu=Dn()+500}var De=null,wo=!1,nr=null,In=null,ss=!1,ga=null,Yn=90,ru=[],Yt=[],Mt=null,Pn=0,kr=null,Qn=-1,zr=0,su=0,To=null,Co=!1;function vi(){return Ge&48?Dn():Qn!==-1?Qn:Qn=Dn()}function Rn(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<Pn)throw Pn=0,kr=null,Error(v(185));if(a=ks(a,l),a===null)return null;El(a,l,f),a===qn&&(va|=l,Ln===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 He=$t;T[F]=10<=He?xe+250:6<=He?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,xn!==null?y=0:(qn=null,zt=0,y=Ln),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,Dn()),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-Dn(),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=Dn()-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,Dn()),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,Dn()),f;return a.finishedWork=a.current.alternate,a.finishedLanes=l,ir(a),Ai(a,Dn()),null}function ya(){if(Mt!==null){var a=Mt;Mt=null,a.forEach(function(l){l.expiredLanes|=24&l.pendingLanes,Ai(l,Dn())})}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 En(){Ri=Wi.current,vt(Wi)}function ri(a,l){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==je&&(a.timeoutHandle=je,jt(f)),xn!==null)for(f=xn.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:En()}f=f.return}qn=a,xn=Ht(a.current,null),zt=Ri=rs=l,Ln=0,bo=null,tr=va=xo=0}function Wd(a,l){do{var f=xn;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){Ln=1,bo=l,xn=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 He=F.alternate;He?(F.updateQueue=He.updateQueue,F.memoizedState=He.memoizedState,F.lanes=He.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 We=Lo.bind(null,T,xe,F);xe.then(We,We)}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
|
-
|
|
209
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Ln!==5&&(Ln=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 wn=_d(Me,T,l);Ar(Me,wn);break e}}Me=Me.return}while(Me!==null)}ba(f)}catch(mt){l=mt,xn===f&&f!==null&&(xn=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,xn!==null)throw Error(v(261));return qn=null,zt=0,Ln}function Ns(){for(;xn!==null;)Sa(xn)}function Ao(){for(;xn!==null&&!hv();)Sa(xn)}function Sa(a){var l=_s(a.alternate,a,Ri);a.memoizedProps=a.pendingProps,l===null?ba(a):xn=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,xn=f;return}a!==null&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}else{if(f=kd(f,l,Ri),f!==null){xn=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){xn=l;return}xn=l=a}while(l!==null);Ln===0&&(Ln=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&&(xn=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=Ie(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 He=De.flags;if(He&16&&Qe&&xi(De.stateNode),He&128){var Je=De.alternate;if(Je!==null){var Me=Je.ref;Me!==null&&(typeof Me=="function"?Me(null):Me.current=null)}}switch(He&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(He=a;De!==null;){var Qt=De.flags;if(Qt&36&&Ev(He,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?Pn++:(Pn=0,kr=a):Pn=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,Dn()),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&&(Ln===4||Ln===3&&(zt&62914560)===zt&&500>Dn()-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)&&(St?(Wn=he(l.stateNode.containerInfo),Bi=l,T=Ti=!0):T=!1),T){if(St&&(a=b.mutableSourceEagerHydrationData,a!=null))for(b=0;b<a.length;b+=2)T=a[b],N=a[b+1],Be?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=je,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),St&&(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=Rn(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,Dn()),!(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,He=xe+te.width,Je=te.y,Me=Je+te.height;if(y>=xe&&T>=Je&&b<=He&&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||He<y||xe>b)){xe>y&&(te.width+=xe-y,te.x=y),He<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:
|
|
201
|
+
*/gf.exports;var zg;function rw(){return zg||(zg=1,function(t){t.exports=function(n){var i={},a=Rg(),c=T,f=Pg();function p(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+o+"; 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,R=60108,D=60114,A=60109,z=60110,P=60112,L=60113,M=60120,F=60115,$=60116,Q=60121,j=60129,K=60130,ee=60131;if(typeof Symbol=="function"&&Symbol.for){var V=Symbol.for;x=V("react.element"),m=V("react.portal"),w=V("react.fragment"),R=V("react.strict_mode"),D=V("react.profiler"),A=V("react.provider"),z=V("react.context"),P=V("react.forward_ref"),L=V("react.suspense"),M=V("react.suspense_list"),F=V("react.memo"),$=V("react.lazy"),Q=V("react.block"),V("react.scope"),j=V("react.debug_trace_mode"),K=V("react.offscreen"),ee=V("react.legacy_hidden")}var ae=typeof Symbol=="function"&&Symbol.iterator;function ge(o){return o===null||typeof o!="object"?null:(o=ae&&o[ae]||o["@@iterator"],typeof o=="function"?o:null)}function we(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case m:return"Portal";case D:return"Profiler";case R:return"StrictMode";case L:return"Suspense";case M:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case z:return(o.displayName||"Context")+".Consumer";case A:return(o._context.displayName||"Context")+".Provider";case P:var l=o.render;return l=l.displayName||l.name||"",o.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case F:return we(o.type);case Q:return we(o._render);case $:l=o._payload,o=o._init;try{return we(o(l))}catch{}}return null}function Ee(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,l.flags&1026&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function Ue(o){if(Ee(o)!==o)throw Error(p(188))}function Fe(o){var l=o.alternate;if(!l){if(l=Ee(o),l===null)throw Error(p(188));return l!==o?null:o}for(var d=o,y=l;;){var S=d.return;if(S===null)break;var C=S.alternate;if(C===null){if(y=S.return,y!==null){d=y;continue}break}if(S.child===C.child){for(C=S.child;C;){if(C===d)return Ue(S),o;if(C===y)return Ue(S),l;C=C.sibling}throw Error(p(188))}if(d.return!==y.return)d=S,y=C;else{for(var _=!1,H=S.child;H;){if(H===d){_=!0,d=S,y=C;break}if(H===y){_=!0,y=S,d=C;break}H=H.sibling}if(!_){for(H=C.child;H;){if(H===d){_=!0,d=C,y=S;break}if(H===y){_=!0,y=C,d=S;break}H=H.sibling}if(!_)throw Error(p(189))}}if(d.alternate!==y)throw Error(p(190))}if(d.tag!==3)throw Error(p(188));return d.stateNode.current===d?o:l}function Be(o){if(o=Fe(o),!o)return null;for(var l=o;;){if(l.tag===5||l.tag===6)return l;if(l.child)l.child.return=l,l=l.child;else{if(l===o)break;for(;!l.sibling;){if(!l.return||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}}return null}function vt(o){if(o=Fe(o),!o)return null;for(var l=o;;){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===o)break;for(;!l.sibling;){if(!l.return||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}}return null}function Oe(o,l){for(var d=o.alternate;l!==null;){if(l===o||l===d)return!0;l=l.return}return!1}var it=n.getPublicInstance,nt=n.getRootHostContext,W=n.getChildHostContext,Re=n.prepareForCommit,Ie=n.resetAfterCommit,tt=n.createInstance,at=n.appendInitialChild,$t=n.finalizeInitialChildren,_t=n.prepareUpdate,yt=n.shouldSetTextContent,xt=n.createTextInstance,Pt=n.scheduleTimeout,St=n.cancelTimeout,ht=n.noTimeout,ke=n.isPrimaryRenderer,qe=n.supportsMutation,st=n.supportsPersistence,wt=n.supportsHydration,vn=n.getInstanceFromNode,I=n.makeOpaqueHydratingObject,N=n.makeClientId,Z=n.beforeActiveInstanceBlur,Me=n.afterActiveInstanceBlur,ft=n.preparePortalMount,et=n.supportsTestSelectors,Ft=n.findFiberRoot,mn=n.getBoundingRect,Le=n.getTextContent,oe=n.isHiddenSubtree,X=n.matchAccessibilityRole,de=n.setFocusIfFocusable,le=n.setupIntersectionObserver,he=n.appendChild,be=n.appendChildToContainer,Ve=n.commitTextUpdate,J=n.commitMount,ne=n.commitUpdate,De=n.insertBefore,Ae=n.insertInContainerBefore,Ne=n.removeChild,Je=n.removeChildFromContainer,Ct=n.resetTextContent,Nt=n.hideInstance,jt=n.hideTextInstance,gn=n.unhideInstance,qt=n.unhideTextInstance,Bt=n.clearContainer,Mr=n.cloneInstance,Pr=n.createContainerChildSet,Hr=n.appendChildToContainerChildSet,br=n.finalizeContainerChildren,Ps=n.replaceContainerChildren,gl=n.cloneHiddenInstance,es=n.cloneHiddenTextInstance,nc=n.canHydrateInstance,rc=n.canHydrateTextInstance,yl=n.isSuspenseInstancePending,bl=n.isSuspenseInstanceFallback,U=n.getNextHydratableSibling,xe=n.getFirstHydratableChild,je=n.hydrateInstance,dt=n.hydrateTextInstance,Dt=n.getNextHydratableInstanceAfterSuspenseInstance,Ht=n.commitHydratedContainer,Rt=n.commitHydratedSuspenseInstance,Et;function An(o){if(Et===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Et=l&&l[1]||""}return`
|
|
202
|
+
`+Et+o}var Zt=!1;function rn(o,l){if(!o||Zt)return"";Zt=!0;var d=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(ce){var y=ce}Reflect.construct(o,[],l)}else{try{l.call()}catch(ce){y=ce}o.call(l.prototype)}else{try{throw Error()}catch(ce){y=ce}o()}}catch(ce){if(ce&&y&&typeof ce.stack=="string"){for(var S=ce.stack.split(`
|
|
203
|
+
`),C=y.stack.split(`
|
|
204
|
+
`),_=S.length-1,H=C.length-1;1<=_&&0<=H&&S[_]!==C[H];)H--;for(;1<=_&&0<=H;_--,H--)if(S[_]!==C[H]){if(_!==1||H!==1)do if(_--,H--,0>H||S[_]!==C[H])return`
|
|
205
|
+
`+S[_].replace(" at new "," at ");while(1<=_&&0<=H);break}}}finally{Zt=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?An(o):""}var Wn=[],ar=-1;function Vr(o){return{current:o}}function Ot(o){0>ar||(o.current=Wn[ar],Wn[ar]=null,ar--)}function Sn(o,l){ar++,Wn[ar]=o.current,o.current=l}var gi={},xn=Vr(gi),Xn=Vr(!1),$n=gi;function yi(o,l){var d=o.type.contextTypes;if(!d)return gi;var y=o.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===l)return y.__reactInternalMemoizedMaskedChildContext;var S={},C;for(C in d)S[C]=l[C];return y&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=S),S}function dn(o){return o=o.childContextTypes,o!=null}function Sl(){Ot(Xn),Ot(xn)}function Sd(o,l,d){if(xn.current!==gi)throw Error(p(168));Sn(xn,l),Sn(Xn,d)}function xd(o,l,d){var y=o.stateNode;if(o=l.childContextTypes,typeof y.getChildContext!="function")return d;y=y.getChildContext();for(var S in y)if(!(S in o))throw Error(p(108,we(l)||"Unknown",S));return a({},d,y)}function Qo(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||gi,$n=xn.current,Sn(xn,o),Sn(Xn,Xn.current),!0}function wd(o,l,d){var y=o.stateNode;if(!y)throw Error(p(169));d?(o=xd(o,l,$n),y.__reactInternalMemoizedMergedChildContext=o,Ot(Xn),Ot(xn),Sn(xn,o)):Ot(Xn),Sn(Xn,d)}var ic=null,Wr=null,vv=f.unstable_now;vv();var xl=0,sn=8;function ii(o){if(1&o)return sn=15,1;if(2&o)return sn=14,2;if(4&o)return sn=13,4;var l=24&o;return l!==0?(sn=12,l):o&32?(sn=11,32):(l=192&o,l!==0?(sn=10,l):o&256?(sn=9,256):(l=3584&o,l!==0?(sn=8,l):o&4096?(sn=7,4096):(l=4186112&o,l!==0?(sn=6,l):(l=62914560&o,l!==0?(sn=5,l):o&67108864?(sn=4,67108864):o&134217728?(sn=3,134217728):(l=805306368&o,l!==0?(sn=2,l):1073741824&o?(sn=1,1073741824):(sn=8,o))))))}function mv(o){switch(o){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function gv(o){switch(o){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(p(358,o))}}function Go(o,l){var d=o.pendingLanes;if(d===0)return sn=0;var y=0,S=0,C=o.expiredLanes,_=o.suspendedLanes,H=o.pingedLanes;if(C!==0)y=C,S=sn=15;else if(C=d&134217727,C!==0){var ce=C&~_;ce!==0?(y=ii(ce),S=sn):(H&=C,H!==0&&(y=ii(H),S=sn))}else C=d&~_,C!==0?(y=ii(C),S=sn):H!==0&&(y=ii(H),S=sn);if(y===0)return 0;if(y=31-ts(y),y=d&((0>y?0:1<<y)<<1)-1,l!==0&&l!==y&&!(l&_)){if(ii(l),S<=sn)return l;sn=S}if(l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=y;0<l;)d=31-ts(l),S=1<<d,y|=o[d],l&=~S;return y}function Ed(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function wl(o,l){switch(o){case 15:return 1;case 14:return 2;case 12:return o=uo(24&~l),o===0?wl(10,l):o;case 10:return o=uo(192&~l),o===0?wl(8,l):o;case 8:return o=uo(3584&~l),o===0&&(o=uo(4186112&~l),o===0&&(o=512)),o;case 2:return l=uo(805306368&~l),l===0&&(l=268435456),l}throw Error(p(358,o))}function uo(o){return o&-o}function sc(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function El(o,l,d){o.pendingLanes|=l;var y=l-1;o.suspendedLanes&=y,o.pingedLanes&=y,o=o.eventTimes,l=31-ts(l),o[l]=d}var ts=Math.clz32?Math.clz32:Sv,yv=Math.log,bv=Math.LN2;function Sv(o){return o===0?32:31-(yv(o)/bv|0)|0}var Td=f.unstable_runWithPriority,oc=f.unstable_scheduleCallback,ac=f.unstable_cancelCallback,xv=f.unstable_shouldYield,Cd=f.unstable_requestPaint,Xo=f.unstable_now,wv=f.unstable_getCurrentPriorityLevel,Ko=f.unstable_ImmediatePriority,lc=f.unstable_UserBlockingPriority,Rd=f.unstable_NormalPriority,uc=f.unstable_LowPriority,cc=f.unstable_IdlePriority,Tl={},Ev=Cd!==void 0?Cd:function(){},Di=null,Cl=null,fc=!1,Rl=Xo(),Fn=1e4>Rl?Xo:function(){return Xo()-Rl};function co(){switch(wv()){case Ko:return 99;case lc:return 98;case Rd:return 97;case uc:return 96;case cc:return 95;default:throw Error(p(332))}}function Od(o){switch(o){case 99:return Ko;case 98:return lc;case 97:return Rd;case 96:return uc;case 95:return cc;default:throw Error(p(332))}}function ki(o,l){return o=Od(o),Td(o,l)}function fo(o,l,d){return o=Od(o),oc(o,l,d)}function $r(){if(Cl!==null){var o=Cl;Cl=null,ac(o)}Ad()}function Ad(){if(!fc&&Di!==null){fc=!0;var o=0;try{var l=Di;ki(99,function(){for(;o<l.length;o++){var d=l[o];do d=d(!0);while(d!==null)}}),Di=null}catch(d){throw Di!==null&&(Di=Di.slice(o+1)),oc(Ko,$r),d}finally{fc=!1}}}var Tv=g.ReactCurrentBatchConfig;function Cv(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var qr=typeof Object.is=="function"?Object.is:Cv,Rv=Object.prototype.hasOwnProperty;function Ol(o,l){if(qr(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),y=Object.keys(l);if(d.length!==y.length)return!1;for(y=0;y<d.length;y++)if(!Rv.call(l,d[y])||!qr(o[d[y]],l[d[y]]))return!1;return!0}function Ov(o){switch(o.tag){case 5:return An(o.type);case 16:return An("Lazy");case 13:return An("Suspense");case 19:return An("SuspenseList");case 0:case 2:case 15:return o=rn(o.type,!1),o;case 11:return o=rn(o.type.render,!1),o;case 22:return o=rn(o.type._render,!1),o;case 1:return o=rn(o.type,!0),o;default:return""}}function si(o,l){if(o&&o.defaultProps){l=a({},l),o=o.defaultProps;for(var d in o)l[d]===void 0&&(l[d]=o[d]);return l}return l}var Al=Vr(null),Ml=null,bi=null,Zo=null;function Pl(){Zo=bi=Ml=null}function dc(o,l){o=o.type._context,ke?(Sn(Al,o._currentValue),o._currentValue=l):(Sn(Al,o._currentValue2),o._currentValue2=l)}function Ll(o){var l=Al.current;Ot(Al),o=o.type._context,ke?o._currentValue=l:o._currentValue2=l}function hc(o,l){for(;o!==null;){var d=o.alternate;if((o.childLanes&l)===l){if(d===null||(d.childLanes&l)===l)break;d.childLanes|=l}else o.childLanes|=l,d!==null&&(d.childLanes|=l);o=o.return}}function Ls(o,l){Ml=o,Zo=bi=null,o=o.dependencies,o!==null&&o.firstContext!==null&&(o.lanes&l&&(Xr=!0),o.firstContext=null)}function Lr(o,l){if(Zo!==o&&l!==!1&&l!==0)if((typeof l!="number"||l===1073741823)&&(Zo=o,l=1073741823),l={context:o,observedBits:l,next:null},bi===null){if(Ml===null)throw Error(p(308));bi=l,Ml.dependencies={lanes:0,firstContext:l,responders:null}}else bi=bi.next=l;return ke?o._currentValue:o._currentValue2}var Ni=!1;function Yr(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oi(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Si(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function xi(o,l){if(o=o.updateQueue,o!==null){o=o.shared;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}}function zi(o,l){var d=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,d===y)){var S=null,C=null;if(d=d.firstBaseUpdate,d!==null){do{var _={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};C===null?S=C=_:C=C.next=_,d=d.next}while(d!==null);C===null?S=C=l:C=C.next=l}else S=C=l;d={baseState:y.baseState,firstBaseUpdate:S,lastBaseUpdate:C,shared:y.shared,effects:y.effects},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}function Ds(o,l,d,y){var S=o.updateQueue;Ni=!1;var C=S.firstBaseUpdate,_=S.lastBaseUpdate,H=S.shared.pending;if(H!==null){S.shared.pending=null;var ce=H,ze=ce.next;ce.next=null,_===null?C=ze:_.next=ze,_=ce;var rt=o.alternate;if(rt!==null){rt=rt.updateQueue;var mt=rt.lastBaseUpdate;mt!==_&&(mt===null?rt.firstBaseUpdate=ze:mt.next=ze,rt.lastBaseUpdate=ce)}}if(C!==null){mt=S.baseState,_=0,rt=ze=ce=null;do{H=C.lane;var We=C.eventTime;if((y&H)===H){rt!==null&&(rt=rt.next={eventTime:We,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var Yt=o,ln=C;switch(H=l,We=d,ln.tag){case 1:if(Yt=ln.payload,typeof Yt=="function"){mt=Yt.call(We,mt,H);break e}mt=Yt;break e;case 3:Yt.flags=Yt.flags&-4097|64;case 0:if(Yt=ln.payload,H=typeof Yt=="function"?Yt.call(We,mt,H):Yt,H==null)break e;mt=a({},mt,H);break e;case 2:Ni=!0}}C.callback!==null&&(o.flags|=32,H=S.effects,H===null?S.effects=[C]:H.push(C))}else We={eventTime:We,lane:H,tag:C.tag,payload:C.payload,callback:C.callback,next:null},rt===null?(ze=rt=We,ce=mt):rt=rt.next=We,_|=H;if(C=C.next,C===null){if(H=S.shared.pending,H===null)break;C=H.next,H.next=null,S.lastBaseUpdate=H,S.shared.pending=null}}while(!0);rt===null&&(ce=mt),S.baseState=ce,S.firstBaseUpdate=ze,S.lastBaseUpdate=rt,Ea|=_,o.lanes=_,o.memoizedState=mt}}function Jo(o,l,d){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var y=o[l],S=y.callback;if(S!==null){if(y.callback=null,y=d,typeof S!="function")throw Error(p(191,S));S.call(y)}}}var Md=new c.Component().refs;function ho(o,l,d,y){l=o.memoizedState,d=d(y,l),d=d==null?l:a({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Dl={isMounted:function(o){return(o=o._reactInternals)?Ee(o)===o:!1},enqueueSetState:function(o,l,d){o=o._reactInternals;var y=Tr(),S=zn(o),C=Si(y,S);C.payload=l,d!=null&&(C.callback=d),xi(o,C),Vi(o,S,y)},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var y=Tr(),S=zn(o),C=Si(y,S);C.tag=1,C.payload=l,d!=null&&(C.callback=d),xi(o,C),Vi(o,S,y)},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=Tr(),y=zn(o),S=Si(d,y);S.tag=2,l!=null&&(S.callback=l),xi(o,S),Vi(o,y,d)}};function po(o,l,d,y,S,C,_){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(y,C,_):l.prototype&&l.prototype.isPureReactComponent?!Ol(d,y)||!Ol(S,C):!0}function Pd(o,l,d){var y=!1,S=gi,C=l.contextType;return typeof C=="object"&&C!==null?C=Lr(C):(S=dn(l)?$n:xn.current,y=l.contextTypes,C=(y=y!=null)?yi(o,S):gi),l=new l(d,C),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Dl,o.stateNode=l,l._reactInternals=o,y&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=S,o.__reactInternalMemoizedMaskedChildContext=C),l}function kl(o,l,d,y){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,y),l.state!==o&&Dl.enqueueReplaceState(l,l.state,null)}function Nl(o,l,d,y){var S=o.stateNode;S.props=d,S.state=o.memoizedState,S.refs=Md,Yr(o);var C=l.contextType;typeof C=="object"&&C!==null?S.context=Lr(C):(C=dn(l)?$n:xn.current,S.context=yi(o,C)),Ds(o,d,S,y),S.state=o.memoizedState,C=l.getDerivedStateFromProps,typeof C=="function"&&(ho(o,l,C,d),S.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(l=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),l!==S.state&&Dl.enqueueReplaceState(S,S.state,null),Ds(o,d,S,y),S.state=o.memoizedState),typeof S.componentDidMount=="function"&&(o.flags|=4)}var ea=Array.isArray;function ns(o,l,d){if(o=d.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(p(309));var y=d.stateNode}if(!y)throw Error(p(147,o));var S=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===S?l.ref:(l=function(C){var _=y.refs;_===Md&&(_=y.refs={}),C===null?delete _[S]:_[S]=C},l._stringRef=S,l)}if(typeof o!="string")throw Error(p(284));if(!d._owner)throw Error(p(290,o))}return o}function Sr(o,l){if(o.type!=="textarea")throw Error(p(31,Object.prototype.toString.call(l)==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":l))}function zl(o){function l(te,q){if(o){var fe=te.lastEffect;fe!==null?(fe.nextEffect=q,te.lastEffect=q):te.firstEffect=te.lastEffect=q,q.nextEffect=null,q.flags=8}}function d(te,q){if(!o)return null;for(;q!==null;)l(te,q),q=q.sibling;return null}function y(te,q){for(te=new Map;q!==null;)q.key!==null?te.set(q.key,q):te.set(q.index,q),q=q.sibling;return te}function S(te,q){return te=tn(te,q),te.index=0,te.sibling=null,te}function C(te,q,fe){return te.index=fe,o?(fe=te.alternate,fe!==null?(fe=fe.index,fe<q?(te.flags=2,q):fe):(te.flags=2,q)):q}function _(te){return o&&te.alternate===null&&(te.flags=2),te}function H(te,q,fe,He){return q===null||q.tag!==6?(q=ja(fe,te.mode,He),q.return=te,q):(q=S(q,fe),q.return=te,q)}function ce(te,q,fe,He){return q!==null&&q.elementType===fe.type?(He=S(q,fe.props),He.ref=ns(te,q,fe),He.return=te,He):(He=_a(fe.type,fe.key,fe.props,null,te.mode,He),He.ref=ns(te,q,fe),He.return=te,He)}function ze(te,q,fe,He){return q===null||q.tag!==4||q.stateNode.containerInfo!==fe.containerInfo||q.stateNode.implementation!==fe.implementation?(q=Po(fe,te.mode,He),q.return=te,q):(q=S(q,fe.children||[]),q.return=te,q)}function rt(te,q,fe,He,ot){return q===null||q.tag!==7?(q=$s(fe,te.mode,He,ot),q.return=te,q):(q=S(q,fe),q.return=te,q)}function mt(te,q,fe){if(typeof q=="string"||typeof q=="number")return q=ja(""+q,te.mode,fe),q.return=te,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case x:return fe=_a(q.type,q.key,q.props,null,te.mode,fe),fe.ref=ns(te,null,q),fe.return=te,fe;case m:return q=Po(q,te.mode,fe),q.return=te,q}if(ea(q)||ge(q))return q=$s(q,te.mode,fe,null),q.return=te,q;Sr(te,q)}return null}function We(te,q,fe,He){var ot=q!==null?q.key:null;if(typeof fe=="string"||typeof fe=="number")return ot!==null?null:H(te,q,""+fe,He);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case x:return fe.key===ot?fe.type===w?rt(te,q,fe.props.children,He,ot):ce(te,q,fe,He):null;case m:return fe.key===ot?ze(te,q,fe,He):null}if(ea(fe)||ge(fe))return ot!==null?null:rt(te,q,fe,He,null);Sr(te,fe)}return null}function Yt(te,q,fe,He,ot){if(typeof He=="string"||typeof He=="number")return te=te.get(fe)||null,H(q,te,""+He,ot);if(typeof He=="object"&&He!==null){switch(He.$$typeof){case x:return te=te.get(He.key===null?fe:He.key)||null,He.type===w?rt(q,te,He.props.children,ot,He.key):ce(q,te,He,ot);case m:return te=te.get(He.key===null?fe:He.key)||null,ze(q,te,He,ot)}if(ea(He)||ge(He))return te=te.get(fe)||null,rt(q,te,He,ot,null);Sr(q,He)}return null}function ln(te,q,fe,He){for(var ot=null,Qt=null,gt=q,Ut=q=0,Dn=null;gt!==null&&Ut<fe.length;Ut++){gt.index>Ut?(Dn=gt,gt=null):Dn=gt.sibling;var At=We(te,gt,fe[Ut],He);if(At===null){gt===null&&(gt=Dn);break}o&>&&At.alternate===null&&l(te,gt),q=C(At,q,Ut),Qt===null?ot=At:Qt.sibling=At,Qt=At,gt=Dn}if(Ut===fe.length)return d(te,gt),ot;if(gt===null){for(;Ut<fe.length;Ut++)gt=mt(te,fe[Ut],He),gt!==null&&(q=C(gt,q,Ut),Qt===null?ot=gt:Qt.sibling=gt,Qt=gt);return ot}for(gt=y(te,gt);Ut<fe.length;Ut++)Dn=Yt(gt,te,Ut,fe[Ut],He),Dn!==null&&(o&&Dn.alternate!==null&>.delete(Dn.key===null?Ut:Dn.key),q=C(Dn,q,Ut),Qt===null?ot=Dn:Qt.sibling=Dn,Qt=Dn);return o&>.forEach(function(Wi){return l(te,Wi)}),ot}function jr(te,q,fe,He){var ot=ge(fe);if(typeof ot!="function")throw Error(p(150));if(fe=ot.call(fe),fe==null)throw Error(p(151));for(var Qt=ot=null,gt=q,Ut=q=0,Dn=null,At=fe.next();gt!==null&&!At.done;Ut++,At=fe.next()){gt.index>Ut?(Dn=gt,gt=null):Dn=gt.sibling;var Wi=We(te,gt,At.value,He);if(Wi===null){gt===null&&(gt=Dn);break}o&>&&Wi.alternate===null&&l(te,gt),q=C(Wi,q,Ut),Qt===null?ot=Wi:Qt.sibling=Wi,Qt=Wi,gt=Dn}if(At.done)return d(te,gt),ot;if(gt===null){for(;!At.done;Ut++,At=fe.next())At=mt(te,At.value,He),At!==null&&(q=C(At,q,Ut),Qt===null?ot=At:Qt.sibling=At,Qt=At);return ot}for(gt=y(te,gt);!At.done;Ut++,At=fe.next())At=Yt(gt,te,Ut,At.value,He),At!==null&&(o&&At.alternate!==null&>.delete(At.key===null?Ut:At.key),q=C(At,q,Ut),Qt===null?ot=At:Qt.sibling=At,Qt=At);return o&>.forEach(function(zv){return l(te,zv)}),ot}return function(te,q,fe,He){var ot=typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null;ot&&(fe=fe.props.children);var Qt=typeof fe=="object"&&fe!==null;if(Qt)switch(fe.$$typeof){case x:e:{for(Qt=fe.key,ot=q;ot!==null;){if(ot.key===Qt){switch(ot.tag){case 7:if(fe.type===w){d(te,ot.sibling),q=S(ot,fe.props.children),q.return=te,te=q;break e}break;default:if(ot.elementType===fe.type){d(te,ot.sibling),q=S(ot,fe.props),q.ref=ns(te,ot,fe),q.return=te,te=q;break e}}d(te,ot);break}else l(te,ot);ot=ot.sibling}fe.type===w?(q=$s(fe.props.children,te.mode,He,fe.key),q.return=te,te=q):(He=_a(fe.type,fe.key,fe.props,null,te.mode,He),He.ref=ns(te,q,fe),He.return=te,te=He)}return _(te);case m:e:{for(ot=fe.key;q!==null;){if(q.key===ot)if(q.tag===4&&q.stateNode.containerInfo===fe.containerInfo&&q.stateNode.implementation===fe.implementation){d(te,q.sibling),q=S(q,fe.children||[]),q.return=te,te=q;break e}else{d(te,q);break}else l(te,q);q=q.sibling}q=Po(fe,te.mode,He),q.return=te,te=q}return _(te)}if(typeof fe=="string"||typeof fe=="number")return fe=""+fe,q!==null&&q.tag===6?(d(te,q.sibling),q=S(q,fe),q.return=te,te=q):(d(te,q),q=ja(fe,te.mode,He),q.return=te,te=q),_(te);if(ea(fe))return ln(te,q,fe,He);if(ge(fe))return jr(te,q,fe,He);if(Qt&&Sr(te,fe),typeof fe>"u"&&!ot)switch(te.tag){case 1:case 22:case 0:case 11:case 15:throw Error(p(152,we(te.type)||"Component"))}return d(te,q)}}var ks=zl(!0),wi=zl(!1),Qr={},Jt=Vr(Qr),Mn=Vr(Qr),rs=Vr(Qr);function wn(o){if(o===Qr)throw Error(p(174));return o}function ai(o,l){Sn(rs,l),Sn(Mn,o),Sn(Jt,Qr),o=nt(l),Ot(Jt),Sn(Jt,o)}function lr(){Ot(Jt),Ot(Mn),Ot(rs)}function _l(o){var l=wn(rs.current),d=wn(Jt.current);l=W(d,o.type,l),d!==l&&(Sn(Mn,o),Sn(Jt,l))}function is(o){Mn.current===o&&(Ot(Jt),Ot(Mn))}var yn=Vr(0);function _i(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||yl(d)||bl(d)))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===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Gr=null,Kn=null,Dr=!1;function jl(o,l){var d=_r(5,null,null,0);d.elementType="DELETED",d.type="DELETED",d.stateNode=l,d.return=o,d.flags=8,o.lastEffect!==null?(o.lastEffect.nextEffect=d,o.lastEffect=d):o.firstEffect=o.lastEffect=d}function pc(o,l){switch(o.tag){case 5:return l=nc(l,o.type,o.pendingProps),l!==null?(o.stateNode=l,!0):!1;case 6:return l=rc(l,o.pendingProps),l!==null?(o.stateNode=l,!0):!1;case 13:return!1;default:return!1}}function Il(o){if(Dr){var l=Kn;if(l){var d=l;if(!pc(o,l)){if(l=U(d),!l||!pc(o,l)){o.flags=o.flags&-1025|2,Dr=!1,Gr=o;return}jl(Gr,d)}Gr=o,Kn=xe(l)}else o.flags=o.flags&-1025|2,Dr=!1,Gr=o}}function ta(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Gr=o}function na(o){if(!wt||o!==Gr)return!1;if(!Dr)return ta(o),Dr=!0,!1;var l=o.type;if(o.tag!==5||l!=="head"&&l!=="body"&&!yt(l,o.memoizedProps))for(l=Kn;l;)jl(o,l),l=U(l);if(ta(o),o.tag===13){if(!wt)throw Error(p(316));if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(p(317));Kn=Dt(o)}else Kn=Gr?U(o.stateNode):null;return!0}function vc(){wt&&(Kn=Gr=null,Dr=!1)}var Ns=[];function Ul(){for(var o=0;o<Ns.length;o++){var l=Ns[o];ke?l._workInProgressVersionPrimary=null:l._workInProgressVersionSecondary=null}Ns.length=0}var vo=g.ReactCurrentDispatcher,ur=g.ReactCurrentBatchConfig,xr=0,on=null,Zn=null,qn=null,Fl=!1,ra=!1;function wr(){throw Error(p(321))}function mc(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!qr(o[d],l[d]))return!1;return!0}function Bl(o,l,d,y,S,C){if(xr=C,on=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,vo.current=o===null||o.memoizedState===null?ca:Wl,o=d(y,S),ra){C=0;do{if(ra=!1,!(25>C))throw Error(p(301));C+=1,qn=Zn=null,l.updateQueue=null,vo.current=$l,o=d(y,S)}while(ra)}if(vo.current=zt,l=Zn!==null&&Zn.next!==null,xr=0,qn=Zn=on=null,Fl=!1,l)throw Error(p(300));return o}function ss(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qn===null?on.memoizedState=qn=o:qn=qn.next=o,qn}function os(){if(Zn===null){var o=on.alternate;o=o!==null?o.memoizedState:null}else o=Zn.next;var l=qn===null?on.memoizedState:qn.next;if(l!==null)qn=l,Zn=o;else{if(o===null)throw Error(p(310));Zn=o,o={memoizedState:Zn.memoizedState,baseState:Zn.baseState,baseQueue:Zn.baseQueue,queue:Zn.queue,next:null},qn===null?on.memoizedState=qn=o:qn=qn.next=o}return qn}function Ei(o,l){return typeof l=="function"?l(o):l}function mo(o){var l=os(),d=l.queue;if(d===null)throw Error(p(311));d.lastRenderedReducer=o;var y=Zn,S=y.baseQueue,C=d.pending;if(C!==null){if(S!==null){var _=S.next;S.next=C.next,C.next=_}y.baseQueue=S=C,d.pending=null}if(S!==null){S=S.next,y=y.baseState;var H=_=C=null,ce=S;do{var ze=ce.lane;if((xr&ze)===ze)H!==null&&(H=H.next={lane:0,action:ce.action,eagerReducer:ce.eagerReducer,eagerState:ce.eagerState,next:null}),y=ce.eagerReducer===o?ce.eagerState:o(y,ce.action);else{var rt={lane:ze,action:ce.action,eagerReducer:ce.eagerReducer,eagerState:ce.eagerState,next:null};H===null?(_=H=rt,C=y):H=H.next=rt,on.lanes|=ze,Ea|=ze}ce=ce.next}while(ce!==null&&ce!==S);H===null?C=y:H.next=_,qr(y,l.memoizedState)||(Xr=!0),l.memoizedState=y,l.baseState=C,l.baseQueue=H,d.lastRenderedState=y}return[l.memoizedState,d.dispatch]}function ia(o){var l=os(),d=l.queue;if(d===null)throw Error(p(311));d.lastRenderedReducer=o;var y=d.dispatch,S=d.pending,C=l.memoizedState;if(S!==null){d.pending=null;var _=S=S.next;do C=o(C,_.action),_=_.next;while(_!==S);qr(C,l.memoizedState)||(Xr=!0),l.memoizedState=C,l.baseQueue===null&&(l.baseState=C),d.lastRenderedState=C}return[C,y]}function zs(o,l,d){var y=l._getVersion;y=y(l._source);var S=ke?l._workInProgressVersionPrimary:l._workInProgressVersionSecondary;if(S!==null?o=S===y:(o=o.mutableReadLanes,(o=(xr&o)===o)&&(ke?l._workInProgressVersionPrimary=y:l._workInProgressVersionSecondary=y,Ns.push(l))),o)return d(l._source);throw Ns.push(l),Error(p(350))}function sa(o,l,d,y){var S=er;if(S===null)throw Error(p(349));var C=l._getVersion,_=C(l._source),H=vo.current,ce=H.useState(function(){return zs(S,l,d)}),ze=ce[1],rt=ce[0];ce=qn;var mt=o.memoizedState,We=mt.refs,Yt=We.getSnapshot,ln=mt.source;mt=mt.subscribe;var jr=on;return o.memoizedState={refs:We,source:l,subscribe:y},H.useEffect(function(){We.getSnapshot=d,We.setSnapshot=ze;var te=C(l._source);if(!qr(_,te)){te=d(l._source),qr(rt,te)||(ze(te),te=zn(jr),S.mutableReadLanes|=te&S.pendingLanes),te=S.mutableReadLanes,S.entangledLanes|=te;for(var q=S.entanglements,fe=te;0<fe;){var He=31-ts(fe),ot=1<<He;q[He]|=te,fe&=~ot}}},[d,l,y]),H.useEffect(function(){return y(l._source,function(){var te=We.getSnapshot,q=We.setSnapshot;try{q(te(l._source));var fe=zn(jr);S.mutableReadLanes|=fe&S.pendingLanes}catch(He){q(function(){throw He})}})},[l,y]),qr(Yt,d)&&qr(ln,l)&&qr(mt,y)||(o={pending:null,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:rt},o.dispatch=ze=Jn.bind(null,on,o),ce.queue=o,ce.baseQueue=null,rt=zs(S,l,d),ce.memoizedState=ce.baseState=rt),rt}function gc(o,l,d){var y=os();return sa(y,o,l,d)}function as(o){var l=ss();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o=l.queue={pending:null,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:o},o=o.dispatch=Jn.bind(null,on,o),[l.memoizedState,o]}function oa(o,l,d,y){return o={tag:o,create:l,destroy:d,deps:y,next:null},l=on.updateQueue,l===null?(l={lastEffect:null},on.updateQueue=l,l.lastEffect=o.next=o):(d=l.lastEffect,d===null?l.lastEffect=o.next=o:(y=d.next,d.next=o,o.next=y,l.lastEffect=o)),o}function _s(o){var l=ss();return o={current:o},l.memoizedState=o}function aa(){return os().memoizedState}function ji(o,l,d,y){var S=ss();on.flags|=o,S.memoizedState=oa(1|l,d,void 0,y===void 0?null:y)}function Hl(o,l,d,y){var S=os();y=y===void 0?null:y;var C=void 0;if(Zn!==null){var _=Zn.memoizedState;if(C=_.destroy,y!==null&&mc(y,_.deps)){oa(l,d,C,y);return}}on.flags|=o,S.memoizedState=oa(1|l,d,C,y)}function la(o,l){return ji(516,4,o,l)}function go(o,l){return Hl(516,4,o,l)}function yc(o,l){return Hl(4,2,o,l)}function bc(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function ua(o,l,d){return d=d!=null?d.concat([o]):null,Hl(4,2,bc.bind(null,l,o),d)}function Vl(){}function Ii(o,l){var d=os();l=l===void 0?null:l;var y=d.memoizedState;return y!==null&&l!==null&&mc(l,y[1])?y[0]:(d.memoizedState=[o,l],o)}function Ld(o,l){var d=os();l=l===void 0?null:l;var y=d.memoizedState;return y!==null&&l!==null&&mc(l,y[1])?y[0]:(o=o(),d.memoizedState=[o,l],o)}function ye(o,l){var d=co();ki(98>d?98:d,function(){o(!0)}),ki(97<d?97:d,function(){var y=ur.transition;ur.transition=1;try{o(!1),l()}finally{ur.transition=y}})}function Jn(o,l,d){var y=Tr(),S=zn(o),C={lane:S,action:d,eagerReducer:null,eagerState:null,next:null},_=l.pending;if(_===null?C.next=C:(C.next=_.next,_.next=C),l.pending=C,_=o.alternate,o===on||_!==null&&_===on)ra=Fl=!0;else{if(o.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var H=l.lastRenderedState,ce=_(H,d);if(C.eagerReducer=_,C.eagerState=ce,qr(ce,H))return}catch{}finally{}Vi(o,S,y)}}var zt={readContext:Lr,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useLayoutEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useMutableSource:wr,useOpaqueIdentifier:wr,unstable_isNewReconciler:!1},ca={readContext:Lr,useCallback:function(o,l){return ss().memoizedState=[o,l===void 0?null:l],o},useContext:Lr,useEffect:la,useImperativeHandle:function(o,l,d){return d=d!=null?d.concat([o]):null,ji(4,2,bc.bind(null,l,o),d)},useLayoutEffect:function(o,l){return ji(4,2,o,l)},useMemo:function(o,l){var d=ss();return l=l===void 0?null:l,o=o(),d.memoizedState=[o,l],o},useReducer:function(o,l,d){var y=ss();return l=d!==void 0?d(l):l,y.memoizedState=y.baseState=l,o=y.queue={pending:null,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},o=o.dispatch=Jn.bind(null,on,o),[y.memoizedState,o]},useRef:_s,useState:as,useDebugValue:Vl,useDeferredValue:function(o){var l=as(o),d=l[0],y=l[1];return la(function(){var S=ur.transition;ur.transition=1;try{y(o)}finally{ur.transition=S}},[o]),d},useTransition:function(){var o=as(!1),l=o[0];return o=ye.bind(null,o[1]),_s(o),[o,l]},useMutableSource:function(o,l,d){var y=ss();return y.memoizedState={refs:{getSnapshot:l,setSnapshot:null},source:o,subscribe:d},sa(y,o,l,d)},useOpaqueIdentifier:function(){if(Dr){var o=!1,l=I(function(){throw o||(o=!0,d(N())),Error(p(355))}),d=as(l)[1];return!(on.mode&2)&&(on.flags|=516,oa(5,function(){d(N())},void 0,null)),l}return l=N(),as(l),l},unstable_isNewReconciler:!1},Wl={readContext:Lr,useCallback:Ii,useContext:Lr,useEffect:go,useImperativeHandle:ua,useLayoutEffect:yc,useMemo:Ld,useReducer:mo,useRef:aa,useState:function(){return mo(Ei)},useDebugValue:Vl,useDeferredValue:function(o){var l=mo(Ei),d=l[0],y=l[1];return go(function(){var S=ur.transition;ur.transition=1;try{y(o)}finally{ur.transition=S}},[o]),d},useTransition:function(){var o=mo(Ei)[0];return[aa().current,o]},useMutableSource:gc,useOpaqueIdentifier:function(){return mo(Ei)[0]},unstable_isNewReconciler:!1},$l={readContext:Lr,useCallback:Ii,useContext:Lr,useEffect:go,useImperativeHandle:ua,useLayoutEffect:yc,useMemo:Ld,useReducer:ia,useRef:aa,useState:function(){return ia(Ei)},useDebugValue:Vl,useDeferredValue:function(o){var l=ia(Ei),d=l[0],y=l[1];return go(function(){var S=ur.transition;ur.transition=1;try{y(o)}finally{ur.transition=S}},[o]),d},useTransition:function(){var o=ia(Ei)[0];return[aa().current,o]},useMutableSource:gc,useOpaqueIdentifier:function(){return ia(Ei)[0]},unstable_isNewReconciler:!1},Dd=g.ReactCurrentOwner,Xr=!1;function cr(o,l,d,y){l.child=o===null?wi(l,null,d,y):ks(l,o.child,d,y)}function ql(o,l,d,y,S){d=d.render;var C=l.ref;return Ls(l,S),y=Bl(o,l,d,y,C,S),o!==null&&!Xr?(l.updateQueue=o.updateQueue,l.flags&=-517,o.lanes&=~S,Fi(o,l,S)):(l.flags|=1,cr(o,l,y,S),l.child)}function Sc(o,l,d,y,S,C){if(o===null){var _=d.type;return typeof _=="function"&&!zc(_)&&_.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=_,js(o,l,_,y,S,C)):(o=_a(d.type,null,y,l,l.mode,C),o.ref=l.ref,o.return=l,l.child=o)}return _=o.child,!(S&C)&&(S=_.memoizedProps,d=d.compare,d=d!==null?d:Ol,d(S,y)&&o.ref===l.ref)?Fi(o,l,C):(l.flags|=1,o=tn(_,y),o.ref=l.ref,o.return=l,l.child=o)}function js(o,l,d,y,S,C){if(o!==null&&Ol(o.memoizedProps,y)&&o.ref===l.ref)if(Xr=!1,(C&S)!==0)o.flags&16384&&(Xr=!0);else return l.lanes=o.lanes,Fi(o,l,C);return fa(o,l,d,y,C)}function yo(o,l,d){var y=l.pendingProps,S=y.children,C=o!==null?o.memoizedState:null;if(y.mode==="hidden"||y.mode==="unstable-defer-without-hiding")if(!(l.mode&4))l.memoizedState={baseLanes:0},Gn(l,d);else if(d&1073741824)l.memoizedState={baseLanes:0},Gn(l,C!==null?C.baseLanes:d);else return o=C!==null?C.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o},Gn(l,o),null;else C!==null?(y=C.baseLanes|d,l.memoizedState=null):y=d,Gn(l,y);return cr(o,l,S,d),l.child}function Is(o,l){var d=l.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(l.flags|=128)}function fa(o,l,d,y,S){var C=dn(d)?$n:xn.current;return C=yi(l,C),Ls(l,S),d=Bl(o,l,d,y,C,S),o!==null&&!Xr?(l.updateQueue=o.updateQueue,l.flags&=-517,o.lanes&=~S,Fi(o,l,S)):(l.flags|=1,cr(o,l,d,S),l.child)}function xc(o,l,d,y,S){if(dn(d)){var C=!0;Qo(l)}else C=!1;if(Ls(l,S),l.stateNode===null)o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2),Pd(l,d,y),Nl(l,d,y,S),y=!0;else if(o===null){var _=l.stateNode,H=l.memoizedProps;_.props=H;var ce=_.context,ze=d.contextType;typeof ze=="object"&&ze!==null?ze=Lr(ze):(ze=dn(d)?$n:xn.current,ze=yi(l,ze));var rt=d.getDerivedStateFromProps,mt=typeof rt=="function"||typeof _.getSnapshotBeforeUpdate=="function";mt||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(H!==y||ce!==ze)&&kl(l,_,y,ze),Ni=!1;var We=l.memoizedState;_.state=We,Ds(l,y,_,S),ce=l.memoizedState,H!==y||We!==ce||Xn.current||Ni?(typeof rt=="function"&&(ho(l,d,rt,y),ce=l.memoizedState),(H=Ni||po(l,d,H,y,We,ce,ze))?(mt||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(l.flags|=4)):(typeof _.componentDidMount=="function"&&(l.flags|=4),l.memoizedProps=y,l.memoizedState=ce),_.props=y,_.state=ce,_.context=ze,y=H):(typeof _.componentDidMount=="function"&&(l.flags|=4),y=!1)}else{_=l.stateNode,oi(o,l),H=l.memoizedProps,ze=l.type===l.elementType?H:si(l.type,H),_.props=ze,mt=l.pendingProps,We=_.context,ce=d.contextType,typeof ce=="object"&&ce!==null?ce=Lr(ce):(ce=dn(d)?$n:xn.current,ce=yi(l,ce));var Yt=d.getDerivedStateFromProps;(rt=typeof Yt=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(H!==mt||We!==ce)&&kl(l,_,y,ce),Ni=!1,We=l.memoizedState,_.state=We,Ds(l,y,_,S);var ln=l.memoizedState;H!==mt||We!==ln||Xn.current||Ni?(typeof Yt=="function"&&(ho(l,d,Yt,y),ln=l.memoizedState),(ze=Ni||po(l,d,ze,y,We,ln,ce))?(rt||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(y,ln,ce),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(y,ln,ce)),typeof _.componentDidUpdate=="function"&&(l.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(l.flags|=256)):(typeof _.componentDidUpdate!="function"||H===o.memoizedProps&&We===o.memoizedState||(l.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||H===o.memoizedProps&&We===o.memoizedState||(l.flags|=256),l.memoizedProps=y,l.memoizedState=ln),_.props=y,_.state=ln,_.context=ce,y=ze):(typeof _.componentDidUpdate!="function"||H===o.memoizedProps&&We===o.memoizedState||(l.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||H===o.memoizedProps&&We===o.memoizedState||(l.flags|=256),y=!1)}return Yl(o,l,d,y,C,S)}function Yl(o,l,d,y,S,C){Is(o,l);var _=(l.flags&64)!==0;if(!y&&!_)return S&&wd(l,d,!1),Fi(o,l,C);y=l.stateNode,Dd.current=l;var H=_&&typeof d.getDerivedStateFromError!="function"?null:y.render();return l.flags|=1,o!==null&&_?(l.child=ks(l,o.child,null,C),l.child=ks(l,null,H,C)):cr(o,l,H,C),l.memoizedState=y.state,S&&wd(l,d,!0),l.child}function Ql(o){var l=o.stateNode;l.pendingContext?Sd(o,l.pendingContext,l.pendingContext!==l.context):l.context&&Sd(o,l.context,!1),ai(o,l.containerInfo)}var kr={dehydrated:null,retryLane:0};function bn(o,l,d){var y=l.pendingProps,S=yn.current,C=!1,_;return(_=(l.flags&64)!==0)||(_=o!==null&&o.memoizedState===null?!1:(S&2)!==0),_?(C=!0,l.flags&=-65):o!==null&&o.memoizedState===null||y.fallback===void 0||y.unstable_avoidThisFallback===!0||(S|=1),Sn(yn,S&1),o===null?(y.fallback!==void 0&&Il(l),o=y.children,S=y.fallback,C?(o=wc(l,o,S,d),l.child.memoizedState={baseLanes:d},l.memoizedState=kr,o):typeof y.unstable_expectedLoadTime=="number"?(o=wc(l,o,S,d),l.child.memoizedState={baseLanes:d},l.memoizedState=kr,l.lanes=33554432,o):(d=Mo({mode:"visible",children:o},l.mode,d,null),d.return=l,l.child=d)):o.memoizedState!==null?C?(y=Tc(o,l,y.children,y.fallback,d),C=l.child,S=o.child.memoizedState,C.memoizedState=S===null?{baseLanes:d}:{baseLanes:S.baseLanes|d},C.childLanes=o.childLanes&~d,l.memoizedState=kr,y):(d=Ec(o,l,y.children,d),l.memoizedState=null,d):C?(y=Tc(o,l,y.children,y.fallback,d),C=l.child,S=o.child.memoizedState,C.memoizedState=S===null?{baseLanes:d}:{baseLanes:S.baseLanes|d},C.childLanes=o.childLanes&~d,l.memoizedState=kr,y):(d=Ec(o,l,y.children,d),l.memoizedState=null,d)}function wc(o,l,d,y){var S=o.mode,C=o.child;return l={mode:"hidden",children:l},!(S&2)&&C!==null?(C.childLanes=0,C.pendingProps=l):C=Mo(l,S,0,null),d=$s(d,S,y,null),C.return=o,d.return=o,C.sibling=d,o.child=C,d}function Ec(o,l,d,y){var S=o.child;return o=S.sibling,d=tn(S,{mode:"visible",children:d}),!(l.mode&2)&&(d.lanes=y),d.return=l,d.sibling=null,o!==null&&(o.nextEffect=null,o.flags=8,l.firstEffect=l.lastEffect=o),l.child=d}function Tc(o,l,d,y,S){var C=l.mode,_=o.child;o=_.sibling;var H={mode:"hidden",children:d};return!(C&2)&&l.child!==_?(d=l.child,d.childLanes=0,d.pendingProps=H,_=d.lastEffect,_!==null?(l.firstEffect=d.firstEffect,l.lastEffect=_,_.nextEffect=null):l.firstEffect=l.lastEffect=null):d=tn(_,H),o!==null?y=tn(o,y):(y=$s(y,C,S,null),y.flags|=2),y.return=l,d.return=l,d.sibling=y,l.child=d,y}function en(o,l){o.lanes|=l;var d=o.alternate;d!==null&&(d.lanes|=l),hc(o.return,l)}function Ui(o,l,d,y,S,C){var _=o.memoizedState;_===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:d,tailMode:S,lastEffect:C}:(_.isBackwards=l,_.rendering=null,_.renderingStartTime=0,_.last=y,_.tail=d,_.tailMode=S,_.lastEffect=C)}function kd(o,l,d){var y=l.pendingProps,S=y.revealOrder,C=y.tail;if(cr(o,l,y.children,d),y=yn.current,y&2)y=y&1|2,l.flags|=64;else{if(o!==null&&o.flags&64)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&en(o,d);else if(o.tag===19)en(o,d);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}y&=1}if(Sn(yn,y),!(l.mode&2))l.memoizedState=null;else switch(S){case"forwards":for(d=l.child,S=null;d!==null;)o=d.alternate,o!==null&&_i(o)===null&&(S=d),d=d.sibling;d=S,d===null?(S=l.child,l.child=null):(S=d.sibling,d.sibling=null),Ui(l,!1,S,d,C,l.lastEffect);break;case"backwards":for(d=null,S=l.child,l.child=null;S!==null;){if(o=S.alternate,o!==null&&_i(o)===null){l.child=S;break}o=S.sibling,S.sibling=d,d=S,S=o}Ui(l,!0,d,null,C,l.lastEffect);break;case"together":Ui(l,!1,null,null,void 0,l.lastEffect);break;default:l.memoizedState=null}return l.child}function Fi(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),Ea|=l.lanes,d&l.childLanes){if(o!==null&&l.child!==o.child)throw Error(p(153));if(l.child!==null){for(o=l.child,d=tn(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=tn(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}return null}function Er(o){o.flags|=4}var da,ha,Gl,Xl;if(qe)da=function(o,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)at(o,d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},ha=function(){},Gl=function(o,l,d,y,S){if(o=o.memoizedProps,o!==y){var C=l.stateNode,_=wn(Jt.current);d=_t(C,d,o,y,S,_),(l.updateQueue=d)&&Er(l)}},Xl=function(o,l,d,y){d!==y&&Er(l)};else if(st){da=function(o,l,d,y){for(var S=l.child;S!==null;){if(S.tag===5){var C=S.stateNode;d&&y&&(C=gl(C,S.type,S.memoizedProps,S)),at(o,C)}else if(S.tag===6)C=S.stateNode,d&&y&&(C=es(C,S.memoizedProps,S)),at(o,C);else if(S.tag!==4){if(S.tag===13&&S.flags&4&&(C=S.memoizedState!==null)){var _=S.child;if(_!==null&&(_.child!==null&&(_.child.return=_,da(o,_,!0,C)),C=_.sibling,C!==null)){C.return=S,S=C;continue}}if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===l)break;for(;S.sibling===null;){if(S.return===null||S.return===l)return;S=S.return}S.sibling.return=S.return,S=S.sibling}};var Cc=function(o,l,d,y){for(var S=l.child;S!==null;){if(S.tag===5){var C=S.stateNode;d&&y&&(C=gl(C,S.type,S.memoizedProps,S)),Hr(o,C)}else if(S.tag===6)C=S.stateNode,d&&y&&(C=es(C,S.memoizedProps,S)),Hr(o,C);else if(S.tag!==4){if(S.tag===13&&S.flags&4&&(C=S.memoizedState!==null)){var _=S.child;if(_!==null&&(_.child!==null&&(_.child.return=_,Cc(o,_,!0,C)),C=_.sibling,C!==null)){C.return=S,S=C;continue}}if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===l)break;for(;S.sibling===null;){if(S.return===null||S.return===l)return;S=S.return}S.sibling.return=S.return,S=S.sibling}};ha=function(o){var l=o.stateNode;if(o.firstEffect!==null){var d=l.containerInfo,y=Pr(d);Cc(y,o,!1,!1),l.pendingChildren=y,Er(o),br(d,y)}},Gl=function(o,l,d,y,S){var C=o.stateNode,_=o.memoizedProps;if((o=l.firstEffect===null)&&_===y)l.stateNode=C;else{var H=l.stateNode,ce=wn(Jt.current),ze=null;_!==y&&(ze=_t(H,d,_,y,S,ce)),o&&ze===null?l.stateNode=C:(C=Mr(C,ze,d,_,y,l,o,H),$t(C,d,y,S,ce)&&Er(l),l.stateNode=C,o?Er(l):da(C,l,!1,!1))}},Xl=function(o,l,d,y){d!==y?(o=wn(rs.current),d=wn(Jt.current),l.stateNode=xt(y,o,d,l),Er(l)):l.stateNode=o.stateNode}}else ha=function(){},Gl=function(){},Xl=function(){};function pa(o,l){if(!Dr)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var y=null;d!==null;)d.alternate!==null&&(y=d),d=d.sibling;y===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:y.sibling=null}}function Nd(o,l,d){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 dn(l.type)&&Sl(),null;case 3:return lr(),Ot(Xn),Ot(xn),Ul(),y=l.stateNode,y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(o===null||o.child===null)&&(na(l)?Er(l):y.hydrate||(l.flags|=256)),ha(l),null;case 5:is(l);var S=wn(rs.current);if(d=l.type,o!==null&&l.stateNode!=null)Gl(o,l,d,y,S),o.ref!==l.ref&&(l.flags|=128);else{if(!y){if(l.stateNode===null)throw Error(p(166));return null}if(o=wn(Jt.current),na(l)){if(!wt)throw Error(p(175));o=je(l.stateNode,l.type,l.memoizedProps,S,o,l),l.updateQueue=o,o!==null&&Er(l)}else{var C=tt(d,y,S,o,l);da(C,l,!1,!1),l.stateNode=C,$t(C,d,y,S,o)&&Er(l)}l.ref!==null&&(l.flags|=128)}return null;case 6:if(o&&l.stateNode!=null)Xl(o,l,o.memoizedProps,y);else{if(typeof y!="string"&&l.stateNode===null)throw Error(p(166));if(o=wn(rs.current),S=wn(Jt.current),na(l)){if(!wt)throw Error(p(176));dt(l.stateNode,l.memoizedProps,l)&&Er(l)}else l.stateNode=xt(y,o,S,l)}return null;case 13:return Ot(yn),y=l.memoizedState,l.flags&64?(l.lanes=d,l):(y=y!==null,S=!1,o===null?l.memoizedProps.fallback!==void 0&&na(l):S=o.memoizedState!==null,y&&!S&&l.mode&2&&(o===null&&l.memoizedProps.unstable_avoidThisFallback!==!0||yn.current&1?Bn===0&&(Bn=3):((Bn===0||Bn===3)&&(Bn=4),er===null||!(Ea&134217727)&&!(xo&134217727)||Bs(er,Gt))),st&&y&&(l.flags|=4),qe&&(y||S)&&(l.flags|=4),null);case 4:return lr(),ha(l),o===null&&ft(l.stateNode.containerInfo),null;case 10:return Ll(l),null;case 17:return dn(l.type)&&Sl(),null;case 19:if(Ot(yn),y=l.memoizedState,y===null)return null;if(S=(l.flags&64)!==0,C=y.rendering,C===null)if(S)pa(y,!1);else{if(Bn!==0||o!==null&&o.flags&64)for(o=l.child;o!==null;){if(C=_i(o),C!==null){for(l.flags|=64,pa(y,!1),o=C.updateQueue,o!==null&&(l.updateQueue=o,l.flags|=4),y.lastEffect===null&&(l.firstEffect=null),l.lastEffect=y.lastEffect,o=d,y=l.child;y!==null;)S=y,d=o,S.flags&=2,S.nextEffect=null,S.firstEffect=null,S.lastEffect=null,C=S.alternate,C===null?(S.childLanes=0,S.lanes=d,S.child=null,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=C.childLanes,S.lanes=C.lanes,S.child=C.child,S.memoizedProps=C.memoizedProps,S.memoizedState=C.memoizedState,S.updateQueue=C.updateQueue,S.type=C.type,d=C.dependencies,S.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),y=y.sibling;return Sn(yn,yn.current&1|2),l.child}o=o.sibling}y.tail!==null&&Fn()>iu&&(l.flags|=64,S=!0,pa(y,!1),l.lanes=33554432)}else{if(!S)if(o=_i(C),o!==null){if(l.flags|=64,S=!0,o=o.updateQueue,o!==null&&(l.updateQueue=o,l.flags|=4),pa(y,!0),y.tail===null&&y.tailMode==="hidden"&&!C.alternate&&!Dr)return l=l.lastEffect=y.lastEffect,l!==null&&(l.nextEffect=null),null}else 2*Fn()-y.renderingStartTime>iu&&d!==1073741824&&(l.flags|=64,S=!0,pa(y,!1),l.lanes=33554432);y.isBackwards?(C.sibling=l.child,l.child=C):(o=y.last,o!==null?o.sibling=C:l.child=C,y.last=C)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.lastEffect=l.lastEffect,y.renderingStartTime=Fn(),o.sibling=null,l=yn.current,Sn(yn,S?l&1|2:l&1),o):null;case 23:case 24:return Ln(),o!==null&&o.memoizedState!==null!=(l.memoizedState!==null)&&y.mode!=="unstable-defer-without-hiding"&&(l.flags|=4),null}throw Error(p(156,l.tag))}function zd(o){switch(o.tag){case 1:dn(o.type)&&Sl();var l=o.flags;return l&4096?(o.flags=l&-4097|64,o):null;case 3:if(lr(),Ot(Xn),Ot(xn),Ul(),l=o.flags,l&64)throw Error(p(285));return o.flags=l&-4097|64,o;case 5:return is(o),null;case 13:return Ot(yn),l=o.flags,l&4096?(o.flags=l&-4097|64,o):null;case 19:return Ot(yn),null;case 4:return lr(),null;case 10:return Ll(o),null;case 23:case 24:return Ln(),null;default:return null}}function Rc(o,l){try{var d="",y=l;do d+=Ov(y),y=y.return;while(y);var S=d}catch(C){S=`
|
|
206
|
+
Error generating stack: `+C.message+`
|
|
207
|
+
`+C.stack}return{value:o,source:l,stack:S}}function bo(o,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var Av=typeof WeakMap=="function"?WeakMap:Map;function _d(o,l,d){d=Si(-1,d),d.tag=3,d.payload={element:null};var y=l.value;return d.callback=function(){Ca||(Ca=!0,ui=y),bo(o,l)},d}function jd(o,l,d){d=Si(-1,d),d.tag=3;var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var S=l.value;d.payload=function(){return bo(o,l),y(S)}}var C=o.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(d.callback=function(){typeof y!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this),bo(o,l));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})}),d}var Mv=typeof WeakSet=="function"?WeakSet:Set;function Id(o){var l=o.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){di(o,d)}else l.current=null}function fr(o,l){switch(l.tag){case 0:case 11:case 15:case 22:return;case 1:if(l.flags&256&&o!==null){var d=o.memoizedProps,y=o.memoizedState;o=l.stateNode,l=o.getSnapshotBeforeUpdate(l.elementType===l.type?d:si(l.type,d),y),o.__reactInternalSnapshotBeforeUpdate=l}return;case 3:qe&&l.flags&256&&Bt(l.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(p(163))}function ls(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&o)===o){var y=d.destroy;d.destroy=void 0,y!==void 0&&y()}d=d.next}while(d!==l)}}function Pv(o,l,d){switch(d.tag){case 0:case 11:case 15:case 22:if(l=d.updateQueue,l=l!==null?l.lastEffect:null,l!==null){o=l=l.next;do{if((o.tag&3)===3){var y=o.create;o.destroy=y()}o=o.next}while(o!==l)}if(l=d.updateQueue,l=l!==null?l.lastEffect:null,l!==null){o=l=l.next;do{var S=o;y=S.next,S=S.tag,S&4&&S&1&&(kc(d,o),au(d,o)),o=y}while(o!==l)}return;case 1:o=d.stateNode,d.flags&4&&(l===null?o.componentDidMount():(y=d.elementType===d.type?l.memoizedProps:si(d.type,l.memoizedProps),o.componentDidUpdate(y,l.memoizedState,o.__reactInternalSnapshotBeforeUpdate))),l=d.updateQueue,l!==null&&Jo(d,l,o);return;case 3:if(l=d.updateQueue,l!==null){if(o=null,d.child!==null)switch(d.child.tag){case 5:o=it(d.child.stateNode);break;case 1:o=d.child.stateNode}Jo(d,l,o)}return;case 5:o=d.stateNode,l===null&&d.flags&4&&J(o,d.type,d.memoizedProps,d);return;case 6:return;case 4:return;case 12:return;case 13:wt&&d.memoizedState===null&&(d=d.alternate,d!==null&&(d=d.memoizedState,d!==null&&(d=d.dehydrated,d!==null&&Rt(d))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(p(163))}function Yn(o,l){if(qe)for(var d=o;;){if(d.tag===5){var y=d.stateNode;l?Nt(y):gn(d.stateNode,d.memoizedProps)}else if(d.tag===6)y=d.stateNode,l?jt(y):qt(y,d.memoizedProps);else if((d.tag!==23&&d.tag!==24||d.memoizedState===null||d===o)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return;d=d.return}d.sibling.return=d.return,d=d.sibling}}function us(o,l){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(ic,l)}catch{}switch(l.tag){case 0:case 11:case 14:case 15:case 22:if(o=l.updateQueue,o!==null&&(o=o.lastEffect,o!==null)){var d=o=o.next;do{var y=d,S=y.destroy;if(y=y.tag,S!==void 0)if(y&4)kc(l,d);else{y=l;try{S()}catch(C){di(y,C)}}d=d.next}while(d!==o)}break;case 1:if(Id(l),o=l.stateNode,typeof o.componentWillUnmount=="function")try{o.props=l.memoizedProps,o.state=l.memoizedState,o.componentWillUnmount()}catch(C){di(l,C)}break;case 5:Id(l);break;case 4:qe?Fd(o,l):st&&st&&(l=l.stateNode.containerInfo,o=Pr(l),Ps(l,o))}}function It(o,l){for(var d=l;;)if(us(o,d),d.child===null||qe&&d.tag===4){if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}else d.child.return=d,d=d.child}function va(o){o.alternate=null,o.child=null,o.dependencies=null,o.firstEffect=null,o.lastEffect=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.return=null,o.updateQueue=null}function Lv(o){return o.tag===5||o.tag===3||o.tag===4}function Ud(o){if(qe){e:{for(var l=o.return;l!==null;){if(Lv(l))break e;l=l.return}throw Error(p(160))}var d=l;switch(l=d.stateNode,d.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(p(161))}d.flags&16&&(Ct(l),d.flags&=-17);e:t:for(d=o;;){for(;d.sibling===null;){if(d.return===null||Lv(d.return)){d=null;break e}d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue t;d.child.return=d,d=d.child}if(!(d.flags&2)){d=d.stateNode;break e}}y?ma(o,d,l):So(o,d,l)}}function ma(o,l,d){var y=o.tag,S=y===5||y===6;if(S)o=S?o.stateNode:o.stateNode.instance,l?Ae(d,o,l):be(d,o);else if(y!==4&&(o=o.child,o!==null))for(ma(o,l,d),o=o.sibling;o!==null;)ma(o,l,d),o=o.sibling}function So(o,l,d){var y=o.tag,S=y===5||y===6;if(S)o=S?o.stateNode:o.stateNode.instance,l?De(d,o,l):he(d,o);else if(y!==4&&(o=o.child,o!==null))for(So(o,l,d),o=o.sibling;o!==null;)So(o,l,d),o=o.sibling}function Fd(o,l){for(var d=l,y=!1,S,C;;){if(!y){y=d.return;e:for(;;){if(y===null)throw Error(p(160));switch(S=y.stateNode,y.tag){case 5:C=!1;break e;case 3:S=S.containerInfo,C=!0;break e;case 4:S=S.containerInfo,C=!0;break e}y=y.return}y=!0}if(d.tag===5||d.tag===6)It(o,d),C?Je(S,d.stateNode):Ne(S,d.stateNode);else if(d.tag===4){if(d.child!==null){S=d.stateNode.containerInfo,C=!0,d.child.return=d,d=d.child;continue}}else if(us(o,d),d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return,d.tag===4&&(y=!1)}d.sibling.return=d.return,d=d.sibling}}function Kl(o,l){if(qe){switch(l.tag){case 0:case 11:case 14:case 15:case 22:ls(3,l);return;case 1:return;case 5:var d=l.stateNode;if(d!=null){var y=l.memoizedProps;o=o!==null?o.memoizedProps:y;var S=l.type,C=l.updateQueue;l.updateQueue=null,C!==null&&ne(d,C,S,o,y,l)}return;case 6:if(l.stateNode===null)throw Error(p(162));d=l.memoizedProps,Ve(l.stateNode,o!==null?o.memoizedProps:d,d);return;case 3:wt&&(l=l.stateNode,l.hydrate&&(l.hydrate=!1,Ht(l.containerInfo)));return;case 12:return;case 13:Bd(l),Zl(l);return;case 19:Zl(l);return;case 17:return;case 23:case 24:Yn(l,l.memoizedState!==null);return}throw Error(p(163))}switch(l.tag){case 0:case 11:case 14:case 15:case 22:ls(3,l);return;case 12:return;case 13:Bd(l),Zl(l);return;case 19:Zl(l);return;case 3:wt&&(d=l.stateNode,d.hydrate&&(d.hydrate=!1,Ht(d.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,Ps(l.containerInfo,l.pendingChildren);break e}throw Error(p(163))}}function Bd(o){o.memoizedState!==null&&(Ta=Fn(),qe&&Yn(o.child,!0))}function Zl(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new Mv),l.forEach(function(y){var S=lu.bind(null,o,y);d.has(y)||(d.add(y),y.then(S,S))})}}function Dv(o,l){return o!==null&&(o=o.memoizedState,o===null||o.dehydrated!==null)?(l=l.memoizedState,l!==null&&l.dehydrated===null):!1}var ga=0,Jl=1,eu=2,ya=3,tu=4;if(typeof Symbol=="function"&&Symbol.for){var ba=Symbol.for;ga=ba("selector.component"),Jl=ba("selector.has_pseudo_class"),eu=ba("selector.role"),ya=ba("selector.test_id"),tu=ba("selector.text")}function Oc(o){var l=vn(o);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(p(364));return l}if(o=Ft(o),o===null)throw Error(p(362));return o.stateNode.current}function Ac(o,l){switch(l.$$typeof){case ga:if(o.type===l.value)return!0;break;case Jl:e:{l=l.value,o=[o,0];for(var d=0;d<o.length;){var y=o[d++],S=o[d++],C=l[S];if(y.tag!==5||!oe(y)){for(;C!=null&&Ac(y,C);)S++,C=l[S];if(S===l.length){l=!0;break e}else for(y=y.child;y!==null;)o.push(y,S),y=y.sibling}}l=!1}return l;case eu:if(o.tag===5&&X(o.stateNode,l.value))return!0;break;case tu:if((o.tag===5||o.tag===6)&&(o=Le(o),o!==null&&0<=o.indexOf(l.value)))return!0;break;case ya:if(o.tag===5&&(o=o.memoizedProps["data-testname"],typeof o=="string"&&o.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(p(365,l))}return!1}function Sa(o){switch(o.$$typeof){case ga:return"<"+(we(o.value)||"Unknown")+">";case Jl:return":has("+(Sa(o)||"")+")";case eu:return'[role="'+o.value+'"]';case tu:return'"'+o.value+'"';case ya:return'[data-testname="'+o.value+'"]';default:throw Error(p(365,o))}}function Mc(o,l){var d=[];o=[o,0];for(var y=0;y<o.length;){var S=o[y++],C=o[y++],_=l[C];if(S.tag!==5||!oe(S)){for(;_!=null&&Ac(S,_);)C++,_=l[C];if(C===l.length)d.push(S);else for(S=S.child;S!==null;)o.push(S,C),S=S.sibling}}return d}function Pc(o,l){if(!et)throw Error(p(363));o=Oc(o),o=Mc(o,l),l=[],o=Array.from(o);for(var d=0;d<o.length;){var y=o[d++];if(y.tag===5)oe(y)||l.push(y.stateNode);else for(y=y.child;y!==null;)o.push(y),y=y.sibling}return l}var xa=null;function Lc(o){if(xa===null)try{var l=("require"+Math.random()).slice(0,7);xa=(t&&t[l]).call(t,"timers").setImmediate}catch{xa=function(y){var S=new MessageChannel;S.port1.onmessage=y,S.port2.postMessage(void 0)}}return xa(o)}var kv=Math.ceil,Us=g.ReactCurrentDispatcher,nu=g.ReactCurrentOwner,ru=g.IsSomeRendererActing,ct=0,er=null,Pn=null,Gt=0,Nr=0,Kr=Vr(0),Bn=0,wa=null,cs=0,Ea=0,xo=0,li=0,wo=null,Ta=0,iu=1/0;function hn(){iu=Fn()+500}var Ye=null,Ca=!1,ui=null,Qn=null,fs=!1,Eo=null,tr=90,su=[],an=[],Vt=null,Hn=0,Bi=null,nr=-1,Hi=0,ou=0,Ra=null,Oa=!1;function Tr(){return ct&48?Fn():nr!==-1?nr:nr=Fn()}function zn(o){if(o=o.mode,!(o&2))return 1;if(!(o&4))return co()===99?1:2;if(Hi===0&&(Hi=cs),Tv.transition!==0){ou!==0&&(ou=wo!==null?wo.pendingLanes:0),o=Hi;var l=4186112&~ou;return l&=-l,l===0&&(o=4186112&~o,l=o&-o,l===0&&(l=8192)),l}return o=co(),ct&4&&o===98?o=wl(12,Hi):(o=mv(o),o=wl(o,Hi)),o}function Vi(o,l,d){if(50<Hn)throw Hn=0,Bi=null,Error(p(185));if(o=Fs(o,l),o===null)return null;El(o,l,d),o===er&&(xo|=l,Bn===4&&Bs(o,Gt));var y=co();l===1?ct&8&&!(ct&48)?rr(o):(zr(o,d),ct===0&&(hn(),$r())):(!(ct&4)||y!==98&&y!==99||(Vt===null?Vt=new Set([o]):Vt.add(o)),zr(o,d)),wo=o}function Fs(o,l){o.lanes|=l;var d=o.alternate;for(d!==null&&(d.lanes|=l),d=o,o=o.return;o!==null;)o.childLanes|=l,d=o.alternate,d!==null&&(d.childLanes|=l),d=o,o=o.return;return d.tag===3?d.stateNode:null}function zr(o,l){for(var d=o.callbackNode,y=o.suspendedLanes,S=o.pingedLanes,C=o.expirationTimes,_=o.pendingLanes;0<_;){var H=31-ts(_),ce=1<<H,ze=C[H];if(ze===-1){if(!(ce&y)||ce&S){ze=l,ii(ce);var rt=sn;C[H]=10<=rt?ze+250:6<=rt?ze+5e3:-1}}else ze<=l&&(o.expiredLanes|=ce);_&=~ce}if(y=Go(o,o===er?Gt:0),l=sn,y===0)d!==null&&(d!==Tl&&ac(d),o.callbackNode=null,o.callbackPriority=0);else{if(d!==null){if(o.callbackPriority===l)return;d!==Tl&&ac(d)}l===15?(d=rr.bind(null,o),Di===null?(Di=[d],Cl=oc(Ko,Ad)):Di.push(d),d=Tl):l===14?d=fo(99,rr.bind(null,o)):(d=gv(l),d=fo(d,Dc.bind(null,o))),o.callbackPriority=l,o.callbackNode=d}}function Dc(o){if(nr=-1,ou=Hi=0,ct&48)throw Error(p(327));var l=o.callbackNode;if(hr()&&o.callbackNode!==l)return null;var d=Go(o,o===er?Gt:0);if(d===0)return null;var y=d,S=ct;ct|=16;var C=Zr();(er!==o||Gt!==y)&&(hn(),dr(o,y));do try{Ma();break}catch(H){Wd(o,H)}while(!0);if(Pl(),Us.current=C,ct=S,Pn!==null?y=0:(er=null,Gt=0,y=Bn),cs&xo)dr(o,0);else if(y!==0){if(y===2&&(ct|=64,o.hydrate&&(o.hydrate=!1,Bt(o.containerInfo)),d=Ed(o),d!==0&&(y=Aa(o,d))),y===1)throw l=wa,dr(o,0),Bs(o,d),zr(o,Fn()),l;switch(o.finishedWork=o.current.alternate,o.finishedLanes=d,y){case 0:case 1:throw Error(p(345));case 2:ci(o);break;case 3:if(Bs(o,d),(d&62914560)===d&&(y=Ta+500-Fn(),10<y)){if(Go(o,0)!==0)break;if(S=o.suspendedLanes,(S&d)!==d){Tr(),o.pingedLanes|=o.suspendedLanes&S;break}o.timeoutHandle=Pt(ci.bind(null,o),y);break}ci(o);break;case 4:if(Bs(o,d),(d&4186112)===d)break;for(y=o.eventTimes,S=-1;0<d;){var _=31-ts(d);C=1<<_,_=y[_],_>S&&(S=_),d&=~C}if(d=S,d=Fn()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*kv(d/1960))-d,10<d){o.timeoutHandle=Pt(ci.bind(null,o),d);break}ci(o);break;case 5:ci(o);break;default:throw Error(p(329))}}return zr(o,Fn()),o.callbackNode===l?Dc.bind(null,o):null}function Bs(o,l){for(l&=~li,l&=~xo,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var d=31-ts(l),y=1<<d;o[d]=-1,l&=~y}}function rr(o){if(ct&48)throw Error(p(327));if(hr(),o===er&&o.expiredLanes&Gt){var l=Gt,d=Aa(o,l);cs&xo&&(l=Go(o,l),d=Aa(o,l))}else l=Go(o,0),d=Aa(o,l);if(o.tag!==0&&d===2&&(ct|=64,o.hydrate&&(o.hydrate=!1,Bt(o.containerInfo)),l=Ed(o),l!==0&&(d=Aa(o,l))),d===1)throw d=wa,dr(o,0),Bs(o,l),zr(o,Fn()),d;return o.finishedWork=o.current.alternate,o.finishedLanes=l,ci(o),zr(o,Fn()),null}function To(){if(Vt!==null){var o=Vt;Vt=null,o.forEach(function(l){l.expiredLanes|=24&l.pendingLanes,zr(l,Fn())})}$r()}function Hd(o,l){var d=ct;ct|=1;try{return o(l)}finally{ct=d,ct===0&&(hn(),$r())}}function Vd(o,l){var d=ct;if(d&48)return o(l);ct|=1;try{if(o)return ki(99,o.bind(null,l))}finally{ct=d,$r()}}function Gn(o,l){Sn(Kr,Nr),Nr|=l,cs|=l}function Ln(){Nr=Kr.current,Ot(Kr)}function dr(o,l){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==ht&&(o.timeoutHandle=ht,St(d)),Pn!==null)for(d=Pn.return;d!==null;){var y=d;switch(y.tag){case 1:y=y.type.childContextTypes,y!=null&&Sl();break;case 3:lr(),Ot(Xn),Ot(xn),Ul();break;case 5:is(y);break;case 4:lr();break;case 13:Ot(yn);break;case 19:Ot(yn);break;case 10:Ll(y);break;case 23:case 24:Ln()}d=d.return}er=o,Pn=tn(o.current,null),Gt=Nr=cs=l,Bn=0,wa=null,li=xo=Ea=0}function Wd(o,l){do{var d=Pn;try{if(Pl(),vo.current=zt,Fl){for(var y=on.memoizedState;y!==null;){var S=y.queue;S!==null&&(S.pending=null),y=y.next}Fl=!1}if(xr=0,qn=Zn=on=null,ra=!1,nu.current=null,d===null||d.return===null){Bn=1,wa=l,Pn=null;break}e:{var C=o,_=d.return,H=d,ce=l;if(l=Gt,H.flags|=2048,H.firstEffect=H.lastEffect=null,ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var ze=ce;if(!(H.mode&2)){var rt=H.alternate;rt?(H.updateQueue=rt.updateQueue,H.memoizedState=rt.memoizedState,H.lanes=rt.lanes):(H.updateQueue=null,H.memoizedState=null)}var mt=(yn.current&1)!==0,We=_;do{var Yt;if(Yt=We.tag===13){var ln=We.memoizedState;if(ln!==null)Yt=ln.dehydrated!==null;else{var jr=We.memoizedProps;Yt=jr.fallback===void 0?!1:jr.unstable_avoidThisFallback!==!0?!0:!mt}}if(Yt){var te=We.updateQueue;if(te===null){var q=new Set;q.add(ze),We.updateQueue=q}else te.add(ze);if(!(We.mode&2)){if(We.flags|=64,H.flags|=16384,H.flags&=-2981,H.tag===1)if(H.alternate===null)H.tag=17;else{var fe=Si(-1,1);fe.tag=2,xi(H,fe)}H.lanes|=1;break e}ce=void 0,H=l;var He=C.pingCache;if(He===null?(He=C.pingCache=new Av,ce=new Set,He.set(ze,ce)):(ce=He.get(ze),ce===void 0&&(ce=new Set,He.set(ze,ce))),!ce.has(H)){ce.add(H);var ot=ka.bind(null,C,ze,H);ze.then(ot,ot)}We.flags|=4096,We.lanes=l;break e}We=We.return}while(We!==null);ce=Error((we(H.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
208
|
+
|
|
209
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Bn!==5&&(Bn=2),ce=Rc(ce,H),We=_;do{switch(We.tag){case 3:C=ce,We.flags|=4096,l&=-l,We.lanes|=l;var Qt=_d(We,C,l);zi(We,Qt);break e;case 1:C=ce;var gt=We.type,Ut=We.stateNode;if(!(We.flags&64)&&(typeof gt.getDerivedStateFromError=="function"||Ut!==null&&typeof Ut.componentDidCatch=="function"&&(Qn===null||!Qn.has(Ut)))){We.flags|=4096,l&=-l,We.lanes|=l;var Dn=jd(We,C,l);zi(We,Dn);break e}}We=We.return}while(We!==null)}Ro(d)}catch(At){l=At,Pn===d&&d!==null&&(Pn=d=d.return);continue}break}while(!0)}function Zr(){var o=Us.current;return Us.current=zt,o===null?zt:o}function Aa(o,l){var d=ct;ct|=16;var y=Zr();er===o&&Gt===l||dr(o,l);do try{Hs();break}catch(S){Wd(o,S)}while(!0);if(Pl(),ct=d,Us.current=y,Pn!==null)throw Error(p(261));return er=null,Gt=0,Bn}function Hs(){for(;Pn!==null;)Co(Pn)}function Ma(){for(;Pn!==null&&!xv();)Co(Pn)}function Co(o){var l=Vs(o.alternate,o,Nr);o.memoizedProps=o.pendingProps,l===null?Ro(o):Pn=l,nu.current=null}function Ro(o){var l=o;do{var d=l.alternate;if(o=l.return,l.flags&2048){if(d=zd(l),d!==null){d.flags&=2047,Pn=d;return}o!==null&&(o.firstEffect=o.lastEffect=null,o.flags|=2048)}else{if(d=Nd(d,l,Nr),d!==null){Pn=d;return}if(d=l,d.tag!==24&&d.tag!==23||d.memoizedState===null||Nr&1073741824||!(d.mode&4)){for(var y=0,S=d.child;S!==null;)y|=S.lanes|S.childLanes,S=S.sibling;d.childLanes=y}o!==null&&!(o.flags&2048)&&(o.firstEffect===null&&(o.firstEffect=l.firstEffect),l.lastEffect!==null&&(o.lastEffect!==null&&(o.lastEffect.nextEffect=l.firstEffect),o.lastEffect=l.lastEffect),1<l.flags&&(o.lastEffect!==null?o.lastEffect.nextEffect=l:o.firstEffect=l,o.lastEffect=l))}if(l=l.sibling,l!==null){Pn=l;return}Pn=l=o}while(l!==null);Bn===0&&(Bn=5)}function ci(o){var l=co();return ki(99,Pa.bind(null,o,l)),null}function Pa(o,l){do hr();while(Eo!==null);if(ct&48)throw Error(p(327));var d=o.finishedWork;if(d===null)return null;if(o.finishedWork=null,o.finishedLanes=0,d===o.current)throw Error(p(177));o.callbackNode=null;var y=d.lanes|d.childLanes,S=y,C=o.pendingLanes&~S;o.pendingLanes=S,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=S,o.mutableReadLanes&=S,o.entangledLanes&=S,S=o.entanglements;for(var _=o.eventTimes,H=o.expirationTimes;0<C;){var ce=31-ts(C),ze=1<<ce;S[ce]=0,_[ce]=-1,H[ce]=-1,C&=~ze}if(Vt!==null&&!(y&24)&&Vt.has(o)&&Vt.delete(o),o===er&&(Pn=er=null,Gt=0),1<d.flags?d.lastEffect!==null?(d.lastEffect.nextEffect=d,y=d.firstEffect):y=d:y=d.firstEffect,y!==null){S=ct,ct|=32,nu.current=null,Ra=Re(o.containerInfo),Oa=!1,Ye=y;do try{La()}catch(q){if(Ye===null)throw Error(p(330));di(Ye,q),Ye=Ye.nextEffect}while(Ye!==null);Ra=null,Ye=y;do try{for(_=o;Ye!==null;){var rt=Ye.flags;if(rt&16&&qe&&Ct(Ye.stateNode),rt&128){var mt=Ye.alternate;if(mt!==null){var We=mt.ref;We!==null&&(typeof We=="function"?We(null):We.current=null)}}switch(rt&1038){case 2:Ud(Ye),Ye.flags&=-3;break;case 6:Ud(Ye),Ye.flags&=-3,Kl(Ye.alternate,Ye);break;case 1024:Ye.flags&=-1025;break;case 1028:Ye.flags&=-1025,Kl(Ye.alternate,Ye);break;case 4:Kl(Ye.alternate,Ye);break;case 8:H=_,C=Ye,qe?Fd(H,C):It(H,C);var Yt=C.alternate;va(C),Yt!==null&&va(Yt)}Ye=Ye.nextEffect}}catch(q){if(Ye===null)throw Error(p(330));di(Ye,q),Ye=Ye.nextEffect}while(Ye!==null);Oa&&Me(),Ie(o.containerInfo),o.current=d,Ye=y;do try{for(rt=o;Ye!==null;){var ln=Ye.flags;if(ln&36&&Pv(rt,Ye.alternate,Ye),ln&128){mt=void 0;var jr=Ye.ref;if(jr!==null){var te=Ye.stateNode;switch(Ye.tag){case 5:mt=it(te);break;default:mt=te}typeof jr=="function"?jr(mt):jr.current=mt}}Ye=Ye.nextEffect}}catch(q){if(Ye===null)throw Error(p(330));di(Ye,q),Ye=Ye.nextEffect}while(Ye!==null);Ye=null,Ev(),ct=S}else o.current=d;if(fs)fs=!1,Eo=o,tr=l;else for(Ye=y;Ye!==null;)l=Ye.nextEffect,Ye.nextEffect=null,Ye.flags&8&&(ln=Ye,ln.sibling=null,ln.stateNode=null),Ye=l;if(y=o.pendingLanes,y===0&&(Qn=null),y===1?o===Bi?Hn++:(Hn=0,Bi=o):Hn=0,d=d.stateNode,Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(ic,d,void 0,(d.current.flags&64)===64)}catch{}if(zr(o,Fn()),Ca)throw Ca=!1,o=ui,ui=null,o;return ct&8||$r(),null}function La(){for(;Ye!==null;){var o=Ye.alternate;Oa||Ra===null||(Ye.flags&8?Oe(Ye,Ra)&&(Oa=!0,Z()):Ye.tag===13&&Dv(o,Ye)&&Oe(Ye,Ra)&&(Oa=!0,Z()));var l=Ye.flags;l&256&&fr(o,Ye),!(l&512)||fs||(fs=!0,fo(97,function(){return hr(),null})),Ye=Ye.nextEffect}}function hr(){if(tr!==90){var o=97<tr?97:tr;return tr=90,ki(o,fi)}return!1}function au(o,l){su.push(l,o),fs||(fs=!0,fo(97,function(){return hr(),null}))}function kc(o,l){an.push(l,o),fs||(fs=!0,fo(97,function(){return hr(),null}))}function fi(){if(Eo===null)return!1;var o=Eo;if(Eo=null,ct&48)throw Error(p(331));var l=ct;ct|=32;var d=an;an=[];for(var y=0;y<d.length;y+=2){var S=d[y],C=d[y+1],_=S.destroy;if(S.destroy=void 0,typeof _=="function")try{_()}catch(ce){if(C===null)throw Error(p(330));di(C,ce)}}for(d=su,su=[],y=0;y<d.length;y+=2){S=d[y],C=d[y+1];try{var H=S.create;S.destroy=H()}catch(ce){if(C===null)throw Error(p(330));di(C,ce)}}for(H=o.current.firstEffect;H!==null;)o=H.nextEffect,H.nextEffect=null,H.flags&8&&(H.sibling=null,H.stateNode=null),H=o;return ct=l,$r(),!0}function Da(o,l,d){l=Rc(d,l),l=_d(o,l,1),xi(o,l),l=Tr(),o=Fs(o,1),o!==null&&(El(o,1,l),zr(o,l))}function di(o,l){if(o.tag===3)Da(o,o,l);else for(var d=o.return;d!==null;){if(d.tag===3){Da(d,o,l);break}else if(d.tag===1){var y=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Qn===null||!Qn.has(y))){o=Rc(l,o);var S=jd(d,o,1);if(xi(d,S),S=Tr(),d=Fs(d,1),d!==null)El(d,1,S),zr(d,S);else if(typeof y.componentDidCatch=="function"&&(Qn===null||!Qn.has(y)))try{y.componentDidCatch(l,o)}catch{}break}}d=d.return}}function ka(o,l,d){var y=o.pingCache;y!==null&&y.delete(l),l=Tr(),o.pingedLanes|=o.suspendedLanes&d,er===o&&(Gt&d)===d&&(Bn===4||Bn===3&&(Gt&62914560)===Gt&&500>Fn()-Ta?dr(o,0):li|=d),zr(o,l)}function lu(o,l){var d=o.stateNode;d!==null&&d.delete(l),l=0,l===0&&(l=o.mode,l&2?l&4?(Hi===0&&(Hi=cs),l=uo(62914560&~Hi),l===0&&(l=4194304)):l=co()===99?1:2:l=1),d=Tr(),o=Fs(o,l),o!==null&&(El(o,l,d),zr(o,d))}var Vs;Vs=function(o,l,d){var y=l.lanes;if(o!==null)if(o.memoizedProps!==l.pendingProps||Xn.current)Xr=!0;else if(d&y)Xr=!!(o.flags&16384);else{switch(Xr=!1,l.tag){case 3:Ql(l),vc();break;case 5:_l(l);break;case 1:dn(l.type)&&Qo(l);break;case 4:ai(l,l.stateNode.containerInfo);break;case 10:dc(l,l.memoizedProps.value);break;case 13:if(l.memoizedState!==null)return d&l.child.childLanes?bn(o,l,d):(Sn(yn,yn.current&1),l=Fi(o,l,d),l!==null?l.sibling:null);Sn(yn,yn.current&1);break;case 19:if(y=(d&l.childLanes)!==0,o.flags&64){if(y)return kd(o,l,d);l.flags|=64}var S=l.memoizedState;if(S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),Sn(yn,yn.current),y)break;return null;case 23:case 24:return l.lanes=0,yo(o,l,d)}return Fi(o,l,d)}else Xr=!1;switch(l.lanes=0,l.tag){case 2:if(y=l.type,o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2),o=l.pendingProps,S=yi(l,xn.current),Ls(l,d),S=Bl(null,l,y,o,S,d),l.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0){if(l.tag=1,l.memoizedState=null,l.updateQueue=null,dn(y)){var C=!0;Qo(l)}else C=!1;l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,Yr(l);var _=y.getDerivedStateFromProps;typeof _=="function"&&ho(l,y,_,o),S.updater=Dl,l.stateNode=S,S._reactInternals=l,Nl(l,y,o,d),l=Yl(null,l,y,!0,C,d)}else l.tag=0,cr(null,l,S,d),l=l.child;return l;case 16:S=l.elementType;e:{switch(o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2),o=l.pendingProps,C=S._init,S=C(S._payload),l.type=S,C=l.tag=Ao(S),o=si(S,o),C){case 0:l=fa(null,l,S,o,d);break e;case 1:l=xc(null,l,S,o,d);break e;case 11:l=ql(null,l,S,o,d);break e;case 14:l=Sc(null,l,S,si(S.type,o),y,d);break e}throw Error(p(306,S,""))}return l;case 0:return y=l.type,S=l.pendingProps,S=l.elementType===y?S:si(y,S),fa(o,l,y,S,d);case 1:return y=l.type,S=l.pendingProps,S=l.elementType===y?S:si(y,S),xc(o,l,y,S,d);case 3:if(Ql(l),y=l.updateQueue,o===null||y===null)throw Error(p(282));if(y=l.pendingProps,S=l.memoizedState,S=S!==null?S.element:null,oi(o,l),Ds(l,y,null,d),y=l.memoizedState.element,y===S)vc(),l=Fi(o,l,d);else{if(S=l.stateNode,(C=S.hydrate)&&(wt?(Kn=xe(l.stateNode.containerInfo),Gr=l,C=Dr=!0):C=!1),C){if(wt&&(o=S.mutableSourceEagerHydrationData,o!=null))for(S=0;S<o.length;S+=2)C=o[S],_=o[S+1],ke?C._workInProgressVersionPrimary=_:C._workInProgressVersionSecondary=_,Ns.push(C);for(d=wi(l,null,y,d),l.child=d;d;)d.flags=d.flags&-3|1024,d=d.sibling}else cr(o,l,y,d),vc();l=l.child}return l;case 5:return _l(l),o===null&&Il(l),y=l.type,S=l.pendingProps,C=o!==null?o.memoizedProps:null,_=S.children,yt(y,S)?_=null:C!==null&&yt(y,C)&&(l.flags|=16),Is(o,l),cr(o,l,_,d),l.child;case 6:return o===null&&Il(l),null;case 13:return bn(o,l,d);case 4:return ai(l,l.stateNode.containerInfo),y=l.pendingProps,o===null?l.child=ks(l,null,y,d):cr(o,l,y,d),l.child;case 11:return y=l.type,S=l.pendingProps,S=l.elementType===y?S:si(y,S),ql(o,l,y,S,d);case 7:return cr(o,l,l.pendingProps,d),l.child;case 8:return cr(o,l,l.pendingProps.children,d),l.child;case 12:return cr(o,l,l.pendingProps.children,d),l.child;case 10:e:{if(y=l.type._context,S=l.pendingProps,_=l.memoizedProps,C=S.value,dc(l,C),_!==null){var H=_.value;if(C=qr(H,C)?0:(typeof y._calculateChangedBits=="function"?y._calculateChangedBits(H,C):1073741823)|0,C===0){if(_.children===S.children&&!Xn.current){l=Fi(o,l,d);break e}}else for(H=l.child,H!==null&&(H.return=l);H!==null;){var ce=H.dependencies;if(ce!==null){_=H.child;for(var ze=ce.firstContext;ze!==null;){if(ze.context===y&&ze.observedBits&C){H.tag===1&&(ze=Si(-1,d&-d),ze.tag=2,xi(H,ze)),H.lanes|=d,ze=H.alternate,ze!==null&&(ze.lanes|=d),hc(H.return,d),ce.lanes|=d;break}ze=ze.next}}else _=H.tag===10&&H.type===l.type?null:H.child;if(_!==null)_.return=H;else for(_=H;_!==null;){if(_===l){_=null;break}if(H=_.sibling,H!==null){H.return=_.return,_=H;break}_=_.return}H=_}}cr(o,l,S.children,d),l=l.child}return l;case 9:return S=l.type,C=l.pendingProps,y=C.children,Ls(l,d),S=Lr(S,C.unstable_observedBits),y=y(S),l.flags|=1,cr(o,l,y,d),l.child;case 14:return S=l.type,C=si(S,l.pendingProps),C=si(S.type,C),Sc(o,l,S,C,y,d);case 15:return js(o,l,l.type,l.pendingProps,y,d);case 17:return y=l.type,S=l.pendingProps,S=l.elementType===y?S:si(y,S),o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2),l.tag=1,dn(y)?(o=!0,Qo(l)):o=!1,Ls(l,d),Pd(l,y,S),Nl(l,y,S,d),Yl(null,l,y,!0,o,d);case 19:return kd(o,l,d);case 23:return yo(o,l,d);case 24:return yo(o,l,d)}throw Error(p(156,l.tag))};var Ws={current:!1},Oo=f.unstable_flushAllWithoutAsserting,Na=typeof Oo=="function";function uu(){if(Oo!==void 0)return Oo();for(var o=!1;hr();)o=!0;return o}function Nc(o){try{uu(),Lc(function(){uu()?Nc(o):o()})}catch(l){o(l)}}var za=0,cu=!1;function Nv(o,l,d,y){this.tag=o,this.key=d,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 _r(o,l,d,y){return new Nv(o,l,d,y)}function zc(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Ao(o){if(typeof o=="function")return zc(o)?1:0;if(o!=null){if(o=o.$$typeof,o===P)return 11;if(o===F)return 14}return 2}function tn(o,l){var d=o.alternate;return d===null?(d=_r(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null),d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d}function _a(o,l,d,y,S,C){var _=2;if(y=o,typeof o=="function")zc(o)&&(_=1);else if(typeof o=="string")_=5;else e:switch(o){case w:return $s(d.children,S,C,l);case j:_=8,S|=16;break;case R:_=8,S|=1;break;case D:return o=_r(12,d,l,S|8),o.elementType=D,o.type=D,o.lanes=C,o;case L:return o=_r(13,d,l,S),o.type=L,o.elementType=L,o.lanes=C,o;case M:return o=_r(19,d,l,S),o.elementType=M,o.lanes=C,o;case K:return Mo(d,S,C,l);case ee:return o=_r(24,d,l,S),o.elementType=ee,o.lanes=C,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case A:_=10;break e;case z:_=9;break e;case P:_=11;break e;case F:_=14;break e;case $:_=16,y=null;break e;case Q:_=22;break e}throw Error(p(130,o==null?o:typeof o,""))}return l=_r(_,d,l,S),l.elementType=o,l.type=y,l.lanes=C,l}function $s(o,l,d,y){return o=_r(7,o,y,l),o.lanes=d,o}function Mo(o,l,d,y){return o=_r(23,o,y,l),o.elementType=K,o.lanes=d,o}function ja(o,l,d){return o=_r(6,o,null,l),o.lanes=d,o}function Po(o,l,d){return l=_r(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function _c(o,l,d){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ht,this.pendingContext=this.context=null,this.hydrate=d,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=sc(0),this.expirationTimes=sc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sc(0),wt&&(this.mutableSourceEagerHydrationData=null)}function Ia(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(p(188)):Error(p(268,Object.keys(o)));return o=Be(l),o===null?null:o.stateNode}function fu(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function Ua(o,l){fu(o,l),(o=o.alternate)&&fu(o,l)}function ds(o){return o=Be(o),o===null?null:o.stateNode}function hs(){return null}return i.IsThisRendererActing=Ws,i.act=function(o){function l(){za--,ru.current=d,Ws.current=y}cu===!1&&(cu=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),za++;var d=ru.current,y=Ws.current;ru.current=!0,Ws.current=!0;try{var S=Hd(o)}catch(C){throw l(),C}if(S!==null&&typeof S=="object"&&typeof S.then=="function")return{then:function(C,_){S.then(function(){1<za||Na===!0&&d===!0?(l(),C()):Nc(function(H){l(),H?_(H):C()})},function(H){l(),_(H)})}};try{za!==1||Na!==!1&&d!==!1||uu(),l()}catch(C){throw l(),C}return{then:function(C){C()}}},i.attemptContinuousHydration=function(o){if(o.tag===13){var l=Tr();Vi(o,67108864,l),Ua(o,67108864)}},i.attemptHydrationAtCurrentPriority=function(o){if(o.tag===13){var l=Tr(),d=zn(o);Vi(o,d,l),Ua(o,d)}},i.attemptSynchronousHydration=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.hydrate){var d=ii(l.pendingLanes);l.expiredLanes|=d&l.pendingLanes,zr(l,Fn()),!(ct&48)&&(hn(),$r())}break;case 13:var y=Tr();Vd(function(){return Vi(o,1,y)}),Ua(o,4)}},i.attemptUserBlockingHydration=function(o){if(o.tag===13){var l=Tr();Vi(o,4,l),Ua(o,4)}},i.batchedEventUpdates=function(o,l){var d=ct;ct|=2;try{return o(l)}finally{ct=d,ct===0&&(hn(),$r())}},i.batchedUpdates=Hd,i.createComponentSelector=function(o){return{$$typeof:ga,value:o}},i.createContainer=function(o,l,d){return o=new _c(o,l,d),l=_r(3,null,null,l===2?7:l===1?3:0),o.current=l,l.stateNode=o,Yr(l),o},i.createHasPsuedoClassSelector=function(o){return{$$typeof:Jl,value:o}},i.createPortal=function(o,l,d){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:y==null?null:""+y,children:o,containerInfo:l,implementation:d}},i.createRoleSelector=function(o){return{$$typeof:eu,value:o}},i.createTestNameSelector=function(o){return{$$typeof:ya,value:o}},i.createTextSelector=function(o){return{$$typeof:tu,value:o}},i.deferredUpdates=function(o){return ki(97,o)},i.discreteUpdates=function(o,l,d,y,S){var C=ct;ct|=4;try{return ki(98,o.bind(null,l,d,y,S))}finally{ct=C,ct===0&&(hn(),$r())}},i.findAllNodes=Pc,i.findBoundingRects=function(o,l){if(!et)throw Error(p(363));l=Pc(o,l),o=[];for(var d=0;d<l.length;d++)o.push(mn(l[d]));for(l=o.length-1;0<l;l--){d=o[l];for(var y=d.x,S=y+d.width,C=d.y,_=C+d.height,H=l-1;0<=H;H--)if(l!==H){var ce=o[H],ze=ce.x,rt=ze+ce.width,mt=ce.y,We=mt+ce.height;if(y>=ze&&C>=mt&&S<=rt&&_<=We){o.splice(l,1);break}else if(y!==ze||d.width!==ce.width||We<C||mt>_){if(!(C!==mt||d.height!==ce.height||rt<y||ze>S)){ze>y&&(ce.width+=ze-y,ce.x=y),rt<S&&(ce.width=S-ze),o.splice(l,1);break}}else{mt>C&&(ce.height+=mt-C,ce.y=C),We<_&&(ce.height=_-mt),o.splice(l,1);break}}}return o},i.findHostInstance=Ia,i.findHostInstanceWithNoPortals=function(o){return o=vt(o),o===null?null:o.tag===20?o.stateNode.instance:o.stateNode},i.findHostInstanceWithWarning=function(o){return Ia(o)},i.flushControlled=function(o){var l=ct;ct|=1;try{ki(99,o)}finally{ct=l,ct===0&&(hn(),$r())}},i.flushDiscreteUpdates=function(){!(ct&49)&&(To(),hr())},i.flushPassiveEffects=hr,i.flushSync=Vd,i.focusWithin=function(o,l){if(!et)throw Error(p(363));for(o=Oc(o),l=Mc(o,l),l=Array.from(l),o=0;o<l.length;){var d=l[o++];if(!oe(d)){if(d.tag===5&&de(d.stateNode))return!0;for(d=d.child;d!==null;)l.push(d),d=d.sibling}}return!1},i.getCurrentUpdateLanePriority=function(){return xl},i.getFindAllNodesFailureDescription=function(o,l){if(!et)throw Error(p(363));var d=0,y=[];o=[Oc(o),0];for(var S=0;S<o.length;){var C=o[S++],_=o[S++],H=l[_];if((C.tag!==5||!oe(C))&&(Ac(C,H)&&(y.push(Sa(H)),_++,_>d&&(d=_)),_<l.length))for(C=C.child;C!==null;)o.push(C,_),C=C.sibling}if(d<l.length){for(o=[];d<l.length;d++)o.push(Sa(l[d]));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 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=Rn(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);/**
|
|
213
|
+
`)+o.join(" > ")}return null},i.getPublicRootInstance=function(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return it(o.child.stateNode);default:return o.child.stateNode}},i.injectIntoDevTools=function(o){if(o={bundleType:o.bundleType,version:o.version,rendererPackageName:o.rendererPackageName,rendererConfig:o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:g.ReactCurrentDispatcher,findHostInstanceByFiber:ds,findFiberByHostInstance:o.findFiberByHostInstance||hs,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")o=!1;else{var l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!l.isDisabled&&l.supportsFiber)try{ic=l.inject(o),Wr=l}catch{}o=!0}return o},i.observeVisibleRects=function(o,l,d,y){if(!et)throw Error(p(363));o=Pc(o,l);var S=le(o,d,y).disconnect;return{disconnect:function(){S()}}},i.registerMutableSourceForHydration=function(o,l){var d=l._getVersion;d=d(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,d]:o.mutableSourceEagerHydrationData.push(l,d)},i.runWithPriority=function(o,l){var d=xl;try{return xl=o,l()}finally{xl=d}},i.shouldSuspend=function(){return!1},i.unbatchedUpdates=function(o,l){var d=ct;ct&=-2,ct|=8;try{return o(l)}finally{ct=d,ct===0&&(hn(),$r())}},i.updateContainer=function(o,l,d,y){var S=l.current,C=Tr(),_=zn(S);e:if(d){d=d._reactInternals;t:{if(Ee(d)!==d||d.tag!==1)throw Error(p(170));var H=d;do{switch(H.tag){case 3:H=H.stateNode.context;break t;case 1:if(dn(H.type)){H=H.stateNode.__reactInternalMemoizedMergedChildContext;break t}}H=H.return}while(H!==null);throw Error(p(171))}if(d.tag===1){var ce=d.type;if(dn(ce)){d=xd(d,ce,H);break e}}d=H}else d=gi;return l.context===null?l.context=d:l.pendingContext=d,l=Si(C,_),l.payload={element:o},y=y===void 0?null:y,y!==null&&(l.callback=y),xi(S,l),Vi(S,_,C),_},i}}(gf)),gf.exports}process.env.NODE_ENV==="production"?Zh.exports=rw():Zh.exports=nw();var iw=Zh.exports;const sw=Qx(iw),yf=["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 ow(){return yf.reduce((t,e)=>(t[e]=[],t),{})}const rl=yf.reduce((t,e)=>(t[e.slice(2).toLowerCase()]=e,t[e]=e,t),{}),Ru=(t,e,n)=>{const i=t.length,a=n||lt(i);for(let c=0;c<i;c++)a[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 a};function lt(t,e,n){return new Float32Array(t,e,n)}const aw=(t,e,n)=>{const i=t[1]<=e[3]&&t[3]>=e[1]&&t[2]<=e[4]&&t[4]>=e[2],a=n||lt(5);return i?(a[0]=1,a[1]=Math.max(t[1],e[1]),a[2]=Math.max(t[2],e[2]),a[3]=Math.min(t[3],e[3]),a[4]=Math.min(t[4],e[4]),a):(a[0]=0,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a)},lw=t=>t.length/5,xs=(t,e,n)=>{const i=n||lt(9);return i[0]=t[0]*e[0]+t[1]*e[3]+t[2]*e[6],i[1]=t[0]*e[1]+t[1]*e[4]+t[2]*e[7],i[2]=t[0]*e[2]+t[1]*e[5]+t[2]*e[8],i[3]=t[3]*e[0]+t[4]*e[3]+t[5]*e[6],i[4]=t[3]*e[1]+t[4]*e[4]+t[5]*e[7],i[5]=t[3]*e[2]+t[4]*e[5]+t[5]*e[8],i[6]=t[6]*e[0]+t[7]*e[3]+t[8]*e[6],i[7]=t[6]*e[1]+t[7]*e[4]+t[8]*e[7],i[8]=t[6]*e[2]+t[7]*e[5]+t[8]*e[8],i};class kt{constructor(e){this.index=0,this.length=e,this.points=lt(this.length)}static grid(e=1,n=1){return new kt(5*e*n)}static point(e,n){const i=lt(5);return i[0]=1,i[1]=e,i[2]=n,i[3]=e,i[4]=n,i}static positionPair(e){const n=lt(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 kt.singleBox(e.width,e.height,e.x,e.y)}static singleBox(e,n,i=0,a=0){const c=lt(5);return c[0]=1,c[1]=i,c[2]=a,c[3]=e+i,c[4]=n+a,c}row(e){return e(this)}addPoints(e,n,i,a){return this.points[this.index]=1,this.points[1+this.index]=e,this.points[2+this.index]=n,this.points[3+this.index]=i,this.points[4+this.index]=a,this.index+=5,this}addBox(e,n,i,a){return this.addPoints(e,n,e+i,n+a),this}build(){return this.points}}const Gi=(t,e)=>{const n=t.length;for(let i=0;i<n;i++)t[i]=i%5===0?e[6]*t[i+1]+e[7]*t[i+2]+e[8]*t[i]:i%5%2===1?e[0]*t[i]+e[1]*t[i+1]+e[2]:e[3]*t[i-1]+e[4]*t[i]+e[5];return t},eo=t=>{const e=lt(9);return e[0]=t,e[4]=t,e[8]=1,e},Rr=(t,e)=>{const n=lt(9);return n[0]=1,n[2]=t,n[4]=1,n[5]=e,n[8]=1,n},Ou=(t,e,n)=>xs(Rr((1-t)*e,(1-t)*n),eo(t)),ws=(t,e,n)=>{const i=t.length,a=n&&n.length>=i?n.slice(0,i):lt(i);for(let c=0;c<i;c++)a[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 a};let bf=(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 Xi{constructor(){this.__revision=0,this.__owner={value:void 0},this.__state={},this.scale=1,this.layers=[],this.time=[],this.addEventListener=(e,n,i)=>{const a=rl[e];if(!this.eventHandlers[a])throw new Error(`Unknown event ${a}`);this.eventHandlers[a].indexOf(n)===-1&&this.eventHandlers[a].push(n)},this.removeEventListener=(e,n)=>{const i=rl[e];if(!this.eventHandlers[i]){console.warn(`Unknown event ${i}`);return}this.eventHandlers[i].indexOf(n)!==-1&&(this.eventHandlers[i]=this.eventHandlers[i].filter(a=>a!==n))},this.id=this.__id=bf(),this.eventHandlers=ow()}get crop(){return this._crop}set crop(e){this._crop=e}getObjectsAt(e){return[]}getAllPointsAt(e,n,i){return[]}getScheduledUpdates(e,n){return[]}dispatchEvent(e,n){const i=this.eventHandlers[e],a=i?i.length:0;let c=!1;if(a)for(let f=0;f<a;f++)try{i[f](n),c=!0}catch(p){console.error(e,p)}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){Gi(this.points,Rr(e,n))}atScale(e){Gi(this.points,Ou(e,this.x,this.y)),this.scale*=e}transform(e){Gi(this.points,e)}applyProps(e){this.__revision++}appendChild(e){}removeChild(e){}insertBefore(e,n){}hideInstance(){}}class Mi extends Xi{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:lt(5)},this.points=lt(5);else{const n=e.scale||1;this.id=e.id||e.uri,this.uri=e.uri,this.points=kt.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:kt.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,i=e.target.width/n;if(this.id=e.id||e.uri,this.uri=e.uri,this.points.set(kt.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 a=kt.singleBox(e.crop.width,e.crop.height,e.crop.x,e.crop.y);Gi(a,Rr(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(a):this.crop=lt(a)}e.display?(this.display.scale=i,this.display.width=e.display.width,this.display.height=e.display.height,this.display.rotation=e.display.rotation,this.display.points=kt.singleBox(e.display.width,e.display.height)):(this.display.scale=i,this.display.width=e.target.width/i,this.display.height=e.target.height/i,this.display.points=kt.singleBox(e.target.width/i,e.target.height/i))}getAllPointsAt(e,n,i){return[[this,this.crop||this.points,n]]}static fromSvg(e,n,i,a){return Mi.fromImage("data:image/svg+xml;base64,"+btoa(e),n,i,a)}static fromImage(e,n,i,a){const c=new Mi;return c.applyProps({uri:e,id:a,display:i,target:n}),c}getImageUrl(){return this.uri}}class rp extends Xi{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:lt(5)},this.points=lt(5);else{const n=e.scale||1;this.id=e.id||e.uri,this.uri=e.uri,this.points=kt.singleBox(e.width,e.height),this.display={x:0,y:0,scale:n,width:e.width/n,height:e.height/n,points:n!==1?kt.singleBox(e.width/n,e.height/n):this.points}}}applyProps(e){const n=e.display?e.display.width:e.target.width,i=e.target.width/n;this.id=e.id,this.points.set(kt.singleBox(e.target.width,e.target.height)),this.display.scale=i,this.display.width=e.target.width/i,this.display.height=e.target.height/i,this.getTexture=e.getTexture,this.display.points=i!==1?kt.singleBox(e.target.width/i,e.target.height/i):this.points}getAllPointsAt(e,n,i){return[[this,this.points,n]]}}function uw(t,e,n=1){const i=e.length;if(i===0)throw new Error("No resources passed in.");let a=0;for(let c=0;c<i&&!(!e[c]||!e[c].display);c++)a=Math.abs(e[c].display.scale-t)*n<Math.abs(e[a].display.scale-t)?c:a;return a}function _g(t,e){return Math.abs(t-e)}function Sf(t,e){const n=_g(t.x,e.x),i=_g(t.y,e.y);return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}function cw(t){const e=t.length;return t.indexOf("/info.json")===e-10?t.slice(0,-10):t}function jg(...t){return e=>t.forEach(n=>function(i,a){typeof i=="function"?i(a):i!=null&&(i.current=a)}(n,e))}function xf(...t){return ve.useCallback(jg(...t),t)}function mr(){return mr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},mr.apply(this,arguments)}const Ig=ve.forwardRef((t,e)=>{const{children:n,...i}=t;return ve.Children.toArray(n).some(Fg)?ve.createElement(ve.Fragment,null,ve.Children.map(n,a=>Fg(a)?ve.createElement(ip,mr({},i,{ref:e}),a.props.children):a)):ve.createElement(ip,mr({},i,{ref:e}),n)});Ig.displayName="Slot";const ip=ve.forwardRef((t,e)=>{const{children:n,...i}=t;return ve.isValidElement(n)?ve.cloneElement(n,{...fw(i,n.props),ref:jg(e,n.ref)}):ve.Children.count(n)>1?ve.Children.only(null):null});ip.displayName="SlotClone";const Ug=({children:t})=>ve.createElement(ve.Fragment,null,t);function Fg(t){return ve.isValidElement(t)&&t.type===Ug}function fw(t,e){const n={...e};for(const i in e){const a=t[i],c=e[i];/^on[A-Z]/.test(i)?n[i]=(...f)=>{c==null||c(...f),a==null||a(...f)}:i==="style"?n[i]={...a,...c}:i==="className"&&(n[i]=[a,c].filter(Boolean).join(" "))}return{...t,...n}}const wf=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{};var Ef=function(e,n,i,a){this.name=e,this.fn=n,this.args=i,this.modifiers=a};Ef.prototype._test=function(e){var n=this.fn;try{il(this.modifiers.slice(),n,this)(e)}catch{n=function(){return!1}}try{return il(this.modifiers.slice(),n,this)(e)}catch{return!1}},Ef.prototype._check=function(e){try{il(this.modifiers.slice(),this.fn,this)(e)}catch{if(il(this.modifiers.slice(),function(i){return i},this)(!1))return}if(!il(this.modifiers.slice(),this.fn,this)(e))throw null},Ef.prototype._testAsync=function(e){var n=this;return new Promise(function(i,a){Hg(n.modifiers.slice(),n.fn,n)(e).then(function(c){c?i(e):a(null)}).catch(function(c){return a(c)})})};function Bg(t,e){return e===void 0&&(e="simple"),typeof t=="object"?t[e]:t}function il(t,e,n){if(t.length){var i=t.shift(),a=il(t,e,n);return i.perform(a,n)}else return Bg(e)}function Hg(t,e,n){if(t.length){var i=t.shift(),a=Hg(t,e,n);return i.performAsync(a,n)}else return function(c){return Promise.resolve(Bg(e,"async")(c))}}var dw=function(e,n,i){this.name=e,this.perform=n,this.performAsync=i},sp=function(t){function e(n,i,a,c){for(var f=[],p=arguments.length-4;p-- >0;)f[p]=arguments[p+4];t.call(this,f),t.captureStackTrace&&t.captureStackTrace(this,e),this.rule=n,this.value=i,this.cause=a,this.target=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Ki=function(e,n){e===void 0&&(e=[]),n===void 0&&(n=[]),this.chain=e,this.nextRuleModifiers=n};Ki.prototype._applyRule=function(e,n){var i=this;return function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];return i.chain.push(new Ef(n,e.apply(i,a),a,i.nextRuleModifiers)),i.nextRuleModifiers=[],i}},Ki.prototype._applyModifier=function(e,n){return this.nextRuleModifiers.push(new dw(n,e.simple,e.async)),this},Ki.prototype._clone=function(){return new Ki(this.chain.slice(),this.nextRuleModifiers.slice())},Ki.prototype.test=function(e){return this.chain.every(function(n){return n._test(e)})},Ki.prototype.testAll=function(e){var n=[];return this.chain.forEach(function(i){try{i._check(e)}catch(a){n.push(new sp(i,e,a))}}),n},Ki.prototype.check=function(e){this.chain.forEach(function(n){try{n._check(e)}catch(i){throw new sp(n,e,i)}})},Ki.prototype.testAsync=function(e){var n=this;return new Promise(function(i,a){Vg(e,n.chain.slice(),i,a)})};function Vg(t,e,n,i){if(e.length){var a=e.shift();a._testAsync(t).then(function(){Vg(t,e,n,i)},function(c){i(new sp(a,t,c))})}else n(t)}var Wg=function(t,e){return e&&typeof t=="string"&&t.trim().length===0?!0:t==null};function hw(t,e){return e===void 0&&(e=!1),{simple:function(n){return Wg(n,e)||t.check(n)===void 0},async:function(n){return Wg(n,e)||t.testAsync(n)}}}function to(){return typeof Proxy<"u"?$g(new Ki):op(new Ki)}var Au={};to.extend=function(t){Object.assign(Au,t)},to.clearCustomRules=function(){Au={}};function $g(t){return new Proxy(t,{get:function(n,i){if(i in n)return n[i];var a=$g(t._clone());if(i in Tf)return a._applyModifier(Tf[i],i);if(i in Au)return a._applyRule(Au[i],i);if(i in ap)return a._applyRule(ap[i],i)}})}function op(t){var e=function(a,c){return Object.keys(a).forEach(function(f){c[f]=function(){for(var p=[],g=arguments.length;g--;)p[g]=arguments[g];var x=op(c._clone()),m=x._applyRule(a[f],f).apply(void 0,p);return m}}),c},n=e(ap,t),i=e(Au,n);return Object.keys(Tf).forEach(function(a){Object.defineProperty(i,a,{get:function(){var c=op(i._clone());return c._applyModifier(Tf[a],a)}})}),i}var Tf={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 Cf(e).some(function(n){try{return t(n)}catch{return!1}})}},async:function(t){return function(e){return Promise.all(Cf(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&&Cf(e).every(t)}},async:function(t){return function(e){return Promise.all(Cf(e).map(t)).then(function(n){return n.every(Boolean)})}}},strict:{simple:function(t,e){return function(n){return qg(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(i){return qg(e)&&n&&typeof n=="object"?Object.keys(e.args[0]).length===Object.keys(n).length&&i:i}).catch(function(){return!1})}}}};function qg(t){return t&&t.name==="schema"&&t.args.length>0&&typeof t.args[0]=="object"}function Cf(t){return typeof t=="string"?t.split(""):t}var ap={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||pw;return e(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return sl("string")},boolean:function(){return sl("boolean")},undefined:function(){return sl("undefined")},null:function(){return sl("null")},array:function(){return sl("array")},object:function(){return sl("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 vw(t)},passesAnyOf:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(n){return t.some(function(i){return i.test(n)})}},optional:hw};function sl(t){return function(e){return Array.isArray(e)&&t==="array"||e===null&&t==="null"||typeof e===t}}function pw(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function vw(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach(function(i){var a=t[i];try{a.check((e||{})[i])}catch(c){c.target=i,n.push(c)}}),n.length>0)throw n;return!0},async:function(e){var n=[],i=Object.keys(t).map(function(a){var c=t[a];return c.testAsync((e||{})[a]).catch(function(f){f.target=a,n.push(f)})});return Promise.all(i).then(function(){if(n.length>0)throw n;return!0})}}}var nn="colors",Or="sizes",Ze="space",mw={gap:Ze,gridGap:Ze,columnGap:Ze,gridColumnGap:Ze,rowGap:Ze,gridRowGap:Ze,inset:Ze,insetBlock:Ze,insetBlockEnd:Ze,insetBlockStart:Ze,insetInline:Ze,insetInlineEnd:Ze,insetInlineStart:Ze,margin:Ze,marginTop:Ze,marginRight:Ze,marginBottom:Ze,marginLeft:Ze,marginBlock:Ze,marginBlockEnd:Ze,marginBlockStart:Ze,marginInline:Ze,marginInlineEnd:Ze,marginInlineStart:Ze,padding:Ze,paddingTop:Ze,paddingRight:Ze,paddingBottom:Ze,paddingLeft:Ze,paddingBlock:Ze,paddingBlockEnd:Ze,paddingBlockStart:Ze,paddingInline:Ze,paddingInlineEnd:Ze,paddingInlineStart:Ze,top:Ze,right:Ze,bottom:Ze,left:Ze,scrollMargin:Ze,scrollMarginTop:Ze,scrollMarginRight:Ze,scrollMarginBottom:Ze,scrollMarginLeft:Ze,scrollMarginX:Ze,scrollMarginY:Ze,scrollMarginBlock:Ze,scrollMarginBlockEnd:Ze,scrollMarginBlockStart:Ze,scrollMarginInline:Ze,scrollMarginInlineEnd:Ze,scrollMarginInlineStart:Ze,scrollPadding:Ze,scrollPaddingTop:Ze,scrollPaddingRight:Ze,scrollPaddingBottom:Ze,scrollPaddingLeft:Ze,scrollPaddingX:Ze,scrollPaddingY:Ze,scrollPaddingBlock:Ze,scrollPaddingBlockEnd:Ze,scrollPaddingBlockStart:Ze,scrollPaddingInline:Ze,scrollPaddingInlineEnd:Ze,scrollPaddingInlineStart:Ze,fontSize:"fontSizes",background:nn,backgroundColor:nn,backgroundImage:nn,borderImage:nn,border:nn,borderBlock:nn,borderBlockEnd:nn,borderBlockStart:nn,borderBottom:nn,borderBottomColor:nn,borderColor:nn,borderInline:nn,borderInlineEnd:nn,borderInlineStart:nn,borderLeft:nn,borderLeftColor:nn,borderRight:nn,borderRightColor:nn,borderTop:nn,borderTopColor:nn,caretColor:nn,color:nn,columnRuleColor:nn,fill:nn,outline:nn,outlineColor:nn,stroke:nn,textDecorationColor:nn,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:Or,minBlockSize:Or,maxBlockSize:Or,inlineSize:Or,minInlineSize:Or,maxInlineSize:Or,width:Or,minWidth:Or,maxWidth:Or,height:Or,minHeight:Or,maxHeight:Or,flexBasis:Or,gridTemplateColumns:Or,gridTemplateRows:Or,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"},gw=(t,e)=>typeof e=="function"?{"()":Function.prototype.toString.call(e)}:e,ol=()=>{const t=Object.create(null);return(e,n,...i)=>{const a=(c=>JSON.stringify(c,gw))(e);return a in t?t[a]:t[a]=n(e,...i)}},Uo=Symbol.for("sxs.internal"),lp=(t,e)=>Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)),Yg=t=>{for(const e in t)return!0;return!1},{hasOwnProperty:yw}=Object.prototype,up=t=>t.includes("-")?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),bw=/\s+(?![^()]*\))/,al=t=>e=>t(...typeof e=="string"?String(e).split(bw):[e]),Qg={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:al((t,e)=>({marginBlockStart:t,marginBlockEnd:e||t})),marginInline:al((t,e)=>({marginInlineStart:t,marginInlineEnd:e||t})),maxSize:al((t,e)=>({maxBlockSize:t,maxInlineSize:e||t})),minSize:al((t,e)=>({minBlockSize:t,minInlineSize:e||t})),paddingBlock:al((t,e)=>({paddingBlockStart:t,paddingBlockEnd:e||t})),paddingInline:al((t,e)=>({paddingInlineStart:t,paddingInlineEnd:e||t}))},cp=/([\d.]+)([^]*)/,Sw=(t,e)=>t.length?t.reduce((n,i)=>(n.push(...e.map(a=>a.includes("&")?a.replace(/&/g,/[ +>|~]/.test(i)&&/&.*&/.test(a)?`:is(${i})`:i):i+" "+a)),n),[]):e,xw=(t,e)=>t in ww&&typeof e=="string"?e.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,i,a,c)=>i+(a==="stretch"?`-moz-available${c};${up(t)}:${i}-webkit-fill-available`:`-moz-fit-content${c};${up(t)}:${i}fit-content`)+c):String(e),ww={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Es=t=>t?t+"-":"",Gg=(t,e,n)=>t.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(i,a,c,f,p)=>f=="$"==!!c?i:(a||f=="--"?"calc(":"")+"var(--"+(f==="$"?Es(e)+(p.includes("$")?"":Es(n))+p.replace(/\$/g,"-"):p)+")"+(a||f=="--"?"*"+(a||"")+(c||"1")+")":"")),Ew=/\s*,\s*(?![^()]*\))/,Tw=Object.prototype.toString,ll=(t,e,n,i,a)=>{let c,f,p;const g=(x,m,w)=>{let R,D;const A=z=>{for(R in z){const M=R.charCodeAt(0)===64,F=M&&Array.isArray(z[R])?z[R]:[z[R]];for(D of F){const $=/[A-Z]/.test(L=R)?L:L.replace(/-[^]/g,j=>j[1].toUpperCase()),Q=typeof D=="object"&&D&&D.toString===Tw&&(!i.utils[$]||!m.length);if($ in i.utils&&!Q){const j=i.utils[$];if(j!==f){f=j,A(j(D)),f=null;continue}}else if($ in Qg){const j=Qg[$];if(j!==p){p=j,A(j(D)),p=null;continue}}if(M&&(P=R.slice(1)in i.media?"@media "+i.media[R.slice(1)]:R,R=P.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(j,K,ee,V,ae,ge)=>{const we=cp.test(K),Ee=.0625*(we?-1:1),[Ue,Fe]=we?[V,K]:[K,V];return"("+(ee[0]==="="?"":ee[0]===">"===we?"max-":"min-")+Ue+":"+(ee[0]!=="="&&ee.length===1?Fe.replace(cp,(Be,vt,Oe)=>Number(vt)+Ee*(ee===">"?1:-1)+Oe):Fe)+(ae?") and ("+(ae[0]===">"?"min-":"max-")+Ue+":"+(ae.length===1?ge.replace(cp,(Be,vt,Oe)=>Number(vt)+Ee*(ae===">"?-1:1)+Oe):ge):"")+")"})),Q){const j=M?w.concat(R):[...w],K=M?[...m]:Sw(m,R.split(Ew));c!==void 0&&a(Xg(...c)),c=void 0,g(D,K,j)}else c===void 0&&(c=[[],m,w]),R=M||R.charCodeAt(0)!==36?R:`--${Es(i.prefix)}${R.slice(1).replace(/\$/g,"-")}`,D=Q?D:typeof D=="number"?D&&$ in Cw?String(D)+"px":String(D):Gg(xw($,D??""),i.prefix,i.themeMap[$]),c[0].push(`${M?`${R} `:`${up(R)}:`}${D}`)}}var P,L};A(x),c!==void 0&&a(Xg(...c)),c=void 0};g(t,e,n)},Xg=(t,e,n)=>`${n.map(i=>`${i}{`).join("")}${e.length?`${e.join(",")}{`:""}${t.join(";")}${e.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,Cw={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},Kg=t=>String.fromCharCode(t+(t>25?39:97)),Fo=t=>(e=>{let n,i="";for(n=Math.abs(e);n>52;n=n/52|0)i=Kg(n%52)+i;return Kg(n%52)+i})(((e,n)=>{let i=n.length;for(;i;)e=33*e^n.charCodeAt(--i);return e})(5381,JSON.stringify(t))>>>0),Mu=["themed","global","styled","onevar","resonevar","allvar","inline"],Rw=t=>{if(t.href&&!t.href.startsWith(location.origin))return!1;try{return!!t.cssRules}catch{return!1}},Ow=t=>{let e;const n=()=>{const{cssRules:a}=e.sheet;return[].map.call(a,(c,f)=>{const{cssText:p}=c;let g="";if(p.startsWith("--sxs"))return"";if(a[f-1]&&(g=a[f-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(" ")}}${p}`;return c.cssRules.length?`${g}${p}`:""}return p}).join("")},i=()=>{if(e){const{rules:p,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 p)delete p[x]}const a=Object(t).styleSheets||[];for(const p of a)if(Rw(p)){for(let g=0,x=p.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:R}=m;if(!R.startsWith("--sxs"))continue;const D=R.slice(14,-3).trim().split(/\s+/),A=Mu[D[0]];A&&(e||(e={sheet:p,reset:i,rules:{},toString:n}),e.rules[A]={group:w,index:g,cache:new Set(D)})}if(e)break}if(!e){const p=(g,x)=>({type:x,cssRules:[],insertRule(m,w){this.cssRules.splice(w,0,p(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:p("","text/css"),rules:{},reset:i,toString:n}}const{sheet:c,rules:f}=e;for(let p=Mu.length-1;p>=0;--p){const g=Mu[p];if(!f[g]){const x=Mu[p+1],m=f[x]?f[x].index:c.cssRules.length;c.insertRule("@media{}",m),c.insertRule(`--sxs{--sxs:${p}}`,m),f[g]={group:c.cssRules[m+1],index:m,cache:new Set([p])}}Aw(f[g])}};return i(),e},Aw=t=>{const e=t.group;let n=e.cssRules.length;t.apply=i=>{try{e.insertRule(i,n),++n}catch{}}},Pu=Symbol(),Mw=ol(),Zg=(t,e)=>Mw(t,()=>(...n)=>{let i={type:null,composers:new Set};for(const a of n)if(a!=null)if(a[Uo]){i.type==null&&(i.type=a[Uo].type);for(const c of a[Uo].composers)i.composers.add(c)}else a.constructor!==Object||a.$$typeof?i.type==null&&(i.type=a):i.composers.add(Pw(a,t));return i.type==null&&(i.type="span"),i.composers.size||i.composers.add(["PJLV",{},[],[],{},[]]),Lw(t,i,e)}),Pw=({variants:t,compoundVariants:e,defaultVariants:n,...i},a)=>{const c=`${Es(a.prefix)}c-${Fo(i)}`,f=[],p=[],g=Object.create(null),x=[];for(const R in n)g[R]=String(n[R]);if(typeof t=="object"&&t)for(const R in t){m=g,w=R,yw.call(m,w)||(g[R]="undefined");const D=t[R];for(const A in D){const z={[R]:String(A)};String(A)==="undefined"&&x.push(R);const P=D[A],L=[z,P,!Yg(P)];f.push(L)}}var m,w;if(typeof e=="object"&&e)for(const R of e){let{css:D,...A}=R;D=typeof D=="object"&&D||{};for(const P in A)A[P]=String(A[P]);const z=[A,D,!Yg(D)];p.push(z)}return[c,i,f,p,g,x]},Lw=(t,e,n)=>{const[i,a,c,f]=Dw(e.composers),p=typeof e.type=="function"||e.type.$$typeof?(w=>{function R(){for(let D=0;D<R[Pu].length;D++){const[A,z]=R[Pu][D];w.rules[A].apply(z)}return R[Pu]=[],null}return R[Pu]=[],R.rules={},Mu.forEach(D=>R.rules[D]={apply:A=>R[Pu].push([D,A])}),R})(n):null,g=(p||n).rules,x=`.${i}${a.length>1?`:where(.${a.slice(1).join(".")})`:""}`,m=w=>{w=typeof w=="object"&&w||kw;const{css:R,...D}=w,A={};for(const L in c)if(delete D[L],L in w){let M=w[L];typeof M=="object"&&M?A[L]={"@initial":c[L],...M}:(M=String(M),A[L]=M!=="undefined"||f.has(L)?M:c[L])}else A[L]=c[L];const z=new Set([...a]);for(const[L,M,F,$]of e.composers){n.rules.styled.cache.has(L)||(n.rules.styled.cache.add(L),ll(M,[`.${L}`],[],t,K=>{g.styled.apply(K)}));const Q=Jg(F,A,t.media),j=Jg($,A,t.media,!0);for(const K of Q)if(K!==void 0)for(const[ee,V,ae]of K){const ge=`${L}-${Fo(V)}-${ee}`;z.add(ge);const we=(ae?n.rules.resonevar:n.rules.onevar).cache,Ee=ae?g.resonevar:g.onevar;we.has(ge)||(we.add(ge),ll(V,[`.${ge}`],[],t,Ue=>{Ee.apply(Ue)}))}for(const K of j)if(K!==void 0)for(const[ee,V]of K){const ae=`${L}-${Fo(V)}-${ee}`;z.add(ae),n.rules.allvar.cache.has(ae)||(n.rules.allvar.cache.add(ae),ll(V,[`.${ae}`],[],t,ge=>{g.allvar.apply(ge)}))}}if(typeof R=="object"&&R){const L=`${i}-i${Fo(R)}-css`;z.add(L),n.rules.inline.cache.has(L)||(n.rules.inline.cache.add(L),ll(R,[`.${L}`],[],t,M=>{g.inline.apply(M)}))}for(const L of String(w.className||"").trim().split(/\s+/))L&&z.add(L);const P=D.className=[...z].join(" ");return{type:e.type,className:P,selector:x,props:D,toString:()=>P,deferredInjector:p}};return lp(m,{className:i,selector:x,[Uo]:e,toString:()=>(n.rules.styled.cache.has(i)||m(),i)})},Dw=t=>{let e="";const n=[],i={},a=[];for(const[c,,,,f,p]of t){e===""&&(e=c),n.push(c),a.push(...p);for(const g in f){const x=f[g];(i[g]===void 0||x!=="undefined"||p.includes(x))&&(i[g]=x)}}return[e,n,i,new Set(a)]},Jg=(t,e,n,i)=>{const a=[];e:for(let[c,f,p]of t){if(p)continue;let g,x=0,m=!1;for(g in c){const w=c[g];let R=e[g];if(R!==w){if(typeof R!="object"||!R)continue e;{let D,A,z=0;for(const P in R){if(w===String(R[P])){if(P!=="@initial"){const L=P.slice(1);(A=A||[]).push(L in n?n[L]:P.replace(/^@media ?/,"")),m=!0}x+=z,D=!0}++z}if(A&&A.length&&(f={["@media "+A.join(", ")]:f}),!D)continue e}}}(a[x]=a[x]||[]).push([i?"cv":`${g}-${c[g]}`,f,m])}return a},kw={},Nw=ol(),zw=(t,e)=>Nw(t,()=>(...n)=>{const i=()=>{for(let a of n){a=typeof a=="object"&&a||{};let c=Fo(a);if(!e.rules.global.cache.has(c)){if(e.rules.global.cache.add(c),"@import"in a){let f=[].indexOf.call(e.sheet.cssRules,e.rules.themed.group)-1;for(let p of[].concat(a["@import"]))p=p.includes('"')||p.includes("'")?p:`"${p}"`,e.sheet.insertRule(`@import ${p};`,f++);delete a["@import"]}ll(a,[],[],t,f=>{e.rules.global.apply(f)})}}return""};return lp(i,{toString:i})}),_w=ol(),jw=(t,e)=>_w(t,()=>n=>{const i=`${Es(t.prefix)}k-${Fo(n)}`,a=()=>{if(!e.rules.global.cache.has(i)){e.rules.global.cache.add(i);const c=[];ll(n,[],[],t,p=>c.push(p));const f=`@keyframes ${i}{${c.join("")}}`;e.rules.global.apply(f)}return i};return lp(a,{get name(){return a()},toString:a})}),Iw=class{constructor(t,e,n,i){this.token=t==null?"":String(t),this.value=e==null?"":String(e),this.scale=n==null?"":String(n),this.prefix=i==null?"":String(i)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Es(this.prefix)+Es(this.scale)+this.token}toString(){return this.computedValue}},Uw=ol(),Fw=(t,e)=>Uw(t,()=>(n,i)=>{i=typeof n=="object"&&n||Object(i);const a=`.${n=(n=typeof n=="string"?n:"")||`${Es(t.prefix)}t-${Fo(i)}`}`,c={},f=[];for(const g in i){c[g]={};for(const x in i[g]){const m=`--${Es(t.prefix)}${g}-${x}`,w=Gg(String(i[g][x]),t.prefix,g);c[g][x]=new Iw(x,w,g,t.prefix),f.push(`${m}:${w}`)}}const p=()=>{if(f.length&&!e.rules.themed.cache.has(n)){e.rules.themed.cache.add(n);const g=`${i===t.theme?":root,":""}.${n}{${f.join(";")}}`;e.rules.themed.apply(g)}return n};return{...c,get className(){return p()},selector:a,toString:p}}),Bw=ol(),Hw=ol(),Vw=t=>{const e=(n=>{let i=!1;const a=Bw(n,c=>{i=!0;const f="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",p=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:f,media:p,theme:x,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...mw},utils:typeof c.utils=="object"&&c.utils||{}},w=Ow(g),R={css:Zg(m,w),globalCss:zw(m,w),keyframes:jw(m,w),createTheme:Fw(m,w),reset(){w.reset(),R.theme.toString()},theme:{},sheet:w,config:m,prefix:f,getCssText:w.toString,toString:w.toString};return String(R.theme=R.createTheme(x)),R});return i||a.reset(),a})(t);return e.styled=(({config:n,sheet:i})=>Hw(n,()=>{const a=Zg(n,i);return(...c)=>{const f=a(...c),p=f[Uo].type,g=T.forwardRef((x,m)=>{const w=x&&x.as||p,{props:R,deferredInjector:D}=f(x);return delete R.as,R.ref=m,D?T.createElement(T.Fragment,null,T.createElement(w,R),T.createElement(D,null)):T.createElement(w,R)});return g.className=f.className,g.displayName=`Styled.${p.displayName||p.name||p}`,g.selector=f.selector,g.toString=()=>f.selector,g[Uo]=f[Uo],g}}))(e),e};function Ww(t,e,n){return Math.max(e,Math.min(t,n))}const gr={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 ey(t,e,n){return e===0||Math.abs(e)===1/0?Math.pow(t,n*5):t*e*n/(e+n*t)}function ty(t,e,n,i=.15){return i===0?Ww(t,e,n):t<e?-ey(e-t,n-e,i)+e:t>n?+ey(t-n,n-e,i)+n:t}function $w(t,[e,n],[i,a]){const[[c,f],[p,g]]=t;return[ty(e,c,f,i),ty(n,p,g,a)]}function qw(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yw(t){var e=qw(t,"string");return typeof e=="symbol"?e:String(e)}function Fr(t,e,n){return e=Yw(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ny(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function Rn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ny(Object(n),!0).forEach(function(i){Fr(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}const ry={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 iy(t){return t?t[0].toUpperCase()+t.slice(1):""}const Qw=["enter","leave"];function Gw(t=!1,e){return t&&!Qw.includes(e)}function Xw(t,e="",n=!1){const i=ry[t],a=i&&i[e]||e;return"on"+iy(t)+iy(a)+(Gw(n,a)?"Capture":"")}const Kw=["gotpointercapture","lostpointercapture"];function Zw(t){let e=t.substring(2).toLowerCase();const n=!!~e.indexOf("passive");n&&(e=e.replace("passive",""));const i=Kw.includes(e)?"capturecapture":"capture",a=!!~e.indexOf(i);return a&&(e=e.replace("capture","")),{device:e,capture:a,passive:n}}function Jw(t,e=""){const n=ry[t],i=n&&n[e]||e;return t+i}function Rf(t){return"touches"in t}function sy(t){return Rf(t)?"touch":"pointerType"in t?t.pointerType:"mouse"}function eE(t){return Array.from(t.touches).filter(e=>{var n,i;return e.target===t.currentTarget||((n=t.currentTarget)===null||n===void 0||(i=n.contains)===null||i===void 0?void 0:i.call(n,e.target))})}function tE(t){return t.type==="touchend"||t.type==="touchcancel"?t.changedTouches:t.targetTouches}function oy(t){return Rf(t)?tE(t)[0]:t}function nE(t){return eE(t).map(e=>e.identifier)}function fp(t){const e=oy(t);return Rf(t)?e.identifier:e.pointerId}function ay(t){const e=oy(t);return[e.clientX,e.clientY]}function rE(t){const e={};if("buttons"in t&&(e.buttons=t.buttons),"shiftKey"in t){const{shiftKey:n,altKey:i,metaKey:a,ctrlKey:c}=t;Object.assign(e,{shiftKey:n,altKey:i,metaKey:a,ctrlKey:c})}return e}function Of(t,...e){return typeof t=="function"?t(...e):t}function iE(){}function sE(...t){return t.length===0?iE:t.length===1?t[0]:function(){let e;for(const n of t)e=n.apply(this,arguments)||e;return e}}function ly(t,e){return Object.assign({},e,t||{})}const oE=32;class aE{constructor(e,n,i){this.ctrl=e,this.args=n,this.key=i,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:i,args:a}=this;n[i]=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=a,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,i=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=e.target,n.currentTarget=e.currentTarget,n.lastOffset=i.from?Of(i.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:i,shared:a}=this;n.args=this.args;let c=0;if(e&&(n.event=e,i.preventDefault&&e.cancelable&&n.event.preventDefault(),n.type=e.type,a.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,a.locked=!!document.pointerLockElement,Object.assign(a,rE(e)),a.down=a.pressed=a.buttons%2===1||a.touches>0,c=e.timeStamp-n.timeStamp,n.timeStamp=e.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const j=n._delta.map(Math.abs);gr.addTo(n._distance,j)}this.axisIntent&&this.axisIntent(e);const[f,p]=n._movement,[g,x]=i.threshold,{_step:m,values:w}=n;if(i.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(f)>=g&&w[0]),m[1]===!1&&(m[1]=Math.abs(p)>=x&&w[1])):(m[0]===!1&&(m[0]=Math.abs(f)>=g&&Math.sign(f)*g),m[1]===!1&&(m[1]=Math.abs(p)>=x&&Math.sign(p)*x)),n.intentional=m[0]!==!1||m[1]!==!1,!n.intentional)return;const R=[0,0];if(i.hasCustomTransform){const[j,K]=w;R[0]=m[0]!==!1?j-m[0]:0,R[1]=m[1]!==!1?K-m[1]:0}else R[0]=m[0]!==!1?f-m[0]:0,R[1]=m[1]!==!1?p-m[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(R);const D=n.offset,A=n._active&&!n._blocked||n.active;A&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=a[this.ingKey]=n._active,e&&(n.first&&("bounds"in i&&(n._bounds=Of(i.bounds,n)),this.setup&&this.setup()),n.movement=R,this.computeOffset()));const[z,P]=n.offset,[[L,M],[F,$]]=n._bounds;n.overflow=[z<L?-1:z>M?1:0,P<F?-1:P>$?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?i.rubberband||[0,0]:[0,0];if(n.offset=$w(n._bounds,n.offset,Q),n.delta=gr.sub(n.offset,D),this.computeMovement(),A&&(!n.last||c>oE)){n.delta=gr.sub(n.offset,D);const j=n.delta.map(Math.abs);gr.addTo(n.distance,j),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&c>0&&(n.velocity=[j[0]/c,j[1]/c])}}emit(){const e=this.state,n=this.shared,i=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!i.triggerAllEvents)return;const a=this.handler(Rn(Rn(Rn({},n),e),{},{[this.aliasKey]:e.values}));a!==void 0&&(e.memo=a)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function lE([t,e],n){const i=Math.abs(t),a=Math.abs(e);if(i>a&&i>n)return"x";if(a>i&&a>n)return"y"}class uE extends aE{constructor(...e){super(...e),Fr(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=gr.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=gr.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const n=this.state,i=this.config;if(!n.axis&&e){const a=typeof i.axisThreshold=="object"?i.axisThreshold[sy(e)]:i.axisThreshold;n.axis=lE(n._movement,a)}n._blocked=(i.lockDirection||!!i.axis)&&!n.axis||!!i.axis&&i.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 cE=t=>t,uy=.15,cy={enabled(t=!0){return t},eventOptions(t,e,n){return Rn(Rn({},n.shared.eventOptions),t)},preventDefault(t=!1){return t},triggerAllEvents(t=!1){return t},rubberband(t=0){switch(t){case!0:return[uy,uy];case!1:return[0,0];default:return gr.toVector(t)}},from(t){if(typeof t=="function")return t;if(t!=null)return gr.toVector(t)},transform(t,e,n){const i=t||n.shared.transform;return this.hasCustomTransform=!!i,i||cE},threshold(t){return gr.toVector(t,0)}},fE=0,Lu=Rn(Rn({},cy),{},{axis(t,e,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(t=fE){return t},bounds(t={}){if(typeof t=="function")return c=>Lu.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:i=-1/0,bottom:a=1/0}=t;return[[e,n],[i,a]]}}),fy={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 dE extends uE{constructor(...e){super(...e),Fr(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(),i=e.currentTarget.getBoundingClientRect(),a={left:n.left-i.left+e.offset[0],right:n.right-i.right+e.offset[0],top:n.top-i.top+e.offset[1],bottom:n.bottom-i.bottom+e.offset[1]};e._bounds=Lu.bounds(a)}}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,i=this.state;if(e.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(e.buttons):n.pointerButtons!==-1&&n.pointerButtons!==e.buttons))return;const a=this.ctrl.setEventIds(e);n.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(a&&a.size>1&&i._pointerActive)&&(this.start(e),this.setupPointer(e),i._pointerId=fp(e),i._pointerActive=!0,this.computeValues(ay(e)),this.computeInitial(),n.preventScrollAxis&&sy(e)!=="mouse"?(i._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,i=this.config;if(!n._pointerActive||n.type===e.type&&e.timeStamp===n.timeStamp)return;const a=fp(e);if(n._pointerId!==void 0&&a!==n._pointerId)return;const c=ay(e);if(document.pointerLockElement===e.target?n._delta=[e.movementX,e.movementY]:(n._delta=gr.sub(c,n._values),this.computeValues(c)),gr.addTo(n._movement,n._delta),this.compute(e),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(e);return}if(i.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===i.preventScrollAxis||i.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,i=this.config;if(!n._active||!n._pointerActive)return;const a=fp(e);if(n._pointerId!==void 0&&a!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[c,f]=n._distance;if(n.tap=c<=i.tapsThreshold&&f<=i.tapsThreshold,n.tap&&i.filterTaps)n._force=!0;else{const[p,g]=n.direction,[x,m]=n.velocity,[w,R]=n.movement,[D,A]=i.swipe.velocity,[z,P]=i.swipe.distance,L=i.swipe.duration;n.elapsedTime<L&&(Math.abs(x)>D&&Math.abs(w)>z&&(n.swipe[0]=p),Math.abs(m)>A&&Math.abs(R)>P&&(n.swipe[1]=g))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const n=this.config,i=n.device;n.pointerLock&&e.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"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,hE(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=fy[e.key];if(n){const i=this.state,a=e.shiftKey?10:e.altKey?.1:1;this.start(e),i._delta=n(this.config.keyboardDisplacement,a),i._keyboardActive=!0,gr.addTo(i._movement,i._delta),this.compute(e),this.emit()}}keyUp(e){e.key in fy&&(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 hE(t){"persist"in t&&typeof t.persist=="function"&&t.persist()}const Du=typeof window<"u"&&window.document&&window.document.createElement;function pE(){return Du&&"ontouchstart"in window}function dy(){return pE()||Du&&window.navigator.maxTouchPoints>1}function vE(){return Du&&"onpointerdown"in window}function mE(){return Du&&"exitPointerLock"in window.document}function gE(){try{return"constructor"in GestureEvent}catch{return!1}}const vi={isBrowser:Du,gesture:gE(),touch:dy(),touchscreen:dy(),pointer:vE(),pointerLock:mE()},yE=250,bE=180,SE=.5,xE=50,wE=250,EE=10,hy={mouse:0,touch:0,pen:8},TE=Rn(Rn({},Lu),{},{device(t,e,{pointer:{touch:n=!1,lock:i=!1,mouse:a=!1}={}}){return this.pointerLock=i&&vi.pointerLock,vi.touch&&n?"touch":this.pointerLock?"mouse":vi.pointer&&!a?"pointer":vi.touch?"touch":"mouse"},preventScrollAxis(t,e,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&t?yE:void 0,!(!vi.touchscreen||n===!1))return t||(n!==void 0?"y":void 0)},pointerCapture(t,e,{pointer:{capture:n=!0,buttons:i=1,keys:a=!0}={}}){return this.pointerButtons=i,this.keys=a,!this.pointerLock&&this.device==="pointer"&&n},threshold(t,e,{filterTaps:n=!1,tapsThreshold:i=3,axis:a=void 0}){const c=gr.toVector(t,n?i:a?1:0);return this.filterTaps=n,this.tapsThreshold=i,c},swipe({velocity:t=SE,distance:e=xE,duration:n=wE}={}){return{velocity:this.transform(gr.toVector(t)),distance:this.transform(gr.toVector(e)),duration:n}},delay(t=0){switch(t){case!0:return bE;case!1:return 0;default:return t}},axisThreshold(t){return t?Rn(Rn({},hy),t):hy},keyboardDisplacement(t=EE){return t}});Rn(Rn({},cy),{},{device(t,e,{shared:n,pointer:{touch:i=!1}={}}){if(n.target&&!vi.touch&&vi.gesture)return"gesture";if(vi.touch&&i)return"touch";if(vi.touchscreen){if(vi.pointer)return"pointer";if(vi.touch)return"touch"}},bounds(t,e,{scaleBounds:n={},angleBounds:i={}}){const a=f=>{const p=ly(Of(n,f),{min:-1/0,max:1/0});return[p.min,p.max]},c=f=>{const p=ly(Of(i,f),{min:-1/0,max:1/0});return[p.min,p.max]};return typeof n!="function"&&typeof i!="function"?[a(),c()]:f=>[a(f),c(f)]},threshold(t,e,n){return this.lockDirection=n.axis==="lock",gr.toVector(t,this.lockDirection?[.1,3]:0)},modifierKey(t){return t===void 0?"ctrlKey":t},pinchOnWheel(t=!0){return t}}),Rn(Rn({},Lu),{},{mouseOnly:(t=!0)=>t}),Rn(Rn({},Lu),{},{mouseOnly:(t=!0)=>t});const py=new Map,dp=new Map;function CE(t){py.set(t.key,t.engine),dp.set(t.key,t.resolver)}const RE={key:"drag",engine:dE,resolver:TE};function OE(t,e){if(t==null)return{};var n={},i=Object.keys(t),a,c;for(c=0;c<i.length;c++)a=i[c],!(e.indexOf(a)>=0)&&(n[a]=t[a]);return n}function AE(t,e){if(t==null)return{};var n=OE(t,e),i,a;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(a=0;a<c.length;a++)i=c[a],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}const ME={target(t){if(t)return()=>"current"in t?t.current:t},enabled(t=!0){return t},window(t=vi.isBrowser?window:void 0){return t},eventOptions({passive:t=!0,capture:e=!1}={}){return{passive:t,capture:e}},transform(t){return t}},PE=["target","eventOptions","window","enabled","transform"];function Af(t={},e){const n={};for(const[i,a]of Object.entries(e))switch(typeof a){case"function":n[i]=a.call(n,t[i],i,t);break;case"object":n[i]=Af(t[i],a);break;case"boolean":a&&(n[i]=t[i]);break}return n}function LE(t,e,n={}){const i=t,{target:a,eventOptions:c,window:f,enabled:p,transform:g}=i,x=AE(i,PE);if(n.shared=Af({target:a,eventOptions:c,window:f,enabled:p,transform:g},ME),e){const m=dp.get(e);n[e]=Af(Rn({shared:n.shared},x),m)}else for(const m in x){const w=dp.get(m);w&&(n[m]=Af(Rn({shared:n.shared},x[m]),w))}return n}class vy{constructor(e,n){Fr(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=n}add(e,n,i,a,c){const f=this._listeners,p=Jw(n,i),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},x=Rn(Rn({},g),c);e.addEventListener(p,a,x);const m=()=>{e.removeEventListener(p,a,x),f.delete(m)};return f.add(m),m}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class DE{constructor(){Fr(this,"_timeouts",new Map)}add(e,n,i=140,...a){this.remove(e),this._timeouts.set(e,window.setTimeout(n,i,...a))}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 kE{constructor(e){Fr(this,"gestures",new Set),Fr(this,"_targetEventStore",new vy(this)),Fr(this,"gestureEventStores",{}),Fr(this,"gestureTimeoutStores",{}),Fr(this,"handlers",{}),Fr(this,"config",{}),Fr(this,"pointerIds",new Set),Fr(this,"touchIds",new Set),Fr(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),NE(this,e)}setEventIds(e){if(Rf(e))return this.touchIds=new Set(nE(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=LE(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,i={};let a;if(!(n.target&&(a=n.target(),!a))){if(n.enabled){for(const f of this.gestures){const p=this.config[f],g=my(i,p.eventOptions,!!a);if(p.enabled){const x=py.get(f);new x(this,e,f).bind(g)}}const c=my(i,n.eventOptions,!!a);for(const f in this.nativeHandlers)c(f,"",p=>this.nativeHandlers[f](Rn(Rn({},this.state.shared),{},{event:p,args:e})),void 0,!0)}for(const c in i)i[c]=sE(...i[c]);if(!a)return i;for(const c in i){const{device:f,capture:p,passive:g}=Zw(c);this._targetEventStore.add(a,f,"",i[c],{capture:p,passive:g})}}}}function ul(t,e){t.gestures.add(e),t.gestureEventStores[e]=new vy(t,e),t.gestureTimeoutStores[e]=new DE}function NE(t,e){e.drag&&ul(t,"drag"),e.wheel&&ul(t,"wheel"),e.scroll&&ul(t,"scroll"),e.move&&ul(t,"move"),e.pinch&&ul(t,"pinch"),e.hover&&ul(t,"hover")}const my=(t,e,n)=>(i,a,c,f={},p=!1)=>{var g,x;const m=(g=f.capture)!==null&&g!==void 0?g:e.capture,w=(x=f.passive)!==null&&x!==void 0?x:e.passive;let R=p?i:Xw(i,a,m);n&&w&&(R+="Passive"),t[R]=t[R]||[],t[R].push(c)};function zE(t,e={},n,i){const a=T.useMemo(()=>new kE(t),[]);if(a.applyHandlers(t,i),a.applyConfig(e,n),T.useEffect(a.effect.bind(a)),T.useEffect(()=>a.clean.bind(a),[]),e.target===void 0)return a.bind.bind(a)}function _E(t,e){return CE(RE),zE({drag:t},e||{},"drag")}const jE=ve.useId||(()=>{});let IE=0;function UE(t){const[e,n]=ve.useState(jE());return wf(()=>{t||n(i=>i??String(IE++))},[t]),t||(e?`radix-${e}`:"")}const cl=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce((t,e)=>({...t,[e]:ve.forwardRef((n,i)=>{const{asChild:a,...c}=n,f=a?Ig:e;return ve.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),n.as&&console.error(FE),ve.createElement(f,mr({},c,{ref:i}))})}),{}),FE="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",BE=ve.forwardRef((t,e)=>ve.createElement(cl.span,mr({},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"}}))),HE=ve.forwardRef((t,e)=>{var n,i;const{containerRef:a,style:c,...f}=t,p=(n=a==null?void 0:a.current)!==null&&n!==void 0?n:globalThis==null||(i=globalThis.document)===null||i===void 0?void 0:i.body,[,g]=ve.useState({});return wf(()=>{g({})},[]),p?Xh.createPortal(ve.createElement(cl.div,mr({"data-radix-portal":""},f,{ref:e,style:p===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...c}:void 0})),p):null}),VE=ve.forwardRef((t,e)=>{const{children:n,width:i=10,height:a=5,...c}=t;return ve.createElement(cl.svg,mr({},c,{ref:e,width:i,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?n:ve.createElement("polygon",{points:"0,0 30,0 15,10"}))});function gy(t){const[e,n]=ve.useState(void 0);return ve.useEffect(()=>{if(t){const i=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const c=a[0];let f,p;if("borderBoxSize"in c){const g=c.borderBoxSize,x=Array.isArray(g)?g[0]:g;f=x.inlineSize,p=x.blockSize}else{const g=t.getBoundingClientRect();f=g.width,p=g.height}n({width:f,height:p})});return i.observe(t,{box:"border-box"}),()=>{n(void 0),i.unobserve(t)}}},[t]),e}function WE(t,e){const n=Bo.get(t);return n===void 0?(Bo.set(t,{rect:{},callbacks:[e]}),Bo.size===1&&(hp=requestAnimationFrame(yy))):(n.callbacks.push(e),e(t.getBoundingClientRect())),()=>{const i=Bo.get(t);if(i===void 0)return;const a=i.callbacks.indexOf(e);a>-1&&i.callbacks.splice(a,1),i.callbacks.length===0&&(Bo.delete(t),Bo.size===0&&cancelAnimationFrame(hp))}}let hp;const Bo=new Map;function yy(){const t=[];Bo.forEach((e,n)=>{const i=n.getBoundingClientRect();var a,c;a=e.rect,c=i,(a.width!==c.width||a.height!==c.height||a.top!==c.top||a.right!==c.right||a.bottom!==c.bottom||a.left!==c.left)&&(e.rect=i,t.push(e))}),t.forEach(e=>{e.callbacks.forEach(n=>n(e.rect))}),hp=requestAnimationFrame(yy)}function by(t){const[e,n]=ve.useState();return ve.useEffect(()=>{if(t){const i=WE(t,n);return()=>{n(void 0),i()}}},[t]),e}function Sy(t,e=[]){let n=[];const i=()=>{const a=n.map(c=>ve.createContext(c));return function(c){const f=(c==null?void 0:c[t])||a;return ve.useMemo(()=>({[`__scope${t}`]:{...c,[t]:f}}),[c,f])}};return i.scopeName=t,[function(a,c){const f=ve.createContext(c),p=n.length;function g(x){const{scope:m,children:w,...R}=x,D=(m==null?void 0:m[t][p])||f,A=ve.useMemo(()=>R,Object.values(R));return ve.createElement(D.Provider,{value:A},w)}return n=[...n,c],g.displayName=a+"Provider",[g,function(x,m){const w=(m==null?void 0:m[t][p])||f,R=ve.useContext(w);if(R)return R;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${a}\``)}]},$E(i,...e)]}function $E(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){const c=i.reduce((f,{useScope:p,scopeName:g})=>({...f,...p(a)[`__scope${g}`]}),{});return ve.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return n.scopeName=e.scopeName,n}function qE({anchorRect:t,popperSize:e,arrowSize:n,arrowOffset:i=0,side:a,sideOffset:c=0,align:f,alignOffset:p=0,shouldAvoidCollisions:g=!0,collisionBoundariesRect:x,collisionTolerance:m=0}){if(!t||!e||!x)return{popperStyles:YE,arrowStyles:pp};const w=function(K,ee,V=0,ae=0,ge){const we=ge?ge.height:0,Ee=xy(ee,K,"x"),Ue=xy(ee,K,"y"),Fe=Ue.before-V-we,Be=Ue.after+V+we,vt=Ee.before-V-we,Oe=Ee.after+V+we;return{top:{start:{x:Ee.start+ae,y:Fe},center:{x:Ee.center,y:Fe},end:{x:Ee.end-ae,y:Fe}},right:{start:{x:Oe,y:Ue.start+ae},center:{x:Oe,y:Ue.center},end:{x:Oe,y:Ue.end-ae}},bottom:{start:{x:Ee.start+ae,y:Be},center:{x:Ee.center,y:Be},end:{x:Ee.end-ae,y:Be}},left:{start:{x:vt,y:Ue.start+ae},center:{x:vt,y:Ue.center},end:{x:vt,y:Ue.end-ae}}}}(e,t,c,p,n),R=w[a][f];if(g===!1){const K=wy(R);let ee=pp;return n&&(ee=Ty({popperSize:e,arrowSize:n,arrowOffset:i,side:a,align:f})),{popperStyles:{...K,"--radix-popper-transform-origin":Ey(e,a,f,i,n)},arrowStyles:ee,placedSide:a,placedAlign:f}}const D=DOMRect.fromRect({...e,...R}),A=(z=x,P=m,DOMRect.fromRect({width:z.width-2*P,height:z.height-2*P,x:z.left+P,y:z.top+P}));var z,P;const L=Ry(D,A),M=w[Cy(a)][f],F=function(K,ee,V){const ae=Cy(K);return ee[K]&&!V[ae]?ae:K}(a,L,Ry(DOMRect.fromRect({...e,...M}),A)),$=function(K,ee,V,ae,ge){const we=V==="top"||V==="bottom",Ee=we?"left":"top",Ue=we?"right":"bottom",Fe=we?"width":"height",Be=ee[Fe]>K[Fe];return(ae==="start"||ae==="center")&&(ge[Ee]&&Be||ge[Ue]&&!Be)?"end":(ae==="end"||ae==="center")&&(ge[Ue]&&Be||ge[Ee]&&!Be)?"start":ae}(e,t,a,f,L),Q=wy(w[F][$]);let j=pp;return n&&(j=Ty({popperSize:e,arrowSize:n,arrowOffset:i,side:F,align:$})),{popperStyles:{...Q,"--radix-popper-transform-origin":Ey(e,F,$,i,n)},arrowStyles:j,placedSide:F,placedAlign:$}}function xy(t,e,n){const i=t[n==="x"?"left":"top"],a=n==="x"?"width":"height",c=t[a],f=e[a];return{before:i-f,start:i,center:i+(c-f)/2,end:i+c-f,after:i+c}}function wy(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 Ey(t,e,n,i,a){const c=e==="top"||e==="bottom",f=a?a.width:0,p=a?a.height:0,g=f/2+i;let x="",m="";return c?(x={start:`${g}px`,center:"center",end:t.width-g+"px"}[n],m=e==="top"?`${t.height+p}px`:-p+"px"):(x=e==="left"?`${t.width+p}px`:-p+"px",m={start:`${g}px`,center:"center",end:t.height-g+"px"}[n]),`${x} ${m}`}const YE={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},pp={position:"absolute",opacity:0};function Ty({popperSize:t,arrowSize:e,arrowOffset:n,side:i,align:a}){const c=(t.width-e.width)/2,f=(t.height-e.width)/2,p={top:0,right:90,bottom:180,left:-90}[i],g=Math.max(e.width,e.height),x={width:`${g}px`,height:`${g}px`,transform:`rotate(${p}deg)`,willChange:"transform",position:"absolute",[i]:"100%",direction:QE(i,a)};return i!=="top"&&i!=="bottom"||(a==="start"&&(x.left=`${n}px`),a==="center"&&(x.left=`${c}px`),a==="end"&&(x.right=`${n}px`)),i!=="left"&&i!=="right"||(a==="start"&&(x.top=`${n}px`),a==="center"&&(x.top=`${f}px`),a==="end"&&(x.bottom=`${n}px`)),x}function QE(t,e){return(t!=="top"&&t!=="right"||e!=="end")&&(t!=="bottom"&&t!=="left"||e==="end")?"ltr":"rtl"}function Cy(t){return{top:"bottom",right:"left",bottom:"top",left:"right"}[t]}function Ry(t,e){return{top:t.top<e.top,right:t.right>e.right,bottom:t.bottom>e.bottom,left:t.left<e.left}}const[Oy,Ay]=Sy("Popper"),[GE,My]=Oy("Popper"),XE=t=>{const{__scopePopper:e,children:n}=t,[i,a]=ve.useState(null);return ve.createElement(GE,{scope:e,anchor:i,onAnchorChange:a},n)},KE=ve.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...a}=t,c=My("PopperAnchor",n),f=ve.useRef(null),p=xf(e,f);return ve.useEffect(()=>{c.onAnchorChange((i==null?void 0:i.current)||f.current)}),i?null:ve.createElement(cl.div,mr({},a,{ref:p}))}),[ZE,JE]=Oy("PopperContent"),eT=ve.forwardRef((t,e)=>{const{__scopePopper:n,side:i="bottom",sideOffset:a,align:c="center",alignOffset:f,collisionTolerance:p,avoidCollisions:g=!0,...x}=t,m=My("PopperContent",n),[w,R]=ve.useState(),D=by(m.anchor),[A,z]=ve.useState(null),P=gy(A),[L,M]=ve.useState(null),F=gy(L),$=xf(e,we=>z(we)),Q=function(){const[we,Ee]=ve.useState(void 0);return ve.useEffect(()=>{let Ue;function Fe(){Ee({width:window.innerWidth,height:window.innerHeight})}function Be(){window.clearTimeout(Ue),Ue=window.setTimeout(Fe,100)}return Fe(),window.addEventListener("resize",Be),()=>window.removeEventListener("resize",Be)},[]),we}(),j=Q?DOMRect.fromRect({...Q,x:0,y:0}):void 0,{popperStyles:K,arrowStyles:ee,placedSide:V,placedAlign:ae}=qE({anchorRect:D,popperSize:P,arrowSize:F,arrowOffset:w,side:i,sideOffset:a,align:c,alignOffset:f,shouldAvoidCollisions:g,collisionBoundariesRect:j,collisionTolerance:p}),ge=V!==void 0;return ve.createElement("div",{style:K,"data-radix-popper-content-wrapper":""},ve.createElement(ZE,{scope:n,arrowStyles:ee,onArrowChange:M,onArrowOffsetChange:R},ve.createElement(cl.div,mr({"data-side":V,"data-align":ae},x,{style:{...x.style,animation:ge?void 0:"none"},ref:$}))))}),tT=ve.forwardRef(function(t,e){const{__scopePopper:n,offset:i,...a}=t,c=JE("PopperArrow",n),{onArrowOffsetChange:f}=c;return ve.useEffect(()=>f(i),[f,i]),ve.createElement("span",{style:{...c.arrowStyles,pointerEvents:"none"}},ve.createElement("span",{ref:c.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},ve.createElement(VE,mr({},a,{ref:e,style:{...a.style,display:"block"}}))))}),nT=XE,rT=KE,iT=eT,sT=tT,Py=t=>{const{present:e,children:n}=t,i=function(f){const[p,g]=ve.useState(),x=ve.useRef({}),m=ve.useRef(f),w=ve.useRef("none"),R=f?"mounted":"unmounted",[D,A]=function(z,P){return ve.useReducer((L,M)=>{const F=P[L][M];return F??L},z)}(R,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const z=Mf(x.current);w.current=D==="mounted"?z:"none"},[D]),wf(()=>{const z=x.current,P=m.current;if(P!==f){const L=w.current,M=Mf(z);f?A("MOUNT"):M==="none"||(z==null?void 0:z.display)==="none"?A("UNMOUNT"):A(P&&L!==M?"ANIMATION_OUT":"UNMOUNT"),m.current=f}},[f,A]),wf(()=>{if(p){const z=L=>{const M=Mf(x.current).includes(L.animationName);L.target===p&&M&&A("ANIMATION_END")},P=L=>{L.target===p&&(w.current=Mf(x.current))};return p.addEventListener("animationstart",P),p.addEventListener("animationcancel",z),p.addEventListener("animationend",z),()=>{p.removeEventListener("animationstart",P),p.removeEventListener("animationcancel",z),p.removeEventListener("animationend",z)}}},[p,A]),{isPresent:["mounted","unmountSuspended"].includes(D),ref:ve.useCallback(z=>{z&&(x.current=getComputedStyle(z)),g(z)},[])}}(e),a=typeof n=="function"?n({present:i.isPresent}):ve.Children.only(n),c=xf(i.ref,a.ref);return typeof n=="function"||i.isPresent?ve.cloneElement(a,{ref:c}):null};function Mf(t){return(t==null?void 0:t.animationName)||"none"}Py.displayName="Presence";function Ly(t){const e=ve.useRef(t);return ve.useEffect(()=>{e.current=t},[t]),e.current}function vp(t){const e=ve.useRef(t);return ve.useEffect(()=>{e.current=t}),ve.useMemo(()=>(...n)=>{var i;return(i=e.current)===null||i===void 0?void 0:i.call(e,...n)},[])}function oT(t){const e=vp(t);ve.useEffect(()=>{const n=i=>{i.key==="Escape"&&e(i)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e])}function aT({prop:t,defaultProp:e,onChange:n=()=>{}}){const[i,a]=function({defaultProp:g,onChange:x}){const m=ve.useState(g),[w]=m,R=ve.useRef(w),D=vp(x);return ve.useEffect(()=>{R.current!==w&&(D(w),R.current=w)},[w,R,D]),m}({defaultProp:e,onChange:n}),c=t!==void 0,f=c?t:i,p=vp(n);return[f,ve.useCallback(g=>{if(c){const x=g,m=typeof g=="function"?x(t):g;m!==t&&p(m)}else a(g)},[c,t,a,p])]}function fl(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}const[Dy,ND]=Sy("Tooltip",[Ay]),Pf=Ay(),lT=700,[zD,uT]=Dy("TooltipProvider",{isOpenDelayed:!0,delayDuration:lT,onOpen:()=>{},onClose:()=>{}}),[cT,Lf]=Dy("Tooltip"),fT=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:a=!1,onOpenChange:c,delayDuration:f}=t,p=uT("Tooltip",e),g=Pf(e),[x,m]=ve.useState(null),w=UE(),R=ve.useRef(0),D=f??p.delayDuration,A=ve.useRef(!1),{onOpen:z,onClose:P}=p,[L=!1,M]=aT({prop:i,defaultProp:a,onChange:j=>{j&&(document.dispatchEvent(new CustomEvent("tooltip.open")),z()),c==null||c(j)}}),F=ve.useMemo(()=>L?A.current?"delayed-open":"instant-open":"closed",[L]),$=ve.useCallback(()=>{window.clearTimeout(R.current),A.current=!1,M(!0)},[M]),Q=ve.useCallback(()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>{A.current=!0,M(!0)},D)},[D,M]);return ve.useEffect(()=>()=>window.clearTimeout(R.current),[]),ve.createElement(nT,g,ve.createElement(cT,{scope:e,contentId:w,open:L,stateAttribute:F,trigger:x,onTriggerChange:m,onTriggerEnter:ve.useCallback(()=>{p.isOpenDelayed?Q():$()},[p.isOpenDelayed,Q,$]),onOpen:ve.useCallback($,[$]),onClose:ve.useCallback(()=>{window.clearTimeout(R.current),M(!1),P()},[M,P])},n))},dT=ve.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,a=Lf("TooltipTrigger",n),c=Pf(n),f=xf(e,a.onTriggerChange),p=ve.useRef(!1),g=ve.useCallback(()=>p.current=!1,[]);return ve.useEffect(()=>()=>document.removeEventListener("mouseup",g),[g]),ve.createElement(rT,mr({asChild:!0},c),ve.createElement(cl.button,mr({"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute},i,{ref:f,onMouseEnter:fl(t.onMouseEnter,a.onTriggerEnter),onMouseLeave:fl(t.onMouseLeave,a.onClose),onMouseDown:fl(t.onMouseDown,()=>{a.onClose(),p.current=!0,document.addEventListener("mouseup",g,{once:!0})}),onFocus:fl(t.onFocus,()=>{p.current||a.onOpen()}),onBlur:fl(t.onBlur,a.onClose),onClick:fl(t.onClick,a.onClose)})))}),hT=ve.forwardRef((t,e)=>{const{forceMount:n,...i}=t,a=Lf("TooltipContent",t.__scopeTooltip);return ve.createElement(Py,{present:n||a.open},ve.createElement(pT,mr({ref:e},i)))}),pT=ve.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":a,portalled:c=!0,...f}=t,p=Lf("TooltipContent",n),g=Pf(n),x=c?HE:ve.Fragment,{onClose:m}=p;return oT(()=>m()),ve.useEffect(()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m)),[m]),ve.createElement(x,null,ve.createElement(mT,{__scopeTooltip:n}),ve.createElement(iT,mr({"data-state":p.stateAttribute},g,f,{ref:e,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),ve.createElement(Ug,null,i),ve.createElement(BE,{id:p.contentId,role:"tooltip"},a||i)))}),vT=ve.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,a=Pf(n);return ve.createElement(sT,mr({},a,i,{ref:e}))});function mT(t){const{__scopeTooltip:e}=t,n=Lf("CheckTriggerMoved",e),i=by(n.trigger),a=i==null?void 0:i.left,c=Ly(a),f=i==null?void 0:i.top,p=Ly(f),g=n.onClose;return ve.useEffect(()=>{(c!==void 0&&c!==a||p!==void 0&&p!==f)&&g()},[g,c,p,a,f]),null}const gT=fT,yT=dT,bT=hT,ST=vT;function xT(t,e){if(t==null)return{};var n={},i=Object.keys(t),a,c;for(c=0;c<i.length;c++)a=i[c],!(e.indexOf(a)>=0)&&(n[a]=t[a]);return n}function Ts(t,e){if(t==null)return{};var n=xT(t,e),i,a;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(a=0;a<c.length;a++)i=c[a],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}let Ar;(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"})(Ar||(Ar={}));const wT={[Ar.UNSUPPORTED_INPUT]:(t,e)=>[`An input with type \`${t}\` input was found at path \`${e}\` but it's not supported yet.`],[Ar.NO_COMPONENT_FOR_TYPE]:(t,e)=>[`Type \`${t}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[Ar.UNKNOWN_INPUT]:(t,e)=>[`input at path \`${t}\` is not recognized.`,e],[Ar.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.`],[Ar.ALREADY_REGISTERED_TYPE]:t=>[`Type ${t} has already been registered. You can't register a component with the same type.`],[Ar.CLIPBOARD_ERROR]:t=>["Error copying the value",t],[Ar.THEME_ERROR]:(t,e)=>[`Error accessing the theme \`${t}.${e}\` value.`],[Ar.PATH_DOESNT_EXIST]:t=>[`Error getting the value at path \`${t}\`. There is probably an error in your \`render\` function.`],[Ar.PATH_DOESNT_EXIST]:t=>[`Error accessing the value at path \`${t}\``],[Ar.INPUT_TYPE_OVERRIDE]:(t,e,n)=>[`Input at path \`${t}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${n}\`.`],[Ar.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function ky(t,e,...n){const[i,...a]=wT[e](...n);console[t]("LEVA: "+i,...a)}const Ny=ky.bind(null,"warn");ky.bind(null,"log");function _D(t){return t}function ET(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function Ho(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zy(Object(n),!0).forEach(function(i){ET(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zy(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}const no=(t,e,n)=>t>n?n:t<e?e:t,TT=t=>{if(t===""||typeof t=="number")return t;try{const e=ro(t);if(!isNaN(e))return e}catch{}return parseFloat(t)},CT=Math.log(10);function _y(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)/CT)+1,i=Math.floor(Math.log10(Math.abs(t))),a=Math.pow(10,i-n);return Math.max(a,.001)}const RT=(t,e,n)=>n===e?0:(no(t,e,n)-e)/(n-e),jy=(t,e,n)=>t*(n-e)+e,Iy=/\(([0-9+\-*/^ .]+)\)/,Uy=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,Fy=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,By=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Hy=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Vy=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function ro(t){if(isNaN(Number(t)))if(Iy.test(t)){const e=t.replace(Iy,(n,i)=>String(ro(i)));return ro(e)}else if(Uy.test(t)){const e=t.replace(Uy,(n,i,a)=>String(Math.pow(Number(i),Number(a))));return ro(e)}else if(Fy.test(t)){const e=t.replace(Fy,(n,i,a)=>String(Number(i)*Number(a)));return ro(e)}else if(By.test(t)){const e=t.replace(By,(n,i,a)=>{if(a!=0)return String(Number(i)/Number(a));throw new Error("Division by zero")});return ro(e)}else if(Hy.test(t)){const e=t.replace(Hy,(n,i,a)=>String(Number(i)+Number(a)));return ro(e)}else if(Vy.test(t)){const e=t.replace(Vy,(n,i,a)=>String(Number(i)-Number(a)));return ro(e)}else return Number(t);return Number(t)}let Wy;(function(t){t.BUTTON="BUTTON",t.BUTTON_GROUP="BUTTON_GROUP",t.MONITOR="MONITOR",t.FOLDER="FOLDER"})(Wy||(Wy={}));let $y;(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"})($y||($y={}));const OT=t=>t.shiftKey?5:t.altKey?1/5:1,AT=["value"],MT=["min","max"],PT=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},LT=(t,{min:e=-1/0,max:n=1/0,suffix:i})=>{const a=parseFloat(t);if(t===""||isNaN(a))throw Error("Invalid number");const c=no(a,e,n);return i?c+i:c},DT=(t,{pad:e=0,suffix:n})=>{const i=parseFloat(t).toFixed(e);return n?i+n:i},kT=t=>{let{value:e}=t,n=Ts(t,AT);const{min:i=-1/0,max:a=1/0}=n,c=Ts(n,MT);let f=parseFloat(e);const p=typeof e=="string"?e.substring((""+f).length):void 0;f=no(f,i,a);let g=n.step;g||(Number.isFinite(i)?Number.isFinite(a)?g=+(Math.abs(a-i)/100).toPrecision(1):g=+(Math.abs(f-i)/100).toPrecision(1):Number.isFinite(a)&&(g=+(Math.abs(a-f)/100).toPrecision(1)));const x=g?_y(g)*10:_y(f);g=g||x/10;const m=Math.round(no(Math.log10(1/x),0,2));return{value:p?f+p:f,settings:Ho({initialValue:f,step:g,pad:m,min:i,max:a,suffix:p},c)}},qy=(t,{step:e,initialValue:n})=>{const i=Math.round((t-n)/e);return n+i*e};var NT=Object.freeze({__proto__:null,schema:PT,sanitize:LT,format:DT,normalize:kT,sanitizeStep:qy});function ri(){return ri=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ri.apply(this,arguments)}const zT=T.createContext({});function Cs(){return T.useContext(zT)}const _T=T.createContext(null);T.createContext(null);const jT=T.createContext(null);function IT(){return T.useContext(jT)}const UT=()=>({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 Df(t,e){const[n,i]=t.split(" "),a={};return n!=="none"&&(a.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${n!=="default"&&n||e.borderColor}`),i&&(a.backgroundColor=i),a}const ku={$inputStyle:()=>t=>Df(t,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>t=>Df(t,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>t=>Df(t,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>t=>Df(t,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:Kt,css:jD,createTheme:ID,globalCss:FT,keyframes:UD}=Vw({prefix:"leva",theme:UT(),utils:Ho(Ho({},ku),{},{$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":ku.$focusStyle()(t)}),$focusWithin:t=>({"&:focus-within":ku.$focusStyle()(t)}),$hover:t=>({"&:hover":ku.$hoverStyle()(t)}),$active:t=>({"&:active":ku.$activeStyle()(t)})})});FT({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function BT(t,e){const{theme:n}=T.useContext(_T);if(!(t in n)||!(e in n[t]))return Ny(Ar.THEME_ERROR,t,e),"";let i=e;for(;;){let a=n[t][i];if(typeof a=="string"&&a.charAt(0)==="$")i=a.substr(1);else return a}}const Yy=Kt("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),Qy=Kt("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${Yy}`]:{paddingLeft:0}}),HT=Kt(Qy,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),VT=Kt("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),WT=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],$T=["onUpdate"];function Gy(t){let{innerLabel:e,value:n,onUpdate:i,onChange:a,onKeyDown:c,type:f,id:p,inputType:g="text",rows:x=0}=t,m=Ts(t,WT);const{id:w,emitOnEditStart:R,emitOnEditEnd:D,disabled:A}=Cs(),z=p||w,P=T.useRef(null),L=x>0,M=L?"textarea":"input",F=T.useCallback(j=>K=>{const ee=K.currentTarget.value;j(ee)},[]);T.useEffect(()=>{const j=P.current,K=F(ee=>{i(ee),D()});return j==null||j.addEventListener("blur",K),()=>j==null?void 0:j.removeEventListener("blur",K)},[F,i,D]);const $=T.useCallback(j=>{j.key==="Enter"&&F(i)(j)},[F,i]),Q=Object.assign({as:M},L?{rows:x}:{},m);return T.createElement(VT,{textArea:L},e&&typeof e=="string"?T.createElement(Qy,null,e):e,T.createElement(Yy,ri({levaType:f,ref:P,id:z,type:g,autoComplete:"off",spellCheck:"false",value:n,onChange:F(a),onFocus:()=>R(),onKeyPress:$,onKeyDown:c,disabled:A},Q)))}function qT(t){let{onUpdate:e}=t,n=Ts(t,$T);const i=T.useCallback(c=>e(TT(c)),[e]),a=T.useCallback(c=>{const f=c.key==="ArrowUp"?1:c.key==="ArrowDown"?-1:0;if(f){c.preventDefault();const p=c.altKey?.1:c.shiftKey?10:1;e(g=>parseFloat(g)+f*p)}},[e]);return T.createElement(Gy,ri({},n,{onUpdate:i,onKeyDown:a,type:"number"}))}const mp=Kt("div",{}),Xy=Kt("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"}}]});Kt("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 + ${Xy}::after`]:{opacity:.6},[`${mp}:hover > & + ${Xy}::after`]:{opacity:.6},[`${mp}:hover > & > svg`]:{opacity:1}});const YT=Kt("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"},[`> ${mp}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),Ky=Kt("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${YT} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),QT=Kt(Ky,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),GT=Kt("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"}}}}),XT=Kt("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"}}),gp=Kt("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}});Kt("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${gp}`]:{pointerEvents:"auto"}}}}}),Kt("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"});const KT=Kt("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),ZT=Kt(ST,{fill:"$toolTipBackground"}),JT=["align"];function eC(){const{id:t,disable:e,disabled:n}=Cs();return T.createElement(T.Fragment,null,T.createElement(XT,{id:t+"__disable",type:"checkbox",checked:!n,onChange:()=>e(!n)}),T.createElement("label",{htmlFor:t+"__disable"}))}function tC(t){const{id:e,optional:n,hint:i}=Cs(),a=t.htmlFor||(e?{htmlFor:e}:null),c=!i&&typeof t.children=="string"?{title:t.children}:null;return T.createElement(T.Fragment,null,n&&T.createElement(eC,null),i!==void 0?T.createElement(gT,null,T.createElement(yT,{asChild:!0},T.createElement(gp,ri({},a,t))),T.createElement(bT,{side:"top",sideOffset:2},T.createElement(KT,null,i,T.createElement(ZT,null)))):T.createElement(gp,ri({},a,c,t)))}function kf(t){let{align:e}=t,n=Ts(t,JT);const{value:i,label:a,key:c,disabled:f}=Cs(),{hideCopyButton:p}=IT(),g=!p&&c!==void 0,[x,m]=T.useState(!1),w=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[c]:i??""})),m(!0)}catch{Ny(Ar.CLIPBOARD_ERROR,{[c]:i})}};return T.createElement(GT,{align:e,onPointerLeave:()=>m(!1)},T.createElement(tC,n),g&&!f&&T.createElement("div",{title:`Click to copy ${typeof a=="string"?a:c} value`},x?T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},T.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),T.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"})):T.createElement("svg",{onClick:w,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},T.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),T.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 nC=["toggled"],rC=Kt("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function iC(t){let{toggled:e}=t,n=Ts(t,nC);return T.createElement(rC,ri({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},n),T.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 sC=["input"];function Nf(t){let{input:e}=t,n=Ts(t,sC);return e?T.createElement(QT,n):T.createElement(Ky,n)}function Zy(t,e){const{emitOnEditStart:n,emitOnEditEnd:i}=Cs();return _E(a=>{a.first&&(document.body.classList.add("leva__panel__dragged"),n==null||n());const c=t(a);return a.last&&(document.body.classList.remove("leva__panel__dragged"),i==null||i()),c},e)}const oC=Kt("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),aC=Kt("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),lC=Kt("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)))"}}}}),uC=Kt("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),cC=Kt("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function fC({value:t,min:e,max:n,onDrag:i,step:a,initialValue:c}){const f=T.useRef(null),p=T.useRef(null),g=T.useRef(0),x=BT("sizes","scrubberWidth"),m=Zy(({event:R,first:D,xy:[A],movement:[z],memo:P})=>{if(D){const{width:M,left:F}=f.current.getBoundingClientRect();g.current=M-parseFloat(x),P=(R==null?void 0:R.target)===p.current?t:jy((A-F)/M,e,n)}const L=P+jy(z/g.current,0,n-e);return i(qy(L,{step:a,initialValue:c})),P}),w=RT(t,e,n);return T.createElement(uC,ri({ref:f},m()),T.createElement(aC,null,T.createElement(cC,{style:{left:0,right:`${(1-w)*100}%`}})),T.createElement(lC,{ref:p,style:{left:`calc(${w} * (100% - ${x}))`}}))}const dC=T.memo(({label:t,onUpdate:e,step:n,innerLabelTrim:i})=>{const[a,c]=T.useState(!1),f=Zy(({active:p,delta:[g],event:x,memo:m=0})=>(c(p),m+=g/2,Math.abs(m)>=1&&(e(w=>parseFloat(w)+Math.floor(m)*n*OT(x)),m=0),m));return T.createElement(HT,ri({dragging:a,title:t.length>1?t:""},f()),t.slice(0,i))});function hC({label:t,id:e,displayValue:n,onUpdate:i,onChange:a,settings:c,innerLabelTrim:f=1}){const p=f>0&&T.createElement(dC,{label:t,step:c.step,onUpdate:i,innerLabelTrim:f});return T.createElement(qT,{id:e,value:String(n),onUpdate:i,onChange:a,innerLabel:p})}function pC(){const t=Cs(),{label:e,value:n,onUpdate:i,settings:a,id:c}=t,{min:f,max:p}=a,g=p!==1/0&&f!==-1/0;return T.createElement(Nf,{input:!0},T.createElement(kf,null,e),T.createElement(oC,{hasRange:g},g&&T.createElement(fC,ri({value:parseFloat(n),onDrag:i},a)),T.createElement(hC,ri({},t,{id:c,label:"value",innerLabelTrim:g?0:1}))))}const vC=Ts(NT,["sanitizeStep"]);Ho({component:pC},vC);var mC=Object.freeze({__proto__:null,schema:(t,e)=>to().schema({options:to().passesAnyOf(to().object(),to().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,i,a;return Array.isArray(n)?(a=n,i=n.map(c=>String(c))):(a=Object.values(n),i=Object.keys(n)),"value"in t?a.includes(e)||(i.unshift(String(e)),a.unshift(e)):e=a[0],Object.values(n).includes(e)||(n[String(e)]=e),{value:e,settings:{keys:i,values:a}}}});const gC=Kt("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),yp=Kt("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),yC=Kt("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${yp}:focus + &`]:{$focusStyle:""},[`${yp}:hover + &`]:{$hoverStyle:""}});function bC({displayValue:t,value:e,onUpdate:n,id:i,settings:a,disabled:c}){const{keys:f,values:p}=a,g=T.useRef();return e===p[t]&&(g.current=f[t]),T.createElement(gC,null,T.createElement(yp,{id:i,value:t,onChange:x=>n(p[Number(x.currentTarget.value)]),disabled:c},f.map((x,m)=>T.createElement("option",{key:x,value:m},x))),T.createElement(yC,null,g.current),T.createElement(iC,{toggled:!0}))}function SC(){const{label:t,value:e,displayValue:n,onUpdate:i,id:a,disabled:c,settings:f}=Cs();return T.createElement(Nf,{input:!0},T.createElement(kf,null,t),T.createElement(bC,{id:a,value:e,displayValue:n,onUpdate:i,settings:f,disabled:c}))}Ho({component:SC},mC);var xC=Object.freeze({__proto__:null,schema:t=>to().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 wC=["displayValue","onUpdate","onChange","editable"],EC=Kt("div",{whiteSpace:"pre-wrap"});function TC(t){let{displayValue:e,onUpdate:n,onChange:i,editable:a=!0}=t,c=Ts(t,wC);return a?T.createElement(Gy,ri({value:e,onUpdate:n,onChange:i},c)):T.createElement(EC,null,e)}function CC(){const{label:t,settings:e,displayValue:n,onUpdate:i,onChange:a}=Cs();return T.createElement(Nf,{input:!0},T.createElement(kf,null,t),T.createElement(TC,ri({displayValue:n,onUpdate:i,onChange:a},e)))}Ho({component:CC},xC);var RC=Object.freeze({__proto__:null,schema:t=>to().boolean().test(t),sanitize:t=>{if(typeof t!="boolean")throw Error("Invalid boolean");return t}});const OC=Kt("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 AC({value:t,onUpdate:e,id:n,disabled:i}){return T.createElement(OC,null,T.createElement("input",{id:n,type:"checkbox",checked:t,onChange:a=>e(a.currentTarget.checked),disabled:i}),T.createElement("label",{htmlFor:n},T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},T.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function MC(){const{label:t,value:e,onUpdate:n,disabled:i,id:a}=Cs();return T.createElement(Nf,{input:!0},T.createElement(kf,null,t),T.createElement(AC,{value:e,onUpdate:n,id:a,disabled:i}))}Ho({component:MC},RC),Kt("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});class Vo extends Xi{constructor(e){super(),this.type="spacial-content",this.style={opacity:1},this.format="jpg",this.tileUrl=cw(e.url),this.id=e.id||`${this.tileUrl}--${e.scaleFactor}`,this.points=e.displayPoints?e.displayPoints:ws(e.points,eo(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=lt([...this.points]),i=n.length/5,a=e.crop.x||0,c=e.crop.y||0,f=e.crop.x+e.crop.width,p=e.crop.y+e.crop.height;for(let g=0;g<i;g++){const x=g*5;n[x+1]<f&&n[x+3]>a&&n[x+2]<p&&n[x+4]>c?(n[x+1]=no(n[x+1],a,f),n[x+3]=no(n[x+3],a,f),n[x+2]=no(n[x+2],c,p),n[x+4]=no(n[x+4],c,p)):n[x]=0}Gi(n,Rr(-e.crop.x,-e.crop.y)),this.crop?this.crop.set(n):this.crop=n}}static fromTile(e,n,i,a,c,f){i.height=i.height?i.height:i.width;const p=Math.ceil(n.width/a),g=Math.ceil(n.height/a),x=Math.ceil(p/i.width),m=Math.ceil(g/i.height),w=kt.grid(x,m),R=kt.grid(x,m);for(let A=0;A<m;A++)for(let z=0;z<x;z++){const P=z*i.width,L=A*i.height;R.addPoints(P*a,L*a,z===x-1?n.width:(P+i.width)*a,A===m-1?n.height:(L+i.height)*a),w.addPoints(P,L,z===x-1?p:P+i.width,A===m-1?g:L+i.height)}const D=new Vo({url:e,scaleFactor:a,points:w.build(),displayPoints:R.build(),width:n.width,height:n.height,tileWidth:i.width,format:f});return D.applyProps({service:c}),D}getImageUrl(e){const n=this.points.slice(e*5,e*5+5),i=n[3]-n[1],a=n[4]-n[2],c=Math.ceil(i/this.display.scale);return`${this.tileUrl}/${n[1]},${n[2]},${i},${a}/${c>this.tileWidth?this.tileWidth:c},/0/default.${this.format||"jpg"}`}getAllPointsAt(e,n,i){const a=Ru(this.crop||this.points,e);return[[this,a,n]]}transform(e){Gi(this.points,e)}getScheduledUpdates(e,n){return[]}}class PC extends Xi{constructor(){super(...arguments),this.type="spacial-content"}getAllPointsAt(e,n,i){return[[this,this.points,n]]}}class LC extends PC{constructor(e){super(),this.images=[],this.allImages=[],this.scaleFactors=[],this.aggregateBuffer=lt(9),this.isFullyLoaded=!1,this.maxScaleFactor=0,this._scheduleSortByScales=!1,this._sortByScales=()=>{this._scheduleSortByScales=!1,this.allImages.sort((i,a)=>a.display.width-i.display.width),this.images=[];let n=.1;for(const i of this.allImages){if(i.display.width<this.renderOptions.minSize&&i.display.height<this.renderOptions.minSize&&!i.priority||i instanceof Mi&&(i.display.width>this.renderOptions.maxImageSize||i.display.height>this.renderOptions.maxImageSize)&&!i.priority)continue;if(Math.abs(i.display.scale-n)<.25||i.priority){const c=this.images.pop();c&&(c instanceof Mi||c.priority)?(i.priority&&this.images.push(i),this.images.push(c)):i&&this.images.push(i)}else i&&this.images.push(i);n=i.display.scale}this.images.length===0&&(this.images=[...this.allImages]),this.scaleFactors=this.images.map(i=>i.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=kt.singleBox(e.width,e.height),this.lazyLoader=e.loadFullImages,e.loadFullImages||(this.isFullyLoaded=!0),this.display={x:0,y:0,points:kt.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,i){if(this.images.length===0)return[];const a=uw(1/(i||1)/(window.devicePixelRatio||1),this.images,this.renderOptions.quality),c=this.images.length,f=n?xs(n,Rr(this.x,this.y)):Rr(this.x,this.y);if(a!==this.images.length-1&&this.images[a+1]){let p=[];for(let m=c-1;m>=a;m--)p.push(m);const g=p[0];this.renderOptions.renderLayers&&(p=p.slice(-this.renderOptions.renderLayers)),this.renderOptions.renderSmallestFallback&&p.indexOf(g)===-1&&p.unshift(g);const x=[];for(let m=0;m<p.length;m++)x.push(...this.images[p[m]].getAllPointsAt(e,f,i));return x}return this.images[a].getAllPointsAt(e,f,i)}}function zf(t,e,n,i,a){const c=Math.PI/180*a,f=Math.cos(c),p=Math.sin(c),g=f*(n-t)+p*(i-e)+t,x=f*(i-e)-p*(n-t)+e;return[g,x]}class Nu extends Xi{constructor(e,n){super(),this.type="world-object",this.intersectionBuffer=lt(5),this.aggregateBuffer=lt(9),this.invertedBuffer=lt(9),this.rotation=0,this._updatedList=[];const{x:i=0,y:a=0}=n||{};e?(this.id=e.id||"",this.scale=1,this.layers=e.layers,this.points=lt([1,i,a,i+e.width,a+e.height]),this.worldPoints=lt([1,i,a,i+e.width,a+e.height]),this.filteredPointsBuffer=lt(e.layers.length*5)):(this.id="",this.scale=1,this.layers=[],this.points=lt(5),this.worldPoints=lt(5),this.filteredPointsBuffer=lt(5))}static createWithProps(e){const n=new Nu;return n.applyProps(e),n}applyProps(e){const n=e.x||0,i=e.y||0;this.id=e.id;const a=typeof e.scale<"u"?e.scale:this.scale;this.points[0]=1,this.points[1]=n,this.points[2]=i,this.points[3]=n+e.width,this.points[4]=i+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(a),this.scale=a}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=lt(this.layers.length*5)}insertBefore(e,n){const i=this.layers.indexOf(n);if(i===-1||this.layers.indexOf(e)!==-1)return;const a=this.layers.slice(0,i),c=this.layers.slice(i);this.layers=[...a,e,...c]}hideInstance(){console.warn("hideInstance: not yet implemented")}getObjectsAt(e,n){if(this.rotation&&(e=this.applyRotation(e)),Ru(this.points,e,this.filteredPointsBuffer)[0]===0)return[];const a=this.layers.length,c=[];for(let f=0;f<a;f++){const p=this.layers[f];if(n&&p.isShape){const x=ws(p.points,Rr(this.x,this.y));if(!p.intersects([e[1]-x[1],e[2]-x[2]]))continue}if(Ru(ws(p.points,Rr(this.x,this.y)),e,this.filteredPointsBuffer)[0]!==0&&c.push(p),n){const x=p;c.push(...x.getObjectsAt(e,n))}}return c}applyRotation(e){if(this.rotation){const n={x:e[1],y:e[2]},i={x:e[1],y:e[4]},a={x:e[3],y:e[2]},c={x:e[3],y:e[4]},f=this.points[1]+(this.points[3]-this.points[1])/2,p=this.points[2]+(this.points[4]-this.points[2])/2,[g,x]=zf(f,p,n.x,n.y,this.rotation),[m,w]=zf(f,p,i.x,i.y,this.rotation),[R,D]=zf(f,p,a.x,a.y,this.rotation),[A,z]=zf(f,p,c.x,c.y,this.rotation),P=Math.min(g,m,R,A),L=Math.max(g,m,R,A),M=Math.min(x,w,D,z),F=Math.max(x,w,D,z);return lt([e[0],P,M,L,F])}return e}getAllPointsAt(e,n,i){const a=xs(Rr(this.x,this.y),eo(this.scale),this.aggregateBuffer);this.rotation&&(e=this.applyRotation(e));const c=aw(e,this.points,this.intersectionBuffer),f=this.layers.length,p=[],g=ws(c,xs(eo(1/this.scale),Rr(-this.x,-this.y),this.invertedBuffer)),x=n?xs(n,a,this.aggregateBuffer):a,m=i*this.scale;for(let w=0;w<f;w++)p.push(...this.layers[w].getAllPointsAt(g,x,m));return p}addLayers(e){const n=[];for(const i of e)this.layers.indexOf(i)===-1&&(n.push(i),i.points.length===5&&(i.points[1]<this.worldPoints[1]/this.scale||i.points[2]<this.worldPoints[2]/this.scale||i.points[3]>this.worldPoints[3]/this.scale||i.points[4]>this.worldPoints[4]/this.scale)&&(i.crop=i.crop||lt([1,Math.max(this.worldPoints[1]/this.scale,i.points[1]),Math.max(this.worldPoints[2]/this.scale,i.points[2]),Math.min(this.worldPoints[3]/this.scale,i.points[3]),Math.min(this.worldPoints[4]/this.scale,i.points[4])])));this.layers=this.layers.concat(n),this.filteredPointsBuffer=lt(this.layers.length*5)}getScheduledUpdates(e,n){const i=this.layers.length;this._updatedList=[];const a=n*this.scale;for(let c=0;c<i;c++){const f=this.layers[c].getScheduledUpdates(e,a);f&&this._updatedList.push(...f)}return this._updatedList}}class dl extends Xi{constructor(e=0,n=0,i=100,a="left-to-right"){super(),this.id="world",this.aggregateBuffer=lt(9),this.isDirty=!1,this.zones=[],this.triggerQueue=[],this.activatedEvents=[],this._updatedList=[],this.translationBuffer=lt(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=a,this.points=lt(i*5),this.filteredPointsBuffer=lt(i*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 dl;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,i){const a=[];for(const c of i)if(c.x&&c.y){const f=kt.singleBox(1,1,c.x,c.y);a.push(this.getObjectsAt(f,!0).reverse())}return a.map(c=>this.propagateEvent(e,n,c,{bubbles:!0,cancelable:!0}))}propagatePointerEvent(e,n,i,a,c={}){const f=kt.singleBox(1,1,i,a),p=this.getObjectsAt(f,!0).reverse();return this.propagateEvent(e,n,p,c)}propagateEvent(e,n,i,{bubbles:a=!1,cancelable:c=!1}={}){n.atlasTarget=this,this._propagateEventTargets.length=1,this._propagateEventTargets[0]=this;let f=!1;n.stopPropagation=()=>{f=!0};const p=i.length;for(let m=p-1;m>=0;m--){this._propagateEventTargets.unshift(i[m][0]);const w=i[m][1].length;if(w)for(let R=0;R<w;R++)this._propagateEventTargets.unshift(i[m][1][R])}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,!f);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 i of this.objects)if(i&&i.id===e.id){this.removeChild(i);return}return}this.objects[n]=null,this.renderOrder=this.renderOrder.filter(i=>i!==n),this.points[n*5]=0,this.triggerRepaint(),this.needsRecalculate=!0}insertBefore(e,n){const i=this.objects.indexOf(n);if(i===-1)return;const a=this.appendWorldObject(e);this.renderOrder.splice(i-1,0,a/5)}hideInstance(){}asWorldObject(){return null}addZone(e){this.zones.push(e)}selectZone(e){if(typeof e=="string"){const n=this.zones.length;for(let i=0;i<n;i++)if(this.zones[i].id===e){this.selectedZone=i,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(lw(this.points)===this.objects.length){const e=this.points,n=lt(this.points.length*2);n.set(e,0),this.points=n}}appendWorldObject(e){this.checkResizeInternalBuffer();const n=this.objects.length*5,i=e.points;return e.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),e.points[1]=i[1],e.points[2]=i[2],e.points[3]=i[3],e.points[4]=i[4],this.objects.push(e),this.filteredPointsBuffer=lt(this.objects.length*5),this.needsRecalculate=!0,this.triggerRepaint(),n}recalculateWorldSize(){let e=!1;if(this.needsRecalculate){const n=new Int32Array(this.objects.length),i=new Int32Array(this.objects.length),a=this.renderOrder.length;for(let p=0;p<a;p++){const g=this.renderOrder[p];this.objects[g]&&(n[p]=this.points[g*5+3],i[p]=this.points[g*5+4])}const c=Math.max(...n);c!==this._width&&(this._width=c,e=!0);const f=Math.max(...i);f!==this._height&&(this._height=f,e=!0),e&&this.trigger("recalculate-world-size",{width:c,height:f}),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:i,x:a,y:c}=n,f=i/e.width;this.checkResizeInternalBuffer(),this.points.set(kt.singleBox(e.width,e.height,0,0),this.objects.length*5);const p=new Nu(e);return p.points=this.points.subarray(this.objects.length*5,this.objects.length*5+5),this.objects.push(p),this.scaleWorldObject(this.objects.length-1,f),this.translateWorldObject(this.objects.length-1,a,c),this.filteredPointsBuffer=lt(this.points.length*2),this.triggerRepaint(),this.needsRecalculate=!0,p}scaleWorldObject(e,n){Gi(this.points.subarray(e*5,e*5+5),Ou(n,this.points[e*5+1],this.points[e*5+2]));const i=this.objects[e];i&&(i.atScale(n),this.triggerRepaint())}translateWorldObject(e,n,i){Gi(this.points.subarray(e*5,e*5+5),Rr(n,i));const a=this.objects[e];a&&(a.translate(n,i),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 i=kt.singleBox(e.width,e.height,e.x,e.y);return this.getPointsAt(i,n,e.scale)}addLayoutSubscriber(e){return this.subscriptions.push(e),()=>{this.subscriptions.splice(this.subscriptions.indexOf(e),1)}}getScheduledUpdates(e,n){const i=Ru(this.points,e,this.filteredPointsBuffer),a=this.objects.length;this._updatedList=[];for(let c=0;c<a;c++)if(i[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 i=this.getActiveZone(),a=Ru(this.points,e,this.filteredPointsBuffer),c=this.renderOrder.length,f=[];for(let p=0;p<c;p++){const g=this.renderOrder[p];if(a[g*5]!==0){const x=this.objects[g];if(!x||i&&i.objects.indexOf(x)===-1)continue;if(x.type!=="world-object"){f.push([x,[x]]);continue}n?f.push([x,x.getObjectsAt(e,n)]):f.push([x,this.emptyPaintables])}}return f}getPointsAt(e,n,i=1){const a=this.getObjectsAt(e),c=xs(eo(i),Rr(-e[1],-e[2]),this.translationBuffer),f=n?xs(n,c,this.aggregateBuffer):c,p=a.length,g=[];for(let x=0;x<p;x++)a[x]&&g.push(...a[x][0].getAllPointsAt(e,f,i));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 i=this.subscriptions.length;for(let a=0;a<i;a++)this.subscriptions[a].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,i){this.trigger("zoom-to",{point:n,factor:e,stream:i})}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 _f=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,jf={},DC=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"];class zu extends Xi{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:lt(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=bf(12),this.points=lt(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 i=e.border||e.style.border;if(i!==this._parsed.border.id)if(!i)this._parsed.border.id=null,this._parsed.border.match=[];else{const a=jf[i]||_f.exec(i)||_f.exec(i);a&&(this._parsed.border.id=i,this._parsed.border.match=jf[i]=a)}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 a=jf[e.style.outline]||_f.exec(e.style.outline)||_f.exec(e.style.outline);a&&(this._parsed.outline.id=e.style.outline,this._parsed.outline.match=jf[e.style.outline]=a)}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 a of DC)if(this.props.style[a]!==e.style[a]){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=kt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.points=kt.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 If extends Xi{constructor(){super(),this.type="spacial-content",this.color="#000",this.text="",this.display={x:0,y:0,scale:1,width:100,height:100,points:lt(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=lt(5)}getAllPointsAt(e,n){return[[this,this.points,n]]}applyProps({id:e,target:n,text:i,color:a,backgroundColor:c,fontSize:f=18,interactive:p,fontFamily:g="Arial, sans-serif",...x}){x.font=`${f}px ${g}`,this.interactive=p||!1,typeof i<"u"&&(this.text=i||""),a&&(this.color=a),c&&(this.backgroundColor=c),e&&(this.id=e),n&&(this.points=kt.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 On=Math.pow,Uf=Math.sqrt,_u=Math.sin,Jy=Math.cos,ju=Math.PI,Ff=1.70158,Bf=Ff*1.525,e0=Ff+1,t0=2*ju/3,n0=2*ju/4.5,Hf=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},io={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-On(-2*t+2,2)/2},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1-On(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-On(-2*t+2,3)/2},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1-On(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-On(-2*t+2,4)/2},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1-On(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-On(-2*t+2,5)/2},easeInSine:function(t){return 1-Jy(t*ju/2)},easeOutSine:function(t){return _u(t*ju/2)},easeInOutSine:function(t){return-(Jy(ju*t)-1)/2},easeInExpo:function(t){return t===0?0:On(2,10*t-10)},easeOutExpo:function(t){return t===1?1:1-On(2,-10*t)},easeInOutExpo:function(t){return t===0?0:t===1?1:t<.5?On(2,20*t-10)/2:(2-On(2,-20*t+10))/2},easeInCirc:function(t){return 1-Uf(1-On(t,2))},easeOutCirc:function(t){return Uf(1-On(t-1,2))},easeInOutCirc:function(t){return t<.5?(1-Uf(1-On(2*t,2)))/2:(Uf(1-On(-2*t+2,2))+1)/2},easeInBack:function(t){return e0*t*t*t-Ff*t*t},easeOutBack:function(t){return 1+e0*On(t-1,3)+Ff*On(t-1,2)},easeInOutBack:function(t){return t<.5?On(2*t,2)*((Bf+1)*2*t-Bf)/2:(On(2*t-2,2)*((Bf+1)*(t*2-2)+Bf)+2)/2},easeInElastic:function(t){return t===0?0:t===1?1:-On(2,10*t-10)*_u((t*10-10.75)*t0)},easeOutElastic:function(t){return t===0?0:t===1?1:On(2,-10*t)*_u((t*10-.75)*t0)+1},easeInOutElastic:function(t){return t===0?0:t===1?1:t<.5?-(On(2,20*t-10)*_u((20*t-11.125)*n0))/2:On(2,-20*t+10)*_u((20*t-11.125)*n0)/2+1},easeInBounce:function(t){return 1-Hf(1-t)},easeOutBounce:Hf,easeInOutBounce:function(t){return t<.5?(1-Hf(1-2*t))/2:(1+Hf(2*t-1))/2}};class kC{constructor(e){this.runtime=e,this.pendingTransition={from:lt(5),to:lt(5),elapsed_time:0,done:!0,total_time:0,timingFunction:io.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=lt(this.runtime.target),this.pendingTransition.to=lt(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 i=this.pendingTransition,a=i.total_time===0?0:(i.elapsed_time+n)/i.total_time,c=i.total_time===0?1:a===0?0:i.timingFunction(a);e[1]=i.from[1]+(i.to[1]-i.from[1])*c,e[2]=i.from[2]+(i.to[2]-i.from[2])*c,e[3]=i.from[3]+(i.to[3]-i.from[3])*c,e[4]=i.from[4]+(i.to[4]-i.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:io.easeOutExpo}}))}}zoomTo(e,{origin:n,stream:i=!1,transition:a}={}){const c=this.runtime.getZoomedPosition(e,{origin:n}),f=Math.abs(1-e);this.applyTransition(c,a,{duration:2e3*f,easing:io.easeOutExpo,constrain:!0},{stream:!1})}constrainBounds({transition:e,panPadding:n=0}={}){const[i,a]=this.runtime.constrainBounds(this.runtime.target,{panPadding:n});i&&(this.applyTransition(a,e,{duration:500,easing:io.easeOutQuart,constrain:!1}),this.runtime.updateNextFrame())}applyTransition(e,n,i,{stream:a}={}){this.pendingTransition.from=lt(this.runtime.target),this.pendingTransition.to=e,a||(this.pendingTransition.elapsed_time=0),this.pendingTransition.done=!1,this.pendingTransition.total_time=typeof(n==null?void 0:n.duration)<"u"?n.duration:typeof(i==null?void 0:i.duration)<"u"?i.duration:1e3,this.pendingTransition.constrain=typeof(n==null?void 0:n.constrain)<"u"?n.constrain:typeof(i==null?void 0:i.constrain)<"u"?i.constrain:!1,this.pendingTransition.timingFunction=(n==null?void 0:n.easing)||(i==null?void 0:i.easing)||io.easeInOutSine}goToRegion(e,{transition:n}={}){const i=this.runtime.clampRegion(e);this.applyTransition(kt.singleBox(i.width,i.height,i.x,i.y),n,{duration:1e3,easing:io.easeOutExpo,constrain:!0}),this.runtime.updateNextFrame()}}class Vf{constructor(e,n,i,a=[],c){this.id=bf(),this.ready=!1,this.transformBuffer=lt(500),this.lastTarget=lt(5),this.zoomBuffer=lt(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.hookOptions={filters:{grayscale:0,contrast:0,brightness:0,saturate:0,sepia:0,invert:0,hueRotate:0,blur:0}},this._viewport={x:0,y:0,width:0,height:0},this.setViewport=f=>{const p=typeof f.x>"u"?this.target[1]:f.x,g=typeof f.y>"u"?this.target[2]:f.y;f.width?this.target[3]=p+f.width:this.target[3]=this.target[3]-this.target[1]+p,f.height?this.target[4]=g+f.height:this.target[4]=this.target[4]-this.target[2]+g,Math.abs(this.target[1]-p)>.01&&(this.target[1]=p),Math.abs(this.target[2]-g)>.01&&(this.target[2]=g),this.pendingUpdate=!0},this.render=f=>{const p=f-this.lastTime;if(this.isCommitting||this.fpsLimit&&p<1e3/this.fpsLimit){this.stopId=window.requestAnimationFrame(this.render);return}this.lastTime=f,this.world.flushSubscriptions(),this.stopId=window.requestAnimationFrame(this.render),this.hook("useFrame",p);const g=this.pendingUpdate,x=this.renderer.pendingUpdate();if(this.transitionManager.hasPending()&&(this.transitionManager.runTransition(this.target,p),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",p),this.renderer.beforeFrame(this.world,p,this.target,this.hookOptions);const m=this.getScaleFactor(),w=this.renderer.getPointsAt(this.world,this.target,this.aggregate,m),R=w.length;for(let z=0;z<R;z++){const P=w[z][0],L=w[z][1],M=w[z][2],F=M?ws(L,M,this.transformBuffer):L;this.renderer.prepareLayer(P,P.__parent&&M?ws(P.__parent.crop||P.__parent.points,M):F);const $=F.length/5;for(let Q=0;Q<$;Q++){const j=Q*5;F[j]!==0&&(this.renderer.paint(P,Q,F[j+1],F[j+2],F[j+3]-F[j+1],F[j+4]-F[j+2]),this.hook("useAfterPaint",P))}this.renderer.finishLayer(P,L)}this.renderer.afterFrame(this.world,p,this.target,this.hookOptions),this.hook("useAfterFrame",p),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 D=this.world.getScheduledUpdates(this.target,m),A=D.length;if(A>0)for(let z=0;z<A;z++){const P=D[A-z-1]();P?P.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=kt.projection(i),this.manualHomePosition=!1,this.pendingUpdate=!0,this.homePosition=kt.projection(this.world),this.manualFocalPosition=!1,this.focalPosition=this.target,this.updateFocalPosition(),this.transitionManager=new kC(this),this.aggregate=eo(1),this.world.addLayoutSubscriber(f=>{f==="repaint"&&(this.pendingUpdate=!0),f==="recalculate-world-size"&&(this.manualHomePosition||(this.setHomePosition(),this.goHome()),this.updateFocalPosition())}),this.lastTime=performance.now(),this.controllers=a,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(kt.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(),i=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]},a=this.width*n,c=this.height*n,f=i.width/a,p=i.height/c,g=a/c;if(e.cover?f>p:f<p){const x=g*i.height,m=(x-i.width)/2;this.target[1]=-m+i.x,this.target[2]=i.y,this.target[3]=x-m+i.x,this.target[4]=i.height+i.y}else{const x=i.width/g,m=(x-i.height)/2;this.target[1]=i.x,this.target[2]=i.y-m,this.target[3]=i.x+i.width,this.target[4]=i.y+x-m}this.constrainBounds(this.target),this.updateControllerPosition()}resize(e,n,i,a){this.updateFocalPosition(e-n,i-a);const c=n/e,f=a/i;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])*f,this.goHome({position:this.focalPosition}),this.renderer.resize(n,a),this.pendingUpdate=!0}updateFocalPosition(e,n){if(!this.manualFocalPosition){const i=this.width,a=this.height,c=Math.min(i,a),f=0,p=0,g=this.x+f,x=this.y+p;if(i<a){const m=this.height-this.width;this.focalPosition=kt.projection({x:g,y:x+m/2,width:c-f*2,height:c-p*2}),this.pendingUpdate=!0}else{const m=this.width-this.height;this.focalPosition=kt.projection({x:g+m/2,y:x,width:c-f*2,height:c-p*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:i=!1}={}){const{minX:a,maxX:c,minY:f,maxY:p}=this.getBounds({target:e,padding:n});let g=!1;const x=i?e:lt(e),m=e[3]-e[1],w=e[4]-e[2];return a>e[1]&&(g=!0,x[1]=a,x[3]=a+m),f>e[2]&&(g=!0,x[2]=f,x[4]=f+w),c<e[1]&&(g=!0,x[1]=c,x[3]=c+m),p<e[2]&&(g=!0,x[2]=p,x[4]=p+w),[g,x]}getBounds(e){const n=e.target||this.target,i=e.padding,a=this.options.visibilityRatio,c=Math.abs(1-a);if(this.world.hasActiveZone()){const M=this.world.getActiveZone();if(M){const F=n[3]-n[1]<M.points[3]-M.points[1],$=n[4]-n[2]<M.points[4]-M.points[2];return{minX:F?M.points[1]-i:M.points[1]+(M.points[3]-M.points[1])/2-(n[3]-n[1])/2,maxX:$?M.points[2]-i:M.points[2]+(M.points[4]-M.points[2])/2-(n[4]-n[2])/2,minY:F?M.points[3]+i:M.points[1]+(M.points[3]-M.points[1])/2-(n[3]-n[1])/2,maxY:$?M.points[4]+i:M.points[2]+(M.points[4]-M.points[2])/2-(n[4]-n[2])/2}}}const f=n[3]-n[1],p=this.world.width,g=-f*c,x=p-f-g,m=n[4]-n[2],w=this.world.height,R=-m*c,D=w-m-R,A=Math.max(g,x),z=Math.min(g,x),P=Math.max(R,D),L=Math.min(R,D);return{minX:z,maxX:A,minY:L,maxY:P}}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:i}){var a;const c=i?{width:i[3]-i[1],height:i[4]-i[2]}:void 0,f=c?this.renderer.getScale(c.width,c.height):this.getScaleFactor(),p=c?c.width:this.width,g=c?c.height:this.height,x=(a=this.getRendererScreenPosition())==null?void 0:a.width,m=this.world.width,w=x?x/m:1,R=this.options.maxUnderZoom,D=Math.max(w||1,this.options.maxOverZoom),A=1/e,z=f*A;if(A<1){const M=p*f,F=g*f,$=this.world.width/M,Q=this.world.height/F;if($>Q){const j=this.world.width*z,ee=~~(p*f)*R;j<ee&&(e=this.world.width*f/(p*f*R))}else{const j=this.world.height*z,ee=~~(g*f)*R;j<ee&&(e=this.world.height*f/(g*f*R))}}else z>D&&(e=f/D);const L=ws(this.target,Ou(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(L,{ref:!0,panPadding:100}),L}clampRegion({x:e,y:n,width:i,height:a,padding:c=0}){const f=this.width,p=this.height,g=i/f<a/p,x=e-c,m=n-c,w=i+c*2,R=a+c*2;if(g){const A=R/p*f;return{x:x-(A-w)/2,y:m,width:A,height:R}}const D=w/f*p;return{x,y:m-(D-R)/2,width:w,height:D}}viewerToWorld(e,n){const i=this.getScaleFactor();return this._viewerToWorld.x=this.target[1]+e/i,this._viewerToWorld.y=this.target[2]+n/i,this._viewerToWorld}worldToViewer(e,n,i,a){const c=kt.singleBox(i,a,e,n);return Gi(c,xs(eo(this.getScaleFactor()),Rr(-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){Gi(this.target,Ou(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 i=this.hooks[e].length;if(i!==0)for(let a=0;a<i;a++)this.hooks[e][a](n)}registerHook(e,n){return this.hooks[e].push(n),()=>{this.hooks[e]=this.hooks[e].filter(i=>i!==n)}}updateNextFrame(){this.pendingUpdate=!0}}const Iu=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Wf=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new r0}abort(e=new Error("This operation was aborted")){this.signal.reason=e,this.signal.dispatchEvent({type:"abort",target:this.signal})}},NC=typeof AbortSignal=="function",zC=typeof Wf.AbortSignal=="function",r0=NC?AbortSignal:zC?Wf.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(i=>i!==n))}},bp=new Set,Sp=(t,e)=>{const n=`LRU_CACHE_OPTION_${t}`;$f(n)&&wp(n,`${t} option`,`options.${e}`,Wo)},xp=(t,e)=>{const n=`LRU_CACHE_METHOD_${t}`;if($f(n)){const{prototype:i}=Wo,{get:a}=Object.getOwnPropertyDescriptor(i,t);wp(n,`${t} method`,`cache.${e}()`,a)}},_C=(t,e)=>{const n=`LRU_CACHE_PROPERTY_${t}`;if($f(n)){const{prototype:i}=Wo,{get:a}=Object.getOwnPropertyDescriptor(i,t);wp(n,`${t} property`,`cache.${e}`,a)}},i0=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},$f=t=>!bp.has(t),wp=(t,e,n,i)=>{bp.add(t);const a=`The ${e} is deprecated. Please use ${n} instead.`;i0(a,"DeprecationWarning",t,i)},so=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),s0=t=>so(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?qf:null:null;class qf extends Array{constructor(e){super(e),this.fill(0)}}class jC{constructor(e){if(e===0)return[];const n=s0(e);this.heap=new n(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class Wo{constructor(e={}){const{max:n=0,ttl:i,ttlResolution:a=1,ttlAutopurge:c,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:g,dispose:x,disposeAfter:m,noDisposeOnSet:w,noUpdateTTL:R,maxSize:D=0,maxEntrySize:A=0,sizeCalculation:z,fetchMethod:P,fetchContext:L,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:$,allowStaleOnFetchAbort:Q,ignoreFetchAbort:j}=e,{length:K,maxAge:ee,stale:V}=e instanceof Wo?{}:e;if(n!==0&&!so(n))throw new TypeError("max option must be a nonnegative integer");const ae=n?s0(n):Array;if(!ae)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=D,this.maxEntrySize=A||this.maxSize,this.sizeCalculation=z||K,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=P||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=L,!this.fetchMethod&&L!==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 ae(n),this.prev=new ae(n),this.head=0,this.tail=0,this.free=new jC(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=!!R,this.noDeleteOnFetchRejection=!!M,this.allowStaleOnFetchRejection=!!$,this.allowStaleOnFetchAbort=!!Q,this.ignoreFetchAbort=!!j,this.maxEntrySize!==0){if(this.maxSize!==0&&!so(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!so(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!g||!!V,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=so(a)||a===0?a:1,this.ttlAutopurge=!!c,this.ttl=i||ee||0,this.ttl){if(!so(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";$f(ge)&&(bp.add(ge),i0("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ge,Wo))}V&&Sp("stale","allowStale"),ee&&Sp("maxAge","ttl"),K&&Sp("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new qf(this.max),this.starts=new qf(this.max),this.setItemTTL=(i,a,c=Iu.now())=>{if(this.starts[i]=a!==0?c:0,this.ttls[i]=a,a!==0&&this.ttlAutopurge){const f=setTimeout(()=>{this.isStale(i)&&this.delete(this.keyList[i])},a+1);f.unref&&f.unref()}},this.updateItemAge=i=>{this.starts[i]=this.ttls[i]!==0?Iu.now():0};let e=0;const n=()=>{const i=Iu.now();if(this.ttlResolution>0){e=i;const a=setTimeout(()=>e=0,this.ttlResolution);a.unref&&a.unref()}return i};this.getRemainingTTL=i=>{const a=this.keyMap.get(i);return a===void 0?0:this.ttls[a]===0||this.starts[a]===0?1/0:this.starts[a]+this.ttls[a]-(e||n())},this.isStale=i=>this.ttls[i]!==0&&this.starts[i]!==0&&(e||n())-this.starts[i]>this.ttls[i]}updateItemAge(e){}setItemTTL(e,n,i){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new qf(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,n,i,a)=>{if(this.isBackgroundFetch(n))return 0;if(!so(i))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(i=a(n,e),!so(i))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 i},this.addItemSize=(e,n)=>{if(this.sizes[e]=n,this.maxSize){const i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,n){}requireSize(e,n,i,a){if(i||a)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 i of this.indexes())if(e(this.valList[i],this.keyList[i],this))return this.get(this.keyList[i],n)}forEach(e,n=this){for(const i of this.indexes())e.call(n,this.valList[i],this.keyList[i],this)}rforEach(e,n=this){for(const i of this.rindexes())e.call(n,this.valList[i],this.keyList[i],this)}get prune(){return xp("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 i=this.keyList[n],a=this.valList[n],c=this.isBackgroundFetch(a)?a.__staleWhileFetching:a;if(c===void 0)continue;const f={value:c};if(this.ttls){f.ttl=this.ttls[n];const p=Iu.now()-this.starts[n];f.start=Math.floor(Date.now()-p)}this.sizes&&(f.size=this.sizes[n]),e.unshift([i,f])}return e}load(e){this.clear();for(const[n,i]of e){if(i.start){const a=Date.now()-i.start;i.start=Iu.now()-a}this.set(n,i.value,i)}}dispose(e,n,i){}set(e,n,{ttl:i=this.ttl,start:a,noDisposeOnSet:c=this.noDisposeOnSet,size:f=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL}={}){if(f=this.requireSize(e,n,f,p),this.maxEntrySize&&f>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,f),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,f))}if(i!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),g||this.setItemTTL(x,i,a),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,i=this.keyList[n],a=this.valList[n];return this.isBackgroundFetch(a)?a.__abortController.abort(new Error("evicted")):(this.dispose(a,i,"evict"),this.disposeAfter&&this.disposed.push([a,i,"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(i),this.size--,n}has(e,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const i=this.keyMap.get(e);return i!==void 0&&!this.isStale(i)?(n&&this.updateItemAge(i),!0):!1}peek(e,{allowStale:n=this.allowStale}={}){const i=this.keyMap.get(e);if(i!==void 0&&(n||!this.isStale(i))){const a=this.valList[i];return this.isBackgroundFetch(a)?a.__staleWhileFetching:a}}backgroundFetch(e,n,i,a){const c=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(c))return c;const f=new Wf;i.signal&&i.signal.addEventListener("abort",()=>f.abort(i.signal.reason));const p={signal:f.signal,options:i,context:a},g=(R,D=!1)=>{const{aborted:A}=f.signal,z=i.ignoreFetchAbort&&R!==void 0;return A&&!z&&!D?x(f.signal.reason):(this.valList[n]===w&&(R===void 0?w.__staleWhileFetching?this.valList[n]=w.__staleWhileFetching:this.delete(e):this.set(e,R,p.options)),R)},x=R=>{const{aborted:D}=f.signal,A=D&&i.allowStaleOnFetchAbort,z=A||i.allowStaleOnFetchRejection,P=z||i.noDeleteOnFetchRejection;if(this.valList[n]===w&&(!P||w.__staleWhileFetching===void 0?this.delete(e):A||(this.valList[n]=w.__staleWhileFetching)),z)return w.__staleWhileFetching;if(w.__returned===w)throw R},m=(R,D)=>{this.fetchMethod(e,c,p).then(A=>R(A),D),f.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(R(),i.allowStaleOnFetchAbort&&(R=A=>g(A,!0)))})},w=new Promise(m).then(g,x);return w.__abortController=f,w.__staleWhileFetching=c,w.__returned=null,n===void 0?(this.set(e,w,p.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:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:p=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:x=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:R=this.ignoreFetchAbort,allowStaleOnFetchAbort:D=this.allowStaleOnFetchAbort,fetchContext:A=this.fetchContext,forceRefresh:z=!1,signal:P}={}){if(!this.fetchMethod)return this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a});const L={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:c,noDisposeOnSet:f,size:p,sizeCalculation:g,noUpdateTTL:x,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:D,ignoreFetchAbort:R,signal:P};let M=this.keyMap.get(e);if(M===void 0){const F=this.backgroundFetch(e,M,L,A);return F.__returned=F}else{const F=this.valList[M];if(this.isBackgroundFetch(F))return n&&F.__staleWhileFetching!==void 0?F.__staleWhileFetching:F.__returned=F;if(!z&&!this.isStale(M))return this.moveToTail(M),i&&this.updateItemAge(M),F;const $=this.backgroundFetch(e,M,L,A);return n&&$.__staleWhileFetching!==void 0?$.__staleWhileFetching:$.__returned=$}}get(e,{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet}={}){const c=this.keyMap.get(e);if(c!==void 0){const f=this.valList[c],p=this.isBackgroundFetch(f);return this.isStale(c)?p?n?f.__staleWhileFetching:void 0:(a||this.delete(e),n?f:void 0):p?void 0:(this.moveToTail(c),i&&this.updateItemAge(c),f)}}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 xp("del","delete"),this.delete}delete(e){let n=!1;if(this.size!==0){const i=this.keyMap.get(e);if(i!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(i);const a=this.valList[i];this.isBackgroundFetch(a)?a.__abortController.abort(new Error("deleted")):(this.dispose(a,e,"delete"),this.disposeAfter&&this.disposed.push([a,e,"delete"])),this.keyMap.delete(e),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}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 i=this.keyList[e];this.dispose(n,i,"delete"),this.disposeAfter&&this.disposed.push([n,i,"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 xp("reset","clear"),this.clear}get length(){return _C("length","size"),this.size}static get AbortController(){return Wf}static get AbortSignal(){return r0}}var IC=Wo;const Yf=/([0-9]+(px|em)\s+)+(solid)\s+(.*)/g,Qf={},UC=["backgroundColor","opacity","boxShadow","borderColor","borderWidth","borderStyle","outlineColor","outlineWidth","outlineOffset","outlineStyle"];class o0 extends Xi{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:lt(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=bf(12),this.points=lt(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(f=>f[0])),i=Math.min(...e.map(f=>f[1])),a=Math.max(0,...e.map(f=>f[0])),c=Math.max(0,...e.map(f=>f[1]));this.boundingBox={x:n,y:i,width:a-n,height:c-i};return}this.boundingBox=null}intersects(e){if(!e||this.shape.type==="none")return!1;const[n,i]=e,a=this.shape.points;let c=this.boundingBox;if(c||(this.updateBoundingBox(),c=this.boundingBox),!c||n<c.x||n>c.x+c.width||i<c.y||i>c.height+c.y)return!1;let f=!1;for(let p=0,g=a.length-1;p<a.length;g=p++)a[p][1]>i!=a[g][1]>i&&n<(a[g][0]-a[p][0])*(i-a[p][1])/(a[g][1]-a[p][1])+a[p][0]&&(f=!f);return f}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 i=!1;const a=e.points.length;for(let c=0;c<a;c++)if(e.points[c][0]!==this.shape.points[c][0]||e.points[c][1]!==this.shape.points[c][1]){i=!0;break}i&&(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 i=e.border||e.style.border;if(i!==this._parsed.border.id)if(!i)this._parsed.border.id=null,this._parsed.border.match=[];else{const a=Qf[i]||Yf.exec(i)||Yf.exec(i);a&&(this._parsed.border.id=i,this._parsed.border.match=Qf[i]=a)}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 a=Qf[e.style.outline]||Yf.exec(e.style.outline)||Yf.exec(e.style.outline);a&&(this._parsed.outline.id=e.style.outline,this._parsed.outline.match=Qf[e.style.outline]=a)}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 a of UC)if(this.props.style[a]!==e.style[a]){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=kt.singleBox(e.target.width,e.target.height,e.target.x,e.target.y),this.display.points=kt.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 a0=/(-?[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,l0={},Gf={};class FC{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 i=this.loadingQueue.pop();i&&(this.tasksRunning++,this.frameTasks++,this.currentTask=i.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 IC({maxSize:1024*512*512,dispose:(i,a,c)=>{this.invalidated.push(a),i.width=0,i.height=0},sizeCalculation:(i,a)=>i.width*i.height}):{store:{},get(i){return this.store[i]},set(i,a){this.store[i]=a}}}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,i)=>n.network&&n.scale===i.scale?i.distance-n.distance:n.scale<i.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 i=this.drawCalls.shift();i&&i()}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,i){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const a=this.getCanvasDims(),c=a.width/e,f=a.height/n,p=(c<f?f:c)*(i&&this.dpi||1);return Number.isNaN(p)||(this.lastKnownScale=p),this.lastKnownScale}beforeFrame(e,n,i,a){this.options.debug&&this.stats&&this.stats.begin(),this.frameIsRendering=!0,this.visible=[],this.options.beforeFrame&&this.options.beforeFrame(n);const c=this.getCanvasDims();if(this.ctx.globalAlpha=1,this.ctx.fillStyle=this.options.background||"rgb(0, 0, 0)",this.ctx.fillRect(0,0,c.width,c.height),a.enableFilters&&(a.filters.brightness||a.filters.contrast||a.filters.grayscale||a.filters.invert||a.filters.sepia||a.filters.saturate||a.filters.hueRotate||a.filters.blur)){let f="";a.filters.brightness&&(f+=`brightness(${~~(100+a.filters.brightness*100)}%) `),a.filters.contrast&&(f+=`contrast(${~~(100+a.filters.contrast*100)}%) `),a.filters.grayscale&&(f+=`grayscale(${~~(a.filters.grayscale*100)}%) `),a.filters.invert&&(f+=`invert(${~~(a.filters.invert*100)}%) `),a.filters.sepia&&(f+=`sepia(${~~(a.filters.sepia*100)}%) `),a.filters.saturate&&(f+=`saturate(${~~(100+a.filters.saturate*100)}%) `),a.filters.hueRotate&&(f+=`hue-rotate(${a.filters.hueRotate}deg) `),a.filters.blur&&(f+=`blur(${a.filters.blur}px) `),this.ctx.filter=f}else this.ctx.filter="none"}applyTransform(e,n,i,a,c){const f=e.__owner.value;if(f&&f.rotation){this.ctx.save();const p=n+a/2,g=i+c/2;this.ctx.translate(p,g),this.ctx.rotate(f.rotation*Math.PI/180),this.ctx.translate(-p,-g),this.lastPaintedObject=f}}clearTransform(){this.lastPaintedObject&&(this.lastPaintedObject.rotation&&this.ctx.restore(),this.lastPaintedObject=void 0)}paint(e,n,i,a,c,f){const p=this.ctx.globalAlpha;if(e instanceof Mi||e instanceof Vo){if(e.display.rotation){this.ctx.save();let m=i+c/2,w=a+f/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,Sf({x:i+c/2,y:a+c/2},{x:w.width/2,y:w.height/2})),!this.firstMeaningfulPaint)return;const R=this.hostCache.get(m.canvases[n]);if(R)if(e.crop&&e.cropData){if(e.crop[n*5]){const D=[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];D[0]+=e.cropData.x/e.display.scale,D[1]+=e.cropData.y/e.display.scale;const A=e.x*this.lastKnownScale,z=e.y*this.lastKnownScale,P=[i+A,a+z,c,f];P[0]+=A,P[1]+=z,this.ctx.drawImage(R,D[0],D[1],D[2],D[3],P[0],P[1],P[2]+1,P[3]+1)}}else this.ctx.drawImage(R,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],i,a,c+Number.MIN_VALUE,f+Number.MIN_VALUE)}catch{}e.display.rotation&&this.ctx.restore()}const g=e instanceof zu&&this.options.box,x=e instanceof o0&&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 R=0;typeof m.borderWidth<"u"&&(R=parseInt(m.borderWidth,10)*w);let D=0;typeof m.outlineWidth<"u"&&(D=parseInt(m.outlineWidth,10)*w);let A=0;if(typeof m.outlineOffset<"u"&&(A=parseInt(m.outlineOffset,10)*w),m.borderColor&&(this.ctx.strokeStyle=m.borderColor),m.boxShadow){const z=m.boxShadow.split(/,(?![^(]*\))/);for(const P of z){const L=l0[P]||a0.exec(P)||a0.exec(P);l0[P]=L,L&&(this.ctx.save(),this.ctx.shadowOffsetX=parseInt(L[1])*this.dpi*w,this.ctx.shadowOffsetY=parseInt(L[3])*this.dpi*w,this.ctx.shadowBlur=parseInt(L[5])*this.dpi*w,this.ctx.shadowColor=L[9],this.ctx.fillStyle="rgba(0,0,0,1)",this.ctx.fillRect(i+R,a+R,c,f),this.ctx.restore())}}if(this.ctx.fillStyle=m.backgroundColor||"transparent",this.ctx.lineWidth=R,x){const z=e.shape,P=z.points||[],L=P.length;this.ctx.beginPath();for(let M=0;M<L;M++)this.ctx.lineTo(i+P[M][0]*this.lastKnownScale,a+P[M][1]*this.lastKnownScale);z.open||this.ctx.closePath(),R&&this.ctx.stroke(),z.open||this.ctx.fill()}else R&&this.ctx.strokeRect(i+R/2,a+R/2,c+R,f+R),this.ctx.fillRect(i+R,a+R,c,f);D&&(m.outlineColor&&(this.ctx.strokeStyle=m.outlineColor),this.ctx.lineWidth=D,this.ctx.strokeRect(i-D/2-A,a-D/2-A,c+R*2+D+A*2,f+R*2+D+A*2))}this.ctx.globalAlpha=p}}loadImage(e,n,i,a=!1){if(Gf[e]&&Gf[e].naturalWidth>0){n(Gf[e]);return}try{let c=!1;a||setTimeout(()=>{c||this.loadImage(e,n,i,!0)},3e3);const f=document.createElement("img");f.decoding="auto",f.onload=function(){c=!0,n(f),Gf[e]=f,f.onload=null},this.options.crossOrigin&&(f.crossOrigin="anonymous"),f.src=e,f.complete&&f.onload({}),f.width}catch(c){console.log("image error",c),i(c)}}schedulePaintToCanvas(e,n,i,a){this.imagesPending++,e.indices.push(i);const c=`${n.id}--${n.display.scale}-${i}`,f=this.invalidated.indexOf(c);f!==-1&&this.invalidated.splice(f,1),e.canvases[i]=c,n.__host.canvas.loading=!0,this.loadingQueueOrdered=!1,this.loadingQueue.push({id:c,scale:n.display.scale,network:!0,distance:a,task:()=>new Promise(p=>{if(this.visible.indexOf(n)===-1){this.imagesPending--,e.indices.splice(e.indices.indexOf(i),1),p();return}const g=n.getImageUrl(i);this.loadImage(g,x=>{this.loadingQueue.push({id:c,scale:n.display.scale,distance:a,task:()=>new Promise(m=>{this.imagesLoaded++,e.loaded.push(i),e.loaded.length===e.indices.length&&(e.loading=!1);const w=n.display.points.slice(i*5,i*5+5),R=document.createElement("canvas"),D=R.getContext("2d");R.width=w[3]-w[1],R.height=w[4]-w[2],this.hostCache.set(e.canvases[i],R),this.drawCalls.push(()=>{D.drawImage(x,0,0,w[3]-w[1],w[4]-w[2]),m()})})}),p()},x=>{this.imagesPending--,e.indices.splice(e.indices.indexOf(i),1),p()})})})}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 Mi||e instanceof Vo)&&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,i,a){return e.getPointsAt(n,i,a)}getViewportBounds(e,n,i){const a=e.getActiveZone();if(a){const c=n[3]-n[1]<a.points[3]-a.points[1],f=n[4]-n[2]<a.points[4]-a.points[2];return{x1:c?a.points[1]-i:a.points[1]+(a.points[3]-a.points[1])/2-(n[3]-n[1])/2,y1:f?a.points[2]-i:a.points[2]+(a.points[4]-a.points[2])/2-(n[4]-n[2])/2,x2:c?a.points[3]+i:a.points[1]+(a.points[3]-a.points[1])/2-(n[3]-n[1])/2,y2:f?a.points[4]+i:a.points[2]+(a.points[4]-a.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 u0{constructor(e){this.renderers=[];for(const n of e)n&&this.renderers.push(n);this.length=this.renderers.length}afterFrame(e,n,i,a){for(let c=0;c<this.length;c++)this.renderers[c].afterFrame(e,n,i,a)}afterPaintLayer(e,n){for(let i=0;i<this.length;i++)this.renderers[i].afterPaintLayer(e,n)}beforeFrame(e,n,i,a){for(let c=0;c<this.length;c++)this.renderers[c].beforeFrame(e,n,i,a)}triggerResize(){for(let e=0;e<this.length;e++){const n=this.renderers[e];n.triggerResize&&n.triggerResize()}}getPointsAt(e,n,i,a){return this.renderers[0].getPointsAt(e,n,i,a)}getScale(e,n){return this.renderers[0].getScale(e,n)}getViewportBounds(e,n,i){return this.renderers[0].getViewportBounds(e,n,i)}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,i,a,c,f){for(let p=0;p<this.length;p++)this.renderers[p].paint(e,n,i,a,c,f)}pendingUpdate(){for(let e=0;e<this.length;e++)if(this.renderers[e].pendingUpdate())return!0;return!1}prepareLayer(e,n){for(let i=0;i<this.length;i++)this.renderers[i].prepareLayer(e,n)}finishLayer(e,n){for(let i=0;i<this.length;i++)this.renderers[i].finishLayer(e,n)}resize(e,n){for(let i=0;i<this.length;i++)this.renderers[i].resize(e,n)}reset(){for(let e=0;e<this.length;e++)this.renderers[e].reset()}}class BC{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=eo(1)}isReady(){return!0}resize(){this.initialWidth=this.canvas.width,this.initialHeight=this.canvas.height,this.renderNextFrame=!0}afterFrame(e,n,i){if(this.renderNextFrame){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);const a=this.initialWidth/e.width,c=this.initialHeight/e.height,f=this.widthRatio>this.heightRatio?a:c;if(this.target=i,this.bounds){const p=e.getPointsAt(this.bounds,this.aggregate,f);for(const[g,x]of p)if(g instanceof Mi&&g.__host.canvas){const m=x.length/5;for(let w=0;w<m;w++)g.__host.canvas.canvases[w]&&(x[w+1]*f,x[w+2]*f,(x[w+3]-x[w+1])*f,(x[w+4]-x[w+2])*f)}}e.getPoints().forEach((p,g,x)=>{if(g%5===0&&p){const m={x1:x[g+1]*f,y1:x[g+2]*f,x2:x[g+3]*f,y2:x[g+4]*f,width:(x[g+3]-x[g+1])*f,height:(x[g+4]-x[g+2])*f};this.context.strokeStyle="red",this.context.strokeRect(m.x1,m.y1,m.width,m.height)}}),i&&(this.context.strokeStyle="red",this.context.lineWidth=window.devicePixelRatio||1,this.context.strokeRect(i[1]*f,i[2]*f,(i[3]-i[1])*f,(i[4]-i[2])*f))}}getActiveZone(e){return null}getPointsAt(e,n,i,a){return e.getPointsAt(n,i,a)}getScale(e,n){return 1}beforeFrame(e,n){this.bounds=kt.singleBox(e.width,e.height)}drawImage(){}afterPaintLayer(e,n){}paint(e,n,i,a,c,f){this.renderNextFrame=!0}prepareLayer(e){}pendingUpdate(){return!1}hasActiveZone(){return!1}getViewportBounds(e,n,i){return null}getRendererScreenPosition(){return this.canvas.getBoundingClientRect()}finishLayer(){}reset(){}}var c0=!1,$o,Ep,Tp,Xf,Kf,f0,Zf,Cp,Rp,Op,d0,Ap,Mp,h0,p0;function Br(){if(!c0){c0=!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(Ap=/\b(iPhone|iP[ao]d)/.exec(t),Mp=/\b(iP[ao]d)/.exec(t),Op=/Android/i.exec(t),h0=/FBAN\/\w+;/i.exec(t),p0=/Mobile/i.exec(t),d0=!!/Win64/.exec(t),e){$o=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,$o&&document&&document.documentMode&&($o=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);f0=i?parseFloat(i[1])+4:$o,Ep=e[2]?parseFloat(e[2]):NaN,Tp=e[3]?parseFloat(e[3]):NaN,Xf=e[4]?parseFloat(e[4]):NaN,Xf?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),Kf=e&&e[1]?parseFloat(e[1]):NaN):Kf=NaN}else $o=Ep=Tp=Kf=Xf=NaN;if(n){if(n[1]){var a=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Zf=a?parseFloat(a[1].replace("_",".")):!0}else Zf=!1;Cp=!!n[2],Rp=!!n[3]}else Zf=Cp=Rp=!1}}var Pp={ie:function(){return Br()||$o},ieCompatibilityMode:function(){return Br()||f0>$o},ie64:function(){return Pp.ie()&&d0},firefox:function(){return Br()||Ep},opera:function(){return Br()||Tp},webkit:function(){return Br()||Xf},safari:function(){return Pp.webkit()},chrome:function(){return Br()||Kf},windows:function(){return Br()||Cp},osx:function(){return Br()||Zf},linux:function(){return Br()||Rp},iphone:function(){return Br()||Ap},mobile:function(){return Br()||Ap||Mp||Op||p0},nativeApp:function(){return Br()||h0},android:function(){return Br()||Op},ipad:function(){return Br()||Mp}},HC=Pp,Jf=!!(typeof window<"u"&&window.document&&window.document.createElement),VC={canUseDOM:Jf,canUseWorkers:typeof Worker<"u",canUseEventListeners:Jf&&!!(window.addEventListener||window.attachEvent),canUseViewport:Jf&&!!window.screen,isInWorker:!Jf},WC=VC,v0=WC,m0;v0.canUseDOM&&(m0=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,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=`
|
|
226
|
+
*/function $C(t,e){if(!v0.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i=typeof a[n]=="function"}return!i&&m0&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var qC=$C,YC=HC,QC=qC,g0=10,y0=40,b0=800;function S0(t){var e=0,n=0,i=0,a=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),i=e*g0,a=n*g0,"deltaY"in t&&(a=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||a)&&t.deltaMode&&(t.deltaMode==1?(i*=y0,a*=y0):(i*=b0,a*=b0)),i&&!e&&(e=i<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:a}}S0.getEventType=function(){return YC.firefox()?"DOMMouseScroll":QC("wheel")?"wheel":"mousewheel"};var GC=S0,XC=GC;function KC(t){return{x:t[1],y:t[2],width:t[3]-t[1],height:t[4]-t[2]}}const ZC={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:()=>{}},x0=(t={})=>({start:function(e){const{zoomWheelConstant:n,enableWheel:i,enableClickToZoom:a}={...ZC,...t},c={pointerStart:{x:0,y:0},isPressing:!1,mousemoveBuffer:lt(5),multiTouch:{distance:0}};e.world.activatedEvents.push("onMouseUp","onMouseDown","onMouseMove","onTouchStart","onTouchEnd","onTouchMove","onPointerUp","onPointerDown","onPointerMove");function f(){e.world.constraintBounds(),x=0}function p(P){if(P.which>1){c.isPressing=!1;return}e.mode==="explore"&&(P.preventDefault(),c.pointerStart.x=P.atlas.x,c.pointerStart.y=P.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(P){if(e.mode==="explore"){if(P.atlasTouches.length===1&&(P.preventDefault(),c.pointerStart.x=P.atlasTouches[0].x,c.pointerStart.y=P.atlasTouches[0].y),P.atlasTouches.length===2){P.preventDefault();const L=P.atlasTouches[0].x,M=P.atlasTouches[1].x;c.pointerStart.x=(L+M)/2;const F=P.atlasTouches[0].y,$=P.atlasTouches[1].y;c.pointerStart.y=(F+$)/2,x=Sf({x:P.touches[0].clientX,y:P.touches[0].clientY},{x:P.touches[1].clientX,y:P.touches[1].clientY})}e.transitionManager.stopTransition(),c.isPressing=!0}}function w(P){let L=null,M=null,F=0;if(c.isPressing&&P.touches.length===2){const $=P.touches[0].clientX,Q=P.touches[1].clientX;L=($+Q)/2;const j=P.touches[0].clientY,K=P.touches[1].clientY;M=(j+K)/2,F=Sf({x:P.touches[0].clientX,y:P.touches[0].clientY},{x:P.touches[1].clientX,y:P.touches[1].clientY})}if(c.isPressing&&P.touches.length===1){const $=P.touches[0];L=$.clientX,M=$.clientY}if(L!==null&&M!==null){const $=e.getRendererScreenPosition();if($){const{x:Q,y:j}=e.viewerToWorld(L-$.x,M-$.y),K=F&&x?F/x:1;e.transitionManager.customTransition(ee=>{ee.from=lt(e.target),ee.to=ws(ee.from,xs(Rr(c.pointerStart.x-Q,c.pointerStart.y-j),Ou(1/K,Q,j)),c.mousemoveBuffer),ee.elapsed_time=0,ee.total_time=0,ee.timingFunction=io.easeInOutExpo,ee.done=!1})}x=F}}function R(P){if(c.isPressing){const L=e.getRendererScreenPosition();if(L){const{x:M,y:F}=e.viewerToWorld(P.clientX-L.x,P.clientY-L.y);e.transitionManager.customTransition($=>{$.from=lt(e.target),$.to=ws($.from,Rr(c.pointerStart.x-M,c.pointerStart.y-F),c.mousemoveBuffer),$.elapsed_time=0,$.total_time=0,$.timingFunction=io.easeInOutExpo,$.done=!1})}}}function D(P){e.mode==="explore"&&e.world.zoomIn(P.atlas)}function A(P){const M=1+XC(P).spinY/n;e.world.zoomTo(M,P.atlas,!0)}e.world.addEventListener("mouseup",f),e.world.addEventListener("touchend",f),e.world.addEventListener("touchstart",m),e.world.addEventListener("mousedown",p),window.addEventListener("touchend",g),window.addEventListener("mouseup",g),window.addEventListener("mousemove",R),window.addEventListener("touchmove",w),a&&(e.world.activatedEvents.push("onClick"),e.world.addEventListener("click",D)),i&&(e.world.activatedEvents.push("onWheel"),e.world.addEventListener("wheel",A));const z=e.world.addLayoutSubscriber((P,L)=>{if(P==="zone-changed"&&e.transitionManager.constrainBounds({transition:{duration:0}}),P==="zoom-to"&&L&&e.transitionManager.zoomTo(L.factor,{origin:L.point,stream:L.stream}),P==="go-home"){const M=L.immediate?{duration:0}:void 0;e.transitionManager.goToRegion(KC(e.homePosition),{transition:M})}if(P==="goto-region"&&L){const M=L.immediate?{duration:0}:{};e.transitionManager.goToRegion(L,{transition:M})}P==="constrain-bounds"&&e.transitionManager.constrainBounds({transition:L!=null&&L.immediate?{duration:0}:void 0})});return()=>{e.world.removeEventListener("mouseup",f),e.world.removeEventListener("touchend",f),e.world.removeEventListener("touchstart",m),e.world.removeEventListener("mousedown",p),window.removeEventListener("touchend",g),window.removeEventListener("mouseup",g),e.world.removeEventListener("mousemove",R),e.world.removeEventListener("touchmove",R),a&&e.world.removeEventListener("click",D),i&&e.world.removeEventListener("wheel",A),z()}},updatePosition(){}}),Uu=T.createContext("explore");Uu.displayName="Mode";const JC=()=>T.useContext(Uu);function Lp(t,e,n){var i,a,c,f,p;e==null&&(e=100);function g(){var m=Date.now()-f;m<e&&m>=0?i=setTimeout(g,e-m):(i=null,n||(p=t.apply(c,a),c=a=null))}var x=function(){c=this,a=arguments,f=Date.now();var m=n&&!i;return i||(i=setTimeout(g,e)),m&&(p=t.apply(c,a),c=a=null),p};return x.clear=function(){i&&(clearTimeout(i),i=null)},x.flush=function(){i&&(p=t.apply(c,a),c=a=null,clearTimeout(i),i=null)},x}Lp.debounce=Lp;var w0=Lp;function E0(t){let{debounce:e,scroll:n,polyfill:i,offsetSize:a}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const c=i||(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[f,p]=T.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),g=T.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:f}),x=e?typeof e=="number"?e:e.scroll:null,m=e?typeof e=="number"?e:e.resize:null,w=T.useRef(!1);T.useEffect(()=>(w.current=!0,()=>void(w.current=!1)));const[R,D,A]=T.useMemo(()=>{const M=()=>{if(!g.current.element)return;const{left:F,top:$,width:Q,height:j,bottom:K,right:ee,x:V,y:ae}=g.current.element.getBoundingClientRect(),ge={left:F,top:$,width:Q,height:j,bottom:K,right:ee,x:V,y:ae};g.current.element instanceof HTMLElement&&a&&(ge.height=g.current.element.offsetHeight,ge.width=g.current.element.offsetWidth),Object.freeze(ge),w.current&&!rR(g.current.lastBounds,ge)&&p(g.current.lastBounds=ge)};return[M,m?w0(M,m):M,x?w0(M,x):M]},[p,a,x,m]);function z(){g.current.scrollContainers&&(g.current.scrollContainers.forEach(M=>M.removeEventListener("scroll",A,!0)),g.current.scrollContainers=null),g.current.resizeObserver&&(g.current.resizeObserver.disconnect(),g.current.resizeObserver=null)}function P(){g.current.element&&(g.current.resizeObserver=new c(A),g.current.resizeObserver.observe(g.current.element),n&&g.current.scrollContainers&&g.current.scrollContainers.forEach(M=>M.addEventListener("scroll",A,{capture:!0,passive:!0})))}const L=M=>{!M||M===g.current.element||(z(),g.current.element=M,g.current.scrollContainers=T0(M),P())};return tR(A,!!n),eR(D),T.useEffect(()=>{z(),P()},[n,A,D]),T.useEffect(()=>z,[]),[L,f,R]}function eR(t){T.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function tR(t,e){T.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function T0(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:i,overflowY:a}=window.getComputedStyle(t);return[n,i,a].some(c=>c==="auto"||c==="scroll")&&e.push(t),[...e,...T0(t.parentElement)]}const nR=["x","y","top","bottom","left","right","width","height"],rR=(t,e)=>nR.every(n=>t[n]===e[n]),ed=T.createContext(null);ed.displayName="Atlas";const td=T.createContext(null);td.displayName="Bounds";let nd;if(typeof performance=="object"&&typeof performance.now=="function"){const t=performance;nd=()=>t.now()}else{const t=Date,e=t.now();nd=()=>t.now()-e}function C0(t,e){t&&t.appendChild&&e&&t.appendChild(e)}function R0(t,e){t&&t.removeChild&&e&&t.removeChild(e)}function iR(t,e){return R0(t.world,e)}function sR(t,e,n){return O0(t.world,e,n)}function O0(t,e,n){t&&t instanceof Vf&&(t=t.world),t&&t.insertBefore&&t.insertBefore(e,n)}function A0(t,e,n){if(n&&(t.applyProps&&t.applyProps(n),t instanceof Xi))for(const i of yf){const a=i.slice(2).toLowerCase();n[i]!==e[i]&&(e[i]&&t.removeEventListener(a,e[i]),t.addEventListener(a,n[i]))}}function M0(t,e){const n=Object.keys(e);let i=!1;for(const a of n)if(yf.indexOf(a)!==-1){const c=rl[a];if(c){if(t.activatedEvents.indexOf(c)!==-1)continue;i=!0,t.activatedEvents.push(c)}}i&&t.triggerEventActivation()}const rd=new Map,P0={};function oR(t,{args:e=[],...n},i,a,c){if(!(i instanceof Vf)&&c){const g=x=>x.return?g(x.return):x.stateNode&&x.stateNode.containerInfo;i=g(c)}let f,p=i.world;switch(t){case"world":f=dl.withProps({width:n.width,height:n.height,viewingDirection:"left-to-right"}),f.activatedEvents=p.activatedEvents,f.eventHandlers=p.eventHandlers,f.subscriptions=p.subscriptions,f.triggerEventActivation(),p=f;break;case"box":f=new zu;break;case"shape":f=new o0;break;case"worldObject":case"world-object":f=new Nu;break;case"worldImage":case"world-image":f=new Mi;break;case"texture":f=new rp;break;case"compositeImage":case"composite-image":f=new LC({id:n.id,width:n.width,height:n.height,images:[]});break;case"tiledImage":case"tiled-image":f=Vo.fromTile(n.uri,n.display,n.tile,n.scaleFactor,void 0,n.format);break;case"paragraph":f=new If,f.text=n.children;break;default:return}return M0(p,n),A0(f,{},n),f}function aR(t,e){if(e instanceof dl)t.world=e;else if(e instanceof Nu)t.world.appendChild(e);else if(e)throw new Error("Invalid root")}const Fu=sw({unstable_now:nd,now:nd,createInstance:oR,removeChild:R0,appendChild:C0,appendInitialChild:C0,insertBefore:O0,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:aR,removeChildFromContainer:iR,createTextInstance(){},insertInContainerBefore:sR,prepareUpdate(t,e,n,i,a){return M0(a.world,i),i},commitUpdate(t,e,n,i,a,c){t.applyProps&&e&&A0(t,i,e)},finalizeInitialChildren(t){return t==null?void 0:t.__handlers},getChildHostContext(){return P0},getRootHostContext(){return P0},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}});Fu.injectIntoDevTools({bundleType:0,version:T.version,rendererPackageName:"@atlas-viewer/atlas"});function Dp(t,e){const n=rd.get(t);n&&Fu.updateContainer(null,n,null,()=>{rd.delete(t),e&&e(t)})}const L0={render(t,e){const n=rd.get(e);if(n)Fu.updateContainer(t,n,null,()=>{});else{const i=Fu.createContainer(e,0,null,!1,null,"",()=>{},null);Fu.updateContainer(t,i,null,null),rd.set(e,i)}},unmountComponentAtNode(t,e){Dp(t,e)}},lR=T.memo(({children:t,setIsReady:e,onCreated:n,bounds:i,preset:a,mode:c="explore"})=>{const f=T.useCallback(function(g){const x=T.useRef(!1),m=()=>{e(!0)};return T.useEffect(()=>{if(a&&!x.current){a.runtime.goHome();const w=n&&n(a);return void(w&&w.then?w.then(m):m())}return()=>{}},[]),T.useEffect(()=>{x.current=!0},[]),g.children},[a]);return T.useLayoutEffect(()=>{if(a){const p=a.runtime;c!==p.mode&&(p.mode=c),L0.render(T.createElement(T.StrictMode,null,T.createElement(f,null,T.createElement(td.Provider,{value:i},T.createElement(Uu.Provider,{value:c},T.createElement(ed.Provider,{value:a},t))))),p)}},[a,c,t]),T.useLayoutEffect(()=>{if(a){const p=a.runtime;return()=>{L0.unmountComponentAtNode(p)}}return()=>{}},[a]),null});class uR{constructor(e,n){this.fragmentShaderSource=`
|
|
227
227
|
precision mediump float;
|
|
228
228
|
|
|
229
229
|
uniform sampler2D u_image;
|
|
@@ -256,32 +256,33 @@ No matching component was found for:
|
|
|
256
256
|
|
|
257
257
|
v_texCoord = a_texCoord;
|
|
258
258
|
}
|
|
259
|
-
`,this.lastResize=0,this.lastKnownScale=1,this.canvas=e,this.rendererPosition=e.getBoundingClientRect(),this.gl=e.getContext("webgl2"),this.fragmentShader=this.createShader(this.gl.FRAGMENT_SHADER,this.fragmentShaderSource),this.vertexShader=this.createShader(this.gl.VERTEX_SHADER,this.vertexShaderSource),this.program=this.createProgram(this.vertexShader,this.fragmentShader),this.dpi=(n==null?void 0:n.dpi)||1,this.attributes={position:this.gl.getAttribLocation(this.program,"a_position"),texCoord:this.gl.getAttribLocation(this.program,"a_texCoord")},this.uniforms={resolution:this.gl.getUniformLocation(this.program,"u_resolution"),texture:this.gl.getUniformLocation(this.program,"u_texture")},this.buffers={position:this.createArrayBuffer(),texCoord:this.createArrayBuffer(new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]))},this.rectBuffer=new Float32Array(12),this.resize(),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.gl.clearColor(0,0,0,0),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.useProgram(this.program),this.gl.enableVertexAttribArray(this.attributes.position)}resize(){this.resizeCanvasToDisplaySize(),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.rendererPosition=this.canvas.getBoundingClientRect()}isReady(){return!0}beforeFrame(e,n,
|
|
259
|
+
`,this.lastResize=0,this.lastKnownScale=1,this.canvas=e,this.rendererPosition=e.getBoundingClientRect(),this.gl=e.getContext("webgl2"),this.fragmentShader=this.createShader(this.gl.FRAGMENT_SHADER,this.fragmentShaderSource),this.vertexShader=this.createShader(this.gl.VERTEX_SHADER,this.vertexShaderSource),this.program=this.createProgram(this.vertexShader,this.fragmentShader),this.dpi=(n==null?void 0:n.dpi)||1,this.attributes={position:this.gl.getAttribLocation(this.program,"a_position"),texCoord:this.gl.getAttribLocation(this.program,"a_texCoord")},this.uniforms={resolution:this.gl.getUniformLocation(this.program,"u_resolution"),texture:this.gl.getUniformLocation(this.program,"u_texture")},this.buffers={position:this.createArrayBuffer(),texCoord:this.createArrayBuffer(new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]))},this.rectBuffer=new Float32Array(12),this.resize(),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.gl.clearColor(0,0,0,0),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.useProgram(this.program),this.gl.enableVertexAttribArray(this.attributes.position)}resize(){this.resizeCanvasToDisplaySize(),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.rendererPosition=this.canvas.getBoundingClientRect()}isReady(){return!0}beforeFrame(e,n,i){this.gl.clearColor(0,0,0,0),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.vertexAttribPointer(this.attributes.position,2,this.gl.FLOAT,!1,0,0),this.gl.uniform2f(this.uniforms.resolution,this.gl.canvas.width,this.gl.canvas.height),this.lastResize>1e3&&(this.lastResize=0,this.resizeCanvasToDisplaySize()),this.lastResize+=n}prepareLayer(e){(!e.__host||!e.__host.webgl)&&((e instanceof Mi||e instanceof Vo)&&this.createImageHost(e),e instanceof rp&&this.createTextureHost(e))}createTextureHost(e){e.__host=e.__host?e.__host:{};const n=this.gl,i=this.gl.createTexture();n.bindTexture(n.TEXTURE_2D,i),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);let a;if(e instanceof rp){const c=e.getTexture();c.source&&n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,c.source),a=c}n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),e.__host.webgl={height:e.height,width:e.width,texture:i,lastImage:a}}createImageHost(e){const n=[...new Array(e.points.length/5)];e.__host=e.__host?e.__host:{},e.__host.webgl={height:e.height,width:e.width,textures:n,loading:[],loaded:[],lastLevelRendered:-1,onLoad:(i,a)=>{const c=this.gl,f=this.gl.createTexture();c.bindTexture(c.TEXTURE_2D,f),c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,!1),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,a),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.bindTexture(c.TEXTURE_2D,null),e.__host.webgl.textures[i]=f,e.__host.webgl.loaded.push(i)}}}paint(e,n,i,a,c,f){if(e.type==="spacial-content"&&e.__host&&e.__host.webgl){if(e.getTexture){const g=e==null?void 0:e.getTexture();if(g&&e.__host.webgl.lastImage!==g.hash&&g.source&&!e.__host.webgl.error)try{const m=this.gl.RGBA,w=this.gl.RGBA,R=this.gl.UNSIGNED_BYTE;this.gl.bindTexture(this.gl.TEXTURE_2D,e.__host.webgl.texture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,m,w,R,g.source),e.__host.webgl.lastImage=g.hash}catch(x){e.__host.webgl.error=x}}if(e.__host.webgl.loading&&e.__host.webgl.loading.indexOf(n)===-1&&e.getImageUrl){e.__host.webgl.loading.push(n);const g=document.createElement("img");g.decoding="async",g.crossOrigin="anonymous",g.src=e.getImageUrl(n),g.onload=()=>(g.onload=null,e.__host.webgl.onLoad(n,g))}const p=e.__host.webgl.texture?e.__host.webgl.texture:e.__host.webgl.textures[n];p&&(this.gl.enableVertexAttribArray(this.attributes.texCoord),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffers.texCoord),this.gl.enableVertexAttribArray(this.attributes.texCoord),this.gl.vertexAttribPointer(this.attributes.texCoord,2,this.gl.FLOAT,!1,0,0),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buffers.position),this.gl.enableVertexAttribArray(this.attributes.position),this.gl.vertexAttribPointer(this.attributes.position,2,this.gl.FLOAT,!1,0,0),this.gl.bindTexture(this.gl.TEXTURE_2D,p),this.gl.uniform1i(this.uniforms.texture,0),this.setRectangle(i,a,c,f),this.gl.drawArrays(this.gl.TRIANGLES,0,6))}}afterPaintLayer(e,n){}pendingUpdate(){return!0}getPointsAt(e,n,i,a){return e.getPointsAt(n,i,a)}afterFrame(){}getScale(e,n,i){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const a=this.getCanvasDims(),c=a.width/e,f=a.height/n,p=(c<f?f:c)*(i&&this.dpi||1);return Number.isNaN(p)||(this.lastKnownScale=p),this.lastKnownScale}getCanvasDims(){return{width:this.canvas.width/this.dpi,height:this.canvas.height/this.dpi}}getViewportBounds(e,n,i){return null}createShader(e,n){const i=this.gl.createShader(e);if(i){if(this.gl.shaderSource(i,n),this.gl.compileShader(i),this.gl.getShaderParameter(i,this.gl.COMPILE_STATUS))return i;const c=this.gl.getShaderInfoLog(i);if(this.gl.deleteShader(i),c)throw new Error(c)}throw new Error("Invalid shader")}createProgram(e,n){const i=this.gl.createProgram();if(i){if(this.gl.attachShader(i,e),this.gl.attachShader(i,n),this.gl.linkProgram(i),this.gl.getProgramParameter(i,this.gl.LINK_STATUS))return i;const c=this.gl.getProgramInfoLog(i);if(this.gl.deleteProgram(i),c)throw new Error(c)}throw new Error("Invalid program")}resizeCanvasToDisplaySize(){const e=this.gl.canvas,n=e.clientWidth,i=e.clientHeight,a=e.width!==n||e.height!==i;return a&&(e.width=n,e.height=i),a}createArrayBuffer(e){const n=this.gl.createBuffer();if(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,n),e&&this.gl.bufferData(this.gl.ARRAY_BUFFER,e,this.gl.STATIC_DRAW),!n)throw new Error("Cannot create buffer");return n}setRectangle(e,n,i,a){this.gl.bufferData(this.gl.ARRAY_BUFFER,this.getRectangle(e,n,i,a),this.gl.STATIC_DRAW)}getRectangle(e,n,i,a){const c=e,f=e+i,p=n,g=n+a;return this.rectBuffer.set([c,p,f,p,c,g,c,g,f,p,f,g]),this.rectBuffer}getRendererScreenPosition(){return this.rendererPosition}finishLayer(){}reset(){}}function kp(t,e){const n=e?t:JSON.stringify(t);let i=5381,a=n.length;for(;a;)i=i*33^n.charCodeAt(--a);const f=(i>>>0).toString(16);return f.length%2?"0"+f:f}class D0{constructor(e){this.sheetPrefix=(e==null?void 0:e.sheetPrefix)||"a-",this.$element=document.createElement("style"),this.stylesheetClasses=[],this.activeStylesheetClasses=[],this.sheetsDidUpdate=!1,this.stylesheetEntries={}}getElement(){return this.$element}addStylesheet(e){const n=e.replace(/\s\s+/g," ").replace(/: /g,":").replace(/; /g,";").trim(),i=this.sheetPrefix+kp(n,!0);return this.stylesheetClasses.indexOf(i)!==-1||(this.stylesheetClasses.push(i),this.activeStylesheetClasses.push(i),this.stylesheetEntries[i]=n,this.sheetsDidUpdate=!0),i}removeStylesheet(e){const n=this.sheetPrefix+kp(e,!0);this.stylesheetClasses.indexOf(n)&&(this.stylesheetClasses=this.stylesheetClasses.filter(i=>i!==n)),this.sheetsDidUpdate=!0}clearClasses(){this.activeStylesheetClasses=[]}didUpdateActive(){if(this.activeStylesheetClasses.length){for(const e of this.activeStylesheetClasses)if(this.stylesheetClasses.indexOf(e)===-1)return!0;for(const e of this.stylesheetClasses)if(this.activeStylesheetClasses.indexOf(e)===-1)return!0}return!1}updateSheet(){(this.sheetsDidUpdate||this.didUpdateActive())&&(this.$element.innerText=this.activeStylesheetClasses.map(e=>`.${e}{${this.stylesheetEntries[e]}}`).join(""),this.sheetsDidUpdate=!1,this.stylesheetClasses=[...this.activeStylesheetClasses])}}class k0{constructor(e,n){this.visible=[],this.previousVisible=[],this.htmlIds=[],this.firstMeaningfulPaint=!1,this.paintTx=1,this.zIndex=0,this.htmlContainer=e,this.htmlContainer.innerHTML="",this.rendererPosition=this.htmlContainer.getBoundingClientRect(),this.options={triggerResize:()=>{},box:!1,text:!1,sheetPrefix:"",inlineStyles:!1,background:"",...n||{}},this.stylesheet=new D0({sheetPrefix:this.options.sheetPrefix}),this.options.inlineStyles||this.htmlContainer.appendChild(this.stylesheet.getElement()),this.options.background&&this.htmlContainer.classList.add(this.stylesheet.addStylesheet(`
|
|
260
260
|
background: ${this.options.background};
|
|
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: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(`
|
|
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 i=e.props.hrefTarget||"_blank";n.target=i,i!=="_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,i){if(e.__revision!==e.__host.revision){const a=e.__host.element,c=[this.classes.hostClassName];if(e.props.interactive?this.options.inlineStyles?a.style.pointerEvents="all":c.push(this.classes.interactive):this.options.inlineStyles?a.style.pointerEvents="none":c.push(this.classes.nonInteractive),e.props.href){a.style.display="block",a.href=e.props.href;const g=e.props.hrefTarget||"_blank";a.target=g,g!=="_self"?a.rel="noopener noreferrer":a.rel=""}else a.href&&a.removeAttribute("href");if(e.props.title&&(a.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?(a.style.width=`${n||e.width}px`,a.style.height=`${i||e.height}px`):(a.style.width=`${e.width}px`,a.style.height=`${e.height}px`),e.props.style){Object.assign(a.style,e.props.style||{},e.hovering?e.props.hoverStyles||{}:{},e.pressing?e.props.pressStyles||{}:{});return}if(this.options.text&&e instanceof If){e.text&&(a.innerText=e.text),e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor),e.color&&(a.style.color=e.color),e.props.font&&(a.style.font=e.props.font),e.props.textAlign&&(a.style.textAlign=e.props.textAlign),e.__host.revision=e.__revision;const g=c.join(" ");a.className=g,a.part=g}e instanceof zu&&(this.options.box||e.props.className||e.props.html)&&(e.props.backgroundColor&&(a.style.backgroundColor=e.props.backgroundColor),e.props.border!==a.style.border&&(a.style.border=e.props.border));const p=c.join(" ");a.className=p,a.part=p}}afterFrame(e,n,i){this.stylesheet.updateSheet();for(const a of this.previousVisible)this.visible.indexOf(a)===-1&&this.htmlContainer&&a.__id&&this.htmlIds.indexOf(a.__id)!==-1&&this.htmlContainer.removeChild(a.__host.element);this.previousVisible=this.visible}afterPaintLayer(e,n){}beforeFrame(e,n,i){this.stylesheet.clearClasses(),this.paintTx++,this.zIndex=0,this.visible=[]}getPointsAt(e,n,i,a){return e.getPointsAt(n,i,a)}getScale(e,n){const i=this.rendererPosition.width/e,a=this.rendererPosition.height/n;return i<a?a:i}getViewportBounds(e,n,i){return null}isReady(){return!1}paint(e,n,i,a,c,f){if(this.zIndex++,(this.options.text&&e instanceof If||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,f);const p=c/e.width,g=e.__host.element;g.style.zIndex=`${this.zIndex}`,e.props.relativeStyle?g.style.transform=`translate(${Math.round(i)}px, ${Math.round(a)}px)`:g.style.transform=`translate(${Math.round(i)}px, ${Math.round(a)}px) scale(${p})`,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 If||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 id=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=a=>{this.pointerMoveEvent=a},this.onWheelEvent=a=>{a.preventDefault(),this.onPointerEvent(a)},this.onTouchEvent=a=>{const c=rl[a.type],f=[],p=a.touches.length;for(let g=0;g<p;g++){const x=a.touches.item(g);if(!x)continue;const{x:m,y:w}=this.runtime.viewerToWorld(x.clientX-this.bounds.left,x.clientY-this.bounds.top),R={id:x.identifier,x:m,y:w};f.push(R)}f.length&&this.assignToEvent(a,f[0].x,f[0].y),c!=="onTouchEnd"?(this.pointerEventState.lastTouches=f,a.atlasTouches=f,this.runtime.world.propagateTouchEvent(c,a,f)):(a.atlasTouches=[],this.runtime.world.propagateTouchEvent(c,a,this.pointerEventState.lastTouches),this.pointerEventState.lastTouches=[])},this.onPointerEvent=a=>{const c=rl[a.type];if(c&&this.runtime.world.activatedEvents.indexOf(c)!==-1){const{x:f,y:p}=this.runtime.viewerToWorld(a.clientX-this.bounds.left,a.clientY-this.bounds.top);this.assignToEvent(a,f,p),this.runtime.world.propagatePointerEvent(c,a,f,p)}},this.onPointerDown=a=>{this.pointerEventState.isPressed=!0,this.pointerEventState.isClicking=!0,this.pointerEventState.mouseDownStart.x=a.clientX,this.pointerEventState.mouseDownStart.y=a.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",a,c.x,c.y)}},800),this.onPointerEvent(a)},this.onPointerUp=a=>{if(this.pointerEventState.isClicking){const{x:c,y:f}=this.runtime.viewerToWorld(a.clientX-this.bounds.left,a.clientY-this.bounds.top);this.assignToEvent(a,c,f),this.runtime.world.propagatePointerEvent("onClick",a,c,f)}if(this.pointerEventState.isDragging){for(const c of this.pointerEventState.itemsBeingDragged)c.dispatchEvent("onDragEnd",a);this.pointerEventState.isDragging=!1}this.pointerEventState.isClicking=!1,this.pointerEventState.isPressed=!1,this.pointerEventState.itemsBeingDragged=[],this.onPointerEvent(a)},this.onPointerMove=a=>{this.pointerMoveEvent=void 0;const{x:c,y:f}=this.runtime.viewerToWorld(a.clientX-this.bounds.left,a.clientY-this.bounds.top);if(Number.isNaN(c)||Number.isNaN(f))return;this.assignToEvent(a,c,f),this.runtime.world.propagatePointerEvent("onPointerMove",a,c,f);const p=this.runtime.world.propagatePointerEvent("onMouseMove",a,c,f),g=[],x=[];for(const m of p)g.push(m.id),x.push(m),this.pointerEventState.mousedOver.indexOf(m)===-1&&(m.dispatchEvent("onMouseEnter",a),m.dispatchEvent("onPointerEnter",a),m.dispatchEvent("onMouseOver",a),m.dispatchEvent("onPointerOver",a));for(const m of this.pointerEventState.mousedOver)g.indexOf(m.id)===-1&&(m.dispatchEvent("onMouseLeave",a),m.dispatchEvent("onPointerLeave",a),m.dispatchEvent("onMouseOut",a),m.dispatchEvent("onPointerOut",a));if(this.pointerEventState.isDragging)for(const m of this.pointerEventState.itemsBeingDragged)m.dispatchEvent("onDrag",a);if(this.pointerEventState.isPressed&&!this.pointerEventState.isDragging&&Sf(this.pointerEventState.mouseDownStart,{x:a.clientX,y:a.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",{...a,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 i=0;e.registerHook("useFrame",a=>{i+=a,i>this.options.simulationRate&&this.pointerMoveEvent&&(i=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){id.eventPool.atlas.x=e,id.eventPool.atlas.y=n,t.atlas=id.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 Np=id;Np.eventPool={atlas:{x:0,y:0}};function N0({interactive:t=!0,viewport:e,forceRefresh:n,canvasElement:i,overlayElement:a,controllerConfig:c,unstable_webglRenderer:f,dpi:p,debug:g,canvasBox:x=!0,polygon:m=!0,navigatorElement:w,background:R,runtimeOptions:D}){if(!i)throw new Error("Invalid container");i.style.userSelect="none";const A=t?x0({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,...c||{}}):void 0,z=new u0([f?new uR(i,{dpi:p}):new FC(i,{dpi:p,debug:g,box:x,polygon:m,background:R}),a?new k0(a,{box:f||!x,text:!0,triggerResize:n}):void 0,w?new BC(w):void 0]),P=new Vf(z,new dl(1024,1024),e,A?[A]:[],D),L=new Np(i,P);return{name:"default-preset",em:L,runtime:P,renderer:z,controller:A,canvas:i,navigator:w,unmount(){Dp(P),P.stopControllers(),P.stop(),P.reset(),L&&L.stop()}}}class cR{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:i,height:a}=this.rendererPosition;this.width=i,this.height=a,this.options={addPart:!1,setDraggableFalse:!1,imageClass:"",widthStylesheet:!1,sheetPrefix:"position-",background:"#000",...n||{}},this.stylesheet=new D0({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,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=je=>{ft.current=je,Fe(je)},[it,ue,se,Ie]=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 je=ue.runtime;je.resize(se.current.width,Q.width,se.current.height,Q.height),se.current.width=Q.width,se.current.height=Q.height,je.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 je=ue.runtime.world.width,Be=ue.runtime.world.height,Qe=je/Be,yt=se.current.width,St=se.current.height;let bn=yt/St;if(Qe>bn){bn=St/yt,ue.runtime.manualHomePosition=!0;let j=(je-Be/bn)/2;P==="start"&&(j=0),P==="end"&&(j=je-Be/bn),ue.runtime.setHomePosition({x:j,y:0,width:Be/bn,height:Be})}else{let j=(Be-je/bn)/2;P==="start"&&(j=0),P==="end"&&(j=Be-je/bn),ue.runtime.manualHomePosition=!0,ue.runtime.setHomePosition({x:0,y:j,width:je,height:je/bn})}L&&ue.runtime.goHome({})}},[ue,ke.height,ke.width,P]),C.useLayoutEffect(()=>{const je=()=>{if(ue){const Be=ue.runtime;se.current.width!==Q.width&&se.current.height!==Q.height&&(Be.resize(se.current.width,Q.width,se.current.height,Q.height),se.current.width=Q.width,se.current.height=Q.height,Be.updateNextFrame(),se.current.didUpdate=!0)}};return window.addEventListener("resize",je),()=>window.removeEventListener("resize",je)},[ue,Q.height,Q.width]);const dt={width:120},rn=()=>{if(ue&&ue.navigator){const je=ue.runtime.world.height,Be=ue.runtime.world.width,Qe=window.devicePixelRatio||1,yt=dt.width,St=dt.width/Be*je;ue.navigator.width=yt*Qe,ue.navigator.height=St*Qe,ue.navigator.style.width=yt+"px",ue.navigator.style.height=St+"px"}};C.useLayoutEffect(()=>{if(ue){rn();const je=ue.runtime;return je.world.addLayoutSubscriber(Be=>{Be==="recalculate-world-size"&&(rn(),je.resize(se.current.width,Q.width,se.current.height,Q.height))})}return()=>{}},[ue]);const Xt=C.useCallback(function(Be){const Qe=()=>{me(!0)};return C.useEffect(()=>{if(ue){ue.runtime.goHome();const yt=n&&n(ue);return void(yt&&yt.then?yt.then(Qe):Qe())}else throw new Error("Invalid configuration - no runtime found")},[]),Be.children},[ue]);C.useEffect(()=>{if(ue){const je=ue.runtime;if(o)return je.world.addLayoutSubscriber(Be=>{Be==="recalculate-world-size"&&je.goHome()})}return()=>{}},[ue,o]),C.useEffect(()=>ue?ue.runtime.registerHook("useBeforeFrame",()=>{var Be;if(se.current.didUpdate&&ue.canvas){const Qe=window.devicePixelRatio||1,yt=se.current.width,St=se.current.height;ue.canvas.width=yt*Qe,ue.canvas.height=St*Qe,ue.canvas.style.width=yt+"px",ue.canvas.style.height=St+"px",(Be=ue.canvas.getContext("2d"))==null||Be.scale(Qe,Qe),ue&&ue.em&&ue.em.updateBounds(),se.current.didUpdate=!1}}):()=>{},[ue,o]),C.useEffect(()=>{const je=()=>{ue&&($("sketch"),ct("mode-sketch")),window.removeEventListener("keyup",je)},Be=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",je)}};return window.addEventListener("keydown",Be),()=>{window.removeEventListener("keydown",Be),window.removeEventListener("keyup",je)}},[ue]),C.useLayoutEffect(()=>{if(ft.current&&!B){const Be=getComputedStyle(ft.current).getPropertyValue("--atlas-background");Be&&J(Be)}},[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:Ie.container,tabIndex:0,...M}):C.createElement("canvas",{className:"atlas-canvas",part:"atlas-canvas",tabIndex:0,...Ut,...M,ref:Ie.canvas}),C.createElement(Fu,{className:"atlas-overlay",style:{...m||{}},ref:Ie.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:Ie.navigator})):null,v?C.createElement("style",null,`.atlas-width-${jt} { width: ${Q.width}px; height: ${Q.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,i){this.stylesheet.updateSheet();for(const a of this.previouslyVisible)this.currentlyVisible.indexOf(a)===-1&&this.container.removeChild(a);for(const a of this.currentlyVisible)this.previouslyVisible.indexOf(a)===-1&&this.container.appendChild(a);this.previouslyVisible=this.currentlyVisible,this.currentlyVisible=[]}afterPaintLayer(e,n){}beforeFrame(e,n,i){this.stylesheet.clearClasses(),this.zIndex=0}getPointsAt(e,n,i,a){return e.getPointsAt(n,i,a)}getScale(e,n){if(Number.isNaN(e)||Number.isNaN(n))return this.lastKnownScale;const i=this.width/e,a=this.height/n,c=i<a?a:i;return Number.isNaN(c)||(this.lastKnownScale=c),this.lastKnownScale}getViewportBounds(e,n,i){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,i,a,c,f){if(this.pending=!1,this.zIndex++,e instanceof Mi){if(!e.__host){const g=this.createImage();g.src=e.uri,e.__host=g,this.container.appendChild(e.__host)}const p=e.__host;this.currentlyVisible.push(p),p.style.zIndex=`${this.zIndex}`,p.style.opacity=`${e.style.opacity}`,this.options.widthStylesheet?p.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(c+Number.MIN_VALUE).toFixed(2)}px;height:${(f+Number.MIN_VALUE).toFixed(2)}px;`):(p.style.width=`${c+Number.MIN_VALUE}px`,p.style.height=`${f+Number.MIN_VALUE}px`),p.style.transform=`translate(${i}px, ${a}px)`}if(e instanceof Vo){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 p=e.__host.images[n];p.style.zIndex=`${this.zIndex}`,p.style.opacity=`${e.style.opacity}`,this.currentlyVisible.push(p),this.options.widthStylesheet?p.className=this.options.imageClass+" "+this.stylesheet.addStylesheet(`width:${(c+Number.MIN_VALUE).toFixed(2)}px;height:${(f+Number.MIN_VALUE).toFixed(2)}px;`):(p.style.width=`${c+Number.MIN_VALUE}px`,p.style.height=`${f+Number.MIN_VALUE}px`),p.style.transform=`translate(${i}px, ${a}px)`}}pendingUpdate(){return this.pending}prepareLayer(e){}finishLayer(e){}reset(){}}function fR({interactive:t,viewport:e,forceRefresh:n,containerElement:i,overlayElement:a,controllerConfig:c,background:f}){if(!i)throw new Error("Invalid container");i.style.userSelect="none";const p=t?x0({minZoomFactor:.5,maxZoomFactor:3,enableClickToZoom:!1,...c||{}}):void 0,g=new cR(i,{addPart:!1,setDraggableFalse:!1,imageClass:"atlas-static-image",background:f}),x=a?new u0([g,new k0(a,{box:!0,text:!0,triggerResize:n})]):g,m=new Vf(x,new dl(1024,1024),e,p?[p]:[]),w=new Np(i,m);return{name:"static-preset",em:w,runtime:m,renderer:x,controller:p,container:i,overlay:a,unmount(){Dp(m),m.stopControllers(),m.stop(),w&&w.stop()}}}const dR={"default-preset":N0,"static-preset":fR},hR={};function pR(t,e){const n=T.useRef(),i=T.useRef(),a=T.useRef(),c=T.useRef(),f=T.useRef({width:e.width,height:e.height,didUpdate:!0}),[p="default-preset",g=hR]=Array.isArray(t)?t||[]:[t],[x,m]=T.useState(null);T.useLayoutEffect(()=>{const R=i.current,D=c.current,A=n.current,z=a.current,L=(dR[p]||N0)({containerElement:D,canvasElement:R,overlayElement:A,navigatorElement:z,viewport:f.current,dpi:window.devicePixelRatio||1,forceRefresh:e.forceRefresh,unstable_webglRenderer:e.unstable_webglRenderer,...g||{}});return m(L),()=>{L&&(L.unmount(),R&&(R.height=0,R.width=0),A&&(A.innerHTML=""),z&&(z.height=0,z.width=0))}},[p,g]);const w=T.useMemo(()=>({canvas:i,overlay:n,container:c,navigator:a}),[]);return[p,x,f,w]}function vR(t){return T.useMemo(()=>kp(t),t)}const Bu=T.forwardRef((t,e)=>T.createElement("div",{...t,ref:e,part:t.className})),z0=["brightness","contrast","grayscale","hueRotate","invert","saturate","sepia","blur"],mR=({htmlChildren:t,renderPreset:e,onCreated:n,mode:i="explore",resetWorldOnChange:a=!0,unstable_webglRenderer:c=!1,unstable_noReconciler:f=!1,hideInlineStyle:p=!1,controllerConfig:g,children:x,overlayStyle:m,containerStyle:w,enableNavigator:R,className:D,containerProps:A={},homePosition:z,homeOnResize:P,homeCover:L,background:M,runtimeOptions:F,debug:$,filters:Q,...j})=>{const[K,ee]=T.useState(M),[V,ae]=T.useState(i),[ge,we]=T.useState(!1),Ee=T.useRef(!1),Ue=T.useMemo(()=>(typeof e=="string"&&(e=[e,{}]),K||$?e?[e[0],{debug:$,background:K,...e[1]||{}}]:["default-preset",{background:K,debug:$}]:e||"default-preset"),[e,K,$]),[Fe,Be,vt]=E0({scroll:!0}),Oe=T.useRef(),it=ke=>{Oe.current=ke,Fe(ke)},[nt,W,Re,Ie]=pR(Ue,{width:j.width,height:j.height,forceRefresh:vt,unstable_webglRenderer:c}),[tt,at]=T.useState("");T.useEffect(()=>{ae(i)},[i]),T.useEffect(()=>{W&&W.em&&W.em.updateBounds()},[W,Be]),T.useEffect(()=>{W==null||W.runtime.setOptions(F||{})},[F]),T.useEffect(()=>{W&&W.runtime&&(W.runtime.mode=V),ge&&W&&(W.ready=!0)},[W,ge,V]),T.useEffect(()=>{W&&(L||(W.runtime.manualHomePosition=!!z,W.runtime.setHomePosition(z)))},[W,L,z]),T.useEffect(()=>{if(W){const ke=W.runtime;ke.resize(Re.current.width,j.width,Re.current.height,j.height),Re.current.width=j.width,Re.current.height=j.height,ke.updateNextFrame(),Re.current.didUpdate=!0}},[W,j.width,j.height]),T.useEffect(()=>{if(Q&&W){const ke=W.runtime;let qe=!1;ke.hookOptions.enableFilters=!0;for(const st of z0)Q[st]?Q[st]!==W.runtime.hookOptions.filters[st]&&(ke.hookOptions.filters[st]=Q[st],qe=!0):ke.hookOptions.filters[st]&&(ke.hookOptions.filters[st]=0,qe=!0);qe&&ke.updateNextFrame()}else if(W){const ke=W.runtime;for(const qe of z0)ke.hookOptions.filters[qe]=0;ke.hookOptions.enableFilters=!1,ke.updateNextFrame()}},[W,Q]),T.useLayoutEffect(()=>{if(W&&(W.overlay&&(W.overlay.style.width=`${Be.width}px`,W.overlay.style.height=`${Be.height}px`),W.container&&(W.container.style.width=`${Be.width}px`,W.container.style.height=`${Be.height}px`),L)){const ke=W.runtime.world.width,qe=W.runtime.world.height,st=ke/qe,wt=Re.current.width,vn=Re.current.height;let I=wt/vn;if(st>I){I=vn/wt,W.runtime.manualHomePosition=!0;let N=(ke-qe/I)/2;L==="start"&&(N=0),L==="end"&&(N=ke-qe/I),W.runtime.setHomePosition({x:N,y:0,width:qe/I,height:qe})}else{let N=(qe-ke/I)/2;L==="start"&&(N=0),L==="end"&&(N=qe-ke/I),W.runtime.manualHomePosition=!0,W.runtime.setHomePosition({x:0,y:N,width:ke,height:ke/I})}P&&W.runtime.goHome({})}},[W,Be.height,Be.width,L]),T.useLayoutEffect(()=>{const ke=()=>{if(W){const qe=W.runtime;Re.current.width!==j.width&&Re.current.height!==j.height&&(qe.resize(Re.current.width,j.width,Re.current.height,j.height),Re.current.width=j.width,Re.current.height=j.height,qe.updateNextFrame(),Re.current.didUpdate=!0)}};return window.addEventListener("resize",ke),()=>window.removeEventListener("resize",ke)},[W,j.height,j.width]);const $t={width:120},_t=()=>{if(W&&W.navigator){const ke=W.runtime.world.height,qe=W.runtime.world.width,st=window.devicePixelRatio||1,wt=$t.width,vn=$t.width/qe*ke;W.navigator.width=wt*st,W.navigator.height=vn*st,W.navigator.style.width=wt+"px",W.navigator.style.height=vn+"px"}};T.useLayoutEffect(()=>{if(W){_t();const ke=W.runtime;return ke.world.addLayoutSubscriber(qe=>{qe==="recalculate-world-size"&&(_t(),ke.resize(Re.current.width,j.width,Re.current.height,j.height))})}return()=>{}},[W]);const yt=T.useCallback(function(qe){const st=()=>{we(!0)};return T.useEffect(()=>{if(W){W.runtime.goHome();const wt=n&&n(W);return void(wt&&wt.then?wt.then(st):st())}else throw new Error("Invalid configuration - no runtime found")},[]),qe.children},[W]);T.useEffect(()=>{if(W){const ke=W.runtime;if(a)return ke.world.addLayoutSubscriber(qe=>{qe==="recalculate-world-size"&&ke.goHome()})}return()=>{}},[W,a]),T.useEffect(()=>W?W.runtime.registerHook("useBeforeFrame",()=>{var qe;if(Re.current.didUpdate&&W.canvas){const st=window.devicePixelRatio||1,wt=Re.current.width,vn=Re.current.height;W.canvas.width=wt*st,W.canvas.height=vn*st,W.canvas.style.width=wt+"px",W.canvas.style.height=vn+"px",(qe=W.canvas.getContext("2d"))==null||qe.scale(st,st),W&&W.em&&W.em.updateBounds(),Re.current.didUpdate=!1}}):()=>{},[W,a]),T.useEffect(()=>{const ke=()=>{W&&(ae("sketch"),at("mode-sketch")),window.removeEventListener("keyup",ke)},qe=st=>{if(st.code==="Space"&&W&&W.runtime.mode==="sketch"){if(st.target&&st.target.tagName&&st.target.tagName.toLowerCase()==="input")return;st.preventDefault(),ae("explore"),at("mode-explore"),window.addEventListener("keyup",ke)}};return window.addEventListener("keydown",qe),()=>{window.removeEventListener("keydown",qe),window.removeEventListener("keyup",ke)}},[W]),T.useLayoutEffect(()=>{if(Oe.current&&!K){const qe=getComputedStyle(Oe.current).getPropertyValue("--atlas-background");qe&&ee(qe)}},[K]),Ee.current=!0;const{height:xt,width:Pt,...St}=j,ht=vR([j.width,j.height]);return T.createElement(Bu,{ref:it,className:["atlas",p?"":`atlas-width-${ht}`,tt,D,`atlas-${nt}`].filter(Boolean).join(" ").trim(),style:{...w,...p?{}:{width:j.width,height:j.height}}},nt==="static-preset"?T.createElement(Bu,{className:"atlas-static-container",style:W&&W.controller?void 0:{pointerEvents:"none"},ref:Ie.container,tabIndex:0,...A}):T.createElement("canvas",{className:"atlas-canvas",part:"atlas-canvas",tabIndex:0,...St,...A,ref:Ie.canvas}),T.createElement(Bu,{className:"atlas-overlay",style:{...m||{}},ref:Ie.overlay},f?T.createElement(yt,null,T.createElement(td.Provider,{value:Be},T.createElement(Uu.Provider,{value:V},T.createElement(ed.Provider,{value:W},x)))):T.createElement(lR,{bounds:Be,preset:W,mode:V,setIsReady:we,onCreated:n},x)),R?T.createElement(Bu,{className:"atlas-navigator"},T.createElement("canvas",{className:"atlas-navigator-canvas",part:"atlas-navigator-canvas",ref:Ie.navigator})):null,p?T.createElement("style",null,`.atlas-width-${ht} { width: ${j.width}px; height: ${j.height}px; }`):T.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-${
|
|
268
|
+
.atlas-width-${ht} { width: ${j.width}px; height: ${j.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) }
|
|
272
|
+
.atlas-static-preset { touch-action: inherit; }
|
|
272
273
|
.atlas-static-container { position: relative; overflow: hidden; flex: 1 1 0px; }
|
|
273
274
|
.atlas-overlay { position: absolute; top: 0; left: 0; pointer-events: none; overflow: hidden; }
|
|
274
275
|
.atlas-static-image { position: absolute; pointer-events: none; user-select: none; transform-origin: 0px 0px; }
|
|
275
276
|
.atlas-navigator { position: absolute; top: var(--atlas-navigator-top, 10px); right: var(--atlas-navigator-bottom, 10px); left: var(--atlas-navigator-left); bottom: var(--atlas-navigator-bottom); opacity: .8 }
|
|
276
277
|
.atlas-navigator-canvas { width: 100%; }
|
|
277
|
-
`),t)};function
|
|
278
|
+
`),t)};function gR(t){return Number(t)==t?`${t}px`:t}const yR=({resizeHash:t,aspectRatio:e,containerProps:n={},...i})=>{const[a,c,f]=E0(),{height:p,width:g,...x}=i;T.useEffect(()=>{f()},[g,p,t,f]);const m=T.useMemo(()=>e?{width:c.width,height:c.width*(1/e)}:c,[c,e]);return T.createElement(Bu,{ref:a,className:"atlas-container",...n},m.width?T.createElement(mR,{width:m.width||100,height:m.height||100,...x},i.children):null,i.hideInlineStyle?null:T.createElement("style",null,`
|
|
278
279
|
.atlas-container {
|
|
279
280
|
display: var(--atlas-container-display, block);
|
|
280
281
|
flex: var(--atlas-container-flex, none);
|
|
281
282
|
width: var(--atlas-container-width, ${g?`${g}px`:"100%"});
|
|
282
|
-
height: var(--atlas-container-height, ${
|
|
283
|
+
height: var(--atlas-container-height, ${gR(p||(e?m.height:512))})
|
|
283
284
|
}
|
|
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 zn=()=>{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=zn(),[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=zn(),[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();zn();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=zn(),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=zn().getStore();return C.useMemo(()=>n=>e.dispatch(n),[e])}function V0(t){return typeof t!="string"&&t&&t.bindToVault}function $0(){const t=zn(),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=zn(),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=zn(),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
|
+
`),i.htmlChildren)},_0=()=>T.useContext(ed),sd=()=>{const t=_0();return t?t.runtime:void 0},j0=(t,e=[])=>{const n=sd();T.useEffect(()=>n?n.registerHook("useFrame",t):()=>{},e)},bR=()=>{const t=_0();return t&&t.canvas?t.canvas:void 0};function SR(){return T.useContext(td)}async function xR(t,e,n){if(T.version.startsWith("18.")){const i=await Promise.resolve().then(()=>AM),a=i.default?i.default.createRoot:i.createRoot;n.current||(n.current=a(t)),n.current.render(e)}else if(typeof ReactDOM<"u"){const{render:i,unmountComponentAtNode:a}=ReactDOM;i(e,t),n.current={unmount(){a(t)}}}else{const i=await import("react-dom"),a=i.default?i.default.render:i.render,c=i.default?i.default.unmountComponentAtNode:i.unmountComponentAtNode;a(e,t),n.current={unmount(){c(t)}}}}const zp=T.forwardRef(({children:t,...e},n)=>{const i=T.useRef(),a=sd(),c=T.useRef(0),f=T.useRef(),p=T.useRef();return j0(()=>{var g,x,m,w;if(e.relative){const R=i.current;if(R&&a){const D=a.getScaleFactor();c.current!==D&&(c.current=D,R.style.transformOrigin="0 0",R.style.transform=`scale(${1/c.current})`,R.style.width=`${c.current*100}%`,R.style.height=`${c.current*100}%`,i.current&&((x=(g=f.current)==null?void 0:g.__owner.value)!=null&&x.rotation)&&(R.style.transform=`scale(${1/c.current}) translate(50%, 50%) rotate(${((w=(m=f.current)==null?void 0:m.__owner.value)==null?void 0:w.rotation)||0}deg) translate(-50%, -50%)`))}}},[e.relative]),T.useLayoutEffect(()=>{const g=f.current;n&&g&&(typeof n=="function"?n(g):n.current=g);async function x(){if(g&&g.__host){const m=e.relative?T.createElement("div",{ref:i},t):t;await xR(g.__host.element,m,p)}}g&&g.__host?x():g&&(g.__onCreate=x)},[n,t,f,e.relative]),T.useLayoutEffect(()=>()=>{p.current&&setTimeout(()=>{p.current.unmount()},0)},[]),T.createElement("box",{html:!0,...e,ref:f})});zp.displayName="HTMLPortal";const I0=(t,e,n=[])=>{const i=sd(),a=i?i.world:void 0;T.useEffect(()=>{if(i){const c=e,f=rl[t];i.world.activatedEvents.push(f);const p=f.slice(2).toLowerCase();return i.world.addEventListener(p,c),()=>{i.world.removeEventListener(p,c)}}return()=>{}},[a,t,...n])};function U0(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 wR(){const t=T.useRef({ctrl:!1,shift:!1,alt:!1});return T.useLayoutEffect(()=>{function e(i){i.key==="Shift"&&(t.current.shift=!0),i.key==="Control"&&(t.current.ctrl=!0),i.key==="Alt"&&(t.current.alt=!0)}function n(i){i.key==="Shift"&&(t.current.shift=!1),i.key==="Control"&&(t.current.ctrl=!1),i.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 ER=(t,e)=>{const n=JC(),i=sd(),a=SR(),c=T.useRef(),f=T.useRef(null),p=T.useRef(),[g,x]=T.useState(!1),m=T.useRef(!1),w=T.useRef({north:0,south:0,east:0,west:0}),R=wR(),D=T.useCallback(M=>F=>{if(m.current=!0,x(!0),a&&i){const{top:$,left:Q}=a,j=i.viewerToWorld(F.pageX-Q,F.pageY-$);p.current={x:j.x,y:j.y},c.current=M}},[a,i]),A=T.useMemo(()=>t.width/t.height,[t.width,t.height]),z=T.useCallback(M=>{if(!Math.abs(M.north-M.south+(M.east-M.west)))return;const $=-M.west+M.east,Q=-M.north+M.south,j=t.width+$,K=t.height+Q;if(j/K>=A){const V=K*A,ae=j-V,[ge,we]=U0(M.east,M.west);M.west=M.west+ae*we,M.east=M.east-ae*ge}else{const V=j/A,ae=K-V,[ge,we]=U0(M.north,M.south);M.north=M.north+ae*ge,M.south=M.south-ae*we}},[t.width,t.height,A]);j0(()=>{p&&i&&i.updateNextFrame()}),T.useEffect(()=>{i&&i.updateNextFrame()},[i,g]);const P=T.useCallback(M=>{var F;if(!i||!a||i.mode!=="sketch")return;const{top:$,left:Q}=a,j=i.viewerToWorld(M.pageX-Q,M.pageY-$),K=f.current,ee=!t.maintainAspectRatio&&R.current.alt,V=!ee&&R.current.shift&&((F=c.current)==null?void 0:F.indexOf("-"))!==-1;if((c.current==="translate"||c.current==="east"||c.current==="north-east"||c.current==="south-east")&&(w.current.east=j.x-(p.current?p.current.x:0),ee&&(w.current.west=-w.current.east)),(c.current==="translate"||c.current==="west"||c.current==="north-west"||c.current==="south-west")&&(w.current.west=j.x-(p.current?p.current.x:0),ee&&(w.current.east=-w.current.west)),(c.current==="translate"||c.current==="north"||c.current==="north-east"||c.current==="north-west")&&(w.current.north=j.y-(p.current?p.current.y:0),ee&&(w.current.south=-w.current.north)),(c.current==="translate"||c.current==="south"||c.current==="south-west"||c.current==="south-east")&&(w.current.south=j.y-(p.current?p.current.y:0),ee&&(w.current.north=-w.current.south)),(t.maintainAspectRatio||V)&&z(w.current),K){const ae=w.current.west,ge=w.current.north,we=t.width+w.current.east,Ee=t.height+w.current.south;K.points[1]=Math.min(ae,we),K.points[2]=Math.min(ge,Ee),K.points[3]=Math.max(ae,we),K.points[4]=Math.max(ge,Ee),i.updateNextFrame()}},[i,t.width,t.height,t.maintainAspectRatio,a]);I0("mousemove",P,[t.width,t.height,a]),I0("pointermove",P,[t.width,t.height,a]);const L=T.useRef();return T.useEffect(()=>{L.current=()=>{if(m.current){const M=w.current.west,F=w.current.north,$=t.width+w.current.east,Q=t.height+w.current.south,j=Math.min(M,$),K=Math.min(F,Q),ee=Math.max(M,$),V=Math.max(F,Q),ae={x:(t.x||0)+j,y:(t.y||0)+K,width:ee-j||1,height:V-K||1};t.maintainAspectRatio,e(ae),c.current=void 0,p.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]),T.useEffect(()=>{const M=()=>{L.current&&L.current()};return window.addEventListener("pointerup",M),window.addEventListener("touchend",M),()=>{window.removeEventListener("pointerup",M),window.removeEventListener("touchend",M)}},[]),{portalRef:f,mode:n,mouseEvent:D,onPointerMoveCallback:P,isEditing:g}};function TR({handleSize:t,resizable:e,onSave:n,children:i,maintainAspectRatio:a,disableCardinalControls:c,...f}){const p=typeof t>"u"?a?10:8:t,{portalRef:g,mode:x,mouseEvent:m,isEditing:w}=ER({x:f.x||0,y:f.y||0,width:f.width,height:f.height,maintainAspectRatio:a},n),R=T.useMemo(()=>m("translate"),[m]),D=T.useMemo(()=>m("east"),[m]),A=T.useMemo(()=>m("west"),[m]),z=T.useMemo(()=>m("south"),[m]),P=T.useMemo(()=>m("north"),[m]),L=T.useMemo(()=>m("south-east"),[m]),M=T.useMemo(()=>m("south-west"),[m]),F=T.useMemo(()=>m("north-east"),[m]),$=T.useMemo(()=>m("north-west"),[m]),Q=x==="sketch",j={zIndex:999,boxShadow:"0px 2px 3px 0 rgba(0,0,0,0.2)",border:"1px solid rgba(155,155,155,.7)",borderRadius:a||c?"50%":2,position:"absolute",background:"#fff",pointerEvents:w?"none":Q?"initial":"none"};return T.createElement(T.Fragment,null,T.createElement("world-object",{...f},i,Q&&e?T.createElement(zp,{ref:g,target:{x:0,y:0,height:f.height,width:f.width},relative:!0,interactive:!1},Q&&e?T.createElement(T.Fragment,null,T.createElement("div",{onMouseDown:R,onTouchStart:R,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"}}),a?null:T.createElement(T.Fragment,null,T.createElement("div",{title:"east",onTouchStart:D,onMouseDown:D,style:{...j,cursor:"e-resize",height:p*2,width:p,right:0,top:"50%",opacity:c?0:1,transform:`translate(${p/2}px, -${p}px)`}}),T.createElement("div",{title:"west",onMouseDown:A,style:{...j,cursor:"w-resize",position:"absolute",height:p*2,width:p,left:0,top:"50%",opacity:c?0:1,transform:`translate(-${p/2}px, -${p}px)`}}),T.createElement("div",{title:"north",onMouseDown:P,style:{...j,cursor:"n-resize",position:"absolute",height:p,width:p*2,left:"50%",top:0,opacity:c?0:1,transform:`translate(-${p}px, -${p/2}px)`}}),T.createElement("div",{title:"south",onMouseDown:z,style:{...j,cursor:"s-resize",position:"absolute",height:p,width:p*2,left:"50%",bottom:0,opacity:c?0:1,transform:`translate(-${p}px, ${p/2}px)`}})),T.createElement("div",{title:"north-east",onMouseDown:F,style:{...j,cursor:"ne-resize",position:"absolute",height:p,width:p,right:0,top:0,transform:`translate(${p/2}px, -${p/2}px)`}}),T.createElement("div",{title:"south-east",onMouseDown:L,style:{...j,cursor:"se-resize",position:"absolute",height:p,width:p,bottom:0,right:0,transform:`translate(${p/2}px, ${p/2}px)`}}),T.createElement("div",{title:"south-west",onMouseDown:M,style:{...j,cursor:"sw-resize",position:"absolute",height:p,width:p,bottom:0,left:0,transform:`translate(-${p/2}px, ${p/2}px)`}}),T.createElement("div",{title:"north-west",onMouseDown:$,style:{...j,cursor:"nw-resize",position:"absolute",height:p,width:p,top:0,left:0,transform:`translate(-${p/2}px, -${p/2}px)`}})):null):null))}function CR({interactive:t,region:e,onClick:n,onSave:i,maintainAspectRatio:a,disableCardinalControls:c,isEditing:f,rotation:p,style:g={backgroundColor:"rgba(0,0,0,.5)"}}){const x=T.useCallback(m=>{i({id:e.id,x:e.x,y:e.y,height:e.height,width:e.width,...m})},[i,e.id,e.x,e.y,e.height,e.width]);return T.createElement(TR,{x:e.x,y:e.y,rotation:p,width:e.width,height:e.height,resizable:f,onSave:x,maintainAspectRatio:a,disableCardinalControls:c},T.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 RR=t=>{var e,n,i,a,c;const f=t.width/(((e=t.crop)==null?void 0:e.width)||t.tiles.width),p=t.tiles.imageService.tiles||[],g=t.tiles.imageService.sizes||[],x=t.enableThumbnail,m=t.enableSizes,w=T.useMemo(()=>{const R=t.tiles.imageService.id||t.tiles.imageService["@id"];return R&&R.endsWith("/info.json")?R.slice(0,-1*10):R},[t.tiles.imageService.id]);return T.createElement("world-object",{rotation:t.rotation,key:t.tiles.imageService.id,scale:f,height:((n=t.crop)==null?void 0:n.height)||t.tiles.height,width:((i=t.crop)==null?void 0:i.width)||t.tiles.width,x:t.x,y:t.y,onClick:t.onClick},T.createElement("composite-image",{key:t.tiles.imageService.id,id:t.tiles.imageService.id,width:((a=t.crop)==null?void 0:a.width)||t.tiles.width,height:((c=t.crop)==null?void 0:c.height)||t.tiles.height,crop:t.crop},x&&t.tiles.thumbnail?T.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((R,D)=>T.createElement("world-image",{key:D,uri:`${w}/full/${R.width},${R.height}/0/default.jpg`,target:{width:t.tiles.width,height:t.tiles.height},display:{width:R.width,height:R.height},crop:t.crop})),p.map(R=>(R.scaleFactors||[]).map(D=>T.createElement("tiled-image",{key:`${t.tiles.imageService.id}-tile-${D}`,uri:t.tiles.imageService.id,display:{width:t.tiles.width,height:t.tiles.height},tile:R,scaleFactor:D,crop:t.crop})))))};function OR(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}const AR=T.createContext(null),_p={didCatch:!1,error:null};class MR extends T.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=_p}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,i,a=arguments.length,c=new Array(a),f=0;f<a;f++)c[f]=arguments[f];(n=(i=this.props).onReset)===null||n===void 0||n.call(i,{args:c,reason:"imperative-api"}),this.setState(_p)}}componentDidCatch(e,n){var i,a;(i=(a=this.props).onError)===null||i===void 0||i.call(a,e,n)}componentDidUpdate(e,n){const{didCatch:i}=this.state,{resetKeys:a}=this.props;if(i&&n.error!==null&&PR(e.resetKeys,a)){var c,f;(c=(f=this.props).onReset)===null||c===void 0||c.call(f,{next:a,prev:e.resetKeys,reason:"keys"}),this.setState(_p)}}render(){const{children:e,fallbackRender:n,FallbackComponent:i,fallback:a}=this.props,{didCatch:c,error:f}=this.state;let p=e;if(c){const g={error:f,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")p=n(g);else if(i)p=T.createElement(i,g);else if(a===null||T.isValidElement(a))p=a;else throw f}return T.createElement(AR.Provider,{value:{didCatch:c,error:f,resetErrorBoundary:this.resetErrorBoundary}},p)}}function PR(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((n,i)=>!Object.is(n,e[i]))}const LR={collection:void 0,manifest:void 0,range:void 0,canvas:void 0,annotation:void 0,annotationPage:void 0},od=T.createContext(LR),Rs=()=>T.useContext(od);function oo({value:t,children:e}){const n=Rs(),i=T.useMemo(()=>({...n,...t}),[t,n]);return re.jsx(od.Provider,{value:i,children:e})}const Hu=T.createContext({vault:null,setVaultInstance:t=>{}});function jp({vault:t,vaultOptions:e,useGlobal:n,resources:i,children:a}){const[c,f]=T.useState(()=>t||(n?hf.globalVault(e):e?new hf.Vault(e):new hf.Vault));return re.jsx(Hu.Provider,{value:{vault:c,setVaultInstance:f},children:re.jsx(oo,{value:i||{},children:a})})}const In=()=>{const{vault:t}=T.useContext(Hu);if(t===null)throw new Error("Vault not found. Ensure you have your provider set up correctly.");return t};function Ip(t,{noCache:e=!1}={}){const n=typeof t=="string"?t:t.id,i=In(),[a,c]=T.useState(n),[f,p]=T.useState(void 0),g=T.useMemo(()=>i.get(n,{skipSelfReturn:!0})||void 0,[n,i]),[x,m]=T.useState(g);return T.useEffect(()=>{(async()=>{try{const w=g&&!e?g:await i.load(n),R=w?w.id||w["@id"]:null;w&&a!==R&&c(R),m(w)}catch(w){p(w)}})()},[n,e]),{isLoaded:!!x,id:a,requestId:n,error:f,resource:x,cached:!!(x&&x===g)}}function F0(t,e){const{id:n,isLoaded:i,error:a,resource:c,requestId:f,cached:p}=Ip(t,e);return{id:n,isLoaded:i,error:a,manifest:c,requestId:f,cached:p}}function B0({manifest:t,children:e}){return re.jsx(oo,{value:{manifest:t},children:e})}function Vu({canvas:t,children:e}){return re.jsx(oo,{value:{canvas:t},children:e})}function or(t,e=[]){const n=In(),[i,a]=T.useState(()=>t(n.getState(),n));return T.useEffect(()=>n.subscribe(c=>t(c,n),c=>{a(c)},!1),e),i}const Wu=T.createContext([]);function Up(){const t=T.useContext(Wu);return or(e=>t.map(n=>e.iiif.entities.Canvas[n]).filter(Boolean),[t])}function Zi(t={},e=[]){const{id:n,selector:i}=t,a=Rs();In();const c=n||a.manifest,f=or(p=>c?p.iiif.entities.Manifest[c]:void 0,[c]);return T.useMemo(()=>{if(f)return i?i(f):f},[f,i,...e])}function H0({range:t,children:e}){return re.jsx(oo,{value:{range:t},children:e})}function V0(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 i=V0(t,t.get(n));if(i)return i}}return null}function Fp(t,e){var i;const n=[];for(const a of e.items)if(a.type==="SpecificResource"&&((i=a.source)==null?void 0:i.type)==="Canvas"&&(a.source.id.indexOf("#")!==-1?n.push({id:a.source.id.split("#")[0],type:"Canvas"}):n.push(a.source)),a.type==="Range"&&n.push(...Fp(t,t.get(a))),a.type==="SpecificResource"){const c=typeof a.source=="string"?a.source:a.source.id;n.push({id:c,type:"Canvas"})}return n}function DR(t,e,n){for(const i of e.structures){const a=Bp(t,t.get(i),n);if(a)return a}return null}function Bp(t,e,n){var i,a,c;for(const f of e.items){const p=(a=(i=f==null?void 0:f.source)==null?void 0:i.id)==null?void 0:a.split("#")[0];if(f.type==="SpecificResource"&&f.source===n||f.type==="SpecificResource"&&((c=f.source)==null?void 0:c.type)==="Canvas"&&n===p)return e;if(f.type==="Range"){const g=Bp(t,t.get(f),n);if(g)return g}}return null}function kR(t,e,n,i=!1){const a=e.behavior,c=n?t.get(n):null;if(!c)return[];const f=c.behavior,p=i?!1:a.includes("paged"),g=p?!1:a.includes("continuous"),x=p||g?!1:a.includes("individuals"),m=f.includes("facing-pages"),w=f.includes("non-paged");if(m||w||x||i)return[{id:c.id,type:"Canvas"}];const[R,D]=Hp(t,e);if(g)return R;const A=R.findIndex(z=>z.id===n);if(A===-1)return[];for(const z of D)if(z.includes(A))return z.map(P=>R[P]);return[{id:c.id,type:"Canvas"}]}function Hp(t,e,{disablePaging:n,skipNonPaged:i}={}){const a=e.behavior,c=a.includes("paged"),f=c?!1:a.includes("continuous"),p=c||f?!1:a.includes("individuals"),g=e.type==="Manifest"?e.items:Fp(t,e);if(f)return[g,[g.map((A,z)=>z)]];if(p||!c||n)return[g,g.map((A,z)=>[z])];const x=[];let m=[];const w=()=>{m.length&&(x.push([...m]),m=[])};let R=0,D=!1;for(let A=0;A<g.length;A++){const z=t.get(g[A]);if(z.behavior.includes("non-paged")){A===R&&R++,i||(w(),x.push([A]),w());continue}if(A===R||z.behavior.includes("facing-pages")){m.length&&(D=!0),w(),x.push([A]),w();continue}if(m.push(A),D){w(),D=!1;continue}m.length>1&&w()}return m.length&&w(),[g,x]}function Vp(t={},e=[]){const{id:n,selector:i}=t,a=Rs(),c=n||a.range,f=or(p=>c?p.iiif.entities.Range[c]:void 0,[c]);return T.useMemo(()=>{if(f)return i?i(f):f},[f,i,...e])}function W0({startCanvas:t,disablePaging:e}){var A;const n=In(),i=Zi(),a=Vp(),[c,f]=T.useState(void 0),p=a||i;if(!p)throw new Error("Nothing selected");const[g,x]=T.useMemo(()=>Hp(n,p,{disablePaging:e}),[n,p]),m=T.useCallback(z=>{const P=x.findIndex(L=>L.includes(z));f(P===-1?0:P)},[g,x]),w=T.useCallback(z=>{const P=g.findIndex(L=>L.id===z);P!==-1?m(P):f(0)},[g,x]),R=T.useCallback(()=>{f(z=>z>=x.length-1?z:z+1)},[x]),D=T.useCallback(()=>{f(z=>z<=0?0:z-1)},[x]);return typeof c>"u"&&(t?w(t):f(0)),{visibleItems:((A=x[c])==null?void 0:A.map(z=>g[z].id))||[],cursor:c,items:g,sequence:x,hasPrevious:c>0,hasNext:c<x.length-1,setSequenceIndex:f,setCanvasIndex:m,setCanvasId:w,next:R,previous:D}}const $u=()=>{},qu=T.createContext({setCurrentCanvasId:$u,setCurrentCanvasIndex:$u,nextCanvas:$u,previousCanvas:$u,items:[],sequence:[],setSequenceIndex:$u,currentSequenceIndex:0,hasNext:!1,hasPrevious:!1});function $0(t){const e=Zi(),{cursor:n,visibleItems:i,next:a,sequence:c,items:f,setCanvasIndex:p,setCanvasId:g,previous:x,setSequenceIndex:m,hasNext:w,hasPrevious:R}=W0({startCanvas:t.startCanvas,disablePaging:t.pagingEnabled===!1}),D=T.useMemo(()=>({sequence:c,items:f,setCurrentCanvasId:g,nextCanvas:a,previousCanvas:x,totalCanvases:f.length,setCurrentCanvasIndex:p,setSequenceIndex:m,currentSequenceIndex:n,hasNext:w,hasPrevious:R}),[c,f,g,a,x,f,p,m,n]);return e?i.length===0?null:re.jsx(qu.Provider,{value:D,children:re.jsx(Wu.Provider,{value:i,children:re.jsx(Vu,{canvas:i[0],children:t.children})})}):(console.warn("The manifest passed to the provider is not a valid IIIF manifest."),re.jsx("div",{children:"Sorry, something went wrong."}))}function q0(t){const e=F0(t.manifest);if(!e)return console.warn("The manifest passed to the provider is not a valid IIIF manifest."),re.jsx("div",{children:"Sorry, something went wrong."});if(e.error)return re.jsx("div",{children:e.error.toString()});if(!e.isLoaded)return re.jsx("div",{children:"Loading..."});const n=re.jsx($0,{...t,children:t.children});return re.jsx(B0,{manifest:e.id,children:t.rangeId?re.jsx(H0,{range:t.rangeId,children:n}):n})}function Wp(){return T.useContext(qu)}function Y0(){return{VaultContext:T.useContext(Hu),ResourceContext:T.useContext(od),SimpleViewerReactContext:T.useContext(qu),VisibleCanvasReactContext:T.useContext(Wu)}}function Q0(t){return re.jsx(jp,{vault:t.bridge.VaultContext.vault||void 0,resources:t.bridge.ResourceContext,children:re.jsx(Wu.Provider,{value:t.bridge.VisibleCanvasReactContext,children:re.jsx(qu.Provider,{value:t.bridge.SimpleViewerReactContext,children:t.children})})})}const Ji=function(t){return function(){const e={type:t,getType:()=>t,toString:()=>t};return(n,i)=>({...e,...n!==void 0&&{payload:n},...i!==void 0&&{meta:i}})}},NR="@iiif/IMPORT_ENTITIES",zR="@iiif/MODIFY_ENTITY_FIELD",_R="@iiif/REORDER_ENTITY_FIELD",jR="@iiif/ADD_REFERENCE",IR="@iiif/UPDATE_REFERENCE",UR="@iiif/REMOVE_REFERENCE",FR="@iiif/ADD_METADATA",BR="@iiif/REMOVE_METADATA",HR="@iiif/UPDATE_METADATA",VR="@iiif/REORDER_METADATA",WR=Ji(NR)(),$R=Ji(zR)(),qR=Ji(_R)(),YR=Ji(jR)(),QR=Ji(UR)(),GR=Ji(IR)(),XR=Ji(FR)(),KR=Ji(HR)(),ZR=Ji(BR)(),JR=Ji(VR)(),$p={importEntities:WR,modifyEntityField:$R,reorderEntityField:qR,addReference:YR,removeReference:QR,updateReference:GR,addMetadata:XR,removeMetadata:ZR,updateMetadata:KR,reorderMetadata:JR};function G0(){const e=In().getStore();return T.useMemo(()=>n=>e.dispatch(n),[e])}function X0(t){return typeof t!="string"&&t&&t.bindToVault}function K0(){const t=In(),e=T.useRef([]),n=G0(),i=T.useMemo(()=>`vault://annotation-page/${new Date().getTime()}/${Math.round(Math.random()*1e9).toString(16)}`,[]);T.useLayoutEffect(()=>{const p={id:i,type:"AnnotationPage",behavior:[],label:null,thumbnail:[],summary:null,requiredStatement:null,metadata:[],rights:null,provider:[],items:[],seeAlso:[],homepage:[],rendering:[],service:[]};n($p.importEntities({entities:{AnnotationPage:{[p.id]:p}}}))},[i]);const a=or(p=>i?p.iiif.entities.AnnotationPage[i]:null,[i]),c=T.useCallback((p,g)=>{if(i){if(X0(p)){const w=p;w.__vault||w.bindToVault(t),p=typeof w.source=="string"?w.source:w.source.id,e.current[p]=w}else typeof p!="string"&&(p=p.id);const x=t.get({id:i,type:"AnnotationPage"}),m=t.get({id:p,type:"Annotation"});x&&m&&(x.items.find(w=>w.id===m.id)||n($p.addReference({id:i,type:"AnnotationPage",key:"items",reference:{id:p,type:"Annotation"},index:g})))}},[i]),f=T.useCallback(p=>{i&&(X0(p)?p=typeof p.source=="string"?p.source:p.source.id:typeof p!="string"&&(p=p.id),e.current[p]&&e.current[p].beforeRemove(),t.get({id:i,type:"AnnotationPage"})&&n($p.removeReference({id:i,type:"AnnotationPage",key:"items",reference:{id:p,type:"Annotation"}})))},[i]);return[a,{addAnnotation:c,removeAnnotation:f}]}const Z0=T.createContext(null);function J0(){const t=T.useContext(Z0);return[t.fullPage,{addAnnotation:t.addAnnotation,removeAnnotation:t.removeAnnotation}]}function eb({children:t}){const[e,{addAnnotation:n,removeAnnotation:i}]=K0();return re.jsx(Z0.Provider,{value:T.useMemo(()=>({fullPage:e,addAnnotation:n,removeAnnotation:i}),[e]),children:t})}function eO({width:t,style:e,height:n,error:i,resetErrorBoundary:a}){return re.jsxs("div",{style:{width:t,height:n,minHeight:500,...e||{},background:"#f9f9f9"},children:[re.jsx("h3",{children:"Error occurred"}),re.jsx("p",{children:i.message}),re.jsx("button",{onClick:a,children:"Reset"})]})}const ad=T.createContext(null);function tb(){return T.useContext(ad)}const nb=T.createContext(()=>{}),rb=T.createContext(()=>{});function hl(t,e,n,i,a=[]){const c=T.useContext(t==="portal"?rb:nb);T.useEffect(()=>(t!=="none"&&c(e,n,i),()=>{c(e,null)}),[e,t,c,...a])}function mi(t={},e=[]){const{id:n,selector:i}=t,a=Rs(),c=n||a.canvas,f=or(p=>c?p.iiif.entities.Canvas[c]:void 0,[c]);return T.useMemo(()=>{if(f)return i?i(f):f},[f,i,...e])}const ib=T.createContext(()=>{});function tO(t){const e=mi(),n=T.useContext(ib);T.useEffect(()=>e&&e.id?(n(e.id,t),()=>n(e.id,-1)):()=>{},[e,t])}function nO({children:t,errorFallback:e,outerContainerProps:n={},worldScale:i,...a}){const[c,f]=T.useState(),p=Y0(),g=e||eO,[x,m]=T.useState({}),w=Object.entries(x),[R,D]=T.useState({}),A=Object.entries(R),[z,P]=T.useState({}),L=T.useMemo(()=>i||Math.max(...Object.values(z)),[z]),M=T.useMemo(()=>({maxOverZoom:L||1,...a.runtimeOptions||{}}),[L,a.runtimeOptions]),F=T.useCallback((j,K)=>{P(ee=>{if(K===-1){const{[j]:V,...ae}=ee;return ae}return{...ee,[j]:K}})},[]),$=T.useCallback((j,K,ee)=>{m(({[j]:V,...ae})=>K?{...ae,[j]:{element:K,props:ee}}:ae)},[]),Q=T.useCallback((j,K,ee)=>{D(({[j]:V,...ae})=>K?{...ae,[j]:{element:K,props:ee}}:ae)},[]);return re.jsxs(MR,{resetKeys:[],fallbackRender:j=>re.jsx(g,{...a,...j}),children:[re.jsx(yR,{...a,containerProps:{style:{position:"relative"},...a.containerProps||{}},htmlChildren:re.jsx(re.Fragment,{children:w.map(([j,{element:K,props:ee}])=>re.jsx(T.Fragment,{children:re.jsx(K,{...ee||{}})},j))}),onCreated:j=>{f(j),a.onCreated&&a.onCreated(j)},runtimeOptions:M,children:re.jsx(ad.Provider,{value:c,children:re.jsx(ib.Provider,{value:F,children:re.jsx(nb.Provider,{value:$,children:re.jsx(rb.Provider,{value:Q,children:re.jsx(Q0,{bridge:p,children:re.jsx(Uu.Provider,{value:a.mode||"explore",children:re.jsx(eb,{children:t})})})})})})})}),re.jsx("div",{children:A.map(([j,{element:K,props:ee}])=>re.jsx(T.Fragment,{children:re.jsx(K,{...ee||{}})},j))})]})}const ld={},sb={get(t){return t},setMetaValue([t,e,n],i){const a=sb.getResourceMeta(t,e),c=a?a[n]:void 0,f=typeof i=="function"?i(c):i;ld[t]={...ld[t]||{},[e]:{...(ld[t]||{})[e]||{},[n]:f}}},getResourceMeta:(t,e)=>{const n=ld[t];if(n)return e?n[e]:n}};function ob(t=sb){return{addEventListener(e,n,i,a){if(e)return t.setMetaValue([e.id,"eventManager",n],c=>{const f=c||[];for(const p of f)if(p.callback===i)return f;return[...f,{callback:i,scope:a}]}),i},removeEventListener(e,n,i){e&&t.setMetaValue([e.id,"eventManager",n],a=>(a||[]).filter(c=>c.callback!==i))},getListenersAsProps(e,n){const i=typeof e=="string"?{id:e}:e;if(!i||!i.id)return{};const a=t.getResourceMeta(i.id,"eventManager"),c={};if(a&&i)for(const f of Object.keys(a))c[f]=p=>{const g=t.get(i);for(const{callback:x,scope:m}of a[f]||[])(!m||n&&m.indexOf(n)!==-1)&&x(p,g)};return c}}}function qp(t,e){const n=In(),i=T.useMemo(()=>ob(n),[n]),a=or(()=>t&&t.id?n.getResourceMeta(t.id,"eventManager"):null,[t]);return T.useMemo(()=>t?i.getListenersAsProps(t,e):{},[a,t,n,e])}const ud={},ab={get(t){return t},setMetaValue([t,e,n],i){const a=ab.getResourceMeta(t,e),c=a?a[n]:void 0,f=typeof i=="function"?i(c):i;ud[t]={...ud[t]||{},[e]:{...(ud[t]||{})[e]||{},[n]:f}}},getResourceMeta:(t,e)=>{const n=ud[t];if(n)return e?n[e]:n}};function Yp(t=ab){return{applyStyles(e,n,i){const a=typeof e=="string"?e:e.id;return t.setMetaValue([a,"styles",n],i)},getAppliedStyles(e){const n=typeof e=="string"?e:e.id;return t.getResourceMeta(n,"styles")}}}function Yu(t,e){const n=In(),i=T.useMemo(()=>Yp(n),[n]);return or(()=>{if(!t)return null;const a=i.getAppliedStyles(t.id);return a?e?a[e]:a:void 0},[t,e])}var rO=Object.defineProperty,iO=(t,e,n)=>e in t?rO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cd=(t,e,n)=>(iO(t,typeof e!="symbol"?e+"":e,n),n),sO=function(){function t(e,n){var i=[],a=!0,c=!1,f=void 0;try{for(var p=e[Symbol.iterator](),g;!(a=(g=p.next()).done)&&(i.push(g.value),!(n&&i.length===n));a=!0);}catch(x){c=!0,f=x}finally{try{!a&&p.return&&p.return()}finally{if(c)throw f}}return i}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,Qp=function(t,e,n,i,a,c,f){var p=t.x,g=t.y;p*=e,g*=n;var x=i*p-a*g,m=a*p+i*g;return{x:x+c,y:m+f}},oO=function(t,e){var n=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),i=Math.cos(t),a=Math.sin(t),c=Math.cos(t+e),f=Math.sin(t+e);return[{x:i-a*n,y:a+i*n},{x:c+f*n,y:f-c*n},{x:c,y:f}]},lb=function(t,e,n,i){var a=t*i-e*n<0?-1:1,c=t*n+e*i;return c>1&&(c=1),c<-1&&(c=-1),a*Math.acos(c)},aO=function(t,e,n,i,a,c,f,p,g,x,m,w){var R=Math.pow(a,2),D=Math.pow(c,2),A=Math.pow(m,2),z=Math.pow(w,2),P=R*D-R*z-D*A;P<0&&(P=0),P/=R*z+D*A,P=Math.sqrt(P)*(f===p?-1:1);var L=P*a/c*w,M=P*-c/a*m,F=x*L-g*M+(t+n)/2,$=g*L+x*M+(e+i)/2,Q=(m-L)/a,j=(w-M)/c,K=(-m-L)/a,ee=(-w-M)/c,V=lb(1,0,Q,j),ae=lb(Q,j,K,ee);return p===0&&ae>0&&(ae-=Qu),p===1&&ae<0&&(ae+=Qu),[F,$,V,ae]},lO=function(t){var e=t.px,n=t.py,i=t.cx,a=t.cy,c=t.rx,f=t.ry,p=t.xAxisRotation,g=p===void 0?0:p,x=t.largeArcFlag,m=x===void 0?0:x,w=t.sweepFlag,R=w===void 0?0:w,D=[];if(c===0||f===0)return[];var A=Math.sin(g*Qu/360),z=Math.cos(g*Qu/360),P=z*(e-i)/2+A*(n-a)/2,L=-A*(e-i)/2+z*(n-a)/2;if(P===0&&L===0)return[];c=Math.abs(c),f=Math.abs(f);var M=Math.pow(P,2)/Math.pow(c,2)+Math.pow(L,2)/Math.pow(f,2);M>1&&(c*=Math.sqrt(M),f*=Math.sqrt(M));var F=aO(e,n,i,a,c,f,m,R,A,z,P,L),$=sO(F,4),Q=$[0],j=$[1],K=$[2],ee=$[3],V=Math.abs(ee)/(Qu/4);Math.abs(1-V)<1e-7&&(V=1);var ae=Math.max(Math.ceil(V),1);ee/=ae;for(var ge=0;ge<ae;ge++)D.push(oO(K,ee)),K+=ee;return D.map(function(we){var Ee=Qp(we[0],c,f,z,A,Q,j),Ue=Ee.x,Fe=Ee.y,Be=Qp(we[1],c,f,z,A,Q,j),vt=Be.x,Oe=Be.y,it=Qp(we[2],c,f,z,A,Q,j),nt=it.x,W=it.y;return{x1:Ue,y1:Fe,x2:vt,y2:Oe,x:nt,y:W}})};function ub(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uO=fO,Gp={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},cO=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function fO(t){var e=[];return t.replace(cO,function(n,i,a){var c=i.toLowerCase();for(a=hO(a),c=="m"&&a.length>2&&(e.push([i].concat(a.splice(0,2))),c="l",i=i=="m"?"l":"L");;){if(a.length==Gp[c])return a.unshift(i),e.push(a);if(a.length<Gp[c])throw new Error("malformed path data");e.push([i].concat(a.splice(0,Gp[c])))}}),e}var dO=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function hO(t){var e=t.match(dO);return e?e.map(Number):[]}const pO=ub(uO);var vO=mO;function mO(t){var e=0,n=0,i=0,a=0;return t.map(function(c){c=c.slice();var f=c[0],p=f.toUpperCase();if(f!=p)switch(c[0]=p,f){case"a":c[6]+=i,c[7]+=a;break;case"v":c[1]+=a;break;case"h":c[1]+=i;break;default:for(var g=1;g<c.length;)c[g++]+=i,c[g++]+=a}switch(p){case"Z":i=e,a=n;break;case"H":i=c[1];break;case"V":a=c[1];break;case"M":i=e=c[1],a=n=c[2];break;default:i=c[c.length-2],a=c[c.length-1]}return c})}const gO=ub(vO);function yO(t){const e=pO(t),n=gO(e);let i,a=0,c=0,f=0,p=0,g,x,m=0,w=0;const R=[];for(let D=0;D<n.length;D++){let A=n[D];const z=A[0];switch(z){case"M":a=A[1],c=A[2];break;case"H":A=["L",A[1],c];break;case"V":A=["L",a,A[1]];break;case"S":{let P=m,L=w;(i==="C"||i=="S")&&(P+=P-f,L+=L-p),A=["C",P,L,A[1],A[2],A[3],A[4]]}break;case"T":i==="Q"||i=="T"?(g=m*2-g,x=w*2-x):(g=m,x=w),A=["Q",g,x,A[1],A[2]];break;case"Q":g=A[1],x=A[2];break;case"A":{const P=lO({px:m,py:w,cx:A[6],cy:A[7],rx:A[1],ry:A[2],xAxisRotation:A[3],largeArcFlag:A[4],sweepFlag:A[5]});if(!P.length)continue;for(const[L,M]of P.entries())A=["C",M.x1,M.y1,M.x2,M.y2,M.x,M.y],L<P.length-1&&R.push(A);A=A}break;case"Z":A=["L",a,c];break}i=z,m=A[A.length-2],w=A[A.length-1],["C","Q","A"].indexOf(z)>-1?(f=A[A.length-4],p=A[A.length-3]):(f=m,p=w),R.push(A)}return R}/** Code to "flatten" quadratic and cubic Bézier curves to polylines.
|
|
285
286
|
*
|
|
286
287
|
* All code in this module is based on JavaScript code by Raph Levien, published on his blog at
|
|
287
288
|
* https://raphlinus.github.io/.
|
|
@@ -311,7 +312,7 @@ No matching component was found for:
|
|
|
311
312
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
312
313
|
* See the License for the specific language governing permissions and
|
|
313
314
|
* 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,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=zn(),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
|
+
*/function bO(t,e,n,i=1){return new cb(t,e,n).subdivide(i)}function SO(t,e,n,i,a=1){return new Xp(new Float64Array([t.x,t.y,e.x,e.y,n.x,n.y,i.x,i.y])).subdivide(a)}function xO(t){return t.x*t.x+t.y*t.y}function Gu(t){return t/(1-.67+Math.pow(Math.pow(.67,4)+.25*t*t,.25))}function pl(t){return t*(1-.39+Math.sqrt(.39*.39+.25*t*t))}class cb{constructor(e,n,i){cd(this,"start"),cd(this,"control"),cd(this,"end"),this.start=e,this.control=n,this.end=i}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:i,y:a}=this.control,{x:c,y:f}=this.end,p=2*i-e-c,g=2*a-n-f,x=(i-e)*p+(a-n)*g,m=(c-i)*p+(f-a)*g,w=(c-e)*g-(f-n)*p,R=x/w,D=m/w,A=Math.abs(w)/(Math.hypot(p,g)*Math.abs(D-R));return{x0:e,x2:c,scale:A,cross:w}}subdivide(e){const n=this.mapToBasic(),i=Gu(n.x0),a=Gu(n.x2),c=.5*Math.abs(a-i)*Math.sqrt(n.scale/e),f=Math.ceil(c),p=pl(i),g=pl(a),x=[0];for(let m=1;m<f;m++){const w=(pl(i+(a-i)*m/f)-p)/(g-p);x.push(w)}return x.push(1),x.map(m=>this.eval(m))}}class Xp{constructor(e){cd(this,"c"),this.c=e}weightsum(e,n,i,a){const c=e*this.c[0]+n*this.c[2]+i*this.c[4]+a*this.c[6],f=e*this.c[1]+n*this.c[3]+i*this.c[5]+a*this.c[7];return{x:c,y:f}}eval(e){const n=1-e,i=n*n*n,a=3*n*n*e,c=3*n*e*e,f=e*e*e;return this.weightsum(i,a,c,f)}deriv(e){const n=1-e,i=-3*n*n,a=3*e*e,c=-6*e*n-i,f=6*e*n-a;return this.weightsum(i,c,f,a)}midpoint_quadbez(){const e=this.weightsum(-.25,.75,.75,-.25);return new cb({x:this.c[0],y:this.c[1]},e,{x:this.c[6],y:this.c[7]})}subsegment(e,n){const i=new Float64Array(8),a=this.eval(e),c=this.eval(n);i[0]=a.x,i[1]=a.y;const f=(n-e)/3,p=this.deriv(e);i[2]=a.x+f*p.x,i[3]=a.y+f*p.y;const g=this.deriv(n);return i[4]=c.x-f*g.x,i[5]=c.y-f*g.y,i[6]=c.x,i[7]=c.y,new Xp(i)}subdivide(e){const n=.1*e,i=e-n,a=Math.sqrt(i),c=xO(this.weightsum(1,-3,3,-1)),f=Math.ceil(Math.pow(c/(432*n*n),1/6)),p=[];let g=0;for(let A=0;A<f;A++){const z=A/f,P=(A+1)/f,L=this.subsegment(z,P).midpoint_quadbez(),M=L.mapToBasic(),F=Gu(M.x0),$=Gu(M.x2),Q=Math.sqrt(M.scale);let j=Math.abs($-F)*Q;if(Math.sign(M.x0)!=Math.sign(M.x2)){const K=a/Q,ee=a*Math.abs($-F)/Gu(K);j=Math.max(j,ee)}p.push({quad:L,a0:F,a2:$,val:j}),g+=j}const x=.5*g/a,m=Math.ceil(x),w=[{x:this.c[0],y:this.c[1]}];let R=0,D=0;for(let A=1;A<m;A++){const z=g*A/m;for(;R+p[D].val<z;)R+=p[D].val,D++;const P=p[D].a0,L=p[D].a2,M=pl(P),F=pl(L),$=P+(L-P)*(z-R)/p[D].val,Q=(pl($)-M)/(F-M);w.push(p[D].quad.eval(Q))}return w.push({x:this.c[6],y:this.c[7]}),w}}const wO=/&?(xywh=)?(pixel:|percent:|pct:)?([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?)/,EO=/&?(t=)(npt:)?([0-9]+(.[0-9]+)?)?(,([0-9]+(.[0-9]+)?))?/,fb=/^rgba\((\d+),(\d+),(\d+),([0-9.]+)\)$/;function Xu(t,{domParser:e,svgPreprocessor:n,iiifRenderingHints:i}={}){if(Array.isArray(t))return Pi(t.reduce((a,c)=>{const{selector:f,selectors:p,iiifRenderingHints:g}=Xu(c,{domParser:e,svgPreprocessor:n,iiifRenderingHints:i});return f&&(a.selector||(a.selector=f),a.selectors.push(...p)),g&&(a.iiifRenderingHints=a.iiifRenderingHints||{type:"ImageApiSelector"},Object.assign(a.iiifRenderingHints,g)),a},{selector:null,selectors:[],iiifRenderingHints:i}));if(!t)return Pi({selector:null,selectors:[],iiifRenderingHints:i});if(typeof t=="string"){const[a,c]=t.split("#");return c?Xu({type:"FragmentSelector",value:c},{svgPreprocessor:n,iiifRenderingHints:i,domParser:e}):Pi({selector:null,selectors:[],iiifRenderingHints:i})}if(t.type&&t.type==="PointSelector"&&(t.t||t.t===0)){const a={type:"TemporalSelector",temporal:{startTime:t.t}};return Pi({selector:a,selectors:[a],iiifRenderingHints:i})}if(hb(t)){const a=[];if(t.region){const c=Xu({type:"FragmentSelector",value:"xywh="+t.region},{domParser:e,svgPreprocessor:n,iiifRenderingHints:i});a.push(...c.selectors)}return Pi({selector:a[0],selectors:a,iiifRenderingHints:i?{...i,...t}:t})}if(t.type==="FragmentSelector"){const a=wO.exec(t.value);if(a){const f={type:"BoxSelector",spatial:{unit:a[2]==="percent:"||a[2]==="pct:"?"percent":"pixel",x:parseFloat(a[3]),y:parseFloat(a[4]),width:parseFloat(a[5]),height:parseFloat(a[6])}};return Pi({selector:f,selectors:[f],iiifRenderingHints:i})}const c=t.value.match(EO);if(c){const f={type:"TemporalSelector",temporal:{startTime:c[4]?parseFloat(c[4]):0,endTime:c[7]?parseFloat(c[7]):void 0}};return Pi({selector:f,selectors:[f],iiifRenderingHints:i})}return Pi({selector:null,selectors:[],iiifRenderingHints:i})}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 a=[],c,f,p=(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}`),Pi({selector:null,selectors:[],iiifRenderingHints:i});const w=db(m);w&&(a=w.points,g=w.shapeType,c=[Math.min(...a.map(R=>R[0])),Math.min(...a.map(R=>R[1])),Math.max(...a.map(R=>R[0])),Math.max(...a.map(R=>R[1]))],{style:f,svg:p}=RO(w.element)??{svg:p})}const x={type:"SvgSelector",svg:p,svgShape:g,style:f,points:a.length?a: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 Pi({selector:x,selectors:[x],iiifRenderingHints:i})}return Pi({selector:null,selectors:[],iiifRenderingHints:i})}function TO(t){const e=t.map(i=>i[0]).reduce((i,a)=>(i[a]+=1,i),{C:0,Q:0,L:0,M:0}),n=new Set(t.map(i=>i[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 i=t.slice(-1)[0];return t[0][0]==="M"&&i[0]==="L"&&i[1]==t[0][1]&&i[2]===t[0][2]||i[1]===0&&i[2]===0?"polygon":"polyline"}return"path"}function db(t){var e;for(const n of Array.from(t.children))switch(n==null?void 0:n.tagName.toLowerCase()){case"g":{const i=db(n);if(i)return i}continue;case"path":{const i=n.getAttribute("d");if(!i)continue;const a=yO(i);return{element:n,points:CO(a),shapeType:TO(a)}}case"circle":{const i=parseFloat(n.getAttribute("cx")??"0"),a=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("r")??"0");if(!c)continue;const f=[];for(let p=0;p<=360;p+=12){const g=p*Math.PI/180;f.push([i+c*Math.cos(g),a+c*Math.sin(g)])}return{element:n,points:f,shapeType:"circle"}}case"ellipse":{const i=parseFloat(n.getAttribute("cx")??"0"),a=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("rx")??"0"),f=parseFloat(n.getAttribute("ry")??"0");if(!c&&!f)continue;const p=[];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=f*2*x/(1+x**2);p.push([i+m,a+w])}return{element:n,points:p,shapeType:"ellipse"}}case"line":{const i=parseFloat(n.getAttribute("x0")??"0"),a=parseFloat(n.getAttribute("y0")??"0"),c=parseFloat(n.getAttribute("x1")??"0"),f=parseFloat(n.getAttribute("y1")??"0");if(i===c&&a===f)continue;return{element:n,points:[[i,a],[c,f]],shapeType:"polyline"}}case"polygon":case"polyline":{const i=((e=n.getAttribute("points"))==null?void 0:e.split(" ").map(c=>c.split(",").map(parseFloat)))??[];if(!i.length)continue;let a="polyline";return n.tagName.toLowerCase()==="polygon"&&(i.push(i[0]),a="polygon"),{element:n,points:i,shapeType:a}}case"rect":{const i=parseFloat(n.getAttribute("x")??"0"),a=parseFloat(n.getAttribute("y")??"0"),c=parseFloat(n.getAttribute("width")??"0"),f=parseFloat(n.getAttribute("height")??"0");if(!c||!f)continue;return{element:n,points:[[i,a],[i+c,a],[i+c,a+f],[i,a+f],[i,a]],shapeType:"rect"}}default:continue}return null}function CO(t){const e=[];for(let n=0;n<t.length;n++){const i=e[e.length-1]??[0,0],a=t[n];switch(a[0]){case"M":case"L":e.push([a[1],a[2]]);continue;case"C":e.push(...SO({x:i[0],y:i[1]},{x:a[1],y:a[2]},{x:a[3],y:a[4]},{x:a[5],y:a[6]}).map(c=>[c.x,c.y]).slice(1));continue;case"Q":e.push(...bO({x:i[0],y:i[1]},{x:a[1],y:a[2]},{x:a[3],y:a[4]}).map(c=>[c.x,c.y]).slice(1));continue}}return e}function RO(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 i=fb.exec(e.fill);i&&(e.fillOpacity=parseFloat(i[4]),e.fill=`rgb(${i[1]}, ${i[2]}, ${i[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 i=fb.exec(e.stroke);i&&(e.strokeOpacity=parseFloat(i[4]),e.stroke=`rgb(${i[1]}, ${i[2]}, ${i[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 hb(t){return!!t&&t.type==="iiif:ImageApiSelector"&&t.type==="iiif:ImageApiSelector"}function Pi(t){if(t.iiifRenderingHints){const e=t.iiifRenderingHints;if(e.rotation){const n=pb(`${e.rotation}`);if(n)if(t.selectors.length)for(const i of t.selectors)i.rotation=n;else t.selectors.push({type:"RotationSelector",rotation:n})}}else delete t.iiifRenderingHints;return t}function pb(t){let e=parseFloat(t);return e&&t.startsWith("!")&&(e=360-e),e&&(e=e%360),e!==e?0:e||0}function ao(t,e={}){if(Array.isArray(t))return ao(t[0]);if(typeof t=="string"){const[n,i]=t.split("#");return i?ao({type:"SpecificResource",source:{id:n,type:"Unknown"},selector:{type:"FragmentSelector",value:i}}):{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 ao(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:i}=t.selector?Xu(t.selector,e):{selector:null,selectors:[]};return{type:"SpecificResource",source:t.source,selector:n,selectors:i}}if(t.id){t.type==="Canvas"&&t.partOf&&typeof t.partOf=="string"&&(t.partOf=[{id:t.partOf,type:"Manifest"}]);const[n,i]=t.id.split("#");return i?ao({type:"SpecificResource",source:{...t,id:n},selector:{type:"FragmentSelector",value:i}}):{type:"SpecificResource",source:{...t,id:n},selector:null,selectors:[]}}return{type:"SpecificResource",source:t,selector:null,selectors:[]}}function Kp(t={},e=[]){const{id:n,selector:i}=t,a=Rs(),c=In(),f=n||a.annotation,p=or(x=>f?x.iiif.entities.Annotation[f]:void 0,[f]),g=or(x=>p&&p.body?p.body.map(m=>m?m.type==="SpecificResource"?{...m,source:c.get(m)}:m?x.iiif.entities[m.type][m.id]:null:null).filter(Boolean):[],[p]);return T.useMemo(()=>{if(!p)return;const x={...p,body:g,target:ao(p.target,{typeMap:c.getState().iiif.mapping})};return i?i(x):x},[p,i,g,...e])}const vb=({id:t,style:e,className:n,interactive:i})=>{const a=Kp({id:t}),c=Yu(a,"atlas"),f=Yu(a,"html"),p=qp(a,["atlas"]),g=mi(),x=T.useMemo(()=>OR(e,c),[e,c]);return g&&a&&a.target&&a.target.selector&&a.target.selector.type==="BoxSelector"&&a.target.source&&(a.target.source.id===g.id||a.target.source===g.id)?re.jsx(CR,{id:a.id,isEditing:!0,region:a.target.selector.spatial,style:x,className:(f==null?void 0:f.className)||n,interactive:!!(f!=null&&f.href||i),href:(f==null?void 0:f.href)||null,title:(f==null?void 0:f.title)||null,hrefTarget:(f==null?void 0:f.target)||null,onClick:()=>{},...p}):null};function mb(t={},e=[]){const{id:n,selector:i}=t,a=Rs(),c=n||a.annotationPage,f=or(p=>c?p.iiif.entities.AnnotationPage[c]:void 0,[c]);return T.useMemo(()=>{if(f)return i?i(f):f},[f,...e])}const Zp=({className:t,page:e})=>{var c;const n=mb({id:e.id})||e,i=Yu(n,"atlas"),a=Yu(n,"html");return or(f=>n.id?f.iiif.entities.AnnotationPage[n.id]:null,[]),re.jsx(T.Fragment,{children:(c=n.items)==null?void 0:c.map(f=>re.jsx(vb,{id:f.id,style:i,className:(a==null?void 0:a.className)||t},f.id))})};function gb({id:t,image:e,thumbnail:n,isStatic:i,x:a=0,y:c=0,children:f,selector:p,onClick:g,enableSizes:x}){var w,R;const m=T.useMemo(()=>{if(!(!p||p.spatial.x===0&&p.spatial.y===0))return p.spatial},[p]);return re.jsx("world-object",{x:a+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?re.jsxs(T.Fragment,{children:[re.jsx(RR,{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:(R=e.target)==null?void 0:R.spatial.height,crop:m}),f]},"service"):re.jsxs(T.Fragment,{children:[re.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}),f]},"no-service")},t+(e.service?"server":"no-service"))}var OO=Object.defineProperty,AO=(t,e,n)=>e in t?OO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fd=(t,e,n)=>(AO(t,typeof e!="symbol"?e+"":e,n),n),MO=function(){function t(e,n){var i=[],a=!0,c=!1,f=void 0;try{for(var p=e[Symbol.iterator](),g;!(a=(g=p.next()).done)&&(i.push(g.value),!(n&&i.length===n));a=!0);}catch(x){c=!0,f=x}finally{try{!a&&p.return&&p.return()}finally{if(c)throw f}}return i}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")}}(),Ku=Math.PI*2,Jp=function(t,e,n,i,a,c,f){var p=t.x,g=t.y;p*=e,g*=n;var x=i*p-a*g,m=a*p+i*g;return{x:x+c,y:m+f}},PO=function(t,e){var n=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),i=Math.cos(t),a=Math.sin(t),c=Math.cos(t+e),f=Math.sin(t+e);return[{x:i-a*n,y:a+i*n},{x:c+f*n,y:f-c*n},{x:c,y:f}]},yb=function(t,e,n,i){var a=t*i-e*n<0?-1:1,c=t*n+e*i;return c>1&&(c=1),c<-1&&(c=-1),a*Math.acos(c)},LO=function(t,e,n,i,a,c,f,p,g,x,m,w){var R=Math.pow(a,2),D=Math.pow(c,2),A=Math.pow(m,2),z=Math.pow(w,2),P=R*D-R*z-D*A;P<0&&(P=0),P/=R*z+D*A,P=Math.sqrt(P)*(f===p?-1:1);var L=P*a/c*w,M=P*-c/a*m,F=x*L-g*M+(t+n)/2,$=g*L+x*M+(e+i)/2,Q=(m-L)/a,j=(w-M)/c,K=(-m-L)/a,ee=(-w-M)/c,V=yb(1,0,Q,j),ae=yb(Q,j,K,ee);return p===0&&ae>0&&(ae-=Ku),p===1&&ae<0&&(ae+=Ku),[F,$,V,ae]},DO=function(t){var e=t.px,n=t.py,i=t.cx,a=t.cy,c=t.rx,f=t.ry,p=t.xAxisRotation,g=p===void 0?0:p,x=t.largeArcFlag,m=x===void 0?0:x,w=t.sweepFlag,R=w===void 0?0:w,D=[];if(c===0||f===0)return[];var A=Math.sin(g*Ku/360),z=Math.cos(g*Ku/360),P=z*(e-i)/2+A*(n-a)/2,L=-A*(e-i)/2+z*(n-a)/2;if(P===0&&L===0)return[];c=Math.abs(c),f=Math.abs(f);var M=Math.pow(P,2)/Math.pow(c,2)+Math.pow(L,2)/Math.pow(f,2);M>1&&(c*=Math.sqrt(M),f*=Math.sqrt(M));var F=LO(e,n,i,a,c,f,m,R,A,z,P,L),$=MO(F,4),Q=$[0],j=$[1],K=$[2],ee=$[3],V=Math.abs(ee)/(Ku/4);Math.abs(1-V)<1e-7&&(V=1);var ae=Math.max(Math.ceil(V),1);ee/=ae;for(var ge=0;ge<ae;ge++)D.push(PO(K,ee)),K+=ee;return D.map(function(we){var Ee=Jp(we[0],c,f,z,A,Q,j),Ue=Ee.x,Fe=Ee.y,Be=Jp(we[1],c,f,z,A,Q,j),vt=Be.x,Oe=Be.y,it=Jp(we[2],c,f,z,A,Q,j),nt=it.x,W=it.y;return{x1:Ue,y1:Fe,x2:vt,y2:Oe,x:nt,y:W}})},kO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var NO=_O,ev={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},zO=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function _O(t){var e=[];return t.replace(zO,function(n,i,a){var c=i.toLowerCase();for(a=IO(a),c=="m"&&a.length>2&&(e.push([i].concat(a.splice(0,2))),c="l",i=i=="m"?"l":"L");;){if(a.length==ev[c])return a.unshift(i),e.push(a);if(a.length<ev[c])throw new Error("malformed path data");e.push([i].concat(a.splice(0,ev[c])))}}),e}var jO=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function IO(t){var e=t.match(jO);return e?e.map(Number):[]}const UO=bb(NO);var FO=BO;function BO(t){var e=0,n=0,i=0,a=0;return t.map(function(c){c=c.slice();var f=c[0],p=f.toUpperCase();if(f!=p)switch(c[0]=p,f){case"a":c[6]+=i,c[7]+=a;break;case"v":c[1]+=a;break;case"h":c[1]+=i;break;default:for(var g=1;g<c.length;)c[g++]+=i,c[g++]+=a}switch(p){case"Z":i=e,a=n;break;case"H":i=c[1];break;case"V":a=c[1];break;case"M":i=e=c[1],a=n=c[2];break;default:i=c[c.length-2],a=c[c.length-1]}return c})}const HO=bb(FO);function VO(t){const e=UO(t),n=HO(e);let i,a=0,c=0,f=0,p=0,g,x,m=0,w=0;const R=[];for(let D=0;D<n.length;D++){let A=n[D];const z=A[0];switch(z){case"M":a=A[1],c=A[2];break;case"H":A=["L",A[1],c];break;case"V":A=["L",a,A[1]];break;case"S":{let P=m,L=w;(i==="C"||i=="S")&&(P+=P-f,L+=L-p),A=["C",P,L,A[1],A[2],A[3],A[4]]}break;case"T":i==="Q"||i=="T"?(g=m*2-g,x=w*2-x):(g=m,x=w),A=["Q",g,x,A[1],A[2]];break;case"Q":g=A[1],x=A[2];break;case"A":{const P=DO({px:m,py:w,cx:A[6],cy:A[7],rx:A[1],ry:A[2],xAxisRotation:A[3],largeArcFlag:A[4],sweepFlag:A[5]});if(!P.length)continue;for(const[L,M]of P.entries())A=["C",M.x1,M.y1,M.x2,M.y2,M.x,M.y],L<P.length-1&&R.push(A);A=A}break;case"Z":A=["L",a,c];break}i=z,m=A[A.length-2],w=A[A.length-1],["C","Q","A"].indexOf(z)>-1?(f=A[A.length-4],p=A[A.length-3]):(f=m,p=w),R.push(A)}return R}/** Code to "flatten" quadratic and cubic Bézier curves to polylines.
|
|
315
316
|
*
|
|
316
317
|
* All code in this module is based on JavaScript code by Raph Levien, published on his blog at
|
|
317
318
|
* https://raphlinus.github.io/.
|
|
@@ -341,7 +342,7 @@ No matching component was found for:
|
|
|
341
342
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
342
343
|
* See the License for the specific language governing permissions and
|
|
343
344
|
* 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,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 Ie(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:Ie(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 je(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:Ie(ye)});return X.length?X:void 0}function Be(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:je(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),...Be(z),...(X=z,{chars:X.chars,format:X.format?X.format:void 0,language:X.language})});var X}const yt=new Se({collection:[function(j){return Fe({...ht(j),...Ut(j),...Be(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),...Be(j),start:ye,items:z,structures:j.structures})}],canvas:[function(j){return Fe({...ht(j),...Ut(j),...Be(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),...Be(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),...Be(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:St(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),...Be(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"]=Ie(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),...Be(j)})}]});function St(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[St(j.default),...(Array.isArray(j.item)?j.item:[j.item]).map(St)];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 bn=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"?yt.traverseUnknown(j):j};c.upgrade=bn,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"},On=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=zn(),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=zn(),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?On(`3D format: ${r.format} is unsupported`):{type:"3d-model",model:r}:On("Unknown format")}function jM(t,e){var r;if(!t.duration)return On("No duration on canvas");if(e.items.length>1)return On("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:[]}}:On("Audio does not have format"):On("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 On("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 On("No duration on canvas");if(n.length>1)return On("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 On("Unknown video");if((!r.format||r.format==="text/html")&&!o)return On("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 On("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?On("Complex timeline not supported"):On("ComplexTimelineStrategy not yet supported");const o=e.types[0];return o==="image"?n.indexOf("images")===-1?On("Image not supported"):eS(t,e,r):o==="Model"||o==="model"?n.indexOf("3d-model")===-1?On("3D not supported"):J1(t,e):o==="textualbody"?n.indexOf("textual-content")===-1?On("Textual content not supported"):nS(t,e):o==="sound"||o==="audio"?n.indexOf("media")===-1?On("Media not supported"):jM(t,e):o==="video"?n.indexOf("media")===-1?On("Media not supported"):iS(t,e):fd}function sS(t){const e=ea(),n=$r(),r=zn(),[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=zn();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=zn(),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
|
+
*/function WO(t,e,n,i=1){return new Sb(t,e,n).subdivide(i)}function $O(t,e,n,i,a=1){return new tv(new Float64Array([t.x,t.y,e.x,e.y,n.x,n.y,i.x,i.y])).subdivide(a)}function qO(t){return t.x*t.x+t.y*t.y}function Zu(t){return t/(1-.67+Math.pow(Math.pow(.67,4)+.25*t*t,.25))}function vl(t){return t*(1-.39+Math.sqrt(.39*.39+.25*t*t))}class Sb{constructor(e,n,i){fd(this,"start"),fd(this,"control"),fd(this,"end"),this.start=e,this.control=n,this.end=i}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:i,y:a}=this.control,{x:c,y:f}=this.end,p=2*i-e-c,g=2*a-n-f,x=(i-e)*p+(a-n)*g,m=(c-i)*p+(f-a)*g,w=(c-e)*g-(f-n)*p,R=x/w,D=m/w,A=Math.abs(w)/(Math.hypot(p,g)*Math.abs(D-R));return{x0:e,x2:c,scale:A,cross:w}}subdivide(e){const n=this.mapToBasic(),i=Zu(n.x0),a=Zu(n.x2),c=.5*Math.abs(a-i)*Math.sqrt(n.scale/e),f=Math.ceil(c),p=vl(i),g=vl(a),x=[0];for(let m=1;m<f;m++){const w=(vl(i+(a-i)*m/f)-p)/(g-p);x.push(w)}return x.push(1),x.map(m=>this.eval(m))}}class tv{constructor(e){fd(this,"c"),this.c=e}weightsum(e,n,i,a){const c=e*this.c[0]+n*this.c[2]+i*this.c[4]+a*this.c[6],f=e*this.c[1]+n*this.c[3]+i*this.c[5]+a*this.c[7];return{x:c,y:f}}eval(e){const n=1-e,i=n*n*n,a=3*n*n*e,c=3*n*e*e,f=e*e*e;return this.weightsum(i,a,c,f)}deriv(e){const n=1-e,i=-3*n*n,a=3*e*e,c=-6*e*n-i,f=6*e*n-a;return this.weightsum(i,c,f,a)}midpoint_quadbez(){const e=this.weightsum(-.25,.75,.75,-.25);return new Sb({x:this.c[0],y:this.c[1]},e,{x:this.c[6],y:this.c[7]})}subsegment(e,n){const i=new Float64Array(8),a=this.eval(e),c=this.eval(n);i[0]=a.x,i[1]=a.y;const f=(n-e)/3,p=this.deriv(e);i[2]=a.x+f*p.x,i[3]=a.y+f*p.y;const g=this.deriv(n);return i[4]=c.x-f*g.x,i[5]=c.y-f*g.y,i[6]=c.x,i[7]=c.y,new tv(i)}subdivide(e){const n=.1*e,i=e-n,a=Math.sqrt(i),c=qO(this.weightsum(1,-3,3,-1)),f=Math.ceil(Math.pow(c/(432*n*n),1/6)),p=[];let g=0;for(let A=0;A<f;A++){const z=A/f,P=(A+1)/f,L=this.subsegment(z,P).midpoint_quadbez(),M=L.mapToBasic(),F=Zu(M.x0),$=Zu(M.x2),Q=Math.sqrt(M.scale);let j=Math.abs($-F)*Q;if(Math.sign(M.x0)!=Math.sign(M.x2)){const K=a/Q,ee=a*Math.abs($-F)/Zu(K);j=Math.max(j,ee)}p.push({quad:L,a0:F,a2:$,val:j}),g+=j}const x=.5*g/a,m=Math.ceil(x),w=[{x:this.c[0],y:this.c[1]}];let R=0,D=0;for(let A=1;A<m;A++){const z=g*A/m;for(;R+p[D].val<z;)R+=p[D].val,D++;const P=p[D].a0,L=p[D].a2,M=vl(P),F=vl(L),$=P+(L-P)*(z-R)/p[D].val,Q=(vl($)-M)/(F-M);w.push(p[D].quad.eval(Q))}return w.push({x:this.c[6],y:this.c[7]}),w}}const YO=/&?(xywh=)?(pixel:|percent:|pct:)?([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?),([0-9]+(?:\.[0-9]+)?)/,QO=/&?(t=)(npt:)?([0-9]+(.[0-9]+)?)?(,([0-9]+(.[0-9]+)?))?/,xb=/^rgba\((\d+),(\d+),(\d+),([0-9.]+)\)$/;function dd(t,{domParser:e,svgPreprocessor:n,iiifRenderingHints:i}={}){if(Array.isArray(t))return Li(t.reduce((a,c)=>{const{selector:f,selectors:p,iiifRenderingHints:g}=dd(c,{domParser:e,svgPreprocessor:n,iiifRenderingHints:i});return f&&(a.selector||(a.selector=f),a.selectors.push(...p)),g&&(a.iiifRenderingHints=a.iiifRenderingHints||{type:"ImageApiSelector"},Object.assign(a.iiifRenderingHints,g)),a},{selector:null,selectors:[],iiifRenderingHints:i}));if(!t)return Li({selector:null,selectors:[],iiifRenderingHints:i});if(typeof t=="string"){const[a,c]=t.split("#");return c?dd({type:"FragmentSelector",value:c},{svgPreprocessor:n,iiifRenderingHints:i,domParser:e}):Li({selector:null,selectors:[],iiifRenderingHints:i})}if(t.type&&t.type==="PointSelector"&&(t.t||t.t===0)){const a={type:"TemporalSelector",temporal:{startTime:t.t}};return Li({selector:a,selectors:[a],iiifRenderingHints:i})}if(ZO(t)){const a=[];if(t.region){const c=dd({type:"FragmentSelector",value:"xywh="+t.region},{domParser:e,svgPreprocessor:n,iiifRenderingHints:i});a.push(...c.selectors)}return Li({selector:a[0],selectors:a,iiifRenderingHints:i?{...i,...t}:t})}if(t.type==="FragmentSelector"){const a=YO.exec(t.value);if(a){const f={type:"BoxSelector",spatial:{unit:a[2]==="percent:"||a[2]==="pct:"?"percent":"pixel",x:parseFloat(a[3]),y:parseFloat(a[4]),width:parseFloat(a[5]),height:parseFloat(a[6])}};return Li({selector:f,selectors:[f],iiifRenderingHints:i})}const c=t.value.match(QO);if(c){const f={type:"TemporalSelector",temporal:{startTime:c[4]?parseFloat(c[4]):0,endTime:c[7]?parseFloat(c[7]):void 0}};return Li({selector:f,selectors:[f],iiifRenderingHints:i})}return Li({selector:null,selectors:[],iiifRenderingHints:i})}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 a=[],c,f,p=(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}`),Li({selector:null,selectors:[],iiifRenderingHints:i});const w=wb(m);w&&(a=w.points,g=w.shapeType,c=[Math.min(...a.map(R=>R[0])),Math.min(...a.map(R=>R[1])),Math.max(...a.map(R=>R[0])),Math.max(...a.map(R=>R[1]))],{style:f,svg:p}=KO(w.element)??{svg:p})}const x={type:"SvgSelector",svg:p,svgShape:g,style:f,points:a.length?a: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 Li({selector:x,selectors:[x],iiifRenderingHints:i})}return Li({selector:null,selectors:[],iiifRenderingHints:i})}function GO(t){const e=t.map(i=>i[0]).reduce((i,a)=>(i[a]+=1,i),{C:0,Q:0,L:0,M:0}),n=new Set(t.map(i=>i[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 i=t.slice(-1)[0];return t[0][0]==="M"&&i[0]==="L"&&i[1]==t[0][1]&&i[2]===t[0][2]||i[1]===0&&i[2]===0?"polygon":"polyline"}return"path"}function wb(t){var e;for(const n of Array.from(t.children))switch(n==null?void 0:n.tagName.toLowerCase()){case"g":{const i=wb(n);if(i)return i}continue;case"path":{const i=n.getAttribute("d");if(!i)continue;const a=VO(i);return{element:n,points:XO(a),shapeType:GO(a)}}case"circle":{const i=parseFloat(n.getAttribute("cx")??"0"),a=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("r")??"0");if(!c)continue;const f=[];for(let p=0;p<=360;p+=12){const g=p*Math.PI/180;f.push([i+c*Math.cos(g),a+c*Math.sin(g)])}return{element:n,points:f,shapeType:"circle"}}case"ellipse":{const i=parseFloat(n.getAttribute("cx")??"0"),a=parseFloat(n.getAttribute("cy")??"0"),c=parseFloat(n.getAttribute("rx")??"0"),f=parseFloat(n.getAttribute("ry")??"0");if(!c&&!f)continue;const p=[];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=f*2*x/(1+x**2);p.push([i+m,a+w])}return{element:n,points:p,shapeType:"ellipse"}}case"line":{const i=parseFloat(n.getAttribute("x0")??"0"),a=parseFloat(n.getAttribute("y0")??"0"),c=parseFloat(n.getAttribute("x1")??"0"),f=parseFloat(n.getAttribute("y1")??"0");if(i===c&&a===f)continue;return{element:n,points:[[i,a],[c,f]],shapeType:"polyline"}}case"polygon":case"polyline":{const i=((e=n.getAttribute("points"))==null?void 0:e.split(" ").map(c=>c.split(",").map(parseFloat)))??[];if(!i.length)continue;let a="polyline";return n.tagName.toLowerCase()==="polygon"&&(i.push(i[0]),a="polygon"),{element:n,points:i,shapeType:a}}case"rect":{const i=parseFloat(n.getAttribute("x")??"0"),a=parseFloat(n.getAttribute("y")??"0"),c=parseFloat(n.getAttribute("width")??"0"),f=parseFloat(n.getAttribute("height")??"0");if(!c||!f)continue;return{element:n,points:[[i,a],[i+c,a],[i+c,a+f],[i,a+f],[i,a]],shapeType:"rect"}}default:continue}return null}function XO(t){const e=[];for(let n=0;n<t.length;n++){const i=e[e.length-1]??[0,0],a=t[n];switch(a[0]){case"M":case"L":e.push([a[1],a[2]]);continue;case"C":e.push(...$O({x:i[0],y:i[1]},{x:a[1],y:a[2]},{x:a[3],y:a[4]},{x:a[5],y:a[6]}).map(c=>[c.x,c.y]).slice(1));continue;case"Q":e.push(...WO({x:i[0],y:i[1]},{x:a[1],y:a[2]},{x:a[3],y:a[4]}).map(c=>[c.x,c.y]).slice(1));continue}}return e}function KO(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 i=xb.exec(e.fill);i&&(e.fillOpacity=parseFloat(i[4]),e.fill=`rgb(${i[1]}, ${i[2]}, ${i[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 i=xb.exec(e.stroke);i&&(e.strokeOpacity=parseFloat(i[4]),e.stroke=`rgb(${i[1]}, ${i[2]}, ${i[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 ZO(t){return!!t&&t.type==="iiif:ImageApiSelector"&&t.type==="iiif:ImageApiSelector"}function Li(t){if(t.iiifRenderingHints){const e=t.iiifRenderingHints;if(e.rotation){const n=JO(`${e.rotation}`);if(n)if(t.selectors.length)for(const i of t.selectors)i.rotation=n;else t.selectors.push({type:"RotationSelector",rotation:n})}}else delete t.iiifRenderingHints;return t}function JO(t){let e=parseFloat(t);return e&&t.startsWith("!")&&(e=360-e),e&&(e=e%360),e!==e?0:e||0}function Ju(t,e={}){if(Array.isArray(t))return Ju(t[0]);if(typeof t=="string"){const[n,i]=t.split("#");return i?Ju({type:"SpecificResource",source:{id:n,type:"Unknown"},selector:{type:"FragmentSelector",value:i}}):{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 Ju(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:i}=t.selector?dd(t.selector,e):{selector:null,selectors:[]};return{type:"SpecificResource",source:t.source,selector:n,selectors:i}}if(t.id){t.type==="Canvas"&&t.partOf&&typeof t.partOf=="string"&&(t.partOf=[{id:t.partOf,type:"Manifest"}]);const[n,i]=t.id.split("#");return i?Ju({type:"SpecificResource",source:{...t,id:n},selector:{type:"FragmentSelector",value:i}}):{type:"SpecificResource",source:{...t,id:n},selector:null,selectors:[]}}return{type:"SpecificResource",source:t,selector:null,selectors:[]}}var eA=Object.defineProperty,tA=(t,e,n)=>e in t?eA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eb=(t,e,n)=>(tA(t,typeof e!="symbol"?e+"":e,n),n);function nA(t){return Array.isArray(t)?t:t?[t]:[]}const Tb=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];function rA(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=Tb.indexOf(t["@type"]);if(e!==-1)return Tb[e]}if(t.profile)return"Service";if(t.format||t["@type"])return"ContentResource";throw new Error("Resource type is not known")}class nv{constructor(e,n={}){Eb(this,"traversals"),Eb(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 nv({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(i=>typeof i=="string"?{"@id":i,"@type":"sc:Manifest"}:i),...(e.collections||[]).map(i=>typeof i=="string"?{"@id":i,"@type":"sc:Collection"}:i),...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(i=>typeof i=="string"?{"@id":i,"@type":"sc:Range"}:i),...(e.canvases||[]).map(i=>typeof i=="string"?{"@id":i,"@type":"sc:Canvas"}:i),...e.members||[]];delete e.ranges,delete e.canvases,e.members=n.length?n.map(i=>this.traverseUnknown(i)):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(rA(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),i=Array.isArray(e)?e:[e],a=[];for(const c of i)typeof c=="string"?a.push(this.traverseContentResource({"@id":c,"@type":"dctypes:Image"})):a.push(this.traverseContentResource(c));return!n&&!this.options.convertPropsToArray?a[0]:a}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),i=Array.isArray(e)?e:[e],a=[];for(const c of i)a.push(this.traverseService(c));return!n&&!this.options.convertPropsToArray?a[0]:a}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(i=>this.traverseType(i,n))}traverseType(e,n){return n.reduce((i,a)=>{const c=a(i);return typeof c>"u"&&!this.options.allowUndefinedReturn?i:c},e)}}const iA="http://library.stanford.edu/iiif/image-api/compliance.html#level0",Cb="http://library.stanford.edu/iiif/image-api/compliance.html#level1",Rb="http://library.stanford.edu/iiif/image-api/compliance.html#level2",sA="http://library.stanford.edu/iiif/image-api/conformance.html#level0",Ob="http://library.stanford.edu/iiif/image-api/conformance.html#level1",Ab="http://library.stanford.edu/iiif/image-api/conformance.html#level2",oA="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",Mb="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",Pb="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",aA="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",Lb="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",Db="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",lA="http://iiif.io/api/image/1/level0.json",uA="http://iiif.io/api/image/1/profiles/level0.json",kb="http://iiif.io/api/image/1/level1.json",Nb="http://iiif.io/api/image/1/profiles/level1.json",zb="http://iiif.io/api/image/1/level2.json",_b="http://iiif.io/api/image/1/profiles/level2.json",cA="http://iiif.io/api/image/2/level0.json",fA="http://iiif.io/api/image/2/profiles/level0.json",jb="http://iiif.io/api/image/2/level1.json",Ib="http://iiif.io/api/image/2/profiles/level1.json",Ub="http://iiif.io/api/image/2/level2.json",Fb="http://iiif.io/api/image/2/profiles/level2.json",dA="level0",Bb="level1",Hb="level2",hA="http://iiif.io/api/image/2/level0",Vb="http://iiif.io/api/image/2/level1",Wb="http://iiif.io/api/image/2/level2",pA=[Vb,Wb,Cb,Rb,Ob,Ab,Mb,Pb,Lb,Db,kb,Nb,zb,_b,jb,Ib,Ub,Fb,Bb,Hb],vA=[hA,Vb,Wb,iA,Cb,Rb,sA,Ob,Ab,oA,Mb,Pb,aA,Lb,Db,lA,uA,kb,Nb,zb,_b,cA,fA,jb,Ib,Ub,Fb,dA,Bb,Hb];function Os(t){for(const e in t)(typeof t[e]>"u"||t[e]===null)&&delete t[e];return t}const rv={attributionLabel:"Attribution",lang:"none",providerId:"http://example.org/provider",providerName:"Unknown"};function mA(t){if(typeof t=="string")return[t];if(!t)return[];const e=Array.isArray(t)?t:[t],n=[];for(const i of e){if(typeof i=="string"){n.push(i);continue}n.push({"@language":i["@language"]||i.language,"@value":i["@value"]||i.value})}return n}function qo(t,e="none"){if(!t)return{};const n=mA(t),i={};for(const a of n){if(typeof a=="string"){i[e]=i[e]?i[e]:[],i[e].push(a||"");continue}if(!a["@language"]){i[e]=i[e]?i[e]:[],i[e].push(a["@value"]||"");continue}const c=a["@language"];i[c]=i[c]?i[c]:[],i[c].push(a["@value"]||"")}return i}function $b(t){if(Array.isArray(t))return $b(t.find(e=>typeof e=="string"));if(vA.indexOf(t)!==-1)return"level2";if(pA.indexOf(t)!==-1)return"level1";if(typeof t=="string")return t}function gA(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 yA(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 qb(t){for(const e of["sc","oa","dcterms","dctypes","iiif"])if(t.startsWith(`${e}:`))return t.slice(e.length+1);return t}const bA=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function iv(t){const e=t["@id"]||t.id;let n=t["@type"]||t.type;const i=t.profile||void 0,a=t["@context"]||void 0;if(i){const c=yA(i);if(c)return c}if(a){const c=gA(a);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&&bA.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 SA=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function xA(t){const e=t.match(SA);return e?e[0]:t}function wA(t,e="Rights/License",n="none"){let i=null;const a=[],c=Array.isArray(t)?t:[t];for(const f of c){const p=f?xA(f):void 0;if(p&&(p.indexOf("creativecommons.org")!==-1||p.indexOf("rightsstatements.org")!==-1)){p.startsWith("https://")?i=`http://${p.slice(8)}`:i=p;continue}p&&a.push({label:{[n]:[e]},value:{[n]:[p]}})}return[i,a]}const EA=["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 TA(t){if(t){const e=Array.isArray(t)?t:[t],n=[];for(const i of e)i==="http://iiif.io/api/presentation/2/context.json"&&n.push("http://iiif.io/api/presentation/3/context.json"),EA.indexOf(i)===-1&&n.push(i);if(e.length)return n.length===1?n[0]:n}}function CA(t){return t?t.map(e=>({label:qo(e.label),value:qo(e.value)})):[]}let Yb=0;function Qb(t,e){const n=encodeURI(t.id||t["@id"]||"").trim();return n&&e?`${n}/${e}`:n||(Yb++,`http://example.org/${t["@type"]}${e?`/${e}`:""}/${Yb}`)}function As(t){const e=[...t.behavior||[]];t.viewingHint&&e.push(t.viewingHint);let n;return Array.isArray(t.motivation)?n=t.motivation.map(qb):t.motivation&&(n=qb(t.motivation)),{"@context":t["@context"]?TA(t["@context"]):void 0,id:(t["@id"]||Qb(t)).trim(),type:iv(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 Ms(t){const[e,n]=wA(t.license),i=[...t.metadata?CA(t.metadata):[],...n];return{rights:e,metadata:i.length?i:void 0,label:t.label?qo(t.label):void 0,requiredStatement:t.attribution?{label:qo(rv.attributionLabel),value:qo(t.attribution)}:void 0,navDate:t.navDate,summary:t.description?qo(t.description):void 0,thumbnail:RA(t.thumbnail)}}function RA(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 OA(t){if(!t.within)return;const e=Array.isArray(t.within)?t.within:[t.within],n=[];for(const i of e)if(typeof i=="string"){if(i)switch(t["@type"]){case"sc:Manifest":n.push({id:i,type:"Collection"});break}}else i["@id"]&&n.push({id:i["@id"],type:iv(i)});return n.length?n:void 0}function lo(t){const e=t.related?Array.isArray(t.related)?t.related:[t.related]:[],n=t.contentLayer;return{provider:t.logo||e.length?[{id:rv.providerId,type:"Agent",homepage:e.length?[e[0]]:void 0,logo:t.logo?Array.isArray(t.logo)?t.logo:[t.logo]:void 0,label:qo(rv.providerName)}]:void 0,partOf:OA(t),rendering:t.rendering,seeAlso:t.seeAlso,start:t.startCanvas,service:t.service?nA(t.service):void 0,supplementary:n?[n]:void 0}}function AA(t){return{chars:t.chars,format:t.format?t.format:void 0,language:t.language}}function MA(t){return Os({...As(t),...Ms(t),...lo(t),items:t.members})}function PA(t){const e=[],n=[];let i;for(const c of t.sequences||[])c.canvases.length&&e.push(...c.canvases),c.behavior&&n.push(...c.behavior),c.startCanvas&&(i=c.startCanvas);const a=As(t);return n.length&&(a.behavior?a.behavior.push(...n):a.behavior=n),Os({...a,...Ms(t),...lo(t),start:i,items:e,structures:t.structures})}function LA(t){return Os({...As(t),...Ms(t),...lo(t),annotations:t.otherContent&&t.otherContent.length?t.otherContent:void 0,items:t.images&&t.images.length?[{id:Qb(t,"annotation-page"),type:"AnnotationPage",items:t.images}]:void 0})}function DA(t){return Os({...As(t),...Ms(t),...lo(t),items:t.resources&&t.resources.length?t.resources:void 0})}function kA(t){return!t.canvases||t.canvases.length===0?{canvases:[],behavior:[]}:{canvases:t.canvases,behavior:t.viewingHint?[t.viewingHint]:[],startCanvas:t.startCanvas}}function NA(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 i;if(typeof n.full=="string")i=n.full;else if(n.full["@type"]==="dctypes:Image")i={id:n.full["@id"],type:"Image"};else if(n.full["@type"]==="sc:Canvas")i={id:n.full["@id"],type:"Canvas"};else throw new Error(`Unsupported source type on annotation: ${n.full["@type"]}`);return{type:"SpecificResource",source:i,selector:ov(n.selector)}}else return encodeURI(n["@id"]).trim()}return Os({...As(t),...Ms(t),...lo(t),target:e(t.on),body:Array.isArray(t.resource)?t.resource.map(sv):sv(t.resource)})}function sv(t){const e=t;return Os({...As(e),...Ms(e),...lo(e),...AA(e)})}function zA(t){const e=[];return t.default&&t.default!=="rdf:nil"&&e.push(t.default),t.item&&t.item!=="rdf:nil"&&e.push(...t.item),{...As(t),...Ms(t),items:e}}function _A(t){return Os({...As(t),...Ms(t),...lo(t),items:t.members})}function jA(t){const{"@id":e,"@type":n,"@context":i,profile:a,...c}=t,f={};return e&&(f["@id"]=e),f["@type"]=iv(t),f["@type"]==="unknown"&&(i&&i.length&&(f["@context"]=i),f["@type"]="Service"),a&&(f.profile=$b(a)),Os({...f,...c})}function IA(t){return Os({...As(t),...Ms(t),...lo(t)})}new nv({collection:[MA],manifest:[PA],canvas:[LA],annotationList:[DA],sequence:[kA],annotation:[NA],contentResource:[sv],choice:[zA],range:[_A],service:[jA],layer:[IA]});function ov(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[ov(t.default),...(Array.isArray(t.item)?t.item:[t.item]).map(ov)];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 Gb={exports:{}};(function(t,e){var n=Object.defineProperty,i=(c,f,p)=>f in c?n(c,f,{enumerable:!0,configurable:!0,writable:!0,value:p}):c[f]=p,a=(c,f,p)=>(i(c,typeof f!="symbol"?f+"":f,p),p);(function(c,f){f(e)})(kO,function(c){const f="http://library.stanford.edu/iiif/image-api/compliance.html#level1",p="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",R="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",D="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",A="http://iiif.io/api/image/1/level1.json",z="http://iiif.io/api/image/1/profiles/level1.json",P="http://iiif.io/api/image/1/level2.json",L="http://iiif.io/api/image/1/profiles/level2.json",M="http://iiif.io/api/image/2/level1.json",F="http://iiif.io/api/image/2/profiles/level1.json",$="http://iiif.io/api/image/2/level2.json",Q="http://iiif.io/api/image/2/profiles/level2.json",j="level1",K="level2",ee="http://iiif.io/api/image/2/level1",V="http://iiif.io/api/image/2/level2",ae=[ee,V,f,p,g,x,m,w,R,D,A,z,P,L,M,F,$,Q,j,K],ge=["http://iiif.io/api/image/2/level0",ee,V,"http://library.stanford.edu/iiif/image-api/compliance.html#level0",f,p,"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",R,D,"http://iiif.io/api/image/1/level0.json","http://iiif.io/api/image/1/profiles/level0.json",A,z,P,L,"http://iiif.io/api/image/2/level0.json","http://iiif.io/api/image/2/profiles/level0.json",M,F,$,Q,"level0",j,K],we=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];class Ee{constructor(N,Z={}){a(this,"traversals"),a(this,"options"),this.traversals={collection:[],manifest:[],canvas:[],annotationList:[],sequence:[],annotation:[],contentResource:[],choice:[],range:[],service:[],layer:[],...N},this.options={convertPropsToArray:!0,mergeMemberProperties:!0,allowUndefinedReturn:!1,...Z}}static all(N){return new Ee({collection:[N],manifest:[N],canvas:[N],annotationList:[N],sequence:[N],annotation:[N],contentResource:[N],choice:[N],range:[N],service:[N],layer:[N]})}traverseCollection(N){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCollectionItems(N))),this.traversals.collection)}traverseCollectionItems(N){if(this.options.mergeMemberProperties){const Z=[...(N.manifests||[]).map(Me=>typeof Me=="string"?{"@id":Me,"@type":"sc:Manifest"}:Me),...(N.collections||[]).map(Me=>typeof Me=="string"?{"@id":Me,"@type":"sc:Collection"}:Me),...N.members||[]];delete N.collections,delete N.manifests,N.members=Z}return N.manifests&&(N.manifests=N.manifests.map(Z=>this.traverseManifest(typeof Z=="string"?{"@id":Z,"@type":"sc:Manifest"}:Z))),N.collections&&(N.collections=N.collections.map(Z=>this.traverseCollection(typeof Z=="string"?{"@id":Z,"@type":"sc:Collection"}:Z))),N.members&&(N.members=N.members.map(Z=>typeof Z=="string"?Z:this.traverseUnknown(Z))),N}traverseManifest(N){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseManifestItems(N))),this.traversals.manifest)}traverseManifestItems(N){return N.sequences&&(N.sequences=N.sequences.map(Z=>this.traverseSequence(Z))),N.structures&&(N.structures=N.structures.map(Z=>this.traverseRange(Z))),N}traverseSequence(N){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseSequenceItems(N))),this.traversals.sequence)}traverseSequenceItems(N){return N.canvases&&(N.canvases=N.canvases.map(Z=>this.traverseCanvas(Z))),N}traverseCanvas(N){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCanvasItems(N))),this.traversals.canvas)}traverseCanvasItems(N){return N.images&&(N.images=N.images.map(Z=>this.traverseAnnotation(Z))),N.otherContent&&(N.otherContent=N.otherContent.map(Z=>this.traverseAnnotationList(Z))),N}traverseRange(N){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseRangeItems(N))),this.traversals.range)}traverseRangeItems(N){if(this.options.mergeMemberProperties){const Z=[...(N.ranges||[]).map(Me=>typeof Me=="string"?{"@id":Me,"@type":"sc:Range"}:Me),...(N.canvases||[]).map(Me=>typeof Me=="string"?{"@id":Me,"@type":"sc:Canvas"}:Me),...N.members||[]];delete N.ranges,delete N.canvases,N.members=Z.length?Z.map(Me=>this.traverseUnknown(Me)):void 0}return N}traverseAnnotationList(N){const Z=typeof N=="string"?{"@id":N,"@type":"sc:AnnotationList"}:N;return this.traverseType(this.traverseDescriptive(this.traverseAnnotationListItems(Z)),this.traversals.annotationList)}traverseAnnotationListItems(N){return N.resources&&(N.resources=N.resources.map(Z=>this.traverseAnnotation(Z))),N}traverseAnnotation(N){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseAnnotationItems(N))),this.traversals.annotation)}traverseAnnotationItems(N){return N.resource&&(Array.isArray(N.resource)?N.resource=N.resource.map(Z=>this.traverseContentResource(Z)):N.resource=this.traverseContentResource(N.resource)),N.on,N}traverseLayer(N){return this.traverseType(this.traverseLinking(this.traverseLayerItems(N)),this.traversals.layer)}traverseLayerItems(N){return N.otherContent&&(N.otherContent=N.otherContent.map(Z=>this.traverseAnnotationList(Z))),N}traverseChoice(N){return this.traverseType(this.traverseChoiceItems(N),this.traversals.choice)}traverseChoiceItems(N){return N.default&&N.default!=="rdf:nil"&&(N.default=this.traverseContentResource(N.default)),N.item&&N.item!=="rdf:nil"&&(N.item=N.item.map(Z=>this.traverseContentResource(Z))),N}traverseService(N){return this.traverseType(this.traverseLinking(N),this.traversals.service)}traverseContentResource(N){return N["@type"]==="oa:Choice"?this.traverseChoice(N):this.traverseType(this.traverseDescriptive(this.traverseLinking(N)),this.traversals.contentResource)}traverseUnknown(N){if(!N["@type"]||typeof N=="string")return N;switch(function(Z){if(Z==null)throw new Error("Null or undefined is not a valid entity.");if(Array.isArray(Z))throw new Error("Array is not a valid entity");if(typeof Z!="object")throw new Error(typeof Z+" is not a valid entity");if(typeof Z["@type"]=="string"){const Me=we.indexOf(Z["@type"]);if(Me!==-1)return we[Me]}if(Z.profile)return"Service";if(Z.format||Z["@type"])return"ContentResource";throw new Error("Resource type is not known")}(N)){case"sc:Collection":return this.traverseCollection(N);case"sc:Manifest":return this.traverseManifest(N);case"sc:Canvas":return this.traverseCanvas(N);case"sc:Sequence":return this.traverseSequence(N);case"sc:Range":return this.traverseRange(N);case"oa:Annotation":return this.traverseAnnotation(N);case"sc:AnnotationList":return this.traverseAnnotationList(N);case"sc:Layer":return this.traverseLayer(N);case"Service":return this.traverseService(N);case"oa:Choice":return this.traverseChoice(N);case"ContentResource":return this.traverseContentResource(N)}return N.profile?this.traverseService(N):N}traverseImageResource(N){const Z=Array.isArray(N),Me=Array.isArray(N)?N:[N],ft=[];for(const et of Me)typeof et=="string"?ft.push(this.traverseContentResource({"@id":et,"@type":"dctypes:Image"})):ft.push(this.traverseContentResource(et));return Z||this.options.convertPropsToArray?ft:ft[0]}traverseDescriptive(N){return N.thumbnail&&(N.thumbnail=this.traverseImageResource(N.thumbnail)),N.logo&&(N.logo=this.traverseImageResource(N.logo)),N}traverseOneOrMoreServices(N){const Z=Array.isArray(N),Me=Array.isArray(N)?N:[N],ft=[];for(const et of Me)ft.push(this.traverseService(et));return Z||this.options.convertPropsToArray?ft:ft[0]}traverseLinking(N){return N.related&&(N.related=this.traverseOneOrManyType(N.related,this.traversals.contentResource)),N.rendering&&(N.rendering=this.traverseOneOrManyType(N.rendering,this.traversals.contentResource)),N.service&&(N.service=this.traverseOneOrMoreServices(N.service)),N.seeAlso&&(N.seeAlso=this.traverseOneOrManyType(N.seeAlso,this.traversals.contentResource)),N.within&&(typeof N.within=="string"||(N.within=this.traverseOneOrManyType(N.within,this.traversals.contentResource))),N.startCanvas&&(typeof N.startCanvas=="string"?N.startCanvas=this.traverseType({"@id":N.startCanvas,"@type":"sc:Canvas"},this.traversals.canvas):N.startCanvas&&this.traverseType(N.startCanvas,this.traversals.canvas)),N.contentLayer&&(typeof N.contentLayer=="string"?N.contentLayer=this.traverseLayer({"@id":N.contentLayer,"@type":"sc:Layer"}):N.contentLayer=this.traverseLayer(N.contentLayer)),N}traverseOneOrManyType(N,Z){if(!Array.isArray(N)){if(!this.options.convertPropsToArray)return this.traverseType(N,Z);N=[N]}return N.map(Me=>this.traverseType(Me,Z))}traverseType(N,Z){return Z.reduce((Me,ft)=>{const et=ft(Me);return et!==void 0||this.options.allowUndefinedReturn?et:Me},N)}}function Ue(I){for(const N in I)I[N]!==void 0&&I[N]!==null||delete I[N];return I}const Fe="Attribution",Be="http://example.org/provider",vt="Unknown";function Oe(I,N="none"){if(!I)return{};const Z=function(ft){if(typeof ft=="string")return[ft];if(!ft)return[];const et=Array.isArray(ft)?ft:[ft],Ft=[];for(const mn of et)typeof mn!="string"?Ft.push({"@language":mn["@language"]||mn.language,"@value":mn["@value"]||mn.value}):Ft.push(mn);return Ft}(I),Me={};for(const ft of Z){if(typeof ft=="string"){Me[N]=Me[N]?Me[N]:[],Me[N].push(ft||"");continue}if(!ft["@language"]){Me[N]=Me[N]?Me[N]:[],Me[N].push(ft["@value"]||"");continue}const et=ft["@language"];Me[et]=Me[et]?Me[et]:[],Me[et].push(ft["@value"]||"")}return Me}function it(I){return Array.isArray(I)?it(I.find(N=>typeof N=="string")):ge.indexOf(I)!==-1?"level2":ae.indexOf(I)!==-1?"level1":typeof I=="string"?I:void 0}function nt(I){for(const N of["sc","oa","dcterms","dctypes","iiif"])if(I.startsWith(`${N}:`))return I.slice(N.length+1);return I}const W=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function Re(I){const N=I["@id"]||I.id;let Z=I["@type"]||I.type;const Me=I.profile||void 0,ft=I["@context"]||void 0;if(Me){const et=function(Ft){switch(Ft){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"}}(Me);if(et)return et}if(ft){const et=function(Ft){const mn=Array.isArray(Ft)?Ft:[Ft];for(const Le of mn)switch(Le){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"}}(ft);if(et)return et}if(Z){if(Array.isArray(Z)){if(Z.indexOf("oa:CssStylesheet")!==-1)return"CssStylesheet";if(Z.indexOf("cnt:ContentAsText")!==-1)return"TextualBody";Z=Z[0]}for(const et of["sc","oa","dcterms","dctypes","iiif"])if(Z.startsWith(`${et}:`)){Z=Z.slice(et.length+1);break}switch(Z){case"Layer":return"AnnotationCollection";case"AnnotationList":return"AnnotationPage";case"cnt:ContentAsText":return"TextualBody"}}if(Z&&W.indexOf(Z)!==-1)return Z;if(I.format){if(I.format.startsWith("image/"))return"Image";if(I.format.startsWith("text/")||I.format==="application/pdf")return"Text";if(I.format.startsWith("application/"))return"Dataset"}return N&&(N.endsWith(".jpg")||N.endsWith(".png")||N.endsWith(".jpeg"))?"Image":Z||"unknown"}const Ie=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function tt(I){const N=I.match(Ie);return N?N[0]:I}const at=["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 $t(I){if(I){const N=Array.isArray(I)?I:[I],Z=[];for(const Me of N)Me==="http://iiif.io/api/presentation/2/context.json"&&Z.push("http://iiif.io/api/presentation/3/context.json"),at.indexOf(Me)===-1&&Z.push(Me);if(N.length)return Z.length===1?Z[0]:Z}}let _t=0;function yt(I,N){const Z=encodeURI(I.id||I["@id"]||"").trim();return Z&&N?`${Z}/${N}`:Z||(_t++,`http://example.org/${I["@type"]}${N?`/${N}`:""}/${_t}`)}function xt(I){const N=[...I.behavior||[]];let Z;return I.viewingHint&&N.push(I.viewingHint),Array.isArray(I.motivation)?Z=I.motivation.map(nt):I.motivation&&(Z=nt(I.motivation)),{"@context":I["@context"]?$t(I["@context"]):void 0,id:(I["@id"]||yt(I)).trim(),type:Re(I),behavior:N.length?N:void 0,height:I.height?I.height:void 0,width:I.width?I.width:void 0,motivation:Z,viewingDirection:I.viewingDirection,profile:I.profile,format:I.format?I.format:void 0,duration:void 0,timeMode:void 0}}function Pt(I){const[N,Z]=function(et,Ft="Rights/License",mn="none"){let Le=null;const oe=[],X=Array.isArray(et)?et:[et];for(const de of X){const le=de?tt(de):void 0;!le||le.indexOf("creativecommons.org")===-1&&le.indexOf("rightsstatements.org")===-1?le&&oe.push({label:{[mn]:[Ft]},value:{[mn]:[le]}}):Le=le.startsWith("https://")?`http://${le.slice(8)}`:le}return[Le,oe]}(I.license),Me=[...I.metadata?(ft=I.metadata,ft?ft.map(et=>({label:Oe(et.label),value:Oe(et.value)})):[]):[],...Z];var ft;return{rights:N,metadata:Me.length?Me:void 0,label:I.label?Oe(I.label):void 0,requiredStatement:I.attribution?{label:Oe(Fe),value:Oe(I.attribution)}:void 0,navDate:I.navDate,summary:I.description?Oe(I.description):void 0,thumbnail:St(I.thumbnail)}}function St(I){return I&&(Array.isArray(I)?I:[I]).map(N=>typeof N=="string"?{id:N,type:"Image"}:(N.type==="unknown"&&(N.type="Image"),N))}function ht(I){if(!I.within)return;const N=Array.isArray(I.within)?I.within:[I.within],Z=[];for(const Me of N)typeof Me=="string"?Me&&I["@type"]==="sc:Manifest"&&Z.push({id:Me,type:"Collection"}):Me["@id"]&&Z.push({id:Me["@id"],type:Re(Me)});return Z.length?Z:void 0}function ke(I){const N=I.related?Array.isArray(I.related)?I.related:[I.related]:[],Z=I.contentLayer;return{provider:I.logo||N.length?[{id:Be,type:"Agent",homepage:N.length?[N[0]]:void 0,logo:I.logo?Array.isArray(I.logo)?I.logo:[I.logo]:void 0,label:Oe(vt)}]:void 0,partOf:ht(I),rendering:I.rendering,seeAlso:I.seeAlso,start:I.startCanvas,service:I.service?(Me=I.service,Array.isArray(Me)?Me:Me?[Me]:[]):void 0,supplementary:Z?[Z]:void 0};var Me}function qe(I){const N=I;return Ue({...xt(N),...Pt(N),...ke(N),...(Z=N,{chars:Z.chars,format:Z.format?Z.format:void 0,language:Z.language})});var Z}const st=new Ee({collection:[function(I){return Ue({...xt(I),...Pt(I),...ke(I),items:I.members})}],manifest:[function(I){const N=[],Z=[];let Me;for(const et of I.sequences||[])et.canvases.length&&N.push(...et.canvases),et.behavior&&Z.push(...et.behavior),et.startCanvas&&(Me=et.startCanvas);const ft=xt(I);return Z.length&&(ft.behavior?ft.behavior.push(...Z):ft.behavior=Z),Ue({...ft,...Pt(I),...ke(I),start:Me,items:N,structures:I.structures})}],canvas:[function(I){return Ue({...xt(I),...Pt(I),...ke(I),annotations:I.otherContent&&I.otherContent.length?I.otherContent:void 0,items:I.images&&I.images.length?[{id:yt(I,"annotation-page"),type:"AnnotationPage",items:I.images}]:void 0})}],annotationList:[function(I){return Ue({...xt(I),...Pt(I),...ke(I),items:I.resources&&I.resources.length?I.resources:void 0})}],sequence:[function(I){return I.canvases&&I.canvases.length!==0?{canvases:I.canvases,behavior:I.viewingHint?[I.viewingHint]:[],startCanvas:I.startCanvas}:{canvases:[],behavior:[]}}],annotation:[function(I){return Ue({...xt(I),...Pt(I),...ke(I),target:function N(Z){if(Array.isArray(Z)){if(Z.length>1)return{type:"List",items:Z.map(N)};Z=Z[0]}if(typeof Z=="string")return encodeURI(Z).trim();if("@type"in Z){let Me;if(typeof Z.full=="string")Me=Z.full;else if(Z.full["@type"]==="dctypes:Image")Me={id:Z.full["@id"],type:"Image"};else{if(Z.full["@type"]!=="sc:Canvas")throw new Error(`Unsupported source type on annotation: ${Z.full["@type"]}`);Me={id:Z.full["@id"],type:"Canvas"}}return{type:"SpecificResource",source:Me,selector:wt(Z.selector)}}return encodeURI(Z["@id"]).trim()}(I.on),body:Array.isArray(I.resource)?I.resource.map(qe):qe(I.resource)})}],contentResource:[qe],choice:[function(I){const N=[];return I.default&&I.default!=="rdf:nil"&&N.push(I.default),I.item&&I.item!=="rdf:nil"&&N.push(...I.item),{...xt(I),...Pt(I),items:N}}],range:[function(I){return Ue({...xt(I),...Pt(I),...ke(I),items:I.members})}],service:[function(I){const{"@id":N,"@type":Z,"@context":Me,profile:ft,...et}=I,Ft={};return N&&(Ft["@id"]=N),Ft["@type"]=Re(I),Ft["@type"]==="unknown"&&(Me&&Me.length&&(Ft["@context"]=Me),Ft["@type"]="Service"),ft&&(Ft.profile=it(ft)),Ue({...Ft,...et})}],layer:[function(I){return Ue({...xt(I),...Pt(I),...ke(I)})}]});function wt(I){if((Array.isArray(I["@type"])&&I["@type"].includes("oa:SvgSelector")||I["@type"]=="oa:SvgSelector")&&("chars"in I||"value"in I))return{type:"SvgSelector",value:"chars"in I?I.chars:I.value};if(I["@type"]==="oa:FragmentSelector")return{type:"FragmentSelector",value:I.value};if(I["@type"]==="oa:Choice")return[wt(I.default),...(Array.isArray(I.item)?I.item:[I.item]).map(wt)];if(I["@type"]=="iiif:ImageApiSelector")return{type:"ImageApiSelector",region:"region"in I?I.region:void 0,rotation:"rotation"in I?I.rotation:void 0};throw new Error(`Unsupported selector type: ${I["@type"]}`)}const vn=function(I){return I&&I["@context"]&&(I["@context"]==="http://iiif.io/api/presentation/2/context.json"||I["@context"].indexOf("http://iiif.io/api/presentation/2/context.json")!==-1||I["@context"]==="http://www.shared-canvas.org/ns/context.json")||I["@context"]==="http://iiif.io/api/image/2/context.json"?st.traverseUnknown(I):I};c.upgrade=vn,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})(Gb,Gb.exports);function UA(t){return t.type==="SpecificResource"?[t.source,{selector:t.selector}]:[t,{selector:null}]}function av(t,e){const{selector:n,source:i}=Ju(e);if(i.id!==t.id)return[null,i];const a={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:a.spatial}:n:null,i]}const Xb={makeChoice:()=>{}},hd={type:"unknown"},Un=t=>({type:"unknown",reason:t,annotations:{pages:[]}}),Kb=(t,e)=>({type:"empty",width:t,height:e,annotations:{pages:[]},image:null,images:[]});function FA(t,e){var i;const n=(i=t==null?void 0:t.iiif)==null?void 0:i.meta[e];return n?n.annotationPageManager:null}function BA(t,e){return or(n=>{const i=[];if(!t)return i;const a=Object.keys(n.iiif.entities.AnnotationPage);for(const c of a)if(!e||e.indexOf(c)!==-1){const f=FA(n,c);f&&f.views&&f.views[t]&&i.push(c)}return i},[t,e])}function Zb({canvas:t,manifest:e,all:n,canvases:i}){const a=[];if(e)for(const c of e.annotations)a.indexOf(c.id)===-1&&a.push(c.id);if(n){if(i&&i.length)for(const c of i)for(const f of c.annotations)a.indexOf(f.id)===-1&&a.push(f.id)}else if(t)for(const c of t.annotations)a.indexOf(c.id)===-1&&a.push(c.id);return a}function HA(t,e){var i;const n=(i=t==null?void 0:t.iiif)==null?void 0:i.meta[e];return n?n.annotationPageManager:null}function lv(t,e={}){const n=In(),i=Zi(),a=mi(),c=Up(),f=T.useMemo(()=>Zb({all:e.all,manifest:i,canvas:a,canvases:c}),[e.all,a,c,i]),p=BA(t,e.all?void 0:f),g=T.useCallback(m=>{t&&n.setMetaValue([m,"annotationPageManager","views"],w=>w&&!w[t]?w:{...w||{},[t]:!1})},[t,n]),x=T.useCallback((m,w={})=>{if(!t)return;const R=n.getState(),D=[];if(w!=null&&w.deselectOthers){const A=Object.keys(R.iiif.entities.AnnotationPage);for(const z of A){const P=HA(R,z);P&&P.views&&P.views[t]&&D.push(z)}}for(const A of D)g(A);n.setMetaValue([m,"annotationPageManager","views"],A=>A&&A[t]?A:{...A||{},[t]:!0})},[t,g,n]);return{availablePageIds:f,enabledPageIds:p,setPageEnabled:x,setPageDisabled:g}}function Jb(t,e){return or((n,i)=>i.get(t.map(a=>({id:a,type:e}))),[t,e])}const e1=T.createContext(new Ss.ImageServiceLoader);function ec(){return T.useContext(e1)}function t1(){const t=ec(),[e,n]=T.useState({}),i=T.useRef(!1);return T.useEffect(()=>()=>{i.current=!0},[]),[T.useCallback((c,{height:f,width:p})=>{if(c){const g=c.id||c["@id"],x=t.loadServiceSync({id:g,width:c.width||p,height:c.height||f,source:c});x?c=x:e[g]||(i.current||n(m=>({...m,[g]:"loading"})),t.loadService({id:g,width:c.width||p,height:c.height||f}).then(()=>{i.current||n(m=>({...m,[g]:"done"}))}))}return c},[t,e]),e]}function pd(t={}){const e=Kp(),n=mi(t.canvasId?{id:t.canvasId}:void 0);return or((i,a)=>{if(!n)return[];if(e&&t.enableSingleAnnotation)return[e];const c=a.get(n.items),f=[];for(const p of c)f.push(...a.get(p.items));return f},[n])}function VA(t){return t.type==="SpecificResource"?[t.source,{selector:t.selector}]:[t,{selector:null}]}const vd={},n1={get(t){return t},setMetaValue([t,e,n],i){const a=n1.getResourceMeta(t,e),c=a?a[n]:void 0,f=typeof i=="function"?i(c):i;vd[t]={...vd[t]||{},[e]:{...(vd[t]||{})[e]||{},[n]:f}}},getResourceMeta:(t,e)=>{const n=vd[t];if(n)return e?n[e]:n}};function WA(t=n1){function e(a){const c=a?typeof a=="string"?t.get(a):a:null;if(!c)return[];const f=t.get(c.items,{parent:c}),p=[];for(const g of f)p.push(...t.get(g.items,{parent:g}));return p}function n(a,c=[]){const f=Array.isArray(a)?a:e(a),p=[];let g=null;const x=[];for(const m of f){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 R of w){const[D,{selector:A}]=VA(R),z=t.get(D),P=(z.type||"unknown").toLowerCase();if(P==="choice"){const L=t.get(z.items,{parent:z.id}),M=c.length?c.map(F=>L.find($=>$.id===F)).filter(Boolean):[L[0]];M.length===0&&M.push(L[0]),g={type:"single-choice",items:L.map(F=>({id:F.id,label:F.label,selected:M.indexOf(F)!==-1})),label:D.label},w.push(...M);continue}p.indexOf(P)===-1&&p.push(P),x.push({type:P,annotationId:m.id,resource:z,target:m.target,selector:A})}}return{types:p,items:x,choice:g}}function i(a){const{choice:c}=n(a);return c}return{getAllPaintingAnnotations:e,getPaintables:n,extractChoices:i}}function r1(t,e=[]){const n=In(),i=T.useMemo(()=>WA(n),[]),a=pd({enableSingleAnnotation:t==null?void 0:t.enableSingleAnnotation}),[c,f]=T.useState((t==null?void 0:t.defaultChoices)||[]),p=T.useMemo(()=>i.getPaintables(a,c),[n,a,c,...e]),x={makeChoice:T.useCallback((m,{deselectOthers:w=!0,deselect:R=!1}={})=>{if(p.choice){if(p.choice.type!=="single-choice")throw new Error("Complex choice not supported yet");f(D=>{if(R){const z=D.filter(P=>P!==m);if(z.length===0){const P=p.items[0].resource.id;return P?[P]:[]}return z}if(w)return[m];const A=[...D];if(A.length===0&&p.items.length){const z=p.items[0].resource.id;z&&A.push(z)}return D.indexOf(m)!==-1?D:[...D,m]})}},[p.choice])};return[p,x]}const $A=["model/gltf-binary"];function i1(t,e){const i=e.items[0].resource;return i.format?$A.indexOf(i.format)===-1?Un(`3D format: ${i.format} is unsupported`):{type:"3d-model",model:i}:Un("Unknown format")}function qA(t,e){var i;if(!t.duration)return Un("No duration on canvas");if(e.items.length>1)return Un("Only one audio source supported");const n=(i=e.items[0])==null?void 0:i.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:[]}}:Un("Audio does not have format"):Un("Unknown audio")}function s1(t,e,n){const i=[];for(const a of e.items){const c=a.resource&&a.resource.type==="SpecificResource"?a.resource.source:a.resource;if(!c.id)return Un("No resource Identifier");let f;if(c.service){const D=Ss.getImageServices(c);D[0]&&(f=n(D[0],t))}const p={type:"BoxSelector",spatial:{x:0,y:0,width:Number(t.width),height:Number(t.height)}},[g,x]=av(t,a.target);if(!(x.id===t.id||decodeURIComponent(x.id||"")===(t.id||"")))continue;a.resource.width&&a.resource.height&&(a.resource.width,a.resource.height);let m=a.resource.type==="SpecificResource"?ao(a.resource):null;if(a.selector){const D=ao({type:"SpecificResource",source:a.resource,selector:a.selector});D&&(m=D)}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;f&&!f.id&&(f.id=f["@id"]);const R={id:c.id,type:"Image",annotationId:a.annotationId,width:Number(g||w?c.width:t.width),height:Number(g||w?c.height:t.height),service:f,sizes:f&&f.sizes?f.sizes:c.width&&c.height?[{width:c.width,height:c.height}]:[],target:g&&g.type!=="PointSelector"?g:p,selector:w};i.push(R)}return{type:"images",image:i[0],images:i,choice:e.choice}}function o1(t,e={},n){const i=t.language||n||"none";switch(t.type){case"TextualBody":{typeof t.value<"u"&&(e[i]=t.value);break}case"List":case"Composite":case"Choice":t.items&&t.items.forEach(a=>o1(a,e,i))}return e}function a1(t,e){const n=[];return e.items.forEach(i=>{if(i.resource){const[a]=av(t,i.target);n.push({annotationId:i.annotationId,text:o1(i.resource),target:a})}}),{type:"textual-content",items:n}}const YA=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/)|(?:(?:watch)?\?vi?=|&vi?=))([^#&?]*).*/;function l1(t,e){var p;const n=e.items.filter(g=>g.type==="video");let i=!1;if(t.duration||(i=!0),n.length>1)return Un("Only one video source supported");const a=(p=n[0])==null?void 0:p.resource,c=!!(a.service||[]).find(g=>(g.profile||"").includes("youtube.com"));if(!c&&i)return Un("Video does not have duration");if(!a)return Un("Unknown video");if((!a.format||a.format==="text/html")&&!c)return Un("Video does not have format");const f={annotationId:e.items[0].annotationId,duration:t.duration,url:a.id,type:"Video",items:[],target:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}},format:a.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:t.duration}}};if(c){f.type="VideoYouTube";const g=a.id.match(YA);if(!g[1])return Un("Video is not known youtube video");f.youTubeId=g[1]}return{type:"media",media:f,annotations:{pages:[]}}}function u1({canvas:t,paintables:e,supports:n,loadImageService:i}){if(!t)return console.log("No canvas"),hd;if(e.types.length===0)return n.indexOf("empty")!==-1?Kb(t.width,t.height):(console.log("No paintables"),hd);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?Un("Complex timeline not supported"):Un("ComplexTimelineStrategy not yet supported");const a=e.types[0];return a==="image"?n.indexOf("images")===-1?Un("Image not supported"):s1(t,e,i):a==="Model"||a==="model"?n.indexOf("3d-model")===-1?Un("3D not supported"):i1(t,e):a==="textualbody"?n.indexOf("textual-content")===-1?Un("Textual content not supported"):a1(t,e):a==="sound"||a==="audio"?n.indexOf("media")===-1?Un("Media not supported"):qA(t,e):a==="video"?n.indexOf("media")===-1?Un("Media not supported"):l1(t,e):hd}function c1(t){const e=Zi(),n=mi(),i=In(),[a,c]=t1(),{enabledPageIds:f}=lv((t==null?void 0:t.annotationPageManagerId)||(e==null?void 0:e.id)||(n==null?void 0:n.id),{all:!1}),p=Jb(f,"AnnotationPage"),g=(t==null?void 0:t.strategies)||["empty","images","media","textual-content","complex-timeline"],[x,m]=r1(t,[c]),w=T.useMemo(()=>u1({canvas:n,paintables:x,supports:g,loadImageService:a}),[n,x,i,m.makeChoice]);return T.useMemo(()=>w.type==="unknown"?[w,Xb]:[{...w,annotations:{pages:p}},m],[w,p])}const f1=(t,e=[])=>{const n=In();T.useEffect(()=>{t(n)},[n,...e])},md={},d1={get(t){return t},setMetaValue([t,e,n],i){const a=d1.getResourceMeta(t,e),c=a?a[n]:void 0,f=typeof i=="function"?i(c):i;md[t]={...md[t]||{},[e]:{...(md[t]||{})[e]||{},[n]:f}}},getResourceMeta:(t,e)=>{const n=md[t];if(n)return e?n[e]:n}},QA=new Ss.ImageServiceLoader;function GA(t=d1,e={}){const n=e.imageServiceLoader||QA;async function i(a,c,f=!1,p=[],g){const x=()=>n.getThumbnailFromResource(void 0,c,f,p);if(!a)return await n.getThumbnailFromResource(void 0,c,f,p);if(typeof a=="string"){const w=Ss.getFixedSizeFromImage(a);return w&&p.push(w),await n.getThumbnailFromResource(void 0,c,f,p)}const m=t.get(a,{skipSelfReturn:!1});if(typeof m=="string")return{best:Ss.getFixedSizeFromImage(m),fallback:[],log:[]};if(!m)return await x();switch(await(async w=>{if(w&&w.thumbnail&&w.thumbnail.length){const R=t.get(w.thumbnail[0]),D=await n.getImageCandidates(R,f);D&&D.length&&p.push(...D)}})(m),m.type){case"Annotation":{const w=Array.isArray(m.body)?m.body:[m.body],R=t.get(w[0]);return g&&!R.width&&(R.width=g.width,R.height=g.height),await n.getThumbnailFromResource(R,c,f,p)}case"Canvas":{const w=m;return i(w.items[0],c,f,p,{width:w.width,height:w.height})}case"AnnotationPage":return i(m.items[0],c,f,p,g);case"Choice":{const w=m;return!w.items||w.items[0]?await x():i(w.items[0],c,f,p,g)}case"Collection":{const w=m.items[0];return w?i(w,c,f,p,g):await x()}case"Manifest":{const w=m.items[0];return w?i(w,c,f,p,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,f,p)}return await x()}return{getBestThumbnailAtSize:i}}function uv(t,e,{canvasId:n,manifestId:i}={}){const a=In(),c=ec(),f=T.useMemo(()=>GA(a,{imageServiceLoader:c}),[a,c]),[p,g]=T.useState(),x=Zi(i?{id:i}:void 0),m=mi(n?{id:n}:void 0),w=m||x,R=T.useRef(!1);if(T.useEffect(()=>(R.current=!1,()=>{R.current=!0}),[]),!w)throw new Error("Must be called under a manifest or canvas context.");return f1(D=>{f.getBestThumbnailAtSize(w,t,e).then(A=>{A.best&&!R.current&&g(A.best)})},[w]),p}function XA(t){return{isMuted:!1,playRequested:!1,isPlaying:!1,isFinished:!1,volume:100,duration:t}}function KA(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 h1(t){const e=Math.round(t);return`${Math.floor(e/60)}:${`${e%60}`.padStart(2,"0")}`}function gd(t){const[e,n]=T.useReducer(KA,XA(t.duration)),i=T.useRef(null),a=T.useRef(null),c=T.useRef(null),f=T.useRef(!1),p=T.useCallback(()=>{a.current&&i.current&&(a.current.innerHTML=h1(i.current.currentTime),c.current&&(c.current.style.width=`${i.current.currentTime/t.duration*100}%`),f.current!==i.current.muted&&(f.current=i.current.muted,n(i.current.muted?{type:"MUTE"}:{type:"UNMUTE"})))},[t.duration]),g=T.useCallback(()=>{i.current&&(n({type:"PLAY_REQUESTED"}),i.current.play().then(()=>{n({type:"PLAY"})}),p())},[p]),x=T.useCallback(()=>{i.current&&(i.current.duration>0&&i.current.paused?g():m())},[p]),m=T.useCallback(()=>{i.current&&(i.current.pause(),n({type:"PAUSE"}),p())},[p]),w=T.useCallback(()=>{i.current&&(i.current.muted=!i.current.muted,n(i.current.muted?{type:"MUTE"}:{type:"UNMUTE"}))},[]),R=T.useCallback(()=>{i.current&&(i.current.muted=!0,n({type:"MUTE"}))},[]),D=T.useCallback(()=>{i.current&&(i.current.muted=!1,n({type:"UNMUTE"}))},[]),A=T.useCallback(L=>{i.current&&(i.current.muted=!1,i.current.volume=L/100,n({type:"SET_VOLUME",volume:L}))},[]),z=T.useCallback(L=>{i.current&&(i.current.currentTime=Math.max(0,Math.min(L*t.duration,t.duration)),p())},[]),P=T.useCallback(L=>{i.current&&(i.current.currentTime=Math.max(0,Math.min(L,t.duration)),p())},[]);return T.useEffect(()=>{const L=setInterval(()=>{p()},350);return()=>clearInterval(L)},[p,t.duration]),T.useEffect(()=>{const L=()=>{n({type:"FINISHED"})},M=i.current;return M==null||M.addEventListener("ended",L),()=>M==null?void 0:M.removeEventListener("ended",L)},[]),[{element:i,currentTime:a,progress:c},e,{play:g,pause:m,playPause:x,mute:R,unmute:D,toggleMute:w,setVolume:A,setDurationPercent:z,setTime:P}]}const p1=T.createContext(null),v1=T.createContext(null),m1=T.createContext(null);function ZA(){const t=T.useContext(p1);if(!t)throw new Error("Ctx not found");return t}function JA(){const t=T.useContext(v1);if(!t)throw new Error("Ctx not found");return t}function eM(){const t=T.useContext(m1);if(!t)throw new Error("Ctx not found");return t}function cv({actions:t,state:e,children:n,currentTime:i,progress:a,element:c}){return re.jsx(m1.Provider,{value:{currentTime:i,progress:a,element:c},children:re.jsx(v1.Provider,{value:t,children:re.jsx(p1.Provider,{value:e,children:n})})})}function g1({media:t,children:e}){const[{element:n,currentTime:i,progress:a},c,f]=gd({duration:t.duration});return re.jsxs(cv,{state:c,actions:f,currentTime:i,progress:a,element:n,children:[re.jsx("audio",{ref:n,src:t.url}),e]})}function y1({media:t,mediaControlsDeps:e,children:n}){return hl("portal","audio",g1,{media:t,children:n},[t,...e||[]]),null}function b1({element:t,media:e,playPause:n}){return re.jsxs("div",{className:"video-container",part:"video-container",onClick:n,children:[re.jsx("style",{children:`
|
|
345
346
|
.video-container {
|
|
346
347
|
position: absolute;
|
|
347
348
|
top: 0;
|
|
@@ -354,7 +355,7 @@ No matching component was found for:
|
|
|
354
355
|
justify-content: center;
|
|
355
356
|
pointer-events: visible;
|
|
356
357
|
}
|
|
357
|
-
`}),
|
|
358
|
+
`}),re.jsx("video",{ref:t,src:e.url,style:{width:"100%",objectFit:"contain"}})]})}function S1({media:t,mediaControlsDeps:e,children:n}){const[{element:i,currentTime:a,progress:c},f,p]=gd({duration:t.duration});return hl("overlay","video-element",b1,{element:i,media:t,playPause:p.playPause}),hl("portal","custom-controls",cv,{state:f,actions:p,currentTime:a,progress:c,element:i,children:n},[a,f,t,...e||[]]),null}function x1({model:t}){return re.jsxs(re.Fragment,{children:[re.jsx("style",{children:`
|
|
358
359
|
.model-container {
|
|
359
360
|
position: absolute;
|
|
360
361
|
top: 0;
|
|
@@ -367,9 +368,9 @@ No matching component was found for:
|
|
|
367
368
|
justify-content: center;
|
|
368
369
|
pointer-events: visible;
|
|
369
370
|
}
|
|
370
|
-
`}),
|
|
371
|
-
`):""},[
|
|
372
|
-
`):""}}
|
|
371
|
+
`}),re.jsx("div",{className:"model-container",children:re.jsx("model-viewer",{"interaction-prompt":"none",style:{width:"100%",height:"100%"},"camera-controls":"","ar-status":"not-presenting",src:t.id})})]})}function w1({model:t,name:e}){return hl("overlay",`model-${e}`,x1,{model:t},[t]),null}function E1({style:t}){const e=mi();return!e||!e.height||!e.width?null:re.jsx("box",{interactive:!1,target:{x:0,y:0,width:Number(e.width),height:Number(e.height)},style:t})}const T1=T.createContext("en");function tM(t){return re.jsx(T1.Provider,{value:t.language,children:t.children})}function yd(){return T.useContext(T1)}function C1(t){return t.indexOf("-")!==-1?t.slice(0,t.indexOf("-")):t}function R1({as:t,language:e,children:n,viewingDirection:i,...a}){const c=yd();return T.useMemo(()=>C1(c)===C1(e),[c,e])?t?re.jsx(t,{...a,children:n}):re.jsx("span",{...a,children:n}):t?re.jsx(t,{...a,lang:e,dir:i,children:n}):re.jsx("span",{...a,lang:e,dir:i,children:n})}function O1(t,e,n){if(e.length===0)return;if(e.length===1)return e[0];if(e.indexOf(t)!==-1)return t;const i=t.indexOf("-")!==-1?t.slice(0,t.indexOf("-")):null;if(i&&e.indexOf(i)!==-1)return i;for(const a of n)if(e.indexOf(a)!==-1)return a;return e.indexOf("none")!==-1?"none":e.indexOf("@none")!==-1?"@none":e[0]}const A1=(t,e=[])=>{const n=yd();return T.useMemo(()=>{const i=t();return O1(n,i,[])},[n,...e])};function M1(t,e,n=`
|
|
372
|
+
`){const i=A1(()=>Object.keys(t||{}),[t]);return[T.useMemo(()=>{if(!t)return e||"";if(typeof t=="string")return t;const a=i?t[i]:void 0;return a?typeof a=="string"?a:a.join(n):""},[i,e,t]),i]}function nM(){const t=yd();return function(n,i,a){const c=Object.keys(n||{}),f=O1(t,c,[]);if(!n)return i||"";if(typeof n=="string")return n;const p=f?n[f]:void 0;return p?typeof p=="string"?p:p.join(typeof a<"u"?a:`
|
|
373
|
+
`):""}}function Yo({as:t,defaultText:e,enableDangerouslySetInnerHTML:n,children:i,separator:a,...c}){const[f,p]=M1(i,e,a);return p?re.jsx(R1,{...c,as:t,language:p,title:n?void 0:f,dangerouslySetInnerHTML:n?{__html:f}:void 0,children:n?void 0:f}):t?re.jsx(t,{...c,children:f}):re.jsx("span",{...c,title:n?void 0:f,dangerouslySetInnerHTML:n?{__html:f}:void 0,children:n?void 0:f})}function rM({element:t,media:e,playPause:n}){const i=T.useRef(null);return e.youTubeId?re.jsxs("div",{className:"video-container",part:"video-container",onClick:n,children:[re.jsx("style",{children:`
|
|
373
374
|
.video-container {
|
|
374
375
|
position: absolute;
|
|
375
376
|
top: 0;
|
|
@@ -387,5 +388,6 @@ No matching component was found for:
|
|
|
387
388
|
width: 100%;
|
|
388
389
|
object-fit: contain;
|
|
389
390
|
}
|
|
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=zn(),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=zn(),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=zn(),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=zn();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=On,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=zn,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
|
+
`}),re.jsx("iframe",{className:"video-yt",ref:i,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 iM({media:t,mediaControlsDeps:e,children:n}){const[{element:i,currentTime:a,progress:c},f,p]=gd({duration:t.duration});return hl("overlay","video-element",rM,{element:i,media:t,playPause:p.playPause}),null}function P1({x:t,y:e,onChoiceChange:n,registerActions:i,defaultChoices:a,isStatic:c,renderViewerControls:f,renderMediaControls:p,viewControlsDeps:g,mediaControlsDeps:x,strategies:m,throwOnUnknown:w,backgroundStyle:R,alwaysShowBackground:D,keepCanvasScale:A=!1,enableSizes:z=!1,enableYouTube:P=!0,onClickPaintingAnnotation:L,children:M}){const F=mi(),$=qp(F,["deep-zoom"]),[Q]=J0(),j=tb(),K=In(),ee=T.useMemo(()=>Yp(K),[K]),[V,ae]=c1({strategies:m||["images"],defaultChoices:a==null?void 0:a.map(({id:Oe})=>Oe)}),ge=V.type==="images"?V.choice:void 0,we=T.useMemo(()=>A?1:Math.max(1,...V.type==="images"?V.images.map(Oe=>{var it;return(Oe.width||0)/((it=Oe.target)==null?void 0:it.spatial.width)}):[]),[A,V]);tO(we),T.useEffect(()=>{i&&i(ae)},[V.annotations]),T.useEffect(()=>{if(a)for(const Oe of a)typeof Oe.opacity<"u"&&ee.applyStyles({id:Oe.id},"atlas",{opacity:Oe.opacity})},[a]),T.useLayoutEffect(()=>{n&&n(ge)},[ge]),hl(j&&(V.type==="images"||V.type==="empty"||V.type==="textual-content"&&f)?"overlay":"none",`canvas-portal-controls-${F==null?void 0:F.id}`,ad.Provider,f?{value:j||null,children:f(V)}:{},[F,j,V,...g||[]]);const Ee=uv({maxWidth:256,maxHeight:256});if(!F)return null;const Ue=F.accompanyingCanvas,Fe=Ee&&Ee.type==="fixed"?re.jsx("world-object",{height:F.height,width:F.width,x:t,y:e,children:re.jsx("world-image",{uri:Ee.id,target:{x:0,y:0,width:F.width,height:F.height},display:Ee.width&&Ee.height?{width:Ee.width,height:Ee.height}:void 0,crop:void 0})}):null;if(V.type==="unknown"){if(Fe)return Fe;if(w)throw new Error(V.reason||"Unknown image strategy");return null}const Be=re.jsxs(T.Fragment,{children:[Q?re.jsx(Zp,{page:Q}):null,V.annotations&&V.annotations.pages?V.annotations.pages.map(Oe=>re.jsx(Zp,{page:Oe},Oe.id)):null,M]}),vt=V.type==="images"?V.images.length:0;return re.jsxs(re.Fragment,{children:[re.jsxs("world-object",{height:F.height,width:F.width,x:t,y:e,...$,children:[V.type==="empty"||D?re.jsx(E1,{style:R}):null,V.type==="textual-content"?V.items.map((Oe,it)=>{var nt;return re.jsxs(re.Fragment,{children:[re.jsx(zp,{onClick:L?W=>{W.stopPropagation(),L(Oe.annotationId,Oe,W)}:void 0,target:((nt=Oe.target)==null?void 0:nt.spatial)||void 0,children:re.jsx("div",{"data-textual-content":!0,children:re.jsx(Yo,{enableDangerouslySetInnerHTML:!0,children:Oe.text})})},it),Be]})}):null,V.type==="images"?re.jsxs(re.Fragment,{children:[V.images.map((Oe,it)=>re.jsx(gb,{isStatic:c,image:Oe,id:Oe.id,thumbnail:it===0?Ee:void 0,selector:Oe.selector,enableSizes:z,onClick:L?nt=>{nt.stopPropagation(),L(Oe.annotationId,Oe,nt)}:void 0},Oe.id+it)),Be]}):null,V.type==="3d-model"?re.jsx(w1,{model:V.model}):null,V.type==="media"?re.jsx(re.Fragment,{children:V.media.type==="Sound"?re.jsxs(y1,{media:V.media,mediaControlsDeps:x,children:[Fe,p?p(V):null]}):V.media.type==="Video"?re.jsxs(S1,{media:V.media,mediaControlsDeps:x,children:[Fe,p?p(V):null]}):V.media.type==="VideoYouTube"&&P?re.jsxs(iM,{media:V.media,mediaControlsDeps:x,children:[Fe,p?p(V):null]}):null}):null]},`${F.id}/${V.type}/${vt}`),V.type==="media"&&V.media.type==="Sound"&&Ue?re.jsx(Vu,{canvas:Ue.id,children:re.jsx(P1,{renderViewerControls:f})}):null]})}function L1(){const t=T.useContext(Hu);return t&&t.vault?t.vault:hf.globalVault()}const sM=T.forwardRef(function(e,n){const i=Zi(),a=Up(),c=Wp(),{ViewerControls:f,MediaControls:p}=e.components||{};if(T.useImperativeHandle(n,()=>c,[c]),!i)return re.jsx("div",{});let g=0;return re.jsxs(re.Fragment,{children:[e.header,re.jsx(yr.Viewer,{height:e.height,mode:e.mode,children:a.map((x,m)=>{const w=g;return g+=x.width+(e.spacing||0),re.jsx(Vu,{canvas:x.id,children:re.jsx(yr.RenderCanvas,{strategies:["3d-model","media","images","empty","textual-content"],renderViewerControls:m===0&&f?()=>re.jsx(f,{}):void 0,renderMediaControls:m===0&&p?()=>re.jsx(p,{}):void 0,x:w,...e.canvasProps||{},children:e.annotations},x.id)},x.id)})},e.reuseAtlas?"":c.currentSequenceIndex),e.children]})}),yr=T.forwardRef(function({children:e,height:n,annotations:i,canvasProps:a,spacing:c,header:f,components:p,mode:g,reuseAtlas:x,...m},w){const R=L1();return re.jsx(jp,{vault:R,children:re.jsx(q0,{...m,children:re.jsx(sM,{ref:w,height:n,components:p,spacing:c,canvasProps:a,annotations:i,header:f,mode:g,reuseAtlas:x,children:e})})})});yr.RenderImage=gb,yr.RenderCanvas=P1,yr.RenderAnnotationPage=Zp,yr.RenderAnnotation=vb,yr.Viewer=nO,yr.CanvasBackground=E1,yr.Audio=y1,yr.Video=S1,yr.Model=w1,yr.AudioHTML=g1,yr.VideoHTML=b1,yr.ModelHTML=x1;const oM=T.forwardRef(function({canvasId:e},n){const i=bR(),a=lv(e||(i==null?void 0:i.id)),c=In();return T.useImperativeHandle(n,()=>a,[e,i]),!i||a.enabledPageIds.length===0?null:re.jsx(re.Fragment,{children:a.enabledPageIds.map(f=>re.jsx(yr.RenderAnnotationPage,{page:c.get(f)},f))})});function fv({metadata:t=[],config:e,labelWidth:n=16,showEmptyMessage:i=!0,allowHtml:a,emptyFallback:c,classes:f={},emptyMessage:p="No metadata available",emptyValueFallback:g="No value",emptyLabelFallback:x="",separator:m,tableFooter:w,tableHeader:R}){const D=T.useMemo(()=>{const z=(e||[]).reduce((L,M)=>[...L,...M.keys],[]),P={};for(const L of t){const M=L&&L.label?Object.values(L.label):[];for(const F of M)if(F&&F.length&&(z.indexOf(`metadata.${F[0]}`)!==-1||z.length===0)&&L){const $=`metadata.${F[0]}`;P[$]=P[$]?P[$]:[],P[$].push(L);break}}return P},[e,t]);return Object.keys(D).length===0&&i?re.jsx(re.Fragment,{children:c})||re.jsx("div",{className:f.empty,children:p}):e&&e.length?re.jsxs("table",{className:f.container,children:[R,re.jsx("tbody",{children:e.map((z,P)=>{const L=[];for(const M of z.keys)for(const F of D[M]||[])L.push(re.jsx(Yo,{enableDangerouslySetInnerHTML:a,defaultText:g,separator:m,children:F.value},P+"__"+M));return L.length===0?null:re.jsxs("tr",{className:f.row,children:[re.jsx("td",{className:f.label,style:n?{minWidth:n}:{},children:re.jsx(Yo,{enableDangerouslySetInnerHTML:a,separator:m,defaultText:x,children:z.label})}),re.jsx("td",{className:f.value,children:L})]},P)})}),w]}):re.jsxs("table",{className:f.container,children:[R,re.jsx("tbody",{children:t&&t.length?t.map((z,P)=>z?re.jsxs("tr",{className:f.row,children:[re.jsx("td",{className:f.label,style:n?{minWidth:n}:{},children:re.jsx(Yo,{enableDangerouslySetInnerHTML:a,defaultText:g,separator:m,children:z.label})}),re.jsx("td",{className:f.value,children:re.jsx(Yo,{enableDangerouslySetInnerHTML:a,defaultText:g,separator:m,children:z.value})})]},P):null):null}),w]})}function aM(t){const e=Zi(),n=mi(),i=Vp(),a=T.useMemo(()=>{const c=(e==null?void 0:e.metadata)||[],f=(n==null?void 0:n.metadata)||[],p=(i==null?void 0:i.metadata)||[];return[...c,...f,...p]},[e,n,i]);return re.jsx(fv,{metadata:a,...t})}function dv(t,e={},n=[]){return T.useMemo(()=>{var f,p;if(!t)return null;let i=e.quality;t&&t.extraQualities&&e.quality&&(t.extraQualities.includes(e.quality)||(console.log("Invalid quality",e.quality,t.extraQualities),i="default"));const a=Ss.createImageServiceRequest(t);return Ss.imageServiceRequestToString({identifier:a.identifier,server:a.server,scheme:a.scheme,type:"image",size:{max:!((f=e.size)!=null&&f.width)&&!((p=e.size)!=null&&p.height),confined:!1,upscaled:!1,...e.size||{}},format:e.format||"jpg",region:e.region||{full:!0},rotation:e!=null&&e.rotation?Number.isInteger(e.rotation)?{angle:e.rotation}:e.rotation:{angle:0},quality:i||"default",prefix:a.prefix,originalPath:a.originalPath})},[...n])}function lM(t){const e=typeof t.src=="string"?t.src:t.src.id,n=ec(),[i,a]=T.useState(!1);let c;if(e){const p=n.loadServiceSync({id:e});p&&(c=p)}!c&&!i&&n.loadService({id:e}).then(()=>{a(!0)});const f=dv(c,{size:t.size,selector:t.region,rotation:t.rotation,format:t.format,region:t.region,quality:t.quality},[i,t.src,t.size,t.region,t.rotation,t.format,t.region,t.quality]);return T.useEffect(()=>()=>{a(!1)},[e]),f?re.jsx("img",{src:f,alt:t.alt,className:t.className,style:t.style}):re.jsx(D1,{...t,fetchImageService:!1})}function D1(t){if(t.fetchImageService)return re.jsx(lM,{...t});const e=typeof t.src=="string"?{id:t.src,profile:"level0"}:t.src,n=dv(e,{size:t.size,selector:t.region,rotation:t.rotation,format:t.format,region:t.region,quality:t.quality},[t.src,t.size,t.region,t.rotation,t.format,t.region,t.quality]);return n?re.jsx("img",{src:n,alt:t.alt,className:t.className,style:t.style}):null}function uM(t){const e=Zi();return re.jsx(fv,{metadata:(e==null?void 0:e.metadata)||[],...t})}var k1={exports:{}};(()=>{var t={296:(a,c,f)=>{var p=/^\s+|\s+$/g,g=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,m=/^0o[0-7]+$/i,w=parseInt,R=typeof f.g=="object"&&f.g&&f.g.Object===Object&&f.g,D=typeof self=="object"&&self&&self.Object===Object&&self,A=R||D||Function("return this")(),z=Object.prototype.toString,P=Math.max,L=Math.min,M=function(){return A.Date.now()};function F(Q){var j=typeof Q;return!!Q&&(j=="object"||j=="function")}function $(Q){if(typeof Q=="number")return Q;if(function(ee){return typeof ee=="symbol"||function(V){return!!V&&typeof V=="object"}(ee)&&z.call(ee)=="[object Symbol]"}(Q))return NaN;if(F(Q)){var j=typeof Q.valueOf=="function"?Q.valueOf():Q;Q=F(j)?j+"":j}if(typeof Q!="string")return Q===0?Q:+Q;Q=Q.replace(p,"");var K=x.test(Q);return K||m.test(Q)?w(Q.slice(2),K?2:8):g.test(Q)?NaN:+Q}a.exports=function(Q,j,K){var ee,V,ae,ge,we,Ee,Ue=0,Fe=!1,Be=!1,vt=!0;if(typeof Q!="function")throw new TypeError("Expected a function");function Oe(Ie){var tt=ee,at=V;return ee=V=void 0,Ue=Ie,ge=Q.apply(at,tt)}function it(Ie){var tt=Ie-Ee;return Ee===void 0||tt>=j||tt<0||Be&&Ie-Ue>=ae}function nt(){var Ie=M();if(it(Ie))return W(Ie);we=setTimeout(nt,function(tt){var at=j-(tt-Ee);return Be?L(at,ae-(tt-Ue)):at}(Ie))}function W(Ie){return we=void 0,vt&&ee?Oe(Ie):(ee=V=void 0,ge)}function Re(){var Ie=M(),tt=it(Ie);if(ee=arguments,V=this,Ee=Ie,tt){if(we===void 0)return function(at){return Ue=at,we=setTimeout(nt,j),Fe?Oe(at):ge}(Ee);if(Be)return we=setTimeout(nt,j),Oe(Ee)}return we===void 0&&(we=setTimeout(nt,j)),ge}return j=$(j)||0,F(K)&&(Fe=!!K.leading,ae=(Be="maxWait"in K)?P($(K.maxWait)||0,j):ae,vt="trailing"in K?!!K.trailing:vt),Re.cancel=function(){we!==void 0&&clearTimeout(we),Ue=0,ee=Ee=V=we=void 0},Re.flush=function(){return we===void 0?ge:W(M())},Re}},96:(a,c,f)=>{var p="Expected a function",g=NaN,x="[object Symbol]",m=/^\s+|\s+$/g,w=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,D=/^0o[0-7]+$/i,A=parseInt,z=typeof f.g=="object"&&f.g&&f.g.Object===Object&&f.g,P=typeof self=="object"&&self&&self.Object===Object&&self,L=z||P||Function("return this")(),M=Object.prototype.toString,F=Math.max,$=Math.min,Q=function(){return L.Date.now()};function j(ee){var V=typeof ee;return!!ee&&(V=="object"||V=="function")}function K(ee){if(typeof ee=="number")return ee;if(function(ge){return typeof ge=="symbol"||function(we){return!!we&&typeof we=="object"}(ge)&&M.call(ge)==x}(ee))return g;if(j(ee)){var V=typeof ee.valueOf=="function"?ee.valueOf():ee;ee=j(V)?V+"":V}if(typeof ee!="string")return ee===0?ee:+ee;ee=ee.replace(m,"");var ae=R.test(ee);return ae||D.test(ee)?A(ee.slice(2),ae?2:8):w.test(ee)?g:+ee}a.exports=function(ee,V,ae){var ge=!0,we=!0;if(typeof ee!="function")throw new TypeError(p);return j(ae)&&(ge="leading"in ae?!!ae.leading:ge,we="trailing"in ae?!!ae.trailing:we),function(Ee,Ue,Fe){var Be,vt,Oe,it,nt,W,Re=0,Ie=!1,tt=!1,at=!0;if(typeof Ee!="function")throw new TypeError(p);function $t(St){var ht=Be,ke=vt;return Be=vt=void 0,Re=St,it=Ee.apply(ke,ht)}function _t(St){var ht=St-W;return W===void 0||ht>=Ue||ht<0||tt&&St-Re>=Oe}function yt(){var St=Q();if(_t(St))return xt(St);nt=setTimeout(yt,function(ht){var ke=Ue-(ht-W);return tt?$(ke,Oe-(ht-Re)):ke}(St))}function xt(St){return nt=void 0,at&&Be?$t(St):(Be=vt=void 0,it)}function Pt(){var St=Q(),ht=_t(St);if(Be=arguments,vt=this,W=St,ht){if(nt===void 0)return function(ke){return Re=ke,nt=setTimeout(yt,Ue),Ie?$t(ke):it}(W);if(tt)return nt=setTimeout(yt,Ue),$t(W)}return nt===void 0&&(nt=setTimeout(yt,Ue)),it}return Ue=K(Ue)||0,j(Fe)&&(Ie=!!Fe.leading,Oe=(tt="maxWait"in Fe)?F(K(Fe.maxWait)||0,Ue):Oe,at="trailing"in Fe?!!Fe.trailing:at),Pt.cancel=function(){nt!==void 0&&clearTimeout(nt),Re=0,Be=W=vt=nt=void 0},Pt.flush=function(){return nt===void 0?it:xt(Q())},Pt}(ee,V,{leading:ge,maxWait:V,trailing:we})}},703:(a,c,f)=>{var p=f(414);function g(){}function x(){}x.resetWarningCache=g,a.exports=function(){function m(D,A,z,P,L,M){if(M!==p){var F=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw F.name="Invariant Violation",F}}function w(){return m}m.isRequired=m;var R={array:m,bigint:m,bool:m,func:m,number:m,object:m,string:m,symbol:m,any:m,arrayOf:w,element:m,elementType:m,instanceOf:w,node:m,objectOf:w,oneOf:w,oneOfType:w,shape:w,exact:w,checkPropTypes:x,resetWarningCache:g};return R.PropTypes=R,R}},697:(a,c,f)=>{a.exports=f(703)()},414:a=>{a.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e={};function n(a){var c=e[a];if(c!==void 0)return c.exports;var f=e[a]={exports:{}};return t[a](f,f.exports,n),f.exports}n.n=a=>{var c=a&&a.__esModule?()=>a.default:()=>a;return n.d(c,{a:c}),c},n.d=(a,c)=>{for(var f in c)n.o(c,f)&&!n.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:c[f]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(a,c)=>Object.prototype.hasOwnProperty.call(a,c),n.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{LazyLoadComponent:()=>qe,LazyLoadImage:()=>Le,trackWindowScroll:()=>W});const a=T;var c=n.n(a),f=n(697);const p=Xh;var g=n.n(p);function x(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function m(oe){return m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},m(oe)}function w(oe,X){var de=Object.keys(oe);if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(oe);X&&(le=le.filter(function(he){return Object.getOwnPropertyDescriptor(oe,he).enumerable})),de.push.apply(de,le)}return de}function R(oe,X,de){return(X=A(X))in oe?Object.defineProperty(oe,X,{value:de,enumerable:!0,configurable:!0,writable:!0}):oe[X]=de,oe}function D(oe,X){for(var de=0;de<X.length;de++){var le=X[de];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,A(le.key),le)}}function A(oe){var X=function(de,le){if(m(de)!=="object"||de===null)return de;var he=de[Symbol.toPrimitive];if(he!==void 0){var be=he.call(de,"string");if(m(be)!=="object")return be;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(de)}(oe);return m(X)==="symbol"?X:String(X)}function z(oe,X){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(de,le){return de.__proto__=le,de},z(oe,X)}function P(oe){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},P(oe)}var L=function(oe){oe.forEach(function(X){X.isIntersecting&&X.target.onVisible()})},M={},F=function(oe){(function(J,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(ne&&ne.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),Object.defineProperty(J,"prototype",{writable:!1}),ne&&z(J,ne)})(Ve,oe);var X,de,le,he,be=(le=Ve,he=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var J,ne=P(le);if(he){var De=P(this).constructor;J=Reflect.construct(ne,arguments,De)}else J=ne.apply(this,arguments);return function(Ae,Ne){if(Ne&&(m(Ne)==="object"||typeof Ne=="function"))return Ne;if(Ne!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Je){if(Je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Je}(Ae)}(this,J)});function Ve(J){var ne;if(function(Ae,Ne){if(!(Ae instanceof Ne))throw new TypeError("Cannot call a class as a function")}(this,Ve),(ne=be.call(this,J)).supportsObserver=!J.scrollPosition&&J.useIntersectionObserver&&x(),ne.supportsObserver){var De=J.threshold;ne.observer=function(Ae){return M[Ae]=M[Ae]||new IntersectionObserver(L,{rootMargin:Ae+"px"}),M[Ae]}(De)}return ne}return X=Ve,de=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,ne=this.placeholder.getBoundingClientRect(),De=g().findDOMNode(this.placeholder).style,Ae=parseInt(De.getPropertyValue("margin-left"),10)||0,Ne=parseInt(De.getPropertyValue("margin-top"),10)||0;return{bottom:J.y+ne.bottom+Ne,left:J.x+ne.left+Ae,right:J.x+ne.right+Ae,top:J.y+ne.top+Ne}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var J=this.props,ne=J.scrollPosition,De=J.threshold,Ae=this.getPlaceholderBoundingBox(ne),Ne=ne.y+window.innerHeight,Je=ne.x,Ct=ne.x+window.innerWidth,Nt=ne.y;return Nt-De<=Ae.bottom&&Ne+De>=Ae.top&&Je-De<=Ae.right&&Ct+De>=Ae.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var J=this,ne=this.props,De=ne.className,Ae=ne.height,Ne=ne.placeholder,Je=ne.style,Ct=ne.width;if(Ne&&typeof Ne.type!="function")return c().cloneElement(Ne,{ref:function(jt){return J.placeholder=jt}});var Nt=function(jt){for(var gn=1;gn<arguments.length;gn++){var qt=arguments[gn]!=null?arguments[gn]:{};gn%2?w(Object(qt),!0).forEach(function(Bt){R(jt,Bt,qt[Bt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(jt,Object.getOwnPropertyDescriptors(qt)):w(Object(qt)).forEach(function(Bt){Object.defineProperty(jt,Bt,Object.getOwnPropertyDescriptor(qt,Bt))})}return jt}({display:"inline-block"},Je);return Ct!==void 0&&(Nt.width=Ct),Ae!==void 0&&(Nt.height=Ae),c().createElement("span",{className:De,ref:function(jt){return J.placeholder=jt},style:Nt},Ne)}}],de&&D(X.prototype,de),Object.defineProperty(X,"prototype",{writable:!1}),Ve}(c().Component);F.propTypes={onVisible:f.PropTypes.func.isRequired,className:f.PropTypes.string,height:f.PropTypes.oneOfType([f.PropTypes.number,f.PropTypes.string]),placeholder:f.PropTypes.element,threshold:f.PropTypes.number,useIntersectionObserver:f.PropTypes.bool,scrollPosition:f.PropTypes.shape({x:f.PropTypes.number.isRequired,y:f.PropTypes.number.isRequired}),width:f.PropTypes.oneOfType([f.PropTypes.number,f.PropTypes.string])},F.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const $=F;var Q=n(296),j=n.n(Q),K=n(96),ee=n.n(K),V=function(oe){var X=getComputedStyle(oe,null);return X.getPropertyValue("overflow")+X.getPropertyValue("overflow-y")+X.getPropertyValue("overflow-x")};const ae=function(oe){if(!(oe instanceof HTMLElement))return window;for(var X=oe;X&&X instanceof HTMLElement;){if(/(scroll|auto)/.test(V(X)))return X;X=X.parentNode}return window};function ge(oe){return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},ge(oe)}var we=["delayMethod","delayTime"];function Ee(){return Ee=Object.assign?Object.assign.bind():function(oe){for(var X=1;X<arguments.length;X++){var de=arguments[X];for(var le in de)Object.prototype.hasOwnProperty.call(de,le)&&(oe[le]=de[le])}return oe},Ee.apply(this,arguments)}function Ue(oe,X){for(var de=0;de<X.length;de++){var le=X[de];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,(he=function(be,Ve){if(ge(be)!=="object"||be===null)return be;var J=be[Symbol.toPrimitive];if(J!==void 0){var ne=J.call(be,"string");if(ge(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(be)}(le.key),ge(he)==="symbol"?he:String(he)),le)}var he}function Fe(oe,X){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(de,le){return de.__proto__=le,de},Fe(oe,X)}function Be(oe,X){if(X&&(ge(X)==="object"||typeof X=="function"))return X;if(X!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vt(oe)}function vt(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function Oe(oe){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},Oe(oe)}var it=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},nt=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const W=function(oe){var X=function(de){(function(De,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function");De.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:De,writable:!0,configurable:!0}}),Object.defineProperty(De,"prototype",{writable:!1}),Ae&&Fe(De,Ae)})(ne,de);var le,he,be,Ve,J=(be=ne,Ve=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var De,Ae=Oe(be);if(Ve){var Ne=Oe(this).constructor;De=Reflect.construct(Ae,arguments,Ne)}else De=Ae.apply(this,arguments);return Be(this,De)});function ne(De){var Ae;if(function(Je,Ct){if(!(Je instanceof Ct))throw new TypeError("Cannot call a class as a function")}(this,ne),(Ae=J.call(this,De)).useIntersectionObserver=De.useIntersectionObserver&&x(),Ae.useIntersectionObserver)return Be(Ae);var Ne=Ae.onChangeScroll.bind(vt(Ae));return De.delayMethod==="debounce"?Ae.delayedScroll=j()(Ne,De.delayTime):De.delayMethod==="throttle"&&(Ae.delayedScroll=ee()(Ne,De.delayTime)),Ae.state={scrollPosition:{x:it(),y:nt()}},Ae.baseComponentRef=c().createRef(),Ae}return le=ne,(he=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||ae(g().findDOMNode(this.baseComponentRef.current))!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=ae(g().findDOMNode(this.baseComponentRef.current)),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:it(),y:nt()}})}},{key:"render",value:function(){var De=this.props,Ae=(De.delayMethod,De.delayTime,function(Je,Ct){if(Je==null)return{};var Nt,jt,gn=function(Bt,Mr){if(Bt==null)return{};var Pr,Hr,br={},Ps=Object.keys(Bt);for(Hr=0;Hr<Ps.length;Hr++)Pr=Ps[Hr],Mr.indexOf(Pr)>=0||(br[Pr]=Bt[Pr]);return br}(Je,Ct);if(Object.getOwnPropertySymbols){var qt=Object.getOwnPropertySymbols(Je);for(jt=0;jt<qt.length;jt++)Nt=qt[jt],Ct.indexOf(Nt)>=0||Object.prototype.propertyIsEnumerable.call(Je,Nt)&&(gn[Nt]=Je[Nt])}return gn}(De,we)),Ne=this.useIntersectionObserver?null:this.state.scrollPosition;return c().createElement(oe,Ee({forwardRef:this.baseComponentRef,scrollPosition:Ne},Ae))}}])&&Ue(le.prototype,he),Object.defineProperty(le,"prototype",{writable:!1}),ne}(c().Component);return X.propTypes={delayMethod:f.PropTypes.oneOf(["debounce","throttle"]),delayTime:f.PropTypes.number,useIntersectionObserver:f.PropTypes.bool},X.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},X};function Re(oe){return Re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},Re(oe)}function Ie(oe,X){for(var de=0;de<X.length;de++){var le=X[de];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,(he=function(be,Ve){if(Re(be)!=="object"||be===null)return be;var J=be[Symbol.toPrimitive];if(J!==void 0){var ne=J.call(be,"string");if(Re(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(be)}(le.key),Re(he)==="symbol"?he:String(he)),le)}var he}function tt(oe,X){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(de,le){return de.__proto__=le,de},tt(oe,X)}function at(oe){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},at(oe)}var $t=function(oe){(function(J,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(ne&&ne.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),Object.defineProperty(J,"prototype",{writable:!1}),ne&&tt(J,ne)})(Ve,oe);var X,de,le,he,be=(le=Ve,he=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var J,ne=at(le);if(he){var De=at(this).constructor;J=Reflect.construct(ne,arguments,De)}else J=ne.apply(this,arguments);return function(Ae,Ne){if(Ne&&(Re(Ne)==="object"||typeof Ne=="function"))return Ne;if(Ne!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Je){if(Je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Je}(Ae)}(this,J)});function Ve(J){return function(ne,De){if(!(ne instanceof De))throw new TypeError("Cannot call a class as a function")}(this,Ve),be.call(this,J)}return X=Ve,(de=[{key:"render",value:function(){return c().createElement($,this.props)}}])&&Ie(X.prototype,de),Object.defineProperty(X,"prototype",{writable:!1}),Ve}(c().Component);const _t=W($t);function yt(oe){return yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},yt(oe)}function xt(oe,X){for(var de=0;de<X.length;de++){var le=X[de];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,(he=function(be,Ve){if(yt(be)!=="object"||be===null)return be;var J=be[Symbol.toPrimitive];if(J!==void 0){var ne=J.call(be,"string");if(yt(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(be)}(le.key),yt(he)==="symbol"?he:String(he)),le)}var he}function Pt(oe,X){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(de,le){return de.__proto__=le,de},Pt(oe,X)}function St(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function ht(oe){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},ht(oe)}var ke=function(oe){(function(J,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(ne&&ne.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),Object.defineProperty(J,"prototype",{writable:!1}),ne&&Pt(J,ne)})(Ve,oe);var X,de,le,he,be=(le=Ve,he=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var J,ne=ht(le);if(he){var De=ht(this).constructor;J=Reflect.construct(ne,arguments,De)}else J=ne.apply(this,arguments);return function(Ae,Ne){if(Ne&&(yt(Ne)==="object"||typeof Ne=="function"))return Ne;if(Ne!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return St(Ae)}(this,J)});function Ve(J){var ne;(function(Ct,Nt){if(!(Ct instanceof Nt))throw new TypeError("Cannot call a class as a function")})(this,Ve),ne=be.call(this,J);var De=J.afterLoad,Ae=J.beforeLoad,Ne=J.scrollPosition,Je=J.visibleByDefault;return ne.state={visible:Je},Je&&(Ae(),De()),ne.onVisible=ne.onVisible.bind(St(ne)),ne.isScrollTracked=!!(Ne&&Number.isFinite(Ne.x)&&Ne.x>=0&&Number.isFinite(Ne.y)&&Ne.y>=0),ne}return X=Ve,(de=[{key:"componentDidUpdate",value:function(J,ne){ne.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var J=this.props,ne=J.className,De=J.delayMethod,Ae=J.delayTime,Ne=J.height,Je=J.placeholder,Ct=J.scrollPosition,Nt=J.style,jt=J.threshold,gn=J.useIntersectionObserver,qt=J.width;return this.isScrollTracked||gn&&x()?c().createElement($,{className:ne,height:Ne,onVisible:this.onVisible,placeholder:Je,scrollPosition:Ct,style:Nt,threshold:jt,useIntersectionObserver:gn,width:qt}):c().createElement(_t,{className:ne,delayMethod:De,delayTime:Ae,height:Ne,onVisible:this.onVisible,placeholder:Je,style:Nt,threshold:jt,width:qt})}}])&&xt(X.prototype,de),Object.defineProperty(X,"prototype",{writable:!1}),Ve}(c().Component);ke.propTypes={afterLoad:f.PropTypes.func,beforeLoad:f.PropTypes.func,useIntersectionObserver:f.PropTypes.bool,visibleByDefault:f.PropTypes.bool},ke.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const qe=ke;function st(oe){return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},st(oe)}var wt=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function vn(oe,X){var de=Object.keys(oe);if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(oe);X&&(le=le.filter(function(he){return Object.getOwnPropertyDescriptor(oe,he).enumerable})),de.push.apply(de,le)}return de}function I(oe){for(var X=1;X<arguments.length;X++){var de=arguments[X]!=null?arguments[X]:{};X%2?vn(Object(de),!0).forEach(function(le){N(oe,le,de[le])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(de)):vn(Object(de)).forEach(function(le){Object.defineProperty(oe,le,Object.getOwnPropertyDescriptor(de,le))})}return oe}function N(oe,X,de){return(X=ft(X))in oe?Object.defineProperty(oe,X,{value:de,enumerable:!0,configurable:!0,writable:!0}):oe[X]=de,oe}function Z(){return Z=Object.assign?Object.assign.bind():function(oe){for(var X=1;X<arguments.length;X++){var de=arguments[X];for(var le in de)Object.prototype.hasOwnProperty.call(de,le)&&(oe[le]=de[le])}return oe},Z.apply(this,arguments)}function Me(oe,X){for(var de=0;de<X.length;de++){var le=X[de];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,ft(le.key),le)}}function ft(oe){var X=function(de,le){if(st(de)!=="object"||de===null)return de;var he=de[Symbol.toPrimitive];if(he!==void 0){var be=he.call(de,"string");if(st(be)!=="object")return be;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(de)}(oe);return st(X)==="symbol"?X:String(X)}function et(oe,X){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(de,le){return de.__proto__=le,de},et(oe,X)}function Ft(oe){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},Ft(oe)}var mn=function(oe){(function(J,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(ne&&ne.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),Object.defineProperty(J,"prototype",{writable:!1}),ne&&et(J,ne)})(Ve,oe);var X,de,le,he,be=(le=Ve,he=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var J,ne=Ft(le);if(he){var De=Ft(this).constructor;J=Reflect.construct(ne,arguments,De)}else J=ne.apply(this,arguments);return function(Ae,Ne){if(Ne&&(st(Ne)==="object"||typeof Ne=="function"))return Ne;if(Ne!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Je){if(Je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Je}(Ae)}(this,J)});function Ve(J){var ne;return function(De,Ae){if(!(De instanceof Ae))throw new TypeError("Cannot call a class as a function")}(this,Ve),(ne=be.call(this,J)).state={loaded:!1},ne}return X=Ve,(de=[{key:"onImageLoad",value:function(){var J=this;return this.state.loaded?null:function(ne){J.props.onLoad(ne),J.props.afterLoad(),J.setState({loaded:!0})}}},{key:"getImg",value:function(){var J=this.props,ne=(J.afterLoad,J.beforeLoad,J.delayMethod,J.delayTime,J.effect,J.placeholder,J.placeholderSrc,J.scrollPosition,J.threshold,J.useIntersectionObserver,J.visibleByDefault,J.wrapperClassName,J.wrapperProps,function(De,Ae){if(De==null)return{};var Ne,Je,Ct=function(jt,gn){if(jt==null)return{};var qt,Bt,Mr={},Pr=Object.keys(jt);for(Bt=0;Bt<Pr.length;Bt++)qt=Pr[Bt],gn.indexOf(qt)>=0||(Mr[qt]=jt[qt]);return Mr}(De,Ae);if(Object.getOwnPropertySymbols){var Nt=Object.getOwnPropertySymbols(De);for(Je=0;Je<Nt.length;Je++)Ne=Nt[Je],Ae.indexOf(Ne)>=0||Object.prototype.propertyIsEnumerable.call(De,Ne)&&(Ct[Ne]=De[Ne])}return Ct}(J,wt));return c().createElement("img",Z({},ne,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var J=this.props,ne=J.beforeLoad,De=J.className,Ae=J.delayMethod,Ne=J.delayTime,Je=J.height,Ct=J.placeholder,Nt=J.scrollPosition,jt=J.style,gn=J.threshold,qt=J.useIntersectionObserver,Bt=J.visibleByDefault,Mr=J.width;return c().createElement(qe,{beforeLoad:ne,className:De,delayMethod:Ae,delayTime:Ne,height:Je,placeholder:Ct,scrollPosition:Nt,style:jt,threshold:gn,useIntersectionObserver:qt,visibleByDefault:Bt,width:Mr},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(J){var ne=this.props,De=ne.effect,Ae=ne.height,Ne=ne.placeholderSrc,Je=ne.width,Ct=ne.wrapperClassName,Nt=ne.wrapperProps,jt=this.state.loaded,gn=jt?" lazy-load-image-loaded":"",qt=jt||!Ne?{}:{backgroundImage:"url(".concat(Ne,")"),backgroundSize:"100% 100%"};return c().createElement("span",Z({className:Ct+" lazy-load-image-background "+De+gn,style:I(I({},qt),{},{color:"transparent",display:"inline-block",height:Ae,width:Je})},Nt),J)}},{key:"render",value:function(){var J=this.props,ne=J.effect,De=J.placeholderSrc,Ae=J.visibleByDefault,Ne=J.wrapperClassName,Je=J.wrapperProps,Ct=this.getLazyLoadImage();return(ne||De)&&!Ae||Ne||Je?this.getWrappedLazyLoadImage(Ct):Ct}}])&&Me(X.prototype,de),Object.defineProperty(X,"prototype",{writable:!1}),Ve}(c().Component);mn.propTypes={onLoad:f.PropTypes.func,afterLoad:f.PropTypes.func,beforeLoad:f.PropTypes.func,delayMethod:f.PropTypes.string,delayTime:f.PropTypes.number,effect:f.PropTypes.string,placeholderSrc:f.PropTypes.string,threshold:f.PropTypes.number,useIntersectionObserver:f.PropTypes.bool,visibleByDefault:f.PropTypes.bool,wrapperClassName:f.PropTypes.string,wrapperProps:f.PropTypes.object},mn.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const Le=mn})(),k1.exports=i})();var cM=k1.exports;function fM(t,e,n=[],i=!1,a=[]){if(a.length&&(e=e.filter(f=>a.indexOf(f)===-1)),!e||e.length===0)return;if(e.length===1)return e[0];if(!t)return e.indexOf("none")!==-1?"none":e[0];if(e.indexOf(t)!==-1)return t;const c=t.indexOf("-")!==-1?t.slice(0,t.indexOf("-")):null;if(c&&e.indexOf(c)!==-1)return c;for(const f of n)if(e.indexOf(f)!==-1)return f;if(!i&&t){const f=e.map(p=>p.indexOf("-")!==-1?p.slice(0,p.indexOf("-")):null).indexOf(t);if(f!==-1)return e[f];for(const p of n){const g=p.indexOf("-")!==-1?p.slice(0,p.indexOf("-")):null,x=g?e.indexOf(g):-1;if(x!==-1)return e[x]}}return e.indexOf("none")!==-1?"none":e.indexOf("@none")!==-1?"@none":e[0]}function N1(t,e,n={}){const{strictFallback:i=!1,defaultText:a="",separator:c=`
|
|
392
|
+
`,fallbackLanguages:f=[],closest:p,skipLanguages:g}=n,x=Object.keys(t||{}),m=p?e:fM(e,x,f,i,g);if(!t)return a;if(typeof t=="string")return t;const w=m?t[m]:void 0;if(w&&m){if(typeof w=="string")return w;if(w.length===1&&w[0]===""){const R=n.skipLanguages||[];return N1(t,e,{...n,skipLanguages:[...R,m]})}return w.join(c)}return""}function dM(t,e={}){return N1(t,e.language||(typeof navigator<"u"?navigator.language:"en"),e)}const hM=cM.LazyLoadComponent;function z1(t){const{size:e,visible:n,classes:i,canvasId:a,figure:c}=t,f=(e==null?void 0:e.width)||128,p=(e==null?void 0:e.height)||(e==null?void 0:e.width)||128,g=re.jsx(pM,{...t}),x=re.jsx(hM,{threshold:300,style:{height:p,width:f},visibleByDefault:n,children:a?re.jsx(Vu,{canvas:a,children:g}):g});return c?re.jsx("figure",{className:i==null?void 0:i.figure,children:x}):x}function pM({fallback:t,size:e,classes:n,showLabel:i,alt:a,dereference:c=!1}){const f=mi(),p=(e==null?void 0:e.width)||128,g=(e==null?void 0:e.height)||(e==null?void 0:e.width)||128,x=a||dM(f==null?void 0:f.label)||"",m=uv({width:p,height:g},c);return!m||m.type!=="fixed"?re.jsx(re.Fragment,{children:t}):re.jsxs(re.Fragment,{children:[re.jsx("div",{className:n==null?void 0:n.imageWrapper,children:re.jsx("img",{className:n==null?void 0:n.img,src:m.id,alt:x})}),i?re.jsx(Yo,{as:"figcaption",className:n==null?void 0:n.label,children:f==null?void 0:f.label}):null]})}function vM({flat:t,size:e,classes:n={},showLabel:i,figure:a,fallback:c}){var D,A,z,P,L,M;const f=T.useRef(null),{items:p,sequence:g,currentSequenceIndex:x,setSequenceIndex:m}=Wp(),w={row:((D=n.selected)==null?void 0:D.row)||n.row,item:((A=n.selected)==null?void 0:A.item)||n.item,figure:((z=n.selected)==null?void 0:z.figure)||n.figure,img:((P=n.selected)==null?void 0:P.img)||n.img,label:((L=n.selected)==null?void 0:L.label)||n.label,imageWrapper:((M=n.selected)==null?void 0:M.imageWrapper)||n.imageWrapper};T.useLayoutEffect(()=>{if(!f.current)return;const F=f.current.querySelector("[data-selected=true]");F&&F.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[x]);const R=[];for(const F of g){const $=[],Q=g[x]===F;for(const j of F){const K=p[j];$.push(re.jsx("div",{className:Q?w.item:n.item,children:re.jsx(z1,{classes:Q?w:n,canvasId:K.id,size:e,showLabel:i,figure:a,placeholder:re.jsx("div",{style:{height:128,width:128}}),fallback:c})},j))}if(t){R.push($);continue}R.push(re.jsx("div",{onClick:j=>{m(g.indexOf(F))},"data-selected":Q,className:Q?w.row:n.row,children:$}))}return re.jsx("div",{ref:f,className:n.container,children:R})}function mM({annotation:t,children:e}){return re.jsx(oo,{value:{annotation:t},children:e})}function gM({annotationPage:t,children:e}){return re.jsx(oo,{value:{annotationPage:t},children:e})}function yM({collection:t,children:e}){return re.jsx(oo,{value:{collection:t},children:e})}function bM(t,e={}){return pd(e)}function SM(t,e=!1){}function xM(t){const n=Rs().manifest,i=t?t.map(a=>typeof a=="string"?a:a==null?void 0:a.id):[];return or(a=>{const c=n?a.iiif.entities.Manifest[n]:void 0,f=(c==null?void 0:c.items)||[];if(typeof t>"u")return f;const p=[];for(const g of(c==null?void 0:c.items)||[])i.indexOf(g.id)!==-1&&p.push(g);return p},[i.join("/")])}function wM(t,e=[]){const{id:n,selector:i}=t,a=Rs(),c=n||a.collection,f=or(p=>c?p.iiif.entities.Collection[c]:void 0,[c]);return T.useMemo(()=>{if(f)return i?i(f):f},[f,i,...e])}function EM(t,e,n,i,a=[]){const c=In(),f=T.useMemo(()=>ob(c),[c]);T.useEffect(()=>{const p=t;return p?(f.addEventListener(p,e,n,i),()=>{f.removeEventListener(p,e,n)}):()=>{}},[f,t,e,...a])}function TM(t,e){const{id:n,isLoaded:i,error:a,resource:c,requestId:f,cached:p}=Ip(t,e);return{id:n,isLoaded:i,error:a,manifest:c,requestId:f,cached:p}}function _1({cacheKey:t}={}){const e=mi(),n=pd(),i=In(),a=ec(),[c,f]=T.useState(void 0),[p,g]=T.useState(!1),[x,m]=T.useState("idle"),[w,R]=T.useState(void 0),D=e?e.id:"undefined",A=T.useMemo(()=>{try{if(e&&n.length){const P=n[0],L=i.get(P.body[0]),F=Ss.getImageServices(L)[0];return F&&a.loadServiceSync({id:F.id||F["@id"],width:F.width||e.width,height:F.height||e.height})||void 0}}catch(P){console.error(P)}},[D,t,e]),z=x==="success"&&c?c:A;return T.useEffect(()=>{(async()=>{try{if(e&&n.length){const P=n[0],L=i.get(P.body[0]),F=Ss.getImageServices(L)[0];if(!F)return;g(!0),m("loading");try{const $=await a.loadService({id:F.id||F["@id"],width:F.width||e.width,height:F.height||e.height})||void 0;f($),m("success"),g(!1)}catch($){m("error"),R($)}}}catch(P){m("error"),R(P)}})()},[D,t]),T.useMemo(()=>({data:z,isFetching:p,status:x,error:w}),[z,p,x,w])}function CM(){const t=_1();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 RM(){const t=Zi();return t?t.service.find(e=>e.profile==="SearchService1"||e.profile==="http://iiif.io/api/search/1/search"):void 0}function OM(){const t=In();return T.useMemo(()=>Yp(t),[t])}var ml={},hv,pv,tc=Xh;if(process.env.NODE_ENV==="production")pv=ml.createRoot=tc.createRoot,hv=ml.hydrateRoot=tc.hydrateRoot;else{var bd=tc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;pv=ml.createRoot=function(t,e){bd.usingClientEntryPoint=!0;try{return tc.createRoot(t,e)}finally{bd.usingClientEntryPoint=!1}},hv=ml.hydrateRoot=function(t,e,n){bd.usingClientEntryPoint=!0;try{return tc.hydrateRoot(t,e,n)}finally{bd.usingClientEntryPoint=!1}}}const AM=Yx({__proto__:null,get createRoot(){return pv},default:ml,get hydrateRoot(){return hv}},[ml]);me.AnnotationContext=mM,me.AnnotationPageContext=gM,me.CanvasAnnotations=oM,me.CanvasContext=Vu,me.CanvasPanel=yr,me.CollectionContext=yM,me.CombinedMetadata=aM,me.ContextBridge=Q0,me.Image=D1,me.ImageServiceLoaderContext=e1,me.InnerViewerProvider=$0,me.LanguageProvider=tM,me.LanguageString=R1,me.LocaleString=Yo,me.ManifestContext=B0,me.ManifestMetadata=uM,me.MediaPlayerProvider=cv,me.Metadata=fv,me.RangeContext=H0,me.ReactVaultContext=Hu,me.ResourceProvider=oo,me.ResourceReactContext=od,me.SequenceThumbnails=vM,me.SimpleViewerProvider=q0,me.SimpleViewerReactContext=qu,me.SingleCanvasThumbnail=z1,me.VaultProvider=jp,me.ViewerPresetContext=ad,me.VirtualAnnotationProvider=eb,me.VisibleCanvasReactContext=Wu,me.emptyActions=Xb,me.emptyStrategy=Kb,me.expandTarget=ao,me.findAllCanvasesInRange=Fp,me.findFirstCanvasFromRange=V0,me.findManifestSelectedRange=DR,me.findSelectedRange=Bp,me.flattenAnnotationPageIds=Zb,me.formatTime=h1,me.get3dStrategy=i1,me.getImageStrategy=s1,me.getManifestSequence=Hp,me.getParsedTargetSelector=av,me.getRenderingStrategy=u1,me.getTextualContentStrategy=a1,me.getVideoStrategy=l1,me.getVisibleCanvasesFromCanvasId=kR,me.isImageApiSelector=hb,me.parseRotation=pb,me.parseSelector=Xu,me.parseSpecificResource=UA,me.unknownResponse=hd,me.unsupportedStrategy=Un,me.useAnnotation=Kp,me.useAnnotationPage=mb,me.useAnnotationPageManager=lv,me.useAnnotationsAtTime=bM,me.useCanvas=mi,me.useCanvasClock=SM,me.useCanvasSequence=W0,me.useCanvasSubset=xM,me.useClosestLanguage=A1,me.useCollection=wM,me.useContextBridge=Y0,me.useCreateLocaleString=nM,me.useDispatch=G0,me.useEventListener=EM,me.useExistingVault=L1,me.useExternalCollection=TM,me.useExternalManifest=F0,me.useExternalResource=Ip,me.useIIIFLanguage=yd,me.useImage=dv,me.useImageService=_1,me.useImageServiceLoader=ec,me.useImageTile=CM,me.useLoadImageService=t1,me.useLocaleString=M1,me.useManifest=Zi,me.useMediaActions=JA,me.useMediaElements=eM,me.useMediaState=ZA,me.usePaintables=r1,me.usePaintingAnnotations=pd,me.useRange=Vp,me.useRenderingStrategy=c1,me.useResourceContext=Rs,me.useResourceEvents=qp,me.useResources=Jb,me.useSearchService=RM,me.useSimpleMediaPlayer=gd,me.useSimpleViewer=Wp,me.useStyleHelper=OM,me.useStyles=Yu,me.useThumbnail=uv,me.useVault=In,me.useVaultEffect=f1,me.useVaultSelector=or,me.useViewerPreset=tb,me.useVirtualAnnotationPage=K0,me.useVirtualAnnotationPageContext=J0,me.useVisibleCanvases=Up,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});
|
|
391
393
|
//# sourceMappingURL=index.umd.js.map
|