@pramen/cms-editor 0.0.46 → 0.0.48

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.
@@ -0,0 +1,396 @@
1
+ var FW=Object.create;var{getPrototypeOf:VW,defineProperty:zw,getOwnPropertyNames:jW}=Object;var KW=Object.prototype.hasOwnProperty;function qW(e){return this[e]}var GW,WW,j=(e,t,r)=>{var a=e!=null&&typeof e==="object";if(a){var i=t?GW??=new WeakMap:WW??=new WeakMap,l=i.get(e);if(l)return l}r=e!=null?FW(VW(e)):{};let c=t||!e||!e.__esModule?zw(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let u of jW(e))if(!KW.call(c,u))zw(c,u,{get:qW.bind(e,u),enumerable:!0})}if(a)i.set(e,c);return c};var Bi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YW=(e)=>e;function JW(e,t){this[e]=YW.bind(null,t)}var ic=(e,t)=>{for(var r in t)zw(e,r,{get:t[r],enumerable:!0,configurable:!0,set:JW.bind(t,r)})};var N=(e,t)=>()=>(e&&(t=e(e=0)),t);class Zy{cache=new Map;_maxSize;constructor(e){if(e<0)throw Error(`[buzola] LoaderCache maxSize must be non-negative, got ${e}`);this._maxSize=e}get maxSize(){return this._maxSize}get size(){return this.cache.size}get(e){let t=this.cache.get(e);if(t!==void 0||this.cache.has(e))this.cache.delete(e),this.cache.set(e,t);return t}has(e){return this.cache.has(e)}set(e,t){this.cache.delete(e),this.cache.set(e,t);while(this.cache.size>this._maxSize){let r=this.cache.keys().next().value;this.cache.delete(r)}}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}}function Wf(e,t){let r=t.pathname,a=r.split("/").filter(Boolean);return Hw(e.root,a,0,{},r)}function Hw(e,t,r,a,i){if(r===t.length){if(e.route)return v6(e.route.chain,a,i);return null}let l=t[r],c=e.staticChildren.get(l);if(c){let u=Hw(c,t,r+1,a,i);if(u)return u}if(e.dynamicChild){let u={...a,[e.dynamicChild.paramName]:decodeURIComponent(l)},f=Hw(e.dynamicChild.node,t,r+1,u,i);if(f)return f}if(e.catchAllChild){let u=t.slice(r).map((h)=>decodeURIComponent(h)).join("/"),f={...a,[e.catchAllChild.paramName]:u};return v6(e.catchAllChild.chain,f,i)}return null}function v6(e,t,r){return e.map((a)=>({node:a,params:t,pathname:r}))}function Uw(e){let t=e.endsWith("+");return{name:t?e.slice(1,-1):e.slice(1),isCatchAll:t}}function Km(e){let t=[];for(let r of e.split("/"))if(r.startsWith(":"))t.push(Uw(r).name);return t}class ev{routes;adapter;viewTransitions;_basePath;persistentParamsFn;pageRegistry;subscribers=new Set;invalidationListeners=new Set;state;navigationId=0;stopFn;blockers=new Set;pendingScrollBehavior="after-transition";_loaderCache;constructor(e){this.routes=e.routes,this.adapter=e.adapter,this.viewTransitions=e.viewTransitions??!1,this._basePath=e.basePath?e.basePath.replace(/\/$/,""):"",this.persistentParamsFn=e.persistentParams,this.pageRegistry=e.pageRegistry??{},this._loaderCache=e.loaderCacheSize?new Zy(e.loaderCacheSize):void 0;let t=this.adapter.getCurrentURL(),r=this.createMatchUrl(t),a=Wf(this.routes,r)??[];if(a.length===0)console.warn(`[buzola] No route matched URL "${t.pathname}". Define a catch-all 404 route to handle unmatched URLs.`);this.state={location:t,matches:a,isPending:!1,navigationState:this.adapter.getState()}}get basePath(){return this._basePath}get loaderCache(){return this._loaderCache}getState(){return this.state}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}start(){let e=(r)=>{if(!r.canIntercept)return;let a=new URL(r.destination.url),i=this.createMatchUrl(a),l=Wf(this.routes,i);if(!l){console.warn(`[buzola] No route matched URL "${a.pathname}". The navigation was not intercepted.`);return}let c=++this.navigationId,u=r.viewTransition||this.viewTransitions,f=this.pendingScrollBehavior;this.pendingScrollBehavior="after-transition",r.intercept({scroll:f,handler:async()=>{for(let m of this.blockers){if(this.navigationId!==c)return;if(!await m())throw new Fw}if(this.setState({...this.state,isPending:!0,pendingLocation:a}),this.navigationId!==c)return;let h=()=>{this.setState({location:a,matches:l,isPending:!1,pendingLocation:void 0,navigationState:this.adapter.getState()})};if(u&&typeof document<"u"&&"startViewTransition"in document)document.startViewTransition(h);else h()}})};this.adapter.addEventListener("navigate",e);let t=()=>{this.adapter.removeEventListener("navigate",e)};return this.stopFn=t,t}navigate(e,t){if(t?.resetScroll===!1)this.pendingScrollBehavior="manual";this.adapter.navigate(this._basePath+e,t)}navigateToPage(e,t,r){let a=this.buildPagePath(e,t);this.navigate(this.stripBasePath(a),r)}buildPagePath(e,t){let r=this.pageRegistry[e];if(!r)throw Error(`[buzola] Unknown page "${e}". Is it registered in the page registry?`);let a=this.resolveParams(r,t);return this.buildPath(r,a)}preload(e,t){let r=this.buildPagePath(e,t),a=new URL(r,"http://localhost"),i=this.createMatchUrl(a),l=Wf(this.routes,i);if(!l)return;for(let c of l)c.node.preload?.()}back(){this.adapter.back()}forward(){this.adapter.forward()}buildPath(e,t){let r=e.split("/"),a=[],i=[];for(let h of r)if(h.startsWith(":")){let{name:m,isCatchAll:b}=Uw(h),y=t?.[m];if(y===void 0)i.push(m);else if(b)a.push(y);else a.push(encodeURIComponent(y))}else a.push(h);if(i.length>0){if(!t)throw Error(`[buzola] Missing params for path "${e}": ${i.join(", ")}`);throw Error(`[buzola] Missing param "${i[0]}" for path "${e}"`)}let l=new Set(Km(e)),c=new URLSearchParams;if(t){for(let[h,m]of Object.entries(t))if(!l.has(h)&&m!==void 0)c.set(h,m)}let u=this._basePath+a.join("/"),f=c.toString();return f?`${u}?${f}`:u}stripBasePath(e){if(this._basePath&&e.startsWith(this._basePath))return e.slice(this._basePath.length)||"/";return e}resolveParams(e,t){let r=Km(e),a=this.getCurrentParams(),i=this.persistentParamsFn?.()??{},l={};for(let c of r){let u=t?.[c]??a[c]??i[c];if(u!==void 0)l[c]=u}if(t){let c=new Set(r);for(let[u,f]of Object.entries(t))if(!c.has(u)&&f!==void 0)l[u]=f}return l}getCurrentParams(){let e={};for(let t of this.state.matches)Object.assign(e,t.params);return e}invalidateAll(){for(let e of this.invalidationListeners)e()}onInvalidate(e){return this.invalidationListeners.add(e),()=>{this.invalidationListeners.delete(e)}}addBlocker(e){return this.blockers.add(e),()=>{this.blockers.delete(e)}}dispose(){this.stopFn?.(),this.stopFn=void 0,this.subscribers.clear(),this.invalidationListeners.clear()}updateRoutes(e){this.routes=e;let t=Wf(this.routes,this.createMatchUrl(this.state.location))??[];this.setState({...this.state,matches:t})}createMatchUrl(e){if(!this._basePath)return e;let t=new URL(e);return t.pathname=this.stripBasePath(t.pathname),t}setState(e){this.state=e;for(let t of this.subscribers)t(this.state)}}var Fw;var Vw=N(()=>{Fw=class Fw extends Error{constructor(){super("Navigation aborted by blocker");this.name="NavigationAbortedError"}}});function $6(e){let{path:t,fullPath:r,component:a,searchSchema:i,preload:l,isLayout:c=!1,isIndex:u=!1}=e;return{id:`route:${r||"/"}${c?":layout":""}`,path:x6(t),fullPath:x6(r),component:a,searchSchema:i,preload:l,isLayout:c,isIndex:u}}function Kw(e,t=""){let r=S6(e,t,[]),a=jw();for(let i of r)XW(a,i.pattern,i.chain);return{root:a}}function S6(e,t,r){let a=[];for(let i of e){let l=i.isPathlessGroup?"":i.path,c=i.children!=null&&i.children.length>0,u=i.isLayout??c,f=i.isIndex??(!u&&(i.path==="/"||i.path==="")),h;if(i.matchPath!=null)h=i.matchPath;else if(f)h=t||"/";else h=ZW(t||"/",l);let m=$6({path:l,fullPath:h,component:i.component,searchSchema:i.searchSchema,preload:i.preload,isLayout:u,isIndex:f});if(u){let b=[...r,m];if(i.children){let y=i.isPathlessGroup?t:h;a.push(...S6(i.children,y,b))}}else a.push({pattern:h,chain:[...r,m]})}return a}function jw(){return{staticChildren:new Map}}function XW(e,t,r){let a=QW(t),i=e;for(let l=0;l<a.length;l++){let c=a[l];if(c.startsWith(":")&&(c.endsWith("+")||c.endsWith("*"))){let u=c.slice(1,-1);i.catchAllChild={paramName:u,chain:r};return}if(c.startsWith(":")){let u=c.slice(1);if(!i.dynamicChild)i.dynamicChild={paramName:u,node:jw()};i=i.dynamicChild.node}else{let u=i.staticChildren.get(c);if(!u)u=jw(),i.staticChildren.set(c,u);i=u}}i.route={chain:r}}function QW(e){return e.split("/").filter(Boolean)}function x6(e){if(e===""||e==="/")return"/";let t=e.startsWith("/")?e:`/${e}`;return t.endsWith("/")?t.slice(0,-1):t}function ZW(e,t){if(t==="/")return e==="/"?"/":e;let r=e==="/"?"":e,a=t.startsWith("/")?t:`/${t}`;return r+a}function qw(){let e=window.navigation;if(!e)throw Error("Navigation API is not available. Buzola requires a browser that supports the Navigation API.");let t=new Set,r=!1,a=(i)=>{let l=r;r=!1;let c={destination:{url:i.destination.url},canIntercept:i.canIntercept,navigationType:i.navigationType,userInitiated:i.userInitiated,viewTransition:l,intercept(u){i.intercept({handler:u.handler,scroll:u.scroll})}};for(let u of t)u(c)};return{getCurrentURL(){return new URL(e.currentEntry.url)},navigate(i,l){if(l?.viewTransition)r=!0;e.navigate(i,{history:l?.replace?"replace":"push",state:l?.state})},back(){e.back()},forward(){e.forward()},addEventListener(i,l){let c=t.size===0;if(t.add(l),c)e.addEventListener("navigate",a)},removeEventListener(i,l){if(t.delete(l),t.size===0)e.removeEventListener("navigate",a)},getState(){return e.currentEntry?.getState?.()}}}function C6(e){return!("issues"in e["~standard"].validate(void 0))}function Gw(e,t,r){let a=e["~standard"].validate(t);if("issues"in a)throw Error(`${r}${a.issues.map((i)=>i.message).join(", ")}`);return a.value}function w6(e){let t=e.startsWith("?"),r=t?e.slice(1):e,a=r.endsWith("[]"),i=a?r.slice(0,-2):r,l=tY[i];if(!l)throw Error(`[buzola] Unknown param type: ${i}`);let c;if(a)c=(u)=>{if(t&&(u===void 0||Array.isArray(u)&&u.length===0))return{value:void 0};if(!Array.isArray(u))return{issues:[{message:`expected ${i}[]`}]};let f=[];for(let h of u){let m=l(h);if("issues"in m)return m;f.push(m.value)}return{value:f}};else if(t)c=(u)=>u===void 0||u===""?{value:void 0}:l(u);else c=l;return{schema:{"~standard":{version:1,vendor:"buzola",validate:c}},optional:t,array:a}}var eY,tY;var tv=N(()=>{eY=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,tY={string:(e)=>typeof e==="string"?{value:e}:{issues:[{message:"expected string"}]},number:(e)=>{let t=Number(e);return Number.isNaN(t)?{issues:[{message:"expected number"}]}:{value:t}},uuid:(e)=>typeof e==="string"&&eY.test(e)?{value:e}:{issues:[{message:"expected UUID"}]}}});var ae=Bi(function(nY,nv){(function(){function e(M,Q){Object.defineProperty(a.prototype,M,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Q[0],Q[1])}})}function t(M){if(M===null||typeof M!=="object")return null;return M=Rt&&M[Rt]||M["@@iterator"],typeof M==="function"?M:null}function r(M,Q){M=(M=M.constructor)&&(M.displayName||M.name)||"ReactClass";var me=M+"."+Q;he[me]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Q,M),he[me]=!0)}function a(M,Q,me){this.props=M,this.context=Q,this.refs=Rn,this.updater=me||ln}function i(){}function l(M,Q,me){this.props=M,this.context=Q,this.refs=Rn,this.updater=me||ln}function c(){}function u(M){return""+M}function f(M){try{u(M);var Q=!1}catch(_e){Q=!0}if(Q){Q=console;var me=Q.error,Ce=typeof Symbol==="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return me.call(Q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Ce),u(M)}}function h(M){if(M==null)return null;if(typeof M==="function")return M.$$typeof===Qr?null:M.displayName||M.name||null;if(typeof M==="string")return M;switch(M){case V:return"Fragment";case X:return"Profiler";case k:return"StrictMode";case He:return"Suspense";case Ee:return"SuspenseList";case Oe:return"Activity"}if(typeof M==="object")switch(typeof M.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case pe:return"Portal";case $e:return M.displayName||"Context";case ve:return(M._context.displayName||"Context")+".Consumer";case ke:var Q=M.render;return M=M.displayName,M||(M=Q.displayName||Q.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case Ze:return Q=M.displayName||null,Q!==null?Q:h(M.type)||"Memo";case fe:Q=M._payload,M=M._init;try{return h(M(Q))}catch(me){}}return null}function m(M){if(M===V)return"<>";if(typeof M==="object"&&M!==null&&M.$$typeof===fe)return"<...>";try{var Q=h(M);return Q?"<"+Q+">":"<...>"}catch(me){return"<...>"}}function b(){var M=it.A;return M===null?null:M.getOwner()}function y(){return Error("react-stack-top-frame")}function v(M){if(Vd.call(M,"key")){var Q=Object.getOwnPropertyDescriptor(M,"key").get;if(Q&&Q.isReactWarning)return!1}return M.key!==void 0}function S(M,Q){function me(){Ib||(Ib=!0,console.error("%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://react.dev/link/special-props)",Q))}me.isReactWarning=!0,Object.defineProperty(M,"key",{get:me,configurable:!0})}function w(){var M=h(this.type);return Yc[M]||(Yc[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function E(M,Q,me,Ce,_e,et){var tt=me.ref;return M={$$typeof:Z,type:M,key:Q,props:me,_owner:Ce},(tt!==void 0?tt:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:w}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:et}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function R(M,Q){return Q=E(M.type,Q,M.props,M._owner,M._debugStack,M._debugTask),M._store&&(Q._store.validated=M._store.validated),Q}function D(M){H(M)?M._store&&(M._store.validated=1):typeof M==="object"&&M!==null&&M.$$typeof===fe&&(M._payload.status==="fulfilled"?H(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function H(M){return typeof M==="object"&&M!==null&&M.$$typeof===Z}function z(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(me){return Q[me]})}function G(M,Q){return typeof M==="object"&&M!==null&&M.key!=null?(f(M.key),z(""+M.key)):Q.toString(36)}function ee(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status==="string"?M.then(c,c):(M.status="pending",M.then(function(Q){M.status==="pending"&&(M.status="fulfilled",M.value=Q)},function(Q){M.status==="pending"&&(M.status="rejected",M.reason=Q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function U(M,Q,me,Ce,_e){var et=typeof M;if(et==="undefined"||et==="boolean")M=null;var tt=!1;if(M===null)tt=!0;else switch(et){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(M.$$typeof){case Z:case pe:tt=!0;break;case fe:return tt=M._init,U(tt(M._payload),Q,me,Ce,_e)}}if(tt){tt=M,_e=_e(tt);var Mt=Ce===""?"."+G(tt,0):Ce;return Ie(_e)?(me="",Mt!=null&&(me=Mt.replace(Kd,"$&/")+"/"),U(_e,Q,me,"",function(Cr){return Cr})):_e!=null&&(H(_e)&&(_e.key!=null&&(tt&&tt.key===_e.key||f(_e.key)),me=R(_e,me+(_e.key==null||tt&&tt.key===_e.key?"":(""+_e.key).replace(Kd,"$&/")+"/")+Mt),Ce!==""&&tt!=null&&H(tt)&&tt.key==null&&tt._store&&!tt._store.validated&&(me._store.validated=2),_e=me),Q.push(_e)),1}if(tt=0,Mt=Ce===""?".":Ce+":",Ie(M))for(var je=0;je<M.length;je++)Ce=M[je],et=Mt+G(Ce,je),tt+=U(Ce,Q,me,et,_e);else if(je=t(M),typeof je==="function")for(je===M.entries&&(jd||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),jd=!0),M=je.call(M),je=0;!(Ce=M.next()).done;)Ce=Ce.value,et=Mt+G(Ce,je++),tt+=U(Ce,Q,me,et,_e);else if(et==="object"){if(typeof M.then==="function")return U(ee(M),Q,me,Ce,_e);throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return tt}function P(M,Q,me){if(M==null)return M;var Ce=[],_e=0;return U(M,Ce,"","",function(et){return Q.call(me,et,_e++)}),Ce}function re(M){if(M._status===-1){var Q=M._ioInfo;Q!=null&&(Q.start=Q.end=performance.now()),Q=M._result;var me=Q();if(me.then(function(_e){if(M._status===0||M._status===-1){M._status=1,M._result=_e;var et=M._ioInfo;et!=null&&(et.end=performance.now()),me.status===void 0&&(me.status="fulfilled",me.value=_e)}},function(_e){if(M._status===0||M._status===-1){M._status=2,M._result=_e;var et=M._ioInfo;et!=null&&(et.end=performance.now()),me.status===void 0&&(me.status="rejected",me.reason=_e)}}),Q=M._ioInfo,Q!=null){Q.value=me;var Ce=me.displayName;typeof Ce==="string"&&(Q.name=Ce)}M._status===-1&&(M._status=0,M._result=me)}if(M._status===1)return Q=M._result,Q===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+
3
+ Your code should look like:
4
+ const MyComponent = lazy(() => import('./MyComponent'))
5
+
6
+ Did you accidentally put curly braces around the import?`,Q),"default"in Q||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
+
8
+ Your code should look like:
9
+ const MyComponent = lazy(() => import('./MyComponent'))`,Q),Q.default;throw M._result}function J(){var M=it.H;return M===null&&console.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:
10
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
+ 2. You might be breaking the Rules of Hooks
12
+ 3. You might have more than one copy of React in the same app
13
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),M}function ye(){it.asyncTransitions--}function ce(M){if(Xc===null)try{var Q=("require"+Math.random()).slice(0,7);Xc=(nv&&nv[Q]).call(nv,"timers").setImmediate}catch(me){Xc=function(Ce){Bb===!1&&(Bb=!0,typeof MessageChannel>"u"&&console.error("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 _e=new MessageChannel;_e.port1.onmessage=Ce,_e.port2.postMessage(void 0)}}return Xc(M)}function se(M){return 1<M.length&&typeof AggregateError==="function"?AggregateError(M):M[0]}function _(M,Q){Q!==Qc-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Qc=Q}function W(M,Q,me){var Ce=it.actQueue;if(Ce!==null)if(Ce.length!==0)try{Y(Ce),ce(function(){return W(M,Q,me)});return}catch(_e){it.thrownErrors.push(_e)}else it.actQueue=null;0<it.thrownErrors.length?(Ce=se(it.thrownErrors),it.thrownErrors.length=0,me(Ce)):Q(M)}function Y(M){if(!eu){eu=!0;var Q=0;try{for(;Q<M.length;Q++){var me=M[Q];do{it.didUsePromise=!1;var Ce=me(!1);if(Ce!==null){if(it.didUsePromise){M[Q]=me,M.splice(0,Q);return}me=Ce}else break}while(1)}M.length=0}catch(_e){M.splice(0,Q+1),it.thrownErrors.push(_e)}finally{eu=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Z=Symbol.for("react.transitional.element"),pe=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),ve=Symbol.for("react.consumer"),$e=Symbol.for("react.context"),ke=Symbol.for("react.forward_ref"),He=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),Ze=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Oe=Symbol.for("react.activity"),Rt=Symbol.iterator,he={},ln={isMounted:function(){return!1},enqueueForceUpdate:function(M){r(M,"forceUpdate")},enqueueReplaceState:function(M){r(M,"replaceState")},enqueueSetState:function(M){r(M,"setState")}},Dn=Object.assign,Rn={};Object.freeze(Rn),a.prototype.isReactComponent={},a.prototype.setState=function(M,Q){if(typeof M!=="object"&&typeof M!=="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Q,"setState")},a.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};var tn={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(yl in tn)tn.hasOwnProperty(yl)&&e(yl,tn[yl]);i.prototype=a.prototype,tn=l.prototype=new i,tn.constructor=l,Dn(tn,a.prototype),tn.isPureReactComponent=!0;var Ie=Array.isArray,Qr=Symbol.for("react.client.reference"),it={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Vd=Object.prototype.hasOwnProperty,qt=console.createTask?console.createTask:function(){return null};tn={react_stack_bottom_frame:function(M){return M()}};var Ib,ci,Yc={},Jc=tn.react_stack_bottom_frame.bind(tn,y)(),a2=qt(m(y)),jd=!1,Kd=/\/+/g,bl=typeof reportError==="function"?reportError:function(M){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M==="object"&&M!==null&&typeof M.message==="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Q))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",M);return}console.error(M)},Bb=!1,Xc=null,Qc=0,Zc=!1,eu=!1,ph=typeof queueMicrotask==="function"?function(M){queueMicrotask(function(){return queueMicrotask(M)})}:ce;tn=Object.freeze({__proto__:null,c:function(M){return J().useMemoCache(M)}});var yl={map:P,forEach:function(M,Q,me){P(M,function(){Q.apply(this,arguments)},me)},count:function(M){var Q=0;return P(M,function(){Q++}),Q},toArray:function(M){return P(M,function(Q){return Q})||[]},only:function(M){if(!H(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};nY.Activity=Oe,nY.Children=yl,nY.Component=a,nY.Fragment=V,nY.Profiler=X,nY.PureComponent=l,nY.StrictMode=k,nY.Suspense=He,nY.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=it,nY.__COMPILER_RUNTIME=tn,nY.act=function(M){var Q=it.actQueue,me=Qc;Qc++;var Ce=it.actQueue=Q!==null?Q:[],_e=!1;try{var et=M()}catch(je){it.thrownErrors.push(je)}if(0<it.thrownErrors.length)throw _(Q,me),M=se(it.thrownErrors),it.thrownErrors.length=0,M;if(et!==null&&typeof et==="object"&&typeof et.then==="function"){var tt=et;return ph(function(){_e||Zc||(Zc=!0,console.error("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(je,Cr){_e=!0,tt.then(function(xo){if(_(Q,me),me===0){try{Y(Ce),ce(function(){return W(xo,je,Cr)})}catch(hh){it.thrownErrors.push(hh)}if(0<it.thrownErrors.length){var vl=se(it.thrownErrors);it.thrownErrors.length=0,Cr(vl)}}else je(xo)},function(xo){_(Q,me),0<it.thrownErrors.length?(xo=se(it.thrownErrors),it.thrownErrors.length=0,Cr(xo)):Cr(xo)})}}}var Mt=et;if(_(Q,me),me===0&&(Y(Ce),Ce.length!==0&&ph(function(){_e||Zc||(Zc=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),it.actQueue=null),0<it.thrownErrors.length)throw M=se(it.thrownErrors),it.thrownErrors.length=0,M;return{then:function(je,Cr){_e=!0,me===0?(it.actQueue=Ce,ce(function(){return W(Mt,je,Cr)})):je(Mt)}}},nY.cache=function(M){return function(){return M.apply(null,arguments)}},nY.cacheSignal=function(){return null},nY.captureOwnerStack=function(){var M=it.getCurrentStack;return M===null?null:M()},nY.cloneElement=function(M,Q,me){if(M===null||M===void 0)throw Error("The argument must be a React element, but you passed "+M+".");var Ce=Dn({},M.props),_e=M.key,et=M._owner;if(Q!=null){var tt;e:{if(Vd.call(Q,"ref")&&(tt=Object.getOwnPropertyDescriptor(Q,"ref").get)&&tt.isReactWarning){tt=!1;break e}tt=Q.ref!==void 0}tt&&(et=b()),v(Q)&&(f(Q.key),_e=""+Q.key);for(Mt in Q)!Vd.call(Q,Mt)||Mt==="key"||Mt==="__self"||Mt==="__source"||Mt==="ref"&&Q.ref===void 0||(Ce[Mt]=Q[Mt])}var Mt=arguments.length-2;if(Mt===1)Ce.children=me;else if(1<Mt){tt=Array(Mt);for(var je=0;je<Mt;je++)tt[je]=arguments[je+2];Ce.children=tt}Ce=E(M.type,_e,Ce,et,M._debugStack,M._debugTask);for(_e=2;_e<arguments.length;_e++)D(arguments[_e]);return Ce},nY.createContext=function(M){return M={$$typeof:$e,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:ve,_context:M},M._currentRenderer=null,M._currentRenderer2=null,M},nY.createElement=function(M,Q,me){for(var Ce=2;Ce<arguments.length;Ce++)D(arguments[Ce]);Ce={};var _e=null;if(Q!=null)for(je in ci||!("__self"in Q)||"key"in Q||(ci=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),v(Q)&&(f(Q.key),_e=""+Q.key),Q)Vd.call(Q,je)&&je!=="key"&&je!=="__self"&&je!=="__source"&&(Ce[je]=Q[je]);var et=arguments.length-2;if(et===1)Ce.children=me;else if(1<et){for(var tt=Array(et),Mt=0;Mt<et;Mt++)tt[Mt]=arguments[Mt+2];Object.freeze&&Object.freeze(tt),Ce.children=tt}if(M&&M.defaultProps)for(je in et=M.defaultProps,et)Ce[je]===void 0&&(Ce[je]=et[je]);_e&&S(Ce,typeof M==="function"?M.displayName||M.name||"Unknown":M);var je=1e4>it.recentlyCreatedOwnerStacks++;return E(M,_e,Ce,b(),je?Error("react-stack-top-frame"):Jc,je?qt(m(M)):a2)},nY.createRef=function(){var M={current:null};return Object.seal(M),M},nY.forwardRef=function(M){M!=null&&M.$$typeof===Ze?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof M!=="function"?console.error("forwardRef requires a render function but was given %s.",M===null?"null":typeof M):M.length!==0&&M.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",M.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),M!=null&&M.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Q={$$typeof:ke,render:M},me;return Object.defineProperty(Q,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ce){me=Ce,M.name||M.displayName||(Object.defineProperty(M,"name",{value:Ce}),M.displayName=Ce)}}),Q},nY.isValidElement=H,nY.lazy=function(M){M={_status:-1,_result:M};var Q={$$typeof:fe,_payload:M,_init:re},me={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return M._ioInfo=me,Q._debugInfo=[{awaited:me}],Q},nY.memo=function(M,Q){M==null&&console.error("memo: The first argument must be a component. Instead received: %s",M===null?"null":typeof M),Q={$$typeof:Ze,type:M,compare:Q===void 0?null:Q};var me;return Object.defineProperty(Q,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ce){me=Ce,M.name||M.displayName||(Object.defineProperty(M,"name",{value:Ce}),M.displayName=Ce)}}),Q},nY.startTransition=function(M){var Q=it.T,me={};me._updatedFibers=new Set,it.T=me;try{var Ce=M(),_e=it.S;_e!==null&&_e(me,Ce),typeof Ce==="object"&&Ce!==null&&typeof Ce.then==="function"&&(it.asyncTransitions++,Ce.then(ye,ye),Ce.then(c,bl))}catch(et){bl(et)}finally{Q===null&&me._updatedFibers&&(M=me._updatedFibers.size,me._updatedFibers.clear(),10<M&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),Q!==null&&me.types!==null&&(Q.types!==null&&Q.types!==me.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),Q.types=me.types),it.T=Q}},nY.unstable_useCacheRefresh=function(){return J().useCacheRefresh()},nY.use=function(M){return J().use(M)},nY.useActionState=function(M,Q,me){return J().useActionState(M,Q,me)},nY.useCallback=function(M,Q){return J().useCallback(M,Q)},nY.useContext=function(M){var Q=J();return M.$$typeof===ve&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),Q.useContext(M)},nY.useDebugValue=function(M,Q){return J().useDebugValue(M,Q)},nY.useDeferredValue=function(M,Q){return J().useDeferredValue(M,Q)},nY.useEffect=function(M,Q){return M==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),J().useEffect(M,Q)},nY.useEffectEvent=function(M){return J().useEffectEvent(M)},nY.useId=function(){return J().useId()},nY.useImperativeHandle=function(M,Q,me){return J().useImperativeHandle(M,Q,me)},nY.useInsertionEffect=function(M,Q){return M==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),J().useInsertionEffect(M,Q)},nY.useLayoutEffect=function(M,Q){return M==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),J().useLayoutEffect(M,Q)},nY.useMemo=function(M,Q){return J().useMemo(M,Q)},nY.useOptimistic=function(M,Q){return J().useOptimistic(M,Q)},nY.useReducer=function(M,Q,me){return J().useReducer(M,Q,me)},nY.useRef=function(M){return J().useRef(M)},nY.useState=function(M){return J().useState(M)},nY.useSyncExternalStore=function(M,Q,me){return J().useSyncExternalStore(M,Q,me)},nY.useTransition=function(){return J().useTransition()},nY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var io=Bi(function(rY){var zu=j(ae());(function(){function e(k){if(k==null)return null;if(typeof k==="function")return k.$$typeof===J?null:k.displayName||k.name||null;if(typeof k==="string")return k;switch(k){case w:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case G:return"Suspense";case ee:return"SuspenseList";case re:return"Activity"}if(typeof k==="object")switch(typeof k.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case S:return"Portal";case H:return k.displayName||"Context";case D:return(k._context.displayName||"Context")+".Consumer";case z:var X=k.render;return k=k.displayName,k||(k=X.displayName||X.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case U:return X=k.displayName||null,X!==null?X:e(k.type)||"Memo";case P:X=k._payload,k=k._init;try{return e(k(X))}catch(ve){}}return null}function t(k){return""+k}function r(k){try{t(k);var X=!1}catch(ke){X=!0}if(X){X=console;var ve=X.error,$e=typeof Symbol==="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ve.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$e),t(k)}}function a(k){if(k===w)return"<>";if(typeof k==="object"&&k!==null&&k.$$typeof===P)return"<...>";try{var X=e(k);return X?"<"+X+">":"<...>"}catch(ve){return"<...>"}}function i(){var k=ye.A;return k===null?null:k.getOwner()}function l(){return Error("react-stack-top-frame")}function c(k){if(ce.call(k,"key")){var X=Object.getOwnPropertyDescriptor(k,"key").get;if(X&&X.isReactWarning)return!1}return k.key!==void 0}function u(k,X){function ve(){W||(W=!0,console.error("%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://react.dev/link/special-props)",X))}ve.isReactWarning=!0,Object.defineProperty(k,"key",{get:ve,configurable:!0})}function f(){var k=e(this.type);return Y[k]||(Y[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function h(k,X,ve,$e,ke,He){var Ee=ve.ref;return k={$$typeof:v,type:k,key:X,props:ve,_owner:$e},(Ee!==void 0?Ee:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:f}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ke}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:He}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function m(k,X,ve,$e,ke,He){var Ee=X.children;if(Ee!==void 0)if($e)if(se(Ee)){for($e=0;$e<Ee.length;$e++)b(Ee[$e]);Object.freeze&&Object.freeze(Ee)}else console.error("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 b(Ee);if(ce.call(X,"key")){Ee=e(k);var Ze=Object.keys(X).filter(function(Oe){return Oe!=="key"});$e=0<Ze.length?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}",V[Ee+$e]||(Ze=0<Ze.length?"{"+Ze.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
14
+ let props = %s;
15
+ <%s {...props} />
16
+ React keys must be passed directly to JSX without using spread:
17
+ let props = %s;
18
+ <%s key={someKey} {...props} />`,$e,Ee,Ze,Ee),V[Ee+$e]=!0)}if(Ee=null,ve!==void 0&&(r(ve),Ee=""+ve),c(X)&&(r(X.key),Ee=""+X.key),"key"in X){ve={};for(var fe in X)fe!=="key"&&(ve[fe]=X[fe])}else ve=X;return Ee&&u(ve,typeof k==="function"?k.displayName||k.name||"Unknown":k),h(k,Ee,ve,i(),ke,He)}function b(k){y(k)?k._store&&(k._store.validated=1):typeof k==="object"&&k!==null&&k.$$typeof===P&&(k._payload.status==="fulfilled"?y(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function y(k){return typeof k==="object"&&k!==null&&k.$$typeof===v}var v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),H=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),ye=zu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,se=Array.isArray,_=console.createTask?console.createTask:function(){return null};zu={react_stack_bottom_frame:function(k){return k()}};var W,Y={},Z=zu.react_stack_bottom_frame.bind(zu,l)(),pe=_(a(l)),V={};rY.Fragment=w,rY.jsx=function(k,X,ve){var $e=1e4>ye.recentlyCreatedOwnerStacks++;return m(k,X,ve,!1,$e?Error("react-stack-top-frame"):Z,$e?_(a(k)):pe)},rY.jsxs=function(k,X,ve){var $e=1e4>ye.recentlyCreatedOwnerStacks++;return m(k,X,ve,!0,$e?Error("react-stack-top-frame"):Z,$e?_(a(k)):pe)}})()});class Ww{activeUrlHref=null;activeCacheKey=null;activePromise=null;activeResolvedData;hasResolved=!1;pendingBackgroundKey=null;id;constructor(){this.id=oY++}resolve(e){let{currentUrlHref:t,cacheKey:r,load:a,loaderCache:i,onBackgroundSettled:l}=e;if(this.handleUrlChange(t,i),this.activeCacheKey===r){if(this.pendingBackgroundKey===r)return{action:"render",data:this.activeResolvedData,isLoading:!0};if(this.hasResolved)return{action:"render",data:this.activeResolvedData,isLoading:!1};return{action:"suspend",promise:this.activePromise}}if(this.hasResolved){let u=a();return this.activeCacheKey=r,this.activePromise=u,this.pendingBackgroundKey=r,u.then((f)=>{if(this.activeCacheKey===r)l({ok:!0,result:f})},()=>{if(this.activeCacheKey===r)l({ok:!1})}),{action:"render",data:this.activeResolvedData,isLoading:!0}}let c=a();return this.activeCacheKey=r,this.activePromise=c,{action:"suspend",promise:c}}commitResult(e){this.activeResolvedData=e,this.hasResolved=!0}commitBackgroundResult(e){this.activeResolvedData=e,this.pendingBackgroundKey=null}commitBackgroundError(){this.hasResolved=!1,this.pendingBackgroundKey=null}dispose(e){if(e&&this.hasResolved&&this.activeResolvedData!==void 0&&this.activeUrlHref)this.saveToStaleCache(e,this.activeUrlHref,this.activeResolvedData);this.activeUrlHref=null,this.activeCacheKey=null,this.activePromise=null,this.activeResolvedData=void 0,this.hasResolved=!1,this.pendingBackgroundKey=null}handleUrlChange(e,t){if(this.activeUrlHref!==null&&this.activeUrlHref!==e){if(t&&this.hasResolved&&this.activeResolvedData!==void 0)this.saveToStaleCache(t,this.activeUrlHref,this.activeResolvedData);let r=t&&this.restoreFromStaleCache(t,e);if(r?.hit)this.activeResolvedData=r.value,this.hasResolved=!0;else this.hasResolved=!1,this.activeResolvedData=void 0;this.pendingBackgroundKey=null}else if(this.activeUrlHref===null&&t){let r=this.restoreFromStaleCache(t,e);if(r.hit)this.activeResolvedData=r.value,this.hasResolved=!0}this.activeUrlHref=e}staleCacheKey(e){return`${this.id}:${e}`}restoreFromStaleCache(e,t){let r=this.staleCacheKey(t);if(!e.has(r))return{hit:!1};let a=e.get(r);return e.delete(r),{hit:!0,value:a}}saveToStaleCache(e,t,r){e.set(this.staleCacheKey(t),r)}}var oY=0;var Yw,sc,ca;var Yf=N(()=>{Yw=j(ae(),1),sc=Yw.createContext(null),ca=Yw.createContext(null)});var rv,Hu;var ov=N(()=>{rv=j(ae(),1);Hu=class Hu extends rv.Component{state={error:null,prevResetKey:void 0};static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){if(t.error&&e.resetKey!==t.prevResetKey)return{error:null,prevResetKey:e.resetKey};if(e.resetKey!==t.prevResetKey)return{prevResetKey:e.resetKey};return null}componentDidCatch(e,t){console.error("Buzola route error:",e,t)}render(){if(this.state.error){if(typeof this.props.fallback==="function")return this.props.fallback(this.state.error);if(this.props.fallback)return this.props.fallback;return rv.default.createElement("div",{style:{color:"red"}},`Route error: ${this.state.error.message}`)}return this.props.children}}});function aY(e){return"~standard"in e}function iY(e){if(aY(e))return{schema:e,paramsMeta:e.__buzolaKeys??[]};let t=e,r=[],a={};for(let[l,c]of Object.entries(t))if(typeof c==="string"){let u=w6(c);a[l]=u.schema,r.push({name:l,optional:u.optional,array:u.array})}else a[l]=c,r.push({name:l,optional:C6(c),array:!1});return{schema:{"~standard":{version:1,vendor:"buzola",validate:(l)=>{let c=l??{},u={};for(let[f,h]of Object.entries(a)){let m=h["~standard"].validate(c[f]);if("issues"in m)return m;u[f]=m.value}return{value:u}}}},paramsMeta:r}}class Jf{pageId;params;__buzolaRedirect=!0;constructor(e,t){this.pageId=e,this.params=t}}function qm(e){if(e.length===0)return;if(e.length===1)return e[0];return async(t)=>{let r=await Promise.all(e.map((i)=>i(t))),a=r.find((i)=>i instanceof Jf);if(a)return a;return Object.assign({},...r)}}function Gm(e,t,r,a,i,l){let c=new Set(t.filter((b)=>b.array).map((b)=>b.name)),u=r?new Ww:void 0;function f(){let b=nr.use(ca);if(!b)throw Error("createPage component must be used within a <BuzolaProvider>");let y=nr.use(sc),v=nr.useMemo(()=>{let{state:G,matches:ee,params:U}=b,P=ee.find((ye)=>ye.node.component===f),re=new Set(P?Km(P.node.fullPath):[]),J={};if(c.size>0)for(let ye of c){if(re.has(ye))continue;let ce=[...G.location.searchParams.getAll(ye),...G.location.searchParams.getAll(`${ye}[]`)];if(ce.length>0)J[ye]=ce}G.location.searchParams.forEach((ye,ce)=>{let se=ce.endsWith("[]")?ce.slice(0,-2):ce;if(!re.has(se)&&!(se in J))J[se]=ye});for(let[ye,ce]of Object.entries(U))if(c.has(ye))J[ye]=ce.split(",");else J[ye]=ce;if(e)return Gw(e,J,"Page params validation failed: ");return J},[b]),[S,w]=nr.useState(0),[,E]=nr.useReducer((G)=>G+1,0),R=nr.useCallback(()=>w((G)=>G+1),[]);nr.useEffect(()=>{if(!y)return;return y.onInvalidate(()=>w((G)=>G+1))},[y]);let D,H=!1,z=!1;if(r&&u){let G=b.state.location.href,ee=`${G}:${S}`,U=u.resolve({currentUrlHref:G,cacheKey:ee,load:()=>r({params:v,redirect:E6}),loaderCache:y?.loaderCache,onBackgroundSettled:(P)=>{if(P.ok){if(P.result instanceof Jf){y?.navigateToPage(P.result.pageId,P.result.params,{replace:!0});return}u.commitBackgroundResult(P.result)}else u.commitBackgroundError();E()}});if(U.action==="render")D=U.data,H=U.isLoading;else{let P=nr.use(U.promise);if(P instanceof Jf)y?.navigateToPage(P.pageId,P.params,{replace:!0}),z=!0;else D=P,u.commitResult(D)}}if(nr.useEffect(()=>()=>u?.dispose(y?.loaderCache),[]),z)return null;return av.jsx(i,{params:v,data:D,invalidate:R,isLoading:H})}function h(){let b=nr.use(ca),[y,v]=nr.useState(0),S=nr.useCallback(()=>v((R)=>R+1),[]),w=`${b?.state.location.href??""}:${y}`;return av.jsx(Hu,{fallback:typeof l==="function"?(R)=>l({error:R,params:b?.params??{},retry:S}):l,resetKey:w,children:av.jsx(f,{},y)})}return{__buzolaPage:!0,component:l?h:f,route:a,paramsSchema:e,paramsMeta:t,loader:r}}function sY(e,t,r,a){return{route(i){return{render(l){return Gm(e,t,qm(r),i,l,a)}}},render(i){return Gm(e,t,qm(r),void 0,i,a)}}}function Jw(e,t,r){return{loader(a){return Jw(e,t,[...r,a])},catch(a){return sY(e,t,r,a)},route(a){return{catch(i){return{render(l){return Gm(e,t,qm(r),a,l,i)}}},render(i){return Gm(e,t,qm(r),a,i)}}},render(a){return Gm(e,t,qm(r),void 0,a)}}}function dr(){return{params(e){let{schema:t,paramsMeta:r}=iY(e);return Jw(t,r,[])},...Jw(void 0,[],[])}}var av,nr,E6=(e,t)=>new Jf(e,t);var T6=N(()=>{tv();Yf();ov();av=j(io(),1),nr=j(ae(),1)});function cY(){return so.default.createElement("div",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem",maxWidth:"600px",margin:"0 auto"}},lY?[so.default.createElement("h1",{key:"h"},"404 — Page Not Found"),so.default.createElement("p",{key:"p1"},`No route matches "${typeof window<"u"?window.location.pathname:""}".`),so.default.createElement("p",{key:"p2",style:{color:"#666",fontSize:"0.9rem"}},"To handle this, add a _404.tsx catch-all route or pass a notFound prop to <Outlet />.")]:[so.default.createElement("h1",{key:"h"},"404"),so.default.createElement("p",{key:"p"},"Page not found.")])}function Xf({fallback:e,errorFallback:t,notFound:r}){let a=so.use(ca);if(!a)throw Error("<Outlet /> must be used within a <BuzolaProvider>");let{state:i,depth:l,matches:c}=a,u=l,f=c[u];while(f&&!f.node.component)u++,f=c[u];let h=so.useMemo(()=>{if(!f)return null;let b={...a.params};for(let y=l;y<=u;y++)if(c[y])b={...b,...c[y].params};return{state:i,depth:u+1,matches:c,params:b}},[i,l,u,c,f,a.params]);if(!f){if(l===0&&c.length===0){if(r===null)return null;return r??so.default.createElement(cY,null)}return null}let m=f.node.component;return Wm.jsx(Hu,{fallback:t,resetKey:f.node.id,children:Wm.jsx(so.Suspense,{fallback:e??null,children:h&&Wm.jsx(ca,{value:h,children:Wm.jsx(m,{})})})})}var Wm,so,lY;var Xw=N(()=>{Yf();ov();Wm=j(io(),1),so=j(ae(),1),lY=typeof process<"u"&&!0});function iv({routes:e,children:t,middleware:r,...a}){let i=Bo.useRef(a.router);if(!i.current)i.current=new ev({routes:e,adapter:qw(),persistentParams:a.persistentParams,pageRegistry:a.pageRegistry});let l=i.current,c=Bo.useCallback((y)=>l.subscribe(y),[l]),u=Bo.useCallback(()=>l.getState(),[l]),f=Bo.useSyncExternalStore(c,u,u);Bo.useLayoutEffect(()=>l.start(),[l]);let h=Bo.useMemo(()=>({state:f,depth:0,matches:f.matches,params:{}}),[f]),m=Bo.useMemo(()=>{let y={};for(let v of f.matches)y={...y,...v.params};return y},[f.matches]),b=t??Ym.jsx(Xf,{});return Ym.jsx(sc,{value:l,children:Ym.jsx(ca,{value:h,children:r?Ym.jsx(r,{params:m,matches:f.matches,children:b}):b})})}var Ym,Bo;var R6=N(()=>{Vw();Yf();Xw();Ym=j(io(),1),Bo=j(ae(),1)});function Jm(){let e=zi.use(sc);if(!e)throw Error("useRouter must be used within a <BuzolaProvider>");return e}function uY(){let e=zi.use(ca);if(!e)throw Error("Route hooks must be used within a <BuzolaProvider>");return e}function Rr(){let e=Jm();return zi.useCallback((t,r)=>{e.navigateToPage(t,r?.params,r)},[e])}function sv(){let e=uY(),t=Jm(),{state:r,matches:a,params:i,depth:l}=e;return zi.useMemo(()=>({params:i,matches:a,depth:l,isPending:r.isPending,pendingLocation:r.pendingLocation?t.stripBasePath(r.pendingLocation.pathname):void 0,pathname:t.stripBasePath(r.location.pathname)}),[i,a,l,r.isPending,r.pendingLocation,r.location.pathname,t])}var zi;var Qw=N(()=>{tv();Yf();zi=j(ae(),1)});var dY,lv;var A6=N(()=>{Qw();dY=j(io(),1),lv=j(ae(),1)});var M6=N(()=>{R6();Xw();A6();ov();Qw();Yf()});var ua=N(()=>{Vw();tv();T6();M6()});var N6=Bi(function(yY){(function(){function e(){if(z=!1,P){var W=yY.unstable_now();ye=W;var Y=!0;try{e:{D=!1,H&&(H=!1,ee(re),re=-1),R=!0;var Z=E;try{t:{l(W);for(w=r(y);w!==null&&!(w.expirationTime>W&&u());){var pe=w.callback;if(typeof pe==="function"){w.callback=null,E=w.priorityLevel;var V=pe(w.expirationTime<=W);if(W=yY.unstable_now(),typeof V==="function"){w.callback=V,l(W),Y=!0;break t}w===r(y)&&a(y),l(W)}else a(y);w=r(y)}if(w!==null)Y=!0;else{var k=r(v);k!==null&&f(c,k.startTime-W),Y=!1}}break e}finally{w=null,E=Z,R=!1}Y=void 0}}finally{Y?ce():P=!1}}}function t(W,Y){var Z=W.length;W.push(Y);e:for(;0<Z;){var pe=Z-1>>>1,V=W[pe];if(0<i(V,Y))W[pe]=Y,W[Z]=V,Z=pe;else break e}}function r(W){return W.length===0?null:W[0]}function a(W){if(W.length===0)return null;var Y=W[0],Z=W.pop();if(Z!==Y){W[0]=Z;e:for(var pe=0,V=W.length,k=V>>>1;pe<k;){var X=2*(pe+1)-1,ve=W[X],$e=X+1,ke=W[$e];if(0>i(ve,Z))$e<V&&0>i(ke,ve)?(W[pe]=ke,W[$e]=Z,pe=$e):(W[pe]=ve,W[X]=Z,pe=X);else if($e<V&&0>i(ke,Z))W[pe]=ke,W[$e]=Z,pe=$e;else break e}}return Y}function i(W,Y){var Z=W.sortIndex-Y.sortIndex;return Z!==0?Z:W.id-Y.id}function l(W){for(var Y=r(v);Y!==null;){if(Y.callback===null)a(v);else if(Y.startTime<=W)a(v),Y.sortIndex=Y.expirationTime,t(y,Y);else break;Y=r(v)}}function c(W){if(H=!1,l(W),!D)if(r(y)!==null)D=!0,P||(P=!0,ce());else{var Y=r(v);Y!==null&&f(c,Y.startTime-W)}}function u(){return z?!0:yY.unstable_now()-ye<J?!1:!0}function f(W,Y){re=G(function(){W(yY.unstable_now())},Y)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),yY.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var h=performance;yY.unstable_now=function(){return h.now()}}else{var m=Date,b=m.now();yY.unstable_now=function(){return m.now()-b}}var y=[],v=[],S=1,w=null,E=3,R=!1,D=!1,H=!1,z=!1,G=typeof setTimeout==="function"?setTimeout:null,ee=typeof clearTimeout==="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null,P=!1,re=-1,J=5,ye=-1;if(typeof U==="function")var ce=function(){U(e)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,_=se.port2;se.port1.onmessage=e,ce=function(){_.postMessage(null)}}else ce=function(){G(e,0)};yY.unstable_IdlePriority=5,yY.unstable_ImmediatePriority=1,yY.unstable_LowPriority=4,yY.unstable_NormalPriority=3,yY.unstable_Profiling=null,yY.unstable_UserBlockingPriority=2,yY.unstable_cancelCallback=function(W){W.callback=null},yY.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"):J=0<W?Math.floor(1000/W):5},yY.unstable_getCurrentPriorityLevel=function(){return E},yY.unstable_next=function(W){switch(E){case 1:case 2:case 3:var Y=3;break;default:Y=E}var Z=E;E=Y;try{return W()}finally{E=Z}},yY.unstable_requestPaint=function(){z=!0},yY.unstable_runWithPriority=function(W,Y){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var Z=E;E=W;try{return Y()}finally{E=Z}},yY.unstable_scheduleCallback=function(W,Y,Z){var pe=yY.unstable_now();switch(typeof Z==="object"&&Z!==null?(Z=Z.delay,Z=typeof Z==="number"&&0<Z?pe+Z:pe):Z=pe,W){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5000}return V=Z+V,W={id:S++,callback:Y,priorityLevel:W,startTime:Z,expirationTime:V,sortIndex:-1},Z>pe?(W.sortIndex=Z,t(v,W),r(y)===null&&W===r(v)&&(H?(ee(re),re=-1):H=!0,f(c,Z-pe))):(W.sortIndex=V,t(y,W),D||R||(D=!0,P||(P=!0,ce()))),W},yY.unstable_shouldYield=u,yY.unstable_wrapCallback=function(W){var Y=E;return function(){var Z=E;E=Y;try{return W.apply(this,arguments)}finally{E=Z}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var O6=Bi(function(vY){var Zw=j(ae());(function(){function e(){}function t(m){return""+m}function r(m,b,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(v);var S=!1}catch(w){S=!0}return S&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&v[Symbol.toStringTag]||v.constructor.name||"Object"),t(v)),{$$typeof:f,key:v==null?null:""+v,children:m,containerInfo:b,implementation:y}}function a(m,b){if(m==="font")return"";if(typeof b==="string")return b==="use-credentials"?b:""}function i(m){return m===null?"`null`":m===void 0?"`undefined`":m===""?"an empty string":'something with type "'+typeof m+'"'}function l(m){return m===null?"`null`":m===void 0?"`undefined`":m===""?"an empty string":typeof m==="string"?JSON.stringify(m):typeof m==="number"?"`"+m+"`":'something with type "'+typeof m+'"'}function c(){var m=h.H;return m===null&&console.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:
19
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
20
+ 2. You might be breaking the Rules of Hooks
21
+ 3. You might have more than one copy of React in the same app
22
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),m}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},f=Symbol.for("react.portal"),h=Zw.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),vY.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,vY.createPortal=function(m,b){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error("Target container is not a DOM element.");return r(m,b,null,y)},vY.flushSync=function(m){var b=h.T,y=u.p;try{if(h.T=null,u.p=2,m)return m()}finally{h.T=b,u.p=y,u.d.f()&&console.error("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.")}},vY.preconnect=function(m,b){typeof m==="string"&&m?b!=null&&typeof b!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",l(b)):b!=null&&typeof b.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",i(b.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m)),typeof m==="string"&&(b?(b=b.crossOrigin,b=typeof b==="string"?b==="use-credentials"?b:"":void 0):b=null,u.d.C(m,b))},vY.prefetchDNS=function(m){if(typeof m!=="string"||!m)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m));else if(1<arguments.length){var b=arguments[1];typeof b==="object"&&b.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",l(b)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",l(b))}typeof m==="string"&&u.d.D(m)},vY.preinit=function(m,b){if(typeof m==="string"&&m?b==null||typeof b!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",l(b)):b.as!=="style"&&b.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',l(b.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(m)),typeof m==="string"&&b&&typeof b.as==="string"){var y=b.as,v=a(y,b.crossOrigin),S=typeof b.integrity==="string"?b.integrity:void 0,w=typeof b.fetchPriority==="string"?b.fetchPriority:void 0;y==="style"?u.d.S(m,typeof b.precedence==="string"?b.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:w}):y==="script"&&u.d.X(m,{crossOrigin:v,integrity:S,fetchPriority:w,nonce:typeof b.nonce==="string"?b.nonce:void 0})}},vY.preinitModule=function(m,b){var y="";if(typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b!==void 0&&typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":b&&("as"in b)&&b.as!=="script"&&(y+=" The `as` option encountered was "+l(b.as)+"."),y)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",y);else switch(y=b&&typeof b.as==="string"?b.as:"script",y){case"script":break;default:y=l(y),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',y,m)}if(typeof m==="string")if(typeof b==="object"&&b!==null){if(b.as==null||b.as==="script")y=a(b.as,b.crossOrigin),u.d.M(m,{crossOrigin:y,integrity:typeof b.integrity==="string"?b.integrity:void 0,nonce:typeof b.nonce==="string"?b.nonce:void 0})}else b==null&&u.d.M(m)},vY.preload=function(m,b){var y="";if(typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b==null||typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":typeof b.as==="string"&&b.as||(y+=" The `as` option encountered was "+i(b.as)+"."),y&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',y),typeof m==="string"&&typeof b==="object"&&b!==null&&typeof b.as==="string"){y=b.as;var v=a(y,b.crossOrigin);u.d.L(m,y,{crossOrigin:v,integrity:typeof b.integrity==="string"?b.integrity:void 0,nonce:typeof b.nonce==="string"?b.nonce:void 0,type:typeof b.type==="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority==="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy==="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet==="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes==="string"?b.imageSizes:void 0,media:typeof b.media==="string"?b.media:void 0})}},vY.preloadModule=function(m,b){var y="";typeof m==="string"&&m||(y+=" The `href` argument encountered was "+i(m)+"."),b!==void 0&&typeof b!=="object"?y+=" The `options` argument encountered was "+i(b)+".":b&&("as"in b)&&typeof b.as!=="string"&&(y+=" The `as` option encountered was "+i(b.as)+"."),y&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',y),typeof m==="string"&&(b?(y=a(b.as,b.crossOrigin),u.d.m(m,{as:typeof b.as==="string"&&b.as!=="script"?b.as:void 0,crossOrigin:y,integrity:typeof b.integrity==="string"?b.integrity:void 0})):u.d.m(m))},vY.requestFormReset=function(m){u.d.r(m)},vY.unstable_batchedUpdates=function(m,b){return m(b)},vY.useFormState=function(m,b,y){return c().useFormState(m,b,y)},vY.useFormStatus=function(){return c().useHostTransitionStatus()},vY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Vr=Bi(function(Mue,D6){var xY=j(O6());D6.exports=xY});var P6=Bi(function($Y){var Nt=j(N6()),Qf=j(ae()),eE=j(Vr());(function(){function e(n,o){for(n=n.memoizedState;n!==null&&0<o;)n=n.next,o--;return n}function t(n,o,s,d){if(s>=o.length)return d;var p=o[s],g=qn(n)?n.slice():ft({},n);return g[p]=t(n[p],o,s+1,d),g}function r(n,o,s){if(o.length!==s.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<s.length-1;d++)if(o[d]!==s[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return a(n,o,s,0)}}function a(n,o,s,d){var p=o[d],g=qn(n)?n.slice():ft({},n);return d+1===o.length?(g[s[d]]=g[p],qn(g)?g.splice(p,1):delete g[p]):g[p]=a(n[p],o,s,d+1),g}function i(n,o,s){var d=o[s],p=qn(n)?n.slice():ft({},n);if(s+1===o.length)return qn(p)?p.splice(d,1):delete p[d],p;return p[d]=i(n[d],o,s+1),p}function l(){return!1}function c(){return null}function u(){console.error("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://react.dev/link/rules-of-hooks")}function f(){console.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().")}function h(){}function m(){}function b(n){var o=[];return n.forEach(function(s){o.push(s)}),o.sort().join(", ")}function y(n,o,s,d){return new NK(n,o,s,d)}function v(n,o){n.context===zl&&(aC(n.current,2,o,n,null,null),of())}function S(n,o){if(Zo!==null){var s=o.staleFamilies;o=o.updatedFamilies,Hh(),E5(n.current,o,s),of()}}function w(n){Zo=n}function E(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function R(n){var o=n,s=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(s=o.return),n=o.return;while(n)}return o.tag===3?s:null}function D(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function H(n){if(n.tag===31){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function z(n){if(R(n)!==n)throw Error("Unable to find node on an unmounted component.")}function G(n){var o=n.alternate;if(!o){if(o=R(n),o===null)throw Error("Unable to find node on an unmounted component.");return o!==n?null:n}for(var s=n,d=o;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){s=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return z(p),n;if(g===d)return z(p),o;g=g.sibling}throw Error("Unable to find node on an unmounted component.")}if(s.return!==d.return)s=p,d=g;else{for(var x=!1,C=p.child;C;){if(C===s){x=!0,s=p,d=g;break}if(C===d){x=!0,d=p,s=g;break}C=C.sibling}if(!x){for(C=g.child;C;){if(C===s){x=!0,s=g,d=p;break}if(C===d){x=!0,d=g,s=p;break}C=C.sibling}if(!x)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(s.alternate!==d)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(s.tag!==3)throw Error("Unable to find node on an unmounted component.");return s.stateNode.current===s?n:o}function ee(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n;for(n=n.child;n!==null;){if(o=ee(n),o!==null)return o;n=n.sibling}return null}function U(n){if(n===null||typeof n!=="object")return null;return n=ON&&n[ON]||n["@@iterator"],typeof n==="function"?n:null}function P(n){if(n==null)return null;if(typeof n==="function")return n.$$typeof===Qq?null:n.displayName||n.name||null;if(typeof n==="string")return n;switch(n){case ff:return"Fragment";case dC:return"Profiler";case G0:return"StrictMode";case pC:return"Suspense";case hC:return"SuspenseList";case mC:return"Activity"}if(typeof n==="object")switch(typeof n.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case df:return"Portal";case Ri:return n.displayName||"Context";case fC:return(n._context.displayName||"Context")+".Consumer";case Jh:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case W0:return o=n.displayName||null,o!==null?o:P(n.type)||"Memo";case Ao:o=n._payload,n=n._init;try{return P(n(o))}catch(s){}}return null}function re(n){return typeof n.tag==="number"?J(n):typeof n.name==="string"?n.name:null}function J(n){var o=n.type;switch(n.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(o._context.displayName||"Context")+".Consumer";case 10:return o.displayName||"Context";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(o);case 8:return o===G0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof o==="function")return o.displayName||o.name||null;if(typeof o==="string")return o;break;case 29:if(o=n._debugInfo,o!=null){for(var s=o.length-1;0<=s;s--)if(typeof o[s].name==="string")return o[s].name}if(n.return!==null)return J(n.return)}return null}function ye(n){return{current:n}}function ce(n,o){0>gs?console.error("Unexpected pop."):(o!==bC[gs]&&console.error("Unexpected Fiber popped."),n.current=gC[gs],gC[gs]=null,bC[gs]=null,gs--)}function se(n,o,s){gs++,gC[gs]=n.current,bC[gs]=s,n.current=o}function _(n){return n===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),n}function W(n,o){se(Dl,o,n),se(Xh,n,n),se(Ol,null,n);var s=o.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",o=(o=o.documentElement)?(o=o.namespaceURI)?nN(o):Ms:Ms;break;default:if(s=o.tagName,o=o.namespaceURI)o=nN(o),o=rN(o,s);else switch(s){case"svg":o=qf;break;case"math":o=qy;break;default:o=Ms}}s=s.toLowerCase(),s=Jk(null,s),s={context:o,ancestorInfo:s},ce(Ol,n),se(Ol,s,n)}function Y(n){ce(Ol,n),ce(Xh,n),ce(Dl,n)}function Z(){return _(Ol.current)}function pe(n){n.memoizedState!==null&&se(Y0,n,n);var o=_(Ol.current),s=n.type,d=rN(o.context,s);s=Jk(o.ancestorInfo,s),d={context:d,ancestorInfo:s},o!==d&&(se(Xh,n,n),se(Ol,d,n))}function V(n){Xh.current===n&&(ce(Ol,n),ce(Xh,n)),Y0.current===n&&(ce(Y0,n),Fm._currentValue=Bu)}function k(){}function X(){if(Qh===0){DN=console.log,PN=console.info,LN=console.warn,_N=console.error,IN=console.group,BN=console.groupCollapsed,zN=console.groupEnd;var n={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}Qh++}function ve(){if(Qh--,Qh===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ft({},n,{value:DN}),info:ft({},n,{value:PN}),warn:ft({},n,{value:LN}),error:ft({},n,{value:_N}),group:ft({},n,{value:IN}),groupCollapsed:ft({},n,{value:BN}),groupEnd:ft({},n,{value:zN})})}0>Qh&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function $e(n){var o=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,n=n.stack,Error.prepareStackTrace=o,n.startsWith(`Error: react-stack-top-frame
23
+ `)&&(n=n.slice(29)),o=n.indexOf(`
24
+ `),o!==-1&&(n=n.slice(o+1)),o=n.indexOf("react_stack_bottom_frame"),o!==-1&&(o=n.lastIndexOf(`
25
+ `,o)),o!==-1)n=n.slice(0,o);else return"";return n}function ke(n){if(yC===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);yC=o&&o[1]||"",HN=-1<s.stack.indexOf(`
26
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
27
+ `+yC+n+HN}function He(n,o){if(!n||vC)return"";var s=xC.get(n);if(s!==void 0)return s;vC=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var d=null;d=oe.H,oe.H=null,X();try{var p={DetermineComponentFrameRoot:function(){try{if(o){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(xe){var te=xe}Reflect.construct(n,[],I)}else{try{I.call()}catch(xe){te=xe}n.call(I.prototype)}}else{try{throw Error()}catch(xe){te=xe}(I=n())&&typeof I.catch==="function"&&I.catch(function(){})}}catch(xe){if(xe&&te&&typeof xe.stack==="string")return[xe.stack,te.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=p.DetermineComponentFrameRoot(),C=x[0],T=x[1];if(C&&T){var A=C.split(`
28
+ `),K=T.split(`
29
+ `);for(x=g=0;g<A.length&&!A[g].includes("DetermineComponentFrameRoot");)g++;for(;x<K.length&&!K[x].includes("DetermineComponentFrameRoot");)x++;if(g===A.length||x===K.length)for(g=A.length-1,x=K.length-1;1<=g&&0<=x&&A[g]!==K[x];)x--;for(;1<=g&&0<=x;g--,x--)if(A[g]!==K[x]){if(g!==1||x!==1)do if(g--,x--,0>x||A[g]!==K[x]){var q=`
30
+ `+A[g].replace(" at new "," at ");return n.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",n.displayName)),typeof n==="function"&&xC.set(n,q),q}while(1<=g&&0<=x);break}}}finally{vC=!1,oe.H=d,ve(),Error.prepareStackTrace=s}return A=(A=n?n.displayName||n.name:"")?ke(A):"",typeof n==="function"&&xC.set(n,A),A}function Ee(n,o){switch(n.tag){case 26:case 27:case 5:return ke(n.type);case 16:return ke("Lazy");case 13:return n.child!==o&&o!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return He(n.type,!1);case 11:return He(n.type.render,!1);case 1:return He(n.type,!0);case 31:return ke("Activity");default:return""}}function Ze(n){try{var o="",s=null;do{o+=Ee(n,s);var d=n._debugInfo;if(d)for(var p=d.length-1;0<=p;p--){var g=d[p];if(typeof g.name==="string"){var x=o;e:{var{name:C,env:T,debugLocation:A}=g;if(A!=null){var K=$e(A),q=K.lastIndexOf(`
31
+ `),I=q===-1?K:K.slice(q+1);if(I.indexOf(C)!==-1){var te=`
32
+ `+I;break e}}te=ke(C+(T?" ["+T+"]":""))}o=x+te}}s=n,n=n.return}while(n);return o}catch(xe){return`
33
+ Error generating stack: `+xe.message+`
34
+ `+xe.stack}}function fe(n){return(n=n?n.displayName||n.name:"")?ke(n):""}function Oe(){if(Mo===null)return null;var n=Mo._debugOwner;return n!=null?re(n):null}function Rt(){if(Mo===null)return"";var n=Mo;try{var o="";switch(n.tag===6&&(n=n.return),n.tag){case 26:case 27:case 5:o+=ke(n.type);break;case 13:o+=ke("Suspense");break;case 19:o+=ke("SuspenseList");break;case 31:o+=ke("Activity");break;case 30:case 0:case 15:case 1:n._debugOwner||o!==""||(o+=fe(n.type));break;case 11:n._debugOwner||o!==""||(o+=fe(n.type.render))}for(;n;)if(typeof n.tag==="number"){var s=n;n=s._debugOwner;var d=s._debugStack;if(n&&d){var p=$e(d);p!==""&&(o+=`
35
+ `+p)}}else if(n.debugStack!=null){var g=n.debugStack;(n=n.owner)&&g&&(o+=`
36
+ `+$e(g))}else break;var x=o}catch(C){x=`
37
+ Error generating stack: `+C.message+`
38
+ `+C.stack}return x}function he(n,o,s,d,p,g,x){var C=Mo;ln(n);try{return n!==null&&n._debugTask?n._debugTask.run(o.bind(null,s,d,p,g,x)):o(s,d,p,g,x)}finally{ln(C)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ln(n){oe.getCurrentStack=n===null?null:Rt,ki=!1,Mo=n}function Dn(n){return typeof Symbol==="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object"}function Rn(n){try{return tn(n),!1}catch(o){return!0}}function tn(n){return""+n}function Ie(n,o){if(Rn(n))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",o,Dn(n)),tn(n)}function Qr(n,o){if(Rn(n))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",o,Dn(n)),tn(n)}function it(n){if(Rn(n))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Dn(n)),tn(n)}function Vd(n){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled)return!0;if(!o.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{hf=o.inject(n),Er=o}catch(s){console.error("React instrumentation encountered an error: %o.",s)}return o.checkDCE?!0:!1}function qt(n){if(typeof aG==="function"&&iG(n),Er&&typeof Er.setStrictMode==="function")try{Er.setStrictMode(hf,n)}catch(o){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",o))}}function Ib(n){return n>>>=0,n===0?32:31-(sG(n)/lG|0)|0}function ci(n){var o=n&42;if(o!==0)return o;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),n}}function Yc(n,o,s){var d=n.pendingLanes;if(d===0)return 0;var p=0,g=n.suspendedLanes,x=n.pingedLanes;n=n.warmLanes;var C=d&134217727;return C!==0?(d=C&~g,d!==0?p=ci(d):(x&=C,x!==0?p=ci(x):s||(s=C&~n,s!==0&&(p=ci(s))))):(C=d&~g,C!==0?p=ci(C):x!==0?p=ci(x):s||(s=d&~n,s!==0&&(p=ci(s)))),p===0?0:o!==0&&o!==p&&(o&g)===0&&(g=p&-p,s=o&-o,g>=s||g===32&&(s&4194048)!==0)?o:p}function Jc(n,o){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&o)===0}function a2(n,o){switch(n){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function jd(){var n=Q0;return Q0<<=1,(Q0&62914560)===0&&(Q0=4194304),n}function Kd(n){for(var o=[],s=0;31>s;s++)o.push(n);return o}function bl(n,o){n.pendingLanes|=o,o!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Bb(n,o,s,d,p,g){var x=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var{entanglements:C,expirationTimes:T,hiddenUpdates:A}=n;for(s=x&~s;0<s;){var K=31-Lr(s),q=1<<K;C[K]=0,T[K]=-1;var I=A[K];if(I!==null)for(A[K]=null,K=0;K<I.length;K++){var te=I[K];te!==null&&(te.lane&=-536870913)}s&=~q}d!==0&&Xc(n,d,0),g!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=g&~(x&~o))}function Xc(n,o,s){n.pendingLanes|=o,n.suspendedLanes&=~o;var d=31-Lr(o);n.entangledLanes|=o,n.entanglements[d]=n.entanglements[d]|1073741824|s&261930}function Qc(n,o){var s=n.entangledLanes|=o;for(n=n.entanglements;s;){var d=31-Lr(s),p=1<<d;p&o|n[d]&o&&(n[d]|=o),s&=~p}}function Zc(n,o){var s=o&-o;return s=(s&42)!==0?1:eu(s),(s&(n.suspendedLanes|o))!==0?0:s}function eu(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function ph(n,o,s){if(Mi)for(n=n.pendingUpdatersLaneMap;0<s;){var d=31-Lr(s),p=1<<d;n[d].add(o),s&=~p}}function yl(n,o){if(Mi)for(var{pendingUpdatersLaneMap:s,memoizedUpdaters:d}=n;0<o;){var p=31-Lr(o);n=1<<p,p=s[p],0<p.size&&(p.forEach(function(g){var x=g.alternate;x!==null&&d.has(x)||d.add(g)}),p.clear()),o&=~n}}function M(n){return n&=-n,No!==0&&No<n?Ba!==0&&Ba<n?(n&134217727)!==0?Ni:Z0:Ba:No}function Q(){var n=It.p;if(n!==0)return n;return n=window.event,n===void 0?Ni:EN(n.type)}function me(n,o){var s=It.p;try{return It.p=n,o()}finally{It.p=s}}function Ce(n){delete n[cr],delete n[_r],delete n[EC],delete n[cG],delete n[uG]}function _e(n){var o=n[cr];if(o)return o;for(var s=n.parentNode;s;){if(o=s[Ll]||s[cr]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=dN(n);n!==null;){if(s=n[cr])return s;n=dN(n)}return o}n=s,s=n.parentNode}return null}function et(n){if(n=n[cr]||n[Ll]){var o=n.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return n}return null}function tt(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Mt(n){var o=n[UN];return o||(o=n[UN]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function je(n){n[Zh]=!0}function Cr(n,o){xo(n,o),xo(n+"Capture",o)}function xo(n,o){gu[n]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",n),gu[n]=o;var s=n.toLowerCase();TC[s]=n,n==="onDoubleClick"&&(TC.ondblclick=n);for(n=0;n<o.length;n++)FN.add(o[n])}function vl(n,o){dG[o.type]||o.onChange||o.onInput||o.readOnly||o.disabled||o.value==null||(n==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),o.onChange||o.readOnly||o.disabled||o.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function hh(n){if(Ia.call(jN,n))return!0;if(Ia.call(VN,n))return!1;if(fG.test(n))return jN[n]=!0;return VN[n]=!0,console.error("Invalid attribute name: `%s`",n),!1}function Lk(n,o,s){if(hh(o)){if(!n.hasAttribute(o)){switch(typeof s){case"symbol":case"object":return s;case"function":return s;case"boolean":if(s===!1)return s}return s===void 0?void 0:null}if(n=n.getAttribute(o),n===""&&s===!0)return!0;return Ie(s,o),n===""+s?s:n}}function zb(n,o,s){if(hh(o))if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){n.removeAttribute(o);return}}Ie(s,o),n.setAttribute(o,""+s)}}function Hb(n,o,s){if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}Ie(s,o),n.setAttribute(o,""+s)}}function ss(n,o,s,d){if(d===null)n.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}Ie(d,s),n.setAttributeNS(o,s,""+d)}}function Wo(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return it(n),n;default:return""}}function _k(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function lK(n,o,s){var d=Object.getOwnPropertyDescriptor(n.constructor.prototype,o);if(!n.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get==="function"&&typeof d.set==="function"){var{get:p,set:g}=d;return Object.defineProperty(n,o,{configurable:!0,get:function(){return p.call(this)},set:function(x){it(x),s=""+x,g.call(this,x)}}),Object.defineProperty(n,o,{enumerable:d.enumerable}),{getValue:function(){return s},setValue:function(x){it(x),s=""+x},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function i2(n){if(!n._valueTracker){var o=_k(n)?"checked":"value";n._valueTracker=lK(n,o,""+n[o])}}function Ik(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),d="";return n&&(d=_k(n)?n.checked?"true":"false":n.value),n=d,n!==s?(o.setValue(n),!0):!1}function Ub(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch(o){return n.body}}function Yo(n){return n.replace(pG,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Bk(n,o){o.checked===void 0||o.defaultChecked===void 0||qN||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Oe()||"A component",o.type),qN=!0),o.value===void 0||o.defaultValue===void 0||KN||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Oe()||"A component",o.type),KN=!0)}function s2(n,o,s,d,p,g,x,C){if(n.name="",x!=null&&typeof x!=="function"&&typeof x!=="symbol"&&typeof x!=="boolean"?(Ie(x,"type"),n.type=x):n.removeAttribute("type"),o!=null)if(x==="number"){if(o===0&&n.value===""||n.value!=o)n.value=""+Wo(o)}else n.value!==""+Wo(o)&&(n.value=""+Wo(o));else x!=="submit"&&x!=="reset"||n.removeAttribute("value");o!=null?l2(n,x,Wo(o)):s!=null?l2(n,x,Wo(s)):d!=null&&n.removeAttribute("value"),p==null&&g!=null&&(n.defaultChecked=!!g),p!=null&&(n.checked=p&&typeof p!=="function"&&typeof p!=="symbol"),C!=null&&typeof C!=="function"&&typeof C!=="symbol"&&typeof C!=="boolean"?(Ie(C,"name"),n.name=""+Wo(C)):n.removeAttribute("name")}function zk(n,o,s,d,p,g,x,C){if(g!=null&&typeof g!=="function"&&typeof g!=="symbol"&&typeof g!=="boolean"&&(Ie(g,"type"),n.type=g),o!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||o!==void 0&&o!==null)){i2(n);return}s=s!=null?""+Wo(s):"",o=o!=null?""+Wo(o):s,C||o===n.value||(n.value=o),n.defaultValue=o}d=d!=null?d:p,d=typeof d!=="function"&&typeof d!=="symbol"&&!!d,n.checked=C?n.checked:!!d,n.defaultChecked=!!d,x!=null&&typeof x!=="function"&&typeof x!=="symbol"&&typeof x!=="boolean"&&(Ie(x,"name"),n.name=x),i2(n)}function l2(n,o,s){o==="number"&&Ub(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function Hk(n,o){o.value==null&&(typeof o.children==="object"&&o.children!==null?Qf.Children.forEach(o.children,function(s){s==null||typeof s==="string"||typeof s==="number"||typeof s==="bigint"||WN||(WN=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):o.dangerouslySetInnerHTML==null||YN||(YN=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),o.selected==null||GN||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),GN=!0)}function Uk(){var n=Oe();return n?`
39
+
40
+ Check the render method of \``+n+"`.":""}function qd(n,o,s,d){if(n=n.options,o){o={};for(var p=0;p<s.length;p++)o["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=o.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&d&&(n[s].defaultSelected=!0)}else{s=""+Wo(s),o=null;for(p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,d&&(n[p].defaultSelected=!0);return}o!==null||n[p].disabled||(o=n[p])}o!==null&&(o.selected=!0)}}function Fk(n,o){for(n=0;n<XN.length;n++){var s=XN[n];if(o[s]!=null){var d=qn(o[s]);o.multiple&&!d?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,Uk()):!o.multiple&&d&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,Uk())}}o.value===void 0||o.defaultValue===void 0||JN||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),JN=!0)}function Vk(n,o){o.value===void 0||o.defaultValue===void 0||QN||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Oe()||"A component"),QN=!0),o.children!=null&&o.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function jk(n,o,s){if(o!=null&&(o=""+Wo(o),o!==n.value&&(n.value=o),s==null)){n.defaultValue!==o&&(n.defaultValue=o);return}n.defaultValue=s!=null?""+Wo(s):""}function Kk(n,o,s,d){if(o==null){if(d!=null){if(s!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(qn(d)){if(1<d.length)throw Error("<textarea> can only have at most one child.");d=d[0]}s=d}s==null&&(s=""),o=s}s=Wo(o),n.defaultValue=s,d=n.textContent,d===s&&d!==""&&d!==null&&(n.value=d),i2(n)}function qk(n,o){return n.serverProps===void 0&&n.serverTail.length===0&&n.children.length===1&&3<n.distanceFromLeaf&&n.distanceFromLeaf>15-o?qk(n.children[0],o):n}function $o(n){return" "+" ".repeat(n)}function Gd(n){return"+ "+" ".repeat(n)}function tu(n){return"- "+" ".repeat(n)}function Gk(n){switch(n.tag){case 26:case 27:case 5:return n.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return n=n.type,n.displayName||n.name||null;case 11:return n=n.type.render,n.displayName||n.name||null;case 1:return n=n.type,n.displayName||n.name||null;default:return null}}function mh(n,o){return ZN.test(n)?(n=JSON.stringify(n),n.length>o-2?8>o?'{"..."}':"{"+n.slice(0,o-7)+'..."}':"{"+n+"}"):n.length>o?5>o?'{"..."}':n.slice(0,o-3)+"...":n}function Fb(n,o,s){var d=120-2*s;if(o===null)return Gd(s)+mh(n,d)+`
41
+ `;if(typeof o==="string"){for(var p=0;p<o.length&&p<n.length&&o.charCodeAt(p)===n.charCodeAt(p);p++);return p>d-8&&10<p&&(n="..."+n.slice(p-8),o="..."+o.slice(p-8)),Gd(s)+mh(n,d)+`
42
+ `+tu(s)+mh(o,d)+`
43
+ `}return $o(s)+mh(n,d)+`
44
+ `}function c2(n){return Object.prototype.toString.call(n).replace(/^\[object (.*)\]$/,function(o,s){return s})}function gh(n,o){switch(typeof n){case"string":return n=JSON.stringify(n),n.length>o?5>o?'"..."':n.slice(0,o-4)+'..."':n;case"object":if(n===null)return"null";if(qn(n))return"[...]";if(n.$$typeof===Ti)return(o=P(n.type))?"<"+o+">":"<...>";var s=c2(n);if(s==="Object"){s="",o-=2;for(var d in n)if(n.hasOwnProperty(d)){var p=JSON.stringify(d);if(p!=='"'+d+'"'&&(d=p),o-=d.length-2,p=gh(n[d],15>o?o:15),o-=p.length,0>o){s+=s===""?"...":", ...";break}s+=(s===""?"":",")+d+":"+p}return"{"+s+"}"}return s;case"function":return(o=n.displayName||n.name)?"function "+o:"function";default:return String(n)}}function Wd(n,o){return typeof n!=="string"||ZN.test(n)?"{"+gh(n,o-2)+"}":n.length>o-2?5>o?'"..."':'"'+n.slice(0,o-5)+'..."':'"'+n+'"'}function u2(n,o,s){var d=120-s.length-n.length,p=[],g;for(g in o)if(o.hasOwnProperty(g)&&g!=="children"){var x=Wd(o[g],120-s.length-g.length-1);d-=g.length+x.length+2,p.push(g+"="+x)}return p.length===0?s+"<"+n+`>
45
+ `:0<d?s+"<"+n+" "+p.join(" ")+`>
46
+ `:s+"<"+n+`
47
+ `+s+" "+p.join(`
48
+ `+s+" ")+`
49
+ `+s+`>
50
+ `}function cK(n,o,s){var d="",p=ft({},o),g;for(g in n)if(n.hasOwnProperty(g)){delete p[g];var x=120-2*s-g.length-2,C=gh(n[g],x);o.hasOwnProperty(g)?(x=gh(o[g],x),d+=Gd(s)+g+": "+C+`
51
+ `,d+=tu(s)+g+": "+x+`
52
+ `):d+=Gd(s)+g+": "+C+`
53
+ `}for(var T in p)p.hasOwnProperty(T)&&(n=gh(p[T],120-2*s-T.length-2),d+=tu(s)+T+": "+n+`
54
+ `);return d}function uK(n,o,s,d){var p="",g=new Map;for(A in s)s.hasOwnProperty(A)&&g.set(A.toLowerCase(),A);if(g.size===1&&g.has("children"))p+=u2(n,o,$o(d));else{for(var x in o)if(o.hasOwnProperty(x)&&x!=="children"){var C=120-2*(d+1)-x.length-1,T=g.get(x.toLowerCase());if(T!==void 0){g.delete(x.toLowerCase());var A=o[x];T=s[T];var K=Wd(A,C);C=Wd(T,C),typeof A==="object"&&A!==null&&typeof T==="object"&&T!==null&&c2(A)==="Object"&&c2(T)==="Object"&&(2<Object.keys(A).length||2<Object.keys(T).length||-1<K.indexOf("...")||-1<C.indexOf("..."))?p+=$o(d+1)+x+`={{
55
+ `+cK(A,T,d+2)+$o(d+1)+`}}
56
+ `:(p+=Gd(d+1)+x+"="+K+`
57
+ `,p+=tu(d+1)+x+"="+C+`
58
+ `)}else p+=$o(d+1)+x+"="+Wd(o[x],C)+`
59
+ `}g.forEach(function(q){if(q!=="children"){var I=120-2*(d+1)-q.length-1;p+=tu(d+1)+q+"="+Wd(s[q],I)+`
60
+ `}}),p=p===""?$o(d)+"<"+n+`>
61
+ `:$o(d)+"<"+n+`
62
+ `+p+$o(d)+`>
63
+ `}if(n=s.children,o=o.children,typeof n==="string"||typeof n==="number"||typeof n==="bigint"){if(g="",typeof o==="string"||typeof o==="number"||typeof o==="bigint")g=""+o;p+=Fb(g,""+n,d+1)}else if(typeof o==="string"||typeof o==="number"||typeof o==="bigint")p=n==null?p+Fb(""+o,null,d+1):p+Fb(""+o,void 0,d+1);return p}function Wk(n,o){var s=Gk(n);if(s===null){s="";for(n=n.child;n;)s+=Wk(n,o),n=n.sibling;return s}return $o(o)+"<"+s+`>
64
+ `}function d2(n,o){var s=qk(n,o);if(s!==n&&(n.children.length!==1||n.children[0]!==s))return $o(o)+`...
65
+ `+d2(s,o+1);s="";var d=n.fiber._debugInfo;if(d)for(var p=0;p<d.length;p++){var g=d[p].name;typeof g==="string"&&(s+=$o(o)+"<"+g+`>
66
+ `,o++)}if(d="",p=n.fiber.pendingProps,n.fiber.tag===6)d=Fb(p,n.serverProps,o),o++;else if(g=Gk(n.fiber),g!==null)if(n.serverProps===void 0){d=o;var x=120-2*d-g.length-2,C="";for(A in p)if(p.hasOwnProperty(A)&&A!=="children"){var T=Wd(p[A],15);if(x-=A.length+T.length+2,0>x){C+=" ...";break}C+=" "+A+"="+T}d=$o(d)+"<"+g+C+`>
67
+ `,o++}else n.serverProps===null?(d=u2(g,p,Gd(o)),o++):typeof n.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(d=uK(g,p,n.serverProps,o),o++);var A="";p=n.fiber.child;for(g=0;p&&g<n.children.length;)x=n.children[g],x.fiber===p?(A+=d2(x,o),g++):A+=Wk(p,o),p=p.sibling;p&&0<n.children.length&&(A+=$o(o)+`...
68
+ `),p=n.serverTail,n.serverProps===null&&o--;for(n=0;n<p.length;n++)g=p[n],A=typeof g==="string"?A+(tu(o)+mh(g,120-2*o)+`
69
+ `):A+u2(g.type,g.props,tu(o));return s+d+A}function f2(n){try{return`
70
+
71
+ `+d2(n,0)}catch(o){return""}}function Yk(n,o,s){for(var d=o,p=null,g=0;d;)d===n&&(g=0),p={fiber:d,children:p!==null?[p]:[],serverProps:d===o?s:d===n?null:void 0,serverTail:[],distanceFromLeaf:g},g++,d=d.return;return p!==null?f2(p).replaceAll(/^[+-]/gm,">"):""}function Jk(n,o){var s=ft({},n||t8),d={tag:o};if(e8.indexOf(o)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),mG.indexOf(o)!==-1&&(s.pTagInButtonScope=null),hG.indexOf(o)!==-1&&o!=="address"&&o!=="div"&&o!=="p"&&(s.listItemTagAutoclosing=null,s.dlItemTagAutoclosing=null),s.current=d,o==="form"&&(s.formTag=d),o==="a"&&(s.aTagInScope=d),o==="button"&&(s.buttonTagInScope=d),o==="nobr"&&(s.nobrTagInScope=d),o==="p"&&(s.pTagInButtonScope=d),o==="li"&&(s.listItemTagAutoclosing=d),o==="dd"||o==="dt")s.dlItemTagAutoclosing=d;return o==="#document"||o==="html"?s.containerTagInScope=null:s.containerTagInScope||(s.containerTagInScope=d),n!==null||o!=="#document"&&o!=="html"&&o!=="body"?s.implicitRootScope===!0&&(s.implicitRootScope=!1):s.implicitRootScope=!0,s}function Xk(n,o,s){switch(o){case"select":return n==="hr"||n==="option"||n==="optgroup"||n==="script"||n==="template"||n==="#text";case"optgroup":return n==="option"||n==="#text";case"option":return n==="#text";case"tr":return n==="th"||n==="td"||n==="style"||n==="script"||n==="template";case"tbody":case"thead":case"tfoot":return n==="tr"||n==="style"||n==="script"||n==="template";case"colgroup":return n==="col"||n==="template";case"table":return n==="caption"||n==="colgroup"||n==="tbody"||n==="tfoot"||n==="thead"||n==="style"||n==="script"||n==="template";case"head":return n==="base"||n==="basefont"||n==="bgsound"||n==="link"||n==="meta"||n==="title"||n==="noscript"||n==="noframes"||n==="style"||n==="script"||n==="template";case"html":if(s)break;return n==="head"||n==="body"||n==="frameset";case"frameset":return n==="frame";case"#document":if(!s)return n==="html"}switch(n){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o!=="h1"&&o!=="h2"&&o!=="h3"&&o!=="h4"&&o!=="h5"&&o!=="h6";case"rp":case"rt":return gG.indexOf(o)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return o==null;case"head":return s||o===null;case"html":return s&&o==="#document"||o===null;case"body":return s&&(o==="#document"||o==="html")||o===null}return!0}function dK(n,o){switch(n){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return o.pTagInButtonScope;case"form":return o.formTag||o.pTagInButtonScope;case"li":return o.listItemTagAutoclosing;case"dd":case"dt":return o.dlItemTagAutoclosing;case"button":return o.buttonTagInScope;case"a":return o.aTagInScope;case"nobr":return o.nobrTagInScope}return null}function Qk(n,o){for(;n;){switch(n.tag){case 5:case 26:case 27:if(n.type===o)return n}n=n.return}return null}function p2(n,o){o=o||t8;var s=o.current;if(o=(s=Xk(n,s&&s.tag,o.implicitRootScope)?null:s)?null:dK(n,o),o=s||o,!o)return!0;var d=o.tag;if(o=String(!!s)+"|"+n+"|"+d,ey[o])return!1;ey[o]=!0;var p=(o=Mo)?Qk(o.return,d):null,g=o!==null&&p!==null?Yk(p,o,null):"",x="<"+n+">";return s?(s="",d==="table"&&n==="tr"&&(s+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
72
+ This will cause a hydration error.%s`,x,d,s,g)):console.error(`In HTML, %s cannot be a descendant of <%s>.
73
+ This will cause a hydration error.%s`,x,d,g),o&&(n=o.return,p===null||n===null||p===n&&n._debugOwner===o._debugOwner||he(p,function(){console.error(`<%s> cannot contain a nested %s.
74
+ See this log for the ancestor stack trace.`,d,x)})),!1}function Vb(n,o,s){if(s||Xk("#text",o,!1))return!0;if(s="#text|"+o,ey[s])return!1;ey[s]=!0;var d=(s=Mo)?Qk(s,o):null;return s=s!==null&&d!==null?Yk(d,s,s.tag!==6?{children:null}:null):"",/\S/.test(n)?console.error(`In HTML, text nodes cannot be a child of <%s>.
75
+ This will cause a hydration error.%s`,o,s):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
76
+ This will cause a hydration error.%s`,o,s),!1}function bh(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}function fK(n){return n.replace(vG,function(o,s){return s.toUpperCase()})}function Zk(n,o,s){var d=o.indexOf("--")===0;d||(-1<o.indexOf("-")?mf.hasOwnProperty(o)&&mf[o]||(mf[o]=!0,console.error("Unsupported style property %s. Did you mean %s?",o,fK(o.replace(yG,"ms-")))):bG.test(o)?mf.hasOwnProperty(o)&&mf[o]||(mf[o]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",o,o.charAt(0).toUpperCase()+o.slice(1))):!o8.test(s)||kC.hasOwnProperty(s)&&kC[s]||(kC[s]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,o,s.replace(o8,""))),typeof s==="number"&&(isNaN(s)?a8||(a8=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",o)):isFinite(s)||i8||(i8=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",o)))),s==null||typeof s==="boolean"||s===""?d?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="":d?n.setProperty(o,s):typeof s!=="number"||s===0||s8.has(o)?o==="float"?n.cssFloat=s:(Qr(s,o),n[o]=(""+s).trim()):n[o]=s+"px"}function e5(n,o,s){if(o!=null&&typeof o!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(o&&Object.freeze(o),n=n.style,s!=null){if(o){var d={};if(s){for(var p in s)if(s.hasOwnProperty(p)&&!o.hasOwnProperty(p))for(var g=RC[p]||[p],x=0;x<g.length;x++)d[g[x]]=p}for(var C in o)if(o.hasOwnProperty(C)&&(!s||s[C]!==o[C]))for(p=RC[C]||[C],g=0;g<p.length;g++)d[p[g]]=C;C={};for(var T in o)for(p=RC[T]||[T],g=0;g<p.length;g++)C[p[g]]=T;T={};for(var A in d)if(p=d[A],(g=C[A])&&p!==g&&(x=p+","+g,!T[x])){T[x]=!0,x=console;var K=o[p];x.error.call(x,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",K==null||typeof K==="boolean"||K===""?"Removing":"Updating",p,g)}}for(var q in s)!s.hasOwnProperty(q)||o!=null&&o.hasOwnProperty(q)||(q.indexOf("--")===0?n.setProperty(q,""):q==="float"?n.cssFloat="":n[q]="");for(var I in o)A=o[I],o.hasOwnProperty(I)&&s[I]!==A&&Zk(n,I,A)}else for(d in o)o.hasOwnProperty(d)&&Zk(n,d,o[d])}function yh(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function t5(n){return xG.get(n)||n}function pK(n,o){if(Ia.call(bf,o)&&bf[o])return!0;if(SG.test(o)){if(n="aria-"+o.slice(4).toLowerCase(),n=l8.hasOwnProperty(n)?n:null,n==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",o),bf[o]=!0;if(o!==n)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",o,n),bf[o]=!0}if($G.test(o)){if(n=o.toLowerCase(),n=l8.hasOwnProperty(n)?n:null,n==null)return bf[o]=!0,!1;o!==n&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",o,n),bf[o]=!0)}return!0}function hK(n,o){var s=[],d;for(d in o)pK(n,d)||s.push(d);o=s.map(function(p){return"`"+p+"`"}).join(", "),s.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,n):1<s.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",o,n)}function mK(n,o,s,d){if(Ia.call(Ir,o)&&Ir[o])return!0;var p=o.toLowerCase();if(p==="onfocusin"||p==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Ir[o]=!0;if(typeof s==="function"&&(n==="form"&&o==="action"||n==="input"&&o==="formAction"||n==="button"&&o==="formAction"))return!0;if(d!=null){if(n=d.possibleRegistrationNames,d.registrationNameDependencies.hasOwnProperty(o))return!0;if(d=n.hasOwnProperty(p)?n[p]:null,d!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",o,d),Ir[o]=!0;if(u8.test(o))return console.error("Unknown event handler property `%s`. It will be ignored.",o),Ir[o]=!0}else if(u8.test(o))return CG.test(o)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",o),Ir[o]=!0;if(wG.test(o)||EG.test(o))return!0;if(p==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Ir[o]=!0;if(p==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Ir[o]=!0;if(p==="is"&&s!==null&&s!==void 0&&typeof s!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof s),Ir[o]=!0;if(typeof s==="number"&&isNaN(s))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",o),Ir[o]=!0;if(ny.hasOwnProperty(p)){if(p=ny[p],p!==o)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",o,p),Ir[o]=!0}else if(o!==p)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",o,p),Ir[o]=!0;switch(o){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof s){case"boolean":switch(o){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:if(p=o.toLowerCase().slice(0,5),p==="data-"||p==="aria-")return!0;return s?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',s,o,o,s,o):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',s,o,o,s,o,o,o),Ir[o]=!0}case"function":case"symbol":return Ir[o]=!0,!1;case"string":if(s==="false"||s==="true"){switch(o){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",s,o,s==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',o,s),Ir[o]=!0}}return!0}function gK(n,o,s){var d=[],p;for(p in o)mK(n,p,o[p],s)||d.push(p);o=d.map(function(g){return"`"+g+"`"}).join(", "),d.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",o,n):1<d.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",o,n)}function vh(n){return TG.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ls(){}function h2(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}function n5(n){var o=et(n);if(o&&(n=o.stateNode)){var s=n[_r]||null;e:switch(n=o.stateNode,o.type){case"input":if(s2(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),o=s.name,s.type==="radio"&&o!=null){for(s=n;s.parentNode;)s=s.parentNode;Ie(o,"name"),s=s.querySelectorAll('input[name="'+Yo(""+o)+'"][type="radio"]');for(o=0;o<s.length;o++){var d=s[o];if(d!==n&&d.form===n.form){var p=d[_r]||null;if(!p)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");s2(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<s.length;o++)d=s[o],d.form===n.form&&Ik(d)}break e;case"textarea":jk(n,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&qd(n,!!s.multiple,o,!1)}}}function r5(n,o,s){if(AC)return n(o,s);AC=!0;try{var d=n(o);return d}finally{if(AC=!1,yf!==null||vf!==null){if(of(),yf&&(o=yf,n=vf,vf=yf=null,n5(o),n))for(o=0;o<n.length;o++)n5(n[o])}}}function xh(n,o){var s=n.stateNode;if(s===null)return null;var d=s[_r]||null;if(d===null)return null;s=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(s&&typeof s!=="function")throw Error("Expected `"+o+"` listener to be a function, instead got a value of `"+typeof s+"` type.");return s}function o5(){if(ry)return ry;var n,o=NC,s=o.length,d,p="value"in _l?_l.value:_l.textContent,g=p.length;for(n=0;n<s&&o[n]===p[n];n++);var x=s-n;for(d=1;d<=x&&o[s-d]===p[g-d];d++);return ry=p.slice(n,1<d?1-d:void 0)}function jb(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function Kb(){return!0}function a5(){return!1}function Zr(n){function o(s,d,p,g,x){this._reactName=s,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(s=n[C],this[C]=s?s(g):g[C]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Kb:a5,this.isPropagationStopped=a5,this}return ft(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!=="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Kb)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!=="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Kb)},persist:function(){},isPersistent:Kb}),o}function bK(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=zG[n])?!!o[n]:!1}function m2(){return bK}function i5(n,o){switch(n){case"keyup":return XG.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==h8;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function s5(n){return n=n.detail,typeof n==="object"&&"data"in n?n.data:null}function yK(n,o){switch(n){case"compositionend":return s5(o);case"keypress":if(o.which!==g8)return null;return y8=!0,b8;case"textInput":return n=o.data,n===b8&&y8?null:n;default:return null}}function vK(n,o){if(xf)return n==="compositionend"||!LC&&i5(n,o)?(n=o5(),ry=NC=_l=null,xf=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return m8&&o.locale!=="ko"?null:o.data;default:return null}}function l5(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!ZG[n.type]:o==="textarea"?!0:!1}function xK(n){if(!Oi)return!1;n="on"+n;var o=n in document;return o||(o=document.createElement("div"),o.setAttribute(n,"return;"),o=typeof o[n]==="function"),o}function c5(n,o,s,d){yf?vf?vf.push(d):vf=[d]:yf=d,o=I0(o,"onChange"),0<o.length&&(s=new oy("onChange","change",null,s,d),n.push({event:s,listeners:o}))}function $K(n){KM(n,0)}function qb(n){var o=tt(n);if(Ik(o))return n}function u5(n,o){if(n==="change")return o}function d5(){am&&(am.detachEvent("onpropertychange",f5),im=am=null)}function f5(n){if(n.propertyName==="value"&&qb(im)){var o=[];c5(o,im,n,h2(n)),r5($K,o)}}function SK(n,o,s){n==="focusin"?(d5(),am=o,im=s,am.attachEvent("onpropertychange",f5)):n==="focusout"&&d5()}function CK(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return qb(im)}function wK(n,o){if(n==="click")return qb(o)}function EK(n,o){if(n==="input"||n==="change")return qb(o)}function TK(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}function $h(n,o){if(Br(n,o))return!0;if(typeof n!=="object"||n===null||typeof o!=="object"||o===null)return!1;var s=Object.keys(n),d=Object.keys(o);if(s.length!==d.length)return!1;for(d=0;d<s.length;d++){var p=s[d];if(!Ia.call(o,p)||!Br(n[p],o[p]))return!1}return!0}function p5(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function h5(n,o){var s=p5(n);n=0;for(var d;s;){if(s.nodeType===3){if(d=n+s.textContent.length,n<=o&&d>=o)return{node:s,offset:o-n};n=d}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=p5(s)}}function m5(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?m5(n,o.parentNode):("contains"in n)?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function g5(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var o=Ub(n.document);o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href==="string"}catch(d){s=!1}if(s)n=o.contentWindow;else break;o=Ub(n.document)}return o}function g2(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function b5(n,o,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;IC||$f==null||$f!==Ub(d)||(d=$f,("selectionStart"in d)&&g2(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),sm&&$h(sm,d)||(sm=d,d=I0(_C,"onSelect"),0<d.length&&(o=new oy("onSelect","select",null,o,s),n.push({event:o,listeners:d}),o.target=$f)))}function nu(n,o){var s={};return s[n.toLowerCase()]=o.toLowerCase(),s["Webkit"+n]="webkit"+o,s["Moz"+n]="moz"+o,s}function ru(n){if(BC[n])return BC[n];if(!Sf[n])return n;var o=Sf[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in x8)return BC[n]=o[s];return n}function Pa(n,o){E8.set(n,o),Cr(o,[n])}function RK(n){for(var o=iy,s=0;s<n.length;s++){var d=n[s];if(typeof d==="object"&&d!==null)if(qn(d)&&d.length===2&&typeof d[0]==="string"){if(o!==iy&&o!==VC)return UC;o=VC}else return UC;else{if(typeof d==="function"||typeof d==="string"&&50<d.length||o!==iy&&o!==FC)return UC;o=FC}}return o}function b2(n,o,s,d){for(var p in n)Ia.call(n,p)&&p[0]!=="_"&&ui(p,n[p],o,s,d)}function ui(n,o,s,d,p){switch(typeof o){case"object":if(o===null){o="null";break}else{if(o.$$typeof===Ti){var g=P(o.type)||"…",x=o.key;o=o.props;var C=Object.keys(o),T=C.length;if(x==null&&T===0){o="<"+g+" />";break}if(3>d||T===1&&C[0]==="children"&&x==null){o="<"+g+" … />";break}s.push([p+"  ".repeat(d)+n,"<"+g]),x!==null&&ui("key",x,s,d+1,p),n=!1;for(var A in o)A==="children"?o.children!=null&&(!qn(o.children)||0<o.children.length)&&(n=!0):Ia.call(o,A)&&A[0]!=="_"&&ui(A,o[A],s,d+1,p);s.push(["",n?">…</"+g+">":"/>"]);return}if(g=Object.prototype.toString.call(o),g=g.slice(8,g.length-1),g==="Array"){if(A=RK(o),A===FC||A===iy){o=JSON.stringify(o);break}else if(A===VC){s.push([p+"  ".repeat(d)+n,""]);for(n=0;n<o.length;n++)g=o[n],ui(g[0],g[1],s,d+1,p);return}}if(g==="Promise"){if(o.status==="fulfilled"){if(g=s.length,ui(n,o.value,s,d,p),s.length>g){s=s[g],s[1]="Promise<"+(s[1]||"Object")+">";return}}else if(o.status==="rejected"&&(g=s.length,ui(n,o.reason,s,d,p),s.length>g)){s=s[g],s[1]="Rejected Promise<"+s[1]+">";return}s.push(["  ".repeat(d)+n,"Promise"]);return}g==="Object"&&(A=Object.getPrototypeOf(o))&&typeof A.constructor==="function"&&(g=A.constructor.name),s.push([p+"  ".repeat(d)+n,g==="Object"?3>d?"":"…":g]),3>d&&b2(o,s,d+1,p);return}case"function":o=o.name===""?"() => {}":o.name+"() {}";break;case"string":o=o===iW?"…":JSON.stringify(o);break;case"undefined":o="undefined";break;case"boolean":o=o?"true":"false";break;default:o=String(o)}s.push([p+"  ".repeat(d)+n,o])}function y5(n,o,s,d){var p=!0;for(x in n)x in o||(s.push([sy+"  ".repeat(d)+x,"…"]),p=!1);for(var g in o)if(g in n){var x=n[g],C=o[g];if(x!==C){if(d===0&&g==="children")p="  ".repeat(d)+g,s.push([sy+p,"…"],[ly+p,"…"]);else{if(!(3<=d)){if(typeof x==="object"&&typeof C==="object"&&x!==null&&C!==null&&x.$$typeof===C.$$typeof)if(C.$$typeof===Ti){if(x.type===C.type&&x.key===C.key){x=P(C.type)||"…",p="  ".repeat(d)+g,x="<"+x+" … />",s.push([sy+p,x],[ly+p,x]),p=!1;continue}}else{var T=Object.prototype.toString.call(x),A=Object.prototype.toString.call(C);if(T===A&&(A==="[object Object]"||A==="[object Array]")){T=[k8+"  ".repeat(d)+g,A==="[object Array]"?"Array":""],s.push(T),A=s.length,y5(x,C,s,d+1)?A===s.length&&(T[1]="Referentially unequal but deeply equal objects. Consider memoization."):p=!1;continue}}else if(typeof x==="function"&&typeof C==="function"&&x.name===C.name&&x.length===C.length&&(T=Function.prototype.toString.call(x),A=Function.prototype.toString.call(C),T===A)){x=C.name===""?"() => {}":C.name+"() {}",s.push([k8+"  ".repeat(d)+g,x+" Referentially unequal function closure. Consider memoization."]);continue}}ui(g,x,s,d,sy),ui(g,C,s,d,ly)}p=!1}}else s.push([ly+"  ".repeat(d)+g,"…"]),p=!1;return p}function So(n){mt=n&63?"Blocking":n&64?"Gesture":n&4194176?"Transition":n&62914560?"Suspense":n&2080374784?"Idle":"Other"}function di(n,o,s,d){Jt&&(Bl.start=o,Bl.end=s,bs.color="warning",bs.tooltipText=d,bs.properties=null,(n=n._debugTask)?n.run(performance.measure.bind(performance,d,Bl)):performance.measure(d,Bl))}function Gb(n,o,s){di(n,o,s,"Reconnect")}function Wb(n,o,s,d,p){var g=J(n);if(g!==null&&Jt){var{alternate:x,actualDuration:C}=n;if(x===null||x.child!==n.child)for(var T=n.child;T!==null;T=T.sibling)C-=T.actualDuration;d=0.5>C?d?"tertiary-light":"primary-light":10>C?d?"tertiary":"primary":100>C?d?"tertiary-dark":"primary-dark":"error";var A=n.memoizedProps;C=n._debugTask,A!==null&&x!==null&&x.memoizedProps!==A?(T=[sW],A=y5(x.memoizedProps,A,T,0),1<T.length&&(A&&!Il&&(x.lanes&p)===0&&100<n.actualDuration?(Il=!0,T[0]=lW,bs.color="warning",bs.tooltipText=A8):(bs.color=d,bs.tooltipText=g),bs.properties=T,Bl.start=o,Bl.end=s,C!=null?C.run(performance.measure.bind(performance,"​"+g,Bl)):performance.measure("​"+g,Bl))):C!=null?C.run(console.timeStamp.bind(console,g,o,s,Xo,void 0,d)):console.timeStamp(g,o,s,Xo,void 0,d)}}function y2(n,o,s,d){if(Jt){var p=J(n);if(p!==null){for(var g=null,x=[],C=0;C<d.length;C++){var T=d[C];g==null&&T.source!==null&&(g=T.source._debugTask),T=T.value,x.push(["Error",typeof T==="object"&&T!==null&&typeof T.message==="string"?String(T.message):String(T)])}n.key!==null&&ui("key",n.key,x,0,""),n.memoizedProps!==null&&b2(n.memoizedProps,x,0,""),g==null&&(g=n._debugTask),n={start:o,end:s,detail:{devtools:{color:"error",track:Xo,tooltipText:n.tag===13?"Hydration failed":"Error boundary caught an error",properties:x}}},g?g.run(performance.measure.bind(performance,"​"+p,n)):performance.measure("​"+p,n)}}}function fi(n,o,s,d,p){if(p!==null){if(Jt){var g=J(n);if(g!==null){d=[];for(var x=0;x<p.length;x++){var C=p[x].value;d.push(["Error",typeof C==="object"&&C!==null&&typeof C.message==="string"?String(C.message):String(C)])}n.key!==null&&ui("key",n.key,d,0,""),n.memoizedProps!==null&&b2(n.memoizedProps,d,0,""),o={start:o,end:s,detail:{devtools:{color:"error",track:Xo,tooltipText:"A lifecycle or effect errored",properties:d}}},(n=n._debugTask)?n.run(performance.measure.bind(performance,"​"+g,o)):performance.measure("​"+g,o)}}}else g=J(n),g!==null&&Jt&&(p=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(n=n._debugTask)?n.run(console.timeStamp.bind(console,g,o,s,Xo,void 0,p)):console.timeStamp(g,o,s,Xo,void 0,p))}function kK(n,o,s,d){if(Jt&&!(o<=n)){var p=(s&738197653)===s?"tertiary-dark":"primary-dark";s=(s&536870912)===s?"Prepared":(s&201326741)===s?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,s,n,o,mt,pt,p)):console.timeStamp(s,n,o,mt,pt,p)}}function v5(n,o,s,d){!Jt||o<=n||(s=(s&738197653)===s?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",n,o,mt,pt,s)):console.timeStamp("Prewarm",n,o,mt,pt,s))}function x5(n,o,s,d){!Jt||o<=n||(s=(s&738197653)===s?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",n,o,mt,pt,s)):console.timeStamp("Suspended",n,o,mt,pt,s))}function AK(n,o,s,d,p,g){if(Jt&&!(o<=n)){s=[];for(var x=0;x<d.length;x++){var C=d[x].value;s.push(["Recoverable Error",typeof C==="object"&&C!==null&&typeof C.message==="string"?String(C.message):String(C)])}n={start:n,end:o,detail:{devtools:{color:"primary-dark",track:mt,trackGroup:pt,tooltipText:p?"Hydration Failed":"Recovered after Error",properties:s}}},g?g.run(performance.measure.bind(performance,"Recovered",n)):performance.measure("Recovered",n)}}function v2(n,o,s,d){!Jt||o<=n||(d?d.run(console.timeStamp.bind(console,"Errored",n,o,mt,pt,"error")):console.timeStamp("Errored",n,o,mt,pt,"error"))}function MK(n,o,s,d){!Jt||o<=n||(d?d.run(console.timeStamp.bind(console,s,n,o,mt,pt,"secondary-light")):console.timeStamp(s,n,o,mt,pt,"secondary-light"))}function $5(n,o,s,d,p){if(Jt&&!(o<=n)){for(var g=[],x=0;x<s.length;x++){var C=s[x].value;g.push(["Error",typeof C==="object"&&C!==null&&typeof C.message==="string"?String(C.message):String(C)])}n={start:n,end:o,detail:{devtools:{color:"error",track:mt,trackGroup:pt,tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:g}}},p?p.run(performance.measure.bind(performance,"Errored",n)):performance.measure("Errored",n)}}function Sh(n,o,s){!Jt||o<=n||(s?s.run(console.timeStamp.bind(console,"Animating",n,o,mt,pt,"secondary-dark")):console.timeStamp("Animating",n,o,mt,pt,"secondary-dark"))}function Yb(){for(var n=Cf,o=jC=Cf=0;o<n;){var s=Qo[o];Qo[o++]=null;var d=Qo[o];Qo[o++]=null;var p=Qo[o];Qo[o++]=null;var g=Qo[o];if(Qo[o++]=null,d!==null&&p!==null){var x=d.pending;x===null?p.next=p:(p.next=x.next,x.next=p),d.pending=p}g!==0&&S5(s,p,g)}}function Jb(n,o,s,d){Qo[Cf++]=n,Qo[Cf++]=o,Qo[Cf++]=s,Qo[Cf++]=d,jC|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}function x2(n,o,s,d){return Jb(n,o,s,d),Xb(n)}function wr(n,o){return Jb(n,null,null,o),Xb(n)}function S5(n,o,s){n.lanes|=s;var d=n.alternate;d!==null&&(d.lanes|=s);for(var p=!1,g=n.return;g!==null;)g.childLanes|=s,d=g.alternate,d!==null&&(d.childLanes|=s),g.tag===22&&(n=g.stateNode,n===null||n._visibility&lm||(p=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,p&&o!==null&&(p=31-Lr(s),n=g.hiddenUpdates,d=n[p],d===null?n[p]=[o]:d.push(o),o.lane=s|536870912),g):null}function Xb(n){if(Lm>CW)throw Ou=Lm=0,_m=Cw=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.");Ou>wW&&(Ou=0,_m=null,console.error("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.")),n.alternate===null&&(n.flags&4098)!==0&&BM(n);for(var o=n,s=o.return;s!==null;)o.alternate===null&&(o.flags&4098)!==0&&BM(n),o=s,s=o.return;return o.tag===3?o.stateNode:null}function ou(n){if(Zo===null)return n;var o=Zo(n);return o===void 0?n:o.current}function $2(n){if(Zo===null)return n;var o=Zo(n);return o===void 0?n!==null&&n!==void 0&&typeof n.render==="function"&&(o=ou(n.render),n.render!==o)?(o={$$typeof:Jh,render:o},n.displayName!==void 0&&(o.displayName=n.displayName),o):n:o.current}function C5(n,o){if(Zo===null)return!1;var s=n.elementType;o=o.type;var d=!1,p=typeof o==="object"&&o!==null?o.$$typeof:null;switch(n.tag){case 1:typeof o==="function"&&(d=!0);break;case 0:typeof o==="function"?d=!0:p===Ao&&(d=!0);break;case 11:p===Jh?d=!0:p===Ao&&(d=!0);break;case 14:case 15:p===W0?d=!0:p===Ao&&(d=!0);break;default:return!1}return d&&(n=Zo(s),n!==void 0&&n===Zo(o))?!0:!1}function w5(n){Zo!==null&&typeof WeakSet==="function"&&(wf===null&&(wf=new WeakSet),wf.add(n))}function E5(n,o,s){do{var d=n,p=d.alternate,g=d.child,x=d.sibling,C=d.tag;d=d.type;var T=null;switch(C){case 0:case 15:case 1:T=d;break;case 11:T=d.render}if(Zo===null)throw Error("Expected resolveFamily to be set during hot reload.");var A=!1;if(d=!1,T!==null&&(T=Zo(T),T!==void 0&&(s.has(T)?d=!0:o.has(T)&&(C===1?d=!0:A=!0))),wf!==null&&(wf.has(n)||p!==null&&wf.has(p))&&(d=!0),d&&(n._debugNeedsRemount=!0),d||A)p=wr(n,2),p!==null&&fn(p,n,2);if(g===null||d||E5(g,o,s),x===null)break;n=x}while(1)}function NK(n,o,s,d){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,M8||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function S2(n){return n=n.prototype,!(!n||!n.isReactComponent)}function cs(n,o){var s=n.alternate;switch(s===null?(s=y(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s._debugOwner=n._debugOwner,s._debugStack=n._debugStack,s._debugTask=n._debugTask,s._debugHookTypes=n._debugHookTypes,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null,s.actualDuration=-0,s.actualStartTime=-1.1),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s.selfBaseDuration=n.selfBaseDuration,s.treeBaseDuration=n.treeBaseDuration,s._debugInfo=n._debugInfo,s._debugNeedsRemount=n._debugNeedsRemount,s.tag){case 0:case 15:s.type=ou(n.type);break;case 1:s.type=ou(n.type);break;case 11:s.type=$2(n.type)}return s}function T5(n,o){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=o,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null,n.selfBaseDuration=0,n.treeBaseDuration=0):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,o=s.dependencies,n.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext,_debugThenableState:o._debugThenableState},n.selfBaseDuration=s.selfBaseDuration,n.treeBaseDuration=s.treeBaseDuration),n}function C2(n,o,s,d,p,g){var x=0,C=n;if(typeof n==="function")S2(n)&&(x=1),C=ou(C);else if(typeof n==="string")x=Z(),x=Hq(n,s,x)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case mC:return o=y(31,s,o,p),o.elementType=mC,o.lanes=g,o;case ff:return au(s.children,p,g,o);case G0:x=8,p|=Tr,p|=za;break;case dC:return n=s,d=p,typeof n.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof n.id),o=y(12,n,o,d|st),o.elementType=dC,o.lanes=g,o.stateNode={effectDuration:0,passiveEffectDuration:0},o;case pC:return o=y(13,s,o,p),o.elementType=pC,o.lanes=g,o;case hC:return o=y(19,s,o,p),o.elementType=hC,o.lanes=g,o;default:if(typeof n==="object"&&n!==null)switch(n.$$typeof){case Ri:x=10;break e;case fC:x=9;break e;case Jh:x=11,C=$2(C);break e;case W0:x=14;break e;case Ao:x=16,C=null;break e}if(C="",n===void 0||typeof n==="object"&&n!==null&&Object.keys(n).length===0)C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";n===null?s="null":qn(n)?s="array":n!==void 0&&n.$$typeof===Ti?(s="<"+(P(n.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):s=typeof n,(x=d?re(d):null)&&(C+=`
77
+
78
+ Check the render method of \``+x+"`."),x=29,s=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(s+"."+C)),C=null}return o=y(x,s,o,p),o.elementType=n,o.type=C,o.lanes=g,o._debugOwner=d,o}function Qb(n,o,s){return o=C2(n.type,n.key,n.props,n._owner,o,s),o._debugOwner=n._owner,o._debugStack=n._debugStack,o._debugTask=n._debugTask,o}function au(n,o,s,d){return n=y(7,n,d,o),n.lanes=s,n}function w2(n,o,s){return n=y(6,n,null,o),n.lanes=s,n}function R5(n){var o=y(18,null,null,We);return o.stateNode=n,o}function E2(n,o,s){return o=y(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function Co(n,o){if(typeof n==="object"&&n!==null){var s=KC.get(n);if(s!==void 0)return s;return o={value:n,source:o,stack:Ze(o)},KC.set(n,o),o}return{value:n,source:o,stack:Ze(o)}}function us(n,o){xl(),Ef[Tf++]=cm,Ef[Tf++]=cy,cy=n,cm=o}function k5(n,o,s){xl(),ea[ta++]=vs,ea[ta++]=xs,ea[ta++]=yu,yu=n;var d=vs;n=xs;var p=32-Lr(d)-1;d&=~(1<<p),s+=1;var g=32-Lr(o)+p;if(30<g){var x=p-p%5;g=(d&(1<<x)-1).toString(32),d>>=x,p-=x,vs=1<<32-Lr(o)+p|s<<p|d,xs=g+n}else vs=1<<g|s<<p|d,xs=n}function T2(n){xl(),n.return!==null&&(us(n,1),k5(n,1,0))}function R2(n){for(;n===cy;)cy=Ef[--Tf],Ef[Tf]=null,cm=Ef[--Tf],Ef[Tf]=null;for(;n===yu;)yu=ea[--ta],ea[ta]=null,xs=ea[--ta],ea[ta]=null,vs=ea[--ta],ea[ta]=null}function A5(){return xl(),yu!==null?{id:vs,overflow:xs}:null}function M5(n,o){xl(),ea[ta++]=vs,ea[ta++]=xs,ea[ta++]=yu,vs=o.id,xs=o.overflow,yu=n}function xl(){vt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function iu(n,o){if(n.return===null){if(Oo===null)Oo={fiber:n,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o};else{if(Oo.fiber!==n)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Oo.distanceFromLeaf>o&&(Oo.distanceFromLeaf=o)}return Oo}var s=iu(n.return,o+1).children;if(0<s.length&&s[s.length-1].fiber===n)return s=s[s.length-1],s.distanceFromLeaf>o&&(s.distanceFromLeaf=o),s;return o={fiber:n,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:o},s.push(o),o}function N5(){vt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Zb(n,o){Di||(n=iu(n,0),n.serverProps=null,o!==null&&(o=cN(o),n.serverTail.push(o)))}function $l(n){var o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,s="",d=Oo;throw d!==null&&(Oo=null,s=f2(d)),Ch(Co(Error("Hydration failed because the server rendered "+(o?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
79
+
80
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
81
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
82
+ - Date formatting in a user's locale which doesn't match the server.
83
+ - External changing data without sending a snapshot of it along with the HTML.
84
+ - Invalid HTML tag nesting.
85
+
86
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
87
+
88
+ https://react.dev/link/hydration-mismatch`+s),n)),qC}function O5(n){var{stateNode:o,type:s,memoizedProps:d}=n;switch(o[cr]=n,o[_r]=d,GS(s,d),s){case"dialog":St("cancel",o),St("close",o);break;case"iframe":case"object":case"embed":St("load",o);break;case"video":case"audio":for(s=0;s<Im.length;s++)St(Im[s],o);break;case"source":St("error",o);break;case"img":case"image":case"link":St("error",o),St("load",o);break;case"details":St("toggle",o);break;case"input":vl("input",d),St("invalid",o),Bk(o,d),zk(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"option":Hk(o,d);break;case"select":vl("select",d),St("invalid",o),Fk(o,d);break;case"textarea":vl("textarea",d),St("invalid",o),Vk(o,d),Kk(o,d.value,d.defaultValue,d.children)}s=d.children,typeof s!=="string"&&typeof s!=="number"&&typeof s!=="bigint"||o.textContent===""+s||d.suppressHydrationWarning===!0||YM(o.textContent,s)?(d.popover!=null&&(St("beforetoggle",o),St("toggle",o)),d.onScroll!=null&&St("scroll",o),d.onScrollEnd!=null&&St("scrollend",o),d.onClick!=null&&(o.onclick=ls),o=!0):o=!1,o||$l(n,!0)}function D5(n){for(ur=n.return;ur;)switch(ur.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:ur=ur.return}}function Yd(n){if(n!==ur)return!1;if(!vt)return D5(n),vt=!0,!1;var o=n.tag,s;if(s=o!==3&&o!==27){if(s=o===5)s=n.type,s=!(s!=="form"&&s!=="button")||QS(n.type,n.memoizedProps);s=!s}if(s&&Xt){for(s=Xt;s;){var d=iu(n,0),p=cN(s);d.serverTail.push(p),s=p.type==="Suspense"?nC(s):ko(s.nextSibling)}$l(n)}if(D5(n),o===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=nC(n)}else if(o===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=nC(n)}else o===27?(o=Xt,Nl(n.type)?(n=Lw,Lw=null,Xt=n):Xt=o):Xt=ur?ko(n.stateNode.nextSibling):null;return!0}function su(){Xt=ur=null,Di=vt=!1}function k2(){var n=Hl;return n!==null&&(Fr===null?Fr=n:Fr.push.apply(Fr,n),Hl=null),n}function Ch(n){Hl===null?Hl=[n]:Hl.push(n)}function A2(){var n=Oo;if(n!==null){Oo=null;for(var o=f2(n);0<n.children.length;)n=n.children[0];he(n.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
89
+
90
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
91
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
92
+ - Date formatting in a user's locale which doesn't match the server.
93
+ - External changing data without sending a snapshot of it along with the HTML.
94
+ - Invalid HTML tag nesting.
95
+
96
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
97
+
98
+ %s%s`,"https://react.dev/link/hydration-mismatch",o)})}}function e0(){Rf=uy=null,kf=!1}function Sl(n,o,s){se(GC,o._currentValue,n),o._currentValue=s,se(WC,o._currentRenderer,n),o._currentRenderer!==void 0&&o._currentRenderer!==null&&o._currentRenderer!==O8&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),o._currentRenderer=O8}function ds(n,o){n._currentValue=GC.current;var s=WC.current;ce(WC,o),n._currentRenderer=s,ce(GC,o)}function M2(n,o,s){for(;n!==null;){var d=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),n===s)break;n=n.return}n!==s&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function N2(n,o,s,d){var p=n.child;p!==null&&(p.return=n);for(;p!==null;){var g=p.dependencies;if(g!==null){var x=p.child;g=g.firstContext;e:for(;g!==null;){var C=g;g=p;for(var T=0;T<o.length;T++)if(C.context===o[T]){g.lanes|=s,C=g.alternate,C!==null&&(C.lanes|=s),M2(g.return,s,n),d||(x=null);break e}g=C.next}}else if(p.tag===18){if(x=p.return,x===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");x.lanes|=s,g=x.alternate,g!==null&&(g.lanes|=s),M2(x,s,n),x=null}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===n){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}}function Jd(n,o,s,d){n=null;for(var p=o,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var x=p.alternate;if(x===null)throw Error("Should have a current fiber. This is a bug in React.");if(x=x.memoizedProps,x!==null){var C=p.type;Br(p.pendingProps.value,x.value)||(n!==null?n.push(C):n=[C])}}else if(p===Y0.current){if(x=p.alternate,x===null)throw Error("Should have a current fiber. This is a bug in React.");x.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Fm):n=[Fm])}p=p.return}n!==null&&N2(o,n,s,d),o.flags|=262144}function t0(n){for(n=n.firstContext;n!==null;){if(!Br(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function lu(n){uy=n,Rf=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function nn(n){return kf&&console.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()."),P5(uy,n)}function n0(n,o){return uy===null&&lu(n),P5(n,o)}function P5(n,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},Rf===null){if(n===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().");Rf=o,n.dependencies={lanes:0,firstContext:o,_debugThenableState:null},n.flags|=524288}else Rf=Rf.next=o;return s}function O2(){return{controller:new dW,data:new Map,refCount:0}}function cu(n){n.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),n.refCount++}function wh(n){n.refCount--,0>n.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),n.refCount===0&&fW(pW,function(){n.controller.abort()})}function pi(n,o,s){if((n&127)!==0)0>Pi&&(Pi=Ln(),dm=dy(o),YC=o,s!=null&&(JC=J(s)),(kt&(Wn|Lo))!==tr&&(pn=!0,Vl=um),n=Kh(),o=jh(),n!==Af||o!==fm?Af=-1.1:o!==null&&(Vl=um),xu=n,fm=o);else if((n&4194048)!==0&&0>ra&&(ra=Ln(),pm=dy(o),D8=o,s!=null&&(P8=J(s)),0>Cs)){if(n=Kh(),o=jh(),n!==Kl||o!==$u)Kl=-1.1;jl=n,$u=o}}function OK(n){if(0>Pi){Pi=Ln(),dm=n._debugTask!=null?n._debugTask:null,(kt&(Wn|Lo))!==tr&&(Vl=um);var o=Kh(),s=jh();o!==Af||s!==fm?Af=-1.1:s!==null&&(Vl=um),xu=o,fm=s}if(0>ra&&(ra=Ln(),pm=n._debugTask!=null?n._debugTask:null,0>Cs)){if(n=Kh(),o=jh(),n!==Kl||o!==$u)Kl=-1.1;jl=n,$u=o}}function fs(){var n=vu;return vu=0,n}function r0(n){var o=vu;return vu=n,o}function Eh(n){var o=vu;return vu+=n,o}function o0(){Ge=Ke=-1.1}function wo(){var n=Ke;return Ke=-1.1,n}function Eo(n){0<=n&&(Ke=n)}function hi(){var n=cn;return cn=-0,n}function mi(n){0<=n&&(cn=n)}function gi(){var n=rn;return rn=null,n}function bi(){var n=pn;return pn=!1,n}function D2(n){zr=Ln(),0>n.actualStartTime&&(n.actualStartTime=zr)}function P2(n){if(0<=zr){var o=Ln()-zr;n.actualDuration+=o,n.selfBaseDuration=o,zr=-1}}function L5(n){if(0<=zr){var o=Ln()-zr;n.actualDuration+=o,zr=-1}}function yi(){if(0<=zr){var n=Ln(),o=n-zr;zr=-1,vu+=o,cn+=o,Ge=n}}function _5(n){rn===null&&(rn=[]),rn.push(n),Ss===null&&(Ss=[]),Ss.push(n)}function vi(){zr=Ln(),0>Ke&&(Ke=zr)}function Th(n){for(var o=n.child;o;)n.actualDuration+=o.actualDuration,o=o.sibling}function DK(n,o){if(mm===null){var s=mm=[];QC=0,Su=VS(),Mf={status:"pending",value:void 0,then:function(d){s.push(d)}}}return QC++,o.then(I5,I5),o}function I5(){if(--QC===0&&(-1<ra||(Cs=-1.1),mm!==null)){Mf!==null&&(Mf.status="fulfilled");var n=mm;mm=null,Su=0,Mf=null;for(var o=0;o<n.length;o++)(0,n[o])()}}function PK(n,o){var s=[],d={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){d.status="fulfilled",d.value=o;for(var p=0;p<s.length;p++)(0,s[p])(o)},function(p){d.status="rejected",d.reason=p;for(p=0;p<s.length;p++)(0,s[p])(void 0)}),d}function L2(){var n=Cu.current;return n!==null?n:jt.pooledCache}function a0(n,o){o===null?se(Cu,Cu.current,n):se(Cu,o.pool,n)}function B5(){var n=L2();return n===null?null:{parent:Pn._currentValue,pool:n}}function z5(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function H5(n){return n=n.status,n==="fulfilled"||n==="rejected"}function U5(n,o,s){oe.actQueue!==null&&(oe.didUsePromise=!0);var d=n.thenables;if(s=d[s],s===void 0?d.push(o):s!==o&&(n.didWarnAboutUncachedPromise||(n.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),o.then(ls,ls),o=s),o._debugInfo===void 0){n=performance.now(),d=o.displayName;var p={name:typeof d==="string"?d:"Promise",start:n,end:n,value:o};o._debugInfo=[{awaited:p}],o.status!=="fulfilled"&&o.status!=="rejected"&&(n=function(){p.end=performance.now()},o.then(n,n))}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,V5(n),n;default:if(typeof o.status==="string")o.then(ls,ls);else{if(n=jt,n!==null&&100<n.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");n=o,n.status="pending",n.then(function(g){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=g}},function(g){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=g}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,V5(n),n}throw Eu=o,Sm=!0,Nf}}function Cl(n){try{return bW(n)}catch(o){if(o!==null&&typeof o==="object"&&typeof o.then==="function")throw Eu=o,Sm=!0,Nf;throw o}}function F5(){if(Eu===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var n=Eu;return Eu=null,Sm=!1,n}function V5(n){if(n===Nf||n===vy)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ir(n){var o=lt;return n!=null&&(lt=o===null?n:o.concat(n)),o}function _2(){var n=lt;if(n!=null){for(var o=n.length-1;0<=o;o--)if(n[o].name!=null){var s=n[o].debugTask;if(s!=null)return s}}return null}function i0(n,o,s){for(var d=Object.keys(n.props),p=0;p<d.length;p++){var g=d[p];if(g!=="children"&&g!=="key"){o===null&&(o=Qb(n,s.mode,0),o._debugInfo=lt,o.return=s),he(o,function(x){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x)},g);break}}}function s0(n){var o=Cm;return Cm+=1,Of===null&&(Of=z5()),U5(Of,n,o)}function Rh(n,o){o=o.props.ref,n.ref=o!==void 0?o:null}function j5(n,o){if(o.$$typeof===Jq)throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
99
+ - Multiple copies of the "react" package is used.
100
+ - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
101
+ - A compiler tries to "inline" JSX instead of using the runtime.`);throw n=Object.prototype.toString.call(o),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function l0(n,o){var s=_2();s!==null?s.run(j5.bind(null,n,o)):j5(n,o)}function K5(n,o){var s=J(n)||"Component";e7[s]||(e7[s]=!0,o=o.displayName||o.name||"Component",n.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
102
+ root.render(%s)`,o,o,o):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
103
+ <%s>{%s}</%s>`,o,o,s,o,s))}function c0(n,o){var s=_2();s!==null?s.run(K5.bind(null,n,o)):K5(n,o)}function q5(n,o){var s=J(n)||"Component";t7[s]||(t7[s]=!0,o=String(o),n.tag===3?console.error(`Symbols are not valid as a React child.
104
+ root.render(%s)`,o):console.error(`Symbols are not valid as a React child.
105
+ <%s>%s</%s>`,s,o,s))}function u0(n,o){var s=_2();s!==null?s.run(q5.bind(null,n,o)):q5(n,o)}function G5(n){function o(L,B){if(n){var F=L.deletions;F===null?(L.deletions=[B],L.flags|=16):F.push(B)}}function s(L,B){if(!n)return null;for(;B!==null;)o(L,B),B=B.sibling;return null}function d(L){for(var B=new Map;L!==null;)L.key!==null?B.set(L.key,L):B.set(L.index,L),L=L.sibling;return B}function p(L,B){return L=cs(L,B),L.index=0,L.sibling=null,L}function g(L,B,F){if(L.index=F,!n)return L.flags|=1048576,B;if(F=L.alternate,F!==null)return F=F.index,F<B?(L.flags|=67108866,B):F;return L.flags|=67108866,B}function x(L){return n&&L.alternate===null&&(L.flags|=67108866),L}function C(L,B,F,ie){if(B===null||B.tag!==6)return B=w2(F,L.mode,ie),B.return=L,B._debugOwner=L,B._debugTask=L._debugTask,B._debugInfo=lt,B;return B=p(B,F),B.return=L,B._debugInfo=lt,B}function T(L,B,F,ie){var we=F.type;if(we===ff)return B=K(L,B,F.props.children,ie,F.key),i0(F,B,L),B;if(B!==null&&(B.elementType===we||C5(B,F)||typeof we==="object"&&we!==null&&we.$$typeof===Ao&&Cl(we)===B.type))return B=p(B,F.props),Rh(B,F),B.return=L,B._debugOwner=F._owner,B._debugInfo=lt,B;return B=Qb(F,L.mode,ie),Rh(B,F),B.return=L,B._debugInfo=lt,B}function A(L,B,F,ie){if(B===null||B.tag!==4||B.stateNode.containerInfo!==F.containerInfo||B.stateNode.implementation!==F.implementation)return B=E2(F,L.mode,ie),B.return=L,B._debugInfo=lt,B;return B=p(B,F.children||[]),B.return=L,B._debugInfo=lt,B}function K(L,B,F,ie,we){if(B===null||B.tag!==7)return B=au(F,L.mode,ie,we),B.return=L,B._debugOwner=L,B._debugTask=L._debugTask,B._debugInfo=lt,B;return B=p(B,F),B.return=L,B._debugInfo=lt,B}function q(L,B,F){if(typeof B==="string"&&B!==""||typeof B==="number"||typeof B==="bigint")return B=w2(""+B,L.mode,F),B.return=L,B._debugOwner=L,B._debugTask=L._debugTask,B._debugInfo=lt,B;if(typeof B==="object"&&B!==null){switch(B.$$typeof){case Ti:return F=Qb(B,L.mode,F),Rh(F,B),F.return=L,L=ir(B._debugInfo),F._debugInfo=lt,lt=L,F;case df:return B=E2(B,L.mode,F),B.return=L,B._debugInfo=lt,B;case Ao:var ie=ir(B._debugInfo);return B=Cl(B),L=q(L,B,F),lt=ie,L}if(qn(B)||U(B))return F=au(B,L.mode,F,null),F.return=L,F._debugOwner=L,F._debugTask=L._debugTask,L=ir(B._debugInfo),F._debugInfo=lt,lt=L,F;if(typeof B.then==="function")return ie=ir(B._debugInfo),L=q(L,s0(B),F),lt=ie,L;if(B.$$typeof===Ri)return q(L,n0(L,B),F);l0(L,B)}return typeof B==="function"&&c0(L,B),typeof B==="symbol"&&u0(L,B),null}function I(L,B,F,ie){var we=B!==null?B.key:null;if(typeof F==="string"&&F!==""||typeof F==="number"||typeof F==="bigint")return we!==null?null:C(L,B,""+F,ie);if(typeof F==="object"&&F!==null){switch(F.$$typeof){case Ti:return F.key===we?(we=ir(F._debugInfo),L=T(L,B,F,ie),lt=we,L):null;case df:return F.key===we?A(L,B,F,ie):null;case Ao:return we=ir(F._debugInfo),F=Cl(F),L=I(L,B,F,ie),lt=we,L}if(qn(F)||U(F)){if(we!==null)return null;return we=ir(F._debugInfo),L=K(L,B,F,ie,null),lt=we,L}if(typeof F.then==="function")return we=ir(F._debugInfo),L=I(L,B,s0(F),ie),lt=we,L;if(F.$$typeof===Ri)return I(L,B,n0(L,F),ie);l0(L,F)}return typeof F==="function"&&c0(L,F),typeof F==="symbol"&&u0(L,F),null}function te(L,B,F,ie,we){if(typeof ie==="string"&&ie!==""||typeof ie==="number"||typeof ie==="bigint")return L=L.get(F)||null,C(B,L,""+ie,we);if(typeof ie==="object"&&ie!==null){switch(ie.$$typeof){case Ti:return F=L.get(ie.key===null?F:ie.key)||null,L=ir(ie._debugInfo),B=T(B,F,ie,we),lt=L,B;case df:return L=L.get(ie.key===null?F:ie.key)||null,A(B,L,ie,we);case Ao:var Xe=ir(ie._debugInfo);return ie=Cl(ie),B=te(L,B,F,ie,we),lt=Xe,B}if(qn(ie)||U(ie))return F=L.get(F)||null,L=ir(ie._debugInfo),B=K(B,F,ie,we,null),lt=L,B;if(typeof ie.then==="function")return Xe=ir(ie._debugInfo),B=te(L,B,F,s0(ie),we),lt=Xe,B;if(ie.$$typeof===Ri)return te(L,B,F,n0(B,ie),we);l0(B,ie)}return typeof ie==="function"&&c0(B,ie),typeof ie==="symbol"&&u0(B,ie),null}function xe(L,B,F,ie){if(typeof F!=="object"||F===null)return ie;switch(F.$$typeof){case Ti:case df:m(L,B,F);var we=F.key;if(typeof we!=="string")break;if(ie===null){ie=new Set,ie.add(we);break}if(!ie.has(we)){ie.add(we);break}he(B,function(){console.error("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.",we)});break;case Ao:F=Cl(F),xe(L,B,F,ie)}return ie}function Re(L,B,F,ie){for(var we=null,Xe=null,Ve=null,Be=B,ot=B=0,Qt=null;Be!==null&&ot<F.length;ot++){Be.index>ot?(Qt=Be,Be=null):Qt=Be.sibling;var An=I(L,Be,F[ot],ie);if(An===null){Be===null&&(Be=Qt);break}we=xe(L,An,F[ot],we),n&&Be&&An.alternate===null&&o(L,Be),B=g(An,B,ot),Ve===null?Xe=An:Ve.sibling=An,Ve=An,Be=Qt}if(ot===F.length)return s(L,Be),vt&&us(L,ot),Xe;if(Be===null){for(;ot<F.length;ot++)Be=q(L,F[ot],ie),Be!==null&&(we=xe(L,Be,F[ot],we),B=g(Be,B,ot),Ve===null?Xe=Be:Ve.sibling=Be,Ve=Be);return vt&&us(L,ot),Xe}for(Be=d(Be);ot<F.length;ot++)Qt=te(Be,L,ot,F[ot],ie),Qt!==null&&(we=xe(L,Qt,F[ot],we),n&&Qt.alternate!==null&&Be.delete(Qt.key===null?ot:Qt.key),B=g(Qt,B,ot),Ve===null?Xe=Qt:Ve.sibling=Qt,Ve=Qt);return n&&Be.forEach(function(Os){return o(L,Os)}),vt&&us(L,ot),Xe}function Wt(L,B,F,ie){if(F==null)throw Error("An iterable object provided no iterator.");for(var we=null,Xe=null,Ve=B,Be=B=0,ot=null,Qt=null,An=F.next();Ve!==null&&!An.done;Be++,An=F.next()){Ve.index>Be?(ot=Ve,Ve=null):ot=Ve.sibling;var Os=I(L,Ve,An.value,ie);if(Os===null){Ve===null&&(Ve=ot);break}Qt=xe(L,Os,An.value,Qt),n&&Ve&&Os.alternate===null&&o(L,Ve),B=g(Os,B,Be),Xe===null?we=Os:Xe.sibling=Os,Xe=Os,Ve=ot}if(An.done)return s(L,Ve),vt&&us(L,Be),we;if(Ve===null){for(;!An.done;Be++,An=F.next())Ve=q(L,An.value,ie),Ve!==null&&(Qt=xe(L,Ve,An.value,Qt),B=g(Ve,B,Be),Xe===null?we=Ve:Xe.sibling=Ve,Xe=Ve);return vt&&us(L,Be),we}for(Ve=d(Ve);!An.done;Be++,An=F.next())ot=te(Ve,L,Be,An.value,ie),ot!==null&&(Qt=xe(L,ot,An.value,Qt),n&&ot.alternate!==null&&Ve.delete(ot.key===null?Be:ot.key),B=g(ot,B,Be),Xe===null?we=ot:Xe.sibling=ot,Xe=ot);return n&&Ve.forEach(function(UW){return o(L,UW)}),vt&&us(L,Be),we}function Ct(L,B,F,ie){if(typeof F==="object"&&F!==null&&F.type===ff&&F.key===null&&(i0(F,null,L),F=F.props.children),typeof F==="object"&&F!==null){switch(F.$$typeof){case Ti:var we=ir(F._debugInfo);e:{for(var Xe=F.key;B!==null;){if(B.key===Xe){if(Xe=F.type,Xe===ff){if(B.tag===7){s(L,B.sibling),ie=p(B,F.props.children),ie.return=L,ie._debugOwner=F._owner,ie._debugInfo=lt,i0(F,ie,L),L=ie;break e}}else if(B.elementType===Xe||C5(B,F)||typeof Xe==="object"&&Xe!==null&&Xe.$$typeof===Ao&&Cl(Xe)===B.type){s(L,B.sibling),ie=p(B,F.props),Rh(ie,F),ie.return=L,ie._debugOwner=F._owner,ie._debugInfo=lt,L=ie;break e}s(L,B);break}else o(L,B);B=B.sibling}F.type===ff?(ie=au(F.props.children,L.mode,ie,F.key),ie.return=L,ie._debugOwner=L,ie._debugTask=L._debugTask,ie._debugInfo=lt,i0(F,ie,L),L=ie):(ie=Qb(F,L.mode,ie),Rh(ie,F),ie.return=L,ie._debugInfo=lt,L=ie)}return L=x(L),lt=we,L;case df:e:{we=F;for(F=we.key;B!==null;){if(B.key===F)if(B.tag===4&&B.stateNode.containerInfo===we.containerInfo&&B.stateNode.implementation===we.implementation){s(L,B.sibling),ie=p(B,we.children||[]),ie.return=L,L=ie;break e}else{s(L,B);break}else o(L,B);B=B.sibling}ie=E2(we,L.mode,ie),ie.return=L,L=ie}return x(L);case Ao:return we=ir(F._debugInfo),F=Cl(F),L=Ct(L,B,F,ie),lt=we,L}if(qn(F))return we=ir(F._debugInfo),L=Re(L,B,F,ie),lt=we,L;if(U(F)){if(we=ir(F._debugInfo),Xe=U(F),typeof Xe!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ve=Xe.call(F);if(Ve===F){if(L.tag!==0||Object.prototype.toString.call(L.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ve)!=="[object Generator]")Q8||console.error("Using Iterators 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. You can also use an Iterable that can iterate multiple times over the same items."),Q8=!0}else F.entries!==Xe||nw||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),nw=!0);return L=Wt(L,B,Ve,ie),lt=we,L}if(typeof F.then==="function")return we=ir(F._debugInfo),L=Ct(L,B,s0(F),ie),lt=we,L;if(F.$$typeof===Ri)return Ct(L,B,n0(L,F),ie);l0(L,F)}if(typeof F==="string"&&F!==""||typeof F==="number"||typeof F==="bigint")return we=""+F,B!==null&&B.tag===6?(s(L,B.sibling),ie=p(B,we),ie.return=L,L=ie):(s(L,B),ie=w2(we,L.mode,ie),ie.return=L,ie._debugOwner=L,ie._debugTask=L._debugTask,ie._debugInfo=lt,L=ie),x(L);return typeof F==="function"&&c0(L,F),typeof F==="symbol"&&u0(L,F),s(L,B)}return function(L,B,F,ie){var we=lt;lt=null;try{Cm=0;var Xe=Ct(L,B,F,ie);return Of=null,Xe}catch(Qt){if(Qt===Nf||Qt===vy)throw Qt;var Ve=y(29,Qt,null,L.mode);Ve.lanes=ie,Ve.return=L;var Be=Ve._debugInfo=lt;if(Ve._debugOwner=L._debugOwner,Ve._debugTask=L._debugTask,Be!=null){for(var ot=Be.length-1;0<=ot;ot--)if(typeof Be[ot].stack==="string"){Ve._debugOwner=Be[ot],Ve._debugTask=Be[ot].debugTask;break}}return Ve}finally{lt=we}}}function W5(n,o){var s=qn(n);return n=!s&&typeof U(n)==="function",s||n?(s=s?"array":"iterable",console.error("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>",s,o,s),!1):!0}function I2(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function B2(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function wl(n){return{lane:n,tag:r7,payload:null,callback:null,next:null}}function El(n,o,s){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,ow===d&&!i7){var p=J(n);console.error(`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.
106
+
107
+ Please update the following component: %s`,p),i7=!0}if((kt&Wn)!==tr)return p=d.pending,p===null?o.next=o:(o.next=p.next,p.next=o),d.pending=o,o=Xb(n),S5(n,null,s),o;return Jb(n,d,o,s),Xb(n)}function kh(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194048)!==0)){var d=o.lanes;d&=n.pendingLanes,s|=d,o.lanes=s,Qc(n,s)}}function d0(n,o){var{updateQueue:s,alternate:d}=n;if(d!==null&&(d=d.updateQueue,s===d)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=x:g=g.next=x,s=s.next}while(s!==null);g===null?p=g=o:g=g.next=o}else p=g=o;s={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,callbacks:d.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}function Ah(){if(aw){var n=Mf;if(n!==null)throw n}}function Mh(n,o,s,d){aw=!1;var p=n.updateQueue;ql=!1,ow=p.shared;var{firstBaseUpdate:g,lastBaseUpdate:x}=p,C=p.shared.pending;if(C!==null){p.shared.pending=null;var T=C,A=T.next;T.next=null,x===null?g=A:x.next=A,x=T;var K=n.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==x&&(C===null?K.firstBaseUpdate=A:C.next=A,K.lastBaseUpdate=T))}if(g!==null){var q=p.baseState;x=0,K=A=T=null,C=g;do{var I=C.lane&-536870913,te=I!==C.lane;if(te?(ct&I)===I:(d&I)===I){I!==0&&I===Su&&(aw=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{I=n;var xe=C,Re=o,Wt=s;switch(xe.tag){case o7:if(xe=xe.payload,typeof xe==="function"){kf=!0;var Ct=xe.call(Wt,q,Re);if(I.mode&Tr){qt(!0);try{xe.call(Wt,q,Re)}finally{qt(!1)}}kf=!1,q=Ct;break e}q=xe;break e;case rw:I.flags=I.flags&-65537|128;case r7:if(Ct=xe.payload,typeof Ct==="function"){if(kf=!0,xe=Ct.call(Wt,q,Re),I.mode&Tr){qt(!0);try{Ct.call(Wt,q,Re)}finally{qt(!1)}}kf=!1}else xe=Ct;if(xe===null||xe===void 0)break e;q=ft({},q,xe);break e;case a7:ql=!0}}I=C.callback,I!==null&&(n.flags|=64,te&&(n.flags|=8192),te=p.callbacks,te===null?p.callbacks=[I]:te.push(I))}else te={lane:I,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(A=K=te,T=q):K=K.next=te,x|=I;if(C=C.next,C===null)if(C=p.shared.pending,C===null)break;else te=C,C=te.next,te.next=null,p.lastBaseUpdate=te,p.shared.pending=null}while(1);K===null&&(T=q),p.baseState=T,p.firstBaseUpdate=A,p.lastBaseUpdate=K,g===null&&(p.shared.lanes=0),Yl|=x,n.lanes=x,n.memoizedState=q}ow=null}function Y5(n,o){if(typeof n!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+n);n.call(o)}function LK(n,o){var s=n.shared.hiddenCallbacks;if(s!==null)for(n.shared.hiddenCallbacks=null,n=0;n<s.length;n++)Y5(s[n],o)}function J5(n,o){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Y5(s[n],o)}function X5(n,o){var s=Ii;se($y,s,n),se(Df,o,n),Ii=s|o.baseLanes}function z2(n){se($y,Ii,n),se(Df,Df.current,n)}function H2(n){Ii=$y.current,ce(Df,n),ce($y,n)}function Tl(n){var o=n.alternate;se(kn,kn.current&Pf,n),se(Do,n,n),oa===null&&(o===null||Df.current!==null?oa=n:o.memoizedState!==null&&(oa=n))}function U2(n){se(kn,kn.current,n),se(Do,n,n),oa===null&&(oa=n)}function Q5(n){n.tag===22?(se(kn,kn.current,n),se(Do,n,n),oa===null&&(oa=n)):Rl(n)}function Rl(n){se(kn,kn.current,n),se(Do,Do.current,n)}function To(n){ce(Do,n),oa===n&&(oa=null),ce(kn,n)}function f0(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||eC(s)||tC(s)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}function dt(){var n=ne;ia===null?ia=[n]:ia.push(n)}function de(){var n=ne;if(ia!==null&&(Rs++,ia[Rs]!==n)){var o=J(Je);if(!s7.has(o)&&(s7.add(o),ia!==null)){for(var s="",d=0;d<=Rs;d++){var p=ia[d],g=d===Rs?n:p;for(p=d+1+". "+p;30>p.length;)p+=" ";p+=g+`
108
+ `,s+=p}console.error(`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://react.dev/link/rules-of-hooks
109
+
110
+ Previous render Next render
111
+ ------------------------------------------------------
112
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
+ `,o,s)}}}function Xd(n){n===void 0||n===null||qn(n)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ne,typeof n)}function p0(){var n=J(Je);c7.has(n)||(c7.add(n),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",n))}function yn(){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:
114
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
115
+ 2. You might be breaking the Rules of Hooks
116
+ 3. You might have more than one copy of React in the same app
117
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function F2(n,o){if(Tm)return!1;if(o===null)return console.error("%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.",ne),!1;n.length!==o.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
118
+
119
+ Previous: %s
120
+ Incoming: %s`,ne,"["+o.join(", ")+"]","["+n.join(", ")+"]");for(var s=0;s<o.length&&s<n.length;s++)if(!Br(n[s],o[s]))return!1;return!0}function V2(n,o,s,d,p,g){if(Es=g,Je=o,ia=n!==null?n._debugHookTypes:null,Rs=-1,Tm=n!==null&&n.type!==o.type,Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")g=J(Je),iw.has(g)||(iw.add(g),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",g===null?"An unknown Component":"<"+g+">"));o.memoizedState=null,o.updateQueue=null,o.lanes=0,oe.H=n!==null&&n.memoizedState!==null?lw:ia!==null?u7:sw,Ru=g=(o.mode&Tr)!==We;var x=ZC(s,d,p);if(Ru=!1,_f&&(x=j2(o,s,d,p)),g){qt(!0);try{x=j2(o,s,d,p)}finally{qt(!1)}}return Z5(n,o),x}function Z5(n,o){o._debugHookTypes=ia,o.dependencies===null?Ts!==null&&(o.dependencies={lanes:0,firstContext:null,_debugThenableState:Ts}):o.dependencies._debugThenableState=Ts,oe.H=Rm;var s=Vt!==null&&Vt.next!==null;if(Es=0,ia=ne=_n=Vt=Je=null,Rs=-1,n!==null&&(n.flags&65011712)!==(o.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),Cy=!1,Em=0,Ts=null,s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");n===null||In||(n=n.dependencies,n!==null&&t0(n)&&(In=!0)),Sm?(Sm=!1,n=!0):n=!1,n&&(o=J(o)||"Unknown",l7.has(o)||iw.has(o)||(l7.add(o),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function j2(n,o,s,d){Je=n;var p=0;do{if(_f&&(Ts=null),Em=0,_f=!1,p>=vW)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(p+=1,Tm=!1,_n=Vt=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}Rs=-1,oe.H=d7,g=ZC(o,s,d)}while(_f);return g}function _K(){var n=oe.H,o=n.useState()[0];return o=typeof o.then==="function"?Nh(o):o,n=n.useState()[0],(Vt!==null?Vt.memoizedState:null)!==n&&(Je.flags|=1024),o}function K2(){var n=wy!==0;return wy=0,n}function q2(n,o,s){o.updateQueue=n.updateQueue,o.flags=(o.mode&za)!==We?o.flags&-402655237:o.flags&-2053,n.lanes&=~s}function G2(n){if(Cy){for(n=n.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Cy=!1}Es=0,ia=_n=Vt=Je=null,Rs=-1,ne=null,_f=!1,Em=wy=0,Ts=null}function Pr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _n===null?Je.memoizedState=_n=n:_n=_n.next=n,_n}function zt(){if(Vt===null){var n=Je.alternate;n=n!==null?n.memoizedState:null}else n=Vt.next;var o=_n===null?Je.memoizedState:_n.next;if(o!==null)_n=o,Vt=n;else{if(n===null){if(Je.alternate===null)throw Error("Update hook called on initial render. This is likely a bug in React. Please file an issue.");throw Error("Rendered more hooks than during the previous render.")}Vt=n,n={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},_n===null?Je.memoizedState=_n=n:_n=_n.next=n}return _n}function h0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nh(n){var o=Em;return Em+=1,Ts===null&&(Ts=z5()),n=U5(Ts,n,o),o=Je,(_n===null?o.memoizedState:_n.next)===null&&(o=o.alternate,oe.H=o!==null&&o.memoizedState!==null?lw:sw),n}function kl(n){if(n!==null&&typeof n==="object"){if(typeof n.then==="function")return Nh(n);if(n.$$typeof===Ri)return nn(n)}throw Error("An unsupported type was passed to use(): "+String(n))}function uu(n){var o=null,s=Je.updateQueue;if(s!==null&&(o=s.memoCache),o==null){var d=Je.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),s===null&&(s=h0(),Je.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0||Tm)for(s=o.data[o.index]=Array(n),d=0;d<n;d++)s[d]=Xq;else s.length!==n&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",s.length,n);return o.index++,s}function La(n,o){return typeof o==="function"?o(n):o}function W2(n,o,s){var d=Pr();if(s!==void 0){var p=s(o);if(Ru){qt(!0);try{s(o)}finally{qt(!1)}}}else p=o;return d.memoizedState=d.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},d.queue=n,n=n.dispatch=UK.bind(null,Je,n),[d.memoizedState,n]}function Qd(n){var o=zt();return Y2(o,Vt,n)}function Y2(n,o,s){var d=n.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=s;var p=n.baseQueue,g=d.pending;if(g!==null){if(p!==null){var x=p.next;p.next=g.next,g.next=x}o.baseQueue!==p&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),o.baseQueue=p=g,d.pending=null}if(g=n.baseState,p===null)n.memoizedState=g;else{o=p.next;var C=x=null,T=null,A=o,K=!1;do{var q=A.lane&-536870913;if(q!==A.lane?(ct&q)===q:(Es&q)===q){var I=A.revertLane;if(I===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),q===Su&&(K=!0);else if((Es&I)===I){A=A.next,I===Su&&(K=!0);continue}else q={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},T===null?(C=T=q,x=g):T=T.next=q,Je.lanes|=I,Yl|=I;q=A.action,Ru&&s(g,q),g=A.hasEagerState?A.eagerState:s(g,q)}else I={lane:q,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},T===null?(C=T=I,x=g):T=T.next=I,Je.lanes|=q,Yl|=q;A=A.next}while(A!==null&&A!==o);if(T===null?x=g:T.next=C,!Br(g,n.memoizedState)&&(In=!0,K&&(s=Mf,s!==null)))throw s;n.memoizedState=g,n.baseState=x,n.baseQueue=T,d.lastRenderedState=g}return p===null&&(d.lanes=0),[n.memoizedState,d.dispatch]}function Oh(n){var o=zt(),s=o.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=n;var{dispatch:d,pending:p}=s,g=o.memoizedState;if(p!==null){s.pending=null;var x=p=p.next;do g=n(g,x.action),x=x.next;while(x!==p);Br(g,o.memoizedState)||(In=!0),o.memoizedState=g,o.baseQueue===null&&(o.baseState=g),s.lastRenderedState=g}return[g,d]}function J2(n,o,s){var d=Je,p=Pr();if(vt){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var g=s();Lf||g===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Lf=!0)}else{if(g=o(),Lf||(s=o(),Br(g,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Lf=!0)),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ct&127)!==0||eA(d,o,g)}return p.memoizedState=g,s={value:g,getSnapshot:o},p.queue=s,y0(nA.bind(null,d,s,n),[n]),d.flags|=2048,ef(aa|Ur,{destroy:void 0},tA.bind(null,d,s,g,o),null),g}function m0(n,o,s){var d=Je,p=zt(),g=vt;if(g){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");s=s()}else if(s=o(),!Lf){var x=o();Br(s,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Lf=!0)}if(x=!Br((Vt||p).memoizedState,s))p.memoizedState=s,In=!0;p=p.queue;var C=nA.bind(null,d,p,n);if(eo(2048,Ur,C,[n]),p.getSnapshot!==o||x||_n!==null&&_n.memoizedState.tag&aa){if(d.flags|=2048,ef(aa|Ur,{destroy:void 0},tA.bind(null,d,p,s,o),null),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");g||(Es&127)!==0||eA(d,o,s)}return s}function eA(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=Je.updateQueue,o===null?(o=h0(),Je.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function tA(n,o,s,d){o.value=s,o.getSnapshot=d,rA(o)&&oA(n)}function nA(n,o,s){return s(function(){rA(o)&&(pi(2,"updateSyncExternalStore()",n),oA(n))})}function rA(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!Br(n,s)}catch(d){return!0}}function oA(n){var o=wr(n,2);o!==null&&fn(o,n,2)}function X2(n){var o=Pr();if(typeof n==="function"){var s=n;if(n=s(),Ru){qt(!0);try{s()}finally{qt(!1)}}}return o.memoizedState=o.baseState=n,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:n},o}function Q2(n){n=X2(n);var o=n.queue,s=CA.bind(null,Je,o);return o.dispatch=s,[n.memoizedState,s]}function Z2(n){var o=Pr();o.memoizedState=o.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=s,o=pS.bind(null,Je,!0,s),s.dispatch=o,[n,o]}function aA(n,o){var s=zt();return iA(s,Vt,n,o)}function iA(n,o,s,d){return n.baseState=s,Y2(n,Vt,typeof d==="function"?d:La)}function sA(n,o){var s=zt();if(Vt!==null)return iA(s,Vt,n,o);return s.baseState=n,[n,s.queue.dispatch]}function IK(n,o,s,d,p){if(w0(n))throw Error("Cannot update form state while rendering.");if(n=o.action,n!==null){var g={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};oe.T!==null?s(!0):g.isTransition=!1,d(g),s=o.pending,s===null?(g.next=o.pending=g,lA(o,g)):(g.next=s.next,o.pending=s.next=g)}}function lA(n,o){var{action:s,payload:d}=o,p=n.state;if(o.isTransition){var g=oe.T,x={};x._updatedFibers=new Set,oe.T=x;try{var C=s(p,d),T=oe.S;T!==null&&T(x,C),cA(n,o,C)}catch(A){eS(n,o,A)}finally{g!==null&&x.types!==null&&(g.types!==null&&g.types!==x.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),g.types=x.types),oe.T=g,g===null&&x._updatedFibers&&(n=x._updatedFibers.size,x._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{x=s(p,d),cA(n,o,x)}catch(A){eS(n,o,A)}}function cA(n,o,s){s!==null&&typeof s==="object"&&typeof s.then==="function"?(oe.asyncTransitions++,s.then(C0,C0),s.then(function(d){uA(n,o,d)},function(d){return eS(n,o,d)}),o.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):uA(n,o,s)}function uA(n,o,s){o.status="fulfilled",o.value=s,dA(o),n.state=s,o=n.pending,o!==null&&(s=o.next,s===o?n.pending=null:(s=s.next,o.next=s,lA(n,s)))}function eS(n,o,s){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=s,dA(o),o=o.next;while(o!==d)}n.action=null}function dA(n){n=n.listeners;for(var o=0;o<n.length;o++)(0,n[o])()}function fA(n,o){return o}function Zd(n,o){if(vt){var s=jt.formState;if(s!==null){e:{var d=Je;if(vt){if(Xt){t:{var p=Xt;for(var g=na;p.nodeType!==8;){if(!g){p=null;break t}if(p=ko(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g===Nw||g===J7?p:null}if(p){Xt=ko(p.nextSibling),d=p.data===Nw;break e}}$l(d)}d=!1}d&&(o=s[0])}}return s=Pr(),s.memoizedState=s.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fA,lastRenderedState:o},s.queue=d,s=CA.bind(null,Je,d),d.dispatch=s,d=X2(!1),g=pS.bind(null,Je,!1,d.queue),d=Pr(),p={state:o,dispatch:null,action:n,pending:null},d.queue=p,s=IK.bind(null,Je,p,g,s),p.dispatch=s,d.memoizedState=n,[o,s,!1]}function g0(n){var o=zt();return pA(o,Vt,n)}function pA(n,o,s){if(o=Y2(n,o,fA)[0],n=Qd(La)[0],typeof o==="object"&&o!==null&&typeof o.then==="function")try{var d=Nh(o)}catch(x){if(x===Nf)throw vy;throw x}else d=o;o=zt();var p=o.queue,g=p.dispatch;return s!==o.memoizedState&&(Je.flags|=2048,ef(aa|Ur,{destroy:void 0},BK.bind(null,p,s),null)),[d,g,n]}function BK(n,o){n.action=o}function b0(n){var o=zt(),s=Vt;if(s!==null)return pA(o,s,n);zt(),o=o.memoizedState,s=zt();var d=s.queue.dispatch;return s.memoizedState=n,[o,d,!1]}function ef(n,o,s,d){return n={tag:n,create:s,deps:d,inst:o,next:null},o=Je.updateQueue,o===null&&(o=h0(),Je.updateQueue=o),s=o.lastEffect,s===null?o.lastEffect=n.next=n:(d=s.next,s.next=n,n.next=d,o.lastEffect=n),n}function tS(n){var o=Pr();return n={current:n},o.memoizedState=n}function du(n,o,s,d){var p=Pr();Je.flags|=n,p.memoizedState=ef(aa|o,{destroy:void 0},s,d===void 0?null:d)}function eo(n,o,s,d){var p=zt();d=d===void 0?null:d;var g=p.memoizedState.inst;Vt!==null&&d!==null&&F2(d,Vt.memoizedState.deps)?p.memoizedState=ef(o,g,s,d):(Je.flags|=n,p.memoizedState=ef(aa|o,g,s,d))}function y0(n,o){(Je.mode&za)!==We?du(276826112,Ur,n,o):du(8390656,Ur,n,o)}function zK(n){Je.flags|=4;var o=Je.updateQueue;if(o===null)o=h0(),Je.updateQueue=o,o.events=[n];else{var s=o.events;s===null?o.events=[n]:s.push(n)}}function nS(n){var o=Pr(),s={impl:n};return o.memoizedState=s,function(){if((kt&Wn)!==tr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return s.impl.apply(void 0,arguments)}}function v0(n){var o=zt().memoizedState;return zK({ref:o,nextImpl:n}),function(){if((kt&Wn)!==tr)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function rS(n,o){var s=4194308;return(Je.mode&za)!==We&&(s|=134217728),du(s,Po,n,o)}function hA(n,o){if(typeof o==="function"){n=n();var s=o(n);return function(){typeof s==="function"?s():o(null)}}if(o!==null&&o!==void 0)return o.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(o).join(", ")+"}"),n=n(),o.current=n,function(){o.current=null}}function oS(n,o,s){typeof o!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),s=s!==null&&s!==void 0?s.concat([n]):null;var d=4194308;(Je.mode&za)!==We&&(d|=134217728),du(d,Po,hA.bind(null,o,n),s)}function x0(n,o,s){typeof o!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",o!==null?typeof o:"null"),s=s!==null&&s!==void 0?s.concat([n]):null,eo(4,Po,hA.bind(null,o,n),s)}function aS(n,o){return Pr().memoizedState=[n,o===void 0?null:o],n}function $0(n,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&F2(o,d[1]))return d[0];return s.memoizedState=[n,o],n}function iS(n,o){var s=Pr();o=o===void 0?null:o;var d=n();if(Ru){qt(!0);try{n()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function S0(n,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&F2(o,d[1]))return d[0];if(d=n(),Ru){qt(!0);try{n()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function sS(n,o){var s=Pr();return lS(s,n,o)}function mA(n,o){var s=zt();return bA(s,Vt.memoizedState,n,o)}function gA(n,o){var s=zt();return Vt===null?lS(s,n,o):bA(s,Vt.memoizedState,n,o)}function lS(n,o,s){if(s===void 0||(Es&1073741824)!==0&&(ct&261930)===0)return n.memoizedState=o;return n.memoizedState=s,n=yM(),Je.lanes|=n,Yl|=n,s}function bA(n,o,s,d){if(Br(s,o))return s;if(Df.current!==null)return n=lS(n,s,d),Br(n,o)||(In=!0),n;if((Es&42)===0||(Es&1073741824)!==0&&(ct&261930)===0)return In=!0,n.memoizedState=s;return n=yM(),Je.lanes|=n,Yl|=n,o}function C0(){oe.asyncTransitions--}function yA(n,o,s,d,p){var g=It.p;It.p=g!==0&&g<Ba?g:Ba;var x=oe.T,C={};C._updatedFibers=new Set,oe.T=C,pS(n,!1,o,s);try{var T=p(),A=oe.S;if(A!==null&&A(C,T),T!==null&&typeof T==="object"&&typeof T.then==="function"){oe.asyncTransitions++,T.then(C0,C0);var K=PK(T,d);Dh(n,o,K,Ro(n))}else Dh(n,o,d,Ro(n))}catch(q){Dh(n,o,{then:function(){},status:"rejected",reason:q},Ro(n))}finally{It.p=g,x!==null&&C.types!==null&&(x.types!==null&&x.types!==C.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),x.types=C.types),oe.T=x,x===null&&C._updatedFibers&&(n=C._updatedFibers.size,C._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function cS(n,o,s,d){if(n.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var p=vA(n).queue;OK(n),yA(n,p,o,Bu,s===null?h:function(){return xA(n),s(d)})}function vA(n){var o=n.memoizedState;if(o!==null)return o;o={memoizedState:Bu,baseState:Bu,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:Bu},next:null};var s={};return o.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:s},next:null},n.memoizedState=o,n=n.alternate,n!==null&&(n.memoizedState=o),o}function xA(n){oe.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var o=vA(n);o.next===null&&(o=n.alternate.memoizedState),Dh(n,o.next.queue,{},Ro(n))}function uS(){var n=X2(!1);return n=yA.bind(null,Je,n.queue,!0,!1),Pr().memoizedState=n,[!1,n]}function $A(){var n=Qd(La)[0],o=zt().memoizedState;return[typeof n==="boolean"?n:Nh(n),o]}function SA(){var n=Oh(La)[0],o=zt().memoizedState;return[typeof n==="boolean"?n:Nh(n),o]}function fu(){return nn(Fm)}function dS(){var n=Pr(),o=jt.identifierPrefix;if(vt){var s=xs,d=vs;s=(d&~(1<<32-Lr(d)-1)).toString(32)+s,o="_"+o+"R_"+s,s=wy++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=yW++,o="_"+o+"r_"+s.toString(32)+"_";return n.memoizedState=o}function fS(){return Pr().memoizedState=HK.bind(null,Je)}function HK(n,o){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var d=Ro(s),p=wl(d),g=El(s,p,d);g!==null&&(pi(d,"refresh()",n),fn(g,s,d),kh(g,s,d)),n=O2(),o!==null&&o!==void 0&&g!==null&&console.error("The seed argument is not enabled outside experimental channels."),p.payload={cache:n};return}s=s.return}}function UK(n,o,s){var d=arguments;typeof d[3]==="function"&&console.error("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()."),d=Ro(n);var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};w0(n)?wA(o,p):(p=x2(n,o,p,d),p!==null&&(pi(d,"dispatch()",n),fn(p,n,d),EA(p,o,d)))}function CA(n,o,s){var d=arguments;typeof d[3]==="function"&&console.error("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()."),d=Ro(n),Dh(n,o,s,d)&&pi(d,"setState()",n)}function Dh(n,o,s,d){var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(w0(n))wA(o,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null)){var x=oe.H;oe.H=Ua;try{var C=o.lastRenderedState,T=g(C,s);if(p.hasEagerState=!0,p.eagerState=T,Br(T,C))return Jb(n,o,p,0),jt===null&&Yb(),!1}catch(A){}finally{oe.H=x}}if(s=x2(n,o,p,d),s!==null)return fn(s,n,d),EA(s,o,d),!0}return!1}function pS(n,o,s,d){if(oe.T===null&&Su===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),d={lane:2,revertLane:VS(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},w0(n)){if(o)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else o=x2(n,s,d,2),o!==null&&(pi(2,"setOptimistic()",n),fn(o,n,2))}function w0(n){var o=n.alternate;return n===Je||o!==null&&o===Je}function wA(n,o){_f=Cy=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function EA(n,o,s){if((s&4194048)!==0){var d=o.lanes;d&=n.pendingLanes,s|=d,o.lanes=s,Qc(n,s)}}function hS(n){if(n!==null&&typeof n!=="function"){var o=String(n);S7.has(o)||(S7.add(o),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",n))}}function mS(n,o,s,d){var p=n.memoizedState,g=s(d,p);if(n.mode&Tr){qt(!0);try{g=s(d,p)}finally{qt(!1)}}g===void 0&&(o=P(o)||"Component",y7.has(o)||(y7.add(o),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))),p=g===null||g===void 0?p:ft({},p,g),n.memoizedState=p,n.lanes===0&&(n.updateQueue.baseState=p)}function TA(n,o,s,d,p,g,x){var C=n.stateNode;if(typeof C.shouldComponentUpdate==="function"){if(s=C.shouldComponentUpdate(d,g,x),n.mode&Tr){qt(!0);try{s=C.shouldComponentUpdate(d,g,x)}finally{qt(!1)}}return s===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",P(o)||"Component"),s}return o.prototype&&o.prototype.isPureReactComponent?!$h(s,d)||!$h(p,g):!0}function RA(n,o,s,d){var p=o.state;typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps(s,d),typeof o.UNSAFE_componentWillReceiveProps==="function"&&o.UNSAFE_componentWillReceiveProps(s,d),o.state!==p&&(n=J(n)||"Component",p7.has(n)||(p7.add(n),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",n)),cw.enqueueReplaceState(o,o.state,null))}function pu(n,o){var s=o;if("ref"in o){s={};for(var d in o)d!=="ref"&&(s[d]=o[d])}if(n=n.defaultProps){s===o&&(s=ft({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function kA(n){HC(n),console.warn(`%s
121
+
122
+ %s
123
+ `,If?"An error occurred in the <"+If+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
124
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function AA(n){var o=If?"The above error occurred in the <"+If+"> component.":"The above error occurred in one of your React components.",s="React will try to recreate this component tree from scratch using the error boundary you provided, "+((uw||"Anonymous")+".");if(typeof n==="object"&&n!==null&&typeof n.environmentName==="string"){var d=n.environmentName;n=[`%o
125
+
126
+ %s
127
+
128
+ %s
129
+ `,n,o,s].slice(0),typeof n[0]==="string"?n.splice(0,1,o6+" "+n[0],a6,Yy+d+Yy,i6):n.splice(0,0,o6,a6,Yy+d+Yy,i6),n.unshift(console),d=zW.apply(console.error,n),d()}else console.error(`%o
130
+
131
+ %s
132
+
133
+ %s
134
+ `,n,o,s)}function MA(n){HC(n)}function E0(n,o){try{If=o.source?J(o.source):null,uw=null;var s=o.value;if(oe.actQueue!==null)oe.thrownErrors.push(s);else{var d=n.onUncaughtError;d(s,{componentStack:o.stack})}}catch(p){setTimeout(function(){throw p})}}function NA(n,o,s){try{If=s.source?J(s.source):null,uw=J(o);var d=n.onCaughtError;d(s.value,{componentStack:s.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function gS(n,o,s){return s=wl(s),s.tag=rw,s.payload={element:null},s.callback=function(){he(o.source,E0,n,o)},s}function bS(n){return n=wl(n),n.tag=rw,n}function yS(n,o,s,d){var p=s.type.getDerivedStateFromError;if(typeof p==="function"){var g=d.value;n.payload=function(){return p(g)},n.callback=function(){w5(s),he(d.source,NA,o,s,d)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch==="function"&&(n.callback=function(){w5(s),he(d.source,NA,o,s,d),typeof p!=="function"&&(Xl===null?Xl=new Set([this]):Xl.add(this)),hW(this,d),typeof p==="function"||(s.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",J(s)||"Unknown")})}function FK(n,o,s,d,p){if(s.flags|=32768,Mi&&Uh(n,p),d!==null&&typeof d==="object"&&typeof d.then==="function"){if(o=s.alternate,o!==null&&Jd(o,s,p,!0),vt&&(Di=!0),s=Do.current,s!==null){switch(s.tag){case 31:case 13:return oa===null?P0():s.alternate===null&&un===As&&(un=Ry),s.flags&=-257,s.flags|=65536,s.lanes=p,d===xy?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([d]):o.add(d),zS(n,d,p)),!1;case 22:return s.flags|=65536,d===xy?s.flags|=16384:(o=s.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},s.updateQueue=o):(s=o.retryQueue,s===null?o.retryQueue=new Set([d]):s.add(d)),zS(n,d,p)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return zS(n,d,p),P0(),!1}if(vt)return Di=!0,o=Do.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,d!==qC&&Ch(Co(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),s))):(d!==qC&&Ch(Co(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),s)),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,d=Co(d,s),p=gS(n.stateNode,d,p),d0(n,p),un!==Gl&&(un=ku)),!1;var g=Co(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),s);if(Dm===null?Dm=[g]:Dm.push(g),un!==Gl&&(un=ku),o===null)return!0;d=Co(d,s),s=o;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=gS(s.stateNode,d,n),d0(s,n),!1;case 1:if(o=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError==="function"||g!==null&&typeof g.componentDidCatch==="function"&&(Xl===null||!Xl.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=bS(p),yS(p,n,s,d),d0(s,p),!1}s=s.return}while(s!==null);return!1}function sr(n,o,s,d){o.child=n===null?n7(o,null,s,d):Tu(o,n.child,s,d)}function OA(n,o,s,d,p){s=s.render;var g=o.ref;if("ref"in d){var x={};for(var C in d)C!=="ref"&&(x[C]=d[C])}else x=d;if(lu(o),d=V2(n,o,s,x,g,p),C=K2(),n!==null&&!In)return q2(n,o,p),ps(n,o,p);return vt&&C&&T2(o),o.flags|=1,sr(n,o,d,p),o.child}function DA(n,o,s,d,p){if(n===null){var g=s.type;if(typeof g==="function"&&!S2(g)&&g.defaultProps===void 0&&s.compare===null)return s=ou(g),o.tag=15,o.type=s,xS(o,g),PA(n,o,s,d,p);return n=C2(s.type,null,d,o,o.mode,p),n.ref=o.ref,n.return=o,o.child=n}if(g=n.child,!TS(n,p)){var x=g.memoizedProps;if(s=s.compare,s=s!==null?s:$h,s(x,d)&&n.ref===o.ref)return ps(n,o,p)}return o.flags|=1,n=cs(g,d),n.ref=o.ref,n.return=o,o.child=n}function PA(n,o,s,d,p){if(n!==null){var g=n.memoizedProps;if($h(g,d)&&n.ref===o.ref&&o.type===n.type)if(In=!1,o.pendingProps=d=g,TS(n,p))(n.flags&131072)!==0&&(In=!0);else return o.lanes=n.lanes,ps(n,o,p)}return vS(n,o,s,d,p)}function LA(n,o,s,d){var p=d.children,g=n!==null?n.memoizedState:null;if(n===null&&o.stateNode===null&&(o.stateNode={_visibility:lm,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,n!==null){d=o.child=n.child;for(p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~g}else d=0,o.child=null;return _A(n,o,g,s,d)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},n!==null&&a0(o,g!==null?g.cachePool:null),g!==null?X5(o,g):z2(o),Q5(o);else return d=o.lanes=536870912,_A(n,o,g!==null?g.baseLanes|s:s,s,d)}else g!==null?(a0(o,g.cachePool),X5(o,g),Rl(o),o.memoizedState=null):(n!==null&&a0(o,null),z2(o),Rl(o));return sr(n,o,p,s),o.child}function Ph(n,o){return n!==null&&n.tag===22||o.stateNode!==null||(o.stateNode={_visibility:lm,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function _A(n,o,s,d,p){var g=L2();return g=g===null?null:{parent:Pn._currentValue,pool:g},o.memoizedState={baseLanes:s,cachePool:g},n!==null&&a0(o,null),z2(o),Q5(o),n!==null&&Jd(n,o,d,!0),o.childLanes=p,null}function T0(n,o){var s=o.hidden;return s!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
135
+ - <Activity %s>
136
+ + <Activity %s>`,s===!0?"hidden":s===!1?"hidden={false}":"hidden={...}",s?'mode="hidden"':'mode="visible"'),o=k0({mode:o.mode,children:o.children},n.mode),o.ref=n.ref,n.child=o,o.return=n,o}function IA(n,o,s){return Tu(o,n.child,null,s),n=T0(o,o.pendingProps),n.flags|=2,To(o),o.memoizedState=null,n}function VK(n,o,s){var d=o.pendingProps,p=(o.flags&128)!==0;if(o.flags&=-129,n===null){if(vt){if(d.mode==="hidden")return n=T0(o,d),o.lanes=536870912,Ph(null,n);if(U2(o),(n=Xt)?(s=lN(n,na),s=s!==null&&s.data===Pu?s:null,s!==null&&(d={dehydrated:s,treeContext:A5(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=R5(s),d.return=o,o.child=d,ur=o,Xt=null)):s=null,s===null)throw Zb(o,n),$l(o);return o.lanes=536870912,null}return T0(o,d)}var g=n.memoizedState;if(g!==null){var x=g.dehydrated;if(U2(o),p)if(o.flags&256)o.flags&=-257,o=IA(n,o,s);else if(o.memoizedState!==null)o.child=n.child,o.flags|=128,o=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(N5(),(s&536870912)!==0&&D0(o),In||Jd(n,o,s,!1),p=(s&n.childLanes)!==0,In||p){if(d=jt,d!==null&&(x=Zc(d,s),x!==0&&x!==g.retryLane))throw g.retryLane=x,wr(n,x),fn(d,n,x),dw;P0(),o=IA(n,o,s)}else n=g.treeContext,Xt=ko(x.nextSibling),ur=o,vt=!0,Hl=null,Di=!1,Oo=null,na=!1,n!==null&&M5(o,n),o=T0(o,d),o.flags|=4096;return o}return g=n.child,d={mode:d.mode,children:d.children},(s&536870912)!==0&&(s&n.lanes)!==0&&D0(o),n=cs(g,d),n.ref=o.ref,o.child=n,n.return=o,n}function R0(n,o){var s=o.ref;if(s===null)n!==null&&n.ref!==null&&(o.flags|=4194816);else{if(typeof s!=="function"&&typeof s!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(n===null||n.ref!==s)o.flags|=4194816}}function vS(n,o,s,d,p){if(s.prototype&&typeof s.prototype.render==="function"){var g=P(s)||"Unknown";C7[g]||(console.error("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.",g,g),C7[g]=!0)}if(o.mode&Tr&&Ha.recordLegacyContextWarning(o,null),n===null&&(xS(o,o.type),s.contextTypes&&(g=P(s)||"Unknown",E7[g]||(E7[g]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",g)))),lu(o),s=V2(n,o,s,d,void 0,p),d=K2(),n!==null&&!In)return q2(n,o,p),ps(n,o,p);return vt&&d&&T2(o),o.flags|=1,sr(n,o,s,p),o.child}function BA(n,o,s,d,p,g){if(lu(o),Rs=-1,Tm=n!==null&&n.type!==o.type,o.updateQueue=null,s=j2(o,d,s,p),Z5(n,o),d=K2(),n!==null&&!In)return q2(n,o,g),ps(n,o,g);return vt&&d&&T2(o),o.flags|=1,sr(n,o,s,g),o.child}function zA(n,o,s,d,p){switch(c(o)){case!1:var g=o.stateNode,x=new o.type(o.memoizedProps,g.context).state;g.updater.enqueueSetState(g,x,null);break;case!0:o.flags|=128,o.flags|=65536,g=Error("Simulated error coming from DevTools");var C=p&-p;if(o.lanes|=C,x=jt,x===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");C=bS(C),yS(C,x,o,Co(g,o)),d0(o,C)}if(lu(o),o.stateNode===null){if(x=zl,g=s.contextType,"contextType"in s&&g!==null&&(g===void 0||g.$$typeof!==Ri)&&!$7.has(s)&&($7.add(s),C=g===void 0?" 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 g!=="object"?" However, it is set to a "+typeof g+".":g.$$typeof===fC?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(g).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",P(s)||"Component",C)),typeof g==="object"&&g!==null&&(x=nn(g)),g=new s(d,x),o.mode&Tr){qt(!0);try{g=new s(d,x)}finally{qt(!1)}}if(x=o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=cw,o.stateNode=g,g._reactInternals=o,g._reactInternalInstance=f7,typeof s.getDerivedStateFromProps==="function"&&x===null&&(x=P(s)||"Component",h7.has(x)||(h7.add(x),console.error("`%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.",x,g.state===null?"null":"undefined",x))),typeof s.getDerivedStateFromProps==="function"||typeof g.getSnapshotBeforeUpdate==="function"){var T=C=x=null;if(typeof g.componentWillMount==="function"&&g.componentWillMount.__suppressDeprecationWarning!==!0?x="componentWillMount":typeof g.UNSAFE_componentWillMount==="function"&&(x="UNSAFE_componentWillMount"),typeof g.componentWillReceiveProps==="function"&&g.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof g.UNSAFE_componentWillReceiveProps==="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof g.componentWillUpdate==="function"&&g.componentWillUpdate.__suppressDeprecationWarning!==!0?T="componentWillUpdate":typeof g.UNSAFE_componentWillUpdate==="function"&&(T="UNSAFE_componentWillUpdate"),x!==null||C!==null||T!==null){g=P(s)||"Component";var A=typeof s.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";g7.has(g)||(g7.add(g),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
137
+
138
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
139
+
140
+ The above lifecycles should be removed. Learn more about this warning here:
141
+ https://react.dev/link/unsafe-component-lifecycles`,g,A,x!==null?`
142
+ `+x:"",C!==null?`
143
+ `+C:"",T!==null?`
144
+ `+T:""))}}g=o.stateNode,x=P(s)||"Component",g.render||(s.prototype&&typeof s.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",x):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",x)),!g.getInitialState||g.getInitialState.isReactClassApproved||g.state||console.error("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?",x),g.getDefaultProps&&!g.getDefaultProps.isReactClassApproved&&console.error("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.",x),g.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",x),s.childContextTypes&&!x7.has(s)&&(x7.add(s),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",x)),s.contextTypes&&!v7.has(s)&&(v7.add(s),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",x)),typeof g.componentShouldUpdate==="function"&&console.error("%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.",x),s.prototype&&s.prototype.isPureReactComponent&&typeof g.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",P(s)||"A pure component"),typeof g.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",x),typeof g.componentDidReceiveProps==="function"&&console.error("%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().",x),typeof g.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",x),typeof g.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",x),C=g.props!==d,g.props!==void 0&&C&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",x),g.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",x,x),typeof g.getSnapshotBeforeUpdate!=="function"||typeof g.componentDidUpdate==="function"||m7.has(s)||(m7.add(s),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",P(s))),typeof g.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof g.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof s.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",x),(C=g.state)&&(typeof C!=="object"||qn(C))&&console.error("%s.state: must be set to an object or null",x),typeof g.getChildContext==="function"&&typeof s.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",x),g=o.stateNode,g.props=d,g.state=o.memoizedState,g.refs={},I2(o),x=s.contextType,g.context=typeof x==="object"&&x!==null?nn(x):zl,g.state===d&&(x=P(s)||"Component",b7.has(x)||(b7.add(x),console.error("%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.",x))),o.mode&Tr&&Ha.recordLegacyContextWarning(o,g),Ha.recordUnsafeLifecycleWarnings(o,g),g.state=o.memoizedState,x=s.getDerivedStateFromProps,typeof x==="function"&&(mS(o,s,x,d),g.state=o.memoizedState),typeof s.getDerivedStateFromProps==="function"||typeof g.getSnapshotBeforeUpdate==="function"||typeof g.UNSAFE_componentWillMount!=="function"&&typeof g.componentWillMount!=="function"||(x=g.state,typeof g.componentWillMount==="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount==="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J(o)||"Component"),cw.enqueueReplaceState(g,g.state,null)),Mh(o,d,g,p),Ah(),g.state=o.memoizedState),typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),g=!0}else if(n===null){g=o.stateNode;var K=o.memoizedProps;C=pu(s,K),g.props=C;var q=g.context;T=s.contextType,x=zl,typeof T==="object"&&T!==null&&(x=nn(T)),A=s.getDerivedStateFromProps,T=typeof A==="function"||typeof g.getSnapshotBeforeUpdate==="function",K=o.pendingProps!==K,T||typeof g.UNSAFE_componentWillReceiveProps!=="function"&&typeof g.componentWillReceiveProps!=="function"||(K||q!==x)&&RA(o,g,d,x),ql=!1;var I=o.memoizedState;g.state=I,Mh(o,d,g,p),Ah(),q=o.memoizedState,K||I!==q||ql?(typeof A==="function"&&(mS(o,s,A,d),q=o.memoizedState),(C=ql||TA(o,s,C,d,I,q,x))?(T||typeof g.UNSAFE_componentWillMount!=="function"&&typeof g.componentWillMount!=="function"||(typeof g.componentWillMount==="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount==="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728)):(typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),o.memoizedProps=d,o.memoizedState=q),g.props=d,g.state=q,g.context=x,g=C):(typeof g.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),g=!1)}else{g=o.stateNode,B2(n,o),x=o.memoizedProps,T=pu(s,x),g.props=T,A=o.pendingProps,I=g.context,q=s.contextType,C=zl,typeof q==="object"&&q!==null&&(C=nn(q)),K=s.getDerivedStateFromProps,(q=typeof K==="function"||typeof g.getSnapshotBeforeUpdate==="function")||typeof g.UNSAFE_componentWillReceiveProps!=="function"&&typeof g.componentWillReceiveProps!=="function"||(x!==A||I!==C)&&RA(o,g,d,C),ql=!1,I=o.memoizedState,g.state=I,Mh(o,d,g,p),Ah();var te=o.memoizedState;x!==A||I!==te||ql||n!==null&&n.dependencies!==null&&t0(n.dependencies)?(typeof K==="function"&&(mS(o,s,K,d),te=o.memoizedState),(T=ql||TA(o,s,T,d,I,te,C)||n!==null&&n.dependencies!==null&&t0(n.dependencies))?(q||typeof g.UNSAFE_componentWillUpdate!=="function"&&typeof g.componentWillUpdate!=="function"||(typeof g.componentWillUpdate==="function"&&g.componentWillUpdate(d,te,C),typeof g.UNSAFE_componentWillUpdate==="function"&&g.UNSAFE_componentWillUpdate(d,te,C)),typeof g.componentDidUpdate==="function"&&(o.flags|=4),typeof g.getSnapshotBeforeUpdate==="function"&&(o.flags|=1024)):(typeof g.componentDidUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=te),g.props=d,g.state=te,g.context=C,g=T):(typeof g.componentDidUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=1024),g=!1)}if(C=g,R0(n,o),x=(o.flags&128)!==0,C||x){if(C=o.stateNode,ln(o),x&&typeof s.getDerivedStateFromError!=="function")s=null,zr=-1;else if(s=F8(C),o.mode&Tr){qt(!0);try{F8(C)}finally{qt(!1)}}o.flags|=1,n!==null&&x?(o.child=Tu(o,n.child,null,p),o.child=Tu(o,null,s,p)):sr(n,o,s,p),o.memoizedState=C.state,n=o.child}else n=ps(n,o,p);return p=o.stateNode,g&&p.props!==d&&(Bf||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",J(o)||"a component"),Bf=!0),n}function HA(n,o,s,d){return su(),o.flags|=256,sr(n,o,s,d),o.child}function xS(n,o){o&&o.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
145
+ %s.childContextTypes = ...`,o.displayName||o.name||"Component"),typeof o.getDerivedStateFromProps==="function"&&(n=P(o)||"Unknown",T7[n]||(console.error("%s: Function components do not support getDerivedStateFromProps.",n),T7[n]=!0)),typeof o.contextType==="object"&&o.contextType!==null&&(o=P(o)||"Unknown",w7[o]||(console.error("%s: Function components do not support contextType.",o),w7[o]=!0))}function $S(n){return{baseLanes:n,cachePool:B5()}}function SS(n,o,s){return n=n!==null?n.childLanes&~s:0,o&&(n|=ao),n}function UA(n,o,s){var d,p=o.pendingProps;l(o)&&(o.flags|=128);var g=!1,x=(o.flags&128)!==0;if((d=x)||(d=n!==null&&n.memoizedState===null?!1:(kn.current&wm)!==0),d&&(g=!0,o.flags&=-129),d=(o.flags&32)!==0,o.flags&=-33,n===null){if(vt){if(g?Tl(o):Rl(o),(n=Xt)?(s=lN(n,na),s=s!==null&&s.data!==Pu?s:null,s!==null&&(d={dehydrated:s,treeContext:A5(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=R5(s),d.return=o,o.child=d,ur=o,Xt=null)):s=null,s===null)throw Zb(o,n),$l(o);return tC(s)?o.lanes=32:o.lanes=536870912,null}var C=p.children;if(p=p.fallback,g){Rl(o);var T=o.mode;return C=k0({mode:"hidden",children:C},T),p=au(p,T,s,null),C.return=o,p.return=o,C.sibling=p,o.child=C,p=o.child,p.memoizedState=$S(s),p.childLanes=SS(n,d,s),o.memoizedState=fw,Ph(null,p)}return Tl(o),CS(o,C)}var A=n.memoizedState;if(A!==null){var K=A.dehydrated;if(K!==null){if(x)o.flags&256?(Tl(o),o.flags&=-257,o=wS(n,o,s)):o.memoizedState!==null?(Rl(o),o.child=n.child,o.flags|=128,o=null):(Rl(o),C=p.fallback,T=o.mode,p=k0({mode:"visible",children:p.children},T),C=au(C,T,s,null),C.flags|=2,p.return=o,C.return=o,p.sibling=C,o.child=p,Tu(o,n.child,null,s),p=o.child,p.memoizedState=$S(s),p.childLanes=SS(n,d,s),o.memoizedState=fw,o=Ph(null,p));else if(Tl(o),N5(),(s&536870912)!==0&&D0(o),tC(K)){if(d=K.nextSibling&&K.nextSibling.dataset,d){C=d.dgst;var q=d.msg;T=d.stck;var I=d.cstck}g=q,d=C,p=T,K=I,C=g,T=K,C=C?Error(C):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),C.stack=p||"",C.digest=d,d=T===void 0?null:T,p={value:C,source:null,stack:d},typeof d==="string"&&KC.set(C,p),Ch(p),o=wS(n,o,s)}else if(In||Jd(n,o,s,!1),d=(s&n.childLanes)!==0,In||d){if(d=jt,d!==null&&(p=Zc(d,s),p!==0&&p!==A.retryLane))throw A.retryLane=p,wr(n,p),fn(d,n,p),dw;eC(K)||P0(),o=wS(n,o,s)}else eC(K)?(o.flags|=192,o.child=n.child,o=null):(n=A.treeContext,Xt=ko(K.nextSibling),ur=o,vt=!0,Hl=null,Di=!1,Oo=null,na=!1,n!==null&&M5(o,n),o=CS(o,p.children),o.flags|=4096);return o}}if(g)return Rl(o),C=p.fallback,T=o.mode,I=n.child,K=I.sibling,p=cs(I,{mode:"hidden",children:p.children}),p.subtreeFlags=I.subtreeFlags&65011712,K!==null?C=cs(K,C):(C=au(C,T,s,null),C.flags|=2),C.return=o,p.return=o,p.sibling=C,o.child=p,Ph(null,p),p=o.child,C=n.child.memoizedState,C===null?C=$S(s):(T=C.cachePool,T!==null?(I=Pn._currentValue,T=T.parent!==I?{parent:I,pool:I}:T):T=B5(),C={baseLanes:C.baseLanes|s,cachePool:T}),p.memoizedState=C,p.childLanes=SS(n,d,s),o.memoizedState=fw,Ph(n.child,p);return A!==null&&(s&62914560)===s&&(s&n.lanes)!==0&&D0(o),Tl(o),s=n.child,n=s.sibling,s=cs(s,{mode:"visible",children:p.children}),s.return=o,s.sibling=null,n!==null&&(d=o.deletions,d===null?(o.deletions=[n],o.flags|=16):d.push(n)),o.child=s,o.memoizedState=null,s}function CS(n,o){return o=k0({mode:"visible",children:o},n.mode),o.return=n,n.child=o}function k0(n,o){return n=y(22,n,null,o),n.lanes=0,n}function wS(n,o,s){return Tu(o,n.child,null,s),n=CS(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function FA(n,o,s){n.lanes|=o;var d=n.alternate;d!==null&&(d.lanes|=o),M2(n.return,o,s)}function ES(n,o,s,d,p,g){var x=n.memoizedState;x===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:p,treeForkCount:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=s,x.tailMode=p,x.treeForkCount=g)}function VA(n,o,s){var d=o.pendingProps,p=d.revealOrder,g=d.tail,x=d.children,C=kn.current;if((d=(C&wm)!==0)?(C=C&Pf|wm,o.flags|=128):C&=Pf,se(kn,C,o),C=p==null?"null":p,p!=="forwards"&&p!=="unstable_legacy-backwards"&&p!=="together"&&p!=="independent"&&!R7[C])if(R7[C]=!0,p==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(p==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof p==="string")switch(p.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',p,p.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',p,p.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',p)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',p);if(C=g==null?"null":g,!Ty[C])if(g==null){if(p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")Ty[C]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')}else g!=="visible"&&g!=="collapsed"&&g!=="hidden"?(Ty[C]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',g)):p!=="forwards"&&p!=="backwards"&&p!=="unstable_legacy-backwards"&&(Ty[C]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',g));e:if((p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")&&x!==void 0&&x!==null&&x!==!1)if(qn(x)){for(C=0;C<x.length;C++)if(!W5(x[C],C))break e}else if(C=U(x),typeof C==="function"){if(C=C.call(x))for(var T=C.next(),A=0;!T.done;T=C.next()){if(!W5(T.value,A))break e;A++}}else console.error('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?',p);if(sr(n,o,x,s),vt?(xl(),x=cm):x=0,!d&&n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&FA(n,s,o);else if(n.tag===19)FA(n,s,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":s=o.child;for(p=null;s!==null;)n=s.alternate,n!==null&&f0(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=o.child,o.child=null):(p=s.sibling,s.sibling=null),ES(o,!1,p,s,g,x);break;case"backwards":case"unstable_legacy-backwards":s=null,p=o.child;for(o.child=null;p!==null;){if(n=p.alternate,n!==null&&f0(n)===null){o.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}ES(o,!0,s,null,g,x);break;case"together":ES(o,!1,null,null,void 0,x);break;default:o.memoizedState=null}return o.child}function ps(n,o,s){if(n!==null&&(o.dependencies=n.dependencies),zr=-1,Yl|=o.lanes,(s&o.childLanes)===0)if(n!==null){if(Jd(n,o,s,!1),(s&o.childLanes)===0)return null}else return null;if(n!==null&&o.child!==n.child)throw Error("Resuming work not yet implemented.");if(o.child!==null){n=o.child,s=cs(n,n.pendingProps),o.child=s;for(s.return=o;n.sibling!==null;)n=n.sibling,s=s.sibling=cs(n,n.pendingProps),s.return=o;s.sibling=null}return o.child}function TS(n,o){if((n.lanes&o)!==0)return!0;return n=n.dependencies,n!==null&&t0(n)?!0:!1}function jK(n,o,s){switch(o.tag){case 3:W(o,o.stateNode.containerInfo),Sl(o,Pn,n.memoizedState.cache),su();break;case 27:case 5:pe(o);break;case 4:W(o,o.stateNode.containerInfo);break;case 10:Sl(o,o.type,o.memoizedProps.value);break;case 12:(s&o.childLanes)!==0&&(o.flags|=4),o.flags|=2048;var d=o.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(o.memoizedState!==null)return o.flags|=128,U2(o),null;break;case 13:if(d=o.memoizedState,d!==null){if(d.dehydrated!==null)return Tl(o),o.flags|=128,null;if((s&o.child.childLanes)!==0)return UA(n,o,s);return Tl(o),n=ps(n,o,s),n!==null?n.sibling:null}Tl(o);break;case 19:var p=(n.flags&128)!==0;if(d=(s&o.childLanes)!==0,d||(Jd(n,o,s,!1),d=(s&o.childLanes)!==0),p){if(d)return VA(n,o,s);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),se(kn,kn.current,o),d)break;else return null;case 22:return o.lanes=0,LA(n,o,s,o.pendingProps);case 24:Sl(o,Pn,n.memoizedState.cache)}return ps(n,o,s)}function RS(n,o,s){if(o._debugNeedsRemount&&n!==null){s=C2(o.type,o.key,o.pendingProps,o._debugOwner||null,o.mode,o.lanes),s._debugStack=o._debugStack,s._debugTask=o._debugTask;var d=o.return;if(d===null)throw Error("Cannot swap the root fiber.");if(n.alternate=null,o.alternate=null,s.index=o.index,s.sibling=o.sibling,s.return=o.return,s.ref=o.ref,s._debugInfo=o._debugInfo,o===d.child)d.child=s;else{var p=d.child;if(p===null)throw Error("Expected parent to have a child.");for(;p.sibling!==o;)if(p=p.sibling,p===null)throw Error("Expected to find the previous sibling.");p.sibling=s}return o=d.deletions,o===null?(d.deletions=[n],d.flags|=16):o.push(n),s.flags|=2,s}if(n!==null)if(n.memoizedProps!==o.pendingProps||o.type!==n.type)In=!0;else{if(!TS(n,s)&&(o.flags&128)===0)return In=!1,jK(n,o,s);In=(n.flags&131072)!==0?!0:!1}else{if(In=!1,d=vt)xl(),d=(o.flags&1048576)!==0;d&&(d=o.index,xl(),k5(o,cm,d))}switch(o.lanes=0,o.tag){case 16:e:if(d=o.pendingProps,n=Cl(o.elementType),o.type=n,typeof n==="function")S2(n)?(d=pu(n,d),o.tag=1,o.type=n=ou(n),o=zA(null,o,n,d,s)):(o.tag=0,xS(o,n),o.type=n=ou(n),o=vS(null,o,n,d,s));else{if(n!==void 0&&n!==null){if(p=n.$$typeof,p===Jh){o.tag=11,o.type=n=$2(n),o=OA(null,o,n,d,s);break e}else if(p===W0){o.tag=14,o=DA(null,o,n,d,s);break e}}throw o="",n!==null&&typeof n==="object"&&n.$$typeof===Ao&&(o=" Did you wrap a component in React.lazy() more than once?"),s=P(n)||n,Error("Element type is invalid. Received a promise that resolves to: "+s+". Lazy element type must resolve to a class or function."+o)}return o;case 0:return vS(n,o,o.type,o.pendingProps,s);case 1:return d=o.type,p=pu(d,o.pendingProps),zA(n,o,d,p,s);case 3:e:{if(W(o,o.stateNode.containerInfo),n===null)throw Error("Should have a current fiber. This is a bug in React.");d=o.pendingProps;var g=o.memoizedState;p=g.element,B2(n,o),Mh(o,d,null,s);var x=o.memoizedState;if(d=x.cache,Sl(o,Pn,d),d!==g.cache&&N2(o,[Pn],s,!0),Ah(),d=x.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:x.cache},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){o=HA(n,o,d,s);break e}else if(d!==p){p=Co(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),o),Ch(p),o=HA(n,o,d,s);break e}else{switch(n=o.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}Xt=ko(n.firstChild),ur=o,vt=!0,Hl=null,Di=!1,Oo=null,na=!0,s=n7(o,null,d,s);for(o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(su(),d===p){o=ps(n,o,s);break e}sr(n,o,d,s)}o=o.child}return o;case 26:return R0(n,o),n===null?(s=hN(o.type,null,o.pendingProps,null))?o.memoizedState=s:vt||(s=o.type,n=o.pendingProps,d=_(Dl.current),d=B0(d).createElement(s),d[cr]=o,d[_r]=n,lr(d,s,n),je(d),o.stateNode=d):o.memoizedState=hN(o.type,n.memoizedProps,o.pendingProps,n.memoizedState),null;case 27:return pe(o),n===null&&vt&&(d=_(Dl.current),p=Z(),d=o.stateNode=fN(o.type,o.pendingProps,d,p,!1),Di||(p=eN(d,o.type,o.pendingProps,p),p!==null&&(iu(o,0).serverProps=p)),ur=o,na=!0,p=Xt,Nl(o.type)?(Lw=p,Xt=ko(d.firstChild)):Xt=p),sr(n,o,o.pendingProps.children,s),R0(n,o),n===null&&(o.flags|=4194304),o.child;case 5:return n===null&&vt&&(g=Z(),d=p2(o.type,g.ancestorInfo),p=Xt,(x=!p)||(x=Oq(p,o.type,o.pendingProps,na),x!==null?(o.stateNode=x,Di||(g=eN(x,o.type,o.pendingProps,g),g!==null&&(iu(o,0).serverProps=g)),ur=o,Xt=ko(x.firstChild),na=!1,g=!0):g=!1,x=!g),x&&(d&&Zb(o,p),$l(o))),pe(o),p=o.type,g=o.pendingProps,x=n!==null?n.memoizedProps:null,d=g.children,QS(p,g)?d=null:x!==null&&QS(p,x)&&(o.flags|=32),o.memoizedState!==null&&(p=V2(n,o,_K,null,null,s),Fm._currentValue=p),R0(n,o),sr(n,o,d,s),o.child;case 6:return n===null&&vt&&(s=o.pendingProps,n=Z(),d=n.ancestorInfo.current,s=d!=null?Vb(s,d.tag,n.ancestorInfo.implicitRootScope):!0,n=Xt,(d=!n)||(d=Dq(n,o.pendingProps,na),d!==null?(o.stateNode=d,ur=o,Xt=null,d=!0):d=!1,d=!d),d&&(s&&Zb(o,n),$l(o))),null;case 13:return UA(n,o,s);case 4:return W(o,o.stateNode.containerInfo),d=o.pendingProps,n===null?o.child=Tu(o,null,d,s):sr(n,o,d,s),o.child;case 11:return OA(n,o,o.type,o.pendingProps,s);case 7:return sr(n,o,o.pendingProps,s),o.child;case 8:return sr(n,o,o.pendingProps.children,s),o.child;case 12:return o.flags|=4,o.flags|=2048,d=o.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,sr(n,o,o.pendingProps.children,s),o.child;case 10:return d=o.type,p=o.pendingProps,g=p.value,"value"in p||k7||(k7=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Sl(o,d,g),sr(n,o,p.children,s),o.child;case 9:return p=o.type._context,d=o.pendingProps.children,typeof d!=="function"&&console.error("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."),lu(o),p=nn(p),d=ZC(d,p,void 0),o.flags|=1,sr(n,o,d,s),o.child;case 14:return DA(n,o,o.type,o.pendingProps,s);case 15:return PA(n,o,o.type,o.pendingProps,s);case 19:return VA(n,o,s);case 31:return VK(n,o,s);case 22:return LA(n,o,s,o.pendingProps);case 24:return lu(o),d=nn(Pn),n===null?(p=L2(),p===null&&(p=jt,g=O2(),p.pooledCache=g,cu(g),g!==null&&(p.pooledCacheLanes|=s),p=g),o.memoizedState={parent:d,cache:p},I2(o),Sl(o,Pn,p)):((n.lanes&s)!==0&&(B2(n,o),Mh(o,null,null,s),Ah()),p=n.memoizedState,g=o.memoizedState,p.parent!==d?(p={parent:d,cache:d},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),Sl(o,Pn,d)):(d=g.cache,Sl(o,Pn,d),d!==p.cache&&N2(o,[Pn],s,!0))),sr(n,o,o.pendingProps.children,s),o.child;case 29:throw o.pendingProps}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function hs(n){n.flags|=4}function kS(n,o,s,d,p){if(o=(n.mode&uW)!==We)o=!1;if(o){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(SM())n.flags|=8192;else throw Eu=xy,tw}else n.flags&=-16777217}function jA(n,o){if(o.type!=="stylesheet"||(o.state.loading&sa)!==Iu)n.flags&=-16777217;else if(n.flags|=16777216,!vN(o))if(SM())n.flags|=8192;else throw Eu=xy,tw}function A0(n,o){o!==null&&(n.flags|=4),n.flags&16384&&(o=n.tag!==22?jd():536870912,n.lanes|=o,Nu|=o)}function Lh(n,o){if(!vt)switch(n.tailMode){case"hidden":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}function Gt(n){var o=n.alternate!==null&&n.alternate.child===n.child,s=0,d=0;if(o)if((n.mode&st)!==We){for(var{selfBaseDuration:p,child:g}=n;g!==null;)s|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,p+=g.treeBaseDuration,g=g.sibling;n.treeBaseDuration=p}else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=n,p=p.sibling;else if((n.mode&st)!==We){p=n.actualDuration,g=n.selfBaseDuration;for(var x=n.child;x!==null;)s|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,p+=x.actualDuration,g+=x.treeBaseDuration,x=x.sibling;n.actualDuration=p,n.treeBaseDuration=g}else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=d,n.childLanes=s,o}function KK(n,o,s){var d=o.pendingProps;switch(R2(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(o),null;case 1:return Gt(o),null;case 3:if(s=o.stateNode,d=null,n!==null&&(d=n.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),ds(Pn,o),Y(o),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),n===null||n.child===null)Yd(o)?(A2(),hs(o)):n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,k2());return Gt(o),null;case 26:var{type:p,memoizedState:g}=o;return n===null?(hs(o),g!==null?(Gt(o),jA(o,g)):(Gt(o),kS(o,p,null,d,s))):g?g!==n.memoizedState?(hs(o),Gt(o),jA(o,g)):(Gt(o),o.flags&=-16777217):(n=n.memoizedProps,n!==d&&hs(o),Gt(o),kS(o,p,n,d,s)),null;case 27:if(V(o),s=_(Dl.current),p=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==d&&hs(o);else{if(!d){if(o.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 Gt(o),null}n=Z(),Yd(o)?O5(o,n):(n=fN(p,d,s,n,!0),o.stateNode=n,hs(o))}return Gt(o),null;case 5:if(V(o),p=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==d&&hs(o);else{if(!d){if(o.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 Gt(o),null}var x=Z();if(Yd(o))O5(o,x);else{switch(g=_(Dl.current),p2(p,x.ancestorInfo),x=x.context,g=B0(g),x){case qf:g=g.createElementNS(gf,p);break;case qy:g=g.createElementNS(ty,p);break;default:switch(p){case"svg":g=g.createElementNS(gf,p);break;case"math":g=g.createElementNS(ty,p);break;case"script":g=g.createElement("div"),g.innerHTML="<script></script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof d.is==="string"?g.createElement("select",{is:d.is}):g.createElement("select"),d.multiple?g.multiple=!0:d.size&&(g.size=d.size);break;default:g=typeof d.is==="string"?g.createElement(p,{is:d.is}):g.createElement(p),p.indexOf("-")===-1&&(p!==p.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",p),Object.prototype.toString.call(g)!=="[object HTMLUnknownElement]"||Ia.call(Q7,p)||(Q7[p]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",p)))}}g[cr]=o,g[_r]=d;e:for(x=o.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===o)break e;for(;x.sibling===null;){if(x.return===null||x.return===o)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}o.stateNode=g;e:switch(lr(g,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&hs(o)}}return Gt(o),kS(o,o.type,n===null?null:n.memoizedProps,o.pendingProps,s),null;case 6:if(n&&o.stateNode!=null)n.memoizedProps!==d&&hs(o);else{if(typeof d!=="string"&&o.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.");if(n=_(Dl.current),s=Z(),Yd(o)){if(n=o.stateNode,s=o.memoizedProps,p=!Di,d=null,g=ur,g!==null)switch(g.tag){case 3:p&&(p=uN(n,s,d),p!==null&&(iu(o,0).serverProps=p));break;case 27:case 5:d=g.memoizedProps,p&&(p=uN(n,s,d),p!==null&&(iu(o,0).serverProps=p))}n[cr]=o,n=n.nodeValue===s||d!==null&&d.suppressHydrationWarning===!0||YM(n.nodeValue,s)?!0:!1,n||$l(o,!0)}else p=s.ancestorInfo.current,p!=null&&Vb(d,p.tag,s.ancestorInfo.implicitRootScope),n=B0(n).createTextNode(d),n[cr]=o,o.stateNode=n}return Gt(o),null;case 31:if(s=o.memoizedState,n===null||n.memoizedState!==null){if(d=Yd(o),s!==null){if(n===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(n=o.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");n[cr]=o,Gt(o),(o.mode&st)!==We&&s!==null&&(n=o.child,n!==null&&(o.treeBaseDuration-=n.treeBaseDuration))}else A2(),su(),(o.flags&128)===0&&(s=o.memoizedState=null),o.flags|=4,Gt(o),(o.mode&st)!==We&&s!==null&&(n=o.child,n!==null&&(o.treeBaseDuration-=n.treeBaseDuration));n=!1}else s=k2(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n){if(o.flags&256)return To(o),o;return To(o),null}if((o.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Gt(o),null;case 13:if(d=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=d,g=Yd(o),p!==null&&p.dehydrated!==null){if(n===null){if(!g)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");g[cr]=o,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration))}else A2(),su(),(o.flags&128)===0&&(p=o.memoizedState=null),o.flags|=4,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration));p=!1}else p=k2(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p){if(o.flags&256)return To(o),o;return To(o),null}}if(To(o),(o.flags&128)!==0)return o.lanes=s,(o.mode&st)!==We&&Th(o),o;return s=d!==null,n=n!==null&&n.memoizedState!==null,s&&(d=o.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),g=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),g!==p&&(d.flags|=2048)),s!==n&&s&&(o.child.flags|=8192),A0(o,o.updateQueue),Gt(o),(o.mode&st)!==We&&s&&(n=o.child,n!==null&&(o.treeBaseDuration-=n.treeBaseDuration)),null;case 4:return Y(o),n===null&&KS(o.stateNode.containerInfo),Gt(o),null;case 10:return ds(o.type,o),Gt(o),null;case 19:if(ce(kn,o),d=o.memoizedState,d===null)return Gt(o),null;if(p=(o.flags&128)!==0,g=d.rendering,g===null)if(p)Lh(d,!1);else{if(un!==As||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(g=f0(n),g!==null){o.flags|=128,Lh(d,!1),n=g.updateQueue,o.updateQueue=n,A0(o,n),o.subtreeFlags=0,n=s;for(s=o.child;s!==null;)T5(s,n),s=s.sibling;return se(kn,kn.current&Pf|wm,o),vt&&us(o,d.treeForkCount),o.child}n=n.sibling}d.tail!==null&&Qn()>Dy&&(o.flags|=128,p=!0,Lh(d,!1),o.lanes=4194304)}else{if(!p)if(n=f0(g),n!==null){if(o.flags|=128,p=!0,n=n.updateQueue,o.updateQueue=n,A0(o,n),Lh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!vt)return Gt(o),null}else 2*Qn()-d.renderingStartTime>Dy&&s!==536870912&&(o.flags|=128,p=!0,Lh(d,!1),o.lanes=4194304);d.isBackwards?(g.sibling=o.child,o.child=g):(n=d.last,n!==null?n.sibling=g:o.child=g,d.last=g)}if(d.tail!==null)return n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=Qn(),n.sibling=null,s=kn.current,s=p?s&Pf|wm:s&Pf,se(kn,s,o),vt&&us(o,d.treeForkCount),n;return Gt(o),null;case 22:case 23:return To(o),H2(o),d=o.memoizedState!==null,n!==null?n.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(s&536870912)!==0&&(o.flags&128)===0&&(Gt(o),o.subtreeFlags&6&&(o.flags|=8192)):Gt(o),s=o.updateQueue,s!==null&&A0(o,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==s&&(o.flags|=2048),n!==null&&ce(Cu,o),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),o.memoizedState.cache!==s&&(o.flags|=2048),ds(Pn,o),Gt(o),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+o.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function qK(n,o){switch(R2(o),o.tag){case 1:return n=o.flags,n&65536?(o.flags=n&-65537|128,(o.mode&st)!==We&&Th(o),o):null;case 3:return ds(Pn,o),Y(o),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 26:case 27:case 5:return V(o),null;case 31:if(o.memoizedState!==null){if(To(o),o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");su()}return n=o.flags,n&65536?(o.flags=n&-65537|128,(o.mode&st)!==We&&Th(o),o):null;case 13:if(To(o),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");su()}return n=o.flags,n&65536?(o.flags=n&-65537|128,(o.mode&st)!==We&&Th(o),o):null;case 19:return ce(kn,o),null;case 4:return Y(o),null;case 10:return ds(o.type,o),null;case 22:case 23:return To(o),H2(o),n!==null&&ce(Cu,o),n=o.flags,n&65536?(o.flags=n&-65537|128,(o.mode&st)!==We&&Th(o),o):null;case 24:return ds(Pn,o),null;case 25:return null;default:return null}}function KA(n,o){switch(R2(o),o.tag){case 3:ds(Pn,o),Y(o);break;case 26:case 27:case 5:V(o);break;case 4:Y(o);break;case 31:o.memoizedState!==null&&To(o);break;case 13:To(o);break;case 19:ce(kn,o);break;case 10:ds(o.type,o);break;case 22:case 23:To(o),H2(o),n!==null&&ce(Cu,o);break;case 24:ds(Pn,o)}}function xi(n){return(n.mode&st)!==We}function qA(n,o){xi(n)?(vi(),_h(o,n),yi()):_h(o,n)}function AS(n,o,s){xi(n)?(vi(),tf(s,n,o),yi()):tf(s,n,o)}function _h(n,o){try{var s=o.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var p=d.next;s=p;do{if((s.tag&n)===n&&(d=void 0,(n&Hr)!==Sy&&(Vf=!0),d=he(o,mW,s),(n&Hr)!==Sy&&(Vf=!1),d!==void 0&&typeof d!=="function")){var g=void 0;g=(s.tag&Po)!==0?"useLayoutEffect":(s.tag&Hr)!==0?"useInsertionEffect":"useEffect";var x=void 0;x=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then==="function"?`
146
+
147
+ It looks like you wrote `+g+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
148
+
149
+ `+g+`(() => {
150
+ async function fetchData() {
151
+ // You can await here
152
+ const response = await MyAPI.getData(someId);
153
+ // ...
154
+ }
155
+ fetchData();
156
+ }, [someId]); // Or [] if effect doesn't need props or state
157
+
158
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+d,he(o,function(C,T){console.error("%s must not return anything besides a function, which is used for clean-up.%s",C,T)},g,x)}s=s.next}while(s!==p)}}catch(C){_t(o,o.return,C)}}function tf(n,o,s){try{var d=o.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var g=p.next;d=g;do{if((d.tag&n)===n){var x=d.inst,C=x.destroy;C!==void 0&&(x.destroy=void 0,(n&Hr)!==Sy&&(Vf=!0),p=o,he(p,gW,p,s,C),(n&Hr)!==Sy&&(Vf=!1))}d=d.next}while(d!==g)}}catch(T){_t(o,o.return,T)}}function GA(n,o){xi(n)?(vi(),_h(o,n),yi()):_h(o,n)}function MS(n,o,s){xi(n)?(vi(),tf(s,n,o),yi()):tf(s,n,o)}function WA(n){var o=n.updateQueue;if(o!==null){var s=n.stateNode;n.type.defaultProps||"ref"in n.memoizedProps||Bf||(s.props!==n.memoizedProps&&console.error("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.",J(n)||"instance"),s.state!==n.memoizedState&&console.error("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.",J(n)||"instance"));try{he(n,J5,o,s)}catch(d){_t(n,n.return,d)}}}function GK(n,o,s){return n.getSnapshotBeforeUpdate(o,s)}function WK(n,o){var{memoizedProps:s,memoizedState:d}=o;o=n.stateNode,n.type.defaultProps||"ref"in n.memoizedProps||Bf||(o.props!==n.memoizedProps&&console.error("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.",J(n)||"instance"),o.state!==n.memoizedState&&console.error("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.",J(n)||"instance"));try{var p=pu(n.type,s),g=he(n,GK,o,p,d);s=A7,g!==void 0||s.has(n.type)||(s.add(n.type),he(n,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",J(n))})),o.__reactInternalSnapshotBeforeUpdate=g}catch(x){_t(n,n.return,x)}}function YA(n,o,s){s.props=pu(n.type,n.memoizedProps),s.state=n.memoizedState,xi(n)?(vi(),he(n,W8,n,o,s),yi()):he(n,W8,n,o,s)}function YK(n){var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var s=n.stateNode;break;case 30:s=n.stateNode;break;default:s=n.stateNode}if(typeof o==="function")if(xi(n))try{vi(),n.refCleanup=o(s)}finally{yi()}else n.refCleanup=o(s);else typeof o==="string"?console.error("String refs are no longer supported."):o.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",J(n)),o.current=s}}function Ih(n,o){try{he(n,YK,n)}catch(s){_t(n,o,s)}}function $i(n,o){var{ref:s,refCleanup:d}=n;if(s!==null)if(typeof d==="function")try{if(xi(n))try{vi(),he(n,d)}finally{yi(n)}else he(n,d)}catch(p){_t(n,o,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s==="function")try{if(xi(n))try{vi(),he(n,s,null)}finally{yi(n)}else he(n,s,null)}catch(p){_t(n,o,p)}else s.current=null}function JA(n,o,s,d){var p=n.memoizedProps,g=p.id,x=p.onCommit;p=p.onRender,o=o===null?"mount":"update",gy&&(o="nested-update"),typeof p==="function"&&p(g,o,n.actualDuration,n.treeBaseDuration,n.actualStartTime,s),typeof x==="function"&&x(g,o,d,s)}function JK(n,o,s,d){var p=n.memoizedProps;n=p.id,p=p.onPostCommit,o=o===null?"mount":"update",gy&&(o="nested-update"),typeof p==="function"&&p(n,o,d,s)}function XA(n){var{type:o,memoizedProps:s,stateNode:d}=n;try{he(n,xq,d,o,s,n)}catch(p){_t(n,n.return,p)}}function NS(n,o,s){try{he(n,Sq,n.stateNode,n.type,s,o,n)}catch(d){_t(n,n.return,d)}}function QA(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Nl(n.type)||n.tag===4}function OS(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||QA(n.return))return null;n=n.return}n.sibling.return=n.return;for(n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Nl(n.type))continue e;if(n.flags&2)continue e;if(n.child===null||n.tag===4)continue e;else n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function DS(n,o,s){var d=n.tag;if(d===5||d===6)n=n.stateNode,o?(aN(s),(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,o)):(aN(s),o=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,o.appendChild(n),s=s._reactRootContainer,s!==null&&s!==void 0||o.onclick!==null||(o.onclick=ls));else if(d!==4&&(d===27&&Nl(n.type)&&(s=n.stateNode,o=null),n=n.child,n!==null))for(DS(n,o,s),n=n.sibling;n!==null;)DS(n,o,s),n=n.sibling}function M0(n,o,s){var d=n.tag;if(d===5||d===6)n=n.stateNode,o?s.insertBefore(n,o):s.appendChild(n);else if(d!==4&&(d===27&&Nl(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(M0(n,o,s),n=n.sibling;n!==null;)M0(n,o,s),n=n.sibling}function XK(n){for(var o,s=n.return;s!==null;){if(QA(s)){o=s;break}s=s.return}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.");switch(o.tag){case 27:o=o.stateNode,s=OS(n),M0(n,s,o);break;case 5:s=o.stateNode,o.flags&32&&(oN(s),o.flags&=-33),o=OS(n),M0(n,o,s);break;case 3:case 4:o=o.stateNode.containerInfo,s=OS(n),DS(n,s,o);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function ZA(n){var{stateNode:o,memoizedProps:s}=n;try{he(n,Bq,n.type,s,o,n)}catch(d){_t(n,n.return,d)}}function eM(n,o){return o.tag===31?(o=o.memoizedState,n.memoizedState!==null&&o===null):o.tag===13?(n=n.memoizedState,o=o.memoizedState,n!==null&&n.dehydrated!==null&&(o===null||o.dehydrated===null)):o.tag===3?n.memoizedState.isDehydrated&&(o.flags&256)===0:!1}function QK(n,o){if(n=n.containerInfo,Ow=Jy,n=g5(n),g2(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var d=s.getSelection&&s.getSelection();if(d&&d.rangeCount!==0){s=d.anchorNode;var{anchorOffset:p,focusNode:g}=d;d=d.focusOffset;try{s.nodeType,g.nodeType}catch(xe){s=null;break e}var x=0,C=-1,T=-1,A=0,K=0,q=n,I=null;t:for(;;){for(var te;;){if(q!==s||p!==0&&q.nodeType!==3||(C=x+p),q!==g||d!==0&&q.nodeType!==3||(T=x+d),q.nodeType===3&&(x+=q.nodeValue.length),(te=q.firstChild)===null)break;I=q,q=te}for(;;){if(q===n)break t;if(I===s&&++A===p&&(C=x),I===g&&++K===d&&(T=x),(te=q.nextSibling)!==null)break;q=I,I=q.parentNode}q=te}s=C===-1||T===-1?null:{start:C,end:T}}else s=null}s=s||{start:0,end:0}}else s=null;Dw={focusedElem:n,selectionRange:s},Jy=!1;for(er=o;er!==null;)if(o=er,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,er=n;else for(;er!==null;){switch(n=o=er,s=n.alternate,p=n.flags,n.tag){case 0:if((p&4)!==0&&(n=n.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:(p&1024)!==0&&s!==null&&WK(n,s);break;case 3:if((p&1024)!==0){if(n=n.stateNode.containerInfo,s=n.nodeType,s===9)ZS(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ZS(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&1024)!==0)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.")}if(n=o.sibling,n!==null){n.return=o.return,er=n;break}er=o.return}}function tM(n,o,s){var d=wo(),p=hi(),g=gi(),x=bi(),C=s.flags;switch(s.tag){case 0:case 11:case 15:Si(n,s),C&4&&qA(s,Po|aa);break;case 1:if(Si(n,s),C&4)if(n=s.stateNode,o===null)s.type.defaultProps||"ref"in s.memoizedProps||Bf||(n.props!==s.memoizedProps&&console.error("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.",J(s)||"instance"),n.state!==s.memoizedState&&console.error("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.",J(s)||"instance")),xi(s)?(vi(),he(s,ew,s,n),yi()):he(s,ew,s,n);else{var T=pu(s.type,o.memoizedProps);o=o.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||Bf||(n.props!==s.memoizedProps&&console.error("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.",J(s)||"instance"),n.state!==s.memoizedState&&console.error("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.",J(s)||"instance")),xi(s)?(vi(),he(s,K8,s,n,T,o,n.__reactInternalSnapshotBeforeUpdate),yi()):he(s,K8,s,n,T,o,n.__reactInternalSnapshotBeforeUpdate)}C&64&&WA(s),C&512&&Ih(s,s.return);break;case 3:if(o=fs(),Si(n,s),C&64&&(C=s.updateQueue,C!==null)){if(T=null,s.child!==null)switch(s.child.tag){case 27:case 5:T=s.child.stateNode;break;case 1:T=s.child.stateNode}try{he(s,J5,C,T)}catch(K){_t(s,s.return,K)}}n.effectDuration+=r0(o);break;case 27:o===null&&C&4&&ZA(s);case 26:case 5:if(Si(n,s),o===null){if(C&4)XA(s);else if(C&64){n=s.type,o=s.memoizedProps,T=s.stateNode;try{he(s,$q,T,n,o,s)}catch(K){_t(s,s.return,K)}}}C&512&&Ih(s,s.return);break;case 12:if(C&4){C=fs(),Si(n,s),n=s.stateNode,n.effectDuration+=Eh(C);try{he(s,JA,s,o,Ul,n.effectDuration)}catch(K){_t(s,s.return,K)}}else Si(n,s);break;case 31:Si(n,s),C&4&&oM(n,s);break;case 13:Si(n,s),C&4&&aM(n,s),C&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(C=sq.bind(null,s),Pq(n,C))));break;case 22:if(C=s.memoizedState!==null||ks,!C){o=o!==null&&o.memoizedState!==null||Bn,T=ks;var A=Bn;ks=C,(Bn=o)&&!A?(Ci(n,s,(s.subtreeFlags&8772)!==0),(s.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&Gb(s,Ke,Ge)):Si(n,s),ks=T,Bn=A}break;case 30:break;default:Si(n,s)}(s.mode&st)!==We&&0<=Ke&&0<=Ge&&((pn||0.05<cn)&&fi(s,Ke,Ge,cn,rn),s.alternate===null&&s.return!==null&&s.return.alternate!==null&&0.05<Ge-Ke&&(eM(s.return.alternate,s.return)||di(s,Ke,Ge,"Mount"))),Eo(d),mi(p),rn=g,pn=x}function nM(n){var o=n.alternate;o!==null&&(n.alternate=null,nM(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&Ce(o)),n.stateNode=null,n._debugOwner=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function ms(n,o,s){for(s=s.child;s!==null;)rM(n,o,s),s=s.sibling}function rM(n,o,s){if(Er&&typeof Er.onCommitFiberUnmount==="function")try{Er.onCommitFiberUnmount(hf,s)}catch(A){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",A))}var d=wo(),p=hi(),g=gi(),x=bi();switch(s.tag){case 26:Bn||$i(s,o),ms(n,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(n=s.stateNode,n.parentNode.removeChild(n));break;case 27:Bn||$i(s,o);var C=zn,T=ro;Nl(s.type)&&(zn=s.stateNode,ro=!1),ms(n,o,s),he(s,qh,s.stateNode),zn=C,ro=T;break;case 5:Bn||$i(s,o);case 6:if(C=zn,T=ro,zn=null,ms(n,o,s),zn=C,ro=T,zn!==null)if(ro)try{he(s,Eq,zn,s.stateNode)}catch(A){_t(s,o,A)}else try{he(s,wq,zn,s.stateNode)}catch(A){_t(s,o,A)}break;case 18:zn!==null&&(ro?(n=zn,iN(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),uf(n)):iN(zn,s.stateNode));break;case 4:C=zn,T=ro,zn=s.stateNode.containerInfo,ro=!0,ms(n,o,s),zn=C,ro=T;break;case 0:case 11:case 14:case 15:tf(Hr,s,o),Bn||AS(s,o,Po),ms(n,o,s);break;case 1:Bn||($i(s,o),C=s.stateNode,typeof C.componentWillUnmount==="function"&&YA(s,o,C)),ms(n,o,s);break;case 21:ms(n,o,s);break;case 22:Bn=(C=Bn)||s.memoizedState!==null,ms(n,o,s),Bn=C;break;default:ms(n,o,s)}(s.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(s,Ke,Ge,cn,rn),Eo(d),mi(p),rn=g,pn=x}function oM(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{he(o,_q,n)}catch(s){_t(o,o.return,s)}}}function aM(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{he(o,Iq,n)}catch(s){_t(o,o.return,s)}}function ZK(n){switch(n.tag){case 31:case 13:case 19:var o=n.stateNode;return o===null&&(o=n.stateNode=new M7),o;case 22:return n=n.stateNode,o=n._retryCache,o===null&&(o=n._retryCache=new M7),o;default:throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}}function N0(n,o){var s=ZK(n);o.forEach(function(d){if(!s.has(d)){if(s.add(d),Mi)if(zf!==null&&Hf!==null)Uh(Hf,zf);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var p=lq.bind(null,n,d);d.then(p,p)}})}function to(n,o){var s=o.deletions;if(s!==null)for(var d=0;d<s.length;d++){var p=n,g=o,x=s[d],C=wo(),T=g;e:for(;T!==null;){switch(T.tag){case 27:if(Nl(T.type)){zn=T.stateNode,ro=!1;break e}break;case 5:zn=T.stateNode,ro=!1;break e;case 3:case 4:zn=T.stateNode.containerInfo,ro=!0;break e}T=T.return}if(zn===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");rM(p,g,x),zn=null,ro=!1,(x.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(x,Ke,Ge,"Unmount"),Eo(C),p=x,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)iM(o,n),o=o.sibling}function iM(n,o){var s=wo(),d=hi(),p=gi(),g=bi(),x=n.alternate,C=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:to(o,n),no(n),C&4&&(tf(Hr|aa,n,n.return),_h(Hr|aa,n),AS(n,n.return,Po|aa));break;case 1:if(to(o,n),no(n),C&512&&(Bn||x===null||$i(x,x.return)),C&64&&ks&&(C=n.updateQueue,C!==null&&(x=C.callbacks,x!==null))){var T=C.shared.hiddenCallbacks;C.shared.hiddenCallbacks=T===null?x:T.concat(x)}break;case 26:if(T=Fa,to(o,n),no(n),C&512&&(Bn||x===null||$i(x,x.return)),C&4){var A=x!==null?x.memoizedState:null;if(C=n.memoizedState,x===null)if(C===null)if(n.stateNode===null){e:{C=n.type,x=n.memoizedProps,T=T.ownerDocument||T;t:switch(C){case"title":if(A=T.getElementsByTagName("title")[0],!A||A[Zh]||A[cr]||A.namespaceURI===gf||A.hasAttribute("itemprop"))A=T.createElement(C),T.head.insertBefore(A,T.querySelector("head > title"));lr(A,C,x),A[cr]=n,je(A),C=A;break e;case"link":var K=bN("link","href",T).get(C+(x.href||""));if(K){for(var q=0;q<K.length;q++)if(A=K[q],A.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&A.getAttribute("rel")===(x.rel==null?null:x.rel)&&A.getAttribute("title")===(x.title==null?null:x.title)&&A.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){K.splice(q,1);break t}}A=T.createElement(C),lr(A,C,x),T.head.appendChild(A);break;case"meta":if(K=bN("meta","content",T).get(C+(x.content||""))){for(q=0;q<K.length;q++)if(A=K[q],Ie(x.content,"content"),A.getAttribute("content")===(x.content==null?null:""+x.content)&&A.getAttribute("name")===(x.name==null?null:x.name)&&A.getAttribute("property")===(x.property==null?null:x.property)&&A.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&A.getAttribute("charset")===(x.charSet==null?null:x.charSet)){K.splice(q,1);break t}}A=T.createElement(C),lr(A,C,x),T.head.appendChild(A);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+C+'". This is a bug in React.')}A[cr]=n,je(A),C=A}n.stateNode=C}else yN(T,n.type,n.stateNode);else n.stateNode=gN(T,C,n.memoizedProps);else A!==C?(A===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):A.count--,C===null?yN(T,n.type,n.stateNode):gN(T,C,n.memoizedProps)):C===null&&n.stateNode!==null&&NS(n,n.memoizedProps,x.memoizedProps)}break;case 27:to(o,n),no(n),C&512&&(Bn||x===null||$i(x,x.return)),x!==null&&C&4&&NS(n,n.memoizedProps,x.memoizedProps);break;case 5:if(to(o,n),no(n),C&512&&(Bn||x===null||$i(x,x.return)),n.flags&32){T=n.stateNode;try{he(n,oN,T)}catch(Re){_t(n,n.return,Re)}}C&4&&n.stateNode!=null&&(T=n.memoizedProps,NS(n,T,x!==null?x.memoizedProps:T)),C&1024&&(pw=!0,n.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(to(o,n),no(n),C&4){if(n.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.");C=n.memoizedProps,x=x!==null?x.memoizedProps:C,T=n.stateNode;try{he(n,Cq,T,x,C)}catch(Re){_t(n,n.return,Re)}}break;case 3:if(T=fs(),Gy=null,A=Fa,Fa=z0(o.containerInfo),to(o,n),Fa=A,no(n),C&4&&x!==null&&x.memoizedState.isDehydrated)try{he(n,Lq,o.containerInfo)}catch(Re){_t(n,n.return,Re)}pw&&(pw=!1,sM(n)),o.effectDuration+=r0(T);break;case 4:C=Fa,Fa=z0(n.stateNode.containerInfo),to(o,n),no(n),Fa=C;break;case 12:C=fs(),to(o,n),no(n),n.stateNode.effectDuration+=Eh(C);break;case 31:to(o,n),no(n),C&4&&(C=n.updateQueue,C!==null&&(n.updateQueue=null,N0(n,C)));break;case 13:to(o,n),no(n),n.child.flags&8192&&n.memoizedState!==null!==(x!==null&&x.memoizedState!==null)&&(Oy=Qn()),C&4&&(C=n.updateQueue,C!==null&&(n.updateQueue=null,N0(n,C)));break;case 22:T=n.memoizedState!==null;var I=x!==null&&x.memoizedState!==null,te=ks,xe=Bn;if(ks=te||T,Bn=xe||I,to(o,n),Bn=xe,ks=te,I&&!T&&!te&&!xe&&(n.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&Gb(n,Ke,Ge),no(n),C&8192)e:for(o=n.stateNode,o._visibility=T?o._visibility&~lm:o._visibility|lm,!T||x===null||I||ks||Bn||(hu(n),(n.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(n,Ke,Ge,"Disconnect")),x=null,o=n;;){if(o.tag===5||o.tag===26){if(x===null){I=x=o;try{A=I.stateNode,T?he(I,Rq,A):he(I,Mq,I.stateNode,I.memoizedProps)}catch(Re){_t(I,I.return,Re)}}}else if(o.tag===6){if(x===null){I=o;try{K=I.stateNode,T?he(I,kq,K):he(I,Nq,K,I.memoizedProps)}catch(Re){_t(I,I.return,Re)}}}else if(o.tag===18){if(x===null){I=o;try{q=I.stateNode,T?he(I,Tq,q):he(I,Aq,I.stateNode)}catch(Re){_t(I,I.return,Re)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===n)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break e;for(;o.sibling===null;){if(o.return===null||o.return===n)break e;x===o&&(x=null),o=o.return}x===o&&(x=null),o.sibling.return=o.return,o=o.sibling}C&4&&(C=n.updateQueue,C!==null&&(x=C.retryQueue,x!==null&&(C.retryQueue=null,N0(n,x))));break;case 19:to(o,n),no(n),C&4&&(C=n.updateQueue,C!==null&&(n.updateQueue=null,N0(n,C)));break;case 30:break;case 21:break;default:to(o,n),no(n)}(n.mode&st)!==We&&0<=Ke&&0<=Ge&&((pn||0.05<cn)&&fi(n,Ke,Ge,cn,rn),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&0.05<Ge-Ke&&(eM(n.return.alternate,n.return)||di(n,Ke,Ge,"Mount"))),Eo(s),mi(d),rn=p,pn=g}function no(n){var o=n.flags;if(o&2){try{he(n,XK,n)}catch(s){_t(n,n.return,s)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function sM(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var o=n;sM(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),n=n.sibling}}function Si(n,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)tM(n,o.alternate,o),o=o.sibling}function lM(n){var o=wo(),s=hi(),d=gi(),p=bi();switch(n.tag){case 0:case 11:case 14:case 15:AS(n,n.return,Po),hu(n);break;case 1:$i(n,n.return);var g=n.stateNode;typeof g.componentWillUnmount==="function"&&YA(n,n.return,g),hu(n);break;case 27:he(n,qh,n.stateNode);case 26:case 5:$i(n,n.return),hu(n);break;case 22:n.memoizedState===null&&hu(n);break;case 30:hu(n);break;default:hu(n)}(n.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(n,Ke,Ge,cn,rn),Eo(o),mi(s),rn=d,pn=p}function hu(n){for(n=n.child;n!==null;)lM(n),n=n.sibling}function cM(n,o,s,d){var p=wo(),g=hi(),x=gi(),C=bi(),T=s.flags;switch(s.tag){case 0:case 11:case 15:Ci(n,s,d),qA(s,Po);break;case 1:if(Ci(n,s,d),o=s.stateNode,typeof o.componentDidMount==="function"&&he(s,ew,s,o),o=s.updateQueue,o!==null){n=s.stateNode;try{he(s,LK,o,n)}catch(A){_t(s,s.return,A)}}d&&T&64&&WA(s),Ih(s,s.return);break;case 27:ZA(s);case 26:case 5:Ci(n,s,d),d&&o===null&&T&4&&XA(s),Ih(s,s.return);break;case 12:if(d&&T&4){T=fs(),Ci(n,s,d),d=s.stateNode,d.effectDuration+=Eh(T);try{he(s,JA,s,o,Ul,d.effectDuration)}catch(A){_t(s,s.return,A)}}else Ci(n,s,d);break;case 31:Ci(n,s,d),d&&T&4&&oM(n,s);break;case 13:Ci(n,s,d),d&&T&4&&aM(n,s);break;case 22:s.memoizedState===null&&Ci(n,s,d),Ih(s,s.return);break;case 30:break;default:Ci(n,s,d)}(s.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(s,Ke,Ge,cn,rn),Eo(p),mi(g),rn=x,pn=C}function Ci(n,o,s){s=s&&(o.subtreeFlags&8772)!==0;for(o=o.child;o!==null;)cM(n,o.alternate,o,s),o=o.sibling}function PS(n,o){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(n=o.memoizedState.cachePool.pool),n!==s&&(n!=null&&cu(n),s!=null&&wh(s))}function LS(n,o){n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(cu(o),n!=null&&wh(n))}function _a(n,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(o=o.child;o!==null;){var g=o.sibling;uM(n,o,s,d,g!==null?g.actualStartTime:p),o=g}}function uM(n,o,s,d,p){var g=wo(),x=hi(),C=gi(),T=bi(),A=Il,K=o.flags;switch(o.tag){case 0:case 11:case 15:(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&Wb(o,o.actualStartTime,p,Gn,s),_a(n,o,s,d,p),K&2048&&GA(o,Ur|aa);break;case 1:(o.mode&st)!==We&&0<o.actualStartTime&&((o.flags&128)!==0?y2(o,o.actualStartTime,p,[]):(o.flags&1)!==0&&Wb(o,o.actualStartTime,p,Gn,s)),_a(n,o,s,d,p);break;case 3:var q=fs(),I=Gn;Gn=o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)===0,_a(n,o,s,d,p),Gn=I,K&2048&&(s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),d=o.memoizedState.cache,d!==s&&(cu(d),s!=null&&wh(s))),n.passiveEffectDuration+=r0(q);break;case 12:if(K&2048){K=fs(),_a(n,o,s,d,p),n=o.stateNode,n.passiveEffectDuration+=Eh(K);try{he(o,JK,o,o.alternate,Ul,n.passiveEffectDuration)}catch(te){_t(o,o.return,te)}}else _a(n,o,s,d,p);break;case 31:K=Gn,q=o.alternate!==null?o.alternate.memoizedState:null,I=o.memoizedState,q!==null&&I===null?(I=o.deletions,I!==null&&0<I.length&&I[0].tag===18?(Gn=!1,q=q.hydrationErrors,q!==null&&y2(o,o.actualStartTime,p,q)):Gn=!0):Gn=!1,_a(n,o,s,d,p),Gn=K;break;case 13:K=Gn,q=o.alternate!==null?o.alternate.memoizedState:null,I=o.memoizedState,q===null||q.dehydrated===null||I!==null&&I.dehydrated!==null?Gn=!1:(I=o.deletions,I!==null&&0<I.length&&I[0].tag===18?(Gn=!1,q=q.hydrationErrors,q!==null&&y2(o,o.actualStartTime,p,q)):Gn=!0),_a(n,o,s,d,p),Gn=K;break;case 23:break;case 22:I=o.stateNode,q=o.alternate,o.memoizedState!==null?I._visibility&ys?_a(n,o,s,d,p):Bh(n,o,s,d,p):I._visibility&ys?_a(n,o,s,d,p):(I._visibility|=ys,nf(n,o,s,d,(o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child),p),(o.mode&st)===We||Gn||(n=o.actualStartTime,0<=n&&0.05<p-n&&Gb(o,n,p),0<=Ke&&0<=Ge&&0.05<Ge-Ke&&Gb(o,Ke,Ge))),K&2048&&PS(q,o);break;case 24:_a(n,o,s,d,p),K&2048&&LS(o.alternate,o);break;default:_a(n,o,s,d,p)}if((o.mode&st)!==We){if(n=!Gn&&o.alternate===null&&o.return!==null&&o.return.alternate!==null)s=o.actualStartTime,0<=s&&0.05<p-s&&di(o,s,p,"Mount");0<=Ke&&0<=Ge&&((pn||0.05<cn)&&fi(o,Ke,Ge,cn,rn),n&&0.05<Ge-Ke&&di(o,Ke,Ge,"Mount"))}Eo(g),mi(x),rn=C,pn=T,Il=A}function nf(n,o,s,d,p,g){p=p&&((o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child));for(o=o.child;o!==null;){var x=o.sibling;dM(n,o,s,d,p,x!==null?x.actualStartTime:g),o=x}}function dM(n,o,s,d,p,g){var x=wo(),C=hi(),T=gi(),A=bi(),K=Il;p&&(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&Wb(o,o.actualStartTime,g,Gn,s);var q=o.flags;switch(o.tag){case 0:case 11:case 15:nf(n,o,s,d,p,g),GA(o,Ur);break;case 23:break;case 22:var I=o.stateNode;o.memoizedState!==null?I._visibility&ys?nf(n,o,s,d,p,g):Bh(n,o,s,d,g):(I._visibility|=ys,nf(n,o,s,d,p,g)),p&&q&2048&&PS(o.alternate,o);break;case 24:nf(n,o,s,d,p,g),p&&q&2048&&LS(o.alternate,o);break;default:nf(n,o,s,d,p,g)}(o.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(o,Ke,Ge,cn,rn),Eo(x),mi(C),rn=T,pn=A,Il=K}function Bh(n,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(var g=o.child;g!==null;){o=g.sibling;var x=n,C=s,T=d,A=o!==null?o.actualStartTime:p,K=Il;(g.mode&st)!==We&&0<g.actualStartTime&&(g.flags&1)!==0&&Wb(g,g.actualStartTime,A,Gn,C);var q=g.flags;switch(g.tag){case 22:Bh(x,g,C,T,A),q&2048&&PS(g.alternate,g);break;case 24:Bh(x,g,C,T,A),q&2048&&LS(g.alternate,g);break;default:Bh(x,g,C,T,A)}Il=K,g=o}}function rf(n,o,s){if(n.subtreeFlags&km)for(n=n.child;n!==null;)fM(n,o,s),n=n.sibling}function fM(n,o,s){switch(n.tag){case 26:rf(n,o,s),n.flags&km&&n.memoizedState!==null&&Uq(s,Fa,n.memoizedState,n.memoizedProps);break;case 5:rf(n,o,s);break;case 3:case 4:var d=Fa;Fa=z0(n.stateNode.containerInfo),rf(n,o,s),Fa=d;break;case 22:n.memoizedState===null&&(d=n.alternate,d!==null&&d.memoizedState!==null?(d=km,km=16777216,rf(n,o,s),km=d):rf(n,o,s));break;default:rf(n,o,s)}}function pM(n){var o=n.alternate;if(o!==null&&(n=o.child,n!==null)){o.child=null;do o=n.sibling,n.sibling=null,n=o;while(n!==null)}}function zh(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],p=wo();er=d,gM(d,n),(d.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(d,Ke,Ge,"Unmount"),Eo(p)}pM(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)hM(n),n=n.sibling}function hM(n){var o=wo(),s=hi(),d=gi(),p=bi();switch(n.tag){case 0:case 11:case 15:zh(n),n.flags&2048&&MS(n,n.return,Ur|aa);break;case 3:var g=fs();zh(n),n.stateNode.passiveEffectDuration+=r0(g);break;case 12:g=fs(),zh(n),n.stateNode.passiveEffectDuration+=Eh(g);break;case 22:g=n.stateNode,n.memoizedState!==null&&g._visibility&ys&&(n.return===null||n.return.tag!==13)?(g._visibility&=~ys,O0(n),(n.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(n,Ke,Ge,"Disconnect")):zh(n);break;default:zh(n)}(n.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(n,Ke,Ge,cn,rn),Eo(o),mi(s),pn=p,rn=d}function O0(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var d=o[s],p=wo();er=d,gM(d,n),(d.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(d,Ke,Ge,"Unmount"),Eo(p)}pM(n)}for(n=n.child;n!==null;)mM(n),n=n.sibling}function mM(n){var o=wo(),s=hi(),d=gi(),p=bi();switch(n.tag){case 0:case 11:case 15:MS(n,n.return,Ur),O0(n);break;case 22:var g=n.stateNode;g._visibility&ys&&(g._visibility&=~ys,O0(n));break;default:O0(n)}(n.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(n,Ke,Ge,cn,rn),Eo(o),mi(s),pn=p,rn=d}function gM(n,o){for(;er!==null;){var s=er,d=s,p=o,g=wo(),x=hi(),C=gi(),T=bi();switch(d.tag){case 0:case 11:case 15:MS(d,p,Ur);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(p=d.memoizedState.cachePool.pool,p!=null&&cu(p));break;case 24:wh(d.memoizedState.cache)}if((d.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(d,Ke,Ge,cn,rn),Eo(g),mi(x),pn=T,rn=C,d=s.child,d!==null)d.return=s,er=d;else e:for(s=n;er!==null;){if(d=er,g=d.sibling,x=d.return,nM(d),d===s){er=null;break e}if(g!==null){g.return=x,er=g;break e}er=x}}}function eq(){$W.forEach(function(n){return n()})}function bM(){var n=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return n||oe.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),n}function Ro(n){if((kt&Wn)!==tr&&ct!==0)return ct&-ct;var o=oe.T;return o!==null?(o._updatedFibers||(o._updatedFibers=new Set),o._updatedFibers.add(n),VS()):Q()}function yM(){if(ao===0)if((ct&536870912)===0||vt){var n=X0;X0<<=1,(X0&3932160)===0&&(X0=262144),ao=n}else ao=536870912;return n=Do.current,n!==null&&(n.flags|=32),ao}function fn(n,o,s){if(Vf&&console.error("useInsertionEffect must not schedule updates."),ww&&(_y=!0),n===jt&&(Ht===Au||Ht===Mu)||n.cancelPendingCommit!==null)af(n,0),Al(n,ct,ao,!1);if(bl(n,s),(kt&Wn)!==tr&&n===jt){if(ki)switch(o.tag){case 0:case 11:case 15:n=ut&&J(ut)||"Unknown",K7.has(n)||(K7.add(n),o=J(o)||"Unknown",console.error("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://react.dev/link/setstate-in-render",o,n,n));break;case 1:j7||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),j7=!0)}}else Mi&&ph(n,o,s),uq(o),n===jt&&((kt&Wn)===tr&&(Jl|=s),un===Gl&&Al(n,ct,ao,!1)),wi(n)}function vM(n,o,s){if((kt&(Wn|Lo))!==tr)throw Error("Should not already be working.");if(ct!==0&&ut!==null){var d=ut,p=Qn();switch(I8){case Nm:case Au:var g=hm;Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",g,p,Xo,void 0,"primary-light")):console.timeStamp("Suspended",g,p,Xo,void 0,"primary-light"));break;case Mu:g=hm,Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",g,p,Xo,void 0,"primary-light")):console.timeStamp("Action",g,p,Xo,void 0,"primary-light"));break;default:Jt&&(d=p-hm,3>d||console.timeStamp("Blocked",hm,p,Xo,void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}g=(s=!s&&(o&127)===0&&(o&n.expiredLanes)===0||Jc(n,o))?nq(n,o):IS(n,o,!0);var x=s;do{if(g===As){Uf&&!s&&Al(n,o,0,!1),o=Ht,hm=Ln(),I8=o;break}else{if(d=Qn(),p=n.current.alternate,x&&!tq(p)){So(o),p=Zn,g=d,!Jt||g<=p||(vn?vn.run(console.timeStamp.bind(console,"Teared Render",p,g,mt,pt,"error")):console.timeStamp("Teared Render",p,g,mt,pt,"error")),mu(o,d),g=IS(n,o,!1),x=!1;continue}if(g===ku){if(x=o,n.errorRecoveryDisabledLanes&x)var C=0;else C=n.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){So(o),v2(Zn,d,o,vn),mu(o,d),o=C;e:{d=n,g=x,x=Dm;var T=d.current.memoizedState.isDehydrated;if(T&&(af(d,C).flags|=256),C=IS(d,C,!1),C!==ku){if(gw&&!T){d.errorRecoveryDisabledLanes|=g,Jl|=g,g=Gl;break e}d=Fr,Fr=x,d!==null&&(Fr===null?Fr=d:Fr.push.apply(Fr,d))}g=C}if(x=!1,g!==ku)continue;else d=Qn()}}if(g===Mm){So(o),v2(Zn,d,o,vn),mu(o,d),af(n,0),Al(n,o,0,!0);break}e:{switch(s=n,g){case As:case Mm:throw Error("Root did not complete. This is a bug in React.");case Gl:if((o&4194048)!==o)break;case ky:So(o),v5(Zn,d,o,vn),mu(o,d),p=o,(p&127)!==0?py=d:(p&4194048)!==0&&(hy=d),Al(s,o,ao,!Wl);break e;case ku:Fr=null;break;case Ry:case N7:break;default:throw Error("Unknown root exit status.")}if(oe.actQueue!==null)BS(s,p,o,Fr,Pm,Ny,ao,Jl,Nu,g,null,null,Zn,d);else{if((o&62914560)===o&&(x=Oy+P7-Qn(),10<x)){if(Al(s,o,ao,!Wl),Yc(s,0,!0)!==0)break e;Va=o,s.timeoutHandle=Z7(xM.bind(null,s,p,Fr,Pm,Ny,o,ao,Jl,Nu,Wl,g,"Throttled",Zn,d),x);break e}xM(s,p,Fr,Pm,Ny,o,ao,Jl,Nu,Wl,g,null,Zn,d)}}}break}while(1);wi(n)}function xM(n,o,s,d,p,g,x,C,T,A,K,q,I,te){n.timeoutHandle=_u;var xe=o.subtreeFlags,Re=null;if(xe&8192||(xe&16785408)===16785408){if(Re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ls},fM(o,g,Re),xe=(g&62914560)===g?Oy-Qn():(g&4194048)===g?D7-Qn():0,xe=Fq(Re,xe),xe!==null){Va=g,n.cancelPendingCommit=xe(BS.bind(null,n,o,g,s,d,p,x,C,T,K,Re,Re.waitingForViewTransition?"Waiting for the previous Animation":0<Re.count?0<Re.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Re.imgCount===1?"Suspended on an Image":0<Re.imgCount?"Suspended on Images":null,I,te)),Al(n,g,x,!A);return}}BS(n,o,g,s,d,p,x,C,T,K,Re,q,I,te)}function tq(n){for(var o=n;;){var s=o.tag;if((s===0||s===11||s===15)&&o.flags&16384&&(s=o.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var d=0;d<s.length;d++){var p=s[d],g=p.getSnapshot;p=p.value;try{if(!Br(g(),p))return!1}catch(x){return!1}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Al(n,o,s,d){o&=~bw,o&=~Jl,n.suspendedLanes|=o,n.pingedLanes&=~o,d&&(n.warmLanes|=o),d=n.expirationTimes;for(var p=o;0<p;){var g=31-Lr(p),x=1<<g;d[g]=-1,p&=~x}s!==0&&Xc(n,s,o)}function of(){return(kt&(Wn|Lo))===tr?(Fh(0,!1),!1):!0}function _S(){if(ut!==null){if(Ht===oo)var n=ut.return;else n=ut,e0(),G2(n),Of=null,Cm=0,n=ut;for(;n!==null;)KA(n.alternate,n),n=n.return;ut=null}}function mu(n,o){(n&127)!==0&&(Fl=o),(n&4194048)!==0&&(Li=o),(n&62914560)!==0&&(L8=o),(n&2080374784)!==0&&(_8=o)}function af(n,o){Jt&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",pt,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",pt,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",pt,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",pt,"primary-light"));var s=Zn;if(Zn=Ln(),ct!==0&&0<s){if(So(ct),un===Ry||un===Gl)v5(s,Zn,o,vn);else{var d=Zn,p=vn;if(Jt&&!(d<=s)){var g=(o&738197653)===o?"tertiary-dark":"primary-dark",x=(o&536870912)===o?"Prewarm":(o&201326741)===o?"Interrupted Hydration":"Interrupted Render";p?p.run(console.timeStamp.bind(console,x,s,d,mt,pt,g)):console.timeStamp(x,s,d,mt,pt,g)}}mu(ct,Zn)}if(s=vn,vn=null,(o&127)!==0){vn=dm,p=0<=Pi&&Pi<Fl?Fl:Pi,d=0<=xu&&xu<Fl?Fl:xu,g=0<=d?d:0<=p?p:Zn,0<=py?(So(2),x5(py,g,o,s)):(my&127)!==0&&(So(2),Sh(Fl,g,ws)),s=p;var C=d,T=fm,A=0<Af,K=Vl===um,q=Vl===fy;if(p=Zn,d=dm,g=YC,x=JC,Jt){if(mt="Blocking",0<s?s>p&&(s=p):s=p,0<C?C>s&&(C=s):C=s,T!==null&&s>C){var I=A?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,A?"Consecutive":"Event: "+T,C,s,mt,pt,I)):console.timeStamp(A?"Consecutive":"Event: "+T,C,s,mt,pt,I)}p>s&&(C=K?"error":(o&738197653)===o?"tertiary-light":"primary-light",K=q?"Promise Resolved":K?"Cascading Update":5<p-s?"Update Blocked":"Update",q=[],x!=null&&q.push(["Component name",x]),g!=null&&q.push(["Method name",g]),s={start:s,end:p,detail:{devtools:{properties:q,track:mt,trackGroup:pt,color:C}}},d?d.run(performance.measure.bind(performance,K,s)):performance.measure(K,s))}Pi=-1.1,Vl=0,JC=YC=null,py=-1.1,Af=xu,xu=-1.1,Fl=Ln()}if((o&4194048)!==0&&(vn=pm,p=0<=Cs&&Cs<Li?Li:Cs,s=0<=ra&&ra<Li?Li:ra,d=0<=jl&&jl<Li?Li:jl,g=0<=d?d:0<=s?s:Zn,0<=hy?(So(256),x5(hy,g,o,vn)):(my&4194048)!==0&&(So(256),Sh(Li,g,ws)),q=d,C=$u,T=0<Kl,A=XC===fy,g=Zn,d=pm,x=D8,K=P8,Jt&&(mt="Transition",0<s?s>g&&(s=g):s=g,0<p?p>s&&(p=s):p=s,0<q?q>p&&(q=p):q=p,p>q&&C!==null&&(I=T?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,T?"Consecutive":"Event: "+C,q,p,mt,pt,I)):console.timeStamp(T?"Consecutive":"Event: "+C,q,p,mt,pt,I)),s>p&&(d?d.run(console.timeStamp.bind(console,"Action",p,s,mt,pt,"primary-dark")):console.timeStamp("Action",p,s,mt,pt,"primary-dark")),g>s&&(p=A?"Promise Resolved":5<g-s?"Update Blocked":"Update",q=[],K!=null&&q.push(["Component name",K]),x!=null&&q.push(["Method name",x]),s={start:s,end:g,detail:{devtools:{properties:q,track:mt,trackGroup:pt,color:"primary-light"}}},d?d.run(performance.measure.bind(performance,p,s)):performance.measure(p,s))),ra=Cs=-1.1,XC=0,hy=-1.1,Kl=jl,jl=-1.1,Li=Ln()),(o&62914560)!==0&&(my&62914560)!==0&&(So(4194304),Sh(L8,Zn,ws)),(o&2080374784)!==0&&(my&2080374784)!==0&&(So(268435456),Sh(_8,Zn,ws)),s=n.timeoutHandle,s!==_u&&(n.timeoutHandle=_u,PW(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Va=0,_S(),jt=n,ut=s=cs(n.current,null),ct=o,Ht=oo,_o=null,Wl=!1,Uf=Jc(n,o),gw=!1,un=As,Nu=ao=bw=Jl=Yl=0,Fr=Dm=null,Ny=!1,(o&8)!==0&&(o|=o&32),d=n.entangledLanes,d!==0)for(n=n.entanglements,d&=o;0<d;)p=31-Lr(d),g=1<<p,o|=n[p],d&=~g;return Ii=o,Yb(),n=R8(),1000<n-T8&&(oe.recentlyCreatedOwnerStacks=0,T8=n),Ha.discardPendingWarnings(),s}function $M(n,o){Je=null,oe.H=Rm,oe.getCurrentStack=null,ki=!1,Mo=null,o===Nf||o===vy?(o=F5(),Ht=Nm):o===tw?(o=F5(),Ht=O7):Ht=o===dw?mw:o!==null&&typeof o==="object"&&typeof o.then==="function"?Om:Ay,_o=o;var s=ut;s===null?(un=Mm,E0(n,Co(o,n.current))):s.mode&st&&P2(s)}function SM(){var n=Do.current;return n===null?!0:(ct&4194048)===ct?oa===null?!0:!1:(ct&62914560)===ct||(ct&536870912)!==0?n===oa:!1}function CM(){var n=oe.H;return oe.H=Rm,n===null?Rm:n}function wM(){var n=oe.A;return oe.A=xW,n}function D0(n){vn===null&&(vn=n._debugTask==null?null:n._debugTask)}function P0(){un=Gl,Wl||(ct&4194048)!==ct&&Do.current!==null||(Uf=!0),(Yl&134217727)===0&&(Jl&134217727)===0||jt===null||Al(jt,ct,ao,!1)}function IS(n,o,s){var d=kt;kt|=Wn;var p=CM(),g=wM();if(jt!==n||ct!==o){if(Mi){var x=n.memoizedUpdaters;0<x.size&&(Uh(n,ct),x.clear()),yl(n,o)}Pm=null,af(n,o)}o=!1,x=un;e:do try{if(Ht!==oo&&ut!==null){var C=ut,T=_o;switch(Ht){case mw:_S(),x=ky;break e;case Nm:case Au:case Mu:case Om:Do.current===null&&(o=!0);var A=Ht;if(Ht=oo,_o=null,sf(n,C,T,A),s&&Uf){x=As;break e}break;default:A=Ht,Ht=oo,_o=null,sf(n,C,T,A)}}EM(),x=un;break}catch(K){$M(n,K)}while(1);return o&&n.shellSuspendCounter++,e0(),kt=d,oe.H=p,oe.A=g,ut===null&&(jt=null,ct=0,Yb()),x}function EM(){for(;ut!==null;)TM(ut)}function nq(n,o){var s=kt;kt|=Wn;var d=CM(),p=wM();if(jt!==n||ct!==o){if(Mi){var g=n.memoizedUpdaters;0<g.size&&(Uh(n,ct),g.clear()),yl(n,o)}Pm=null,Dy=Qn()+L7,af(n,o)}else Uf=Jc(n,o);e:do try{if(Ht!==oo&&ut!==null)t:switch(o=ut,g=_o,Ht){case Ay:Ht=oo,_o=null,sf(n,o,g,Ay);break;case Au:case Mu:if(H5(g)){Ht=oo,_o=null,RM(o);break}o=function(){Ht!==Au&&Ht!==Mu||jt!==n||(Ht=My),wi(n)},g.then(o,o);break e;case Nm:Ht=My;break e;case O7:Ht=hw;break e;case My:H5(g)?(Ht=oo,_o=null,RM(o)):(Ht=oo,_o=null,sf(n,o,g,My));break;case hw:var x=null;switch(ut.tag){case 26:x=ut.memoizedState;case 5:case 27:var C=ut;if(x?vN(x):C.stateNode.complete){Ht=oo,_o=null;var T=C.sibling;if(T!==null)ut=T;else{var A=C.return;A!==null?(ut=A,L0(A)):ut=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Ht=oo,_o=null,sf(n,o,g,hw);break;case Om:Ht=oo,_o=null,sf(n,o,g,Om);break;case mw:_S(),un=ky;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}oe.actQueue!==null?EM():rq();break}catch(K){$M(n,K)}while(1);if(e0(),oe.H=d,oe.A=p,kt=s,ut!==null)return As;return jt=null,ct=0,Yb(),un}function rq(){for(;ut!==null&&!tG();)TM(ut)}function TM(n){var o=n.alternate;(n.mode&st)!==We?(D2(n),o=he(n,RS,o,n,Ii),P2(n)):o=he(n,RS,o,n,Ii),n.memoizedProps=n.pendingProps,o===null?L0(n):ut=o}function RM(n){var o=he(n,oq,n);n.memoizedProps=n.pendingProps,o===null?L0(n):ut=o}function oq(n){var o=n.alternate,s=(n.mode&st)!==We;switch(s&&D2(n),n.tag){case 15:case 0:o=BA(o,n,n.pendingProps,n.type,void 0,ct);break;case 11:o=BA(o,n,n.pendingProps,n.type.render,n.ref,ct);break;case 5:G2(n);default:KA(o,n),n=ut=T5(n,Ii),o=RS(o,n,Ii)}return s&&P2(n),o}function sf(n,o,s,d){e0(),G2(o),Of=null,Cm=0;var p=o.return;try{if(FK(n,p,o,s,ct)){un=Mm,E0(n,Co(s,n.current)),ut=null;return}}catch(g){if(p!==null)throw ut=p,g;un=Mm,E0(n,Co(s,n.current)),ut=null;return}if(o.flags&32768){if(vt||d===Ay)n=!0;else if(Uf||(ct&536870912)!==0)n=!1;else if(Wl=n=!0,d===Au||d===Mu||d===Nm||d===Om)d=Do.current,d!==null&&d.tag===13&&(d.flags|=16384);kM(o,n)}else L0(o)}function L0(n){var o=n;do{if((o.flags&32768)!==0){kM(o,Wl);return}var s=o.alternate;if(n=o.return,D2(o),s=he(o,KK,s,o,Ii),(o.mode&st)!==We&&L5(o),s!==null){ut=s;return}if(o=o.sibling,o!==null){ut=o;return}ut=o=n}while(o!==null);un===As&&(un=N7)}function kM(n,o){do{var s=qK(n.alternate,n);if(s!==null){s.flags&=32767,ut=s;return}if((n.mode&st)!==We){L5(n),s=n.actualDuration;for(var d=n.child;d!==null;)s+=d.actualDuration,d=d.sibling;n.actualDuration=s}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!o&&(n=n.sibling,n!==null)){ut=n;return}ut=n=s}while(n!==null);un=ky,ut=null}function BS(n,o,s,d,p,g,x,C,T,A,K,q,I,te){n.cancelPendingCommit=null;do Hh();while(Hn!==Ql);if(Ha.flushLegacyContextWarning(),Ha.flushPendingUnsafeLifecycleWarnings(),(kt&(Wn|Lo))!==tr)throw Error("Should not already be working.");if(So(s),A===ku?v2(I,te,s,vn):d!==null?AK(I,te,s,d,o!==null&&o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)!==0,vn):kK(I,te,s,vn),o!==null){if(s===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),o===n.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(g=o.lanes|o.childLanes,g|=jC,Bb(n,s,g,x,C,T),n===jt&&(ut=jt=null,ct=0),Ff=o,Zl=n,Va=s,xw=g,Sw=p,U7=d,$w=te,F7=q,ja=Py,V7=null,o.actualDuration!==0||(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,cq(pf,function(){return Hm=window.event,ja===Py&&(ja=vw),DM(),null})):(n.callbackNode=null,n.callbackPriority=0),Ss=null,Ul=Ln(),q!==null&&MK(te,Ul,q,vn),d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=oe.T,oe.T=null,p=It.p,It.p=No,x=kt,kt|=Lo;try{QK(n,o,s)}finally{kt=x,It.p=p,oe.T=d}}Hn=I7,AM(),MM(),NM()}}function AM(){if(Hn===I7){Hn=Ql;var n=Zl,o=Ff,s=Va,d=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||d){d=oe.T,oe.T=null;var p=It.p;It.p=No;var g=kt;kt|=Lo;try{zf=s,Hf=n,o0(),iM(o,n),Hf=zf=null,s=Dw;var x=g5(n.containerInfo),C=s.focusedElem,T=s.selectionRange;if(x!==C&&C&&C.ownerDocument&&m5(C.ownerDocument.documentElement,C)){if(T!==null&&g2(C)){var{start:A,end:K}=T;if(K===void 0&&(K=A),"selectionStart"in C)C.selectionStart=A,C.selectionEnd=Math.min(K,C.value.length);else{var q=C.ownerDocument||document,I=q&&q.defaultView||window;if(I.getSelection){var te=I.getSelection(),xe=C.textContent.length,Re=Math.min(T.start,xe),Wt=T.end===void 0?Re:Math.min(T.end,xe);!te.extend&&Re>Wt&&(x=Wt,Wt=Re,Re=x);var Ct=h5(C,Re),L=h5(C,Wt);if(Ct&&L&&(te.rangeCount!==1||te.anchorNode!==Ct.node||te.anchorOffset!==Ct.offset||te.focusNode!==L.node||te.focusOffset!==L.offset)){var B=q.createRange();B.setStart(Ct.node,Ct.offset),te.removeAllRanges(),Re>Wt?(te.addRange(B),te.extend(L.node,L.offset)):(B.setEnd(L.node,L.offset),te.addRange(B))}}}}q=[];for(te=C;te=te.parentNode;)te.nodeType===1&&q.push({element:te,left:te.scrollLeft,top:te.scrollTop});typeof C.focus==="function"&&C.focus();for(C=0;C<q.length;C++){var F=q[C];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Jy=!!Ow,Dw=Ow=null}finally{kt=g,It.p=p,oe.T=d}}n.current=o,Hn=B7}}function MM(){if(Hn===B7){Hn=Ql;var n=V7;if(n!==null){Ul=Ln();var o=$s,s=Ul;!Jt||s<=o||(ws?ws.run(console.timeStamp.bind(console,n,o,s,mt,pt,"secondary-light")):console.timeStamp(n,o,s,mt,pt,"secondary-light"))}n=Zl,o=Ff,s=Va;var d=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||d){d=oe.T,oe.T=null;var p=It.p;It.p=No;var g=kt;kt|=Lo;try{zf=s,Hf=n,o0(),tM(n,o.alternate,o),Hf=zf=null}finally{kt=g,It.p=p,oe.T=d}}n=$w,o=F7,$s=Ln(),n=o===null?n:Ul,o=$s,s=ja===yw,d=vn,Ss!==null?$5(n,o,Ss,!1,d):!Jt||o<=n||(d?d.run(console.timeStamp.bind(console,s?"Commit Interrupted View Transition":"Commit",n,o,mt,pt,s?"error":"secondary-dark")):console.timeStamp(s?"Commit Interrupted View Transition":"Commit",n,o,mt,pt,s?"error":"secondary-dark")),Hn=z7}}function NM(){if(Hn===H7||Hn===z7){if(Hn===H7){var n=$s;$s=Ln();var o=$s,s=ja===yw;!Jt||o<=n||(ws?ws.run(console.timeStamp.bind(console,s?"Interrupted View Transition":"Starting Animation",n,o,mt,pt,s?"error":"secondary-light")):console.timeStamp(s?"Interrupted View Transition":"Starting Animation",n,o,mt,pt,s?" error":"secondary-light")),ja!==yw&&(ja=_7)}Hn=Ql,nG(),n=Zl;var d=Ff;o=Va,s=U7;var p=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;p?Hn=Ly:(Hn=Ql,Ff=Zl=null,OM(n,n.pendingLanes),Ou=0,_m=null);var g=n.pendingLanes;if(g===0&&(Xl=null),p||IM(n),g=M(o),d=d.stateNode,Er&&typeof Er.onCommitFiberRoot==="function")try{var x=(d.current.flags&128)===128;switch(g){case No:var C=SC;break;case Ba:C=CC;break;case Ni:C=pf;break;case Z0:C=wC;break;default:C=pf}Er.onCommitFiberRoot(hf,d,C,x)}catch(q){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",q))}if(Mi&&n.memoizedUpdaters.clear(),eq(),s!==null){x=oe.T,C=It.p,It.p=No,oe.T=null;try{var T=n.onRecoverableError;for(d=0;d<s.length;d++){var A=s[d],K=aq(A.stack);he(A.source,T,A.value,K)}}finally{oe.T=x,It.p=C}}(Va&3)!==0&&Hh(),wi(n),g=n.pendingLanes,(o&261930)!==0&&(g&42)!==0?(by=!0,n===Cw?Lm++:(Lm=0,Cw=n)):Lm=0,p||mu(o,$s),Fh(0,!1)}}function aq(n){return n={componentStack:n},Object.defineProperty(n,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),n}function OM(n,o){(n.pooledCacheLanes&=o)===0&&(o=n.pooledCache,o!=null&&(n.pooledCache=null,wh(o)))}function Hh(){return AM(),MM(),NM(),DM()}function DM(){if(Hn!==Ly)return!1;var n=Zl,o=xw;xw=0;var s=M(Va),d=Ni===0||Ni>s?Ni:s;s=oe.T;var p=It.p;try{It.p=d,oe.T=null;var g=Sw;Sw=null,d=Zl;var x=Va;if(Hn=Ql,Ff=Zl=null,Va=0,(kt&(Wn|Lo))!==tr)throw Error("Cannot flush passive effects while already rendering.");So(x),ww=!0,_y=!1;var C=0;if(Ss=null,C=Qn(),ja===_7)Sh($s,C,ws);else{var T=$s,A=C,K=ja===vw;!Jt||A<=T||(vn?vn.run(console.timeStamp.bind(console,K?"Waiting for Paint":"Waiting",T,A,mt,pt,"secondary-light")):console.timeStamp(K?"Waiting for Paint":"Waiting",T,A,mt,pt,"secondary-light"))}T=kt,kt|=Lo;var q=d.current;o0(),hM(q);var I=d.current;q=$w,o0(),uM(d,I,x,g,q),IM(d),kt=T;var te=Qn();if(I=C,q=vn,Ss!==null?$5(I,te,Ss,!0,q):!Jt||te<=I||(q?q.run(console.timeStamp.bind(console,"Remaining Effects",I,te,mt,pt,"secondary-dark")):console.timeStamp("Remaining Effects",I,te,mt,pt,"secondary-dark")),mu(x,te),Fh(0,!1),_y?d===_m?Ou++:(Ou=0,_m=d):Ou=0,_y=ww=!1,Er&&typeof Er.onPostCommitFiberRoot==="function")try{Er.onPostCommitFiberRoot(hf,d)}catch(Re){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",Re))}var xe=d.current.stateNode;return xe.effectDuration=0,xe.passiveEffectDuration=0,!0}finally{It.p=p,oe.T=s,OM(n,o)}}function PM(n,o,s){o=Co(s,o),_5(o),o=gS(n.stateNode,o,2),n=El(n,o,2),n!==null&&(bl(n,2),wi(n))}function _t(n,o,s){if(Vf=!1,n.tag===3)PM(n,n,s);else{for(;o!==null;){if(o.tag===3){PM(o,n,s);return}if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError==="function"||typeof d.componentDidCatch==="function"&&(Xl===null||!Xl.has(d))){n=Co(s,n),_5(n),s=bS(2),d=El(o,s,2),d!==null&&(yS(s,d,o,n),bl(d,2),wi(d));return}}o=o.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
159
+
160
+ Error message:
161
+
162
+ %s`,s)}}function zS(n,o,s){var d=n.pingCache;if(d===null){d=n.pingCache=new SW;var p=new Set;d.set(o,p)}else p=d.get(o),p===void 0&&(p=new Set,d.set(o,p));p.has(s)||(gw=!0,p.add(s),d=iq.bind(null,n,o,s),Mi&&Uh(n,s),o.then(d,d))}function iq(n,o,s){var d=n.pingCache;d!==null&&d.delete(o),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,(s&127)!==0?0>Pi&&(Fl=Pi=Ln(),dm=dy("Promise Resolved"),Vl=fy):(s&4194048)!==0&&0>ra&&(Li=ra=Ln(),pm=dy("Promise Resolved"),XC=fy),bM()&&oe.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
163
+
164
+ When testing, code that resolves suspended data should be wrapped into act(...):
165
+
166
+ act(() => {
167
+ /* finish loading suspended data */
168
+ });
169
+ /* assert on the output */
170
+
171
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),jt===n&&(ct&s)===s&&(un===Gl||un===Ry&&(ct&62914560)===ct&&Qn()-Oy<P7?(kt&Wn)===tr&&af(n,0):bw|=s,Nu===ct&&(Nu=0)),wi(n)}function LM(n,o){o===0&&(o=jd()),n=wr(n,o),n!==null&&(bl(n,o),wi(n))}function sq(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),LM(n,s)}function lq(n,o){var s=0;switch(n.tag){case 31:case 13:var{stateNode:d,memoizedState:p}=n;p!==null&&(s=p.retryLane);break;case 19:d=n.stateNode;break;case 22:d=n.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}d!==null&&d.delete(o),LM(n,s)}function HS(n,o,s){if((o.subtreeFlags&67117056)!==0)for(o=o.child;o!==null;){var d=n,p=o,g=p.type===G0;g=s||g,p.tag!==22?p.flags&67108864?g&&he(p,_M,d,p):HS(d,p,g):p.memoizedState===null&&(g&&p.flags&8192?he(p,_M,d,p):p.subtreeFlags&67108864&&he(p,HS,d,p,g)),o=o.sibling}}function _M(n,o){qt(!0);try{lM(o),mM(o),cM(n,o.alternate,o,!1),dM(n,o,0,null,!1,0)}finally{qt(!1)}}function IM(n){var o=!0;n.current.mode&(Tr|za)||(o=!1),HS(n,n.current,o)}function BM(n){if((kt&Wn)===tr){var o=n.tag;if(o===3||o===1||o===0||o===11||o===14||o===15){if(o=J(n)||"ReactComponent",Iy!==null){if(Iy.has(o))return;Iy.add(o)}else Iy=new Set([o]);he(n,function(){console.error("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 tries to update the component. Move this work to useEffect instead.")})}}}function Uh(n,o){Mi&&n.memoizedUpdaters.forEach(function(s){ph(n,s,o)})}function cq(n,o){var s=oe.actQueue;return s!==null?(s.push(o),EW):$C(n,o)}function uq(n){bM()&&oe.actQueue===null&&he(n,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
172
+
173
+ When testing, code that causes React state updates should be wrapped into act(...):
174
+
175
+ act(() => {
176
+ /* fire events that update state */
177
+ });
178
+ /* assert on the output */
179
+
180
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,J(n))})}function wi(n){n!==jf&&n.next===null&&(jf===null?By=jf=n:jf=jf.next=n),zy=!0,oe.actQueue!==null?Tw||(Tw=!0,FM()):Ew||(Ew=!0,FM())}function Fh(n,o){if(!Rw&&zy){Rw=!0;do{var s=!1;for(var d=By;d!==null;){if(!o)if(n!==0){var p=d.pendingLanes;if(p===0)var g=0;else{var{suspendedLanes:x,pingedLanes:C}=d;g=(1<<31-Lr(42|n)+1)-1,g&=p&~(x&~C),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,UM(d,g))}else g=ct,g=Yc(d,d===jt?g:0,d.cancelPendingCommit!==null||d.timeoutHandle!==_u),(g&3)===0||Jc(d,g)||(s=!0,UM(d,g));d=d.next}}while(s);Rw=!1}}function dq(){Hm=window.event,US()}function US(){zy=Tw=Ew=!1;var n=0;ec!==0&&yq()&&(n=ec);for(var o=Qn(),s=null,d=By;d!==null;){var p=d.next,g=zM(d,o);if(g===0)d.next=null,s===null?By=p:s.next=p,p===null&&(jf=s);else if(s=d,n!==0||(g&3)!==0)zy=!0;d=p}Hn!==Ql&&Hn!==Ly||Fh(n,!1),ec!==0&&(ec=0)}function zM(n,o){for(var{suspendedLanes:s,pingedLanes:d,expirationTimes:p}=n,g=n.pendingLanes&-62914561;0<g;){var x=31-Lr(g),C=1<<x,T=p[x];if(T===-1){if((C&s)===0||(C&d)!==0)p[x]=a2(C,o)}else T<=o&&(n.expiredLanes|=C);g&=~C}if(o=jt,s=ct,s=Yc(n,n===o?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==_u),d=n.callbackNode,s===0||n===o&&(Ht===Au||Ht===Mu)||n.cancelPendingCommit!==null)return d!==null&&FS(d),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||Jc(n,s)){if(o=s&-s,o!==n.callbackPriority||oe.actQueue!==null&&d!==kw)FS(d);else return o;switch(M(s)){case No:case Ba:s=CC;break;case Ni:s=pf;break;case Z0:s=wC;break;default:s=pf}return d=HM.bind(null,n),oe.actQueue!==null?(oe.actQueue.push(d),s=kw):s=$C(s,d),n.callbackPriority=o,n.callbackNode=s,o}return d!==null&&FS(d),n.callbackPriority=2,n.callbackNode=null,2}function HM(n,o){if(by=gy=!1,Hm=window.event,Hn!==Ql&&Hn!==Ly)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(ja===Py&&(ja=vw),Hh()&&n.callbackNode!==s)return null;var d=ct;if(d=Yc(n,n===jt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==_u),d===0)return null;return vM(n,d,o),zM(n,Qn()),n.callbackNode!=null&&n.callbackNode===s?HM.bind(null,n):null}function UM(n,o){if(Hh())return null;gy=by,by=!1,vM(n,o,!0)}function FS(n){n!==kw&&n!==null&&eG(n)}function FM(){oe.actQueue!==null&&oe.actQueue.push(function(){return US(),null}),LW(function(){(kt&(Wn|Lo))!==tr?$C(SC,dq):US()})}function VS(){if(ec===0){var n=Su;n===0&&(n=J0,J0<<=1,(J0&261888)===0&&(J0=256)),ec=n}return ec}function VM(n){if(n==null||typeof n==="symbol"||typeof n==="boolean")return null;if(typeof n==="function")return n;return Ie(n,"action"),vh(""+n)}function jM(n,o){var s=o.ownerDocument.createElement("input");return s.name=o.name,s.value=o.value,n.id&&s.setAttribute("form",n.id),o.parentNode.insertBefore(s,o),n=new FormData(n),s.parentNode.removeChild(s),n}function fq(n,o,s,d,p){if(o==="submit"&&s&&s.stateNode===p){var g=VM((p[_r]||null).action),x=d.submitter;x&&(o=(o=x[_r]||null)?VM(o.formAction):x.getAttribute("formAction"),o!==null&&(g=o,x=null));var C=new oy("action","action",null,d,p);n.push({event:C,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ec!==0){var T=x?jM(p,x):new FormData(p),A={pending:!0,data:T,method:p.method,action:g};Object.freeze(A),cS(s,A,null,T)}}else typeof g==="function"&&(C.preventDefault(),T=x?jM(p,x):new FormData(p),A={pending:!0,data:T,method:p.method,action:g},Object.freeze(A),cS(s,A,g,T))},currentTarget:p}]})}}function _0(n,o,s){n.currentTarget=s;try{o(n)}catch(d){HC(d)}n.currentTarget=null}function KM(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var d=n[s];e:{var p=void 0,g=d.event;if(d=d.listeners,o)for(var x=d.length-1;0<=x;x--){var C=d[x],T=C.instance,A=C.currentTarget;if(C=C.listener,T!==p&&g.isPropagationStopped())break e;T!==null?he(T,_0,g,C,A):_0(g,C,A),p=T}else for(x=0;x<d.length;x++){if(C=d[x],T=C.instance,A=C.currentTarget,C=C.listener,T!==p&&g.isPropagationStopped())break e;T!==null?he(T,_0,g,C,A):_0(g,C,A),p=T}}}}function St(n,o){Aw.has(n)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',n);var s=o[EC];s===void 0&&(s=o[EC]=new Set);var d=n+"__bubble";s.has(d)||(qM(o,n,2,!1),s.add(d))}function jS(n,o,s){Aw.has(n)&&!o&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',n);var d=0;o&&(d|=4),qM(s,n,d,o)}function KS(n){if(!n[Hy]){n[Hy]=!0,FN.forEach(function(s){s!=="selectionchange"&&(Aw.has(s)||jS(s,!1,n),jS(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Hy]||(o[Hy]=!0,jS("selectionchange",!1,o))}}function qM(n,o,s,d){switch(EN(o)){case No:var p=qq;break;case Ba:p=Gq;break;default:p=sC}s=p.bind(null,o,s,n),p=void 0,!MC||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),d?p!==void 0?n.addEventListener(o,s,{capture:!0,passive:p}):n.addEventListener(o,s,!0):p!==void 0?n.addEventListener(o,s,{passive:p}):n.addEventListener(o,s,!1)}function qS(n,o,s,d,p){var g=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var C=d.stateNode.containerInfo;if(C===p)break;if(x===4)for(x=d.return;x!==null;){var T=x.tag;if((T===3||T===4)&&x.stateNode.containerInfo===p)return;x=x.return}for(;C!==null;){if(x=_e(C),x===null)return;if(T=x.tag,T===5||T===6||T===26||T===27){d=g=x;continue e}C=C.parentNode}}d=d.return}r5(function(){var A=g,K=h2(s),q=[];e:{var I=E8.get(n);if(I!==void 0){var te=oy,xe=n;switch(n){case"keypress":if(jb(s)===0)break e;case"keydown":case"keyup":te=UG;break;case"focusin":xe="focus",te=PC;break;case"focusout":xe="blur",te=PC;break;case"beforeblur":case"afterblur":te=PC;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=d8;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=AG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=jG;break;case $8:case S8:case C8:te=OG;break;case w8:te=qG;break;case"scroll":case"scrollend":te=RG;break;case"wheel":te=WG;break;case"copy":case"cut":case"paste":te=PG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=p8;break;case"toggle":case"beforetoggle":te=JG}var Re=(o&4)!==0,Wt=!Re&&(n==="scroll"||n==="scrollend"),Ct=Re?I!==null?I+"Capture":null:I;Re=[];for(var L=A,B;L!==null;){var F=L;if(B=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||B===null||Ct===null||(F=xh(L,Ct),F!=null&&Re.push(Vh(L,F,B))),Wt)break;L=L.return}0<Re.length&&(I=new te(I,xe,null,s,K),q.push({event:I,listeners:Re}))}}if((o&7)===0){e:{if(I=n==="mouseover"||n==="pointerover",te=n==="mouseout"||n==="pointerout",I&&s!==em&&(xe=s.relatedTarget||s.fromElement)&&(_e(xe)||xe[Ll]))break e;if(te||I){if(I=K.window===K?K:(I=K.ownerDocument)?I.defaultView||I.parentWindow:window,te){if(xe=s.relatedTarget||s.toElement,te=A,xe=xe?_e(xe):null,xe!==null&&(Wt=R(xe),Re=xe.tag,xe!==Wt||Re!==5&&Re!==27&&Re!==6))xe=null}else te=null,xe=A;if(te!==xe){if(Re=d8,F="onMouseLeave",Ct="onMouseEnter",L="mouse",n==="pointerout"||n==="pointerover")Re=p8,F="onPointerLeave",Ct="onPointerEnter",L="pointer";if(Wt=te==null?I:tt(te),B=xe==null?I:tt(xe),I=new Re(F,L+"leave",te,s,K),I.target=Wt,I.relatedTarget=B,F=null,_e(K)===A&&(Re=new Re(Ct,L+"enter",xe,s,K),Re.target=B,Re.relatedTarget=Wt,F=Re),Wt=F,te&&xe)t:{Re=pq,Ct=te,L=xe,B=0;for(F=Ct;F;F=Re(F))B++;F=0;for(var ie=L;ie;ie=Re(ie))F++;for(;0<B-F;)Ct=Re(Ct),B--;for(;0<F-B;)L=Re(L),F--;for(;B--;){if(Ct===L||L!==null&&Ct===L.alternate){Re=Ct;break t}Ct=Re(Ct),L=Re(L)}Re=null}else Re=null;te!==null&&GM(q,I,te,Re,!1),xe!==null&&Wt!==null&&GM(q,Wt,xe,Re,!0)}}}e:{if(I=A?tt(A):window,te=I.nodeName&&I.nodeName.toLowerCase(),te==="select"||te==="input"&&I.type==="file")var we=u5;else if(l5(I))if(v8)we=EK;else{we=CK;var Xe=SK}else te=I.nodeName,!te||te.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?A&&yh(A.elementType)&&(we=u5):we=wK;if(we&&(we=we(n,A))){c5(q,we,s,K);break e}Xe&&Xe(n,I,A),n==="focusout"&&A&&I.type==="number"&&A.memoizedProps.value!=null&&l2(I,"number",I.value)}switch(Xe=A?tt(A):window,n){case"focusin":if(l5(Xe)||Xe.contentEditable==="true")$f=Xe,_C=A,sm=null;break;case"focusout":sm=_C=$f=null;break;case"mousedown":IC=!0;break;case"contextmenu":case"mouseup":case"dragend":IC=!1,b5(q,s,K);break;case"selectionchange":if(eW)break;case"keydown":case"keyup":b5(q,s,K)}var Ve;if(LC)e:{switch(n){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else xf?i5(n,s)&&(Be="onCompositionEnd"):n==="keydown"&&s.keyCode===h8&&(Be="onCompositionStart");if(Be&&(m8&&s.locale!=="ko"&&(xf||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&xf&&(Ve=o5()):(_l=K,NC=("value"in _l)?_l.value:_l.textContent,xf=!0)),Xe=I0(A,Be),0<Xe.length&&(Be=new f8(Be,n,null,s,K),q.push({event:Be,listeners:Xe}),Ve?Be.data=Ve:(Ve=s5(s),Ve!==null&&(Be.data=Ve)))),Ve=QG?yK(n,s):vK(n,s))Be=I0(A,"onBeforeInput"),0<Be.length&&(Xe=new _G("onBeforeInput","beforeinput",null,s,K),q.push({event:Xe,listeners:Be}),Xe.data=Ve);fq(q,n,A,s,K)}KM(q,o)})}function Vh(n,o,s){return{instance:n,listener:o,currentTarget:s}}function I0(n,o){for(var s=o+"Capture",d=[];n!==null;){var p=n,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=xh(n,s),p!=null&&d.unshift(Vh(n,p,g)),p=xh(n,o),p!=null&&d.push(Vh(n,p,g))),n.tag===3)return d;n=n.return}return[]}function pq(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n?n:null}function GM(n,o,s,d,p){for(var g=o._reactName,x=[];s!==null&&s!==d;){var C=s,T=C.alternate,A=C.stateNode;if(C=C.tag,T!==null&&T===d)break;C!==5&&C!==26&&C!==27||A===null||(T=A,p?(A=xh(s,g),A!=null&&x.unshift(Vh(s,A,T))):p||(A=xh(s,g),A!=null&&x.push(Vh(s,A,T)))),s=s.return}x.length!==0&&n.push({event:o,listeners:x})}function GS(n,o){hK(n,o),n!=="input"&&n!=="textarea"&&n!=="select"||o==null||o.value!==null||c8||(c8=!0,n==="select"&&o.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",n):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",n));var s={registrationNameDependencies:gu,possibleRegistrationNames:TC};yh(n)||typeof o.is==="string"||gK(n,o,s),o.contentEditable&&!o.suppressContentEditableWarning&&o.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function Xn(n,o,s,d){o!==s&&(s=Ml(s),Ml(o)!==s&&(d[n]=o))}function hq(n,o,s){o.forEach(function(d){s[JM(d)]=d==="style"?YS(n):n.getAttribute(d)})}function Ei(n,o){o===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",n,n,n):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",n,typeof o)}function WM(n,o){return n=n.namespaceURI===ty||n.namespaceURI===gf?n.ownerDocument.createElementNS(n.namespaceURI,n.tagName):n.ownerDocument.createElement(n.tagName),n.innerHTML=o,n.innerHTML}function Ml(n){return Rn(n)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Dn(n)),tn(n)),(typeof n==="string"?n:""+n).replace(TW,`
181
+ `).replace(RW,"")}function YM(n,o){return o=Ml(o),Ml(n)===o?!0:!1}function Ft(n,o,s,d,p,g){switch(s){case"children":if(typeof d==="string")Vb(d,o,!1),o==="body"||o==="textarea"&&d===""||bh(n,d);else if(typeof d==="number"||typeof d==="bigint")Vb(""+d,o,!1),o!=="body"&&bh(n,""+d);break;case"className":Hb(n,"class",d);break;case"tabIndex":Hb(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Hb(n,s,d);break;case"style":e5(n,d,g);break;case"data":if(o!=="object"){Hb(n,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||s!=="href")){s==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',s,s):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',s,s),n.removeAttribute(s);break}if(d==null||typeof d==="function"||typeof d==="symbol"||typeof d==="boolean"){n.removeAttribute(s);break}Ie(d,s),d=vh(""+d),n.setAttribute(s,d);break;case"action":case"formAction":if(d!=null&&(o==="form"?s==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof d==="function"&&(p.encType==null&&p.method==null||Vy||(Vy=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),p.target==null||Fy||(Fy=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):o==="input"||o==="button"?s==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):o!=="input"||p.type==="submit"||p.type==="image"||Uy?o!=="button"||p.type==null||p.type==="submit"||Uy?typeof d==="function"&&(p.name==null||W7||(W7=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),p.formEncType==null&&p.formMethod==null||Vy||(Vy=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),p.formTarget==null||Fy||(Fy=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Uy=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Uy=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):s==="action"?console.error("You can only pass the action prop to <form>."):console.error("You can only pass the formAction prop to <input> or <button>.")),typeof d==="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g==="function"&&(s==="formAction"?(o!=="input"&&Ft(n,o,"name",p.name,p,null),Ft(n,o,"formEncType",p.formEncType,p,null),Ft(n,o,"formMethod",p.formMethod,p,null),Ft(n,o,"formTarget",p.formTarget,p,null)):(Ft(n,o,"encType",p.encType,p,null),Ft(n,o,"method",p.method,p,null),Ft(n,o,"target",p.target,p,null)));if(d==null||typeof d==="symbol"||typeof d==="boolean"){n.removeAttribute(s);break}Ie(d,s),d=vh(""+d),n.setAttribute(s,d);break;case"onClick":d!=null&&(typeof d!=="function"&&Ei(s,d),n.onclick=ls);break;case"onScroll":d!=null&&(typeof d!=="function"&&Ei(s,d),St("scroll",n));break;case"onScrollEnd":d!=null&&(typeof d!=="function"&&Ei(s,d),St("scrollend",n));break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!=="object"||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=d.__html,s!=null){if(p.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");n.innerHTML=s}}break;case"multiple":n.multiple=d&&typeof d!=="function"&&typeof d!=="symbol";break;case"muted":n.muted=d&&typeof d!=="function"&&typeof d!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d==="function"||typeof d==="boolean"||typeof d==="symbol"){n.removeAttribute("xlink:href");break}Ie(d,s),s=vh(""+d),n.setAttributeNS(Du,"xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!=="function"&&typeof d!=="symbol"?(Ie(d,s),n.setAttribute(s,""+d)):n.removeAttribute(s);break;case"inert":d!==""||jy[s]||(jy[s]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",s));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!=="function"&&typeof d!=="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":d===!0?n.setAttribute(s,""):d!==!1&&d!=null&&typeof d!=="function"&&typeof d!=="symbol"?(Ie(d,s),n.setAttribute(s,d)):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!=="function"&&typeof d!=="symbol"&&!isNaN(d)&&1<=d?(Ie(d,s),n.setAttribute(s,d)):n.removeAttribute(s);break;case"rowSpan":case"start":d==null||typeof d==="function"||typeof d==="symbol"||isNaN(d)?n.removeAttribute(s):(Ie(d,s),n.setAttribute(s,d));break;case"popover":St("beforetoggle",n),St("toggle",n),zb(n,"popover",d);break;case"xlinkActuate":ss(n,Du,"xlink:actuate",d);break;case"xlinkArcrole":ss(n,Du,"xlink:arcrole",d);break;case"xlinkRole":ss(n,Du,"xlink:role",d);break;case"xlinkShow":ss(n,Du,"xlink:show",d);break;case"xlinkTitle":ss(n,Du,"xlink:title",d);break;case"xlinkType":ss(n,Du,"xlink:type",d);break;case"xmlBase":ss(n,Mw,"xml:base",d);break;case"xmlLang":ss(n,Mw,"xml:lang",d);break;case"xmlSpace":ss(n,Mw,"xml:space",d);break;case"is":g!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),zb(n,"is",d);break;case"innerText":case"textContent":break;case"popoverTarget":Y7||d==null||typeof d!=="object"||(Y7=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",d));default:!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N"?(s=t5(s),zb(n,s,d)):gu.hasOwnProperty(s)&&d!=null&&typeof d!=="function"&&Ei(s,d)}}function WS(n,o,s,d,p,g){switch(s){case"style":e5(n,d,g);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!=="object"||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=d.__html,s!=null){if(p.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");n.innerHTML=s}}break;case"children":typeof d==="string"?bh(n,d):(typeof d==="number"||typeof d==="bigint")&&bh(n,""+d);break;case"onScroll":d!=null&&(typeof d!=="function"&&Ei(s,d),St("scroll",n));break;case"onScrollEnd":d!=null&&(typeof d!=="function"&&Ei(s,d),St("scrollend",n));break;case"onClick":d!=null&&(typeof d!=="function"&&Ei(s,d),n.onclick=ls);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(gu.hasOwnProperty(s))d!=null&&typeof d!=="function"&&Ei(s,d);else e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),o=s.slice(2,p?s.length-7:void 0),g=n[_r]||null,g=g!=null?g[s]:null,typeof g==="function"&&n.removeEventListener(o,g,p),typeof d==="function")){typeof g!=="function"&&g!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(o,d,p);break e}s in n?n[s]=d:d===!0?n.setAttribute(s,""):zb(n,s,d)}}}function lr(n,o,s){switch(GS(o,s),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",n),St("load",n);var d=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var x=s[g];if(x!=null)switch(g){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ft(n,o,g,x,s,null)}}p&&Ft(n,o,"srcSet",s.srcSet,s,null),d&&Ft(n,o,"src",s.src,s,null);return;case"input":vl("input",s),St("invalid",n);var C=g=x=p=null,T=null,A=null;for(d in s)if(s.hasOwnProperty(d)){var K=s[d];if(K!=null)switch(d){case"name":p=K;break;case"type":x=K;break;case"checked":T=K;break;case"defaultChecked":A=K;break;case"value":g=K;break;case"defaultValue":C=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ft(n,o,d,K,s,null)}}Bk(n,s),zk(n,g,C,T,A,x,p,!1);return;case"select":vl("select",s),St("invalid",n),d=x=g=null;for(p in s)if(s.hasOwnProperty(p)&&(C=s[p],C!=null))switch(p){case"value":g=C;break;case"defaultValue":x=C;break;case"multiple":d=C;default:Ft(n,o,p,C,s,null)}Fk(n,s),o=g,s=x,n.multiple=!!d,o!=null?qd(n,!!d,o,!1):s!=null&&qd(n,!!d,s,!0);return;case"textarea":vl("textarea",s),St("invalid",n),g=p=d=null;for(x in s)if(s.hasOwnProperty(x)&&(C=s[x],C!=null))switch(x){case"value":d=C;break;case"defaultValue":p=C;break;case"children":g=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Ft(n,o,x,C,s,null)}Vk(n,s),Kk(n,d,p,g);return;case"option":Hk(n,s);for(T in s)if(s.hasOwnProperty(T)&&(d=s[T],d!=null))switch(T){case"selected":n.selected=d&&typeof d!=="function"&&typeof d!=="symbol";break;default:Ft(n,o,T,d,s,null)}return;case"dialog":St("beforetoggle",n),St("toggle",n),St("cancel",n),St("close",n);break;case"iframe":case"object":St("load",n);break;case"video":case"audio":for(d=0;d<Im.length;d++)St(Im[d],n);break;case"image":St("error",n),St("load",n);break;case"details":St("toggle",n);break;case"embed":case"source":case"link":St("error",n),St("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in s)if(s.hasOwnProperty(A)&&(d=s[A],d!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Ft(n,o,A,d,s,null)}return;default:if(yh(o)){for(K in s)s.hasOwnProperty(K)&&(d=s[K],d!==void 0&&WS(n,o,K,d,s,void 0));return}}for(C in s)s.hasOwnProperty(C)&&(d=s[C],d!=null&&Ft(n,o,C,d,s,null))}function mq(n,o,s,d){switch(GS(o,d),o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,x=null,C=null,T=null,A=null,K=null;for(te in s){var q=s[te];if(s.hasOwnProperty(te)&&q!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":T=q;default:d.hasOwnProperty(te)||Ft(n,o,te,null,d,q)}}for(var I in d){var te=d[I];if(q=s[I],d.hasOwnProperty(I)&&(te!=null||q!=null))switch(I){case"type":g=te;break;case"name":p=te;break;case"checked":A=te;break;case"defaultChecked":K=te;break;case"value":x=te;break;case"defaultValue":C=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:te!==q&&Ft(n,o,I,te,d,q)}}o=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,d=d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null,o||!d||G7||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),G7=!0),!o||d||q7||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),q7=!0),s2(n,x,C,T,A,K,g,p);return;case"select":te=x=C=I=null;for(g in s)if(T=s[g],s.hasOwnProperty(g)&&T!=null)switch(g){case"value":break;case"multiple":te=T;default:d.hasOwnProperty(g)||Ft(n,o,g,null,d,T)}for(p in d)if(g=d[p],T=s[p],d.hasOwnProperty(p)&&(g!=null||T!=null))switch(p){case"value":I=g;break;case"defaultValue":C=g;break;case"multiple":x=g;default:g!==T&&Ft(n,o,p,g,d,T)}d=C,o=x,s=te,I!=null?qd(n,!!o,I,!1):!!s!==!!o&&(d!=null?qd(n,!!o,d,!0):qd(n,!!o,o?[]:"",!1));return;case"textarea":te=I=null;for(C in s)if(p=s[C],s.hasOwnProperty(C)&&p!=null&&!d.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Ft(n,o,C,null,d,p)}for(x in d)if(p=d[x],g=s[x],d.hasOwnProperty(x)&&(p!=null||g!=null))switch(x){case"value":I=p;break;case"defaultValue":te=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:p!==g&&Ft(n,o,x,p,d,g)}jk(n,I,te);return;case"option":for(var xe in s)if(I=s[xe],s.hasOwnProperty(xe)&&I!=null&&!d.hasOwnProperty(xe))switch(xe){case"selected":n.selected=!1;break;default:Ft(n,o,xe,null,d,I)}for(T in d)if(I=d[T],te=s[T],d.hasOwnProperty(T)&&I!==te&&(I!=null||te!=null))switch(T){case"selected":n.selected=I&&typeof I!=="function"&&typeof I!=="symbol";break;default:Ft(n,o,T,I,d,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in s)I=s[Re],s.hasOwnProperty(Re)&&I!=null&&!d.hasOwnProperty(Re)&&Ft(n,o,Re,null,d,I);for(A in d)if(I=d[A],te=s[A],d.hasOwnProperty(A)&&I!==te&&(I!=null||te!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Ft(n,o,A,I,d,te)}return;default:if(yh(o)){for(var Wt in s)I=s[Wt],s.hasOwnProperty(Wt)&&I!==void 0&&!d.hasOwnProperty(Wt)&&WS(n,o,Wt,void 0,d,I);for(K in d)I=d[K],te=s[K],!d.hasOwnProperty(K)||I===te||I===void 0&&te===void 0||WS(n,o,K,I,d,te);return}}for(var Ct in s)I=s[Ct],s.hasOwnProperty(Ct)&&I!=null&&!d.hasOwnProperty(Ct)&&Ft(n,o,Ct,null,d,I);for(q in d)I=d[q],te=s[q],!d.hasOwnProperty(q)||I===te||I==null&&te==null||Ft(n,o,q,I,d,te)}function JM(n){switch(n){case"class":return"className";case"for":return"htmlFor";default:return n}}function YS(n){var o={};n=n.style;for(var s=0;s<n.length;s++){var d=n[s];o[d]=n.getPropertyValue(d)}return o}function XM(n,o,s){if(o!=null&&typeof o!=="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var d,p=d="",g;for(g in o)if(o.hasOwnProperty(g)){var x=o[g];x!=null&&typeof x!=="boolean"&&x!==""&&(g.indexOf("--")===0?(Qr(x,g),d+=p+g+":"+(""+x).trim()):typeof x!=="number"||x===0||s8.has(g)?(Qr(x,g),d+=p+g.replace(n8,"-$1").toLowerCase().replace(r8,"-ms-")+":"+(""+x).trim()):d+=p+g.replace(n8,"-$1").toLowerCase().replace(r8,"-ms-")+":"+x+"px",p=";")}d=d||null,o=n.getAttribute("style"),o!==d&&(d=Ml(d),Ml(o)!==d&&(s.style=YS(n)))}}function Jo(n,o,s,d,p,g){if(p.delete(s),n=n.getAttribute(s),n===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(Ie(d,o),n===""+d)return}Xn(o,n,d,g)}function QM(n,o,s,d,p,g){if(p.delete(s),n=n.getAttribute(s),n===null){switch(typeof d){case"function":case"symbol":return}if(!d)return}else switch(typeof d){case"function":case"symbol":break;default:if(d)return}Xn(o,n,d,g)}function JS(n,o,s,d,p,g){if(p.delete(s),n=n.getAttribute(s),n===null)switch(typeof d){case"undefined":case"function":case"symbol":return}else if(d!=null)switch(typeof d){case"function":case"symbol":break;default:if(Ie(d,s),n===""+d)return}Xn(o,n,d,g)}function ZM(n,o,s,d,p,g){if(p.delete(s),n=n.getAttribute(s),n===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(d))return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(!isNaN(d)&&(Ie(d,o),n===""+d))return}Xn(o,n,d,g)}function XS(n,o,s,d,p,g){if(p.delete(s),n=n.getAttribute(s),n===null)switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":return}else if(d!=null)switch(typeof d){case"function":case"symbol":case"boolean":break;default:if(Ie(d,o),s=vh(""+d),n===s)return}Xn(o,n,d,g)}function eN(n,o,s,d){for(var p={},g=new Set,x=n.attributes,C=0;C<x.length;C++)switch(x[C].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:g.add(x[C].name)}if(yh(o)){for(var T in s)if(s.hasOwnProperty(T)){var A=s[T];if(A!=null){if(gu.hasOwnProperty(T))typeof A!=="function"&&Ei(T,A);else if(s.suppressHydrationWarning!==!0)switch(T){case"children":typeof A!=="string"&&typeof A!=="number"||Xn("children",n.textContent,A,p);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":x=n.innerHTML,A=A?A.__html:void 0,A!=null&&(A=WM(n,A),Xn(T,x,A,p));continue;case"style":g.delete(T),XM(n,A,p);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":g.delete(T.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",T);continue;case"className":g.delete("class"),x=Lk(n,"class",A),Xn("className",x,A,p);continue;default:d.context===Ms&&o!=="svg"&&o!=="math"?g.delete(T.toLowerCase()):g.delete(T),x=Lk(n,T,A),Xn(T,x,A,p)}}}}else for(A in s)if(s.hasOwnProperty(A)&&(T=s[A],T!=null)){if(gu.hasOwnProperty(A))typeof T!=="function"&&Ei(A,T);else if(s.suppressHydrationWarning!==!0)switch(A){case"children":typeof T!=="string"&&typeof T!=="number"||Xn("children",n.textContent,T,p);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":x=n.innerHTML,T=T?T.__html:void 0,T!=null&&(T=WM(n,T),x!==T&&(p[A]={__html:x}));continue;case"className":Jo(n,A,"class",T,g,p);continue;case"tabIndex":Jo(n,A,"tabindex",T,g,p);continue;case"style":g.delete(A),XM(n,T,p);continue;case"multiple":g.delete(A),Xn(A,n.multiple,T,p);continue;case"muted":g.delete(A),Xn(A,n.muted,T,p);continue;case"autoFocus":g.delete("autofocus"),Xn(A,n.autofocus,T,p);continue;case"data":if(o!=="object"){g.delete(A),x=n.getAttribute("data"),Xn(A,x,T,p);continue}case"src":case"href":if(!(T!==""||o==="a"&&A==="href"||o==="object"&&A==="data")){A==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',A,A):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',A,A);continue}XS(n,A,A,T,g,p);continue;case"action":case"formAction":if(x=n.getAttribute(A),typeof T==="function"){g.delete(A.toLowerCase()),A==="formAction"?(g.delete("name"),g.delete("formenctype"),g.delete("formmethod"),g.delete("formtarget")):(g.delete("enctype"),g.delete("method"),g.delete("target"));continue}else if(x===kW){g.delete(A.toLowerCase()),Xn(A,"function",T,p);continue}XS(n,A,A.toLowerCase(),T,g,p);continue;case"xlinkHref":XS(n,A,"xlink:href",T,g,p);continue;case"contentEditable":JS(n,A,"contenteditable",T,g,p);continue;case"spellCheck":JS(n,A,"spellcheck",T,g,p);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":JS(n,A,A,T,g,p);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":QM(n,A,A.toLowerCase(),T,g,p);continue;case"capture":case"download":e:{C=n;var K=x=A,q=p;if(g.delete(K),C=C.getAttribute(K),C===null)switch(typeof T){case"undefined":case"function":case"symbol":break e;default:if(T===!1)break e}else if(T!=null)switch(typeof T){case"function":case"symbol":break;case"boolean":if(T===!0&&C==="")break e;break;default:if(Ie(T,x),C===""+T)break e}Xn(x,C,T,q)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=n,K=x=A,q=p,g.delete(K),C=C.getAttribute(K),C===null)switch(typeof T){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(T)||1>T)break e}else if(T!=null)switch(typeof T){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(T)||1>T)&&(Ie(T,x),C===""+T))break e}Xn(x,C,T,q)}continue;case"rowSpan":ZM(n,A,"rowspan",T,g,p);continue;case"start":ZM(n,A,A,T,g,p);continue;case"xHeight":Jo(n,A,"x-height",T,g,p);continue;case"xlinkActuate":Jo(n,A,"xlink:actuate",T,g,p);continue;case"xlinkArcrole":Jo(n,A,"xlink:arcrole",T,g,p);continue;case"xlinkRole":Jo(n,A,"xlink:role",T,g,p);continue;case"xlinkShow":Jo(n,A,"xlink:show",T,g,p);continue;case"xlinkTitle":Jo(n,A,"xlink:title",T,g,p);continue;case"xlinkType":Jo(n,A,"xlink:type",T,g,p);continue;case"xmlBase":Jo(n,A,"xml:base",T,g,p);continue;case"xmlLang":Jo(n,A,"xml:lang",T,g,p);continue;case"xmlSpace":Jo(n,A,"xml:space",T,g,p);continue;case"inert":T!==""||jy[A]||(jy[A]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",A)),QM(n,A,A,T,g,p);continue;default:if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){C=t5(A),x=!1,d.context===Ms&&o!=="svg"&&o!=="math"?g.delete(C.toLowerCase()):(K=A.toLowerCase(),K=ny.hasOwnProperty(K)?ny[K]||null:null,K!==null&&K!==A&&(x=!0,g.delete(K)),g.delete(C));e:if(K=n,q=C,C=T,hh(q))if(K.hasAttribute(q))K=K.getAttribute(q),Ie(C,q),C=K===""+C?C:K;else{switch(typeof C){case"function":case"symbol":break e;case"boolean":if(K=q.toLowerCase().slice(0,5),K!=="data-"&&K!=="aria-")break e}C=C===void 0?void 0:null}else C=void 0;x||Xn(A,C,T,p)}}}return 0<g.size&&s.suppressHydrationWarning!==!0&&hq(n,g,p),Object.keys(p).length===0?null:p}function gq(n,o){switch(n.length){case 0:return"";case 1:return n[0];case 2:return n[0]+" "+o+" "+n[1];default:return n.slice(0,-1).join(", ")+", "+o+" "+n[n.length-1]}}function tN(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bq(){if(typeof performance.getEntriesByType==="function"){for(var n=0,o=0,s=performance.getEntriesByType("resource"),d=0;d<s.length;d++){var p=s[d],g=p.transferSize,x=p.initiatorType,C=p.duration;if(g&&C&&tN(x)){x=0,C=p.responseEnd;for(d+=1;d<s.length;d++){var T=s[d],A=T.startTime;if(A>C)break;var{transferSize:K,initiatorType:q}=T;K&&tN(q)&&(T=T.responseEnd,x+=K*(T<C?1:(C-A)/(T-A)))}if(--d,o+=8*(g+x)/(p.duration/1000),n++,10<n)break}}if(0<n)return o/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n==="number")?n:5}function B0(n){return n.nodeType===9?n:n.ownerDocument}function nN(n){switch(n){case gf:return qf;case ty:return qy;default:return Ms}}function rN(n,o){if(n===Ms)switch(o){case"svg":return qf;case"math":return qy;default:return Ms}return n===qf&&o==="foreignObject"?Ms:n}function QS(n,o){return n==="textarea"||n==="noscript"||typeof o.children==="string"||typeof o.children==="number"||typeof o.children==="bigint"||typeof o.dangerouslySetInnerHTML==="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}function yq(){var n=window.event;if(n&&n.type==="popstate"){if(n===Pw)return!1;return Pw=n,!0}return Pw=null,!1}function jh(){var n=window.event;return n&&n!==Hm?n.type:null}function Kh(){var n=window.event;return n&&n!==Hm?n.timeStamp:-1.1}function vq(n){setTimeout(function(){throw n})}function xq(n,o,s){switch(o){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src?n.src=s.src:s.srcSet&&(n.srcset=s.srcSet)}}function $q(){}function Sq(n,o,s,d){mq(n,o,s,d),n[_r]=d}function oN(n){bh(n,"")}function Cq(n,o,s){n.nodeValue=s}function aN(n){if(!n.__reactWarnedAboutChildrenConflict){var o=n[_r]||null;if(o!==null){var s=et(n);s!==null&&(typeof o.children==="string"||typeof o.children==="number"?(n.__reactWarnedAboutChildrenConflict=!0,he(s,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):o.dangerouslySetInnerHTML!=null&&(n.__reactWarnedAboutChildrenConflict=!0,he(s,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Nl(n){return n==="head"}function wq(n,o){n.removeChild(o)}function Eq(n,o){(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).removeChild(o)}function iN(n,o){var s=o,d=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s===zm||s===Ky){if(d===0){n.removeChild(p),uf(o);return}d--}else if(s===Bm||s===tc||s===Lu||s===Kf||s===Pu)d++;else if(s===MW)qh(n.ownerDocument.documentElement);else if(s===OW){s=n.ownerDocument.head,qh(s);for(var g=s.firstChild;g;){var{nextSibling:x,nodeName:C}=g;g[Zh]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s===NW&&qh(n.ownerDocument.body);s=p}while(s);uf(o)}function sN(n,o){var s=n;n=0;do{var d=s.nextSibling;if(s.nodeType===1?o?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(o?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),d&&d.nodeType===8)if(s=d.data,s===zm)if(n===0)break;else n--;else s!==Bm&&s!==tc&&s!==Lu&&s!==Kf||n++;s=d}while(s)}function Tq(n){sN(n,!0)}function Rq(n){n=n.style,typeof n.setProperty==="function"?n.setProperty("display","none","important"):n.display="none"}function kq(n){n.nodeValue=""}function Aq(n){sN(n,!1)}function Mq(n,o){o=o[DW],o=o!==void 0&&o!==null&&o.hasOwnProperty("display")?o.display:null,n.style.display=o==null||typeof o==="boolean"?"":(""+o).trim()}function Nq(n,o){n.nodeValue=o}function ZS(n){var o=n.firstChild;o&&o.nodeType===10&&(o=o.nextSibling);for(;o;){var s=o;switch(o=o.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ZS(s),Ce(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function Oq(n,o,s,d){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(!d)if(o==="input"&&n.type==="hidden"){Ie(p.name,"name");var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;else if(!n[Zh])switch(o){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;else if(g!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}if(n=ko(n.nextSibling),n===null)break}return null}function Dq(n,o,s){if(o==="")return null;for(;n.nodeType!==3;){if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s)return null;if(n=ko(n.nextSibling),n===null)return null}return n}function lN(n,o){for(;n.nodeType!==8;){if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o)return null;if(n=ko(n.nextSibling),n===null)return null}return n}function eC(n){return n.data===tc||n.data===Lu}function tC(n){return n.data===Kf||n.data===tc&&n.ownerDocument.readyState!==X7}function Pq(n,o){var s=n.ownerDocument;if(n.data===Lu)n._reactRetry=o;else if(n.data!==tc||s.readyState!==X7)o();else{var d=function(){o(),s.removeEventListener("DOMContentLoaded",d)};s.addEventListener("DOMContentLoaded",d),n._reactRetry=d}}function ko(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o===Bm||o===Kf||o===tc||o===Lu||o===Pu||o===Nw||o===J7)break;if(o===zm||o===Ky)return null}}return n}function cN(n){if(n.nodeType===1){for(var o=n.nodeName.toLowerCase(),s={},d=n.attributes,p=0;p<d.length;p++){var g=d[p];s[JM(g.name)]=g.name.toLowerCase()==="style"?YS(n):g.value}return{type:o,props:s}}return n.nodeType===8?n.data===Pu?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:n.nodeValue}function uN(n,o,s){return s===null||s[AW]!==!0?(n.nodeValue===o?n=null:(o=Ml(o),n=Ml(n.nodeValue)===o?null:n.nodeValue),n):null}function nC(n){n=n.nextSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s===zm||s===Ky){if(o===0)return ko(n.nextSibling);o--}else s!==Bm&&s!==Kf&&s!==tc&&s!==Lu&&s!==Pu||o++}n=n.nextSibling}return null}function dN(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s===Bm||s===Kf||s===tc||s===Lu||s===Pu){if(o===0)return n;o--}else s!==zm&&s!==Ky||o++}n=n.previousSibling}return null}function Lq(n){uf(n)}function _q(n){uf(n)}function Iq(n){uf(n)}function fN(n,o,s,d,p){switch(p&&p2(n,d.ancestorInfo),o=B0(s),n){case"html":if(n=o.documentElement,!n)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return n;case"head":if(n=o.head,!n)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return n;case"body":if(n=o.body,!n)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return n;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function Bq(n,o,s,d){if(!s[Ll]&&et(s)){var p=s.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",p,p,p)}switch(n){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(p=s.attributes;p.length;)s.removeAttributeNode(p[0]);lr(s,n,o),s[cr]=d,s[_r]=o}function qh(n){for(var o=n.attributes;o.length;)n.removeAttributeNode(o[0]);Ce(n)}function z0(n){return typeof n.getRootNode==="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}function pN(n,o,s){var d=Gf;if(d&&typeof o==="string"&&o){var p=Yo(o);p='link[rel="'+n+'"][href="'+p+'"]',typeof s==="string"&&(p+='[crossorigin="'+s+'"]'),r6.has(p)||(r6.add(p),n={rel:n,crossOrigin:s,href:o},d.querySelector(p)===null&&(o=d.createElement("link"),lr(o,"link",n),je(o),d.head.appendChild(o)))}}function hN(n,o,s,d){var p=(p=Dl.current)?z0(p):null;if(!p)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence==="string"&&typeof s.href==="string"?(s=lf(s.href),o=Mt(p).hoistableStyles,d=o.get(s),d||(d={type:"style",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href==="string"&&typeof s.precedence==="string"){n=lf(s.href);var g=Mt(p).hoistableStyles,x=g.get(n);if(!x&&(p=p.ownerDocument||p,x={type:"stylesheet",instance:null,count:0,state:{loading:Iu,preload:null}},g.set(n,x),(g=p.querySelector(Gh(n)))&&!g._p&&(x.instance=g,x.state.loading=Um|sa),!la.has(n))){var C={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy};la.set(n,C),g||zq(p,n,C,x.state)}if(o&&d===null)throw s=`
182
+
183
+ - `+H0(o)+`
184
+ + `+H0(s),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return x}if(o&&d!==null)throw s=`
185
+
186
+ - `+H0(o)+`
187
+ + `+H0(s),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return null;case"script":return o=s.async,s=s.src,typeof s==="string"&&o&&typeof o!=="function"&&typeof o!=="symbol"?(s=cf(s),o=Mt(p).hoistableScripts,d=o.get(s),d||(d={type:"script",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+n+'". this is a bug in React.')}}function H0(n){var o=0,s="<link";return typeof n.rel==="string"?(o++,s+=' rel="'+n.rel+'"'):Ia.call(n,"rel")&&(o++,s+=' rel="'+(n.rel===null?"null":"invalid type "+typeof n.rel)+'"'),typeof n.href==="string"?(o++,s+=' href="'+n.href+'"'):Ia.call(n,"href")&&(o++,s+=' href="'+(n.href===null?"null":"invalid type "+typeof n.href)+'"'),typeof n.precedence==="string"?(o++,s+=' precedence="'+n.precedence+'"'):Ia.call(n,"precedence")&&(o++,s+=" precedence={"+(n.precedence===null?"null":"invalid type "+typeof n.precedence)+"}"),Object.getOwnPropertyNames(n).length>o&&(s+=" ..."),s+" />"}function lf(n){return'href="'+Yo(n)+'"'}function Gh(n){return'link[rel="stylesheet"]['+n+"]"}function mN(n){return ft({},n,{"data-precedence":n.precedence,precedence:null})}function zq(n,o,s,d){n.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=Um:(o=n.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=Um}),o.addEventListener("error",function(){return d.loading|=t6}),lr(o,"link",s),je(o),n.head.appendChild(o))}function cf(n){return'[src="'+Yo(n)+'"]'}function Wh(n){return"script[async]"+n}function gN(n,o,s){if(o.count++,o.instance===null)switch(o.type){case"style":var d=n.querySelector('style[data-href~="'+Yo(s.href)+'"]');if(d)return o.instance=d,je(d),d;var p=ft({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return d=(n.ownerDocument||n).createElement("style"),je(d),lr(d,"style",p),U0(d,s.precedence,n),o.instance=d;case"stylesheet":p=lf(s.href);var g=n.querySelector(Gh(p));if(g)return o.state.loading|=sa,o.instance=g,je(g),g;d=mN(s),(p=la.get(p))&&rC(d,p),g=(n.ownerDocument||n).createElement("link"),je(g);var x=g;return x._p=new Promise(function(C,T){x.onload=C,x.onerror=T}),lr(g,"link",d),o.state.loading|=sa,U0(g,s.precedence,n),o.instance=g;case"script":if(g=cf(s.src),p=n.querySelector(Wh(g)))return o.instance=p,je(p),p;if(d=s,p=la.get(g))d=ft({},s),oC(d,p);return n=n.ownerDocument||n,p=n.createElement("script"),je(p),lr(p,"link",d),n.head.appendChild(p),o.instance=p;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+o.type+'". this is a bug in React.')}else o.type==="stylesheet"&&(o.state.loading&sa)===Iu&&(d=o.instance,o.state.loading|=sa,U0(d,s.precedence,n));return o.instance}function U0(n,o,s){for(var d=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,g=p,x=0;x<d.length;x++){var C=d[x];if(C.dataset.precedence===o)g=C;else if(g!==p)break}g?g.parentNode.insertBefore(n,g.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(n,o.firstChild))}function rC(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.title==null&&(n.title=o.title)}function oC(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.integrity==null&&(n.integrity=o.integrity)}function bN(n,o,s){if(Gy===null){var d=new Map,p=Gy=new Map;p.set(s,d)}else p=Gy,d=p.get(s),d||(d=new Map,p.set(s,d));if(d.has(n))return d;d.set(n,null),s=s.getElementsByTagName(n);for(p=0;p<s.length;p++){var g=s[p];if(!(g[Zh]||g[cr]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!==gf){var x=g.getAttribute(o)||"";x=n+x;var C=d.get(x);C?C.push(g):d.set(x,[g])}}return d}function yN(n,o,s){n=n.ownerDocument||n,n.head.insertBefore(s,o==="title"?n.querySelector("head > title"):null)}function Hq(n,o,s){var d=!s.ancestorInfo.containerTagInScope;if(s.context===qf||o.itemProp!=null)return!d||o.itemProp==null||n!=="meta"&&n!=="title"&&n!=="style"&&n!=="link"&&n!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",n,n),!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof o.precedence!=="string"||typeof o.href!=="string"||o.href===""){d&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof o.rel!=="string"||typeof o.href!=="string"||o.href===""||o.onLoad||o.onError){if(o.rel==="stylesheet"&&typeof o.precedence==="string"){n=o.href;var{onError:p,disabled:g}=o;s=[],o.onLoad&&s.push("`onLoad`"),p&&s.push("`onError`"),g!=null&&s.push("`disabled`"),p=gq(s,"and"),p+=s.length===1?" prop":" props",g=s.length===1?"an "+p:"the "+p,s.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',n,g,p)}d&&(typeof o.rel!=="string"||typeof o.href!=="string"||o.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(o.onError||o.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(o.rel){case"stylesheet":return n=o.precedence,o=o.disabled,typeof n!=="string"&&d&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof n==="string"&&o==null;default:return!0}case"script":if(n=o.async&&typeof o.async!=="function"&&typeof o.async!=="symbol",!n||o.onLoad||o.onError||!o.src||typeof o.src!=="string"){d&&(n?o.onLoad||o.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":d&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",n)}return!1}function vN(n){return n.type==="stylesheet"&&(n.state.loading&n6)===Iu?!1:!0}function Uq(n,o,s,d){if(s.type==="stylesheet"&&(typeof d.media!=="string"||matchMedia(d.media).matches!==!1)&&(s.state.loading&sa)===Iu){if(s.instance===null){var p=lf(d.href),g=o.querySelector(Gh(p));if(g){o=g._p,o!==null&&typeof o==="object"&&typeof o.then==="function"&&(n.count++,n=F0.bind(n),o.then(n,n)),s.state.loading|=sa,s.instance=g,je(g);return}g=o.ownerDocument||o,d=mN(d),(p=la.get(p))&&rC(d,p),g=g.createElement("link"),je(g);var x=g;x._p=new Promise(function(C,T){x.onload=C,x.onerror=T}),lr(g,"link",d),s.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&n6)===Iu&&(n.count++,s=F0.bind(n),o.addEventListener("load",s),o.addEventListener("error",s))}}function Fq(n,o){return n.stylesheets&&n.count===0&&V0(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var d=setTimeout(function(){if(n.stylesheets&&V0(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},_W+o);0<n.imgBytes&&_w===0&&(_w=125*bq()*BW);var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&V0(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>_w?50:IW)+o);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function F0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)V0(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}function V0(n,o){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Wy=new Map,o.forEach(Vq,n),Wy=null,F0.call(n))}function Vq(n,o){if(!(o.state.loading&sa)){var s=Wy.get(n);if(s)var d=s.get(Iw);else{s=new Map,Wy.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var x=p[g];if(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")s.set(x.dataset.precedence,x),d=x}d&&s.set(Iw,d)}p=o.instance,x=p.getAttribute("data-precedence"),g=s.get(x)||d,g===d&&s.set(Iw,p),s.set(x,p),this.count++,d=F0.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),g?g.parentNode.insertBefore(p,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),o.state.loading|=sa}}function jq(n,o,s,d,p,g,x,C,T){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=_u,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Kd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kd(0),this.hiddenUpdates=Kd(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,n=this.pendingUpdatersLaneMap=[];for(o=0;31>o;o++)n.push(new Set);this._debugRootType=s?"hydrateRoot()":"createRoot()"}function xN(n,o,s,d,p,g,x,C,T,A,K,q){return n=new jq(n,o,s,x,T,A,K,q,C),o=cW,g===!0&&(o|=Tr|za),o|=st,g=y(3,null,null,o),n.current=g,g.stateNode=n,o=O2(),cu(o),n.pooledCache=o,cu(o),g.memoizedState={element:d,isDehydrated:s,cache:o},I2(g),n}function $N(n){if(!n)return zl;return n=zl,n}function aC(n,o,s,d,p,g){if(Er&&typeof Er.onScheduleFiberRoot==="function")try{Er.onScheduleFiberRoot(hf,d,s)}catch(x){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",x))}p=$N(p),d.context===null?d.context=p:d.pendingContext=p,ki&&Mo!==null&&!s6&&(s6=!0,console.error(`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.
188
+
189
+ Check the render method of %s.`,J(Mo)||"Unknown")),d=wl(o),d.payload={element:s},g=g===void 0?null:g,g!==null&&(typeof g!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",g),d.callback=g),s=El(n,d,o),s!==null&&(pi(o,"root.render()",null),fn(s,n,o),kh(s,n,o))}function SN(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function iC(n,o){SN(n,o),(n=n.alternate)&&SN(n,o)}function CN(n){if(n.tag===13||n.tag===31){var o=wr(n,67108864);o!==null&&fn(o,n,67108864),iC(n,67108864)}}function wN(n){if(n.tag===13||n.tag===31){var o=Ro(n);o=eu(o);var s=wr(n,o);s!==null&&fn(s,n,o),iC(n,o)}}function Kq(){return Mo}function qq(n,o,s,d){var p=oe.T;oe.T=null;var g=It.p;try{It.p=No,sC(n,o,s,d)}finally{It.p=g,oe.T=p}}function Gq(n,o,s,d){var p=oe.T;oe.T=null;var g=It.p;try{It.p=Ba,sC(n,o,s,d)}finally{It.p=g,oe.T=p}}function sC(n,o,s,d){if(Jy){var p=lC(d);if(p===null)qS(n,o,d,Xy,s),TN(n,d);else if(Wq(p,n,o,s,d))d.stopPropagation();else if(TN(n,d),o&4&&-1<HW.indexOf(n)){for(;p!==null;){var g=et(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=ci(g.pendingLanes);if(x!==0){var C=g;C.pendingLanes|=2;for(C.entangledLanes|=2;x;){var T=1<<31-Lr(x);C.entanglements[1]|=T,x&=~T}wi(g),(kt&(Wn|Lo))===tr&&(Dy=Qn()+L7,Fh(0,!1))}}break;case 31:case 13:C=wr(g,2),C!==null&&fn(C,g,2),of(),iC(g,2)}if(g=lC(d),g===null&&qS(n,o,d,Xy,s),g===p)break;p=g}p!==null&&d.stopPropagation()}else qS(n,o,d,null,s)}}function lC(n){return n=h2(n),cC(n)}function cC(n){if(Xy=null,n=_e(n),n!==null){var o=R(n);if(o===null)n=null;else{var s=o.tag;if(s===13){if(n=D(o),n!==null)return n;n=null}else if(s===31){if(n=H(o),n!==null)return n;n=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}return Xy=n,null}function EN(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return No;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Ba;case"message":switch(rG()){case SC:return No;case CC:return Ba;case pf:case oG:return Ni;case wC:return Z0;default:return Ni}default:return Ni}}function TN(n,o){switch(n){case"focusin":case"focusout":nc=null;break;case"dragenter":case"dragleave":rc=null;break;case"mouseover":case"mouseout":oc=null;break;case"pointerover":case"pointerout":Vm.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":jm.delete(o.pointerId)}}function Yh(n,o,s,d,p,g){if(n===null||n.nativeEvent!==g)return n={blockedOn:o,domEventName:s,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},o!==null&&(o=et(o),o!==null&&CN(o)),n;return n.eventSystemFlags|=d,o=n.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),n}function Wq(n,o,s,d,p){switch(o){case"focusin":return nc=Yh(nc,n,o,s,d,p),!0;case"dragenter":return rc=Yh(rc,n,o,s,d,p),!0;case"mouseover":return oc=Yh(oc,n,o,s,d,p),!0;case"pointerover":var g=p.pointerId;return Vm.set(g,Yh(Vm.get(g)||null,n,o,s,d,p)),!0;case"gotpointercapture":return g=p.pointerId,jm.set(g,Yh(jm.get(g)||null,n,o,s,d,p)),!0}return!1}function RN(n){var o=_e(n.target);if(o!==null){var s=R(o);if(s!==null){if(o=s.tag,o===13){if(o=D(s),o!==null){n.blockedOn=o,me(n.priority,function(){wN(s)});return}}else if(o===31){if(o=H(s),o!==null){n.blockedOn=o,me(n.priority,function(){wN(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function j0(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=lC(n.nativeEvent);if(s===null){s=n.nativeEvent;var d=new s.constructor(s.type,s),p=d;em!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),em=p,s.target.dispatchEvent(d),em===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),em=null}else return o=et(s),o!==null&&CN(o),n.blockedOn=s,!1;o.shift()}return!0}function kN(n,o,s){j0(n)&&s.delete(o)}function Yq(){Bw=!1,nc!==null&&j0(nc)&&(nc=null),rc!==null&&j0(rc)&&(rc=null),oc!==null&&j0(oc)&&(oc=null),Vm.forEach(kN),jm.forEach(kN)}function K0(n,o){n.blockedOn===o&&(n.blockedOn=null,Bw||(Bw=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,Yq)))}function AN(n){Qy!==n&&(Qy=n,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,function(){Qy===n&&(Qy=null);for(var o=0;o<n.length;o+=3){var s=n[o],d=n[o+1],p=n[o+2];if(typeof d!=="function")if(cC(d||s)===null)continue;else break;var g=et(s);g!==null&&(n.splice(o,3),o-=3,s={pending:!0,data:p,method:s.method,action:d},Object.freeze(s),cS(g,s,d,p))}}))}function uf(n){function o(T){return K0(T,n)}nc!==null&&K0(nc,n),rc!==null&&K0(rc,n),oc!==null&&K0(oc,n),Vm.forEach(o),jm.forEach(o);for(var s=0;s<ac.length;s++){var d=ac[s];d.blockedOn===n&&(d.blockedOn=null)}for(;0<ac.length&&(s=ac[0],s.blockedOn===null);)RN(s),s.blockedOn===null&&ac.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(d=0;d<s.length;d+=3){var p=s[d],g=s[d+1],x=p[_r]||null;if(typeof g==="function")x||AN(s);else if(x){var C=null;if(g&&g.hasAttribute("formAction")){if(p=g,x=g[_r]||null)C=x.formAction;else if(cC(p)!==null)continue}else C=x.action;typeof C==="function"?s[d+1]=C:(s.splice(d,3),d-=3),AN(s)}}}function MN(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return p=x})},focusReset:"manual",scroll:"manual"})}function o(){p!==null&&(p(),p=null),d||setTimeout(s,20)}function s(){if(!d&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var d=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(s,100),function(){d=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),p!==null&&(p(),p=null)}}}function uC(n){this._internalRoot=n}function q0(n){this._internalRoot=n}function NN(n){n[Ll]&&(n._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ft=Object.assign,Jq=Symbol.for("react.element"),Ti=Symbol.for("react.transitional.element"),df=Symbol.for("react.portal"),ff=Symbol.for("react.fragment"),G0=Symbol.for("react.strict_mode"),dC=Symbol.for("react.profiler"),fC=Symbol.for("react.consumer"),Ri=Symbol.for("react.context"),Jh=Symbol.for("react.forward_ref"),pC=Symbol.for("react.suspense"),hC=Symbol.for("react.suspense_list"),W0=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy"),mC=Symbol.for("react.activity"),Xq=Symbol.for("react.memo_cache_sentinel"),ON=Symbol.iterator,Qq=Symbol.for("react.client.reference"),qn=Array.isArray,oe=Qf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,It=eE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Zq=Object.freeze({pending:!1,data:null,method:null,action:null}),gC=[],bC=[],gs=-1,Ol=ye(null),Xh=ye(null),Dl=ye(null),Y0=ye(null),Qh=0,DN,PN,LN,_N,IN,BN,zN;k.__reactDisabledLog=!0;var yC,HN,vC=!1,xC=new(typeof WeakMap==="function"?WeakMap:Map),Mo=null,ki=!1,Ia=Object.prototype.hasOwnProperty,$C=Nt.unstable_scheduleCallback,eG=Nt.unstable_cancelCallback,tG=Nt.unstable_shouldYield,nG=Nt.unstable_requestPaint,Qn=Nt.unstable_now,rG=Nt.unstable_getCurrentPriorityLevel,SC=Nt.unstable_ImmediatePriority,CC=Nt.unstable_UserBlockingPriority,pf=Nt.unstable_NormalPriority,oG=Nt.unstable_LowPriority,wC=Nt.unstable_IdlePriority,aG=Nt.log,iG=Nt.unstable_setDisableYieldValue,hf=null,Er=null,Ai=!1,Mi=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Lr=Math.clz32?Math.clz32:Ib,sG=Math.log,lG=Math.LN2,J0=256,X0=262144,Q0=4194304,No=2,Ba=8,Ni=32,Z0=268435456,Pl=Math.random().toString(36).slice(2),cr="__reactFiber$"+Pl,_r="__reactProps$"+Pl,Ll="__reactContainer$"+Pl,EC="__reactEvents$"+Pl,cG="__reactListeners$"+Pl,uG="__reactHandles$"+Pl,UN="__reactResources$"+Pl,Zh="__reactMarker$"+Pl,FN=new Set,gu={},TC={},dG={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},fG=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),VN={},jN={},pG=/[\n"\\]/g,KN=!1,qN=!1,GN=!1,WN=!1,YN=!1,JN=!1,XN=["value","defaultValue"],QN=!1,ZN=/["'&<>\n\t]|^\s|\s$/,hG="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),e8="applet caption html table td th marquee object template foreignObject desc title".split(" "),mG=e8.concat(["button"]),gG="dd dt li option optgroup p rp rt".split(" "),t8={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},ey={},RC={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},n8=/([A-Z])/g,r8=/^ms-/,bG=/^(?:webkit|moz|o)[A-Z]/,yG=/^-ms-/,vG=/-(.)/g,o8=/;\s*$/,mf={},kC={},a8=!1,i8=!1,s8=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),ty="http://www.w3.org/1998/Math/MathML",gf="http://www.w3.org/2000/svg",xG=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ny={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},l8={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},bf={},$G=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),SG=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),c8=!1,Ir={},u8=/^on./,CG=/^on[^A-Z]/,wG=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),EG=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),TG=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,em=null,yf=null,vf=null,AC=!1,Oi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),MC=!1;if(Oi)try{var tm={};Object.defineProperty(tm,"passive",{get:function(){MC=!0}}),window.addEventListener("test",tm,tm),window.removeEventListener("test",tm,tm)}catch(n){MC=!1}var _l=null,NC=null,ry=null,bu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oy=Zr(bu),nm=ft({},bu,{view:0,detail:0}),RG=Zr(nm),OC,DC,rm,ay=ft({},nm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:m2,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){if("movementX"in n)return n.movementX;return n!==rm&&(rm&&n.type==="mousemove"?(OC=n.screenX-rm.screenX,DC=n.screenY-rm.screenY):DC=OC=0,rm=n),OC},movementY:function(n){return"movementY"in n?n.movementY:DC}}),d8=Zr(ay),kG=ft({},ay,{dataTransfer:0}),AG=Zr(kG),MG=ft({},nm,{relatedTarget:0}),PC=Zr(MG),NG=ft({},bu,{animationName:0,elapsedTime:0,pseudoElement:0}),OG=Zr(NG),DG=ft({},bu,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),PG=Zr(DG),LG=ft({},bu,{data:0}),f8=Zr(LG),_G=f8,IG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BG={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},HG=ft({},nm,{key:function(n){if(n.key){var o=IG[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=jb(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?BG[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:m2,charCode:function(n){return n.type==="keypress"?jb(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?jb(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),UG=Zr(HG),FG=ft({},ay,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),p8=Zr(FG),VG=ft({},nm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:m2}),jG=Zr(VG),KG=ft({},bu,{propertyName:0,elapsedTime:0,pseudoElement:0}),qG=Zr(KG),GG=ft({},ay,{deltaX:function(n){return"deltaX"in n?n.deltaX:("wheelDeltaX"in n)?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:("wheelDeltaY"in n)?-n.wheelDeltaY:("wheelDelta"in n)?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),WG=Zr(GG),YG=ft({},bu,{newState:0,oldState:0}),JG=Zr(YG),XG=[9,13,27,32],h8=229,LC=Oi&&"CompositionEvent"in window,om=null;Oi&&"documentMode"in document&&(om=document.documentMode);var QG=Oi&&"TextEvent"in window&&!om,m8=Oi&&(!LC||om&&8<om&&11>=om),g8=32,b8=String.fromCharCode(g8),y8=!1,xf=!1,ZG={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},am=null,im=null,v8=!1;Oi&&(v8=xK("input")&&(!document.documentMode||9<document.documentMode));var Br=typeof Object.is==="function"?Object.is:TK,eW=Oi&&"documentMode"in document&&11>=document.documentMode,$f=null,_C=null,sm=null,IC=!1,Sf={animationend:nu("Animation","AnimationEnd"),animationiteration:nu("Animation","AnimationIteration"),animationstart:nu("Animation","AnimationStart"),transitionrun:nu("Transition","TransitionRun"),transitionstart:nu("Transition","TransitionStart"),transitioncancel:nu("Transition","TransitionCancel"),transitionend:nu("Transition","TransitionEnd")},BC={},x8={};Oi&&(x8=document.createElement("div").style,("AnimationEvent"in window)||(delete Sf.animationend.animation,delete Sf.animationiteration.animation,delete Sf.animationstart.animation),("TransitionEvent"in window)||delete Sf.transitionend.transition);var $8=ru("animationend"),S8=ru("animationiteration"),C8=ru("animationstart"),tW=ru("transitionrun"),nW=ru("transitionstart"),rW=ru("transitioncancel"),w8=ru("transitionend"),E8=new Map,zC="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");zC.push("scrollEnd");var T8=0;if(typeof performance==="object"&&typeof performance.now==="function")var oW=performance,R8=function(){return oW.now()};else{var aW=Date;R8=function(){return aW.now()}}var HC=typeof reportError==="function"?reportError:function(n){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n==="object"&&n!==null&&typeof n.message==="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(o))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",n);return}console.error(n)},iW="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",iy=0,UC=1,FC=2,VC=3,sy="– ",ly="+ ",k8="  ",Jt=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",Xo="Components ⚛",pt="Scheduler ⚛",mt="Blocking",Il=!1,bs={color:"primary",properties:null,tooltipText:"",track:Xo},Bl={start:-0,end:-0,detail:{devtools:bs}},sW=["Changed Props",""],A8="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",lW=["Changed Props",A8],lm=1,ys=2,Qo=[],Cf=0,jC=0,zl={};Object.freeze(zl);var Zo=null,wf=null,We=0,cW=1,st=2,Tr=8,za=16,uW=32,M8=!1;try{var N8=Object.preventExtensions({})}catch(n){M8=!0}var KC=new WeakMap,Ef=[],Tf=0,cy=null,cm=0,ea=[],ta=0,yu=null,vs=1,xs="",ur=null,Xt=null,vt=!1,Di=!1,Oo=null,Hl=null,na=!1,qC=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),GC=ye(null),WC=ye(null),O8={},uy=null,Rf=null,kf=!1,dW=typeof AbortController<"u"?AbortController:function(){var n=[],o=this.signal={aborted:!1,addEventListener:function(s,d){n.push(d)}};this.abort=function(){o.aborted=!0,n.forEach(function(s){return s()})}},fW=Nt.unstable_scheduleCallback,pW=Nt.unstable_NormalPriority,Pn={$$typeof:Ri,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Ln=Nt.unstable_now,dy=console.createTask?console.createTask:function(){return null},um=1,fy=2,Zn=-0,Ul=-0,$s=-0,Ss=null,zr=-1.1,vu=-0,cn=-0,Ke=-1.1,Ge=-1.1,rn=null,pn=!1,Fl=-0,Pi=-1.1,dm=null,Vl=0,YC=null,JC=null,xu=-1.1,fm=null,Af=-1.1,py=-1.1,Li=-0,Cs=-1.1,ra=-1.1,XC=0,pm=null,D8=null,P8=null,jl=-1.1,$u=null,Kl=-1.1,hy=-1.1,L8=-0,_8=-0,my=0,ws=null,I8=0,hm=-1.1,gy=!1,by=!1,mm=null,QC=0,Su=0,Mf=null,B8=oe.S;oe.S=function(n,o){if(D7=Qn(),typeof o==="object"&&o!==null&&typeof o.then==="function"){if(0>Cs&&0>ra){Cs=Ln();var s=Kh(),d=jh();if(s!==Kl||d!==$u)Kl=-1.1;jl=s,$u=d}DK(n,o)}B8!==null&&B8(n,o)};var Cu=ye(null),Ha={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},gm=[],bm=[],ym=[],vm=[],xm=[],$m=[],wu=new Set;Ha.recordUnsafeLifecycleWarnings=function(n,o){wu.has(n.type)||(typeof o.componentWillMount==="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&gm.push(n),n.mode&Tr&&typeof o.UNSAFE_componentWillMount==="function"&&bm.push(n),typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&ym.push(n),n.mode&Tr&&typeof o.UNSAFE_componentWillReceiveProps==="function"&&vm.push(n),typeof o.componentWillUpdate==="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&xm.push(n),n.mode&Tr&&typeof o.UNSAFE_componentWillUpdate==="function"&&$m.push(n))},Ha.flushPendingUnsafeLifecycleWarnings=function(){var n=new Set;0<gm.length&&(gm.forEach(function(C){n.add(J(C)||"Component"),wu.add(C.type)}),gm=[]);var o=new Set;0<bm.length&&(bm.forEach(function(C){o.add(J(C)||"Component"),wu.add(C.type)}),bm=[]);var s=new Set;0<ym.length&&(ym.forEach(function(C){s.add(J(C)||"Component"),wu.add(C.type)}),ym=[]);var d=new Set;0<vm.length&&(vm.forEach(function(C){d.add(J(C)||"Component"),wu.add(C.type)}),vm=[]);var p=new Set;0<xm.length&&(xm.forEach(function(C){p.add(J(C)||"Component"),wu.add(C.type)}),xm=[]);var g=new Set;if(0<$m.length&&($m.forEach(function(C){g.add(J(C)||"Component"),wu.add(C.type)}),$m=[]),0<o.size){var x=b(o);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
190
+
191
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
192
+
193
+ Please update the following components: %s`,x)}0<d.size&&(x=b(d),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
194
+
195
+ * Move data fetching code or side effects to componentDidUpdate.
196
+ * 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://react.dev/link/derived-state
197
+
198
+ Please update the following components: %s`,x)),0<g.size&&(x=b(g),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
199
+
200
+ * Move data fetching code or side effects to componentDidUpdate.
201
+
202
+ Please update the following components: %s`,x)),0<n.size&&(x=b(n),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
203
+
204
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
205
+ * 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.
206
+
207
+ Please update the following components: %s`,x)),0<s.size&&(x=b(s),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
208
+
209
+ * Move data fetching code or side effects to componentDidUpdate.
210
+ * 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://react.dev/link/derived-state
211
+ * 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.
212
+
213
+ Please update the following components: %s`,x)),0<p.size&&(x=b(p),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
214
+
215
+ * Move data fetching code or side effects to componentDidUpdate.
216
+ * 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.
217
+
218
+ Please update the following components: %s`,x))};var yy=new Map,z8=new Set;Ha.recordLegacyContextWarning=function(n,o){var s=null;for(var d=n;d!==null;)d.mode&Tr&&(s=d),d=d.return;s===null?console.error("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."):!z8.has(n.type)&&(d=yy.get(s),n.type.contextTypes!=null||n.type.childContextTypes!=null||o!==null&&typeof o.getChildContext==="function")&&(d===void 0&&(d=[],yy.set(s,d)),d.push(n))},Ha.flushLegacyContextWarning=function(){yy.forEach(function(n){if(n.length!==0){var o=n[0],s=new Set;n.forEach(function(p){s.add(J(p)||"Component"),z8.add(p.type)});var d=b(s);he(o,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
219
+
220
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
221
+
222
+ Please update the following components: %s
223
+
224
+ Learn more about this warning here: https://react.dev/link/legacy-context`,d)})}})},Ha.discardPendingWarnings=function(){gm=[],bm=[],ym=[],vm=[],xm=[],$m=[],yy=new Map};var H8={react_stack_bottom_frame:function(n,o,s){var d=ki;ki=!0;try{return n(o,s)}finally{ki=d}}},ZC=H8.react_stack_bottom_frame.bind(H8),U8={react_stack_bottom_frame:function(n){var o=ki;ki=!0;try{return n.render()}finally{ki=o}}},F8=U8.react_stack_bottom_frame.bind(U8),V8={react_stack_bottom_frame:function(n,o){try{o.componentDidMount()}catch(s){_t(n,n.return,s)}}},ew=V8.react_stack_bottom_frame.bind(V8),j8={react_stack_bottom_frame:function(n,o,s,d,p){try{o.componentDidUpdate(s,d,p)}catch(g){_t(n,n.return,g)}}},K8=j8.react_stack_bottom_frame.bind(j8),q8={react_stack_bottom_frame:function(n,o){var s=o.stack;n.componentDidCatch(o.value,{componentStack:s!==null?s:""})}},hW=q8.react_stack_bottom_frame.bind(q8),G8={react_stack_bottom_frame:function(n,o,s){try{s.componentWillUnmount()}catch(d){_t(n,o,d)}}},W8=G8.react_stack_bottom_frame.bind(G8),Y8={react_stack_bottom_frame:function(n){var o=n.create;return n=n.inst,o=o(),n.destroy=o}},mW=Y8.react_stack_bottom_frame.bind(Y8),J8={react_stack_bottom_frame:function(n,o,s){try{s()}catch(d){_t(n,o,d)}}},gW=J8.react_stack_bottom_frame.bind(J8),X8={react_stack_bottom_frame:function(n){var o=n._init;return o(n._payload)}},bW=X8.react_stack_bottom_frame.bind(X8),Nf=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),tw=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),vy=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),xy={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Eu=null,Sm=!1,Of=null,Cm=0,lt=null,nw,Q8=nw=!1,Z8={},e7={},t7={};m=function(n,o,s){if(s!==null&&typeof s==="object"&&s._store&&(!s._store.validated&&s.key==null||s._store.validated===2)){if(typeof s._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.");s._store.validated=1;var d=J(n),p=d||"null";if(!Z8[p]){Z8[p]=!0,s=s._owner,n=n._debugOwner;var g="";n&&typeof n.tag==="number"&&(p=J(n))&&(g=`
225
+
226
+ Check the render method of \``+p+"`."),g||d&&(g=`
227
+
228
+ Check the top-level render call using <`+d+">.");var x="";s!=null&&n!==s&&(d=null,typeof s.tag==="number"?d=J(s):typeof s.name==="string"&&(d=s.name),d&&(x=" It was passed a child from "+d+".")),he(o,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',g,x)})}}};var Tu=G5(!0),n7=G5(!1),r7=0,o7=1,a7=2,rw=3,ql=!1,i7=!1,ow=null,aw=!1,Df=ye(null),$y=ye(0),Do=ye(null),oa=null,Pf=1,wm=2,kn=ye(0),Sy=0,aa=1,Hr=2,Po=4,Ur=8,Lf,s7=new Set,l7=new Set,iw=new Set,c7=new Set,Es=0,Je=null,Vt=null,_n=null,Cy=!1,_f=!1,Ru=!1,wy=0,Em=0,Ts=null,yW=0,vW=25,ne=null,ia=null,Rs=-1,Tm=!1,Rm={readContext:nn,use:kl,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useLayoutEffect:yn,useInsertionEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useSyncExternalStore:yn,useId:yn,useHostTransitionStatus:yn,useFormState:yn,useActionState:yn,useOptimistic:yn,useMemoCache:yn,useCacheRefresh:yn};Rm.useEffectEvent=yn;var sw=null,u7=null,lw=null,d7=null,_i=null,Ua=null,Ey=null;sw={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",dt(),Xd(o),aS(n,o)},useContext:function(n){return ne="useContext",dt(),nn(n)},useEffect:function(n,o){return ne="useEffect",dt(),Xd(o),y0(n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",dt(),Xd(s),oS(n,o,s)},useInsertionEffect:function(n,o){ne="useInsertionEffect",dt(),Xd(o),du(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",dt(),Xd(o),rS(n,o)},useMemo:function(n,o){ne="useMemo",dt(),Xd(o);var s=oe.H;oe.H=_i;try{return iS(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",dt();var d=oe.H;oe.H=_i;try{return W2(n,o,s)}finally{oe.H=d}},useRef:function(n){return ne="useRef",dt(),tS(n)},useState:function(n){ne="useState",dt();var o=oe.H;oe.H=_i;try{return Q2(n)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",dt()},useDeferredValue:function(n,o){return ne="useDeferredValue",dt(),sS(n,o)},useTransition:function(){return ne="useTransition",dt(),uS()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",dt(),J2(n,o,s)},useId:function(){return ne="useId",dt(),dS()},useFormState:function(n,o){return ne="useFormState",dt(),p0(),Zd(n,o)},useActionState:function(n,o){return ne="useActionState",dt(),Zd(n,o)},useOptimistic:function(n){return ne="useOptimistic",dt(),Z2(n)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",dt(),fS()},useEffectEvent:function(n){return ne="useEffectEvent",dt(),nS(n)}},u7={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",de(),aS(n,o)},useContext:function(n){return ne="useContext",de(),nn(n)},useEffect:function(n,o){return ne="useEffect",de(),y0(n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",de(),oS(n,o,s)},useInsertionEffect:function(n,o){ne="useInsertionEffect",de(),du(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",de(),rS(n,o)},useMemo:function(n,o){ne="useMemo",de();var s=oe.H;oe.H=_i;try{return iS(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",de();var d=oe.H;oe.H=_i;try{return W2(n,o,s)}finally{oe.H=d}},useRef:function(n){return ne="useRef",de(),tS(n)},useState:function(n){ne="useState",de();var o=oe.H;oe.H=_i;try{return Q2(n)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",de()},useDeferredValue:function(n,o){return ne="useDeferredValue",de(),sS(n,o)},useTransition:function(){return ne="useTransition",de(),uS()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",de(),J2(n,o,s)},useId:function(){return ne="useId",de(),dS()},useActionState:function(n,o){return ne="useActionState",de(),Zd(n,o)},useFormState:function(n,o){return ne="useFormState",de(),p0(),Zd(n,o)},useOptimistic:function(n){return ne="useOptimistic",de(),Z2(n)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),fS()},useEffectEvent:function(n){return ne="useEffectEvent",de(),nS(n)}},lw={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",de(),$0(n,o)},useContext:function(n){return ne="useContext",de(),nn(n)},useEffect:function(n,o){ne="useEffect",de(),eo(2048,Ur,n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",de(),x0(n,o,s)},useInsertionEffect:function(n,o){return ne="useInsertionEffect",de(),eo(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",de(),eo(4,Po,n,o)},useMemo:function(n,o){ne="useMemo",de();var s=oe.H;oe.H=Ua;try{return S0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",de();var d=oe.H;oe.H=Ua;try{return Qd(n,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",de(),zt().memoizedState},useState:function(){ne="useState",de();var n=oe.H;oe.H=Ua;try{return Qd(La)}finally{oe.H=n}},useDebugValue:function(){ne="useDebugValue",de()},useDeferredValue:function(n,o){return ne="useDeferredValue",de(),mA(n,o)},useTransition:function(){return ne="useTransition",de(),$A()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",de(),m0(n,o,s)},useId:function(){return ne="useId",de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",de(),p0(),g0(n)},useActionState:function(n){return ne="useActionState",de(),g0(n)},useOptimistic:function(n,o){return ne="useOptimistic",de(),aA(n,o)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),zt().memoizedState},useEffectEvent:function(n){return ne="useEffectEvent",de(),v0(n)}},d7={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",de(),$0(n,o)},useContext:function(n){return ne="useContext",de(),nn(n)},useEffect:function(n,o){ne="useEffect",de(),eo(2048,Ur,n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",de(),x0(n,o,s)},useInsertionEffect:function(n,o){return ne="useInsertionEffect",de(),eo(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",de(),eo(4,Po,n,o)},useMemo:function(n,o){ne="useMemo",de();var s=oe.H;oe.H=Ey;try{return S0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",de();var d=oe.H;oe.H=Ey;try{return Oh(n,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",de(),zt().memoizedState},useState:function(){ne="useState",de();var n=oe.H;oe.H=Ey;try{return Oh(La)}finally{oe.H=n}},useDebugValue:function(){ne="useDebugValue",de()},useDeferredValue:function(n,o){return ne="useDeferredValue",de(),gA(n,o)},useTransition:function(){return ne="useTransition",de(),SA()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",de(),m0(n,o,s)},useId:function(){return ne="useId",de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",de(),p0(),b0(n)},useActionState:function(n){return ne="useActionState",de(),b0(n)},useOptimistic:function(n,o){return ne="useOptimistic",de(),sA(n,o)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),zt().memoizedState},useEffectEvent:function(n){return ne="useEffectEvent",de(),v0(n)}},_i={readContext:function(n){return f(),nn(n)},use:function(n){return u(),kl(n)},useCallback:function(n,o){return ne="useCallback",u(),dt(),aS(n,o)},useContext:function(n){return ne="useContext",u(),dt(),nn(n)},useEffect:function(n,o){return ne="useEffect",u(),dt(),y0(n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",u(),dt(),oS(n,o,s)},useInsertionEffect:function(n,o){ne="useInsertionEffect",u(),dt(),du(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",u(),dt(),rS(n,o)},useMemo:function(n,o){ne="useMemo",u(),dt();var s=oe.H;oe.H=_i;try{return iS(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",u(),dt();var d=oe.H;oe.H=_i;try{return W2(n,o,s)}finally{oe.H=d}},useRef:function(n){return ne="useRef",u(),dt(),tS(n)},useState:function(n){ne="useState",u(),dt();var o=oe.H;oe.H=_i;try{return Q2(n)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",u(),dt()},useDeferredValue:function(n,o){return ne="useDeferredValue",u(),dt(),sS(n,o)},useTransition:function(){return ne="useTransition",u(),dt(),uS()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",u(),dt(),J2(n,o,s)},useId:function(){return ne="useId",u(),dt(),dS()},useFormState:function(n,o){return ne="useFormState",u(),dt(),Zd(n,o)},useActionState:function(n,o){return ne="useActionState",u(),dt(),Zd(n,o)},useOptimistic:function(n){return ne="useOptimistic",u(),dt(),Z2(n)},useMemoCache:function(n){return u(),uu(n)},useHostTransitionStatus:fu,useCacheRefresh:function(){return ne="useCacheRefresh",dt(),fS()},useEffectEvent:function(n){return ne="useEffectEvent",u(),dt(),nS(n)}},Ua={readContext:function(n){return f(),nn(n)},use:function(n){return u(),kl(n)},useCallback:function(n,o){return ne="useCallback",u(),de(),$0(n,o)},useContext:function(n){return ne="useContext",u(),de(),nn(n)},useEffect:function(n,o){ne="useEffect",u(),de(),eo(2048,Ur,n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",u(),de(),x0(n,o,s)},useInsertionEffect:function(n,o){return ne="useInsertionEffect",u(),de(),eo(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",u(),de(),eo(4,Po,n,o)},useMemo:function(n,o){ne="useMemo",u(),de();var s=oe.H;oe.H=Ua;try{return S0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",u(),de();var d=oe.H;oe.H=Ua;try{return Qd(n,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",u(),de(),zt().memoizedState},useState:function(){ne="useState",u(),de();var n=oe.H;oe.H=Ua;try{return Qd(La)}finally{oe.H=n}},useDebugValue:function(){ne="useDebugValue",u(),de()},useDeferredValue:function(n,o){return ne="useDeferredValue",u(),de(),mA(n,o)},useTransition:function(){return ne="useTransition",u(),de(),$A()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",u(),de(),m0(n,o,s)},useId:function(){return ne="useId",u(),de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",u(),de(),g0(n)},useActionState:function(n){return ne="useActionState",u(),de(),g0(n)},useOptimistic:function(n,o){return ne="useOptimistic",u(),de(),aA(n,o)},useMemoCache:function(n){return u(),uu(n)},useHostTransitionStatus:fu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),zt().memoizedState},useEffectEvent:function(n){return ne="useEffectEvent",u(),de(),v0(n)}},Ey={readContext:function(n){return f(),nn(n)},use:function(n){return u(),kl(n)},useCallback:function(n,o){return ne="useCallback",u(),de(),$0(n,o)},useContext:function(n){return ne="useContext",u(),de(),nn(n)},useEffect:function(n,o){ne="useEffect",u(),de(),eo(2048,Ur,n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",u(),de(),x0(n,o,s)},useInsertionEffect:function(n,o){return ne="useInsertionEffect",u(),de(),eo(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",u(),de(),eo(4,Po,n,o)},useMemo:function(n,o){ne="useMemo",u(),de();var s=oe.H;oe.H=Ua;try{return S0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",u(),de();var d=oe.H;oe.H=Ua;try{return Oh(n,o,s)}finally{oe.H=d}},useRef:function(){return ne="useRef",u(),de(),zt().memoizedState},useState:function(){ne="useState",u(),de();var n=oe.H;oe.H=Ua;try{return Oh(La)}finally{oe.H=n}},useDebugValue:function(){ne="useDebugValue",u(),de()},useDeferredValue:function(n,o){return ne="useDeferredValue",u(),de(),gA(n,o)},useTransition:function(){return ne="useTransition",u(),de(),SA()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",u(),de(),m0(n,o,s)},useId:function(){return ne="useId",u(),de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",u(),de(),b0(n)},useActionState:function(n){return ne="useActionState",u(),de(),b0(n)},useOptimistic:function(n,o){return ne="useOptimistic",u(),de(),sA(n,o)},useMemoCache:function(n){return u(),uu(n)},useHostTransitionStatus:fu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),zt().memoizedState},useEffectEvent:function(n){return ne="useEffectEvent",u(),de(),v0(n)}};var f7={},p7=new Set,h7=new Set,m7=new Set,g7=new Set,b7=new Set,y7=new Set,v7=new Set,x7=new Set,$7=new Set,S7=new Set;Object.freeze(f7);var cw={enqueueSetState:function(n,o,s){n=n._reactInternals;var d=Ro(n),p=wl(d);p.payload=o,s!==void 0&&s!==null&&(hS(s),p.callback=s),o=El(n,p,d),o!==null&&(pi(d,"this.setState()",n),fn(o,n,d),kh(o,n,d))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var d=Ro(n),p=wl(d);p.tag=o7,p.payload=o,s!==void 0&&s!==null&&(hS(s),p.callback=s),o=El(n,p,d),o!==null&&(pi(d,"this.replaceState()",n),fn(o,n,d),kh(o,n,d))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=Ro(n),d=wl(s);d.tag=a7,o!==void 0&&o!==null&&(hS(o),d.callback=o),o=El(n,d,s),o!==null&&(pi(s,"this.forceUpdate()",n),fn(o,n,s),kh(o,n,s))}},If=null,uw=null,dw=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),In=!1,C7={},w7={},E7={},T7={},Bf=!1,R7={},Ty={},fw={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},k7=!1,A7=null;A7=new Set;var ks=!1,Bn=!1,pw=!1,M7=typeof WeakSet==="function"?WeakSet:Set,er=null,zf=null,Hf=null,zn=null,ro=!1,Fa=null,Gn=!1,km=8192,xW={getCacheForType:function(n){var o=nn(Pn),s=o.data.get(n);return s===void 0&&(s=n(),o.data.set(n,s)),s},cacheSignal:function(){return nn(Pn).controller.signal},getOwner:function(){return Mo}};if(typeof Symbol==="function"&&Symbol.for){var Am=Symbol.for;Am("selector.component"),Am("selector.has_pseudo_class"),Am("selector.role"),Am("selector.test_id"),Am("selector.text")}var $W=[],SW=typeof WeakMap==="function"?WeakMap:Map,tr=0,Wn=2,Lo=4,As=0,Mm=1,ku=2,Ry=3,Gl=4,ky=6,N7=5,kt=tr,jt=null,ut=null,ct=0,oo=0,Ay=1,Au=2,Nm=3,O7=4,hw=5,Om=6,My=7,mw=8,Mu=9,Ht=oo,_o=null,Wl=!1,Uf=!1,gw=!1,Ii=0,un=As,Yl=0,Jl=0,bw=0,ao=0,Nu=0,Dm=null,Fr=null,Ny=!1,Oy=0,D7=0,P7=300,Dy=1/0,L7=500,Pm=null,vn=null,Xl=null,Py=0,yw=1,vw=2,_7=3,Ql=0,I7=1,B7=2,z7=3,H7=4,Ly=5,Hn=0,Zl=null,Ff=null,Va=0,xw=0,$w=-0,Sw=null,U7=null,F7=null,ja=Py,V7=null,CW=50,Lm=0,Cw=null,ww=!1,_y=!1,wW=50,Ou=0,_m=null,Vf=!1,Iy=null,j7=!1,K7=new Set,EW={},By=null,jf=null,Ew=!1,Tw=!1,zy=!1,Rw=!1,ec=0,kw={};(function(){for(var n=0;n<zC.length;n++){var o=zC[n],s=o.toLowerCase();o=o[0].toUpperCase()+o.slice(1),Pa(s,"on"+o)}Pa($8,"onAnimationEnd"),Pa(S8,"onAnimationIteration"),Pa(C8,"onAnimationStart"),Pa("dblclick","onDoubleClick"),Pa("focusin","onFocus"),Pa("focusout","onBlur"),Pa(tW,"onTransitionRun"),Pa(nW,"onTransitionStart"),Pa(rW,"onTransitionCancel"),Pa(w8,"onTransitionEnd")})(),xo("onMouseEnter",["mouseout","mouseover"]),xo("onMouseLeave",["mouseout","mouseover"]),xo("onPointerEnter",["pointerout","pointerover"]),xo("onPointerLeave",["pointerout","pointerover"]),Cr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Im="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Aw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Im)),Hy="_reactListening"+Math.random().toString(36).slice(2),q7=!1,G7=!1,Uy=!1,W7=!1,Fy=!1,Vy=!1,Y7=!1,jy={},TW=/\r\n?/g,RW=/\u0000|\uFFFD/g,Du="http://www.w3.org/1999/xlink",Mw="http://www.w3.org/XML/1998/namespace",kW="javascript:throw new Error('React form unexpectedly submitted.')",AW="suppressHydrationWarning",Pu="&",Ky="/&",Bm="$",zm="/$",tc="$?",Lu="$~",Kf="$!",MW="html",NW="body",OW="head",Nw="F!",J7="F",X7="loading",DW="style",Ms=0,qf=1,qy=2,Ow=null,Dw=null,Q7={dialog:!0,webview:!0},Pw=null,Hm=void 0,Z7=typeof setTimeout==="function"?setTimeout:void 0,PW=typeof clearTimeout==="function"?clearTimeout:void 0,_u=-1,e6=typeof Promise==="function"?Promise:void 0,LW=typeof queueMicrotask==="function"?queueMicrotask:typeof e6<"u"?function(n){return e6.resolve(null).then(n).catch(vq)}:Z7,Lw=null,Iu=0,Um=1,t6=2,n6=3,sa=4,la=new Map,r6=new Set,Ns=It.d;It.d={f:function(){var n=Ns.f(),o=of();return n||o},r:function(n){var o=et(n);o!==null&&o.tag===5&&o.type==="form"?xA(o):Ns.r(n)},D:function(n){Ns.D(n),pN("dns-prefetch",n,null)},C:function(n,o){Ns.C(n,o),pN("preconnect",n,o)},L:function(n,o,s){Ns.L(n,o,s);var d=Gf;if(d&&n&&o){var p='link[rel="preload"][as="'+Yo(o)+'"]';o==="image"?s&&s.imageSrcSet?(p+='[imagesrcset="'+Yo(s.imageSrcSet)+'"]',typeof s.imageSizes==="string"&&(p+='[imagesizes="'+Yo(s.imageSizes)+'"]')):p+='[href="'+Yo(n)+'"]':p+='[href="'+Yo(n)+'"]';var g=p;switch(o){case"style":g=lf(n);break;case"script":g=cf(n)}la.has(g)||(n=ft({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:n,as:o},s),la.set(g,n),d.querySelector(p)!==null||o==="style"&&d.querySelector(Gh(g))||o==="script"&&d.querySelector(Wh(g))||(o=d.createElement("link"),lr(o,"link",n),je(o),d.head.appendChild(o)))}},m:function(n,o){Ns.m(n,o);var s=Gf;if(s&&n){var d=o&&typeof o.as==="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Yo(d)+'"][href="'+Yo(n)+'"]',g=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=cf(n)}if(!la.has(g)&&(n=ft({rel:"modulepreload",href:n},o),la.set(g,n),s.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Wh(g)))return}d=s.createElement("link"),lr(d,"link",n),je(d),s.head.appendChild(d)}}},X:function(n,o){Ns.X(n,o);var s=Gf;if(s&&n){var d=Mt(s).hoistableScripts,p=cf(n),g=d.get(p);g||(g=s.querySelector(Wh(p)),g||(n=ft({src:n,async:!0},o),(o=la.get(p))&&oC(n,o),g=s.createElement("script"),je(g),lr(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}},S:function(n,o,s){Ns.S(n,o,s);var d=Gf;if(d&&n){var p=Mt(d).hoistableStyles,g=lf(n);o=o||"default";var x=p.get(g);if(!x){var C={loading:Iu,preload:null};if(x=d.querySelector(Gh(g)))C.loading=Um|sa;else{n=ft({rel:"stylesheet",href:n,"data-precedence":o},s),(s=la.get(g))&&rC(n,s);var T=x=d.createElement("link");je(T),lr(T,"link",n),T._p=new Promise(function(A,K){T.onload=A,T.onerror=K}),T.addEventListener("load",function(){C.loading|=Um}),T.addEventListener("error",function(){C.loading|=t6}),C.loading|=sa,U0(x,o,d)}x={type:"stylesheet",instance:x,count:1,state:C},p.set(g,x)}}},M:function(n,o){Ns.M(n,o);var s=Gf;if(s&&n){var d=Mt(s).hoistableScripts,p=cf(n),g=d.get(p);g||(g=s.querySelector(Wh(p)),g||(n=ft({src:n,async:!0,type:"module"},o),(o=la.get(p))&&oC(n,o),g=s.createElement("script"),je(g),lr(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(p,g))}}};var Gf=typeof document>"u"?null:document,Gy=null,_W=60000,IW=800,BW=500,_w=0,Iw=null,Wy=null,Bu=Zq,Fm={$$typeof:Ri,Provider:null,Consumer:null,_currentValue:Bu,_currentValue2:Bu,_threadCount:0},o6="%c%s%c",a6="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",i6="",Yy=" ",zW=Function.prototype.bind,s6=!1,l6=null,c6=null,u6=null,d6=null,f6=null,p6=null,h6=null,m6=null,g6=null,b6=null;l6=function(n,o,s,d){o=e(n,o),o!==null&&(s=t(o.memoizedState,s,0,d),o.memoizedState=s,o.baseState=s,n.memoizedProps=ft({},n.memoizedProps),s=wr(n,2),s!==null&&fn(s,n,2))},c6=function(n,o,s){o=e(n,o),o!==null&&(s=i(o.memoizedState,s,0),o.memoizedState=s,o.baseState=s,n.memoizedProps=ft({},n.memoizedProps),s=wr(n,2),s!==null&&fn(s,n,2))},u6=function(n,o,s,d){o=e(n,o),o!==null&&(s=r(o.memoizedState,s,d),o.memoizedState=s,o.baseState=s,n.memoizedProps=ft({},n.memoizedProps),s=wr(n,2),s!==null&&fn(s,n,2))},d6=function(n,o,s){n.pendingProps=t(n.memoizedProps,o,0,s),n.alternate&&(n.alternate.pendingProps=n.pendingProps),o=wr(n,2),o!==null&&fn(o,n,2)},f6=function(n,o){n.pendingProps=i(n.memoizedProps,o,0),n.alternate&&(n.alternate.pendingProps=n.pendingProps),o=wr(n,2),o!==null&&fn(o,n,2)},p6=function(n,o,s){n.pendingProps=r(n.memoizedProps,o,s),n.alternate&&(n.alternate.pendingProps=n.pendingProps),o=wr(n,2),o!==null&&fn(o,n,2)},h6=function(n){var o=wr(n,2);o!==null&&fn(o,n,2)},m6=function(n){var o=jd(),s=wr(n,o);s!==null&&fn(s,n,o)},g6=function(n){c=n},b6=function(n){l=n};var Jy=!0,Xy=null,Bw=!1,nc=null,rc=null,oc=null,Vm=new Map,jm=new Map,ac=[],HW="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Qy=null;if(q0.prototype.render=uC.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error("Cannot update an unmounted root.");var s=arguments;typeof s[1]==="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):E(s[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof s[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),s=n;var d=o.current,p=Ro(d);aC(d,p,s,o,null,null)},q0.prototype.unmount=uC.prototype.unmount=function(){var n=arguments;if(typeof n[0]==="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),n=this._internalRoot,n!==null){this._internalRoot=null;var o=n.containerInfo;(kt&(Wn|Lo))!==tr&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),aC(n.current,2,null,n,null,null),of(),o[Ll]=null}},q0.prototype.unstable_scheduleHydration=function(n){if(n){var o=Q();n={blockedOn:null,target:n,priority:o};for(var s=0;s<ac.length&&o!==0&&o<ac[s].priority;s++);ac.splice(s,0,n),s===0&&RN(n)}},function(){var n=Qf.version;if(n!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
229
+ - react: `+(n+`
230
+ - react-dom: 19.2.7
231
+ Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),It.findDOMNode=function(n){var o=n._reactInternals;if(o===void 0){if(typeof n.render==="function")throw Error("Unable to find node on an unmounted component.");throw n=Object.keys(n).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+n)}return n=G(o),n=n!==null?ee(n):null,n=n===null?null:n.stateNode,n},!function(){var n={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:oe,reconcilerVersion:"19.2.7"};return n.overrideHookState=l6,n.overrideHookStateDeletePath=c6,n.overrideHookStateRenamePath=u6,n.overrideProps=d6,n.overridePropsDeletePath=f6,n.overridePropsRenamePath=p6,n.scheduleUpdate=h6,n.scheduleRetry=m6,n.setErrorHandler=g6,n.setSuspenseHandler=b6,n.scheduleRefresh=S,n.scheduleRoot=v,n.setRefreshHandler=w,n.getCurrentFiber=Kq,Vd(n)}()&&Oi&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var y6=window.location.protocol;/^(https?|file):$/.test(y6)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(y6==="file:"?`
232
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}$Y.createRoot=function(n,o){if(!E(n))throw Error("Target container is not a DOM element.");NN(n);var s=!1,d="",p=kA,g=AA,x=MA;return o!==null&&o!==void 0&&(o.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof o==="object"&&o!==null&&o.$$typeof===Ti&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
233
+
234
+ let root = createRoot(domContainer);
235
+ root.render(<App />);`),o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=xN(n,1,!1,null,null,s,d,null,p,g,x,MN),n[Ll]=o.current,KS(n),new uC(o)},$Y.hydrateRoot=function(n,o,s){if(!E(n))throw Error("Target container is not a DOM element.");NN(n),o===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var d=!1,p="",g=kA,x=AA,C=MA,T=null;return s!==null&&s!==void 0&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.formState!==void 0&&(T=s.formState)),o=xN(n,1,!0,o,s!=null?s:null,d,p,T,g,x,C,MN),o.context=$N(null),s=o.current,d=Ro(s),d=eu(d),p=wl(d),p.callback=null,El(s,p,d),pi(d,"hydrateRoot()",null),s=d,o.current.lanes=s,bl(o,s),wi(o),n[Ll]=o.current,KS(n),new q0(o)},$Y.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var _6=Bi(function(Bue,L6){var SY=j(P6());L6.exports=SY});function I6(e,t){if(typeof e==="function")return e(t);else if(e!==null&&e!==void 0)e.current=t}function B6(...e){return(t)=>{let r=!1,a=e.map((i)=>{let l=I6(i,t);if(!r&&typeof l=="function")r=!0;return l});if(r)return()=>{for(let i=0;i<a.length;i++){let l=a[i];if(typeof l=="function")l();else I6(e[i],null)}}}}var CY;var z6=N(()=>{CY=j(ae(),1)});function EY(e){return typeof e==="object"&&e!==null&&"then"in e}function H6(e){return e!=null&&typeof e==="object"&&"$$typeof"in e&&e.$$typeof===wY&&"_payload"in e&&EY(e._payload)}function TY(e){let t=RY(e),r=Un.forwardRef((a,i)=>{let{children:l,...c}=a;if(H6(l)&&typeof uv==="function")l=uv(l._payload);let u=Un.Children.toArray(l),f=u.find(AY);if(f){let h=f.props.children,m=u.map((b)=>{if(b===f){if(Un.Children.count(h)>1)return Un.Children.only(null);return Un.isValidElement(h)?h.props.children:null}else return b});return cv.jsx(t,{...c,ref:i,children:Un.isValidElement(h)?Un.cloneElement(h,void 0,m):null})}return cv.jsx(t,{...c,ref:i,children:l})});return r.displayName=`${e}.Slot`,r}function RY(e){let t=Un.forwardRef((r,a)=>{let{children:i,...l}=r;if(H6(i)&&typeof uv==="function")i=uv(i._payload);if(Un.isValidElement(i)){let c=NY(i),u=MY(l,i.props);if(i.type!==Un.Fragment)u.ref=a?B6(a,c):c;return Un.cloneElement(i,u)}return Un.Children.count(i)>1?Un.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}function AY(e){return Un.isValidElement(e)&&typeof e.type==="function"&&"__radixId"in e.type&&e.type.__radixId===kY}function MY(e,t){let r={...t};for(let a in t){let i=e[a],l=t[a];if(/^on[A-Z]/.test(a)){if(i&&l)r[a]=(...u)=>{let f=l(...u);return i(...u),f};else if(i)r[a]=i}else if(a==="style")r[a]={...i,...l};else if(a==="className")r[a]=[i,l].filter(Boolean).join(" ")}return{...e,...r}}function NY(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}var Un,cv,wY,uv,U6,kY;var F6=N(()=>{z6();Un=j(ae(),1),cv=j(io(),1),wY=Symbol.for("react.lazy"),uv=Un[" use ".trim().toString()];U6=TY("Slot");kY=Symbol("radix.slottable")});function V6(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=V6(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function zo(){for(var e,t,r=0,a="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=V6(e))&&(a&&(a+=" "),a+=t);return a}var j6;var Ds=N(()=>{j6=zo});var K6=(e)=>typeof e==="boolean"?`${e}`:e===0?"0":e,q6,G6=(e,t)=>(r)=>{var a;if((t===null||t===void 0?void 0:t.variants)==null)return q6(e,r===null||r===void 0?void 0:r.class,r===null||r===void 0?void 0:r.className);let{variants:i,defaultVariants:l}=t,c=Object.keys(i).map((h)=>{let m=r===null||r===void 0?void 0:r[h],b=l===null||l===void 0?void 0:l[h];if(m===null)return null;let y=K6(m)||K6(b);return i[h][y]}),u=r&&Object.entries(r).reduce((h,m)=>{let[b,y]=m;if(y===void 0)return h;return h[b]=y,h},{}),f=t===null||t===void 0?void 0:(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,m)=>{let{class:b,className:y,...v}=m;return Object.entries(v).every((S)=>{let[w,E]=S;return Array.isArray(E)?E.includes({...l,...u}[w]):{...l,...u}[w]===E})?[...h,b,y]:h},[]);return q6(e,c,f,r===null||r===void 0?void 0:r.class,r===null||r===void 0?void 0:r.className)};var W6=N(()=>{Ds();q6=zo});var OY=(e,t)=>{let r=Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},DY=(e,t)=>({classGroupId:e,validator:t}),nO=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Y6,PY=(e)=>{let t=_Y(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:(c)=>{if(c.startsWith("[")&&c.endsWith("]"))return LY(c);let u=c.split("-"),f=u[0]===""&&u.length>1?1:0;return rO(u,f,t)},getConflictingClassGroupIds:(c,u)=>{if(u){let f=a[c],h=r[c];if(f){if(h)return OY(h,f);return f}return h||Y6}return r[c]||Y6}}},rO=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;let i=e[t],l=r.nextPart.get(i);if(l){let h=rO(e,t+1,l);if(h)return h}let c=r.validators;if(c===null)return;let u=t===0?e.join("-"):e.slice(t).join("-"),f=c.length;for(let h=0;h<f;h++){let m=c[h];if(m.validator(u))return m.classGroupId}return},LY=(e)=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?"arbitrary.."+a:void 0})(),_Y=(e)=>{let{theme:t,classGroups:r}=e;return IY(r,t)},IY=(e,t)=>{let r=nO();for(let a in e){let i=e[a];rE(i,r,a,t)}return r},rE=(e,t,r,a)=>{let i=e.length;for(let l=0;l<i;l++){let c=e[l];BY(c,t,r,a)}},BY=(e,t,r,a)=>{if(typeof e==="string"){zY(e,t,r);return}if(typeof e==="function"){HY(e,t,r,a);return}UY(e,t,r,a)},zY=(e,t,r)=>{let a=e===""?t:oO(t,e);a.classGroupId=r},HY=(e,t,r,a)=>{if(FY(e)){rE(e(a),t,r,a);return}if(t.validators===null)t.validators=[];t.validators.push(DY(r,e))},UY=(e,t,r,a)=>{let i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){let[u,f]=i[c];rE(f,oO(t,u),r,a)}},oO=(e,t)=>{let r=e,a=t.split("-"),i=a.length;for(let l=0;l<i;l++){let c=a[l],u=r.nextPart.get(c);if(!u)u=nO(),r.nextPart.set(c,u);r=u}return r},FY=(e)=>("isThemeGetter"in e)&&e.isThemeGetter===!0,VY=(e)=>{if(e<1)return{get:()=>{return},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null),i=(l,c)=>{if(r[l]=c,t++,t>e)t=0,a=r,r=Object.create(null)};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=a[l])!==void 0)return i(l,c),c},set(l,c){if(l in r)r[l]=c;else i(l,c)}}},jY,J6=(e,t,r,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:i}),KY=(e)=>{let{prefix:t,experimentalParseClassName:r}=e,a=(i)=>{let l=[],c=0,u=0,f=0,h,m=i.length;for(let w=0;w<m;w++){let E=i[w];if(c===0&&u===0){if(E===":"){l.push(i.slice(f,w)),f=w+1;continue}if(E==="/"){h=w;continue}}if(E==="[")c++;else if(E==="]")c--;else if(E==="(")u++;else if(E===")")u--}let b=l.length===0?i:i.slice(f),y=b,v=!1;if(b.endsWith("!"))y=b.slice(0,-1),v=!0;else if(b.startsWith("!"))y=b.slice(1),v=!0;let S=h&&h>f?h-f:void 0;return J6(l,v,y,S)};if(t){let i=t+":",l=a;a=(c)=>c.startsWith(i)?l(c.slice(i.length)):J6(jY,!1,c,void 0,!0)}if(r){let i=a;a=(l)=>r({className:l,parseClassName:i})}return a},qY=(e)=>{let t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),(r)=>{let a=[],i=[];for(let l=0;l<r.length;l++){let c=r[l],u=c[0]==="[",f=t.has(c);if(u||f){if(i.length>0)i.sort(),a.push(...i),i=[];a.push(c)}else i.push(c)}if(i.length>0)i.sort(),a.push(...i);return a}},GY=(e)=>({cache:VY(e.cacheSize),parseClassName:KY(e),sortModifiers:qY(e),postfixLookupClassGroupIds:WY(e),...PY(e)}),WY=(e)=>{let t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)t[r[a]]=!0;return t},YY,JY=(e,t)=>{let{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:c}=t,u=[],f=e.trim().split(YY),h="";for(let m=f.length-1;m>=0;m-=1){let b=f[m],{isExternal:y,modifiers:v,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:E}=r(b);if(y){h=b+(h.length>0?" "+h:h);continue}let R=!!E,D;if(R){let U=w.substring(0,E);D=a(U);let P=D&&c[D]?a(w):void 0;if(P&&P!==D)D=P,R=!1}else D=a(w);if(!D){if(!R){h=b+(h.length>0?" "+h:h);continue}if(D=a(w),!D){h=b+(h.length>0?" "+h:h);continue}R=!1}let H=v.length===0?"":v.length===1?v[0]:l(v).join(":"),z=S?H+"!":H,G=z+D;if(u.indexOf(G)>-1)continue;u.push(G);let ee=i(D,R);for(let U=0;U<ee.length;++U){let P=ee[U];u.push(z+P)}h=b+(h.length>0?" "+h:h)}return h},XY=(...e)=>{let t=0,r,a,i="";while(t<e.length)if(r=e[t++]){if(a=aO(r))i&&(i+=" "),i+=a}return i},aO=(e)=>{if(typeof e==="string")return e;let t,r="";for(let a=0;a<e.length;a++)if(e[a]){if(t=aO(e[a]))r&&(r+=" "),r+=t}return r},X6=(e,...t)=>{let r,a,i,l,c=(f)=>{let h=t.reduce((m,b)=>b(m),e());return r=GY(h),a=r.cache.get,i=r.cache.set,l=u,u(f)},u=(f)=>{let h=a(f);if(h)return h;let m=JY(f,r);return i(f,m),m};return l=c,(...f)=>l(XY(...f))},QY,Yn=(e)=>{let t=(r)=>r[e]||QY;return t.isThemeGetter=!0,t},iO,sO,ZY,eJ,tJ,nJ,rJ,oJ,lc=(e)=>ZY.test(e),gt=(e)=>!!e&&!Number.isNaN(Number(e)),Hi=(e)=>!!e&&Number.isInteger(Number(e)),tE=(e)=>e.endsWith("%")&&gt(e.slice(0,-1)),Ps=(e)=>eJ.test(e),lO=()=>!0,aJ=(e)=>tJ.test(e)&&!nJ.test(e),oE=()=>!1,iJ=(e)=>rJ.test(e),sJ=(e)=>oJ.test(e),lJ=(e)=>!Ne(e)&&!De(e),cJ=(e)=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),uJ=(e)=>cc(e,dO,oE),Ne=(e)=>iO.test(e),Fu=(e)=>cc(e,fO,aJ),Q6=(e)=>cc(e,yJ,gt),dJ=(e)=>cc(e,hO,lO),fJ=(e)=>cc(e,pO,oE),Z6=(e)=>cc(e,cO,oE),pJ=(e)=>cc(e,uO,sJ),dv=(e)=>cc(e,mO,iJ),De=(e)=>sO.test(e),Xm=(e)=>Vu(e,fO),hJ=(e)=>Vu(e,pO),eO=(e)=>Vu(e,cO),mJ=(e)=>Vu(e,dO),gJ=(e)=>Vu(e,uO),fv=(e)=>Vu(e,mO,!0),bJ=(e)=>Vu(e,hO,!0),cc=(e,t,r)=>{let a=iO.exec(e);if(a){if(a[1])return t(a[1]);return r(a[2])}return!1},Vu=(e,t,r=!1)=>{let a=sO.exec(e);if(a){if(a[1])return t(a[1]);return r}return!1},cO=(e)=>e==="position"||e==="percentage",uO=(e)=>e==="image"||e==="url",dO=(e)=>e==="length"||e==="size"||e==="bg-size",fO=(e)=>e==="length",yJ=(e)=>e==="number",pO=(e)=>e==="family-name",hO=(e)=>e==="number"||e==="weight",mO=(e)=>e==="shadow",tO=()=>{let e=Yn("color"),t=Yn("font"),r=Yn("text"),a=Yn("font-weight"),i=Yn("tracking"),l=Yn("leading"),c=Yn("breakpoint"),u=Yn("container"),f=Yn("spacing"),h=Yn("radius"),m=Yn("shadow"),b=Yn("inset-shadow"),y=Yn("text-shadow"),v=Yn("drop-shadow"),S=Yn("blur"),w=Yn("perspective"),E=Yn("aspect"),R=Yn("ease"),D=Yn("animate"),H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...z(),De,Ne],ee=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],P=()=>[De,Ne,f],re=()=>[lc,"full","auto",...P()],J=()=>[Hi,"none","subgrid",De,Ne],ye=()=>["auto",{span:["full",Hi,De,Ne]},Hi,De,Ne],ce=()=>[Hi,"auto",De,Ne],se=()=>["auto","min","max","fr",De,Ne],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...P()],Z=()=>[lc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],pe=()=>[lc,"screen","full","dvw","lvw","svw","min","max","fit",...P()],V=()=>[lc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],k=()=>[e,De,Ne],X=()=>[...z(),eO,Z6,{position:[De,Ne]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$e=()=>["auto","cover","contain",mJ,uJ,{size:[De,Ne]}],ke=()=>[tE,Xm,Fu],He=()=>["","none","full",h,De,Ne],Ee=()=>["",gt,Xm,Fu],Ze=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Oe=()=>[gt,tE,eO,Z6],Rt=()=>["","none",S,De,Ne],he=()=>["none",gt,De,Ne],ln=()=>["none",gt,De,Ne],Dn=()=>[gt,De,Ne],Rn=()=>[lc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ps],breakpoint:[Ps],color:[lO],container:[Ps],"drop-shadow":[Ps],ease:["in","out","in-out"],font:[lJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ps],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ps],shadow:[Ps],spacing:["px",gt],text:[Ps],"text-shadow":[Ps],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lc,Ne,De,E]}],container:["container"],"container-type":[{"@container":["","normal","size",De,Ne]}],"container-named":[cJ],columns:[{columns:[gt,Ne,De,u]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:G()}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{"inset-s":re(),start:re()}],end:[{"inset-e":re(),end:re()}],"inset-bs":[{"inset-bs":re()}],"inset-be":[{"inset-be":re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Hi,"auto",De,Ne]}],basis:[{basis:[lc,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,lc,"auto","initial","none",Ne]}],grow:[{grow:["",gt,De,Ne]}],shrink:[{shrink:["",gt,De,Ne]}],order:[{order:[Hi,"first","last","none",De,Ne]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:ye()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:ye()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...pe()]}],"min-inline-size":[{"min-inline":["auto",...pe()]}],"max-inline-size":[{"max-inline":["none",...pe()]}],"block-size":[{block:["auto",...V()]}],"min-block-size":[{"min-block":["auto",...V()]}],"max-block-size":[{"max-block":["none",...V()]}],w:[{w:[u,"screen",...Z()]}],"min-w":[{"min-w":[u,"screen","none",...Z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Xm,Fu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,bJ,dJ]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tE,Ne]}],"font-family":[{font:[hJ,fJ,t]}],"font-features":[{"font-features":[Ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,De,Ne]}],"line-clamp":[{"line-clamp":[gt,"none",De,Q6]}],leading:[{leading:[l,...P()]}],"list-image":[{"list-image":["none",De,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",De,Fu]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[gt,"auto",De,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Hi,De,Ne]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:$e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hi,De,Ne],radial:["",De,Ne],conic:[Hi,De,Ne]},gJ,pJ]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ke()}],"gradient-via-pos":[{via:ke()}],"gradient-to-pos":[{to:ke()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:He()}],"rounded-s":[{"rounded-s":He()}],"rounded-e":[{"rounded-e":He()}],"rounded-t":[{"rounded-t":He()}],"rounded-r":[{"rounded-r":He()}],"rounded-b":[{"rounded-b":He()}],"rounded-l":[{"rounded-l":He()}],"rounded-ss":[{"rounded-ss":He()}],"rounded-se":[{"rounded-se":He()}],"rounded-ee":[{"rounded-ee":He()}],"rounded-es":[{"rounded-es":He()}],"rounded-tl":[{"rounded-tl":He()}],"rounded-tr":[{"rounded-tr":He()}],"rounded-br":[{"rounded-br":He()}],"rounded-bl":[{"rounded-bl":He()}],"border-w":[{border:Ee()}],"border-w-x":[{"border-x":Ee()}],"border-w-y":[{"border-y":Ee()}],"border-w-s":[{"border-s":Ee()}],"border-w-e":[{"border-e":Ee()}],"border-w-bs":[{"border-bs":Ee()}],"border-w-be":[{"border-be":Ee()}],"border-w-t":[{"border-t":Ee()}],"border-w-r":[{"border-r":Ee()}],"border-w-b":[{"border-b":Ee()}],"border-w-l":[{"border-l":Ee()}],"divide-x":[{"divide-x":Ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ze(),"hidden","none"]}],"divide-style":[{divide:[...Ze(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,De,Ne]}],"outline-w":[{outline:["",gt,Xm,Fu]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,fv,dv]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",b,fv,dv]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[gt,Fu]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Ee()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",y,fv,dv]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[gt,De,Ne]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Oe()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":Oe()}],"mask-image-t-to-pos":[{"mask-t-to":Oe()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":Oe()}],"mask-image-r-to-pos":[{"mask-r-to":Oe()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":Oe()}],"mask-image-b-to-pos":[{"mask-b-to":Oe()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":Oe()}],"mask-image-l-to-pos":[{"mask-l-to":Oe()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":Oe()}],"mask-image-x-to-pos":[{"mask-x-to":Oe()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":Oe()}],"mask-image-y-to-pos":[{"mask-y-to":Oe()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[De,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":Oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Oe()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Oe()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:$e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Ne]}],filter:[{filter:["","none",De,Ne]}],blur:[{blur:Rt()}],brightness:[{brightness:[gt,De,Ne]}],contrast:[{contrast:[gt,De,Ne]}],"drop-shadow":[{"drop-shadow":["","none",v,fv,dv]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",gt,De,Ne]}],"hue-rotate":[{"hue-rotate":[gt,De,Ne]}],invert:[{invert:["",gt,De,Ne]}],saturate:[{saturate:[gt,De,Ne]}],sepia:[{sepia:["",gt,De,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Ne]}],"backdrop-blur":[{"backdrop-blur":Rt()}],"backdrop-brightness":[{"backdrop-brightness":[gt,De,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[gt,De,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,De,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,De,Ne]}],"backdrop-invert":[{"backdrop-invert":["",gt,De,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[gt,De,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[gt,De,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,De,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",De,Ne]}],ease:[{ease:["linear","initial",R,De,Ne]}],delay:[{delay:[gt,De,Ne]}],animate:[{animate:["none",D,De,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,De,Ne]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:ln()}],"scale-x":[{"scale-x":ln()}],"scale-y":[{"scale-y":ln()}],"scale-z":[{"scale-z":ln()}],"scale-3d":["scale-3d"],skew:[{skew:Dn()}],"skew-x":[{"skew-x":Dn()}],"skew-y":[{"skew-y":Dn()}],transform:[{transform:[De,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Rn()}],"translate-x":[{"translate-x":Rn()}],"translate-y":[{"translate-y":Rn()}],"translate-z":[{"translate-z":Rn()}],"translate-none":["translate-none"],zoom:[{zoom:[Hi,De,Ne]}],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Ne]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[gt,Xm,Fu,Q6]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vJ=(e,{cacheSize:t,prefix:r,experimentalParseClassName:a,extend:i={},override:l={}})=>(Zf(e,"cacheSize",t),Zf(e,"prefix",r),Zf(e,"experimentalParseClassName",a),pv(e.theme,l.theme),pv(e.classGroups,l.classGroups),pv(e.conflictingClassGroups,l.conflictingClassGroups),pv(e.conflictingClassGroupModifiers,l.conflictingClassGroupModifiers),Zf(e,"postfixLookupClassGroups",l.postfixLookupClassGroups),Zf(e,"orderSensitiveModifiers",l.orderSensitiveModifiers),hv(e.theme,i.theme),hv(e.classGroups,i.classGroups),hv(e.conflictingClassGroups,i.conflictingClassGroups),hv(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),nE(e,i,"postfixLookupClassGroups"),nE(e,i,"orderSensitiveModifiers"),e),Zf=(e,t,r)=>{if(r!==void 0)e[t]=r},pv=(e,t)=>{if(t)for(let r in t)Zf(e,r,t[r])},hv=(e,t)=>{if(t)for(let r in t)nE(e,t,r)},nE=(e,t,r)=>{let a=t[r];if(a!==void 0)e[r]=e[r]?e[r].concat(a):a},gO=(e,...t)=>typeof e==="function"?X6(tO,e,...t):X6(()=>vJ(tO(),e),...t);var bO=N(()=>{Y6=[],jY=[],YY=/\s+/,QY=[],iO=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sO=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tJ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/});var Ls,xJ,$J=(e)=>{if(typeof e==="boolean")return e?"":void 0;if(e===void 0||e===null)return;return String(e)},SJ=(e)=>{let t=JSON.stringify(e),r=Ls.useRef({signature:t,value:e});if(r.current.signature!==t)r.current={signature:t,value:e};return r.current.value},Ue=(e,t)=>{let r=G6(t?.baseClass,{variants:t?.variants,defaultVariants:t?.defaultVariants,compoundVariants:t?.compoundVariants}),a=t?.passVariantProps?new Set(t.passVariantProps):void 0,i=Ls.forwardRef((l,c)=>{let{children:u,...f}=l,h=f.className;delete f.className;let m={};for(let R in t?.variants)if(m[R]=f[R],R in f&&!a?.has(R))delete f[R];let b=SJ(m),y={};if(t?.variantsAsDataAttrs&&t.variants)for(let R of t.variantsAsDataAttrs){let D=R.toString(),H=l[D]??t.defaultVariants?.[R];y[`data-${D}`]=$J(H)}let v=f.style,S=Ls.useMemo(()=>t?.style?{...t.style,...v}:v,[v]),w=Ls.useMemo(()=>xJ(zo(r(b),h)),[b,h]),E=e;if(l.asChild&&typeof e==="string")E=U6,delete f.asChild;return Ls.createElement(E,{ref:c,className:w,...t.defaultProps,...y,...f,style:S},u)});return i.displayName=t?.displayName??"uic",i};var Mn=N(()=>{F6();W6();Ds();bO();Ls=j(ae(),1),xJ=gO({extend:{classGroups:{"font-size":[{text:["micro","caption","label","compact","small","callout","body","subtitle","title","headline","display","display-large","panel-heading","heading1","heading2","heading3","heading4","heading5"]}]},theme:{spacing:["nav-x","control-tall"],radius:["panel"],blur:["modal-backdrop"],shadow:["modal-surface"]}}})});function Ka(...e){return(...t)=>{for(let r of e)if(typeof r==="function")r(...t)}}var ep=()=>{};var yO,nt;var fr=N(()=>{yO=j(ae(),1),nt=typeof document<"u"?yO.default.useLayoutEffect:()=>{}});function EJ(e=!1){let t=rr.useContext(vO),r=rr.useRef(null);if(r.current===null&&!e){let a=rr.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(a){let i=aE.get(a);if(i==null)aE.set(a,{id:t.current,state:a.memoizedState});else if(a.memoizedState!==i.state)t.current=i.id,aE.delete(a)}r.current=++t.current}return r.current}function TJ(e){let t=rr.useContext(vO);if(t===mv&&!wJ)console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=EJ(!!e),a=`react-aria${t.prefix}`;return e||`${a}-${r}`}function RJ(e){let t=rr.default.useId(),[r]=rr.useState(jr()),a=r?"react-aria":`react-aria${mv.prefix}`;return e||`${a}-${t}`}function kJ(){return!1}function AJ(){return!0}function MJ(e){return()=>{}}function jr(){if(typeof rr.default.useSyncExternalStore==="function")return rr.default.useSyncExternalStore(MJ,kJ,AJ);return rr.useContext(CJ)}var rr,mv,vO,CJ,wJ,aE,xO;var uc=N(()=>{rr=j(ae(),1),mv={prefix:String(Math.round(Math.random()*10000000000)),current:0},vO=rr.default.createContext(mv),CJ=rr.default.createContext(!1),wJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),aE=new WeakMap;xO=typeof rr.default.useId==="function"?RJ:TJ});function $O(e){let[t,r]=dc.useState(e),a=dc.useRef(t),i=dc.useRef(null),l=dc.useRef(()=>{if(!i.current)return;let u=i.current.next();if(u.done){i.current=null;return}if(a.current===u.value)l.current();else r(u.value)});nt(()=>{if(a.current=t,i.current)l.current()});let c=dc.useCallback((u)=>{i.current=u(a.current),l.current()},[l]);return[t,c]}var dc;var SO=N(()=>{fr();dc=j(ae(),1)});function Nn(e){let[t,r]=_s.useState(e),a=_s.useRef(null),i=xO(t),l=_s.useRef(null);if(Qm)Qm.register(l,i);if(NJ){let c=tp.get(i);if(c&&!c.includes(a))c.push(a);else tp.set(i,[a])}return nt(()=>{let c=i;return()=>{if(Qm)Qm.unregister(l);tp.delete(c)}},[i]),_s.useEffect(()=>{let c=a.current;if(c)r(c);return()=>{if(c)a.current=null}}),i}function CO(e,t){if(e===t)return e;let r=tp.get(e);if(r)return r.forEach((i)=>i.current=t),t;let a=tp.get(t);if(a)return a.forEach((i)=>i.current=e),e;return t}function da(e=[]){let t=Nn(),[r,a]=$O(t),i=_s.useCallback(()=>{a(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,a]);return nt(i,[t,i,...e]),r}var _s,NJ,tp,Qm;var Ho=N(()=>{fr();uc();SO();_s=j(ae(),1),NJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),tp=new Map;if(typeof FinalizationRegistry<"u")Qm=new FinalizationRegistry((e)=>{tp.delete(e)})});function Ui(...e){if(e.length===1&&e[0])return e[0];return(t)=>{let r=!1,a=e.map((i)=>{let l=wO(i,t);return r||=typeof l=="function",l});if(r)return()=>{a.forEach((i,l)=>{if(typeof i==="function")i();else wO(e[l],null)})}}}function wO(e,t){if(typeof e==="function")return e(t);else if(e!=null)e.current=t}var iE=()=>{};function Le(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let a=e[r];for(let i in a){let l=t[i],c=a[i];if(typeof l==="function"&&typeof c==="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90)t[i]=Ka(l,c);else if((i==="className"||i==="UNSAFE_className")&&typeof l==="string"&&typeof c==="string")t[i]=j6(l,c);else if(i==="id"&&l&&c)t.id=CO(l,c);else if(i==="ref"&&l&&c)t.ref=Ui(l,c);else t[i]=c!==void 0?c:l}}return t}var pr=N(()=>{ep();Ho();iE();Ds()});var fa=N(()=>{pr()});var gv=N(()=>{iE()});var EO=N(()=>{fr()});function lo(e){let t=ju.useRef(null),r=ju.useRef(void 0),a=ju.useCallback((i)=>{if(typeof e==="function"){let l=e,c=l(i);return()=>{if(typeof c==="function")c();else l(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return ju.useMemo(()=>({get current(){return t.current},set current(i){if(t.current=i,r.current)r.current(),r.current=void 0;if(i!=null)r.current=a(i)}}),[a])}var ju;var TO=N(()=>{ju=j(ae(),1)});var np=N(()=>{TO()});function Kr({values:e,children:t}){for(let[r,a]of e)t=or.default.createElement(r.Provider,{value:a},t);return t}function Yt(e){let{className:t,style:r,children:a,defaultClassName:i,defaultChildren:l,defaultStyle:c,values:u,render:f}=e;return or.useMemo(()=>{let h,m,b;if(typeof t==="function")h=t({...u,defaultClassName:i});else h=t;if(typeof r==="function")m=r({...u,defaultStyle:c||{}});else m=r;if(typeof a==="function")b=a({...u,defaultChildren:l});else if(a==null)b=l;else b=a;return{className:h??i,style:m||c?{...c,...m}:void 0,children:b??l,"data-rac":"",render:f?(y)=>f(y,u):void 0}},[t,r,a,i,l,c,u,f])}function Ku(e,t){let r=or.useContext(e);if(t===null)return null;if(r&&typeof r==="object"&&"slots"in r&&r.slots){let a=t||Fi;if(!r.slots[a]){let i=new Intl.ListFormat().format(Object.keys(r.slots).map((c)=>`"${c}"`)),l=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${l} Valid slot names are ${i}.`)}return r.slots[a]}return r}function on(e,t,r){let a=Ku(r,e.slot)||{},{ref:i,...l}=a,c=lo(or.useMemo(()=>Ui(t,i),[t,i])),u=Le(l,e);if("style"in l&&l.style&&"style"in e&&e.style)if(typeof l.style==="function"||typeof e.style==="function")u.style=(f)=>{let h=typeof l.style==="function"?l.style(f):l.style,m={...f.defaultStyle,...h},b=typeof e.style==="function"?e.style({...f,defaultStyle:m}):e.style;return{...m,...b}};else u.style={...l.style,...e.style};return[u,c]}function bv(e=!0){let[t,r]=or.useState(e),a=or.useRef(!1),i=or.useCallback((l)=>{a.current=!0,r(!!l)},[]);return nt(()=>{if(!a.current)r(!1)},[]),[i,t]}function kO(e){let t=/^(data-.*)$/,r={};for(let a in e)if(!t.test(a))r[a]=e[a];return r}function OJ(e,t,r){let{render:a,...i}=t,l=or.useRef(null),c=or.useMemo(()=>Ui(r,l),[r,l]);nt(()=>{if(a){if(!l.current)console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?");else if(l.current.localName!==e)console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${e}>, got <${l.current.localName}>. This may break the component behavior and accessibility.`)}},[e,a]);let u={...i,ref:c};if(a)return a(u,void 0);return or.default.createElement(e,u)}var or,Fi,RO,Ot;var qr=N(()=>{fa();gv();EO();np();or=j(ae(),1),Fi=Symbol("default");RO={},Ot=new Proxy({},{get(e,t){if(typeof t!=="string")return;let r=RO[t];if(!r)r=or.forwardRef(OJ.bind(null,t)),RO[t]=r;return r}})});var AO="react-aria-clear-focus",MO="react-aria-focus";var NO=()=>{};function DJ(e){return e!==null&&typeof e==="object"&&"nodeType"in e&&typeof e.nodeType==="number"}function OO(e){return DJ(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var rt=(e)=>e?.ownerDocument??document,hn=(e)=>{if(e&&"window"in e&&e.window===e)return e;return rt(e).defaultView||window};var hr=()=>{};function Uo(){return PJ}var PJ=!1;var DO=()=>{};var yv=N(()=>{DO()});function bt(e,t){if(!Uo())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;while(r!==null){if(r===e)return!0;if(r.tagName==="SLOT"&&r.assignedSlot)r=r.assignedSlot.parentNode;else if(OO(r))r=r.host;else r=r.parentNode}return!1}function Te(e){if(Uo()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;else if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function Zm(e){if(!e)return!1;let t=e.getRootNode(),r=hn(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let a=t.activeElement;return a!=null&&e.contains(a)}var wt=(e=document)=>{if(!Uo())return e.activeElement;let t=e.activeElement;while(t&&"shadowRoot"in t&&t.shadowRoot?.activeElement)t=t.shadowRoot.activeElement;return t};var dn=N(()=>{hr();yv()});function vv(e){let t=_J(rt(e));if(t!==e){if(t)LJ(t,e);if(e)sE(e,t)}}function LJ(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function sE(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function _J(e){let t=wt(e),r=t?.getAttribute("aria-activedescendant");if(r)return e.getElementById(r)||t;return t}var lE=N(()=>{dn();hr()});function Gr(e){if(IJ())e.focus({preventScroll:!0});else{let t=BJ(e);e.focus(),zJ(t)}}function IJ(){if(xv==null){xv=!1;try{document.createElement("div").focus({get preventScroll(){return xv=!0,!0}})}catch{}}return xv}function BJ(e){let t=e.parentNode,r=[],a=document.scrollingElement||document.documentElement;while(t instanceof HTMLElement&&t!==a){if(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft});t=t.parentNode}if(a instanceof HTMLElement)r.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft});return r}function zJ(e){for(let{element:t,scrollTop:r,scrollLeft:a}of e)t.scrollTop=r,t.scrollLeft=a}var xv=null;var qu=()=>{};function UJ(e){let t=hn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:a}=e.style,i=r!=="none"&&a!=="hidden"&&a!=="collapse";if(i){let{getComputedStyle:l}=e.ownerDocument.defaultView,{display:c,visibility:u}=l(e);i=c!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function FJ(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function $v(e,t){if(HJ)return e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]");return e.nodeName!=="#comment"&&UJ(e)&&FJ(e,t)&&(!e.parentElement||$v(e.parentElement,e))}var HJ;var PO=N(()=>{hr();HJ=typeof Element<"u"&&"checkVisibility"in Element.prototype});function Sv(e,t){return e.matches(VJ)&&!LO(e)&&(t?.skipVisibilityCheck||$v(e))}function Cv(e){return e.matches(jJ)&&$v(e)&&!LO(e)}function LO(e){let t=e;while(t!=null){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var cE,VJ,jJ;var wv=N(()=>{PO();cE=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],VJ=cE.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";cE.push('[tabindex]:not([tabindex="-1"]):not([disabled])');jJ=cE.join(':not([hidden]):not([tabindex="-1"]),')});function tg(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Tv(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Rv(e){let t=Ev.useRef({isFocused:!1,observer:null});return nt(()=>{let r=t.current;return()=>{if(r.observer)r.observer.disconnect(),r.observer=null}},[]),Ev.useCallback((r)=>{let a=Te(r);if(a instanceof HTMLButtonElement||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement){t.current.isFocused=!0;let i=a,l=(c)=>{if(t.current.isFocused=!1,i.disabled){let u=tg(c);e?.(u)}if(t.current.observer)t.current.observer.disconnect(),t.current.observer=null};i.addEventListener("focusout",l,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){t.current.observer?.disconnect();let c=i===wt()?null:wt();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:c})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:c}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[e])}function _O(e){while(e&&!Sv(e,{skipVisibilityCheck:!0}))e=e.parentElement;let t=hn(e),r=t.document.activeElement;if(!r||r===e)return;eg=!0;let a=!1,i=(m)=>{if(Te(m)===r||a)m.stopImmediatePropagation()},l=(m)=>{if(Te(m)===r||a){if(m.stopImmediatePropagation(),!e&&!a)a=!0,Gr(r),f()}},c=(m)=>{if(Te(m)===e||a)m.stopImmediatePropagation()},u=(m)=>{if(Te(m)===e||a){if(m.stopImmediatePropagation(),!a)a=!0,Gr(r),f()}};t.addEventListener("blur",i,!0),t.addEventListener("focusout",l,!0),t.addEventListener("focusin",u,!0),t.addEventListener("focus",c,!0);let f=()=>{cancelAnimationFrame(h),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",l,!0),t.removeEventListener("focusin",u,!0),t.removeEventListener("focus",c,!0),eg=!1,a=!1},h=requestAnimationFrame(f);return f}var Ev,eg=!1;var ng=N(()=>{qu();dn();hr();wv();fr();Ev=j(ae(),1)});function kv(e){if(typeof window>"u"||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some((r)=>e.test(r.brand))||e.test(window.navigator.userAgent)}function uE(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Is(e){let t=null;return()=>{if(t==null)t=e();return t}}var qa,KJ,dE,Ga,IO,BO,fE,rg,zO;var pa=N(()=>{qa=Is(function(){return uE(/^Mac/i)}),KJ=Is(function(){return uE(/^iPhone/i)}),dE=Is(function(){return uE(/^iPad/i)||qa()&&navigator.maxTouchPoints>1}),Ga=Is(function(){return KJ()||dE()}),IO=Is(function(){return qa()||Ga()}),BO=Is(function(){return kv(/AppleWebKit/i)&&!fE()}),fE=Is(function(){return kv(/Chrome/i)}),rg=Is(function(){return kv(/Android/i)}),zO=Is(function(){return kv(/Firefox/i)})});function Av(e){if(e.pointerType===""&&e.isTrusted)return!0;if(rg()&&e.pointerType)return e.type==="click"&&e.buttons===1;return e.detail===0&&!e.pointerType}function HO(e){return!rg()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var pE=N(()=>{pa()});function Gu(){return rp.useContext(qJ)}function GJ(e,t){let r=e.getAttribute("target");return(!r||r==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ha(e,t,r=!0){let{metaKey:a,ctrlKey:i,altKey:l,shiftKey:c}=t;if(zO()&&window.event?.type?.startsWith("key")&&e.target==="_blank")if(qa())a=!0;else i=!0;let u=BO()&&qa()&&!dE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:l,shiftKey:c}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:l,shiftKey:c,detail:1,bubbles:!0,cancelable:!0});ha.isOpening=r,Gr(e),e.dispatchEvent(u),ha.isOpening=!1}function WJ(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let r=document.createElement("a");if(r.href=e.getAttribute("data-href"),e.hasAttribute("data-target"))r.target=e.getAttribute("data-target");if(e.hasAttribute("data-rel"))r.rel=e.getAttribute("data-rel");if(e.hasAttribute("data-download"))r.download=e.getAttribute("data-download");if(e.hasAttribute("data-ping"))r.ping=e.getAttribute("data-ping");if(e.hasAttribute("data-referrer-policy"))r.referrerPolicy=e.getAttribute("data-referrer-policy");e.appendChild(r),t(r),e.removeChild(r)}}function YJ(e,t){WJ(e,(r)=>ha(r,t))}function op(e){let r=Gu().useHref(e?.href??""),a={};if(e){for(let i of["href","target","rel","download","ping","referrerPolicy"])if(i in e)a[i]=i==="href"?r:e[i]}return a}function UO(e,t,r,a){if(!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&GJ(e.currentTarget,e)&&r)e.preventDefault(),t.open(e.currentTarget,e,r,a)}var rp,qJ;var fc=N(()=>{qu();pa();rp=j(ae(),1),qJ=rp.createContext({isNative:!0,open:YJ,useHref:(e)=>e});ha.isOpening=!1});function Nv(e,t){for(let r of hE)r(e,t)}function XJ(e){return!(e.metaKey||!qa()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Mv(e){if(Wu=!0,!ha.isOpening&&XJ(e))Yu="keyboard",ag="keyboard",Nv("keyboard",e)}function ap(e){if(Yu="pointer",ag="pointerType"in e?e.pointerType:"mouse",e.type==="mousedown"||e.type==="pointerdown")Wu=!0,Nv("pointer",e)}function FO(e){if(!ha.isOpening&&Av(e))Wu=!0,Yu="virtual",ag="virtual"}function VO(e){let t=hn(Te(e)),r=rt(Te(e));if(Te(e)===t||Te(e)===r||eg||!e.isTrusted)return;if(!Wu&&!mE)Yu="virtual",ag="virtual",Nv("virtual",e);Wu=!1,mE=!1}function jO(){if(eg)return;Wu=!1,mE=!0}function gE(e){if(typeof window>"u"||typeof document>"u")return;let t=hn(e),r=rt(e);if(og.get(t))return;let a=t.HTMLElement.prototype.focus;if(t.HTMLElement.prototype.focus=function(){Wu=!0,a.apply(this,arguments)},r.addEventListener("keydown",Mv,!0),r.addEventListener("keyup",Mv,!0),r.addEventListener("click",FO,!0),t.addEventListener("focus",VO,!0),t.addEventListener("blur",jO,!1),typeof PointerEvent<"u")r.addEventListener("pointerdown",ap,!0),r.addEventListener("pointermove",ap,!0),r.addEventListener("pointerup",ap,!0);t.addEventListener("beforeunload",()=>{KO(e)},{once:!0}),og.set(t,{focus:a})}function QJ(e){let t=rt(e),r;if(t.readyState!=="loading")gE(e);else r=()=>{gE(e)},t.addEventListener("DOMContentLoaded",r);return()=>KO(e,r)}function Vi(){return Yu!=="pointer"}function Ju(){return Yu}function ig(e){Yu=e,ag=e==="pointer"?"mouse":e,Nv(e,null)}function eX(e,t,r){let a=r?Te(r):void 0,i=rt(a),l=hn(a),c=typeof l<"u"?l.HTMLInputElement:HTMLInputElement,u=typeof l<"u"?l.HTMLTextAreaElement:HTMLTextAreaElement,f=typeof l<"u"?l.HTMLElement:HTMLElement,h=typeof l<"u"?l.KeyboardEvent:KeyboardEvent,m=wt(i);return e=e||m instanceof c&&!ZJ.has(m.type)||m instanceof u||m instanceof f&&m.isContentEditable,!(e&&t==="keyboard"&&r instanceof h&&!JJ[r.key])}function qO(e,t,r){gE(),bE.useEffect(()=>{if(r?.enabled===!1)return;let a=(i,l)=>{if(!eX(!!r?.isTextInput,i,l))return;e(Vi())};return hE.add(a),()=>{hE.delete(a)}},t)}var bE,Yu=null,ag="keyboard",hE,og,Wu=!1,mE=!1,JJ,KO=(e,t)=>{let r=hn(e),a=rt(e);if(t)a.removeEventListener("DOMContentLoaded",t);if(!og.has(r))return;if(r.HTMLElement.prototype.focus=og.get(r).focus,a.removeEventListener("keydown",Mv,!0),a.removeEventListener("keyup",Mv,!0),a.removeEventListener("click",FO,!0),r.removeEventListener("focus",VO,!0),r.removeEventListener("blur",jO,!1),typeof PointerEvent<"u")a.removeEventListener("pointerdown",ap,!0),a.removeEventListener("pointermove",ap,!0),a.removeEventListener("pointerup",ap,!0);og.delete(r)},ZJ;var pc=N(()=>{dn();hr();ng();pa();pE();fc();bE=j(ae(),1),hE=new Set,og=new Map,JJ={Tab:!0,Escape:!0};if(typeof document<"u")QJ();ZJ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function hc(e){if(qa())return e.metaKey;return e.ctrlKey}function Xu(e){return e instanceof HTMLInputElement&&!tX.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var tX;var sg=N(()=>{pa();tX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function mr(e){let t=ip.useRef(null);return nX(()=>{t.current=e},[e]),ip.useCallback((...r)=>{let a=t.current;return a?.(...r)},[])}var ip,nX;var Qu=N(()=>{fr();ip=j(ae(),1),nX=ip.default.useInsertionEffect??nt});function Zu(e,t,r,a){let i=mr(r),l=r==null;GO.useEffect(()=>{if(l||!e.current)return;let c=e.current;return c.addEventListener(t,i,a),()=>{c.removeEventListener(t,i,a)}},[e,t,a,l])}var GO;var yE=N(()=>{Qu();GO=j(ae(),1)});function mc(e,t){let{id:r,"aria-label":a,"aria-labelledby":i}=e;if(r=Nn(r),i&&a)i=[...new Set([r,...i.trim().split(/\s+/)])].join(" ");else if(i)i=i.trim().split(/\s+/).join(" ");if(!a&&!i&&t)a=t;return{id:r,"aria-label":a,"aria-labelledby":i}}var lg=N(()=>{Ho()});function WO(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),a=typeof r.getTextInfo==="function"?r.getTextInfo():r.textInfo;if(a)return a.direction==="rtl";if(r.script)return rX.has(r.script)}let t=e.split("-")[0];return oX.has(t)}var rX,oX;var YO=N(()=>{rX=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),oX=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"])});function QO(){let e=typeof window<"u"&&window[XO]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:WO(e)?"rtl":"ltr"}}function JO(){vE=QO();for(let e of cg)e(vE)}function ZO(){let e=jr(),[t,r]=Ov.useState(vE);if(Ov.useEffect(()=>{if(cg.size===0)window.addEventListener("languagechange",JO);return cg.add(r),()=>{if(cg.delete(r),cg.size===0)window.removeEventListener("languagechange",JO)}},[]),e)return{locale:typeof window<"u"&&window[XO]||"en-US",direction:"ltr"};return t}var Ov,XO,vE,cg;var eD=N(()=>{YO();uc();Ov=j(ae(),1),XO=Symbol.for("react-aria.i18n.locale");vE=QO(),cg=new Set});function sp(){let e=ZO();return Dv.useContext(aX)||e}var Dv,aX;var Pv=N(()=>{eD();Dv=j(ae(),1),aX=Dv.default.createContext(null)});class lp{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=t}getStringForLocale(e,t){let a=this.getStringsForLocale(t)[e];if(!a)throw Error(`Could not find intl message ${e} in ${t} locale`);return a}getStringsForLocale(e){let t=this.strings[e];if(!t)t=lX(e,this.strings,this.defaultLocale),this.strings[e]=t;return t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[iX];if(Lv===void 0){let a=window[sX];if(!a)return null;Lv={};for(let i in a)Lv[i]=new lp({[t]:a[i]},t)}let r=Lv?.[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function lX(e,t,r="en-US"){if(t[e])return t[e];let a=cX(e);if(t[a])return t[a];for(let i in t)if(i.startsWith(a+"-"))return t[i];return t[r]}function cX(e){if(Intl.Locale)return new Intl.Locale(e).language;return e.split("-")[0]}var iX,sX,Lv=void 0;var tD=N(()=>{iX=Symbol.for("react-aria.i18n.locale"),sX=Symbol.for("react-aria.i18n.strings")});class _v{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return typeof r==="function"?r(t,this):r}plural(e,t,r="cardinal"){let a=t["="+e];if(a)return typeof a==="function"?a():a;let i=this.locale+":"+r,l=nD.get(i);if(!l)l=new Intl.PluralRules(this.locale,{type:r}),nD.set(i,l);let c=l.select(e);return a=t[c]||t.other,typeof a==="function"?a():a}number(e){let t=rD.get(this.locale);if(!t)t=new Intl.NumberFormat(this.locale),rD.set(this.locale,t);return t.format(e)}select(e,t){let r=e[t]||e.other;return typeof r==="function"?r():r}}var nD,rD;var oD=N(()=>{nD=new Map,rD=new Map});var aD=N(()=>{tD();oD()});function uX(e){let t=iD.get(e);if(!t)t=new lp(e),iD.set(e,t);return t}function dX(e,t){return t&&lp.getGlobalDictionaryForPackage(t)||uX(e)}function lD(e,t){let{locale:r}=sp(),a=dX(e,t);return sD.useMemo(()=>new _v(r,a),[r,a])}var sD,iD;var cD=N(()=>{Pv();aD();sD=j(ae(),1),iD=new WeakMap});function ed(e,t,r){let[a,i]=co.useState(e||t),l=co.useRef(a),c=co.useRef(e!==void 0),u=e!==void 0;co.useEffect(()=>{let b=c.current;if(b!==u)console.warn(`WARN: A component changed from ${b?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}.`);c.current=u},[u]);let f=u?e:a;fX(()=>{l.current=f});let[,h]=co.useReducer(()=>({}),{}),m=co.useCallback((b,...y)=>{let v=typeof b==="function"?b(l.current):b;if(!Object.is(l.current,v))l.current=v,i(v),h(),r?.(v,...y)},[r]);return[f,m]}var co,fX;var Iv=N(()=>{co=j(ae(),1),fX=typeof document<"u"?co.default.useInsertionEffect??co.default.useLayoutEffect:()=>{}});var Bv,uD;var dD=N(()=>{Bv=j(ae(),1),uD=Bv.createContext(null)});function Wa(e){let t=(r,a)=>{if(td.useContext(pX))return null;return e(r,a)};return t.displayName=e.displayName||e.name,td.forwardRef(t)}var td,pX;var fD=N(()=>{td=j(ae(),1);if(typeof HTMLTemplateElement<"u")Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}});pX=td.createContext(!1)});var cp=N(()=>{fD()});var zv,Hv,gc;var xE=N(()=>{qr();cp();zv=j(ae(),1),Hv=zv.createContext({}),gc=Wa(function(t,r){[t,r]=on(t,r,Hv);let{elementType:a="label",...i}=t,l=Ot[a];return zv.default.createElement(l,{className:"react-aria-Label",...i,ref:r})})});function ht(e,t={}){let{labelable:r,isLink:a,global:i,events:l=i,propNames:c}=t,u={};for(let f in e)if(Object.prototype.hasOwnProperty.call(e,f)&&(hX.has(f)||r&&mX.has(f)||a&&gX.has(f)||i&&bX.has(f)||l&&(pD.has(f)||f.endsWith("Capture")&&pD.has(f.slice(0,-7)))||c?.has(f)||yX.test(f)))u[f]=e[f];return u}var hX,mX,gX,bX,pD,yX;var Bs=N(()=>{hX=new Set(["id"]),mX=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),gX=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),bX=new Set(["dir","lang","hidden","inert","translate"]),pD=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),yX=/^(data-.*)$/});function hD(e){let{id:t,label:r,"aria-labelledby":a,"aria-label":i,labelElementType:l="label"}=e;t=Nn(t);let c=Nn(),u={};if(r)a=a?`${c} ${a}`:c,u={id:c,htmlFor:l==="label"?t:void 0};else if(!a&&!i)console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let f=mc({id:t,"aria-label":i,"aria-labelledby":a});return{labelProps:u,fieldProps:f}}var mD=N(()=>{Ho();lg()});var Ya=N(()=>{Bs()});var Uv,gD;var bD=N(()=>{Uv=j(ae(),1),gD=Uv.createContext(null)});function Fv(e,t="assertive",r=7000){if(!up)if(up=new yD,!(typeof IS_REACT_ACT_ENVIRONMENT==="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"))setTimeout(()=>{if(up?.isAttached())up?.announce(e,t,r)},100);else up.announce(e,t,r);else up.announce(e,t,r)}class yD{constructor(){if(this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u")this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){if(!this.node)return;document.body.removeChild(this.node),this.node=null}announce(e,t="assertive",r=7000){if(!this.node)return;let a=document.createElement("div");if(typeof e==="object")a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"]);else a.textContent=e;if(t==="assertive")this.assertiveLog?.appendChild(a);else this.politeLog?.appendChild(a);if(e!=="")setTimeout(()=>{a.remove()},r)}clear(e){if(!this.node)return;if((!e||e==="assertive")&&this.assertiveLog)this.assertiveLog.innerHTML="";if((!e||e==="polite")&&this.politeLog)this.politeLog.innerHTML=""}}var up=null;var vD=()=>{};var xD=N(()=>{vD()});function $D(){if(typeof window>"u")return;function e(a){return"propertyName"in a}let t=(a)=>{let i=Te(a);if(!e(a)||!i)return;let l=bc.get(i);if(!l)l=new Set,bc.set(i,l),i.addEventListener("transitioncancel",r,{once:!0});l.add(a.propertyName)},r=(a)=>{let i=Te(a);if(!e(a)||!i)return;let l=bc.get(i);if(!l)return;if(l.delete(a.propertyName),l.size===0)i.removeEventListener("transitioncancel",r),bc.delete(i);if(bc.size===0){for(let c of $E)c();$E.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",r)}function vX(){for(let[e]of bc)if("isConnected"in e&&!e.isConnected)bc.delete(e)}function Vv(e){requestAnimationFrame(()=>{if(vX(),bc.size===0)e();else $E.add(e)})}var bc,$E;var SE=N(()=>{dn();bc=new Map,$E=new Set;if(typeof document<"u")if(document.readyState!=="loading")$D();else document.addEventListener("DOMContentLoaded",$D)});function ma(e){if(!e.isConnected)return;let t=rt(e);if(Ju()==="virtual"){let r=wt(t);Vv(()=>{let a=wt(t);if((a===r||a===t.body)&&e.isConnected)Gr(e)})}else Gr(e)}var dp=N(()=>{qu();dn();pc();hr();SE()});function nd(e){let{isDisabled:t,onFocus:r,onBlur:a,onFocusChange:i}=e,l=CE.useCallback((f)=>{if(Te(f)===f.currentTarget){if(a)a(f);if(i)i(!1);return!0}},[a,i]),c=Rv(l),u=CE.useCallback((f)=>{let h=Te(f),m=rt(h),b=m?wt(m):wt();if(h===f.currentTarget&&h===b){if(r)r(f);if(i)i(!0);c(f)}},[i,r,c]);return{focusProps:{onFocus:!t&&(r||i||a)?u:void 0,onBlur:!t&&(a||i)?l:void 0}}}var CE;var jv=N(()=>{dn();hr();ng();CE=j(ae(),1)});function wE(e){if(!e)return;let t=!0;return(r)=>{let a={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){if(t)console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");else t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};if(e(a),t)r.stopPropagation()}}var SD=()=>{};function rd(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:wE(e.onKeyDown),onKeyUp:wE(e.onKeyUp)}}}var Kv=N(()=>{SD()});function qv(e,t){nt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{if(e.ref)e.ref.current=null}})}var EE=N(()=>{fr()});function xX(e){let t=zs.useContext(Gv)||{};qv(t,e);let{ref:r,...a}=t;return a}function yc(e,t){let{focusProps:r}=nd(e),{keyboardProps:a}=rd(e),i=Le(r,a),l=xX(t),c=e.isDisabled?{}:l,u=zs.useRef(e.autoFocus);zs.useEffect(()=>{if(u.current&&t.current)ma(t.current);u.current=!1},[t]);let f=e.excludeFromTabOrder?-1:0;if(e.isDisabled)f=void 0;return{focusableProps:Le({...i,tabIndex:f},c)}}var zs,Gv;var fp=N(()=>{dp();pr();jv();Kv();EE();zs=j(ae(),1),Gv=zs.default.createContext(null)});function CD(e){if(Ga()){if(pp==="default"){let t=rt(e);TE=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}pp="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Wv.set(e,e.style[t]),e.style[t]="none"}}function RE(e){if(Ga()){if(pp!=="disabled")return;pp="restoring",setTimeout(()=>{Vv(()=>{if(pp==="restoring"){let t=rt(e);if(t.documentElement.style.webkitUserSelect==="none")t.documentElement.style.webkitUserSelect=TE||"";TE="",pp="default"}})},300)}else if(e instanceof HTMLElement||e instanceof SVGElement){if(e&&Wv.has(e)){let t=Wv.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";if(e.style[r]==="none")e.style[r]=t;if(e.getAttribute("style")==="")e.removeAttribute("style");Wv.delete(e)}}}var pp="default",TE="",Wv;var wD=N(()=>{hr();pa();SE();Wv=new WeakMap});function ED(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}function Yv(e){let t=e??(typeof document<"u"?document:void 0);if(!t)return ED(t);if(kE.has(t))return kE.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),a=r&&r instanceof hn(r).HTMLMetaElement&&(r.nonce||r.content)||ED(t)||void 0;if(a!==void 0)kE.set(t,a);return a}var kE;var AE=N(()=>{hr();kE=new WeakMap});var TD,ug;var ME=N(()=>{TD=j(ae(),1),ug=TD.default.createContext({register:()=>{}});ug.displayName="PressResponderContext"});function xc(){let e=vc.useRef(new Map),t=vc.useCallback((i,l,c,u)=>{let f=u?.once?(...h)=>{e.current.delete(c),c(...h)}:c;e.current.set(c,{type:l,eventTarget:i,fn:f,options:u}),i.addEventListener(l,f,u)},[]),r=vc.useCallback((i,l,c,u)=>{let f=e.current.get(c)?.fn||c;i.removeEventListener(l,f,u),e.current.delete(c)},[]),a=vc.useCallback(()=>{e.current.forEach((i,l)=>{r(i.eventTarget,i.type,l,i.options)})},[r]);return vc.useEffect(()=>a,[a]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:a}}var vc;var dg=N(()=>{vc=j(ae(),1)});function SX(e){let t=Fn.useContext(ug);if(t){let{register:r,ref:a,...i}=t;e=Le(i,e),r()}return qv(t,e.ref),e}class fg{#e;constructor(e,t,r,a){this.#e=!0;let l=(a?.target??r.currentTarget)?.getBoundingClientRect(),c,u=0,f,h=null;if(r.clientX!=null&&r.clientY!=null)f=r.clientX,h=r.clientY;if(l)if(f!=null&&h!=null)c=f-l.left,u=h-l.top;else c=l.width/2,u=l.height/2;this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=c,this.y=u,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}function $c(e){let{onPress:t,onPressChange:r,onPressStart:a,onPressEnd:i,onPressUp:l,onClick:c,isDisabled:u,isPressed:f,preventFocusOnPress:h,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:b,ref:y,...v}=SX(e),[S,w]=Fn.useState(!1),E=Fn.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:R,removeAllGlobalListeners:D}=xc(),H=Fn.useCallback((_,W)=>{let Y=E.current;if(u||Y.didFirePressStart)return!1;let Z=!0;if(Y.isTriggeringEvent=!0,a){let pe=new fg("pressstart",W,_);a(pe),Z=pe.shouldStopPropagation}if(r)r(!0);return Y.isTriggeringEvent=!1,Y.didFirePressStart=!0,w(!0),Z},[u,a,r]),z=Fn.useCallback((_,W,Y=!0)=>{let Z=E.current;if(!Z.didFirePressStart)return!1;Z.didFirePressStart=!1,Z.isTriggeringEvent=!0;let pe=!0;if(i){let V=new fg("pressend",W,_);i(V),pe=V.shouldStopPropagation}if(r)r(!1);if(w(!1),t&&Y&&!u){let V=new fg("press",W,_);t(V),pe&&=V.shouldStopPropagation}return Z.isTriggeringEvent=!1,pe},[u,i,r,t]),G=mr(z),ee=Fn.useCallback((_,W)=>{let Y=E.current;if(u)return!1;if(l){Y.isTriggeringEvent=!0;let Z=new fg("pressup",W,_);return l(Z),Y.isTriggeringEvent=!1,Z.shouldStopPropagation}return!0},[u,l]),U=mr(ee),P=Fn.useCallback((_)=>{let W=E.current;if(W.isPressed&&W.target){if(W.didFirePressStart&&W.pointerType!=null)z(od(W.target,_),W.pointerType,!1);if(W.isPressed=!1,W.isOverTarget=!1,W.activePointerId=null,W.pointerType=null,D(),!b)RE(W.target);for(let Y of W.disposables)Y();W.disposables=[]}},[b,D,z]),re=mr(P);Fn.useEffect(()=>{if(u&&E.current.isPressed)re({currentTarget:E.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[u]);let J=Fn.useCallback((_)=>{if(m)P(_)},[m,P]),ye=Fn.useCallback((_)=>{if(u)return;c?.(_)},[u,c]),ce=Fn.useCallback((_,W)=>{if(u)return;if(c){let Y=new MouseEvent("click",_);Tv(Y,W),c(tg(Y))}},[u,c]),se=Fn.useMemo(()=>{let _=E.current,W={onKeyDown(Z){if(NE(Z.nativeEvent,Z.currentTarget)&&bt(Z.currentTarget,Te(Z))){if(MD(Te(Z),Z.key))Z.preventDefault();let pe=!0;if(!_.isPressed&&!Z.repeat)_.target=Z.currentTarget,_.isPressed=!0,_.pointerType="keyboard",pe=H(Z,"keyboard");let V=Z.currentTarget,k=(X)=>{if(NE(X,V)&&!X.repeat&&bt(V,Te(X))&&_.target)U(od(_.target,X),"keyboard")};if(R(rt(Z.currentTarget),"keyup",Ka(k,Y),!0),pe)Z.stopPropagation();if(Z.metaKey&&qa())_.metaKeyEvents?.set(Z.key,Z.nativeEvent)}else if(Z.key==="Meta")_.metaKeyEvents=new Map},onClick(Z){if(Z&&!bt(Z.currentTarget,Te(Z)))return;if(Z&&Z.button===0&&!_.isTriggeringEvent&&!ha.isOpening){let pe=!0;if(u)Z.preventDefault();if(!_.ignoreEmulatedMouseEvents&&!_.isPressed&&(_.pointerType==="virtual"||Av(Z.nativeEvent))){let V=H(Z,"virtual"),k=U(Z,"virtual"),X=G(Z,"virtual");ye(Z),pe=V&&k&&X}else if(_.isPressed&&_.pointerType!=="keyboard"){let V=_.pointerType||Z.nativeEvent.pointerType||"virtual",k=U(od(Z.currentTarget,Z),V),X=G(od(Z.currentTarget,Z),V,!0);pe=k&&X,_.isOverTarget=!1,ye(Z),re(Z)}if(_.ignoreEmulatedMouseEvents=!1,pe)Z.stopPropagation()}}},Y=(Z)=>{if(_.isPressed&&_.target&&NE(Z,_.target)){if(MD(Te(Z),Z.key))Z.preventDefault();let pe=Te(Z),V=bt(_.target,pe);if(G(od(_.target,Z),"keyboard",V),V)ce(Z,_.target);if(D(),Z.key!=="Enter"&&OE(_.target)&&bt(_.target,pe)&&!Z[RD])Z[RD]=!0,ha(_.target,Z,!1);_.isPressed=!1,_.metaKeyEvents?.delete(Z.key)}else if(Z.key==="Meta"&&_.metaKeyEvents?.size){let pe=_.metaKeyEvents;_.metaKeyEvents=void 0;for(let V of pe.values())_.target?.dispatchEvent(new KeyboardEvent("keyup",V))}};if(typeof PointerEvent<"u"){W.onPointerDown=(V)=>{if(V.button!==0||!bt(V.currentTarget,Te(V)))return;if(HO(V.nativeEvent)){_.pointerType="virtual";return}_.pointerType=V.pointerType;let k=!0;if(!_.isPressed){if(_.isPressed=!0,_.isOverTarget=!0,_.activePointerId=V.pointerId,_.target=V.currentTarget,!b)CD(_.target);k=H(V,_.pointerType);let X=Te(V);if("releasePointerCapture"in X)if("hasPointerCapture"in X){if(X.hasPointerCapture(V.pointerId))X.releasePointerCapture(V.pointerId)}else X.releasePointerCapture(V.pointerId);R(rt(V.currentTarget),"pointerup",Z,!1),R(rt(V.currentTarget),"pointercancel",pe,!1)}if(k)V.stopPropagation()},W.onMouseDown=(V)=>{if(!bt(V.currentTarget,Te(V)))return;if(V.button===0){if(h){let k=_O(V.target);if(k)_.disposables.push(k)}V.stopPropagation()}},W.onPointerUp=(V)=>{if(!bt(V.currentTarget,Te(V))||_.pointerType==="virtual")return;if(V.button===0&&!_.isPressed)U(V,_.pointerType||V.pointerType)},W.onPointerEnter=(V)=>{if(V.pointerId===_.activePointerId&&_.target&&!_.isOverTarget&&_.pointerType!=null)_.isOverTarget=!0,H(od(_.target,V),_.pointerType)},W.onPointerLeave=(V)=>{if(V.pointerId===_.activePointerId&&_.target&&_.isOverTarget&&_.pointerType!=null)_.isOverTarget=!1,G(od(_.target,V),_.pointerType,!1),J(V)};let Z=(V)=>{if(V.pointerId===_.activePointerId&&_.isPressed&&V.button===0&&_.target){if(bt(_.target,Te(V))&&_.pointerType!=null){let k=!1,X=setTimeout(()=>{if(_.isPressed&&_.target instanceof HTMLElement)if(k)re(V);else Gr(_.target),_.target.click()},80);R(V.currentTarget,"click",()=>k=!0,!0),_.disposables.push(()=>clearTimeout(X))}else re(V);_.isOverTarget=!1}},pe=(V)=>{re(V)};W.onDragStart=(V)=>{if(!bt(V.currentTarget,Te(V)))return;re(V)}}return W},[R,u,h,D,b,J,H,ye,ce]);return Fn.useEffect(()=>{if(!y)return;let _=rt(y.current);if(!_||!_.head||_.getElementById(kD))return;let W=_.createElement("style");W.id=kD;let Y=Yv(_);if(Y)W.nonce=Y;W.textContent=`
236
+ @layer {
237
+ [${AD}] {
238
+ touch-action: pan-x pan-y pinch-zoom;
239
+ }
240
+ }
241
+ `.trim(),_.head.prepend(W)},[y]),Fn.useEffect(()=>{let _=E.current;return()=>{if(!b)RE(_.target??void 0);for(let W of _.disposables)W();_.disposables=[]}},[b]),{isPressed:f||S,pressProps:Le(v,se,{[AD]:!0})}}function OE(e){return e.tagName==="A"&&e.hasAttribute("href")}function NE(e,t){let{key:r,code:a}=e,i=t,l=i.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||a==="Space")&&!(i instanceof hn(i).HTMLInputElement&&!ND(i,r)||i instanceof hn(i).HTMLTextAreaElement||i.isContentEditable)&&!((l==="link"||!l&&OE(i))&&r!=="Enter")}function od(e,t){let{clientX:r,clientY:a}=t;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:a,key:t.key}}function CX(e){if(e instanceof HTMLInputElement)return!1;if(e instanceof HTMLButtonElement)return e.type!=="submit"&&e.type!=="reset";if(OE(e))return!1;return!0}function MD(e,t){if(e instanceof HTMLInputElement)return!ND(e,t);return CX(e)}function ND(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":wX.has(e.type)}var $X,Fn,RD,kD="react-aria-pressable-style",AD="data-react-aria-pressable",wX;var pg=N(()=>{ep();ng();wD();qu();dn();AE();hr();pa();pE();pr();fc();ME();Qu();dg();EE();$X=j(Vr(),1),Fn=j(ae(),1);RD=Symbol("linkClicked");wX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function DE(e,t){let{elementType:r="button",isDisabled:a,onPress:i,onPressStart:l,onPressEnd:c,onPressUp:u,onPressChange:f,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:b,href:y,target:v,rel:S,type:w="button"}=e,E;if(r==="button")E={type:w,disabled:a,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value};else E={role:"button",href:r==="a"&&!a?y:void 0,target:r==="a"?v:void 0,type:r==="input"?w:void 0,disabled:r==="input"?a:void 0,"aria-disabled":!a||r==="input"?void 0:a,rel:r==="a"?S:void 0};let{pressProps:R,isPressed:D}=$c({onPressStart:l,onPressEnd:c,onPressChange:f,onPress:i,onPressUp:u,onClick:b,isDisabled:a,preventFocusOnPress:h,ref:t}),{focusableProps:H}=yc(e,t);if(m)H.tabIndex=a?-1:H.tabIndex;let z=Le(H,R,ht(e,{labelable:!0}));return{isPressed:D,buttonProps:Le(E,z,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}var OD=N(()=>{Bs();pr();fp();pg()});var DD=N(()=>{OD()});function hp(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:a,onFocusWithinChange:i}=e,l=hg.useRef({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:u}=xc(),f=hg.useCallback((b)=>{if(!bt(b.currentTarget,Te(b)))return;if(l.current.isFocusWithin&&!bt(b.currentTarget,b.relatedTarget)){if(l.current.isFocusWithin=!1,u(),r)r(b);if(i)i(!1)}},[r,i,l,u]),h=Rv(f),m=hg.useCallback((b)=>{if(!bt(b.currentTarget,Te(b)))return;let y=Te(b),v=rt(y),S=wt(v);if(!l.current.isFocusWithin&&S===y){if(a)a(b);if(i)i(!0);l.current.isFocusWithin=!0,h(b);let w=b.currentTarget;c(v,"focus",(E)=>{let R=Te(E);if(l.current.isFocusWithin&&!bt(w,R)){let D=new v.defaultView.FocusEvent("blur",{relatedTarget:R});Tv(D,w);let H=tg(D);f(H)}},{capture:!0})}},[a,i,h,c,f]);if(t)return{focusWithinProps:{onFocus:void 0,onBlur:void 0}};return{focusWithinProps:{onFocus:m,onBlur:f}}}var hg;var Jv=N(()=>{ng();dn();hr();dg();hg=j(ae(),1)});function Fo(e={}){let{autoFocus:t=!1,isTextInput:r,within:a}=e,i=Sc.useRef({isFocused:!1,isFocusVisible:t||Vi()}),[l,c]=Sc.useState(!1),[u,f]=Sc.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=Sc.useCallback(()=>f(i.current.isFocused&&i.current.isFocusVisible),[]),m=Sc.useCallback((v)=>{i.current.isFocused=v,i.current.isFocusVisible=Vi(),c(v),h()},[h]);qO((v)=>{i.current.isFocusVisible=v,h()},[r,l],{enabled:l,isTextInput:r});let{focusProps:b}=nd({isDisabled:a,onFocusChange:m}),{focusWithinProps:y}=hp({isDisabled:!a,onFocusWithinChange:m});return{isFocused:l,isFocusVisible:u,focusProps:a?y:b}}var Sc;var PD=N(()=>{pc();jv();Jv();Sc=j(ae(),1)});var mp=N(()=>{PD()});function EX(){PE=!0,setTimeout(()=>{PE=!1},500)}function LD(e){if(e.pointerType==="touch")EX()}function TX(){let e=rt(null);if(typeof e>"u")return;if(Xv===0){if(typeof PointerEvent<"u")e.addEventListener("pointerup",LD)}return Xv++,()=>{if(Xv--,Xv>0)return;if(typeof PointerEvent<"u")e.removeEventListener("pointerup",LD)}}function gr(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,isDisabled:i}=e,[l,c]=Hs.useState(!1),u=Hs.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Hs.useEffect(TX,[]);let{addGlobalListener:f,removeAllGlobalListeners:h}=xc(),{hoverProps:m,triggerHoverEnd:b}=Hs.useMemo(()=>{let y=(w,E)=>{if(u.pointerType=E,i||E==="touch"||u.isHovered||!bt(w.currentTarget,Te(w)))return;u.isHovered=!0;let R=w.currentTarget;if(u.target=R,f(rt(Te(w)),"pointerover",(D)=>{if(u.isHovered&&u.target&&!bt(u.target,Te(D)))v(D,D.pointerType)},{capture:!0}),t)t({type:"hoverstart",target:R,pointerType:E});if(r)r(!0);c(!0)},v=(w,E)=>{let R=u.target;if(u.pointerType="",u.target=null,E==="touch"||!u.isHovered||!R)return;if(u.isHovered=!1,h(),a)a({type:"hoverend",target:R,pointerType:E});if(r)r(!1);c(!1)},S={};if(typeof PointerEvent<"u")S.onPointerEnter=(w)=>{if(PE&&w.pointerType==="mouse")return;y(w,w.pointerType)},S.onPointerLeave=(w)=>{if(!i&&bt(w.currentTarget,Te(w)))v(w,w.pointerType)};return{hoverProps:S,triggerHoverEnd:v}},[t,r,a,i,u,f,h]);return Hs.useEffect(()=>{if(i)b({currentTarget:u.target},u.pointerType)},[i]),{hoverProps:m,isHovered:l}}var Hs,PE=!1,Xv=0;var Qv=N(()=>{dn();hr();dg();Hs=j(ae(),1)});var ad=N(()=>{Qv()});var LE=N(()=>{Ho()});function kX(e,t){if(t){for(let r in e)if(r.startsWith("on")&&!RX.test(r))e[r]=void 0;e.href=void 0,e.target=void 0}return e}var Us,id,Fs,RX;var Zv=N(()=>{qr();bD();xD();DD();cp();Ya();fa();mp();ad();LE();Us=j(ae(),1),id=Us.createContext({}),Fs=Wa(function(t,r){[t,r]=on(t,r,id);let a=t,{isPending:i}=a,{buttonProps:l,isPressed:c}=DE(t,r);l=kX(l,i);let{focusProps:u,isFocused:f,isFocusVisible:h}=Fo(t),{hoverProps:m,isHovered:b}=gr({...t,isDisabled:t.isDisabled||i}),y={isHovered:b,isPressed:(a.isPressed||c)&&!i,isFocused:f,isFocusVisible:h,isDisabled:t.isDisabled||!1,isPending:i??!1},v=Yt({...t,values:y,defaultClassName:"react-aria-Button"}),S=Nn(l.id),w=Nn(),E=l["aria-labelledby"];if(i){if(E)E=`${E} ${w}`;else if(l["aria-label"])E=`${S} ${w}`}let R=Us.useRef(i);Us.useEffect(()=>{let H={"aria-labelledby":E||S};if(!R.current&&f&&i)Fv(H,"assertive");else if(R.current&&f&&!i)Fv(H,"assertive");R.current=i},[i,f,E,S]);let D=ht(t,{global:!0});return delete D.onClick,Us.default.createElement(Ot.button,{...Le(D,v,l,u,m),type:l.type==="submit"&&i?"button":l.type,id:S,ref:r,"aria-labelledby":E,slot:t.slot||void 0,"aria-disabled":i?"true":l["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":y.isPressed||void 0,"data-hovered":b||void 0,"data-focused":f||void 0,"data-pending":i||void 0,"data-focus-visible":h||void 0},Us.default.createElement(gD.Provider,{value:{id:w}},v.children))}),RX=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/});var ex,_D;var ID=N(()=>{ex=j(ae(),1),_D=ex.createContext({})});var gp,Cc,ji;var bp=N(()=>{qr();gp=j(ae(),1),Cc=gp.createContext({}),ji=gp.forwardRef(function(t,r){[t,r]=on(t,r,Cc);let{elementType:a="span",...i}=t,l=Ot[a];return gp.default.createElement(l,{className:"react-aria-Text",...i,ref:r})})});function Ki(e,t){if(!e)return!1;let r=window.getComputedStyle(e),a=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);if(e===a&&r.overflow!=="hidden")i=!0;if(i&&t)i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth;return i}var mg=()=>{};function gg(e,t){let r=e;if(Ki(r,t))r=r.parentElement;while(r&&!Ki(r,t))r=r.parentElement;return r||document.scrollingElement||document.documentElement}var _E=N(()=>{mg()});function tx(e,t){let r=[],a=document.scrollingElement||document.documentElement;while(e){if(Ki(e,t))r.push(e);if(e===a)break;e=e.parentElement}return r}var BD=N(()=>{mg()});function bg(e,t,r={}){let{block:a="nearest",inline:i="nearest"}=r;if(e===t)return;let{scrollTop:l,scrollLeft:c}=e,u=t.getBoundingClientRect(),f=e.getBoundingClientRect(),h=window.getComputedStyle(t),m=window.getComputedStyle(e),b=document.scrollingElement||document.documentElement,y=e===b,v=e===b?0:f.top,S=e===b?e.clientHeight:f.bottom,w=e===b?0:f.left,E=e===b?e.clientWidth:f.right,R=parseFloat(h.scrollMarginTop)||0,D=parseFloat(h.scrollMarginBottom)||0,H=parseFloat(h.scrollMarginLeft)||0,z=parseFloat(h.scrollMarginRight)||0,G=parseFloat(m.scrollPaddingTop)||0,ee=parseFloat(m.scrollPaddingBottom)||0,U=parseFloat(m.scrollPaddingLeft)||0,P=parseFloat(m.scrollPaddingRight)||0,re=parseFloat(m.borderTopWidth)||0,J=parseFloat(m.borderBottomWidth)||0,ye=parseFloat(m.borderLeftWidth)||0,ce=parseFloat(m.borderRightWidth)||0,se=u.top-R,_=u.bottom+D,W=u.left-H,Y=u.right+z,Z=e===b?0:ye+ce,pe=e===b?0:re+J,V=e===b?0:e.offsetWidth-e.clientWidth-Z,k=e===b?0:e.offsetHeight-e.clientHeight-pe,X=v+(y?0:re)+G,ve=S-(y?0:J)-ee-k,$e=w+(y?0:ye)+U,ke=E-(y?0:ce)-P;if(m.direction==="rtl"&&!Ga())$e+=V;else ke-=V;let He=se<X||_>ve,Ee=W<$e||Y>ke;if(He&&a==="start")l+=se-X;else if(He&&a==="center")l+=(se+_)/2-(X+ve)/2;else if(He&&a==="end")l+=_-ve;else if(He&&a==="nearest"){let Ze=se-X,fe=_-ve;l+=Math.abs(Ze)<=Math.abs(fe)?Ze:fe}if(Ee&&i==="start")c+=W-$e;else if(Ee&&i==="center")c+=(W+Y)/2-($e+ke)/2;else if(Ee&&i==="end")c+=Y-ke;else if(Ee&&i==="nearest"){let Ze=W-$e,fe=Y-ke;c+=Math.abs(Ze)<=Math.abs(fe)?Ze:fe}e.scrollTo({left:c,top:l})}function IE(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow!=="hidden"){let{left:l,top:c}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:u,top:f}=e.getBoundingClientRect();if(Math.abs(l-u)>1||Math.abs(c-f)>1)r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"})}else{let{left:l,top:c}=e.getBoundingClientRect(),u=tx(e,!0);for(let m of u)bg(m,e);let{left:f,top:h}=e.getBoundingClientRect();if(Math.abs(l-f)>1||Math.abs(c-h)>1){u=r?tx(r,!0):[];for(let m of u)bg(m,r,{block:"center",inline:"center"});for(let m of tx(e,!0))bg(m,e)}}}}var zD=N(()=>{BD();pa()});function UD(e){let[t,r]=HD.useState();return nt(()=>{if(!e)return;let a=BE.get(e);if(!a){let i=`react-aria-description-${AX++}`;r(i);let l=document.createElement("div");l.id=i,l.style.display="none",l.textContent=e,document.body.appendChild(l),a={refCount:0,element:l},BE.set(e,a)}else r(a.element.id);return a.refCount++,()=>{if(a&&--a.refCount===0)a.element.remove(),BE.delete(e)}},[e]),{"aria-describedby":e?t:void 0}}var HD,AX=0,BE;var FD=N(()=>{fr();HD=j(ae(),1),BE=new Map});function MX(e={}){let{style:t,isFocusable:r}=e,[a,i]=yp.useState(!1),{focusWithinProps:l}=hp({isDisabled:!r,onFocusWithinChange:(u)=>i(u)}),c=yp.useMemo(()=>{if(a)return t;else if(t)return{...VD,...t};else return VD},[a]);return{visuallyHiddenProps:{...l,style:c}}}function jD(e){let{children:t,elementType:r="div",isFocusable:a,style:i,...l}=e,{visuallyHiddenProps:c}=MX(e);return yp.default.createElement(r,Le(l,c),t)}var yp,VD;var KD=N(()=>{pr();Jv();yp=j(ae(),1),VD={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}});var Ja,yg,sd,NX;var zE=N(()=>{qr();bp();Ya();Ja=j(ae(),1),yg=Ja.createContext(null),sd=Ja.forwardRef(function(t,r){if(!Ja.useContext(yg)?.isInvalid)return null;return Ja.default.createElement(NX,{...t,ref:r})}),NX=Ja.forwardRef((e,t)=>{let r=Ja.useContext(yg),{elementType:a,...i}=e,l=ht(i,{global:!0}),c=Yt({...i,defaultClassName:"react-aria-FieldError",defaultChildren:r.validationErrors.length===0?void 0:r.validationErrors.join(" "),values:r});if(c.children==null)return null;return Ja.default.createElement(ji,{slot:"errorMessage",elementType:a,...l,...c,ref:t})})});function jE(e){if(e[UE]){let{realtimeValidation:t,displayValidation:r,updateValidation:a,resetValidation:i,commitValidation:l}=e[UE];return{realtimeValidation:t,displayValidation:r,updateValidation:a,resetValidation:i,commitValidation:l}}return OX(e)}function OX(e){let{isInvalid:t,validationState:r,name:a,value:i,builtinValidation:l,validate:c,validationBehavior:u="aria"}=e;if(r)t||=r==="invalid";let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:GD}:null,h=ar.useMemo(()=>{if(!c||i==null)return null;let J=DX(c,i);return qD(J)},[c,i]);if(l?.validationDetails.valid)l=void 0;let m=ar.useContext(WD),b=ar.useMemo(()=>{if(a)return Array.isArray(a)?a.flatMap((J)=>FE(m[J])):FE(m[a]);return[]},[m,a]),[y,v]=ar.useState(m),[S,w]=ar.useState(!1);if(m!==y)v(m),w(!1);let E=ar.useMemo(()=>qD(S?[]:b),[S,b]),R=ar.useRef(vp),[D,H]=ar.useState(vp),z=ar.useRef(vp),G=()=>{if(!ee)return;U(!1);let J=h||l||R.current;if(!HE(J,z.current))z.current=J,H(J)},[ee,U]=ar.useState(!1);return ar.useEffect(G),{realtimeValidation:f||E||h||l||vp,displayValidation:u==="native"?f||E||D:f||E||h||l||D,updateValidation(J){if(u==="aria"&&!HE(D,J))H(J);else R.current=J},resetValidation(){let J=vp;if(!HE(J,z.current))z.current=J,H(J);if(u==="native")U(!1);w(!0)},commitValidation(){if(u==="native")U(!0);w(!0)}}}function FE(e){if(!e)return[];return Array.isArray(e)?e:[e]}function DX(e,t){if(typeof e==="function"){let r=e(t);if(r&&typeof r!=="boolean")return FE(r)}return[]}function qD(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:GD}:null}function HE(e,t){if(e===t)return!0;return!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,a)=>r===t.validationErrors[a])&&Object.entries(e.validationDetails).every(([r,a])=>t.validationDetails[r]===a)}var ar,VE,GD,vp,WD,UE="__reactAriaFormValidationState";var YD=N(()=>{ar=j(ae(),1),VE={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},GD={...VE,customError:!0,valid:!1},vp={isInvalid:!1,validationDetails:VE,validationErrors:[]},WD=ar.createContext({})});var JD=N(()=>{YD()});var nx,XD;var QD=N(()=>{nx=j(ae(),1),XD=nx.createContext(null)});function ZD(e){let{description:t,errorMessage:r,isInvalid:a,validationState:i}=e,{labelProps:l,fieldProps:c}=hD(e),u=da([Boolean(t),Boolean(r),a,i]),f=da([Boolean(t),Boolean(r),a,i]);return c=Le(c,{"aria-describedby":[u,f,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:l,fieldProps:c,descriptionProps:{id:u},errorMessageProps:{id:f}}}var eP=N(()=>{mD();pr();Ho()});function nP(e,t,r){let a=mr((i)=>{if(r&&!i.defaultPrevented)r(t)});tP.useEffect(()=>{let i=e?.current?.form;return i?.addEventListener("reset",a),()=>{i?.removeEventListener("reset",a)}},[e])}var tP;var rP=N(()=>{Qu();tP=j(ae(),1)});function oP(e,t,r){let{validationBehavior:a,focus:i}=e;nt(()=>{if(a==="native"&&r?.current&&!r.current.disabled){let h=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";if(r.current.setCustomValidity(h),!r.current.hasAttribute("title"))r.current.title="";if(!t.realtimeValidation.isInvalid)t.updateValidation(LX(r.current))}});let l=rx.useRef(!1),c=mr(()=>{if(!l.current)t.resetValidation()}),u=mr((h)=>{if(!t.displayValidation.isInvalid)t.commitValidation();let m=r?.current?.form;if(!h.defaultPrevented&&r&&m&&_X(m)===r.current){if(i)i();else r.current?.focus();ig("keyboard")}h.preventDefault()}),f=mr(()=>{t.commitValidation()});rx.useEffect(()=>{let h=r?.current;if(!h)return;let m=h.form,b=m?.reset;if(m)m.reset=()=>{l.current=!window.event||window.event.type==="message"&&Te(window.event)instanceof MessagePort,b?.call(m),l.current=!1};return h.addEventListener("invalid",u),h.addEventListener("change",f),m?.addEventListener("reset",c),()=>{if(h.removeEventListener("invalid",u),h.removeEventListener("change",f),m?.removeEventListener("reset",c),m)m.reset=b}},[r,a])}function PX(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function LX(e){return{isInvalid:!e.validity.valid,validationDetails:PX(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function _X(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}var rx;var aP=N(()=>{dn();pc();Qu();fr();rx=j(ae(),1)});var ox,iP;var sP=N(()=>{ox=j(ae(),1),iP=ox.createContext({})});var ax,ix,IX=(e)=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,...i}=e;return i},ld;var KE=N(()=>{qr();cp();fa();mp();ad();ax=j(ae(),1),ix=ax.createContext({}),ld=Wa(function(t,r){[t,r]=on(t,r,ix);let{hoverProps:a,isHovered:i}=gr({...t,isDisabled:t.disabled}),{isFocused:l,isFocusVisible:c,focusProps:u}=Fo({isTextInput:!0,autoFocus:t.autoFocus}),f=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",h=Yt({...t,values:{isHovered:i,isFocused:l,isFocusVisible:c,isDisabled:t.disabled||!1,isInvalid:f},defaultClassName:"react-aria-Input"});return ax.default.createElement(Ot.input,{...Le(IX(t),u,a),...h,ref:r,"data-focused":l||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":c||void 0,"data-invalid":f||void 0})})});class Vo{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,r){let a=this.clone();return t.addDescendants(a,e),a}}function cP(e,t,r,a){if(r==null)return[null,null];let i=null,l=null,c=e.getItem(r);while(c!=null){let u=c.filter(e,t,a);if(u!=null){if(u.nextKey=null,l)u.prevKey=l.key,l.nextKey=u.key;if(i==null)i=u;t.addNode(u),l=u}c=c.nextKey!=null?e.getItem(c.nextKey):null}if(l&&l.type==="separator"){let u=l.prevKey;if(t.removeNode(l.key),u!=null)l=t.getItem(u),l.nextKey=null;else l=null}return[i?.key??null,l?.key??null]}var sx,lP,lx,xp,cx,qE;var GE=N(()=>{sx=class sx extends Vo{filter(e,t,r){let[a,i]=cP(e,t,this.firstChildKey,r),l=this.clone();return l.firstChildKey=a,l.lastChildKey=i,l}};lP=class lP extends Vo{static{this.type="header"}};lx=class lx extends Vo{static{this.type="loader"}};xp=class xp extends sx{static{this.type="item"}filter(e,t,r){if(r(this.textValue,this)){let a=this.clone();return t.addDescendants(a,e),a}return null}};cx=class cx extends sx{static{this.type="section"}filter(e,t,r){let a=super.filter(e,t,r);if(a){if(a.lastChildKey!==null){let i=e.getItem(a.lastChildKey);if(i&&i.type!=="header")return a}}return null}};qE=class qE{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;while(e)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let r=t.get(e),a=r?.firstChildKey!=null?t.get(r.firstChildKey):null;while(a)yield a,a=a.nextKey!=null?t.get(a.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){t=this.keyMap.get(t.prevKey);while(t&&t.type!=="item"&&t.lastChildKey!=null)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;while(t){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;while(e?.lastChildKey!=null)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error("Not implemented")}clone(){let t=new this.constructor;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error("Cannot add a node to a frozen collection");if(e.type==="item"&&this.keyMap.get(e.key)==null)this.itemCount++;this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let r=t.getChildren(e.key);for(let a of r)this.addDescendants(a,t)}removeNode(e){if(this.frozen)throw Error("Cannot remove a node to a frozen collection");let t=this.keyMap.get(e);if(t!=null&&t.type==="item")this.itemCount--;this.keyMap.delete(e)}commit(e,t,r=!1){if(this.frozen)throw Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!r}filter(e){let t=new this.constructor,[r,a]=cP(this,t,this.firstKey,e);return t?.commit(r,a),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}});function vg(e){let{children:t,items:r,idScope:a,addIdAndValue:i,dependencies:l=[]}=e,c=$p.useMemo(()=>typeof t==="function"?t.toString():void 0,[t]),u=$p.useMemo(()=>new WeakMap,[...l,c]);return $p.useMemo(()=>{if(r&&typeof t==="function"){let f=[];for(let h of r){let m=BX(h)?h:null,b=m?u.get(m):null;if(!b){b=t(h);let y=b.props.id??h?.key??h?.id;if(a!=null&&b.props.id==null&&y!=null)y=a+":"+y;let v=y??f.length;if(b=$p.cloneElement(b,i?{key:v,id:y,value:h}:{key:v}),m)u.set(m,b)}f.push(b)}return f}else if(typeof t!=="function")return t},[t,r,u,a,i])}function BX(e){switch(typeof e){case"object":return e!=null;case"function":case"symbol":return!0;default:return!1}}var $p;var WE=N(()=>{$p=j(ae(),1)});var Sp=Bi(function(zX){var jo=j(ae());(function(){function e(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}function t(y,v){h||jo.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=v();if(!m){var w=v();i(S,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}w=l({inst:{value:S,getSnapshot:v}});var E=w[0].inst,R=w[1];return u(function(){E.value=S,E.getSnapshot=v,r(E)&&R({inst:E})},[y,S,v]),c(function(){return r(E)&&R({inst:E}),y(function(){r(E)&&R({inst:E})})},[y]),f(S),S}function r(y){var v=y.getSnapshot;y=y.value;try{var S=v();return!i(y,S)}catch(w){return!0}}function a(y,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=typeof Object.is==="function"?Object.is:e,l=jo.useState,c=jo.useEffect,u=jo.useLayoutEffect,f=jo.useDebugValue,h=!1,m=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;zX.useSyncExternalStore=jo.useSyncExternalStore!==void 0?jo.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function HX(e,t,r){let a=jr(),i=At.useRef(a);i.current=a;let l=At.useCallback(()=>i.current?r():t(),[t,r]);return fP.useSyncExternalStore(e,l)}function UX(e){return class extends Vo{static{this.type=e}}}function FX(e,t,r,a,i,l){if(typeof e==="string")e=UX(e);let c=At.useCallback((f)=>{f?.setProps(t,r,e,a,l)},[t,r,a,l,e]),u=At.useContext(JE);if(u){let f=u.ownerDocument.nodesByProps.get(t);if(!f)f=u.ownerDocument.createElement(e.type),f.setProps(t,r,e,a,l),u.appendChild(f),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(t,f);return i?At.default.createElement(JE.Provider,{value:f},i):null}return At.default.createElement(e.type,{ref:c},i)}function qi(e,t){let r=({node:i})=>t(i.props,i.props.ref,i),a=At.forwardRef((i,l)=>{let c=At.useContext(Gv);if(!At.useContext(pP)){if(t.length>=3)throw Error(t.name+" cannot be rendered outside a collection.");return t(i,l)}return FX(e,i,l,"children"in i?i.children:null,null,(f)=>At.default.createElement(Gv.Provider,{value:c},At.default.createElement(r,{node:f})))});return a.displayName=t.name,a}function VX(e){return vg({...e,addIdAndValue:!0})}function XE(e){let t=At.useContext(uP),r=(t?.dependencies||[]).concat(e.dependencies),a=e.idScope??t?.idScope,i=VX({...e,idScope:a,dependencies:r});if(At.useContext(YE))i=At.default.createElement(jX,null,i);return t=At.useMemo(()=>({dependencies:r,idScope:a}),[a,...r]),At.default.createElement(uP.Provider,{value:t},i)}function jX({children:e}){let t=At.useContext(YE),r=At.useMemo(()=>At.default.createElement(YE.Provider,{value:null},At.default.createElement(pP.Provider,{value:!0},e)),[e]);return jr()?At.default.createElement(JE.Provider,{value:t},r):dP.createPortal(r,t)}var dP,At,fP,pP,YE,Rme,JE,uP;var QE=N(()=>{GE();WE();fp();uc();dP=j(Vr(),1),At=j(ae(),1),fP=j(Sp(),1),pP=At.createContext(!1),YE=At.createContext(null);Rme=typeof At.default.useSyncExternalStore==="function"?At.default.useSyncExternalStore:HX,JE=At.createContext(null);uP=At.createContext(null)});var xg=N(()=>{QE()});var mP=N(()=>{WE()});function gP(e,t,r){return vg({items:t?e.getChildren(t.key):e,dependencies:[r],children(a){if(a.type==="content")return uo.default.createElement(uo.default.Fragment,null);let i=a.render(a);if(!r||a.type!=="item")return i;return uo.default.createElement(uo.default.Fragment,null,r({type:"item",key:a.key,dropPosition:"before"}),i,KX(e,a,r))}})}function KX(e,t,r){let a=t.key,i=e.getKeyAfter(a),l=i!=null?e.getItem(i):null;while(l!=null&&l.type!=="item")i=e.getKeyAfter(l.key),l=i!=null?e.getItem(i):null;let c=t.nextKey!=null?e.getItem(t.nextKey):null;while(c!=null&&c.type!=="item")c=c.nextKey!=null?e.getItem(c.nextKey):null;let u=[];if(c==null){let f=t;while(f?.type==="item"&&(!l||f.parentKey!==l.parentKey&&l.level<f.level)){let h=r({type:"item",key:f.key,dropPosition:"after"});if(uo.isValidElement(h))u.push(uo.cloneElement(h,{key:`${f.key}-after`}));f=f.parentKey!=null?e.getItem(f.parentKey):null}}return u}function tT(e){return uo.useMemo(()=>e!=null?new Set([e]):null,[e])}var uo,eT,$g;var nT=N(()=>{mP();uo=j(ae(),1),eT={CollectionRoot({collection:e,renderDropIndicator:t}){return gP(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:r}){return gP(e,t,r)}};$g=uo.createContext(eT)});var cd,bP;var yP=N(()=>{cd=j(ae(),1),bP=cd.createContext({})});var Sg=N(()=>{GE()});function vP(e){let t=Vs.useRef({});return Vs.default.createElement(GX.Provider,{value:t},e.children)}var qX,Vs,GX;var xP=N(()=>{qX=j(Vr(),1),Vs=j(ae(),1),GX=Vs.createContext(null)});var ux,Cp;var dx=N(()=>{ux=j(ae(),1),Cp=ux.createContext({isSelected:!1})});function rT(e){let t=ht(e,{labelable:!0}),r;if(e.orientation==="vertical")r="vertical";if(e.elementType!=="hr")return{separatorProps:{...t,role:"separator","aria-orientation":r}};return{separatorProps:t}}var $P=N(()=>{Bs()});var SP=N(()=>{$P()});var fx,CP,wP,oT;var EP=N(()=>{qr();SP();Sg();xg();Ya();fa();fx=j(ae(),1),CP=fx.createContext({});wP=class wP extends Vo{static{this.type="separator"}filter(e,t){let r=t.getItem(this.prevKey);if(r&&r.type!=="separator"){let a=this.clone();return t.addDescendants(a,e),a}return null}};oT=qi(wP,function(t,r){[t,r]=on(t,r,CP);let{elementType:a,orientation:i,style:l,className:c,slot:u,...f}=t,h=a||"hr";if(h==="hr"&&i==="vertical")h="div";let m=Ot[h],{separatorProps:b}=rT({...f,elementType:a,orientation:i}),y=ht(t,{global:!0});return fx.default.createElement(m,{render:t.render,...Le(y,b),style:l,className:c??"react-aria-Separator",ref:r,slot:u||void 0})})});function WX(e){if(typeof e==="string")return e.replace(/\s*/g,"");return""+e}function TP(e,t){let r=aT.get(e);if(!r)throw Error("Unknown list");return`${r.id}-option-${WX(t)}`}var aT;var RP=N(()=>{aT=new WeakMap});class kP{constructor(e,t,r,a){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=(l)=>{if(l.nodeType===Node.ELEMENT_NODE){let c=l.shadowRoot;if(c){let u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==="function")return this.filter(l);else if(this.filter?.acceptNode)return this.filter.acceptNode(l);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=a??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,r,this._acceptNode));let i=t.shadowRoot;if(i){let l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!bt(this.root,e))throw Error("Cannot set currentNode to a node that is not contained by the root node.");let t=[],r=e,a=e;this._currentNode=e;while(r&&r!==this.root)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let l=r,c=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});t.push(c),c.currentNode=a,this._currentSetFor.add(c),r=a=l.host}else r=r.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=a,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();if(!bt(e,t))return this.currentNode=e,null;if(t)this.currentNode=t;return t}lastChild(){let t=this._walkerStack[0].lastChild();if(t)this.currentNode=t;return t}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let r;if(typeof this.filter==="function")r=this.filter(e);else if(this.filter?.acceptNode)r=this.filter.acceptNode(e);if(r===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let a=this.nextNode();if(a)this.currentNode=a;return a}if(e)this.currentNode=e;return e}else if(this._walkerStack.length>1){this._walkerStack.shift();let t=this.nextNode();if(t)this.currentNode=t;return t}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();if(r)this.currentNode=r;return r}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let a;if(typeof this.filter==="function")a=this.filter(t);else if(this.filter?.acceptNode)a=this.filter.acceptNode(t);if(a===NodeFilter.FILTER_ACCEPT){if(t)this.currentNode=t;return t}let i=this.lastChild();if(i)this.currentNode=i;return i}if(t)this.currentNode=t;return t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();if(r)this.currentNode=r;return r}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function px(e,t,r,a){if(Uo())return new kP(e,t,r,a);return e.createTreeWalker(t,r,a)}var iT=N(()=>{dn();yv()});function OP(e){let{children:t,contain:r,restoreFocus:a,autoFocus:i}=e,l=xn.useRef(null),c=xn.useRef(null),u=xn.useRef([]),{parentNode:f}=xn.useContext(AP)||{},h=xn.useMemo(()=>new mx({scopeRef:u}),[u]);nt(()=>{let y=f||Vn.root;if(Vn.getTreeNode(y.scopeRef)&&Zt&&!hx(Zt,y.scopeRef)){let v=Vn.getTreeNode(Zt);if(v)y=v}y.addChild(h),Vn.addNode(h)},[h,f]),nt(()=>{let y=Vn.getTreeNode(u);if(y)y.contain=!!r},[r]),nt(()=>{let y=l.current?.nextSibling,v=[],S=(w)=>w.stopPropagation();while(y&&y!==c.current)v.push(y),y.addEventListener(sT,S),y=y.nextSibling;return u.current=v,()=>{for(let w of v)w.removeEventListener(sT,S)}},[t]),eQ(u,a,r),QX(u,r),tQ(u,a,r),ZX(u,i),xn.useEffect(()=>{let y=wt(rt(u.current?u.current[0]:void 0)),v=null;if(ba(y,u.current)){for(let S of Vn.traverse())if(S.scopeRef&&ba(y,S.scopeRef.current))v=S;if(v===Vn.getTreeNode(u))Zt=v.scopeRef}},[u]),nt(()=>()=>{let y=Vn.getTreeNode(u)?.parent?.scopeRef??null;if((u===Zt||hx(u,Zt))&&(!y||Vn.getTreeNode(y)))Zt=y;Vn.removeTreeNode(u)},[u]);let m=xn.useMemo(()=>YX(u),[]),b=xn.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return xn.default.createElement(AP.Provider,{value:b},xn.default.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:l}),t,xn.default.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:c}))}function YX(e){return{focusNext(t={}){let r=e.current,{from:a,tabbable:i,wrap:l,accept:c}=t,u=a||wt(rt(r[0]??void 0)),f=r[0].previousElementSibling,h=ud(r),m=ga(h,{tabbable:i,accept:c},r);m.currentNode=ba(u,r)?u:f;let b=m.nextNode();if(!b&&l)m.currentNode=f,b=m.nextNode();if(b)js(b,!0);return b},focusPrevious(t={}){let r=e.current,{from:a,tabbable:i,wrap:l,accept:c}=t,u=a||wt(rt(r[0]??void 0)),f=r[r.length-1].nextElementSibling,h=ud(r),m=ga(h,{tabbable:i,accept:c},r);m.currentNode=ba(u,r)?u:f;let b=m.previousNode();if(!b&&l)m.currentNode=f,b=m.previousNode();if(b)js(b,!0);return b},focusFirst(t={}){let r=e.current,{tabbable:a,accept:i}=t,l=ud(r),c=ga(l,{tabbable:a,accept:i},r);c.currentNode=r[0].previousElementSibling;let u=c.nextNode();if(u)js(u,!0);return u},focusLast(t={}){let r=e.current,{tabbable:a,accept:i}=t,l=ud(r),c=ga(l,{tabbable:a,accept:i},r);c.currentNode=r[r.length-1].nextElementSibling;let u=c.previousNode();if(u)js(u,!0);return u}}}function ud(e){return e[0].parentElement}function Cg(e){let t=Vn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.contain)return!1;t=t.parent}return!0}function JX(e){if(!e.form)return Array.from(rt(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((a)=>!a.form);let t=e.form.elements.namedItem(e.name),r=hn(e);if(t instanceof r.RadioNodeList)return Array.from(t).filter((a)=>a instanceof r.HTMLInputElement);if(t instanceof r.HTMLInputElement)return[t];return[]}function XX(e){if(e.checked)return!0;let t=JX(e);return t.length>0&&!t.some((r)=>r.checked)}function QX(e,t){let r=xn.useRef(void 0),a=xn.useRef(void 0);nt(()=>{let i=e.current;if(!t){if(a.current)cancelAnimationFrame(a.current),a.current=void 0;return}let l=rt(i?i[0]:void 0),c=(h)=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Cg(e)||h.isComposing)return;let m=wt(l),b=e.current;if(!b||!ba(m,b))return;let y=ud(b),v=ga(y,{tabbable:!0},b);if(!m)return;v.currentNode=m;let S=h.shiftKey?v.previousNode():v.nextNode();if(!S)v.currentNode=h.shiftKey?b[b.length-1].nextElementSibling:b[0].previousElementSibling,S=h.shiftKey?v.previousNode():v.nextNode();if(h.preventDefault(),S){if(js(S,!0),S instanceof hn(S).HTMLInputElement)S.select()}},u=(h)=>{if((!Zt||hx(Zt,e))&&ba(Te(h),e.current))Zt=e,r.current=Te(h);else if(Cg(e)&&!wc(Te(h),e)){if(r.current)r.current.focus();else if(Zt&&Zt.current)lT(Zt.current)}else if(Cg(e))r.current=Te(h)},f=(h)=>{if(a.current)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{let m=Ju(),b=(m==="virtual"||m===null)&&rg()&&fE(),y=wt(l);if(!b&&y&&Cg(e)&&!wc(y,e)){Zt=e;let v=Te(h);if(v&&v.isConnected)r.current=v,r.current?.focus();else if(Zt.current)lT(Zt.current)}})};return l.addEventListener("keydown",c,!1),l.addEventListener("focusin",u,!1),i?.forEach((h)=>h.addEventListener("focusin",u,!1)),i?.forEach((h)=>h.addEventListener("focusout",f,!1)),()=>{l.removeEventListener("keydown",c,!1),l.removeEventListener("focusin",u,!1),i?.forEach((h)=>h.removeEventListener("focusin",u,!1)),i?.forEach((h)=>h.removeEventListener("focusout",f,!1))}},[e,t]),nt(()=>()=>{if(a.current)cancelAnimationFrame(a.current)},[a])}function DP(e){return wc(e)}function ba(e,t){if(!e)return!1;if(!t)return!1;return t.some((r)=>bt(r,e))}function wc(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of Vn.traverse(Vn.getTreeNode(t)))if(r&&ba(e,r.current))return!0;return!1}function PP(e){return wc(e,Zt)}function hx(e,t){let r=Vn.getTreeNode(t)?.parent;while(r){if(r.scopeRef===e)return!0;r=r.parent}return!1}function js(e,t=!1){if(e!=null&&!t)try{ma(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function LP(e,t=!0){let r=e[0].previousElementSibling,a=ud(e),i=ga(a,{tabbable:t},e);i.currentNode=r;let l=i.nextNode();if(t&&!l)a=ud(e),i=ga(a,{tabbable:!1},e),i.currentNode=r,l=i.nextNode();return l}function lT(e,t=!0){js(LP(e,t))}function ZX(e,t){let r=xn.default.useRef(t);xn.useEffect(()=>{if(r.current){Zt=e;let a=rt(e.current?e.current[0]:void 0);if(!ba(wt(a),Zt.current)&&e.current)lT(e.current)}r.current=!1},[e])}function eQ(e,t,r){nt(()=>{if(t||r)return;let a=e.current,i=rt(a?a[0]:void 0),l=(c)=>{let u=Te(c);if(ba(u,e.current))Zt=e;else if(!DP(u))Zt=null};return i.addEventListener("focusin",l,!1),a?.forEach((c)=>c.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),a?.forEach((c)=>c.removeEventListener("focusin",l,!1))}},[e,t,r])}function MP(e){let t=Vn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function tQ(e,t,r){let a=xn.useRef(typeof document<"u"?wt(rt(e.current?e.current[0]:void 0)):null);nt(()=>{let i=e.current,l=rt(i?i[0]:void 0);if(!t||r)return;let c=()=>{if((!Zt||hx(Zt,e))&&ba(wt(l),e.current))Zt=e};return l.addEventListener("focusin",c,!1),i?.forEach((u)=>u.addEventListener("focusin",c,!1)),()=>{l.removeEventListener("focusin",c,!1),i?.forEach((u)=>u.removeEventListener("focusin",c,!1))}},[e,r]),nt(()=>{let i=rt(e.current?e.current[0]:void 0);if(!t)return;let l=(c)=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!Cg(e)||c.isComposing)return;let u=i.activeElement;if(!wc(u,e)||!MP(e))return;let f=Vn.getTreeNode(e);if(!f)return;let h=f.nodeToRestore,m=ga(i.body,{tabbable:!0});m.currentNode=u;let b=c.shiftKey?m.previousNode():m.nextNode();if(!h||!h.isConnected||h===i.body)h=void 0,f.nodeToRestore=void 0;if((!b||!wc(b,e))&&h){m.currentNode=h;do b=c.shiftKey?m.previousNode():m.nextNode();while(wc(b,e));if(c.preventDefault(),c.stopPropagation(),b)js(b,!0);else if(!DP(h))u.blur();else js(h,!0)}};if(!r)i.addEventListener("keydown",l,!0);return()=>{if(!r)i.removeEventListener("keydown",l,!0)}},[e,t,r]),nt(()=>{let i=rt(e.current?e.current[0]:void 0);if(!t)return;let l=Vn.getTreeNode(e);if(!l)return;return l.nodeToRestore=a.current??void 0,()=>{let c=Vn.getTreeNode(e);if(!c)return;let u=c.nodeToRestore,f=wt(i);if(t&&u&&(f&&wc(f,e)||f===i.body&&MP(e))){let h=Vn.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let m=h.getTreeNode(e);while(m){if(m.nodeToRestore&&m.nodeToRestore.isConnected){NP(m.nodeToRestore);return}m=m.parent}m=h.getTreeNode(e);while(m){if(m.scopeRef&&m.scopeRef.current&&Vn.getTreeNode(m.scopeRef)){let b=LP(m.scopeRef.current,!0);NP(b);return}m=m.parent}}})}}},[e,t])}function NP(e){if(e.dispatchEvent(new CustomEvent(sT,{bubbles:!0,cancelable:!0})))js(e)}function ga(e,t,r){let a=t?.tabbable?Cv:Sv,i=e?.nodeType===Node.ELEMENT_NODE?e:null,l=rt(i),c=px(l,e||l,NodeFilter.SHOW_ELEMENT,{acceptNode(u){if(bt(t?.from,u))return NodeFilter.FILTER_REJECT;if(t?.tabbable&&u.tagName==="INPUT"&&u.getAttribute("type")==="radio"){if(!XX(u))return NodeFilter.FILTER_REJECT;if(c.currentNode.tagName==="INPUT"&&c.currentNode.type==="radio"&&c.currentNode.name===u.name)return NodeFilter.FILTER_REJECT}if(a(u)&&(!r||ba(u,r))&&(!t?.accept||t.accept(u)))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}});if(t?.from)c.currentNode=t.from;return c}class cT{constructor(){this.fastMap=new Map,this.root=new mx({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let a=this.fastMap.get(t??null);if(!a)return;let i=new mx({scopeRef:e});if(a.addChild(i),i.parent=a,this.fastMap.set(e,i),r)i.nodeToRestore=r}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let i of this.traverse())if(i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&ba(i.nodeToRestore,t.scopeRef.current))i.nodeToRestore=t.nodeToRestore;let a=t.children;if(r){if(r.removeChild(t),a.size>0)a.forEach((i)=>r&&r.addChild(i))}this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null)yield e;if(e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new cT;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class mx{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}var xn,AP,sT="react-aria-focus-scope-restore",Zt=null,Vn;var wg=N(()=>{iT();dp();dn();pc();hr();pa();wv();fr();xn=j(ae(),1),AP=xn.default.createContext(null);Vn=new cT});function Eg(e){return IO()?e.altKey:e.ctrlKey}function gx(e,t){let r=`[data-key="${CSS.escape(String(t))}"]`,a=e.current?.dataset.collection;if(a)r=`[data-collection="${CSS.escape(a)}"]${r}`;return e.current?.querySelector(r)}function IP(e){let t=Nn();return _P.set(e,t),t}function BP(e){return _P.get(e)}var _P;var uT=N(()=>{pa();Ho();_P=new WeakMap});function HP(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:a}=e,i=zP.useRef({search:"",timeout:void 0}).current,l=(c)=>{let u=rQ(c.key);if(!u||c.ctrlKey||c.metaKey||!bt(c.currentTarget,Te(c))||i.search.length===0&&u===" ")return;if(u===" "&&i.search.trim().length>0){if(c.preventDefault(),!("continuePropagation"in c))c.stopPropagation()}if(i.search+=u,t.getKeyForSearch!=null){let f=t.getKeyForSearch(i.search,r.focusedKey);if(f==null)f=t.getKeyForSearch(i.search);if(f!=null){if(r.setFocusedKey(f),a)a(f)}}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},nQ)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?l:void 0}}}function rQ(e){if(e.length===1||!/^[A-Z]/i.test(e))return e;return""}var zP,nQ=1000;var UP=N(()=>{dn();zP=j(ae(),1)});function fT(e,t){let r=dT.useRef(!0),a=dT.useRef(null);nt(()=>(r.current=!0,()=>{r.current=!1}),[]),nt(()=>{if(r.current)r.current=!1;else if(!a.current||t.some((i,l)=>!Object.is(i,a[l])))e();a.current=t},t)}var dT;var FP=N(()=>{fr();dT=j(ae(),1)});function jP(e){let{selectionManager:t,keyboardDelegate:r,ref:a,autoFocus:i=!1,shouldFocusWrap:l=!1,disallowEmptySelection:c=!1,disallowSelectAll:u=!1,escapeKeyBehavior:f="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:b,allowsTabNavigation:y=!1,scrollRef:v=a,linkBehavior:S="action"}=e,{direction:w}=sp(),E=Gu(),R=(_)=>{if(_.altKey&&_.key==="Tab")_.preventDefault();if(!a.current||!bt(a.current,Te(_)))return;let W=(Y,Z)=>{if(Y!=null){if(t.isLink(Y)&&S==="selection"&&h&&!Eg(_)){VP.flushSync(()=>{t.setFocusedKey(Y,Z)});let pe=gx(a,Y),V=t.getItemProps(Y);if(pe)E.open(pe,_,V.href,V.routerOptions);return}if(t.setFocusedKey(Y,Z),t.isLink(Y)&&S==="override")return;if(_.shiftKey&&t.selectionMode==="multiple")t.extendSelection(Y);else if(h&&!Eg(_))t.replaceSelection(Y)}};switch(_.key){case"ArrowDown":if(r.getKeyBelow){let Y=t.focusedKey!=null?r.getKeyBelow?.(t.focusedKey):r.getFirstKey?.();if(Y==null&&l)Y=r.getFirstKey?.(t.focusedKey);if(Y!=null)_.preventDefault(),W(Y)}break;case"ArrowUp":if(r.getKeyAbove){let Y=t.focusedKey!=null?r.getKeyAbove?.(t.focusedKey):r.getLastKey?.();if(Y==null&&l)Y=r.getLastKey?.(t.focusedKey);if(Y!=null)_.preventDefault(),W(Y)}break;case"ArrowLeft":if(r.getKeyLeftOf){let Y=t.focusedKey!=null?r.getKeyLeftOf?.(t.focusedKey):r.getFirstKey?.();if(Y==null&&l)Y=w==="rtl"?r.getFirstKey?.(t.focusedKey):r.getLastKey?.(t.focusedKey);if(Y!=null)_.preventDefault(),W(Y,w==="rtl"?"first":"last")}break;case"ArrowRight":if(r.getKeyRightOf){let Y=t.focusedKey!=null?r.getKeyRightOf?.(t.focusedKey):r.getFirstKey?.();if(Y==null&&l)Y=w==="rtl"?r.getLastKey?.(t.focusedKey):r.getFirstKey?.(t.focusedKey);if(Y!=null)_.preventDefault(),W(Y,w==="rtl"?"last":"first")}break;case"Home":if(r.getFirstKey){if(t.focusedKey===null&&_.shiftKey)return;_.preventDefault();let Y=r.getFirstKey(t.focusedKey,hc(_));if(t.setFocusedKey(Y),Y!=null){if(hc(_)&&_.shiftKey&&t.selectionMode==="multiple")t.extendSelection(Y);else if(h)t.replaceSelection(Y)}}break;case"End":if(r.getLastKey){if(t.focusedKey===null&&_.shiftKey)return;_.preventDefault();let Y=r.getLastKey(t.focusedKey,hc(_));if(t.setFocusedKey(Y),Y!=null){if(hc(_)&&_.shiftKey&&t.selectionMode==="multiple")t.extendSelection(Y);else if(h)t.replaceSelection(Y)}}break;case"PageDown":if(r.getKeyPageBelow&&t.focusedKey!=null){let Y=r.getKeyPageBelow(t.focusedKey);if(Y!=null)_.preventDefault(),W(Y)}break;case"PageUp":if(r.getKeyPageAbove&&t.focusedKey!=null){let Y=r.getKeyPageAbove(t.focusedKey);if(Y!=null)_.preventDefault(),W(Y)}break;case"a":if(hc(_)&&t.selectionMode==="multiple"&&u!==!0)_.preventDefault(),t.selectAll();break;case"Escape":if(f==="clearSelection"&&!c&&t.selectedKeys.size!==0)_.stopPropagation(),_.preventDefault(),t.clearSelection();break;case"Tab":if(!y){if(_.shiftKey)a.current.focus();else{let Y=ga(a.current,{tabbable:!0}),Z=void 0,pe;do if(pe=Y.lastChild(),pe)Z=pe;while(pe);let V=wt();if(Z&&(!Zm(Z)||V&&!Cv(V)))Gr(Z)}break}}},D=Xa.useRef({top:0,left:0});Zu(v,"scroll",()=>{D.current={top:v.current?.scrollTop??0,left:v.current?.scrollLeft??0}});let H=(_)=>{if(t.isFocused){if(!bt(_.currentTarget,Te(_)))t.setFocused(!1);return}if(!bt(_.currentTarget,Te(_)))return;if(t.setFocused(!0),t.focusedKey==null){let W=(Z)=>{if(Z!=null){if(t.setFocusedKey(Z),h&&!t.isSelected(Z))t.replaceSelection(Z)}},Y=_.relatedTarget;if(Y&&_.currentTarget.compareDocumentPosition(Y)&Node.DOCUMENT_POSITION_FOLLOWING)W(t.lastSelectedKey??r.getLastKey?.());else W(t.firstSelectedKey??r.getFirstKey?.())}else if(v.current)v.current.scrollTop=D.current.top,v.current.scrollLeft=D.current.left;if(t.focusedKey!=null&&v.current){let W=gx(a,t.focusedKey);if(W instanceof HTMLElement){if(!Zm(W)&&!b)Gr(W);if(Ju()==="keyboard")IE(W,{containingElement:a.current})}}},z=(_)=>{if(!bt(_.currentTarget,_.relatedTarget))t.setFocused(!1)},G=Xa.useRef(!1);Zu(a,MO,!b?void 0:(_)=>{let{detail:W}=_;if(_.stopPropagation(),t.setFocused(!0),W?.focusStrategy==="first")G.current=!0}),fT(()=>{if(G.current){let _=r.getFirstKey?.()??null;if(_==null){let W=wt();if(vv(a.current),sE(W,null),t.collection.size>0)G.current=!1}else t.setFocusedKey(_),G.current=!1}},[t.collection]),fT(()=>{if(t.collection.size>0)G.current=!1},[t.focusedKey]),Zu(a,AO,!b?void 0:(_)=>{if(_.stopPropagation(),t.setFocused(!1),_.detail?.clearFocusKey)t.setFocusedKey(null)});let ee=Xa.useRef(i),U=Xa.useRef(!1);Xa.useEffect(()=>{if(ee.current){let _=null;if(i==="first")_=r.getFirstKey?.()??null;if(i==="last")_=r.getLastKey?.()??null;let W=t.selectedKeys;if(W.size){for(let Y of W)if(t.canSelectItem(Y)){_=Y;break}}if(t.setFocused(!0),t.setFocusedKey(_),_==null&&!b&&a.current)ma(a.current);if(t.collection.size>0)ee.current=!1,U.current=!0}});let P=Xa.useRef(t.focusedKey),re=Xa.useRef(null);Xa.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==P.current||U.current)&&v.current&&a.current){let _=Ju(),W=gx(a,t.focusedKey);if(!(W instanceof HTMLElement))return;if(_==="keyboard"||U.current){if(re.current)cancelAnimationFrame(re.current);re.current=requestAnimationFrame(()=>{if(v.current){if(bg(v.current,W),_!=="virtual")IE(W,{containingElement:a.current})}})}}if(!b&&t.isFocused&&t.focusedKey==null&&P.current!=null&&a.current)ma(a.current);P.current=t.focusedKey,U.current=!1}),Xa.useEffect(()=>()=>{if(re.current)cancelAnimationFrame(re.current)},[]),Zu(a,"react-aria-focus-scope-restore",(_)=>{_.preventDefault(),t.setFocused(!0)});let J={onKeyDown:R,onFocus:H,onBlur:z,onMouseDown(_){if(v.current===Te(_))_.preventDefault()}},{typeSelectProps:ye}=HP({keyboardDelegate:r,selectionManager:t});if(!m)J=Le(ye,J);let ce=void 0;if(!b)ce=t.focusedKey==null?0:-1;let se=IP(t.collection);return{collectionProps:Le(J,{tabIndex:ce,"data-collection":se})}}var VP,Xa;var KP=N(()=>{NO();lE();dp();qu();dn();wg();pc();uT();sg();wv();pr();zD();yE();Pv();fc();UP();FP();VP=j(Vr(),1),Xa=j(ae(),1)});function GP(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:a,onLongPress:i,threshold:l=oQ,accessibilityDescription:c}=e,u=qP.useRef(void 0),{addGlobalListener:f,removeGlobalListener:h}=xc(),{pressProps:m}=$c({isDisabled:t,onPressStart(y){if(y.continuePropagation(),y.pointerType==="mouse"||y.pointerType==="touch"){if(r)r({...y,type:"longpressstart"});if(u.current=setTimeout(()=>{if(y.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),rt(y.target).activeElement!==y.target)Gr(y.target);if(i)i({...y,type:"longpress"});u.current=void 0},l),y.pointerType==="touch"){let v=(w)=>{w.preventDefault()},S=hn(y.target);f(y.target,"contextmenu",v,{once:!0}),f(S,"pointerup",()=>{setTimeout(()=>{h(y.target,"contextmenu",v)},30)},{once:!0})}}},onPressEnd(y){if(u.current)clearTimeout(u.current);if(a&&(y.pointerType==="mouse"||y.pointerType==="touch"))a({...y,type:"longpressend"})}}),b=UD(i&&!t?c:void 0);return{longPressProps:Le(m,b)}}var qP,oQ=500;var WP=N(()=>{qu();hr();pr();FD();dg();pg();qP=j(ae(),1)});function wp(e){let{id:t,selectionManager:r,key:a,ref:i,shouldSelectOnPressUp:l,shouldUseVirtualFocus:c,focus:u,isDisabled:f,onAction:h,allowsDifferentPressOrigin:m,linkBehavior:b="action"}=e,y=Gu();t=Nn(t);let v=(k)=>{if(k.pointerType==="keyboard"&&Eg(k))r.toggleSelection(a);else{if(r.selectionMode==="none")return;if(r.isLink(a)){if(b==="selection"&&i.current){let X=r.getItemProps(a);y.open(i.current,k,X.href,X.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(b==="override"||b==="none")return}if(r.selectionMode==="single")if(r.isSelected(a)&&!r.disallowEmptySelection)r.toggleSelection(a);else r.replaceSelection(a);else if(k&&k.shiftKey)r.extendSelection(a);else if(r.selectionBehavior==="toggle"||k&&(hc(k)||k.pointerType==="touch"||k.pointerType==="virtual"))r.toggleSelection(a);else r.replaceSelection(a)}};dd.useEffect(()=>{if(a===r.focusedKey&&r.isFocused)if(!c){if(u)u();else if(wt()!==i.current&&i.current)ma(i.current)}else vv(i.current)},[i,a,r.focusedKey,r.childFocusStrategy,r.isFocused,c]),f=f||r.isDisabled(a);let S={};if(!c&&!f)S={tabIndex:a===r.focusedKey?0:-1,onFocus(k){if(Te(k)===i.current)r.setFocusedKey(a)}};else if(f)S.onMouseDown=(k)=>{k.preventDefault()};dd.useEffect(()=>{if(f&&r.focusedKey===a)r.setFocusedKey(null)},[r,f,a]);let w=r.isLink(a)&&b==="override",E=h&&e.UNSTABLE_itemBehavior==="action",R=r.isLink(a)&&b!=="selection"&&b!=="none",D=!f&&r.canSelectItem(a)&&!w&&!E,H=(h||R)&&!f,z=H&&(r.selectionBehavior==="replace"?!D:!D||r.isEmpty),G=H&&D&&r.selectionBehavior==="replace",ee=z||G,U=dd.useRef(null),P=ee&&D,re=dd.useRef(!1),J=dd.useRef(!1),ye=r.getItemProps(a),ce=(k)=>{if(h)h(),i.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}));if(R&&i.current)y.open(i.current,k,ye.href,ye.routerOptions)},se={ref:i};if(l)if(se.onPressStart=(k)=>{if(U.current=k.pointerType,re.current=P,k.pointerType==="keyboard"&&(!ee||JP(k.key)))v(k)},!m)se.onPress=(k)=>{if(z||G&&k.pointerType!=="mouse"){if(k.pointerType==="keyboard"&&!YP(k.key))return;ce(k)}else if(k.pointerType!=="keyboard"&&D)v(k)};else se.onPressUp=z?void 0:(k)=>{if(k.pointerType==="mouse"&&D)v(k)},se.onPress=z?ce:(k)=>{if(k.pointerType!=="keyboard"&&k.pointerType!=="mouse"&&D)v(k)};else se.onPressStart=(k)=>{if(U.current=k.pointerType,re.current=P,J.current=z,D&&(k.pointerType==="mouse"&&!z||k.pointerType==="keyboard"&&(!H||JP(k.key))))v(k)},se.onPress=(k)=>{if(k.pointerType==="touch"||k.pointerType==="pen"||k.pointerType==="virtual"||k.pointerType==="keyboard"&&ee&&YP(k.key)||k.pointerType==="mouse"&&J.current){if(ee)ce(k);else if(D)v(k)}};if(S["data-collection"]=BP(r.collection),S["data-key"]=a,se.preventFocusOnPress=c,c)se=Le(se,{onPressStart(k){if(k.pointerType!=="touch")r.setFocused(!0),r.setFocusedKey(a)},onPress(k){if(k.pointerType==="touch")r.setFocused(!0),r.setFocusedKey(a)}});if(ye){for(let k of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])if(ye[k])se[k]=Ka(se[k],ye[k])}let{pressProps:_,isPressed:W}=$c(se),Y=G?(k)=>{if(U.current==="mouse")k.stopPropagation(),k.preventDefault(),ce(k)}:void 0,{longPressProps:Z}=GP({isDisabled:!P,onLongPress(k){if(k.pointerType==="touch")v(k),r.setSelectionBehavior("toggle")}}),pe=(k)=>{if(U.current==="touch"&&re.current)k.preventDefault()},V=b!=="none"&&r.isLink(a)?(k)=>{if(!ha.isOpening)k.preventDefault()}:void 0;return{itemProps:Le(S,D||z||c&&!f?_:{},P?Z:{},{onDoubleClick:Y,onDragStartCapture:pe,onClick:V,id:t},c?{onMouseDown:(k)=>k.preventDefault()}:void 0),isPressed:W,isSelected:r.isSelected(a),isFocused:r.isFocused&&r.focusedKey===a,isDisabled:f,allowsSelection:D,hasAction:ee}}function YP(e){return e==="Enter"}function JP(e){return e===" "}var dd;var bx=N(()=>{ep();dp();dn();uT();sg();pr();lE();fc();pg();Ho();WP();dd=j(ae(),1)});function XP(e,t){if(typeof t.getChildren==="function")return t.getChildren(e.key);return e.childNodes}var QP=()=>{};function Tg(e){let t=ZP.get(e);if(t!=null)return t;let r=0,a=(i)=>{for(let l of i)if(l.type==="section")a(XP(l,e));else if(l.type==="item")r++};return a(e),ZP.set(e,r),r}var ZP;var e9=N(()=>{QP();ZP=new WeakMap});var pT=N(()=>{e9()});function hT(e,t,r){let{key:a}=e,i=aT.get(t),l=e.isDisabled??t.selectionManager.isDisabled(a),c=e.isSelected??t.selectionManager.isSelected(a),u=e.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,f=e.shouldFocusOnHover??i?.shouldFocusOnHover,h=e.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,m=e.isVirtualized??i?.isVirtualized,b=da(),y=da(),v={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?c:void 0,"aria-label":e["aria-label"],"aria-labelledby":b,"aria-describedby":y},S=t.collection.getItem(a);if(m){let re=Number(S?.index);v["aria-posinset"]=Number.isNaN(re)?void 0:re+1,v["aria-setsize"]=Tg(t.collection)}let w=i?.onAction?()=>i?.onAction?.(a):void 0,E=TP(t,a),{itemProps:R,isPressed:D,isFocused:H,hasAction:z,allowsSelection:G}=wp({selectionManager:t.selectionManager,key:a,ref:r,shouldSelectOnPressUp:u,allowsDifferentPressOrigin:u&&f,isVirtualized:m,shouldUseVirtualFocus:h,isDisabled:l,onAction:w||S?.props?.onAction?Ka(S?.props?.onAction,w):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:E}),{hoverProps:ee}=gr({isDisabled:l||!f,onHoverStart(){if(!Vi())t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(a)}}),U=ht(S?.props);delete U.id;let P=op(S?.props);return{optionProps:{...v,...Le(U,R,ee,P),id:E},labelProps:{id:b},descriptionProps:{id:y},isFocused:H,isFocusVisible:H&&t.selectionManager.isFocused&&Vi(),isSelected:c,isDisabled:l,isPressed:D,allowsSelection:G,hasAction:z}}var t9=N(()=>{ep();Bs();RP();pc();pr();bx();Qv();fc();Ho();pT()});var n9=N(()=>{t9()});var r9=N(()=>{QE()});function Ep(e){let t=o9.version.split(".");if(parseInt(t[0],10)>=19)return e;return e?"true":void 0}var o9;var a9=N(()=>{o9=j(ae(),1)});var mT=N(()=>{a9()});function gT(e,t){let{collection:r,onLoadMore:a,scrollOffset:i=1}=e,l=i9.useRef(null),c=mr((u)=>{for(let f of u)if(f.isIntersecting&&a)a()});nt(()=>{if(t.current)l.current=new IntersectionObserver(c,{root:gg(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),l.current.observe(t.current);return()=>{if(l.current)l.current.disconnect()}},[r,t,i])}var i9;var s9=N(()=>{_E();Qu();fr();i9=j(ae(),1)});var l9=N(()=>{s9()});var c9=N(()=>{jv()});var u9=N(()=>{Kv()});var mn,bT,Ks,aQ;var d9=N(()=>{qr();yP();dx();bp();n9();xg();Ya();mT();Sg();l9();fa();c9();ad();u9();np();mn=j(ae(),1),bT=mn.createContext(null),Ks=qi(xp,function(t,r,a){let i=lo(r),l=mn.useContext(bT),{dragAndDropHooks:c,dragState:u,dropState:f}=mn.useContext(bP),h=u&&!(u.isDisabled||u.selectionManager.isDisabled(a.key)),{optionProps:m,labelProps:b,descriptionProps:y,...v}=hT({key:a.key,"aria-label":t?.["aria-label"]},l,i),{hoverProps:S,isHovered:w}=gr({isDisabled:!v.allowsSelection&&!v.hasAction&&!h,onHoverStart:a.props.onHoverStart,onHoverChange:a.props.onHoverChange,onHoverEnd:a.props.onHoverEnd}),{keyboardProps:E}=rd(t),{focusProps:R}=nd(t),D=null;if(u&&c)D=c.useDraggableItem({key:a.key,hasAction:v.hasAction},u);let H=null;if(f&&c)H=c.useDroppableItem({target:{type:"item",key:a.key,dropPosition:"on"}},f,i);let z=u&&u.isDragging(a.key),G=Yt({...t,id:void 0,children:t.children,defaultClassName:"react-aria-ListBoxItem",values:{...v,isHovered:w,selectionMode:l.selectionManager.selectionMode,selectionBehavior:l.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:z,isDropTarget:H?.isDropTarget}});mn.useEffect(()=>{if(!a.textValue)console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.")},[a.textValue]);let ee=t.href?Ot.a:Ot.div,U=ht(t,{global:!0});if(delete U.id,delete U.onClick,t.href&&m.tabIndex==null)m.tabIndex=-1;return mn.default.createElement(ee,{...Le(U,G,m,S,E,R,D?.dragProps,H?.dropProps),ref:i,"data-allows-dragging":!!u||void 0,"data-selected":v.isSelected||void 0,"data-disabled":v.isDisabled||void 0,"data-hovered":w||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-dragging":z||void 0,"data-drop-target":H?.isDropTarget||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode},mn.default.createElement(Kr,{values:[[Cc,{slots:{[Fi]:b,label:b,description:y}}],[Cp,{isSelected:v.isSelected}]]},G.children))}),aQ=qi(lx,function(t,r,a){let i=mn.useContext(bT),{isLoading:l,onLoadMore:c,scrollOffset:u,...f}=t,h=mn.useRef(null),m=mn.useMemo(()=>({onLoadMore:c,collection:i?.collection,sentinelRef:h,scrollOffset:u}),[c,u,i?.collection]);gT(m,h);let b=Yt({...f,id:void 0,children:a.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),y={tabIndex:-1};return mn.default.createElement(mn.default.Fragment,null,mn.default.createElement("div",{style:{position:"relative",width:0,height:0},inert:Ep(!0)},mn.default.createElement("div",{"data-testid":"loadMoreSentinel",ref:h,style:{position:"absolute",height:1,width:1}})),l&&b.children&&mn.default.createElement(mn.default.Fragment,null,mn.default.createElement(Ot.div,{...Le(ht(t,{global:!0}),y),...b,role:"option",ref:r},b.children)))})});function f9(e){return e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer!==void 0}function p9(e,t){let r=hn(e?.[0]),a=t instanceof r.Element?{root:t}:t,i=a?.root??document.body,l=a?.shouldUseInert&&iQ,c=new Set(e),u=new Set,f=(E)=>l&&E instanceof r.HTMLElement?E.inert:E.getAttribute("aria-hidden")==="true",h=(E,R)=>{if(l&&E instanceof r.HTMLElement)E.inert=R;else if(R)E.setAttribute("aria-hidden","true");else if(E.removeAttribute("aria-hidden"),E instanceof r.HTMLElement)E.inert=!1},m=new Set;if(Uo())for(let E of e){let R=E;while(R&&R!==i){let D=R.getRootNode();if("shadowRoot"in D)m.add(D.shadowRoot);R=D.parentNode}}let b=(E)=>{for(let z of E.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))c.add(z);let R=(z)=>{if(u.has(z)||c.has(z)||z.parentElement&&u.has(z.parentElement)&&z.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let G of c)if(bt(z,G))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},D=px(rt(E),E,NodeFilter.SHOW_ELEMENT,{acceptNode:R}),H=R(E);if(H===NodeFilter.FILTER_ACCEPT)y(E);if(H!==NodeFilter.FILTER_REJECT){let z=D.nextNode();while(z!=null)y(z),z=D.nextNode()}},y=(E)=>{let R=Rg.get(E)??0;if(f(E)&&R===0)return;if(R===0)h(E,!0);u.add(E),Rg.set(E,R+1)};if(ya.length)ya[ya.length-1].disconnect();b(i);let v=new MutationObserver((E)=>{for(let R of E){if(R.type!=="childList")continue;if(R.target.isConnected&&![...c,...u].some((D)=>bt(D,R.target))){for(let D of R.addedNodes)if((D instanceof HTMLElement||D instanceof SVGElement)&&f9(D))c.add(D);else if(D instanceof Element)b(D)}if(Uo()){for(let D of m)if(!D.isConnected){v.disconnect();break}}}});v.observe(i,{childList:!0,subtree:!0});let S=new Set;if(Uo())for(let E of m){let R=new MutationObserver((D)=>{for(let H of D){if(H.type!=="childList")continue;if(H.target.isConnected&&![...c,...u].some((z)=>bt(z,H.target))){for(let z of H.addedNodes)if((z instanceof HTMLElement||z instanceof SVGElement)&&f9(z))c.add(z);else if(z instanceof Element)b(z)}if(Uo()){for(let z of m)if(!z.isConnected){v.disconnect();break}}}});R.observe(E,{childList:!0,subtree:!0}),S.add(R)}let w={visibleNodes:c,hiddenNodes:u,observe(){v.observe(i,{childList:!0,subtree:!0})},disconnect(){v.disconnect()}};return ya.push(w),()=>{if(v.disconnect(),Uo())for(let E of S)E.disconnect();for(let E of u){let R=Rg.get(E);if(R==null)continue;if(R===1)h(E,!1),Rg.delete(E);else Rg.set(E,R-1)}if(w===ya[ya.length-1]){if(ya.pop(),ya.length)ya[ya.length-1].observe()}else ya.splice(ya.indexOf(w),1)}}var iQ,Rg,ya;var h9=N(()=>{iT();hr();dn();yv();iQ=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;Rg=new WeakMap,ya=[]});function g9(e){let{ref:t,onInteractOutside:r,isDisabled:a,onInteractOutsideStart:i}=e,l=yx.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),c=mr((f)=>{if(r&&m9(f,t)){if(i)i(f);l.current.isPointerDown=!0}}),u=mr((f)=>{if(r)r(f)});yx.useEffect(()=>{let f=l.current;if(a)return;let h=t.current,m=rt(h);if(typeof PointerEvent<"u"){let b=(y)=>{if(f.isPointerDown&&m9(y,t))u(y);f.isPointerDown=!1};return m.addEventListener("pointerdown",c,!0),m.addEventListener("click",b,!0),()=>{m.removeEventListener("pointerdown",c,!0),m.removeEventListener("click",b,!0)}}},[t,a])}function m9(e,t){if(e.button>0)return!1;let r=Te(e);if(r){let a=r.ownerDocument;if(!a||!bt(a.documentElement,r))return!1;if(r.closest("[data-react-aria-top-layer]"))return!1}if(!t.current)return!1;return!e.composedPath().includes(t.current)}var yx;var b9=N(()=>{dn();hr();Qu();yx=j(ae(),1)});function y9(e,t){let{onClose:r,shouldCloseOnBlur:a,isOpen:i,isDismissable:l=!1,isKeyboardDismissDisabled:c=!1,shouldCloseOnInteractOutside:u}=e,f=vx.useRef(void 0);vx.useEffect(()=>{if(i&&!Gi.includes(t))return Gi.push(t),()=>{let S=Gi.indexOf(t);if(S>=0)Gi.splice(S,1)}},[i,t]);let h=()=>{if(Gi[Gi.length-1]===t&&r)r()},m=(S)=>{let w=Gi[Gi.length-1];if(f.current=w,!u||u(Te(S))){if(w===t)S.stopPropagation()}},b=(S)=>{if(!u||u(Te(S))){if(Gi[Gi.length-1]===t)S.stopPropagation();if(f.current===t)h()}f.current=void 0},y=(S)=>{if(S.key==="Escape"&&!c&&!S.nativeEvent.isComposing)S.stopPropagation(),S.preventDefault(),h()};g9({ref:t,onInteractOutside:l&&i?b:void 0,onInteractOutsideStart:m});let{focusWithinProps:v}=hp({isDisabled:!a,onBlurWithin:(S)=>{if(!S.relatedTarget||PP(S.relatedTarget))return;if(!u||u(S.relatedTarget))r?.()}});return{overlayProps:{onKeyDown:y,...v},underlayProps:{}}}var vx,Gi;var v9=N(()=>{dn();wg();Jv();b9();vx=j(ae(),1),Gi=[]});function S9(e={}){let{isDisabled:t}=e;nt(()=>{if(t)return;if(xx++,xx===1)if(Ga())yT=lQ();else yT=sQ();return()=>{if(xx--,xx===0)yT()}},[t])}function sQ(){let e=window.innerWidth-document.documentElement.clientWidth;return Ka(e>0&&("scrollbarGutter"in document.documentElement.style?$x(document.documentElement,"scrollbarGutter","stable"):$x(document.documentElement,"paddingRight",`${e}px`)),$x(document.documentElement,"overflow","hidden"))}function lQ(){let e=$x(document.documentElement,"overflow","hidden"),t,r=!1,a=(m)=>{let b=Te(m);t=Ki(b)?b:gg(b,!0),r=!1;let y=b.ownerDocument.defaultView.getSelection();if(y&&!y.isCollapsed&&y.containsNode(b,!0))r=!0;if(m.composedPath().some((v)=>v instanceof HTMLInputElement&&v.type==="range"))r=!0;if("selectionStart"in b&&"selectionEnd"in b&&b.selectionStart<b.selectionEnd&&b.ownerDocument.activeElement===b)r=!0},i=document.createElement("style"),l=Yv();if(l)i.nonce=l;i.textContent=`
242
+ @layer {
243
+ * {
244
+ overscroll-behavior: contain;
245
+ }
246
+ }`.trim(),document.head.prepend(i);let c=(m)=>{if(m.touches.length===2||r)return;if(!t||t===document.documentElement||t===document.body){m.preventDefault();return}if(t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth)m.preventDefault()},u=(m)=>{let b=Te(m),y=m.relatedTarget;if(y&&Xu(y))y.focus({preventScroll:!0}),x9(y,Xu(b));else if(!y)b.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},f=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(m){let b=wt(),y=b!=null&&Xu(b);if(f.call(this,{...m,preventScroll:!0}),!m||!m.preventScroll)x9(this,y)};let h=Ka(vT(document,"touchstart",a,{passive:!1,capture:!0}),vT(document,"touchmove",c,{passive:!1,capture:!0}),vT(document,"blur",u,!0));return()=>{e(),h(),i.remove(),HTMLElement.prototype.focus=f}}function $x(e,t,r){let a=e.style[t];return e.style[t]=r,()=>{e.style[t]=a}}function vT(e,t,r,a){return e.addEventListener(t,r,a),()=>{e.removeEventListener(t,r,a)}}function x9(e,t){if(t||!kg)$9(e);else kg.addEventListener("resize",()=>$9(e),{once:!0})}function $9(e){let t=document.scrollingElement||document.documentElement,r=e;while(r&&r!==t){let a=gg(r);if(a!==document.documentElement&&a!==document.body&&a!==r){let i=a.getBoundingClientRect(),l=r.getBoundingClientRect();if(l.top<i.top||l.bottom>i.top+r.clientHeight){let c=i.bottom;if(kg)c=Math.min(c,kg.offsetTop+kg.height);let u=l.top-i.top-((c-i.top)/2-l.height/2);a.scrollTo({top:Math.max(0,Math.min(a.scrollHeight-a.clientHeight,a.scrollTop+u)),behavior:"smooth"})}}r=a.parentElement}}var kg,xx=0,yT;var C9=N(()=>{ep();dn();AE();_E();pa();mg();fr();sg();kg=typeof document<"u"&&window.visualViewport});var xT;var w9=N(()=>{xT={};xT={dismiss:"تجاهل"}});var $T;var E9=N(()=>{$T={};$T={dismiss:"Отхвърляне"}});var ST;var T9=N(()=>{ST={};ST={dismiss:"Odstranit"}});var CT;var R9=N(()=>{CT={};CT={dismiss:"Luk"}});var wT;var k9=N(()=>{wT={};wT={dismiss:"Schließen"}});var ET;var A9=N(()=>{ET={};ET={dismiss:"Απόρριψη"}});var TT;var M9=N(()=>{TT={};TT={dismiss:"Dismiss"}});var RT;var N9=N(()=>{RT={};RT={dismiss:"Descartar"}});var kT;var O9=N(()=>{kT={};kT={dismiss:"Lõpeta"}});var AT;var D9=N(()=>{AT={};AT={dismiss:"Hylkää"}});var MT;var P9=N(()=>{MT={};MT={dismiss:"Rejeter"}});var NT;var L9=N(()=>{NT={};NT={dismiss:"התעלם"}});var OT;var _9=N(()=>{OT={};OT={dismiss:"Odbaci"}});var DT;var I9=N(()=>{DT={};DT={dismiss:"Elutasítás"}});var PT;var B9=N(()=>{PT={};PT={dismiss:"Ignora"}});var LT;var z9=N(()=>{LT={};LT={dismiss:"閉じる"}});var _T;var H9=N(()=>{_T={};_T={dismiss:"무시"}});var IT;var U9=N(()=>{IT={};IT={dismiss:"Atmesti"}});var BT;var F9=N(()=>{BT={};BT={dismiss:"Nerādīt"}});var zT;var V9=N(()=>{zT={};zT={dismiss:"Lukk"}});var HT;var j9=N(()=>{HT={};HT={dismiss:"Negeren"}});var UT;var K9=N(()=>{UT={};UT={dismiss:"Zignoruj"}});var FT;var q9=N(()=>{FT={};FT={dismiss:"Descartar"}});var VT;var G9=N(()=>{VT={};VT={dismiss:"Dispensar"}});var jT;var W9=N(()=>{jT={};jT={dismiss:"Revocare"}});var KT;var Y9=N(()=>{KT={};KT={dismiss:"Пропустить"}});var qT;var J9=N(()=>{qT={};qT={dismiss:"Zrušiť"}});var GT;var X9=N(()=>{GT={};GT={dismiss:"Opusti"}});var WT;var Q9=N(()=>{WT={};WT={dismiss:"Odbaci"}});var YT;var Z9=N(()=>{YT={};YT={dismiss:"Avvisa"}});var JT;var eL=N(()=>{JT={};JT={dismiss:"Kapat"}});var XT;var tL=N(()=>{XT={};XT={dismiss:"Скасувати"}});var QT;var nL=N(()=>{QT={};QT={dismiss:"取消"}});var ZT;var rL=N(()=>{ZT={};ZT={dismiss:"關閉"}});var e3;var oL=N(()=>{w9();E9();T9();R9();k9();A9();M9();N9();O9();D9();P9();L9();_9();I9();B9();z9();H9();U9();F9();V9();j9();K9();q9();G9();W9();Y9();J9();X9();Q9();Z9();eL();tL();nL();rL();e3={};e3={"ar-AE":xT,"bg-BG":$T,"cs-CZ":ST,"da-DK":CT,"de-DE":wT,"el-GR":ET,"en-US":TT,"es-ES":RT,"et-EE":kT,"fi-FI":AT,"fr-FR":MT,"he-IL":NT,"hr-HR":OT,"hu-HU":DT,"it-IT":PT,"ja-JP":LT,"ko-KR":_T,"lt-LT":IT,"lv-LV":BT,"nb-NO":zT,"nl-NL":HT,"pl-PL":UT,"pt-BR":FT,"pt-PT":VT,"ro-RO":jT,"ru-RU":KT,"sk-SK":qT,"sl-SI":GT,"sr-SP":WT,"sv-SE":YT,"tr-TR":JT,"uk-UA":XT,"zh-CN":QT,"zh-TW":ZT}});function cQ(e){return e&&e.__esModule?e.default:e}function n3(e){let{onDismiss:t,...r}=e,a=lD(cQ(e3),"@react-aria/overlays"),i=mc(r,a.format("dismiss")),l=()=>{if(t)t()};return t3.default.createElement(jD,null,t3.default.createElement("button",{...i,tabIndex:-1,onClick:l,style:{width:1,height:1}}))}var t3;var aL=N(()=>{oL();lg();cD();KD();t3=j(ae(),1)});function iL({children:e}){let t=fd.useMemo(()=>({register:()=>{}}),[]);return fd.default.createElement(ug.Provider,{value:t},e)}var fd;var sL=N(()=>{ME();fd=j(ae(),1)});function lL(){return Ag.useContext(uQ)??{}}var Ag,uQ;var cL=N(()=>{Ag=j(ae(),1),uQ=Ag.createContext({})});function r3(e){let t=jr(),{portalContainer:r=t?null:document.body,isExiting:a}=e,[i,l]=Qa.useState(!1),c=Qa.useMemo(()=>({contain:i,setContain:l}),[i,l]),{getContainer:u}=lL();if(!e.portalContainer&&u)r=u();if(!r)return null;let f=e.children;if(!e.disableFocusManagement)f=Qa.default.createElement(OP,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!a},f);return f=Qa.default.createElement(dL.Provider,{value:c},Qa.default.createElement(iL,null,f)),uL.default.createPortal(f,r)}function Sx(){let t=Qa.useContext(dL)?.setContain;nt(()=>{t?.(!0)},[t])}var Qa,uL,dL;var Cx=N(()=>{sL();wg();uc();fr();cL();Qa=j(ae(),1),uL=j(Vr(),1),dL=Qa.default.createContext(null)});var fL=N(()=>{aL();Cx()});function o3(e){let[t,r]=ed(e.isOpen,e.defaultOpen||!1,e.onOpenChange),a=wx.useCallback(()=>{r(!0)},[r]),i=wx.useCallback(()=>{r(!1)},[r]),l=wx.useCallback(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:a,close:i,toggle:l}}var wx;var pL=N(()=>{Iv();wx=j(ae(),1)});var hL=N(()=>{pL()});function Rp(e,t=!0){let[r,a]=Tp.useState(!0),i=r&&t;return nt(()=>{if(i&&e.current&&"getAnimations"in e.current){for(let l of e.current.getAnimations())if(l instanceof CSSTransition)l.cancel()}},[e,i]),gL(e,i,Tp.useCallback(()=>a(!1),[])),i}function kp(e,t){let[r,a]=Tp.useState(t?"open":"closed");switch(r){case"open":if(!t)a("exiting");break;case"closed":case"exiting":if(t)a("open");break}let i=r==="exiting";return gL(e,i,Tp.useCallback(()=>{a((l)=>l==="exiting"?"closed":l)},[])),i}function gL(e,t,r){nt(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){r();return}let a=e.current.getAnimations();if(a.length===0){r();return}let i=!1;return Promise.allSettled(a.map((l)=>l.finished)).then(()=>{if(!i)mL.flushSync(()=>{r()})}),()=>{i=!0}}},[e,t,r])}var mL,Tp;var bL=N(()=>{fr();mL=j(Vr(),1),Tp=j(ae(),1)});var a3=N(()=>{bL()});var Ex,yL;var vL=N(()=>{Ex=j(ae(),1),yL=Ex.createContext({})});var xL;var $L=N(()=>{xL=new WeakMap});function s3(e,t,r){let{id:a,key:i,closeOnSelect:l,shouldCloseOnSelect:c,isVirtualized:u,"aria-haspopup":f,onPressStart:h,onPressUp:m,onPress:b,onPressChange:y,onPressEnd:v,onClick:S,onHoverStart:w,onHoverChange:E,onHoverEnd:R,onKeyDown:D,onKeyUp:H,onFocus:z,onFocusChange:G,onBlur:ee,selectionManager:U=t.selectionManager}=e,P=!!f,re=P&&e["aria-expanded"]==="true",J=e.isDisabled??U.isDisabled(i),ye=e.isSelected??U.isSelected(i),ce=xL.get(t),se=t.collection.getItem(i),_=e.onClose||ce.onClose,W=Gu(),Y=()=>{if(P)return;if(se?.props?.onAction)se.props.onAction();else if(e.onAction)e.onAction(i);if(ce.onAction){let Ie=ce.onAction;Ie(i)}},Z="menuitem";if(!P){if(U.selectionMode==="single")Z="menuitemradio";else if(U.selectionMode==="multiple")Z="menuitemcheckbox"}let pe=da(),V=da(),k=da(),X={id:a,"aria-disabled":J||void 0,role:Z,"aria-label":e["aria-label"],"aria-labelledby":pe,"aria-describedby":[e["aria-describedby"],V,k].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":f,"aria-expanded":e["aria-expanded"]};if(U.selectionMode!=="none"&&!P)X["aria-checked"]=ye;if(u){let Ie=Number(se?.index);X["aria-posinset"]=Number.isNaN(Ie)?void 0:Ie+1,X["aria-setsize"]=Tg(t.collection)}let ve=i3.useRef(!1),$e=(Ie)=>{y?.(Ie),ve.current=Ie},ke=i3.useRef(null),He=(Ie)=>{if(Ie.pointerType!=="keyboard")ke.current={pointerType:Ie.pointerType};if(Ie.pointerType==="mouse"){if(!ve.current)Ie.target.click()}m?.(Ie)},Ee=(Ie)=>{S?.(Ie),Y(),UO(Ie,W,se.props.href,se?.props.routerOptions);let Qr=ke.current?.pointerType==="keyboard"?ke.current?.key==="Enter"||U.selectionMode==="none"||U.isLink(i):U.selectionMode!=="multiple"||U.isLink(i);if(Qr=c??l??Qr,_&&!P&&Qr)_();ke.current=null},{itemProps:Ze,isFocused:fe}=wp({id:a,selectionManager:U,key:i,ref:r,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:ce.shouldUseVirtualFocus}),{pressProps:Oe,isPressed:Rt}=$c({onPressStart:h,onPress:b,onPressUp:He,onPressChange:$e,onPressEnd:v,isDisabled:J}),{hoverProps:he}=gr({isDisabled:J,onHoverStart(Ie){if(!Vi()&&!(re&&f))U.setFocused(!0),U.setFocusedKey(i);w?.(Ie)},onHoverChange:E,onHoverEnd:R}),{keyboardProps:ln}=rd({onKeyDown:(Ie)=>{if(Ie.repeat){Ie.continuePropagation();return}switch(Ie.key){case" ":ke.current={pointerType:"keyboard",key:" "},Te(Ie).click(),ig("keyboard");break;case"Enter":if(ke.current={pointerType:"keyboard",key:"Enter"},Te(Ie).tagName!=="A")Te(Ie).click();ig("keyboard");break;default:if(!P)Ie.continuePropagation();D?.(Ie);break}},onKeyUp:H}),{focusableProps:Dn}=yc({onBlur:ee,onFocus:z,onFocusChange:G},r),Rn=ht(se?.props);delete Rn.id;let tn=op(se?.props);return{menuItemProps:{...X,...Le(Rn,tn,P?{onFocus:Ze.onFocus,"data-collection":Ze["data-collection"],"data-key":Ze["data-key"]}:Ze,Oe,he,ln,Dn,ce.shouldUseVirtualFocus||P?{onMouseDown:(Ie)=>Ie.preventDefault()}:void 0,J?void 0:{onClick:Ee}),tabIndex:Ze.tabIndex!=null&&re&&!ce.shouldUseVirtualFocus?-1:Ze.tabIndex},labelProps:{id:pe},descriptionProps:{id:V},keyboardShortcutProps:{id:k},isFocused:fe,isFocusVisible:fe&&U.isFocused&&Vi()&&!re,isSelected:ye,isPressed:Rt,isDisabled:J}}var i3;var SL=N(()=>{Bs();dn();fc();pc();$L();pr();fp();Qv();Kv();pg();bx();Ho();pT();i3=j(ae(),1)});var CL=N(()=>{SL()});var fo,EL,dQ,fQ,wL,pd;var TL=N(()=>{qr();nT();vL();dx();bp();CL();Sg();xg();Ya();fa();ad();np();fo=j(ae(),1),EL=fo.createContext(null),dQ=fo.createContext(null);fQ=class fQ extends Vo{static{this.type="submenutrigger"}filter(e,t,r){let a=e.getItem(this.firstChildKey);if(a&&r(a.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}};wL=fo.createContext(null),pd=qi(xp,function(t,r,a){[t,r]=on(t,r,wL);let i=Ku(wL)?.id,l=fo.useContext(EL),c=lo(r),u=fo.useContext(dQ),{isVirtualized:f}=fo.useContext($g),{menuItemProps:h,labelProps:m,descriptionProps:b,keyboardShortcutProps:y,...v}=s3({...t,id:i,key:a.key,selectionManager:u,isVirtualized:f},l,c),{hoverProps:S,isHovered:w}=gr({isDisabled:v.isDisabled}),E=Yt({...t,id:void 0,children:a.rendered,defaultClassName:"react-aria-MenuItem",values:{...v,isHovered:w,isFocusVisible:v.isFocusVisible,selectionMode:u.selectionMode,selectionBehavior:u.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),R=t.href?Ot.a:Ot.div,D=ht(t,{global:!0});return delete D.id,delete D.onClick,fo.default.createElement(R,{...Le(D,E,h,S),ref:c,"data-disabled":v.isDisabled||void 0,"data-hovered":w||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-selected":v.isSelected||void 0,"data-selection-mode":u.selectionMode==="none"?void 0:u.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},fo.default.createElement(Kr,{values:[[Cc,{slots:{[Fi]:m,label:m,description:b}}],[yL,y],[Cp,{isSelected:v.isSelected}]]},E.children))})});function l3(e,t){let{role:r="dialog"}=e,a=da();a=e["aria-label"]?void 0:a;let i=Ap.useRef(!1);Ap.useEffect(()=>{if(t.current&&!Zm(t.current)){ma(t.current);let c=setTimeout(()=>{if(wt()===t.current||wt()===document.body){if(i.current=!0,t.current)t.current.blur(),ma(t.current);i.current=!1}},500);return()=>{clearTimeout(c)}}},[t]),Sx();let l=Ap.useRef(!1);return Ap.useEffect(()=>{if(!l.current&&t.current){let c=t.current,u=c.hasAttribute("aria-label"),f=c.hasAttribute("aria-labelledby");if(!u&&!f)console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),l.current=!0}}),{dialogProps:{...ht(e,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:(c)=>{if(i.current)c.stopPropagation()}},titleProps:{id:a}}}var Ap;var RL=N(()=>{Bs();dp();dn();Cx();Ho();Ap=j(ae(),1)});var kL=N(()=>{RL()});var Za,AL,Mp,c3;var u3=N(()=>{Zv();qr();ID();kL();Ya();fa();Za=j(ae(),1),AL=Za.createContext(null),Mp=Za.createContext(null),c3=Za.forwardRef(function(t,r){let a=t["aria-labelledby"];[t,r]=on(t,r,AL);let{dialogProps:i,titleProps:l}=l3({...t,"aria-labelledby":a},r),c=Za.useContext(Mp);if(!i["aria-label"]&&!i["aria-labelledby"])if(t["aria-labelledby"])i["aria-labelledby"]=t["aria-labelledby"];else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');let u=Yt({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:c?.close||(()=>{})}}),f=ht(t,{global:!0});return Za.default.createElement(Ot.section,{...Le(f,u,i),render:t.render,ref:r,slot:t.slot||void 0},Za.default.createElement(Kr,{values:[[_D,{slots:{[Fi]:{},title:{...l,level:2}}}],[id,{slots:{[Fi]:{},close:{onPress:()=>c?.close()}}}]]},u.children))})});var ML=N(()=>{Iv()});function d3(e,t){let{inputElementType:r="input",isDisabled:a=!1,isRequired:i=!1,isReadOnly:l=!1,type:c="text",validationBehavior:u="aria"}=e,[f,h]=ed(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=yc(e,t),b=jE({...e,value:f}),{isInvalid:y,validationErrors:v,validationDetails:S}=b.displayValidation,{labelProps:w,fieldProps:E,descriptionProps:R,errorMessageProps:D}=ZD({...e,isInvalid:y,errorMessage:e.errorMessage||v}),H=ht(e,{labelable:!0}),z={type:c,pattern:e.pattern},[G]=Tx.useState(f);return nP(t,e.defaultValue??G,h),oP(e,b,t),{labelProps:w,inputProps:Le(H,r==="input"?z:void 0,{disabled:a,readOnly:l,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":y||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:f,onChange:(ee)=>h(Te(ee).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(Tx.default.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...E}),descriptionProps:R,errorMessageProps:D,isInvalid:y,validationErrors:v,validationDetails:S}}var Tx;var NL=N(()=>{Bs();dn();pr();eP();fp();rP();aP();ML();JD();Tx=j(ae(),1)});function f3(e,t,r){let{isDisabled:a}=e,i=Nn(),l=Nn(),c=jr(),u=hd.useRef(null),f=hd.useCallback(()=>{u.current=requestAnimationFrame(()=>{if(r.current)r.current.setAttribute("hidden","until-found")}),OL.flushSync(()=>{t.toggle()})},[r,t]);Zu(r,"beforematch",f);let h=hd.useRef(null);return nt(()=>{if(u.current)cancelAnimationFrame(u.current);if(r.current&&!c){let m=r.current;if(h.current==null||typeof m.getAnimations!=="function")if(t.isExpanded)m.removeAttribute("hidden"),m.style.setProperty("--disclosure-panel-width","auto"),m.style.setProperty("--disclosure-panel-height","auto");else m.setAttribute("hidden","until-found"),m.style.setProperty("--disclosure-panel-width","0px"),m.style.setProperty("--disclosure-panel-height","0px");else if(t.isExpanded!==h.current)if(t.isExpanded)m.removeAttribute("hidden"),m.style.setProperty("--disclosure-panel-width",m.scrollWidth+"px"),m.style.setProperty("--disclosure-panel-height",m.scrollHeight+"px"),Promise.all(m.getAnimations().map((b)=>b.finished)).then(()=>{m.style.setProperty("--disclosure-panel-width","auto"),m.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{});else m.style.setProperty("--disclosure-panel-width",m.scrollWidth+"px"),m.style.setProperty("--disclosure-panel-height",m.scrollHeight+"px"),window.getComputedStyle(m).height,m.style.setProperty("--disclosure-panel-width","0px"),m.style.setProperty("--disclosure-panel-height","0px"),Promise.all(m.getAnimations().map((b)=>b.finished)).then(()=>m.setAttribute("hidden","until-found")).catch(()=>{});h.current=t.isExpanded}},[a,r,t.isExpanded,c]),hd.useEffect(()=>()=>{if(u.current)cancelAnimationFrame(u.current)},[]),{buttonProps:{id:i,"aria-expanded":t.isExpanded,"aria-controls":l,onPress:(m)=>{if(!a&&m.pointerType!=="keyboard")t.toggle()},isDisabled:a,onPressStart(m){if(m.pointerType==="keyboard"&&!a)t.toggle()}},panelProps:{id:l,role:"group","aria-labelledby":i,"aria-hidden":!t.isExpanded,hidden:c?!t.isExpanded:void 0}}}var OL,hd;var DL=N(()=>{yE();Ho();uc();fr();OL=j(Vr(),1),hd=j(ae(),1)});var PL=N(()=>{DL()});function p3(e){let[t,r]=ed(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),a=Rx.useCallback(()=>{r(!0)},[r]),i=Rx.useCallback(()=>{r(!1)},[r]),l=Rx.useCallback(()=>{r(!t)},[r,t]);return{isExpanded:t,setExpanded:r,expand:a,collapse:i,toggle:l}}var Rx;var LL=N(()=>{Iv();Rx=j(ae(),1)});var _L=N(()=>{LL()});var br,IL,BL,zL,HL,h3,m3;var UL=N(()=>{Zv();qr();PL();_L();Ya();fa();gv();mp();LE();br=j(ae(),1),IL=br.createContext(null),BL=br.createContext(null),zL=br.createContext(null),HL=br.createContext(null),h3=br.forwardRef(function(t,r){[t,r]=on(t,r,BL);let a=br.useContext(IL),{id:i,...l}=t,c=Nn();i||=c;let u=a?a.expandedKeys.has(i):t.isExpanded,f=p3({...t,isExpanded:u,onExpandedChange(R){if(a)a.toggleKey(i);t.onExpandedChange?.(R)}}),h=br.default.useRef(null),m=t.isDisabled||a?.isDisabled||!1,{buttonProps:b,panelProps:y}=f3({...t,isExpanded:u,isDisabled:m},f,h),{isFocusVisible:v,focusProps:S}=Fo({within:!0}),w=Yt({...t,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:f.isExpanded,isDisabled:m,isFocusVisibleWithin:v,state:f}}),E=ht(l,{global:!0});return br.default.createElement(Kr,{values:[[id,{slots:{[Fi]:{},trigger:b}}],[HL,{panelProps:y,panelRef:h}],[zL,f]]},br.default.createElement(Ot.div,{...Le(E,w,S),ref:r,"data-expanded":f.isExpanded||void 0,"data-disabled":m||void 0,"data-focus-visible-within":v||void 0},w.children))}),m3=br.forwardRef(function(t,r){let{role:a="group"}=t,{panelProps:i,panelRef:l}=br.useContext(HL),{isFocusVisible:c,focusProps:u}=Fo({within:!0}),f=Yt({...t,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:c}}),h=ht(t,{global:!0,labelable:!0});return br.default.createElement(Ot.div,{...Le(h,f,i,u),ref:Ui(r,l),role:a,"data-focus-visible-within":c||void 0},br.default.createElement(Kr,{values:[[id,null]]},t.children))})});function g3(e,t,r){let{overlayProps:a,underlayProps:i}=y9({...e,isOpen:t.isOpen,onClose:t.close},r);return S9({isDisabled:!t.isOpen}),Sx(),FL.useEffect(()=>{if(t.isOpen&&r.current)return p9([r.current],{shouldUseInert:!0})},[t.isOpen,r]),{modalProps:Le(a),underlayProps:i}}var FL;var VL=N(()=>{h9();v9();pr();Cx();C9();FL=j(ae(),1)});var jL=N(()=>{VL()});var KL=N(()=>{mg()});var qL=N(()=>{uc()});function y3(){let e=jr(),[t,r]=kx.useState(()=>e?{width:0,height:0}:b3());return kx.useEffect(()=>{let a=(u)=>{r((f)=>{if(u.width===f.width&&u.height===f.height)return f;return u})},i=()=>{if(po&&po.scale>1)return;a(b3())},l,c=(u)=>{if(po&&po.scale>1)return;if(Xu(Te(u)))l=requestAnimationFrame(()=>{let f=wt();if(!f||!Xu(f))a({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})})};if(a(b3()),Ga())window.addEventListener("blur",c,!0);if(!po)window.addEventListener("resize",i);else po.addEventListener("resize",i);return()=>{if(cancelAnimationFrame(l),Ga())window.removeEventListener("blur",c,!0);if(!po)window.removeEventListener("resize",i);else po.removeEventListener("resize",i)}},[]),t}function b3(){return{width:po?Math.min(po.width*po.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:po?po.height*po.scale:document.documentElement.clientHeight}}var kx,po;var GL=N(()=>{dn();pa();uc();sg();kx=j(ae(),1),po=typeof document<"u"&&window.visualViewport});var WL=N(()=>{GL()});function pQ(e,t){[e,t]=on(e,t,JL);let r=an.useContext(Mp),a=o3(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?a:r;if(i===r){if(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.")}let l=lo(t),c=an.useRef(null),u=kp(l,i.isOpen),f=kp(c,i.isOpen),h=u||f||e.isExiting||!1,m=jr();if(!i.isOpen&&!h||m)return null;return an.default.createElement(hQ,{...e,state:i,isExiting:h,overlayRef:l,modalRef:c})}function hQ({UNSTABLE_portalContainer:e,...t}){let r=t.modalRef,{state:a}=t,{modalProps:i,underlayProps:l}=g3(t,a,r),c=Rp(t.overlayRef)||t.isEntering||!1,u=Yt({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:c,isExiting:t.isExiting,state:a}}),f=y3(),h=void 0,m=void 0;if(typeof document<"u"){let y=Ki(document.body)?document.body:document.scrollingElement||document.documentElement,v=y.getBoundingClientRect().width%1,S=y.getBoundingClientRect().height%1;h=y.scrollWidth-v,m=y.scrollHeight-S}let b={...u.style,"--visual-viewport-width":f.width+"px","--visual-viewport-height":f.height+"px","--page-width":h!==void 0?h+"px":void 0,"--page-height":m!==void 0?m+"px":void 0};return an.default.createElement(r3,{isExiting:t.isExiting,portalContainer:e},an.default.createElement(Ot.div,{...Le(ht(t,{global:!0}),l),...u,style:b,ref:t.overlayRef,"data-entering":c||void 0,"data-exiting":t.isExiting||void 0},an.default.createElement(Kr,{values:[[v3,{modalProps:i,modalRef:r,isExiting:t.isExiting,isDismissable:t.isDismissable}],[Mp,a]]},u.children)))}function YL(e){let{modalProps:t,modalRef:r,isExiting:a,isDismissable:i}=an.useContext(v3),l=an.useContext(Mp),c=an.useMemo(()=>Ui(e.modalRef,r),[e.modalRef,r]),u=lo(c),f=Rp(u),h=Yt({...e,defaultClassName:"react-aria-Modal",values:{isEntering:f,isExiting:a,state:l}});return an.default.createElement(Ot.div,{...Le(ht(e,{global:!0}),t),...h,ref:u,"data-entering":f||void 0,"data-exiting":a||void 0},i&&an.default.createElement(n3,{onDismiss:l.close}),h.children)}var an,JL,v3,x3,Ax;var XL=N(()=>{qr();u3();jL();fL();Ya();KL();fa();gv();hL();a3();qL();np();WL();an=j(ae(),1),JL=an.createContext(null),v3=an.createContext(null),x3=an.forwardRef(function(t,r){if(an.useContext(v3)){if(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0){let w=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),E=Object.keys(t).filter((R)=>w.has(R));console.warn(`This modal is already wrapped in a ModalOverlay, props [${E.join(", ")}] should be placed on the ModalOverlay instead.`)}return an.default.createElement(YL,{...t,modalRef:r},t.children)}let{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,children:h,isEntering:m,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v,...S}=t;return an.default.createElement(Ax,{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,isEntering:m,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v},an.default.createElement(YL,{...S,modalRef:r},h))});Ax=an.forwardRef(pQ)});function Np(e,t,r){if(!e)return"";if(typeof t==="string")t=t.replace(/\s+/g,"");let a=$3.get(e);if(!a)console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");return`${a}-${r}-${t}`}var $3;var Mx=N(()=>{$3=new WeakMap});function S3(e,t,r){let{key:a,isDisabled:i,shouldSelectOnPressUp:l}=e,{selectionManager:c,selectedKey:u}=t,f=a===u,h=i||t.isDisabled||t.selectionManager.isDisabled(a),m=t.collection.getItem(a),{itemProps:b,isPressed:y}=wp({selectionManager:c,key:a,ref:r,isDisabled:h,shouldSelectOnPressUp:l??m?.props.href!=null,linkBehavior:"selection"}),v=Np(t,a,"tab"),S=Np(t,a,"tabpanel"),{tabIndex:w}=b,E=ht(m?.props,{labelable:!0});delete E.id;let R=op(m?.props),{focusableProps:D}=yc({...m?.props,isDisabled:h},r);return{tabProps:Le(E,D,R,b,{id:v,"aria-selected":f,"aria-disabled":h||void 0,"aria-controls":f?S:void 0,tabIndex:h?void 0:w,role:"tab"}),isSelected:f,isDisabled:h,isPressed:y}}var QL=N(()=>{Bs();Mx();pr();fp();fc();bx()});function e_(e,t){let r=t?.isDisabled,[a,i]=ZL.useState(!1);return nt(()=>{if(e?.current&&!r){let l=()=>{if(e.current){let u=ga(e.current,{tabbable:!0});i(!!u.nextNode())}};l();let c=new MutationObserver(l);return c.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{c.disconnect()}}}),r?!1:a}var ZL;var t_=N(()=>{wg();fr();ZL=j(ae(),1)});function C3(e,t,r){let a=e_(r)?void 0:0,i=Np(t,e.id??t?.selectedKey,"tabpanel"),l=mc({...e,id:i,"aria-labelledby":Np(t,t?.selectedKey,"tab")});return{tabPanelProps:Le(l,{tabIndex:a,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}var n_=N(()=>{Mx();pr();t_();lg()});class w3{constructor(e,t,r,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}getKeyLeftOf(e){if(this.flipDirection)return this.getNextKey(e);return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection)return this.getPreviousKey(e);return this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();if(e!=null&&this.isDisabled(e))e=this.getNextKey(e);return e}getLastKey(){let e=this.collection.getLastKey();if(e!=null&&this.isDisabled(e))e=this.getPreviousKey(e);return e}getKeyAbove(e){if(this.tabDirection)return null;return this.getPreviousKey(e)}getKeyBelow(e){if(this.tabDirection)return null;return this.getNextKey(e)}getNextKey(e){let t=e;do if(t=this.collection.getKeyAfter(t),t==null)t=this.collection.getFirstKey();while(t!=null&&this.isDisabled(t));return t}getPreviousKey(e){let t=e;do if(t=this.collection.getKeyBefore(t),t==null)t=this.collection.getLastKey();while(t!=null&&this.isDisabled(t));return t}}var r_=()=>{};function E3(e,t,r){let{orientation:a="horizontal",keyboardActivation:i="automatic"}=e,{collection:l,selectionManager:c,disabledKeys:u}=t,{direction:f}=sp(),h=o_.useMemo(()=>new w3(l,f,a,u),[l,u,a,f]),{collectionProps:m}=jP({ref:r,selectionManager:c,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),b=Nn();$3.set(t,b);let y=mc({...e,id:b});return{tabListProps:{...Le(m,y),role:"tablist","aria-orientation":a,tabIndex:void 0}}}var o_;var a_=N(()=>{pr();Mx();r_();Ho();lg();Pv();KP();o_=j(ae(),1)});var i_=N(()=>{QL();n_();a_()});function mQ({props:e,forwardedRef:t}){let r=Ut.useContext(md),{CollectionRoot:a}=Ut.useContext($g),{orientation:i="horizontal",keyboardActivation:l="automatic"}=Ku(T3),c=lo(t),{tabListProps:u}=E3({...e,orientation:i,keyboardActivation:l},r,c),f=Yt({...e,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:r}}),h=ht(e,{global:!0});return delete h.id,Ut.default.createElement(Ot.div,{...Le(h,f,u),ref:c,"data-orientation":i||void 0},Ut.default.createElement(vP,null,Ut.default.createElement(a,{collection:r.collection,persistedKeys:tT(r.selectionManager.focusedKey)})))}function gQ(e){let t=Ut.useContext(md),{id:r,tabPanelRef:a,isInitiallySelected:i,isExiting:l,...c}=e,{tabPanelProps:u}=C3(e,t,a),{focusProps:f,isFocused:h,isFocusVisible:m}=Fo(),b=t.selectedKey===e.id,y=Rp(a)&&!i,v=Yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:h,isFocusVisible:m,isInert:Ep(!b),isEntering:y,isExiting:l,state:t}}),S=ht(c,{global:!0});delete S.id;let w=b?Le(S,u,f,v):Le(S,v);return Ut.default.createElement(Ot.div,{...w,ref:a,"data-focused":h||void 0,"data-focus-visible":m||void 0,inert:Ep(!b||e.inert),"data-inert":!b?"true":void 0,"data-entering":y||void 0,"data-exiting":l||void 0},Ut.default.createElement(Kr,{values:[[T3,null],[md,null]]},Ut.default.createElement($g.Provider,{value:eT},v.children)))}var Ut,T3,md,R3,s_,k3,A3;var l_=N(()=>{qr();nT();dx();xP();i_();r9();xg();Sg();cp();Ya();mT();fa();a3();mp();ad();np();Ut=j(ae(),1),T3=Ut.createContext(null),md=Ut.createContext(null),R3=Ut.forwardRef(function(t,r){return Ut.useContext(md)?Ut.default.createElement(mQ,{props:t,forwardedRef:r}):Ut.default.createElement(XE,t)});s_=class s_ extends Vo{static{this.type="item"}};k3=qi(s_,(e,t,r)=>{let a=Ut.useContext(md),i=lo(t),{tabProps:l,isSelected:c,isDisabled:u,isPressed:f}=S3({key:r.key,...e},a,i),{focusProps:h,isFocused:m,isFocusVisible:b}=Fo(),{hoverProps:y,isHovered:v}=gr({isDisabled:u,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),S=Yt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:c,isDisabled:u,isFocused:m,isFocusVisible:b,isPressed:f,isHovered:v}}),w=r.props.href?Ot.a:Ot.div,E=ht(e,{global:!0});return delete E.id,delete E.onClick,Ut.default.createElement(w,{...Le(E,S,l,h,y),ref:i,"data-selected":c||void 0,"data-disabled":u||void 0,"data-focused":m||void 0,"data-focus-visible":b||void 0,"data-pressed":f||void 0,"data-hovered":v||void 0},Ut.default.createElement(Cp.Provider,{value:{isSelected:c}},S.children))}),A3=Wa(function(t,r){let a=Ut.useContext(md),i=lo(r),l=a.selectedKey===t.id,[c,u]=Ut.useState(a.selectedKey!=null?l:null);if(c==null&&a.selectedKey!=null)u(l);else if(!l&&c)u(!1);let f=kp(i,l);if(!l&&!t.shouldForceMount&&!f)return null;return Ut.default.createElement(gQ,{...t,tabPanelRef:i,isInitiallySelected:c||!1,isExiting:f})})});var Op,Nx,bQ=(e)=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,...i}=e;return i},M3;var N3=N(()=>{qr();fa();mp();ad();Op=j(ae(),1),Nx=Op.createContext({}),M3=Op.forwardRef(function(t,r){[t,r]=on(t,r,Nx);let{hoverProps:a,isHovered:i}=gr(t),{isFocused:l,isFocusVisible:c,focusProps:u}=Fo({isTextInput:!0,autoFocus:t.autoFocus}),f=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",h=Yt({...t,values:{isHovered:i,isFocused:l,isFocusVisible:c,isDisabled:t.disabled||!1,isInvalid:f},defaultClassName:"react-aria-TextArea"});return Op.default.createElement(Ot.textarea,{...Le(bQ(t),u,a),...h,ref:r,"data-focused":l||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":c||void 0,"data-invalid":f||void 0})})});var c_=N(()=>{NL()});var ei,u_,Mg;var d_=N(()=>{qr();zE();dD();QD();sP();KE();xE();N3();bp();c_();cp();Ya();ei=j(ae(),1),u_=ei.createContext(null),Mg=Wa(function(t,r){[t,r]=on(t,r,u_);let{validationBehavior:a}=Ku(XD)||{},i=t.validationBehavior??a??"native",l=ei.useRef(null);[t,l]=on(t,l,uD);let[c,u]=bv(!t["aria-label"]&&!t["aria-labelledby"]),[f,h]=ei.useState("input"),{labelProps:m,inputProps:b,descriptionProps:y,errorMessageProps:v,...S}=d3({...kO(t),inputElementType:f,label:u,validationBehavior:i},l),w=ei.useCallback((D)=>{if(l.current=D,D)h(D instanceof HTMLTextAreaElement?"textarea":"input")},[l]),E=Yt({...t,values:{isDisabled:t.isDisabled||!1,isInvalid:S.isInvalid,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1},defaultClassName:"react-aria-TextField"}),R=ht(t,{global:!0});return delete R.id,ei.default.createElement(Ot.div,{...R,...E,ref:r,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":S.isInvalid||void 0,"data-readonly":t.isReadOnly||void 0,"data-required":t.isRequired||void 0},ei.default.createElement(Kr,{values:[[Hv,{...m,ref:c}],[ix,{...b,ref:w}],[Nx,{...b,ref:w}],[iP,{role:"presentation",isInvalid:S.isInvalid,isDisabled:t.isDisabled||!1}],[Cc,{slots:{description:y,errorMessage:v}}],[yg,S]]},E.children))})});class Ng{constructor(e){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate}runWithWrapUpdate(e,t){if(this.wrapUpdate)this.wrapUpdate(e,t);else e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,t={}){let r="_"+Math.random().toString(36).slice(2),a={...t,content:e,key:r,timer:t.timeout?new p_(()=>this.close(r),t.timeout):void 0};return this.queue.unshift(a),this.updateVisibleToasts("add"),r}close(e){let t=this.queue.findIndex((r)=>r.key===e);if(t>=0)this.queue[t].onClose?.(),this.queue.splice(t,1);this.updateVisibleToasts("remove")}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let t of this.subscriptions)t()},e)}pauseAll(){for(let e of this.visibleToasts)if(e.timer)e.timer.pause()}resumeAll(){for(let e of this.visibleToasts)if(e.timer)e.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class p_{constructor(e,t){this.startTime=null,this.remaining=t,this.callback=e}reset(e){this.remaining=e,this.resume()}pause(){if(this.timerId==null)return;clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime}resume(){if(this.remaining<=0)return;this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining)}}var f_,yQ;var h_=N(()=>{f_=j(ae(),1),yQ=j(Sp(),1)});var m_=N(()=>{h_()});var g_=()=>{};var ho=N(()=>{Zv();u3();UL();zE();KE();xE();d9();TL();XL();EP();l_();bp();N3();d_();g_();m_()});var Ae;var Wi=N(()=>{ho();Mn();Ae=Ue(Fs,{displayName:"Button",baseClass:"inline-flex items-center justify-center gap-2 rounded-full text-compact leading-4 transition-all duration-200 ease-in-out outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[pending]:opacity-70 data-[pending]:cursor-progress",variants:{variant:{primary:"bg-brand-primary text-fg-inverted hover:bg-neutral-600 hover:shadow-[0_0_5px_0_rgba(0,0,0,0.5)] data-[pressed]:bg-brand-primary data-[pressed]:shadow-none",secondary:"bg-surface-card text-fg border border-border hover:bg-surface-muted hover:border-fg-subtle data-[pressed]:bg-surface-muted",ghost:"bg-transparent text-fg hover:bg-surface-muted data-[pressed]:bg-surface-muted",destructive:"bg-danger text-danger-fg hover:opacity-90 data-[pressed]:opacity-80"},size:{sm:"py-2 px-4",md:"py-3 px-6",lg:"py-4 px-8",prominent:"h-11 px-6 py-0 text-panel-heading font-medium"}},defaultVariants:{variant:"primary",size:"md"}})});var Et=Bi(function($Q){var gd=j(ae());(function(){function e(k){if(k==null)return null;if(typeof k==="function")return k.$$typeof===J?null:k.displayName||k.name||null;if(typeof k==="string")return k;switch(k){case w:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case G:return"Suspense";case ee:return"SuspenseList";case re:return"Activity"}if(typeof k==="object")switch(typeof k.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case S:return"Portal";case H:return k.displayName||"Context";case D:return(k._context.displayName||"Context")+".Consumer";case z:var X=k.render;return k=k.displayName,k||(k=X.displayName||X.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case U:return X=k.displayName||null,X!==null?X:e(k.type)||"Memo";case P:X=k._payload,k=k._init;try{return e(k(X))}catch(ve){}}return null}function t(k){return""+k}function r(k){try{t(k);var X=!1}catch(ke){X=!0}if(X){X=console;var ve=X.error,$e=typeof Symbol==="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ve.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$e),t(k)}}function a(k){if(k===w)return"<>";if(typeof k==="object"&&k!==null&&k.$$typeof===P)return"<...>";try{var X=e(k);return X?"<"+X+">":"<...>"}catch(ve){return"<...>"}}function i(){var k=ye.A;return k===null?null:k.getOwner()}function l(){return Error("react-stack-top-frame")}function c(k){if(ce.call(k,"key")){var X=Object.getOwnPropertyDescriptor(k,"key").get;if(X&&X.isReactWarning)return!1}return k.key!==void 0}function u(k,X){function ve(){W||(W=!0,console.error("%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://react.dev/link/special-props)",X))}ve.isReactWarning=!0,Object.defineProperty(k,"key",{get:ve,configurable:!0})}function f(){var k=e(this.type);return Y[k]||(Y[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function h(k,X,ve,$e,ke,He){var Ee=ve.ref;return k={$$typeof:v,type:k,key:X,props:ve,_owner:$e},(Ee!==void 0?Ee:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:f}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ke}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:He}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function m(k,X,ve,$e,ke,He){var Ee=X.children;if(Ee!==void 0)if($e)if(se(Ee)){for($e=0;$e<Ee.length;$e++)b(Ee[$e]);Object.freeze&&Object.freeze(Ee)}else console.error("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 b(Ee);if(ce.call(X,"key")){Ee=e(k);var Ze=Object.keys(X).filter(function(Oe){return Oe!=="key"});$e=0<Ze.length?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}",V[Ee+$e]||(Ze=0<Ze.length?"{"+Ze.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
247
+ let props = %s;
248
+ <%s {...props} />
249
+ React keys must be passed directly to JSX without using spread:
250
+ let props = %s;
251
+ <%s key={someKey} {...props} />`,$e,Ee,Ze,Ee),V[Ee+$e]=!0)}if(Ee=null,ve!==void 0&&(r(ve),Ee=""+ve),c(X)&&(r(X.key),Ee=""+X.key),"key"in X){ve={};for(var fe in X)fe!=="key"&&(ve[fe]=X[fe])}else ve=X;return Ee&&u(ve,typeof k==="function"?k.displayName||k.name||"Unknown":k),h(k,Ee,ve,i(),ke,He)}function b(k){y(k)?k._store&&(k._store.validated=1):typeof k==="object"&&k!==null&&k.$$typeof===P&&(k._payload.status==="fulfilled"?y(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function y(k){return typeof k==="object"&&k!==null&&k.$$typeof===v}var v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),H=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),ye=gd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,se=Array.isArray,_=console.createTask?console.createTask:function(){return null};gd={react_stack_bottom_frame:function(k){return k()}};var W,Y={},Z=gd.react_stack_bottom_frame.bind(gd,l)(),pe=_(a(l)),V={};$Q.Fragment=w,$Q.jsxDEV=function(k,X,ve,$e){var ke=1e4>ye.recentlyCreatedOwnerStacks++;return m(k,X,ve,$e,ke?Error("react-stack-top-frame"):Z,ke?_(a(k)):pe)}})()});var Dp,SQ,$n=({label:e,description:t,errorMessage:r,placeholder:a,size:i,rootClassName:l,inputClassName:c,...u})=>Dp.jsxDEV(Mg,{...u,className:`flex w-full flex-col gap-3 ${l??""}`,children:[Dp.jsxDEV(gc,{className:"text-panel-heading font-medium text-fg",children:e},void 0,!1,void 0,this),Dp.jsxDEV(SQ,{className:c,placeholder:a,fieldSize:i},void 0,!1,void 0,this),t?Dp.jsxDEV(ji,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Dp.jsxDEV(sd,{className:"text-label text-danger",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var Dx=N(()=>{ho();Mn();Dp=j(Et(),1),SQ=Ue(ld,{displayName:"InputControl",baseClass:"w-full rounded-lg border border-border bg-surface px-4 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-2 data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none",variants:{fieldSize:{sm:"h-8",md:"h-10",lg:"h-12",tall:"h-control-tall"}},defaultVariants:{fieldSize:"md"}})});var Pp,CQ,Px=({label:e,description:t,errorMessage:r,placeholder:a,rows:i,...l})=>Pp.jsxDEV(Mg,{...l,className:"flex w-full flex-col gap-2",children:[Pp.jsxDEV(gc,{className:"text-small font-medium text-fg",children:e},void 0,!1,void 0,this),Pp.jsxDEV(CQ,{placeholder:a,rows:i},void 0,!1,void 0,this),t?Pp.jsxDEV(ji,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Pp.jsxDEV(sd,{className:"text-label text-danger",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var v_=N(()=>{ho();Mn();Pp=j(Et(),1),CQ=Ue(M3,{displayName:"TextAreaControl",baseClass:"min-h-[120px] w-full resize-y rounded-lg border border-border bg-surface px-4 py-3 text-small text-fg outline-none transition-colors duration-200 placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring data-[invalid]:border-danger data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"})});function D3(e){let t=e.trim();return/^(https?:\/\/|mailto:|tel:|\/|#)/i.test(t)?t:null}var P3="Only http(s), mailto, tel, or relative (/, #) links are allowed.";var L3,wQ;var qs=N(()=>{L3=j(ae(),1),wQ=L3.createContext(!1)});var x_;var $_=N(()=>{Ds();qs();x_=j(ae(),1)});var Gs,EQ,Awe;var S_=N(()=>{Ds();qs();Gs=j(ae(),1),EQ=j(Vr(),1),Awe=Gs.createContext(null)});var C_=()=>{};var w_=()=>{};var E_=()=>{};var zwe,TQ;var _3=N(()=>{ho();Mn();qs();zwe=Ue(Fs,{displayName:"SelectTrigger",baseClass:"flex h-control-tall w-full items-center justify-between gap-2.5 rounded-lg border border-border bg-surface px-5 text-small text-fg outline-none transition-colors data-[hovered]:border-fg-subtle data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60 data-[disabled]:pointer-events-none"}),TQ=Ue(Ks,{displayName:"SelectItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var jwe,Kwe;var T_=N(()=>{ho();Mn();qs();jwe=Ue(ld,{displayName:"ComboBoxInput",baseClass:"h-12 w-full rounded-lg border border-border bg-surface pl-4 pr-11 text-small text-fg outline-none transition-colors placeholder:text-fg-muted data-[hovered]:border-fg-subtle data-[focused]:border-brand-green data-[focused]:ring-2 data-[focused]:ring-ring group-data-[invalid]:border-danger group-data-[invalid]:ring-2 group-data-[invalid]:ring-danger data-[disabled]:bg-surface-muted data-[disabled]:opacity-60"}),Kwe=Ue(Ks,{displayName:"ComboBoxItem",baseClass:"flex cursor-pointer select-none items-center rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var I3,Xwe;var R_=N(()=>{ho();Ds();Mn();qs();I3=j(ae(),1),Xwe=Ue(Ks,{displayName:"MultiSelectItem",baseClass:"group flex cursor-pointer select-none items-center gap-2 rounded-md px-3 py-2 text-small text-fg outline-none data-[hovered]:bg-surface-muted data-[focused]:bg-surface-muted data-[selected]:font-medium data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"})});var k_=()=>{};var A_=()=>{};var M_=()=>{};var N_=()=>{};var NQ;var O_=N(()=>{Wi();qs();NQ=j(ae(),1)});var B3=()=>{};var D_=N(()=>{Ds();B3();qs()});var Lx,_x,Ix;var bd=N(()=>{ho();Mn();Lx=Ue(Ax,{displayName:"DialogOverlay",baseClass:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-modal-backdrop backdrop-blur-modal-backdrop data-[entering]:animate-modal-overlay-in data-[exiting]:animate-modal-overlay-out"}),_x=Ue(x3,{displayName:"DialogModal",baseClass:"rounded-lg bg-surface p-5 outline-none shadow-modal-surface data-[entering]:animate-modal-surface-in data-[exiting]:animate-modal-surface-out"}),Ix=c3});var vEe,xEe;var P_=N(()=>{ho();Mn();vEe=Ue(pd,{displayName:"DropdownMenuItem",baseClass:"flex cursor-pointer select-none items-center gap-2.5 rounded-md px-4 py-3 text-small text-fg outline-none data-[focused]:bg-surface-card data-[hovered]:bg-surface-card data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",variants:{destructive:{true:"text-danger data-[focused]:text-danger data-[hovered]:text-danger"}}}),xEe=Ue(oT,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"})});var Bx,wEe;var L_=N(()=>{ho();Mn();Bx=j(ae(),1),wEe=Ue(pd,{displayName:"ContextMenuItem",baseClass:"flex min-h-[34px] cursor-pointer select-none items-center gap-2.5 rounded-[10px] px-3 py-1.5 text-compact text-white outline-none data-[focused]:bg-[#2f2f2f] data-[focused]:font-medium data-[hovered]:bg-[#2f2f2f] data-[hovered]:font-medium data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45",variants:{destructive:{true:"text-[#ffb5b5] data-[focused]:text-[#ffb5b5]"}}})});var z3=()=>{};var NEe;var __=N(()=>{ho();NEe=new Ng({maxVisibleToasts:5})});var LEe,_Ee;var I_=N(()=>{ho();Mn();LEe=Ue(h3,{displayName:"Disclosure"}),_Ee=Ue(m3,{displayName:"DisclosurePanel"})});var B_=()=>{};var UEe,FEe,VEe;var z_=N(()=>{ho();Mn();UEe=Ue(R3,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),FEe=Ue(k3,{displayName:"Tab",baseClass:"cursor-pointer select-none border-b-2 border-transparent px-4 py-3 text-small font-medium text-fg-muted outline-none transition-colors data-[hovered]:text-fg data-[selected]:border-brand-primary data-[selected]:text-fg data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),VEe=Ue(A3,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"})});var H_=N(()=>{Wi()});var U_=()=>{};var DQ,YEe,zx,Hx;var H3=N(()=>{Mn();DQ=Ue("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),YEe=Ue("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),zx=Ue("span",{displayName:"Text",baseClass:"text-fg",variants:{size:{micro:"text-micro",caption:"text-caption",label:"text-label",compact:"text-compact",small:"text-small",callout:"text-callout",body:"text-body",subtitle:"text-subtitle",title:"text-title",headline:"text-headline",display:"text-display"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-medium",bold:"font-medium"},tone:{default:"text-fg",muted:"text-fg-muted",subtle:"text-fg-subtle",inverted:"text-fg-inverted"}},defaultVariants:{size:"body",weight:"regular",tone:"default"}}),Hx=Ue("h2",{displayName:"Heading",baseClass:"font-medium tracking-tight text-fg",variants:{level:{"1":"text-heading1","2":"text-heading2","3":"text-heading3","4":"text-heading4","5":"text-heading5"}},defaultVariants:{level:"2"}})});var F_=N(()=>{z3()});var V_;var j_=N(()=>{Mn();V_=Ue("div",{displayName:"Card",baseClass:"relative rounded-lg bg-surface-card",variants:{variant:{plain:"",outlined:"border border-border",elevated:"shadow-md"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"plain",padding:"md"}})});var oTe;var K_=N(()=>{Mn();oTe=Ue("section",{displayName:"Section",baseClass:"w-full",variants:{padding:{none:"py-0",sm:"py-4",md:"py-6 sm:py-8",lg:"py-8 sm:py-12",xl:"py-12 sm:py-16"}},defaultVariants:{padding:"md"}})});var sTe;var q_=N(()=>{Mn();sTe=Ue("div",{displayName:"PageContainer",baseClass:"w-full",variants:{size:{sm:"max-w-screen-sm mx-auto",md:"max-w-screen-md mx-auto",lg:"max-w-screen-lg mx-auto",xl:"max-w-screen-xl ml-0 mr-0 min-[1200px]:max-w-full","2xl":"max-w-screen-2xl mx-auto min-[1600px]:max-w-full min-[1600px]:mx-0",full:"max-w-full"}}})});var G_,uTe,dTe,fTe;var W_=N(()=>{Mn();G_=j(ae(),1),uTe=Ue("div",{displayName:"AppShell",baseClass:"grid h-screen w-full overflow-hidden bg-surface grid-rows-[100%] grid-cols-[1fr] md:grid-cols-[auto_1fr]"}),dTe=Ue("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),fTe=Ue("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"})});var Y_,PQ,LQ,_Q,IQ=(e)=>Y_.jsxDEV(_Q,{...e},void 0,!1,void 0,this),BQ,zQ,gTe,bTe,Pg;var J_=N(()=>{ho();Mn();Y_=j(Et(),1),PQ=Ue("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),LQ=Ue("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),_Q=Ue("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),BQ=Ue("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),zQ=Ue("a",{displayName:"Topbar.NavLink",baseClass:"inline-flex items-center rounded-sm px-[13px] py-[6px] text-compact leading-4 whitespace-nowrap text-fg no-underline transition-colors hover:bg-surface-muted hover:text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring data-[active]:bg-surface-muted data-[active]:text-fg",variants:{active:{true:"",false:""}},variantsAsDataAttrs:["active"]}),gTe=Ue(Ks,{displayName:"WorkspaceSwitcher.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[selected]:font-medium"}),bTe=Ue(pd,{displayName:"UserMenu.Item",baseClass:"flex cursor-pointer select-none items-center rounded-sm px-3 py-2 text-small text-fg outline-none data-[focused]:bg-surface-muted data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"}),Pg=Object.assign(PQ,{Brand:LQ,Nav:IQ,NavLink:zQ,Actions:BQ})});var HQ,xTe;var X_=N(()=>{Mn();HQ=j(ae(),1),xTe=Ue("header",{displayName:"PersistentPageShell.Header",baseClass:"flex w-full flex-col gap-6 bg-surface",variants:{sticky:{true:"sticky top-0 z-[1]",false:""}},defaultVariants:{sticky:!1}})});var Q_=()=>{};var UQ;var Z_=N(()=>{Wi();H3();UQ=j(ae(),1)});var U3;var F3=N(()=>{U3=j(ae(),1)});var eI=()=>{};var tI=N(()=>{F3()});var Lp,nI,rI=(e)=>Lp.jsxDEV("svg",{...nI,...e,children:[Lp.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),Lp.jsxDEV("path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),oI=(e)=>Lp.jsxDEV("svg",{...nI,...e,children:Lp.jsxDEV("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"},void 0,!1,void 0,this)},void 0,!1,void 0,this);var Ux=N(()=>{Lp=j(Et(),1),nI={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0}});var aI=()=>{};var V3;var j3=N(()=>{Ux();V3=j(ae(),1)});var FQ;var iI=N(()=>{j3();FQ=j(ae(),1)});var sI;var lI=N(()=>{Ux();sI=j(ae(),1)});var cI=()=>{};var uI;var dI=N(()=>{Wi();bd();uI=j(ae(),1)});var fI;var pI=N(()=>{Wi();bd();fI=j(ae(),1)});var VQ;var hI=N(()=>{Wi();bd();VQ=j(ae(),1)});var mI;var gI=N(()=>{Wi();bd();Dx();mI=j(ae(),1)});var jQ;var bI=N(()=>{Wi();bd();Dx();_3();jQ=j(ae(),1)});var u3e,d3e;var yI=N(()=>{Mn();u3e=Ue("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"}),d3e=Ue("span",{displayName:"DeliveryStatusPill",baseClass:"inline-flex min-h-5 items-center rounded-full border border-white/30 px-3"})});var Yi=N(()=>{Mn();Wi();Dx();v_();$_();S_();qs();C_();w_();E_();_3();T_();R_();k_();A_();M_();N_();O_();B3();D_();bd();P_();L_();z3();__();I_();B_();z_();H_();U_();H3();F_();j_();K_();q_();W_();J_();X_();Q_();Z_();F3();eI();tI();Ux();aI();iI();j3();lI();cI();dI();pI();hI();gI();bI();yI()});function Vx(e){try{let t=String(e).split(".")[1];if(!t)return!1;let r=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof r.exp==="number"&&Date.now()>=r.exp*1000}catch{return!1}}function vI(){try{let e=localStorage.getItem(K3);if(e)return JSON.parse(e)}catch{}return{baseUrl:"http://localhost:8787",token:"",tenant:"main"}}function xI(e){localStorage.setItem(K3,JSON.stringify(e))}function $I(){try{localStorage.removeItem(K3)}catch{}}class q3{cfg;onExpired;constructor(e,t){this.cfg=e;this.onExpired=t}setConfig(e){this.cfg=e}base(){return this.cfg.baseUrl.replace(/\/+$/,"")}async call(e,t){if(this.onExpired&&this.cfg.token&&Vx(this.cfg.token))return this.onExpired(),new Promise(()=>{});let r=await fetch(`${this.base()}/rpc/${e}`,{method:"POST",headers:{"content-type":"application/json","x-pramen-tenant":this.cfg.tenant||"main",...this.cfg.token?{authorization:`Bearer ${this.cfg.token}`}:{}},body:JSON.stringify(t??{})}),a;try{a=await r.json()}catch{throw new _p(`non-JSON response (HTTP ${r.status})`,"bad_response",r.status)}if(a.ok!==!0){let i=a.error??`request failed (HTTP ${r.status})`,l=r.status===403?" — check your token has an editor/reviewer role":"";throw new _p(i+l,a.code??"error",r.status)}return a.result}async put(e,t,r){let a=e.startsWith("http")?e:`${this.base()}${e}`,i=await fetch(a,{method:"PUT",headers:{"content-type":r},body:t});if(!i.ok)throw new _p(`upload failed (HTTP ${i.status})`,"upload_failed",i.status)}resolve(e){return e.startsWith("http")?e:`${this.base()}${e}`}listBlockTypes=()=>this.call("listBlockTypes");listContentTypes=()=>this.call("listContentTypes");getContentType=(e)=>this.call("getContentType",{id:e});listPages=()=>this.call("listPages");getPagePreview=(e,t)=>this.call("getPage",{slug:e,locale:t,preview:!0});listPageAudit=(e)=>this.call("listPageAudit",{pageId:e});listMedia=(e=50,t=0)=>this.call("listMedia",{limit:e,offset:t});getMedia=(e)=>this.call("getMedia",{id:e});updateMedia=(e,t)=>this.call("updateMedia",{id:e,alt:t});deleteMedia=(e)=>this.call("deleteMedia",{id:e});async uploadMedia(e){let t=e.type||"application/octet-stream",r=await this.call("signMediaUpload",{contentType:t,filename:e.name});return await this.put(r.url,await e.arrayBuffer(),t),this.call("createMedia",{ref:r.ref,alt:e.name})}}var _p,K3="pramen.cmsEditor";var G3=N(()=>{_p=class _p extends Error{code;status;constructor(e,t,r){super(e);this.code=t;this.status=r;this.name="ApiError"}}});function W3(){$I(),location.replace(Lg)}function kr(){let e=jn.use(SI);if(!e)throw Error("useApp must be used within <AppProvider>");return e}function CI({children:e}){let[t,r]=jn.useState(vI()),[a,i]=jn.useState(null),[l,c]=jn.useState([]),[u,f]=jn.useState(""),h=Boolean(t.baseUrl&&t.token)&&!Vx(t.token),m=jn.useMemo(()=>new q3(t,Lg?W3:void 0),[t]),b=jn.useRef(null),y=jn.useCallback((w)=>{b.current=w},[]),v=jn.useCallback(()=>b.current?.()??!0,[]);if(jn.useEffect(()=>{if(!Lg)return;let w=()=>{if(!t.token||Vx(t.token))W3()};w();let E=()=>{if(!document.hidden)w()},R=window.setInterval(w,30000);return window.addEventListener("visibilitychange",E),window.addEventListener("focus",w),()=>{window.clearInterval(R),window.removeEventListener("visibilitychange",E),window.removeEventListener("focus",w)}},[t.token]),jn.useEffect(()=>{if(!h)return;m.call("me").then(i).catch(()=>i({})),m.call("listCollections").then(c).catch(()=>c([]))},[m,h]),!h)return Lg?null:mo.jsxDEV(KQ,{cfg:t,onSave:(w)=>{xI(w),r(w)}},void 0,!1,void 0,this);let S={api:m,cfg:t,me:a,isAdmin:(a?.roles??[]).includes("admin"),collections:l,error:u,setError:f,confirmNavigation:v,setNavGuard:y,reconfigure:()=>{if(Lg){W3();return}i(null),f(""),r({...t,token:""})}};return mo.jsxDEV(SI,{value:S,children:e},void 0,!1,void 0,this)}function KQ({cfg:e,onSave:t}){let[r,a]=jn.useState(e);return mo.jsxDEV("div",{className:"mx-auto mt-[14vh] w-full max-w-[520px] px-6",children:mo.jsxDEV("div",{className:"rounded-panel border border-border bg-surface-card px-10 py-8 shadow-[0_24px_60px_rgba(30,20,10,0.08)]",children:[mo.jsxDEV("h1",{className:"mb-4 text-display text-fg",children:["pramen ",mo.jsxDEV("span",{className:"text-fg-subtle",children:"· cms editor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),mo.jsxDEV("p",{className:"mb-6 text-sm text-fg-muted",children:["Point at your Worker and paste an editor/reviewer JWT. CORS must allow this origin (",mo.jsxDEV("code",{children:"CORS_ORIGINS"},void 0,!1,void 0,this),")."]},void 0,!0,void 0,this),mo.jsxDEV("div",{className:"flex flex-col gap-4",children:[mo.jsxDEV($n,{label:"Worker base URL",value:r.baseUrl,onChange:(i)=>a({...r,baseUrl:i}),placeholder:"https://your-worker.workers.dev"},void 0,!1,void 0,this),mo.jsxDEV($n,{label:"Tenant",value:r.tenant,onChange:(i)=>a({...r,tenant:i}),placeholder:"main"},void 0,!1,void 0,this),mo.jsxDEV($n,{label:"Bearer token (editor or reviewer)",value:r.token,onChange:(i)=>a({...r,token:i}),placeholder:"eyJ…"},void 0,!1,void 0,this),mo.jsxDEV(Ae,{className:"mt-2 w-full",onPress:()=>t(r),isDisabled:!r.baseUrl||!r.token,children:"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var jn,mo,Lg,SI;var Ji=N(()=>{Yi();G3();jn=j(ae(),1),mo=j(Et(),1),Lg=typeof window<"u"&&!new URLSearchParams(window.location.search).has("setup")?window.PRAMEN_CMS_EDITOR?.signInUrl:void 0;SI=jn.createContext(null)});function Ar(e){this.content=e}var J3;var EI=N(()=>{Ar.prototype={constructor:Ar,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,r){var a=r&&r!=e?this.remove(r):this,i=a.find(e),l=a.content.slice();if(i==-1)l.push(r||e,t);else if(l[i+1]=t,r)l[i]=r;return new Ar(l)},remove:function(e){var t=this.find(e);if(t==-1)return this;var r=this.content.slice();return r.splice(t,2),new Ar(r)},addToStart:function(e,t){return new Ar([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var r=this.remove(e).content.slice();return r.push(e,t),new Ar(r)},addBefore:function(e,t,r){var a=this.remove(t),i=a.content.slice(),l=a.find(e);return i.splice(l==-1?i.length:l,0,t,r),new Ar(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){if(e=Ar.from(e),!e.size)return this;return new Ar(e.content.concat(this.subtract(e).content))},append:function(e){if(e=Ar.from(e),!e.size)return this;return new Ar(this.subtract(e).content.concat(e.content))},subtract:function(e){var t=this;e=Ar.from(e);for(var r=0;r<e.content.length;r+=2)t=t.remove(e.content[r]);return t},toObject:function(){var e={};return this.forEach(function(t,r){e[t]=r}),e},get size(){return this.content.length>>1}};Ar.from=function(e){if(e instanceof Ar)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new Ar(t)};J3=Ar});function LI(e,t,r){for(let a=0;;a++){if(a==e.childCount||a==t.childCount)return e.childCount==t.childCount?null:r;let i=e.child(a),l=t.child(a);if(i==l){r+=i.nodeSize;continue}if(!i.sameMarkup(l))return r;if(i.isText&&i.text!=l.text){let c=i.text,u=l.text,f=0;for(;c[f]==u[f];f++)r++;if(f&&f<c.length&&f<u.length&&BI(c.charCodeAt(f-1))&&II(c.charCodeAt(f)))r--;return r}if(i.content.size||l.content.size){let c=LI(i.content,l.content,r+1);if(c!=null)return c}r+=i.nodeSize}}function _I(e,t,r,a){for(let i=e.childCount,l=t.childCount;;){if(i==0||l==0)return i==l?null:{a:r,b:a};let c=e.child(--i),u=t.child(--l),f=c.nodeSize;if(c==u){r-=f,a-=f;continue}if(!c.sameMarkup(u))return{a:r,b:a};if(c.isText&&c.text!=u.text){let h=c.text,m=u.text,b=h.length,y=m.length;while(b>0&&y>0&&h[b-1]==m[y-1])b--,y--,r--,a--;if(b&&y&&b<h.length&&BI(h.charCodeAt(b-1))&&II(h.charCodeAt(b)))r++,a++;return{a:r,b:a}}if(c.content.size||u.content.size){let h=_I(c.content,u.content,r-1,a-1);if(h)return h}r-=f,a-=f}}function II(e){return e>=56320&&e<57344}function BI(e){return e>=55296&&e<56320}class le{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,a=0,i){for(let l=0,c=0;c<t;l++){let u=this.content[l],f=c+u.nodeSize;if(f>e&&r(u,a+c,i||null,l)!==!1&&u.content.size){let h=c+1;u.nodesBetween(Math.max(0,e-h),Math.min(u.content.size,t-h),r,a+h)}c=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,a){let i="",l=!0;return this.nodesBetween(e,t,(c,u)=>{let f=c.isText?c.text.slice(Math.max(e,u)-u,t-u):!c.isLeaf?"":a?typeof a==="function"?a(c):a:c.type.spec.leafText?c.type.spec.leafText(c):"";if(c.isBlock&&(c.isLeaf&&f||c.isTextblock)&&r)if(l)l=!1;else i+=r;i+=f},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;if(t.isText&&t.sameMarkup(r))a[a.length-1]=t.withText(t.text+r.text),i=1;for(;i<e.content.length;i++)a.push(e.content[i]);return new le(a,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],a=0;if(t>e)for(let i=0,l=0;l<t;i++){let c=this.content[i],u=l+c.nodeSize;if(u>e){if(l<e||u>t)if(c.isText)c=c.cut(Math.max(0,e-l),Math.min(c.text.length,t-l));else c=c.cut(Math.max(0,e-l-1),Math.min(c.content.size,t-l-1));r.push(c),a+=c.nodeSize}l=u}return new le(r,a)}cutByIndex(e,t){if(e==t)return le.empty;if(e==0&&t==this.content.length)return this;return new le(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let a=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return a[e]=t,new le(a,i)}addToStart(e){return new le([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new le(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let a=this.content[t];e(a,r,t),r+=a.nodeSize}}findDiffStart(e,t=0){return LI(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return _I(this,e,t,r)}findIndex(e){if(e==0)return Kx(0,e);if(e==this.size)return Kx(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let a=this.child(t),i=r+a.nodeSize;if(i>=e){if(i==e)return Kx(t+1,i);return Kx(t,r)}r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e)=>e.toJSON()):null}static fromJSON(e,t){if(!t)return le.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return le.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return le.empty;let t,r=0;for(let a=0;a<e.length;a++){let i=e[a];if(r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)){if(!t)t=e.slice(0,a);t[t.length-1]=i.withText(t[t.length-1].text+i.text)}else if(t)t.push(i)}return new le(t||e,r)}static from(e){if(!e)return le.empty;if(e instanceof le)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new le([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}function Kx(e,t){return X3.index=e,X3.offset=t,X3}function Wx(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let r=Array.isArray(e);if(Array.isArray(t)!=r)return!1;if(r){if(e.length!=t.length)return!1;for(let a=0;a<e.length;a++)if(!Wx(e[a],t[a]))return!1}else{for(let a in e)if(!(a in t)||!Wx(e[a],t[a]))return!1;for(let a in t)if(!(a in e))return!1}return!0}class Pt{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type)){if(!t)t=e.slice(0,a)}else if(i.type.excludes(this.type))return e;else{if(!r&&i.type.rank>this.type.rank){if(!t)t=e.slice(0,a);t.push(this),r=!0}if(t)t.push(i)}}if(!t)t=e.slice();if(!r)t.push(this);return t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Wx(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw RangeError(`There is no mark type ${t.type} in this schema`);let a=r.create(t.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Pt.none;if(e instanceof Pt)return[e];let t=e.slice();return t.sort((r,a)=>r.type.rank-a.type.rank),t}}class Se{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=HI(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new Se(r,this.openStart,this.openEnd)}removeBetween(e,t){return new Se(zI(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};if(this.openStart>0)e.openStart=this.openStart;if(this.openEnd>0)e.openEnd=this.openEnd;return e}static fromJSON(e,t){if(!t)return Se.empty;let r=t.openStart||0,a=t.openEnd||0;if(typeof r!="number"||typeof a!="number")throw RangeError("Invalid input for Slice.fromJSON");return new Se(le.fromJSON(e,t.content),r,a)}static maxOpen(e,t=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)a++;return new Se(e,r,a)}}function zI(e,t,r){let{index:a,offset:i}=e.findIndex(t),l=e.maybeChild(a),{index:c,offset:u}=e.findIndex(r);if(i==t||l.isText){if(u!=r&&!e.child(c).isText)throw RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(a!=c)throw RangeError("Removing non-flat range");return e.replaceChild(a,l.copy(zI(l.content,t-i-1,r-i-1)))}function HI(e,t,r,a,i,l){let{index:c,offset:u}=e.findIndex(t),f=e.maybeChild(c);if(u==t||f.isText){if(l&&a<=0&&i<=0&&!l.canReplace(c,c,r))return null;return e.cut(0,t).append(r).append(e.cut(t))}let h=HI(f.content,t-u-1,r,c==0?a-1:0,c==e.childCount-1?i-1:0,f);return h&&e.replaceChild(c,f.copy(h))}function qQ(e,t,r){if(r.openStart>e.depth)throw new xd("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new xd("Inconsistent open depths");return UI(e,t,r,0)}function UI(e,t,r,a){let i=e.index(a),l=e.node(a);if(i==t.index(a)&&a<e.depth-r.openStart){let c=UI(e,t,r,a+1);return l.copy(l.content.replaceChild(i,c))}else if(!r.content.size)return vd(l,Yx(e,t,a));else if(!r.openStart&&!r.openEnd&&e.depth==a&&t.depth==a){let c=e.parent,u=c.content;return vd(c,u.cut(0,e.parentOffset).append(r.content).append(u.cut(t.parentOffset)))}else{let{start:c,end:u}=GQ(r,e);return vd(l,VI(e,c,u,t,a))}}function FI(e,t){if(!t.type.compatibleContent(e.type))throw new xd("Cannot join "+t.type.name+" onto "+e.type.name)}function Q3(e,t,r){let a=e.node(r);return FI(a,t.node(r)),a}function yd(e,t){let r=t.length-1;if(r>=0&&e.isText&&e.sameMarkup(t[r]))t[r]=e.withText(t[r].text+e.text);else t.push(e)}function Ig(e,t,r,a){let i=(t||e).node(r),l=0,c=t?t.index(r):i.childCount;if(e){if(l=e.index(r),e.depth>r)l++;else if(e.textOffset)yd(e.nodeAfter,a),l++}for(let u=l;u<c;u++)yd(i.child(u),a);if(t&&t.depth==r&&t.textOffset)yd(t.nodeBefore,a)}function vd(e,t){if(!e.type.validContent(t))throw new xd("Invalid content for node "+e.type.name);return e.copy(t)}function VI(e,t,r,a,i){let l=e.depth>i&&Q3(e,t,i+1),c=a.depth>i&&Q3(r,a,i+1),u=[];if(Ig(null,e,i,u),l&&c&&t.index(i)==r.index(i))FI(l,c),yd(vd(l,VI(e,t,r,a,i+1)),u);else{if(l)yd(vd(l,Yx(e,t,i+1)),u);if(Ig(t,r,i,u),c)yd(vd(c,Yx(r,a,i+1)),u)}return Ig(a,null,i,u),new le(u)}function Yx(e,t,r){let a=[];if(Ig(null,e,r,a),e.depth>r){let i=Q3(e,t,r+1);yd(vd(i,Yx(e,t,r+1)),a)}return Ig(t,null,r,a),new le(a)}function GQ(e,t){let r=t.depth-e.openStart,i=t.node(r).copy(e.content);for(let l=r-1;l>=0;l--)i=t.node(l).copy(le.from(i));return{start:i.resolveNoCache(e.openStart+r),end:i.resolveNoCache(i.content.size-e.openEnd-r)}}class zg{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){if(e==null)return this.depth;if(e<0)return this.depth+e;return e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(t);return r?e.child(t).cut(r):a}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];if(t)return this.parent.child(e).cut(0,t);return e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],a=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Pt.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),a=e.maybeChild(t);if(!r){let c=r;r=a,a=c}let i=r.marks;for(var l=0;l<i.length;l++)if(i[l].type.spec.inclusive===!1&&(!a||!i[l].isInSet(a.marks)))i=i[l--].removeFromSet(i);return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)if(r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks)))r=r[i--].removeFromSet(r);return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Ip(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let r=[],a=0,i=t;for(let l=e;;){let{index:c,offset:u}=l.content.findIndex(i),f=i-u;if(r.push(l,c,a+u),!f)break;if(l=l.child(c),l.isText)break;i=f-1,a+=u+1}return new zg(t,r,i)}static resolveCached(e,t){let r=TI.get(e);if(r)for(let i=0;i<r.elts.length;i++){let l=r.elts[i];if(l.pos==t)return l}else TI.set(e,r=new jI);let a=r.elts[r.i]=zg.resolve(e,t);return r.i=(r.i+1)%WQ,a}}class jI{constructor(){this.elts=[],this.i=0}}class Ip{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}class Wr{constructor(e,t,r,a=Pt.none){this.type=e,this.attrs=t,this.marks=a,this.content=r||le.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,a=0){this.content.nodesBetween(e,t,r,a,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,a){return this.content.textBetween(e,t,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Wx(this.attrs,t||e.defaultAttrs||YQ)&&Pt.sameSet(this.marks,r||Pt.none)}copy(e=null){if(e==this.content)return this;return new Wr(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){if(e==0&&t==this.content.size)return this;return this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return Se.empty;let a=this.resolve(e),i=this.resolve(t),l=r?0:a.sharedDepth(t),c=a.start(l),f=a.node(l).content.cut(a.pos-c,i.pos-c);return new Se(f,a.depth-l,i.depth-l)}replace(e,t,r){return qQ(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:a}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(a==e||t.isText)return t;e-=a+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let a=this.content.child(t-1);return{node:a,index:t-1,offset:r-a.nodeSize}}resolve(e){return zg.resolveCached(this,e)}resolveNoCache(e){return zg.resolve(this,e)}rangeHasMark(e,t,r){let a=!1;if(t>e)this.nodesBetween(e,t,(i)=>{if(r.isInSet(i.marks))a=!0;return!a});return a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;if(this.content.size)e+="("+this.content.toStringInner()+")";return KI(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=le.empty,a=0,i=r.childCount){let l=this.contentMatchAt(e).matchFragment(r,a,i),c=l&&l.matchFragment(this.content,t);if(!c||!c.validEnd)return!1;for(let u=a;u<i;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,t,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),l=i&&i.matchFragment(this.content,t);return l?l.validEnd:!1}canAppend(e){if(e.content.size)return this.canReplace(this.childCount,this.childCount,e.content);else return this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Pt.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Pt.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t)=>t.type.name)}`);this.content.forEach((t)=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}if(this.content.size)e.content=this.content.toJSON();if(this.marks.length)e.marks=this.marks.map((t)=>t.toJSON());return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let r=void 0;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw RangeError("Invalid text node in JSON");return e.text(t.text,r)}let a=le.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,a,r);return i.type.checkAttrs(i.attrs),i}}function KI(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class $d{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new qI(e,t);if(r.next==null)return $d.empty;let a=GI(r);if(r.next)r.err("Unexpected trailing text");let i=nZ(tZ(a));return rZ(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let a=this;for(let i=t;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let a=[this];function i(l,c){let u=l.matchFragment(e,r);if(u&&(!t||u.validEnd))return le.from(c.map((f)=>f.createAndFill()));for(let f=0;f<l.next.length;f++){let{type:h,next:m}=l.next[f];if(!(h.isText||h.hasRequiredAttrs())&&a.indexOf(m)==-1){a.push(m);let b=i(m,c.concat(h));if(b)return b}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];while(r.length){let a=r.shift(),i=a.match;if(i.matchType(e)){let l=[];for(let c=a;c.type;c=c.via)l.push(c.type);return l.reverse()}for(let l=0;l<i.next.length;l++){let{type:c,next:u}=i.next[l];if(!c.isLeaf&&!c.hasRequiredAttrs()&&!(c.name in t)&&(!a.type||u.validEnd))r.push({match:c.contentMatch,type:c,via:a}),t[c.name]=!0}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let a=0;a<r.next.length;a++)if(e.indexOf(r.next[a].next)==-1)t(r.next[a].next)}return t(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let l=0;l<r.next.length;l++)i+=(l?", ":"")+r.next[l].type.name+"->"+e.indexOf(r.next[l].next);return i}).join(`
252
+ `)}}class qI{constructor(e,t){if(this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]=="")this.tokens.pop();if(this.tokens[0]=="")this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function GI(e){let t=[];do t.push(JQ(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function JQ(e){let t=[];do t.push(XQ(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function XQ(e){let t=eZ(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=QQ(e,t);else break;return t}function RI(e){if(/\D/.test(e.next))e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function QQ(e,t){let r=RI(e),a=r;if(e.eat(","))if(e.next!="}")a=RI(e);else a=-1;if(!e.eat("}"))e.err("Unclosed braced range");return{type:"range",min:r,max:a,expr:t}}function ZQ(e,t){let r=e.nodeTypes,a=r[t];if(a)return[a];let i=[];for(let l in r){let c=r[l];if(c.isInGroup(t))i.push(c)}if(i.length==0)e.err("No node type or group '"+t+"' found");return i}function eZ(e){if(e.eat("(")){let t=GI(e);if(!e.eat(")"))e.err("Missing closing paren");return t}else if(!/\W/.test(e.next)){let t=ZQ(e,e.next).map((r)=>{if(e.inline==null)e.inline=r.isInline;else if(e.inline!=r.isInline)e.err("Mixing inline and block content");return{type:"name",value:r}});return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}else e.err("Unexpected token '"+e.next+"'")}function tZ(e){let t=[[]];return i(l(e,0),r()),t;function r(){return t.push([])-1}function a(c,u,f){let h={term:f,to:u};return t[c].push(h),h}function i(c,u){c.forEach((f)=>f.to=u)}function l(c,u){if(c.type=="choice")return c.exprs.reduce((f,h)=>f.concat(l(h,u)),[]);else if(c.type=="seq")for(let f=0;;f++){let h=l(c.exprs[f],u);if(f==c.exprs.length-1)return h;i(h,u=r())}else if(c.type=="star"){let f=r();return a(u,f),i(l(c.expr,f),f),[a(f)]}else if(c.type=="plus"){let f=r();return i(l(c.expr,u),f),i(l(c.expr,f),f),[a(f)]}else if(c.type=="opt")return[a(u)].concat(l(c.expr,u));else if(c.type=="range"){let f=u;for(let h=0;h<c.min;h++){let m=r();i(l(c.expr,f),m),f=m}if(c.max==-1)i(l(c.expr,f),f);else for(let h=c.min;h<c.max;h++){let m=r();a(f,m),i(l(c.expr,f),m),f=m}return[a(f)]}else if(c.type=="name")return[a(u,void 0,c.value)];else throw Error("Unknown expr type")}}function WI(e,t){return t-e}function kI(e,t){let r=[];return a(t),r.sort(WI);function a(i){let l=e[i];if(l.length==1&&!l[0].term)return a(l[0].to);r.push(i);for(let c=0;c<l.length;c++){let{term:u,to:f}=l[c];if(!u&&r.indexOf(f)==-1)a(f)}}}function nZ(e){let t=Object.create(null);return r(kI(e,0));function r(a){let i=[];a.forEach((c)=>{e[c].forEach(({term:u,to:f})=>{if(!u)return;let h;for(let m=0;m<i.length;m++)if(i[m][0]==u)h=i[m][1];kI(e,f).forEach((m)=>{if(!h)i.push([u,h=[]]);if(h.indexOf(m)==-1)h.push(m)})})});let l=t[a.join(",")]=new $d(a.indexOf(e.length-1)>-1);for(let c=0;c<i.length;c++){let u=i[c][1].sort(WI);l.next.push({type:i[c][0],next:t[u.join(",")]||r(u)})}return l}}function rZ(e,t){for(let r=0,a=[e];r<a.length;r++){let i=a[r],l=!i.validEnd,c=[];for(let u=0;u<i.next.length;u++){let{type:f,next:h}=i.next[u];if(c.push(f.name),l&&!(f.isText||f.hasRequiredAttrs()))l=!1;if(a.indexOf(h)==-1)a.push(h)}if(l)t.err("Only non-generatable nodes ("+c.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function YI(e){let t=Object.create(null);for(let r in e){let a=e[r];if(!a.hasDefault)return null;t[r]=a.default}return t}function JI(e,t){let r=Object.create(null);for(let a in e){let i=t&&t[a];if(i===void 0){let l=e[a];if(l.hasDefault)i=l.default;else throw RangeError("No value supplied for attribute "+a)}r[a]=i}return r}function XI(e,t,r,a){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${r} of type ${a}`);for(let i in e)if(e[i].validate)e[i].validate(t[i])}function QI(e,t){let r=Object.create(null);if(t)for(let a in t)r[a]=new ZI(e,a,t[a]);return r}class Xx{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=QI(e,r.attrs),this.defaultAttrs=YI(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==$d.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){if(!e&&this.defaultAttrs)return this.defaultAttrs;else return JI(this.attrs,e)}create(e=null,t,r){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new Wr(this,this.computeAttrs(e),le.from(t),Pt.setFrom(r))}createChecked(e=null,t,r){return t=le.from(t),this.checkContent(t),new Wr(this,this.computeAttrs(e),t,Pt.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=le.from(t),t.size){let l=this.contentMatch.fillBefore(t);if(!l)return null;t=l.append(t)}let a=this.contentMatch.matchFragment(t),i=a&&a.fillBefore(le.empty,!0);if(!i)return null;return new Wr(this,e,t.append(i),Pt.setFrom(r))}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){XI(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)if(!this.allowsMarkType(e[r].type)){if(!t)t=e.slice(0,r)}else if(t)t.push(e[r]);return!t?e:t.length?t:Pt.none}static compile(e,t){let r=Object.create(null);e.forEach((i,l)=>r[i]=new Xx(i,t,l));let a=t.spec.topNode||"doc";if(!r[a])throw RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}}function oZ(e,t,r){let a=r.split("|");return(i)=>{let l=i===null?"null":typeof i;if(a.indexOf(l)<0)throw RangeError(`Expected value of type ${a} for attribute ${t} on type ${e}, got ${l}`)}}class ZI{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?oZ(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ug{constructor(e,t,r,a){this.name=e,this.rank=t,this.schema=r,this.spec=a,this.attrs=QI(e,a.attrs),this.excluded=null;let i=YI(this.attrs);this.instance=i?new Pt(this,i):null}create(e=null){if(!e&&this.instance)return this.instance;return new Pt(this,JI(this.attrs,e))}static compile(e,t){let r=Object.create(null),a=0;return e.forEach((i,l)=>r[i]=new Ug(i,a++,t,l)),r}removeFromSet(e){for(var t=0;t<e.length;t++)if(e[t].type==this)e=e.slice(0,t).concat(e.slice(t+1)),t--;return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){XI(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Fg{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let a in e)t[a]=e[a];t.nodes=J3.from(e.nodes),t.marks=J3.from(e.marks||{}),this.nodes=Xx.compile(this.spec.nodes,this),this.marks=Ug.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw RangeError(a+" can not be both a node and a mark");let i=this.nodes[a],l=i.spec.content||"",c=i.spec.marks;if(i.contentMatch=r[l]||(r[l]=$d.parse(l,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=c=="_"?null:c?AI(this,c.split(" ")):c==""||!i.inlineContent?[]:null}for(let a in this.marks){let i=this.marks[a],l=i.spec.excludes;i.excluded=l==null?[i]:l==""?[]:AI(this,l.split(" "))}this.nodeFromJSON=(a)=>Wr.fromJSON(this,a),this.markFromJSON=(a)=>Pt.fromJSON(this,a),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,a){if(typeof e=="string")e=this.nodeType(e);else if(!(e instanceof Xx))throw RangeError("Invalid node type: "+e);else if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")");return e.createChecked(t,r,a)}text(e,t){let r=this.nodes.text;return new Jx(r,r.defaultAttrs,e,Pt.setFrom(t))}mark(e,t){if(typeof e=="string")e=this.marks[e];return e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function AI(e,t){let r=[];for(let a=0;a<t.length;a++){let i=t[a],l=e.marks[i],c=l;if(l)r.push(l);else for(let u in e.marks){let f=e.marks[u];if(i=="_"||f.spec.group&&f.spec.group.split(" ").indexOf(i)>-1)r.push(c=f)}if(!c)throw SyntaxError("Unknown mark type: '"+t[a]+"'")}return r}function aZ(e){return e.tag!=null}function iZ(e){return e.style!=null}class va{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach((a)=>{if(aZ(a))this.tags.push(a);else if(iZ(a)){let i=/[^=]*/.exec(a.style)[0];if(r.indexOf(i)<0)r.push(i);this.styles.push(a)}}),this.normalizeLists=!this.tags.some((a)=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let i=e.nodes[a.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new eR(this,t,!1);return r.addAll(e,Pt.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new eR(this,t,!0);return r.addAll(e,Pt.none,t.from,t.to),Se.maxOpen(r.finish())}matchTag(e,t,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let i=this.tags[a];if(cZ(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let l=i.getAttrs(e);if(l===!1)continue;i.attrs=l||void 0}return i}}}matchStyle(e,t,r,a){for(let i=a?this.styles.indexOf(a)+1:0;i<this.styles.length;i++){let l=this.styles[i],c=l.style;if(c.indexOf(e)!=0||l.context&&!r.matchesContext(l.context)||c.length>e.length&&(c.charCodeAt(e.length)!=61||c.slice(e.length+1)!=t))continue;if(l.getAttrs){let u=l.getAttrs(t);if(u===!1)continue;l.attrs=u||void 0}return l}}static schemaRules(e){let t=[];function r(a){let i=a.priority==null?50:a.priority,l=0;for(;l<t.length;l++){let c=t[l];if((c.priority==null?50:c.priority)<i)break}t.splice(l,0,a)}for(let a in e.marks){let i=e.marks[a].spec.parseDOM;if(i)i.forEach((l)=>{if(r(l=NI(l)),!(l.mark||l.ignore||l.clearMark))l.mark=a})}for(let a in e.nodes){let i=e.nodes[a].spec.parseDOM;if(i)i.forEach((l)=>{if(r(l=NI(l)),!(l.node||l.ignore||l.mark))l.node=a})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new va(e,va.schemaRules(e)))}}function MI(e,t,r){if(t!=null)return(t?Hg:0)|(t==="full"?Z3:0);return e&&e.whitespace=="pre"?Hg|Z3:r&~Bg}class _g{constructor(e,t,r,a,i,l){this.type=e,this.attrs=t,this.marks=r,this.solid=a,this.options=l,this.content=[],this.activeMarks=Pt.none,this.match=i||(l&Bg?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(le.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,a;if(a=r.findWrapping(e.type))return this.match=r,a;else return null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Hg)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;if(r.text.length==a[0].length)this.content.pop();else this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-a[0].length))}}let t=le.from(this.content);if(!e&&this.match)t=t.append(this.match.fillBefore(le.empty,!0));return this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){if(this.type)return this.type.inlineContent;if(this.content.length)return this.content[0].isInline;return e.parentNode&&!eB.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class eR{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let a=t.topNode,i,l=MI(null,t.preserveWhitespace,0)|(r?Bg:0);if(a)i=new _g(a.type,a.attrs,Pt.none,!0,t.topMatch||a.type.contentMatch,l);else if(r)i=new _g(null,null,Pt.none,!0,null,l);else i=new _g(e.schema.topNodeType,null,Pt.none,!0,null,l);this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){if(e.nodeType==3)this.addTextNode(e,t);else if(e.nodeType==1)this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,a=this.top,i=a.options&Z3?"full":this.localPreserveWS||(a.options&Hg)>0,{schema:l}=this.parser;if(i==="full"||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(!i){if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let c=a.content[a.content.length-1],u=e.previousSibling;if(!c||u&&u.nodeName=="BR"||c.isText&&/[ \t\r\n\u000c]$/.test(c.text))r=r.slice(1)}}else if(i==="full")r=r.replace(/\r\n?/g,`
253
+ `);else if(l.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(l.linebreakReplacement.create())){let c=r.split(/\r?\n|\r/);for(let u=0;u<c.length;u++){if(u)this.insertNode(l.linebreakReplacement.create(),t,!0);if(c[u])this.insertNode(l.text(c[u]),t,!/\S/.test(c[u]))}r=""}else r=r.replace(/\r?\n|\r/g," ");if(r)this.insertNode(l.text(r),t,!/\S/.test(r));this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let a=this.localPreserveWS,i=this.top;if(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))this.localPreserveWS=!0;let l=e.nodeName.toLowerCase(),c;if(tB.hasOwnProperty(l)&&this.parser.normalizeLists)lZ(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(c=this.parser.matchTag(e,this,r));e:if(u?u.ignore:sZ.hasOwnProperty(l))this.findInside(e),this.ignoreFallback(e,t);else if(!u||u.skip||u.closeParent){if(u&&u.closeParent)this.open=Math.max(0,this.open-1);else if(u&&u.skip.nodeType)e=u.skip;let f,h=this.needsBlock;if(eB.hasOwnProperty(l)){if(i.content.length&&i.content[0].isInline&&this.open)this.open--,i=this.top;if(f=!0,!i.type)this.needsBlock=!0}else if(!e.firstChild){this.leafFallback(e,t);break e}let m=u&&u.skip?t:this.readStyles(e,t);if(m)this.addAll(e,m);if(f)this.sync(i);this.needsBlock=h}else{let f=this.readStyles(e,t);if(f)this.addElementByRule(e,u,f,u.consuming===!1?c:void 0)}this.localPreserveWS=a}leafFallback(e,t){if(e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent)this.addTextNode(e.ownerDocument.createTextNode(`
254
+ `),t)}ignoreFallback(e,t){if(e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent))this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],l=r.getPropertyValue(i);if(l)for(let c=void 0;;){let u=this.parser.matchStyle(i,l,this,c);if(!u)break;if(u.ignore)return null;if(u.clearMark)t=t.filter((f)=>!u.clearMark(f));else t=t.concat(this.parser.schema.marks[u.mark].create(u.attrs));if(u.consuming===!1)c=u;else break}}return t}addElementByRule(e,t,r,a){let i,l;if(t.node){if(l=this.parser.schema.nodes[t.node],!l.isLeaf){let u=this.enter(l,t.attrs||null,r,t.preserveWhitespace);if(u)i=!0,r=u}else if(!this.insertNode(l.create(t.attrs),r,e.nodeName=="BR"))this.leafFallback(e,r)}else{let u=this.parser.schema.marks[t.mark];r=r.concat(u.create(t.attrs))}let c=this.top;if(l&&l.isLeaf)this.findInside(e);else if(a)this.addElement(e,r,a);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((u)=>this.insertNode(u,r,!1));else{let u=e;if(typeof t.contentElement=="string")u=e.querySelector(t.contentElement);else if(typeof t.contentElement=="function")u=t.contentElement(e);else if(t.contentElement)u=t.contentElement;this.findAround(e,u,!0),this.addAll(u,r),this.findAround(e,u,!1)}if(i&&this.sync(c))this.open--}addAll(e,t,r,a){let i=r||0;for(let l=r?e.childNodes[r]:e.firstChild,c=a==null?null:e.childNodes[a];l!=c;l=l.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(l,t);this.findAtPoint(e,i)}findPlace(e,t,r){let a,i;for(let l=this.open,c=0;l>=0;l--){let u=this.nodes[l],f=u.findWrapping(e);if(f&&(!a||a.length>f.length+c)){if(a=f,i=u,!f.length)break}if(u.solid){if(r)break;c+=2}}if(!a)return null;this.sync(i);for(let l=0;l<a.length;l++)t=this.enterInner(a[l],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();if(i)t=this.enterInner(i,null,t)}let a=this.findPlace(e,t,r);if(a){this.closeExtra();let i=this.top;if(i.match)i.match=i.match.matchType(e.type);let l=Pt.none;for(let c of a.concat(e.marks))if(i.type?i.type.allowsMarkType(c.type):OI(c.type,e.type))l=c.addToSet(l);return i.content.push(e.mark(l)),!0}return!1}enter(e,t,r,a){let i=this.findPlace(e.create(t),r,!1);if(i)i=this.enterInner(e,t,r,!0,a);return i}enterInner(e,t,r,a=!1,i){this.closeExtra();let l=this.top;l.match=l.match&&l.match.matchType(e);let c=MI(e,i,l.options);if(l.options&Bg&&l.content.length==0)c|=Bg;let u=Pt.none;return r=r.filter((f)=>{if(l.type?l.type.allowsMarkType(f.type):OI(f.type,e))return u=f.addToSet(u),!1;return!0}),this.nodes.push(new _g(e,t,u,a,null,c)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else if(this.localPreserveWS)this.nodes[t].options|=Hg;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let a=r.length-1;a>=0;a--)e+=r[a].nodeSize;if(t)e++}return e}findAtPoint(e,t){if(this.find){for(let r=0;r<this.find.length;r++)if(this.find[r].node==e&&this.find[r].offset==t)this.find[r].pos=this.currentPos}}findInside(e){if(this.find){for(let t=0;t<this.find.length;t++)if(this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node))this.find[t].pos=this.currentPos}}findAround(e,t,r){if(e!=t&&this.find){for(let a=0;a<this.find.length;a++)if(this.find[a].pos==null&&e.nodeType==1&&e.contains(this.find[a].node)){if(t.compareDocumentPosition(this.find[a].node)&(r?2:4))this.find[a].pos=this.currentPos}}}findInText(e){if(this.find){for(let t=0;t<this.find.length;t++)if(this.find[t].node==e)this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset)}}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(a?0:1),l=(c,u)=>{for(;c>=0;c--){let f=t[c];if(f==""){if(c==t.length-1||c==0)continue;for(;u>=i;u--)if(l(c-1,u))return!0;return!1}else{let h=u>0||u==0&&a?this.nodes[u].type:r&&u>=i?r.node(u-i).type:null;if(!h||h.name!=f&&!h.isInGroup(f))return!1;u--}}return!0};return l(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function lZ(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let a=t.nodeType==1?t.nodeName.toLowerCase():null;if(a&&tB.hasOwnProperty(a)&&r)r.appendChild(t),t=r;else if(a=="li")r=t;else if(a)r=null}}function cZ(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function NI(e){let t={};for(let r in e)t[r]=e[r];return t}function OI(e,t){let r=t.schema.nodes;for(let a in r){let i=r[a];if(!i.allowsMarkType(e))continue;let l=[],c=(u)=>{l.push(u);for(let f=0;f<u.edgeCount;f++){let{type:h,next:m}=u.edge(f);if(h==t)return!0;if(l.indexOf(m)<0&&c(m))return!0}};if(c(i.contentMatch))return!0}}class Xi{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){if(!r)r=qx(t).createDocumentFragment();let a=r,i=[];return e.forEach((l)=>{if(i.length||l.marks.length){let c=0,u=0;while(c<i.length&&u<l.marks.length){let f=l.marks[u];if(!this.marks[f.type.name]){u++;continue}if(!f.eq(i[c][0])||f.type.spec.spanning===!1)break;c++,u++}while(c<i.length)a=i.pop()[1];while(u<l.marks.length){let f=l.marks[u++],h=this.serializeMark(f,l.isInline,t);if(h)i.push([f,a]),a.appendChild(h.dom),a=h.contentDOM||h.dom}}a.appendChild(this.serializeNodeInner(l,t))}),r}serializeNodeInner(e,t){if(e.isText)return qx(t).createTextNode(e.text);let{dom:r,contentDOM:a}=Gx(qx(t),this.nodes[e.type.name](e),null,e.attrs);if(a){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,a)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let a=e.marks.length-1;a>=0;a--){let i=this.serializeMark(e.marks[a],e.isInline,t);if(i)(i.contentDOM||i.dom).appendChild(r),r=i.dom}return r}serializeMark(e,t,r={}){let a=this.marks[e.type.name];return a&&Gx(qx(r),a(e,t),null,e.attrs)}static renderSpec(e,t,r=null,a){if(typeof t=="string")return{dom:e.createTextNode(t)};return Gx(e,t,r,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Xi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=DI(e.nodes);if(!t.text)t.text=(r)=>r.text;return t}static marksFromSchema(e){return DI(e.marks)}}function DI(e){let t={};for(let r in e){let a=e[r].spec.toDOM;if(a)t[r]=a}return t}function qx(e){return e.document||window.document}function uZ(e){let t=PI.get(e);if(t===void 0)PI.set(e,t=dZ(e));return t}function dZ(e){let t=null;function r(a){if(a&&typeof a=="object")if(Array.isArray(a))if(typeof a[0]=="string"){if(!t)t=[];t.push(a)}else for(let i=0;i<a.length;i++)r(a[i]);else for(let i in a)r(a[i])}return r(e),t}function Gx(e,t,r,a){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],l;if(typeof i!="string")throw RangeError("Invalid array passed to renderSpec");if(a&&(l=uZ(a))&&l.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=i.indexOf(" ");if(c>0)r=i.slice(0,c),i=i.slice(c+1);let u,f=r?e.createElementNS(r,i):e.createElement(i),h=t[1],m=1;if(h&&typeof h=="object"&&h.nodeType==null&&!Array.isArray(h)){m=2;for(let b in h)if(h[b]!=null){let y=b.indexOf(" ");if(y>0)f.setAttributeNS(b.slice(0,y),b.slice(y+1),h[b]);else if(b=="style"&&f.style)f.style.cssText=h[b];else f.setAttribute(b,h[b])}}for(let b=m;b<t.length;b++){let y=t[b];if(y===0){if(b<t.length-1||b>m)throw RangeError("Content hole must be the only child of its parent node");return{dom:f,contentDOM:f}}else if(typeof y=="string")f.appendChild(e.createTextNode(y));else{let{dom:v,contentDOM:S}=Gx(e,y,r,a);if(f.appendChild(v),S){if(u)throw RangeError("Multiple content holes");u=S}}}return{dom:f,contentDOM:u}}var X3,xd,WQ=12,TI,YQ,Jx,eB,sZ,tB,Hg=1,Z3=2,Bg=4,PI;var Ws=N(()=>{EI();le.empty=new le([],0);X3={index:0,offset:0};Pt.none=[];xd=class xd extends Error{};Se.empty=new Se(le.empty,0,0);TI=new WeakMap;YQ=Object.create(null);Wr.prototype.text=void 0;Jx=class Jx extends Wr{constructor(e,t,r,a){super(e,t,null,a);if(!r)throw RangeError("Empty text nodes are not allowed");this.text=r}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);return KI(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jx(this.type,this.attrs,this.text,e)}withText(e){if(e==this.text)return this;return new Jx(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){if(e==0&&t==this.text.length)return this;return this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};$d.empty=new $d(!0);eB={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},sZ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tB={ol:!0,ul:!0};PI=new WeakMap});function fZ(e,t){return e+t*aB}function nB(e){return e&oB}function pZ(e){return(e-(e&oB))/aB}class Zx{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&lB)>0}get deletedBefore(){return(this.delInfo&(iB|Qx))>0}get deletedAfter(){return(this.delInfo&(sB|Qx))>0}get deletedAcross(){return(this.delInfo&Qx)>0}}class Ko{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Ko.empty)return Ko.empty}recover(e){let t=0,r=nB(e);if(!this.inverted)for(let a=0;a<r;a++)t+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+t+pZ(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let a=0,i=this.inverted?2:1,l=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?a:0);if(u>e)break;let f=this.ranges[c+i],h=this.ranges[c+l],m=u+f;if(e<=m){let b=!f?t:e==u?-1:e==m?1:t,y=u+a+(b<0?0:h);if(r)return y;let v=e==(t<0?u:m)?null:fZ(c/3,e-u),S=e==u?sB:e==m?iB:Qx;if(t<0?e!=u:e!=m)S|=lB;return new Zx(y,S,v)}a+=h-f}return r?e+a:new Zx(e+a,0,null)}touches(e,t){let r=0,a=nB(t),i=this.inverted?2:1,l=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let u=this.ranges[c]-(this.inverted?r:0);if(u>e)break;let f=this.ranges[c+i],h=u+f;if(e<=h&&c==a*3)return!0;r+=this.ranges[c+l]-f}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let l=this.ranges[a],c=l-(this.inverted?i:0),u=l+(this.inverted?0:i),f=this.ranges[a+t],h=this.ranges[a+r];e(c,c+f,u,u+h),i+=h-f}}invert(){return new Ko(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ko.empty:new Ko(e<0?[0,-e,0]:[0,0,e])}}class zp{constructor(e,t,r=0,a=e?e.length:0){this.mirror=t,this.from=r,this.to=a,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new zp(this._maps,this.mirror,e,t)}appendMap(e,t){if(!this.ownData)this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0;if(this.to=this._maps.push(e),t!=null)this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let a=e.getMirror(t);this.appendMap(e._maps[t],a!=null&&a<t?r+a:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){if(!this.mirror)this.mirror=[];this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let a=e.getMirror(t);this.appendMap(e._maps[t].invert(),a!=null&&a>t?r-a-1:void 0)}}invert(){let e=new zp;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let a=0;for(let i=this.from;i<this.to;i++){let l=this._maps[i],c=l.mapResult(e,t);if(c.recover!=null){let u=this.getMirror(i);if(u!=null&&u>i&&u<this.to){i=u,e=this._maps[u].recover(c.recover);continue}}a|=c.delInfo,e=c.pos}return r?e:new Zx(e,a,null)}}class yr{getMap(){return Ko.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let r=tR[t.stepType];if(!r)throw RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in tR)throw RangeError("Duplicate use of step JSON ID "+e);return tR[e]=t,t.prototype.jsonID=e,t}}class Kn{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Kn(e,null)}static fail(e){return new Kn(null,e)}static fromReplace(e,t,r,a){try{return Kn.ok(e.replace(t,r,a))}catch(i){if(i instanceof xd)return Kn.fail(i.message);throw i}}}function aR(e,t,r){let a=[];for(let i=0;i<e.childCount;i++){let l=e.child(i);if(l.content.size)l=l.copy(aR(l.content,t,l));if(l.isInline)l=t(l,r,i);a.push(l)}return le.fromArray(a)}function oR(e,t,r){let a=e.resolve(t),i=r-t,l=a.depth;while(i>0&&l>0&&a.indexAfter(l)==a.node(l).childCount)l--,i--;if(i>0){let c=a.node(l).maybeChild(a.indexAfter(l));while(i>0){if(!c||c.isLeaf)return!0;c=c.firstChild,i--}}return!1}function hZ(e,t,r,a){let i=[],l=[],c,u;e.doc.nodesBetween(t,r,(f,h,m)=>{if(!f.isInline)return;let b=f.marks;if(!a.isInSet(b)&&m.type.allowsMarkType(a.type)){let y=Math.max(h,t),v=Math.min(h+f.nodeSize,r),S=a.addToSet(b);for(let w=0;w<b.length;w++)if(!b[w].isInSet(S))if(c&&c.to==y&&c.mark.eq(b[w]))c.to=v;else i.push(c=new xa(y,v,b[w]));if(u&&u.to==y)u.to=v;else l.push(u=new Ec(y,v,a))}}),i.forEach((f)=>e.step(f)),l.forEach((f)=>e.step(f))}function mZ(e,t,r,a){let i=[],l=0;e.doc.nodesBetween(t,r,(c,u)=>{if(!c.isInline)return;l++;let f=null;if(a instanceof Ug){let h=c.marks,m;while(m=a.isInSet(h))(f||(f=[])).push(m),h=m.removeFromSet(h)}else if(a){if(a.isInSet(c.marks))f=[a]}else f=c.marks;if(f&&f.length){let h=Math.min(u+c.nodeSize,r);for(let m=0;m<f.length;m++){let b=f[m],y;for(let v=0;v<i.length;v++){let S=i[v];if(S.step==l-1&&b.eq(i[v].style))y=S}if(y)y.to=h,y.step=l;else i.push({style:b,from:Math.max(u,t),to:h,step:l})}}}),i.forEach((c)=>e.step(new xa(c.from,c.to,c.style)))}function iR(e,t,r,a=r.contentMatch,i=!0){let l=e.doc.nodeAt(t),c=[],u=t+1;for(let f=0;f<l.childCount;f++){let h=l.child(f),m=u+h.nodeSize,b=a.matchType(h.type);if(!b)c.push(new gn(u,m,Se.empty));else{a=b;for(let y=0;y<h.marks.length;y++)if(!r.allowsMarkType(h.marks[y].type))e.step(new xa(u,m,h.marks[y]));if(i&&h.isText&&r.whitespace!="pre"){let y,v=/\r?\n|\r/g,S;while(y=v.exec(h.text)){if(!S)S=new Se(le.from(r.schema.text(" ",r.allowedMarks(h.marks))),0,0);c.push(new gn(u+y.index,u+y.index+y[0].length,S))}}}u=m}if(!a.validEnd){let f=a.fillBefore(le.empty,!0);e.replace(u,u,new Se(f,0,0))}for(let f=c.length-1;f>=0;f--)e.step(c[f])}function gZ(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function Ys(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let a=e.depth,i=0,l=0;;--a){let c=e.$from.node(a),u=e.$from.index(a)+i,f=e.$to.indexAfter(a)-l;if(a<e.depth&&c.canReplace(u,f,r))return a;if(a==0||c.type.spec.isolating||!gZ(c,u,f))break;if(u)i=1;if(f<c.childCount)l=1}return null}function bZ(e,t,r){let{$from:a,$to:i,depth:l}=t,c=a.before(l+1),u=i.after(l+1),f=c,h=u,m=le.empty,b=0;for(let S=l,w=!1;S>r;S--)if(w||a.index(S)>0)w=!0,m=le.from(a.node(S).copy(m)),b++;else f--;let y=le.empty,v=0;for(let S=l,w=!1;S>r;S--)if(w||i.after(S+1)<i.end(S))w=!0,y=le.from(i.node(S).copy(y)),v++;else h++;e.step(new Cn(f,h,c,u,new Se(m.append(y),b,v),m.size-b,!0))}function Up(e,t,r=null,a=e){let i=yZ(e,t),l=i&&vZ(a,t);if(!l)return null;return i.map(rB).concat({type:t,attrs:r}).concat(l.map(rB))}function rB(e){return{type:e,attrs:null}}function yZ(e,t){let{parent:r,startIndex:a,endIndex:i}=e,l=r.contentMatchAt(a).findWrapping(t);if(!l)return null;let c=l.length?l[0]:t;return r.canReplaceWith(a,i,c)?l:null}function vZ(e,t){let{parent:r,startIndex:a,endIndex:i}=e,l=r.child(a),c=t.contentMatch.findWrapping(l.type);if(!c)return null;let f=(c.length?c[c.length-1]:t).contentMatch;for(let h=a;f&&h<i;h++)f=f.matchType(r.child(h).type);if(!f||!f.validEnd)return null;return c}function xZ(e,t,r){let a=le.empty;for(let c=r.length-1;c>=0;c--){if(a.size){let u=r[c].type.contentMatch.matchFragment(a);if(!u||!u.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}a=le.from(r[c].type.create(r[c].attrs,a))}let{start:i,end:l}=t;e.step(new Cn(i,l,i,l,new Se(a,0,0),r.length,!0))}function $Z(e,t,r,a,i){if(!a.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(t,r,(c,u)=>{let f=typeof i=="function"?i(c):i;if(c.isTextblock&&!c.hasMarkup(a,f)&&SZ(e.doc,e.mapping.slice(l).map(u),a)){let h=null;if(a.schema.linebreakReplacement){let v=a.whitespace=="pre",S=!!a.contentMatch.matchType(a.schema.linebreakReplacement);if(v&&!S)h=!1;else if(!v&&S)h=!0}if(h===!1)uB(e,c,u,l);iR(e,e.mapping.slice(l).map(u,1),a,void 0,h===null);let m=e.mapping.slice(l),b=m.map(u,1),y=m.map(u+c.nodeSize,1);if(e.step(new Cn(b,y,b+1,y-1,new Se(le.from(a.create(f,null,c.marks)),0,0),1,!0)),h===!0)cB(e,c,u,l);return!1}})}function cB(e,t,r,a){t.forEach((i,l)=>{if(i.isText){let c,u=/\r?\n|\r/g;while(c=u.exec(i.text)){let f=e.mapping.slice(a).map(r+1+l+c.index);e.replaceWith(f,f+1,t.type.schema.linebreakReplacement.create())}}})}function uB(e,t,r,a){t.forEach((i,l)=>{if(i.type==i.type.schema.linebreakReplacement){let c=e.mapping.slice(a).map(r+1+l);e.replaceWith(c,c+1,t.type.schema.text(`
255
+ `))}})}function SZ(e,t,r){let a=e.resolve(t),i=a.index();return a.parent.canReplaceWith(i,i+1,r)}function CZ(e,t,r,a,i){let l=e.doc.nodeAt(t);if(!l)throw RangeError("No node at given position");if(!r)r=l.type;let c=r.create(a,null,i||l.marks);if(l.isLeaf)return e.replaceWith(t,t+l.nodeSize,c);if(!r.validContent(l.content))throw RangeError("Invalid content for node type "+r.name);e.step(new Cn(t,t+l.nodeSize,t+1,t+l.nodeSize-1,new Se(le.from(c),0,0),1,!0))}function qo(e,t,r=1,a){let i=e.resolve(t),l=i.depth-r,c=a&&a[a.length-1]||i.parent;if(l<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!c.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let h=i.depth-1,m=r-2;h>l;h--,m--){let b=i.node(h),y=i.index(h);if(b.type.spec.isolating)return!1;let v=b.content.cutByIndex(y,b.childCount),S=a&&a[m+1];if(S)v=v.replaceChild(0,S.type.create(S.attrs));let w=a&&a[m]||b;if(!b.canReplace(y+1,b.childCount)||!w.type.validContent(v))return!1}let u=i.indexAfter(l),f=a&&a[0];return i.node(l).canReplaceWith(u,u,f?f.type:i.node(l+1).type)}function wZ(e,t,r=1,a){let i=e.doc.resolve(t),l=le.empty,c=le.empty;for(let u=i.depth,f=i.depth-r,h=r-1;u>f;u--,h--){l=le.from(i.node(u).copy(l));let m=a&&a[h];c=le.from(m?m.type.create(m.attrs,c):i.node(u).copy(c))}e.step(new gn(t,t,new Se(l.append(c),r,r),!0))}function $a(e,t){let r=e.resolve(t),a=r.index();return dB(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(a,a+1)}function EZ(e,t){if(!t.content.size)e.type.compatibleContent(t.type);let r=e.contentMatchAt(e.childCount),{linebreakReplacement:a}=e.type.schema;for(let i=0;i<t.childCount;i++){let l=t.child(i),c=l.type==a?e.type.schema.nodes.text:l.type;if(r=r.matchType(c),!r)return!1;if(!e.type.allowsMarks(l.marks))return!1}return r.validEnd}function dB(e,t){return!!(e&&t&&!e.isLeaf&&EZ(e,t))}function Cd(e,t,r=-1){let a=e.resolve(t);for(let i=a.depth;;i--){let l,c,u=a.index(i);if(i==a.depth)l=a.nodeBefore,c=a.nodeAfter;else if(r>0)l=a.node(i+1),u++,c=a.node(i).maybeChild(u);else l=a.node(i).maybeChild(u-1),c=a.node(i+1);if(l&&!l.isTextblock&&dB(l,c)&&a.node(i).canReplace(u,u+1))return t;if(i==0)break;t=r<0?a.before(i):a.after(i)}}function TZ(e,t,r){let a=null,{linebreakReplacement:i}=e.doc.type.schema,l=e.doc.resolve(t-r),c=l.node().type;if(i&&c.inlineContent){let m=c.whitespace=="pre",b=!!c.contentMatch.matchType(i);if(m&&!b)a=!1;else if(!m&&b)a=!0}let u=e.steps.length;if(a===!1){let m=e.doc.resolve(t+r);uB(e,m.node(),m.before(),u)}if(c.inlineContent)iR(e,t+r-1,c,l.node().contentMatchAt(l.index()),a==null);let f=e.mapping.slice(u),h=f.map(t-r);if(e.step(new gn(h,f.map(t+r,-1),Se.empty,!0)),a===!0){let m=e.doc.resolve(h);cB(e,m.node(),m.before(),e.steps.length)}return e}function RZ(e,t,r){let a=e.resolve(t);if(a.parent.canReplaceWith(a.index(),a.index(),r))return t;if(a.parentOffset==0)for(let i=a.depth-1;i>=0;i--){let l=a.index(i);if(a.node(i).canReplaceWith(l,l,r))return a.before(i+1);if(l>0)return null}if(a.parentOffset==a.parent.content.size)for(let i=a.depth-1;i>=0;i--){let l=a.indexAfter(i);if(a.node(i).canReplaceWith(l,l,r))return a.after(i+1);if(l<a.node(i).childCount)return null}return null}function e1(e,t,r){let a=e.resolve(t);if(!r.content.size)return t;let i=r.content;for(let l=0;l<r.openStart;l++)i=i.firstChild.content;for(let l=1;l<=(r.openStart==0&&r.size?2:1);l++)for(let c=a.depth;c>=0;c--){let u=c==a.depth?0:a.pos<=(a.start(c+1)+a.end(c+1))/2?-1:1,f=a.index(c)+(u>0?1:0),h=a.node(c),m=!1;if(l==1)m=h.canReplace(f,f,i);else{let b=h.contentMatchAt(f).findWrapping(i.firstChild.type);m=b&&h.canReplaceWith(f,f,b[0])}if(m)return u==0?a.pos:u<0?a.before(c+1):a.after(c+1)}return null}function qg(e,t,r=t,a=Se.empty){if(t==r&&!a.size)return null;let i=e.resolve(t),l=e.resolve(r);if(fB(i,l,a))return new gn(t,r,a);return new pB(i,l,a).fit()}function fB(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class pB{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=le.empty;for(let a=0;a<=e.depth;a++){let i=e.node(a);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(a))})}for(let a=e.depth;a>0;a--)this.placed=le.from(e.node(a).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let f=this.findFittable();if(f)this.placeNodes(f);else this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,a=this.close(e<0?this.$to:r.doc.resolve(e));if(!a)return null;let i=this.placed,l=r.depth,c=a.depth;while(l&&c&&i.childCount==1)i=i.firstChild.content,l--,c--;let u=new Se(i,l,c);if(e>-1)return new Cn(r.pos,e,this.$to.pos,this.$to.end(),u,t);if(u.size||r.pos!=this.$to.pos)return new gn(r.pos,a.pos,u);return null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,a=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1)a=0;if(i.type.spec.isolating&&a<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let a,i=null;if(r)i=nR(this.unplaced.content,r-1).firstChild,a=i.content;else a=this.unplaced.content;let l=a.firstChild;for(let c=this.depth;c>=0;c--){let{type:u,match:f}=this.frontier[c],h,m=null;if(t==1&&(l?f.matchType(l.type)||(m=f.fillBefore(le.from(l),!1)):i&&u.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:c,parent:i,inject:m};else if(t==2&&l&&(h=f.findWrapping(l.type)))return{sliceDepth:r,frontierDepth:c,parent:i,wrap:h};if(i&&f.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,a=nR(e,t);if(!a.childCount||a.firstChild.isLeaf)return!1;return this.unplaced=new Se(e,t+1,Math.max(r,a.size+t>=e.size-r?t+1:0)),!0}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,a=nR(e,t);if(a.childCount<=1&&t>0){let i=e.size-t<=t+a.size;this.unplaced=new Se(Vg(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new Se(Vg(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:a,wrap:i}){while(this.depth>t)this.closeFrontierNode();if(i)for(let S=0;S<i.length;S++)this.openFrontierNode(i[S]);let l=this.unplaced,c=r?r.content:l.content,u=l.openStart-e,f=0,h=[],{match:m,type:b}=this.frontier[t];if(a){for(let S=0;S<a.childCount;S++)h.push(a.child(S));m=m.matchFragment(a)}let y=c.size+e-(l.content.size-l.openEnd);while(f<c.childCount){let S=c.child(f),w=m.matchType(S.type);if(!w)break;if(f++,f>1||u==0||S.content.size)m=w,h.push(hB(S.mark(b.allowedMarks(S.marks)),f==1?u:0,f==c.childCount?y:-1))}let v=f==c.childCount;if(!v)y=-1;if(this.placed=jg(this.placed,t,le.from(h)),this.frontier[t].match=m,v&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1)this.closeFrontierNode();for(let S=0,w=c;S<y;S++){let E=w.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),w=E.content}this.unplaced=!v?new Se(Vg(l.content,e,f),l.openStart,l.openEnd):e==0?Se.empty:new Se(Vg(l.content,e-1,1),e-1,y<0?l.openEnd:e-1)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!rR(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,a=this.$to.after(r);while(r>1&&a==this.$to.end(--r))++a;return a}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:a}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),l=rR(e,t,a,r,i);if(!l)continue;for(let c=t-1;c>=0;c--){let{match:u,type:f}=this.frontier[c],h=rR(e,c,f,u,!0);if(!h||h.childCount)continue e}return{depth:t,fit:l,move:i?e.doc.resolve(e.after(t+1)):e}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;while(this.depth>t.depth)this.closeFrontierNode();if(t.fit.childCount)this.placed=jg(this.placed,t.depth,t.fit);e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let a=e.node(r),i=a.type.contentMatch.fillBefore(a.content,!0,e.index(r));this.openFrontierNode(a.type,a.attrs,i)}return e}openFrontierNode(e,t=null,r){let a=this.frontier[this.depth];a.match=a.match.matchType(e),this.placed=jg(this.placed,this.depth,le.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(le.empty,!0);if(t.childCount)this.placed=jg(this.placed,this.frontier.length,t)}}function Vg(e,t,r){if(t==0)return e.cutByIndex(r,e.childCount);return e.replaceChild(0,e.firstChild.copy(Vg(e.firstChild.content,t-1,r)))}function jg(e,t,r){if(t==0)return e.append(r);return e.replaceChild(e.childCount-1,e.lastChild.copy(jg(e.lastChild.content,t-1,r)))}function nR(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function hB(e,t,r){if(t<=0)return e;let a=e.content;if(t>1)a=a.replaceChild(0,hB(a.firstChild,t-1,a.childCount==1?r-1:0));if(t>0){if(a=e.type.contentMatch.fillBefore(a).append(a),r<=0)a=a.append(e.type.contentMatch.matchFragment(a).fillBefore(le.empty,!0))}return e.copy(a)}function rR(e,t,r,a,i){let l=e.node(t),c=i?e.indexAfter(t):e.index(t);if(c==l.childCount&&!r.compatibleContent(l.type))return null;let u=a.fillBefore(l.content,!0,c);return u&&!kZ(r,l.content,c)?u:null}function kZ(e,t,r){for(let a=r;a<t.childCount;a++)if(!e.allowsMarks(t.child(a).marks))return!0;return!1}function AZ(e){return e.spec.defining||e.spec.definingForContent}function MZ(e,t,r,a){if(!a.size)return e.deleteRange(t,r);let i=e.doc.resolve(t),l=e.doc.resolve(r);if(fB(i,l,a))return e.step(new gn(t,r,a));let c=gB(i,l);if(c[c.length-1]==0)c.pop();let u=-(i.depth+1);c.unshift(u);for(let y=i.depth,v=i.pos-1;y>0;y--,v--){let S=i.node(y).type.spec;if(S.defining||S.definingAsContext||S.isolating)break;if(c.indexOf(y)>-1)u=y;else if(i.before(y)==v)c.splice(1,0,-y)}let f=c.indexOf(u),h=[],m=a.openStart;for(let y=a.content,v=0;;v++){let S=y.firstChild;if(h.push(S),v==a.openStart)break;y=S.content}for(let y=m-1;y>=0;y--){let v=h[y],S=AZ(v.type);if(S&&!v.sameMarkup(i.node(Math.abs(u)-1)))m=y;else if(S||!v.type.isTextblock)break}for(let y=a.openStart;y>=0;y--){let v=(y+m+1)%(a.openStart+1),S=h[v];if(!S)continue;for(let w=0;w<c.length;w++){let E=c[(w+f)%c.length],R=!0;if(E<0)R=!1,E=-E;let D=i.node(E-1),H=i.index(E-1);if(D.canReplaceWith(H,H,S.type,S.marks))return e.replace(i.before(E),R?l.after(E):r,new Se(mB(a.content,0,a.openStart,v),v,a.openEnd))}}let b=e.steps.length;for(let y=c.length-1;y>=0;y--){if(e.replace(t,r,a),e.steps.length>b)break;let v=c[y];if(v<0)continue;t=i.before(v),r=l.after(v)}}function mB(e,t,r,a,i){if(t<r){let l=e.firstChild;e=e.replaceChild(0,l.copy(mB(l.content,t+1,r,a,l)))}if(t>a){let l=i.contentMatchAt(0),c=l.fillBefore(e).append(e);e=c.append(l.matchFragment(c).fillBefore(le.empty,!0))}return e}function NZ(e,t,r,a){if(!a.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let i=RZ(e.doc,t,a.type);if(i!=null)t=r=i}e.replaceRange(t,r,new Se(le.from(a),0,0))}function OZ(e,t,r){let a=e.doc.resolve(t),i=e.doc.resolve(r);if(a.parent.isTextblock&&i.parent.isTextblock&&a.start()!=i.start()&&a.parentOffset==0&&i.parentOffset==0){let c=a.sharedDepth(r),u=!1;for(let f=a.depth;f>c;f--)if(a.node(f).type.spec.isolating)u=!0;for(let f=i.depth;f>c;f--)if(i.node(f).type.spec.isolating)u=!0;if(!u){for(let f=a.depth;f>0&&t==a.start(f);f--)t=a.before(f);for(let f=i.depth;f>0&&r==i.start(f);f--)r=i.before(f);a=e.doc.resolve(t),i=e.doc.resolve(r)}}let l=gB(a,i);for(let c=0;c<l.length;c++){let u=l[c],f=c==l.length-1;if(f&&u==0||a.node(u).type.contentMatch.validEnd)return e.delete(a.start(u),i.end(u));if(u>0&&(f||a.node(u-1).canReplace(a.index(u-1),i.indexAfter(u-1))))return e.delete(a.before(u),i.after(u))}for(let c=1;c<=a.depth&&c<=i.depth;c++)if(t-a.start(c)==a.depth-c&&r>a.end(c)&&i.end(c)-r!=i.depth-c&&a.start(c-1)==i.start(c-1)&&a.node(c-1).canReplace(a.index(c-1),i.index(c-1)))return e.delete(a.before(c),r);e.delete(t,r)}function gB(e,t){let r=[],a=Math.min(e.depth,t.depth);for(let i=a;i>=0;i--){let l=e.start(i);if(l<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;if(l==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==l-1)r.push(i)}return r}class Gg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new zp}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Hp(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);if(!t.failed)this.addStep(e,t.doc);return t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let a=this.mapping.maps[r];if(r)e=a.map(e,1),t=a.map(t,-1);a.forEach((i,l,c,u)=>{e=Math.min(e,c),t=Math.max(t,u)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=Se.empty){let a=qg(this.doc,e,t,r);if(a)this.step(a);return this}replaceWith(e,t,r){return this.replace(e,t,new Se(le.from(r),0,0))}delete(e,t){return this.replace(e,t,Se.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return MZ(this,e,t,r),this}replaceRangeWith(e,t,r){return NZ(this,e,t,r),this}deleteRange(e,t){return OZ(this,e,t),this}lift(e,t){return bZ(this,e,t),this}join(e,t=1){return TZ(this,e,t),this}wrap(e,t){return xZ(this,e,t),this}setBlockType(e,t=e,r,a=null){return $Z(this,e,t,r,a),this}setNodeMarkup(e,t,r=null,a){return CZ(this,e,t,r,a),this}setNodeAttribute(e,t,r){return this.step(new Bp(e,t,r)),this}setDocAttribute(e,t){return this.step(new Kg(e,t)),this}addNodeMark(e,t){return this.step(new Tc(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw RangeError("No node at position "+e);if(t instanceof Pt){if(t.isInSet(r.marks))this.step(new Sd(e,t))}else{let a=r.marks,i,l=[];while(i=t.isInSet(a))l.push(new Sd(e,i)),a=i.removeFromSet(a);for(let c=l.length-1;c>=0;c--)this.step(l[c])}return this}split(e,t=1,r){return wZ(this,e,t,r),this}addMark(e,t,r){return hZ(this,e,t,r),this}removeMark(e,t,r){return mZ(this,e,t,r),this}clearIncompatible(e,t,r){return iR(this,e,t,r),this}}var oB=65535,aB,iB=1,sB=2,Qx=4,lB=8,tR,Ec,xa,Tc,Sd,gn,Cn,Bp,Kg,Hp;var Rc=N(()=>{Ws();aB=Math.pow(2,16);Ko.empty=new Ko([]);tR=Object.create(null);Ec=class Ec extends yr{constructor(e,t,r){super();this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),a=r.node(r.sharedDepth(this.to)),i=new Se(aR(t.content,(l,c)=>{if(!l.isAtom||!c.type.allowsMarkType(this.mark.type))return l;return l.mark(this.mark.addToSet(l.marks))},a),t.openStart,t.openEnd);return Kn.fromReplace(e,this.from,this.to,i)}invert(){return new xa(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);if(t.deleted&&r.deleted||t.pos>=r.pos)return null;return new Ec(t.pos,r.pos,this.mark)}merge(e){if(e instanceof Ec&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new Ec(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark);return null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for AddMarkStep.fromJSON");return new Ec(t.from,t.to,e.markFromJSON(t.mark))}};yr.jsonID("addMark",Ec);xa=class xa extends yr{constructor(e,t,r){super();this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new Se(aR(t.content,(a)=>a.mark(this.mark.removeFromSet(a.marks)),e),t.openStart,t.openEnd);return Kn.fromReplace(e,this.from,this.to,r)}invert(){return new Ec(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);if(t.deleted&&r.deleted||t.pos>=r.pos)return null;return new xa(t.pos,r.pos,this.mark)}merge(e){if(e instanceof xa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new xa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark);return null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new xa(t.from,t.to,e.markFromJSON(t.mark))}};yr.jsonID("removeMark",xa);Tc=class Tc extends yr{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Kn.fromReplace(e,this.pos,this.pos+1,new Se(le.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let a=0;a<t.marks.length;a++)if(!t.marks[a].isInSet(r))return new Tc(this.pos,t.marks[a]);return new Tc(this.pos,this.mark)}}return new Sd(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Tc(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Tc(t.pos,e.markFromJSON(t.mark))}};yr.jsonID("addNodeMark",Tc);Sd=class Sd extends yr{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Kn.fromReplace(e,this.pos,this.pos+1,new Se(le.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(!t||!this.mark.isInSet(t.marks))return this;return new Tc(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Sd(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Sd(t.pos,e.markFromJSON(t.mark))}};yr.jsonID("removeNodeMark",Sd);gn=class gn extends yr{constructor(e,t,r,a=!1){super();this.from=e,this.to=t,this.slice=r,this.structure=a}apply(e){if(this.structure&&oR(e,this.from,this.to))return Kn.fail("Structure replace would overwrite content");return Kn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ko([this.from,this.to-this.from,this.slice.size])}invert(e){return new gn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&gn.MAP_BIAS<0?t:e.mapResult(this.from,1);if(r.deletedAcross&&t.deletedAcross)return null;return new gn(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof gn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?Se.empty:new Se(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new gn(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?Se.empty:new Se(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new gn(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};if(this.slice.size)e.slice=this.slice.toJSON();if(this.structure)e.structure=!0;return e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw RangeError("Invalid input for ReplaceStep.fromJSON");return new gn(t.from,t.to,Se.fromJSON(e,t.slice),!!t.structure)}};gn.MAP_BIAS=1;yr.jsonID("replace",gn);Cn=class Cn extends yr{constructor(e,t,r,a,i,l,c=!1){super();this.from=e,this.to=t,this.gapFrom=r,this.gapTo=a,this.slice=i,this.insert=l,this.structure=c}apply(e){if(this.structure&&(oR(e,this.from,this.gapFrom)||oR(e,this.gapTo,this.to)))return Kn.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Kn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);if(!r)return Kn.fail("Content does not fit in gap");return Kn.fromReplace(e,this.from,this.to,r)}getMap(){return new Ko([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Cn(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),a=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);if(t.deletedAcross&&r.deletedAcross||a<t.pos||i>r.pos)return null;return new Cn(t.pos,r.pos,a,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};if(this.slice.size)e.slice=this.slice.toJSON();if(this.structure)e.structure=!0;return e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Cn(t.from,t.to,t.gapFrom,t.gapTo,Se.fromJSON(e,t.slice),t.insert,!!t.structure)}};yr.jsonID("replaceAround",Cn);Bp=class Bp extends yr{constructor(e,t,r){super();this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let a=t.type.create(r,null,t.marks);return Kn.fromReplace(e,this.pos,this.pos+1,new Se(le.from(a),0,t.isLeaf?0:1))}getMap(){return Ko.empty}invert(e){return new Bp(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Bp(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw RangeError("Invalid input for AttrStep.fromJSON");return new Bp(t.pos,t.attr,t.value)}};yr.jsonID("attr",Bp);Kg=class Kg extends yr{constructor(e,t){super();this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let a in e.attrs)t[a]=e.attrs[a];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return Kn.ok(r)}getMap(){return Ko.empty}invert(e){return new Kg(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw RangeError("Invalid input for DocAttrStep.fromJSON");return new Kg(t.attr,t.value)}};yr.jsonID("docAttr",Kg);Hp=class extends Error{};Hp=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};Hp.prototype=Object.create(Error.prototype);Hp.prototype.constructor=Hp;Hp.prototype.name="TransformError"});var ti=N(()=>{Rc()});class Fe{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Wg(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Se.empty){let r=t.content.lastChild,a=null;for(let c=0;c<t.openEnd;c++)a=r,r=r.lastChild;let i=e.steps.length,l=this.ranges;for(let c=0;c<l.length;c++){let{$from:u,$to:f}=l[c],h=e.mapping.slice(i);if(e.replaceRange(h.map(u.pos),h.map(f.pos),c?Se.empty:t),c==0)vB(e,i,(r?r.isInline:a&&a.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:c}=a[i],u=e.mapping.slice(r),f=u.map(l.pos),h=u.map(c.pos);if(i)e.deleteRange(f,h);else e.replaceRangeWith(f,h,t),vB(e,r,t.isInline?-1:1)}}static findFrom(e,t,r=!1){let a=e.parent.inlineContent?new Me(e):Fp(e.node(0),e.parent,e.pos,e.index(),t,r);if(a)return a;for(let i=e.depth-1;i>=0;i--){let l=t<0?Fp(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):Fp(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(l)return l}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new vr(e.node(0))}static atStart(e){return Fp(e,e,0,0,1)||new vr(e)}static atEnd(e){return Fp(e,e,e.content.size,e.childCount,-1)||new vr(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let r=sR[t.type];if(!r)throw RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in sR)throw RangeError("Duplicate use of selection JSON ID "+e);return sR[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Me.between(this.$anchor,this.$head).getBookmark()}}class Wg{constructor(e,t){this.$from=e,this.$to=t}}function yB(e){if(!bB&&!e.parent.inlineContent)bB=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")")}class r1{constructor(e,t){this.anchor=e,this.head=t}map(e){return new r1(e.map(this.anchor),e.map(this.head))}resolve(e){return Me.between(e.resolve(this.anchor),e.resolve(this.head))}}class cR{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new r1(r,r):new cR(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;if(r&&Pe.isSelectable(r))return new Pe(t);return Fe.near(t)}}function Fp(e,t,r,a,i,l=!1){if(t.inlineContent)return Me.create(e,r);for(let c=a-(i>0?0:1);i>0?c<t.childCount:c>=0;c+=i){let u=t.child(c);if(!u.isAtom){let f=Fp(e,u,r+i,i<0?u.childCount:0,i,l);if(f)return f}else if(!l&&Pe.isSelectable(u))return Pe.create(e,r-(i<0?u.nodeSize:0));r+=u.nodeSize*i}return null}function vB(e,t,r){let a=e.steps.length-1;if(a<t)return;let i=e.steps[a];if(!(i instanceof gn||i instanceof Cn))return;let l=e.mapping.maps[a],c;l.forEach((u,f,h,m)=>{if(c==null)c=m}),e.setSelection(Fe.near(e.doc.resolve(c),r))}function SB(e,t){return!t||!e?e:e.bind(t)}class Vp{constructor(e,t,r){this.name=e,this.init=SB(t.init,r),this.apply=SB(t.apply,r)}}class n1{constructor(e,t){if(this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=PZ.slice(),t)t.forEach((r)=>{if(this.pluginsByKey[r.key])throw RangeError("Adding different instances of a keyed plugin ("+r.key+")");if(this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state)this.fields.push(new Vp(r.key,r.spec.state,r))})}}class kc{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let a=this.config.plugins[r];if(a.spec.filterTransaction&&!a.spec.filterTransaction.call(a,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),a=null;for(;;){let i=!1;for(let l=0;l<this.config.plugins.length;l++){let c=this.config.plugins[l];if(c.spec.appendTransaction){let u=a?a[l].n:0,f=a?a[l].state:this,h=u<t.length&&c.spec.appendTransaction.call(c,u?t.slice(u):t,f,r);if(h&&r.filterTransaction(h,l)){if(h.setMeta("appendedTransaction",e),!a){a=[];for(let m=0;m<this.config.plugins.length;m++)a.push(m<l?{state:r,n:t.length}:{state:this,n:0})}t.push(h),r=r.applyInner(h),i=!0}if(a)a[l]={state:r,n:t.length}}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new kc(this.config),r=this.config.fields;for(let a=0;a<r.length;a++){let i=r[a];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new CB(this)}static create(e){let t=new n1(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new kc(t);for(let a=0;a<t.fields.length;a++)r[t.fields[a].name]=t.fields[a].init(e,r);return r}reconfigure(e){let t=new n1(this.schema,e.plugins),r=t.fields,a=new kc(t);for(let i=0;i<r.length;i++){let l=r[i].name;a[l]=this.hasOwnProperty(l)?this[l]:r[i].init(e,a)}return a}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks)t.storedMarks=this.storedMarks.map((r)=>r.toJSON());if(e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw RangeError("The JSON fields `doc` and `selection` are reserved");let a=e[r],i=a.spec.state;if(i&&i.toJSON)t[r]=i.toJSON.call(a,this[a.key])}return t}static fromJSON(e,t,r){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let a=new n1(e.schema,e.plugins),i=new kc(a);return a.fields.forEach((l)=>{if(l.name=="doc")i.doc=Wr.fromJSON(e.schema,t.doc);else if(l.name=="selection")i.selection=Fe.fromJSON(i.doc,t.selection);else if(l.name=="storedMarks"){if(t.storedMarks)i.storedMarks=t.storedMarks.map(e.schema.markFromJSON)}else{if(r)for(let c in r){let u=r[c],f=u.spec.state;if(u.key==l.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,c)){i[l.name]=f.fromJSON.call(u,e,t[c],i);return}}i[l.name]=l.init(e,i)}}),i}}function wB(e,t,r){for(let a in e){let i=e[a];if(i instanceof Function)i=i.bind(t);else if(a=="handleDOMEvents")i=wB(i,t,{});r[a]=i}return r}class qe{constructor(e){if(this.spec=e,this.props={},e.props)wB(e.props,this,this.props);this.key=e.key?e.key.key:EB("plugin")}getState(e){return e[this.key]}}function EB(e){if(e in lR)return e+"$"+ ++lR[e];return lR[e]=0,e+"$"}class Qe{constructor(e="key"){this.key=EB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var sR,bB=!1,Me,Pe,vr,DZ,xB=1,t1=2,$B=4,CB,PZ,lR;var Js=N(()=>{Ws();Rc();sR=Object.create(null);Fe.prototype.visible=!0;Me=class Me extends Fe{constructor(e,t=e){yB(e),yB(t);super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return Fe.near(r);let a=e.resolve(t.map(this.anchor));return new Me(a.parent.inlineContent?a:r,r)}replace(e,t=Se.empty){if(super.replace(e,t),t==Se.empty){let r=this.$from.marksAcross(this.$to);if(r)e.ensureMarks(r)}}eq(e){return e instanceof Me&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new r1(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw RangeError("Invalid input for TextSelection.fromJSON");return new Me(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let a=e.resolve(t);return new this(a,r==t?a:e.resolve(r))}static between(e,t,r){let a=e.pos-t.pos;if(!r||a)r=a>=0?1:-1;if(!t.parent.inlineContent){let i=Fe.findFrom(t,r,!0)||Fe.findFrom(t,-r,!0);if(i)t=i.$head;else return Fe.near(t,r)}if(!e.parent.inlineContent){if(a==0)e=t;else if(e=(Fe.findFrom(e,-r,!0)||Fe.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=a<0)e=t}return new Me(e,t)}};Fe.jsonID("text",Me);Pe=class Pe extends Fe{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r);this.node=t}map(e,t){let{deleted:r,pos:a}=t.mapResult(this.anchor),i=e.resolve(a);if(r)return Fe.near(i);return new Pe(i)}content(){return new Se(le.from(this.node),0,0)}eq(e){return e instanceof Pe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new cR(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw RangeError("Invalid input for NodeSelection.fromJSON");return new Pe(e.resolve(t.anchor))}static create(e,t){return new Pe(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};Pe.prototype.visible=!1;Fe.jsonID("node",Pe);vr=class vr extends Fe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Se.empty){if(t==Se.empty){e.delete(0,e.doc.content.size);let r=Fe.atStart(e.doc);if(!r.eq(e.selection))e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new vr(e)}map(e){return new vr(e)}eq(e){return e instanceof vr}getBookmark(){return DZ}};Fe.jsonID("all",vr);DZ={map(){return this},resolve(e){return new vr(e)}};CB=class CB extends Gg{constructor(e){super(e.doc);this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){if(this.curSelectionFor<this.steps.length)this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length;return this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|xB)&~t1,this.storedMarks=null,this}get selectionSet(){return(this.updated&xB)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=t1,this}ensureMarks(e){if(!Pt.sameSet(this.storedMarks||this.selection.$from.marks(),e))this.setStoredMarks(e);return this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&t1)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~t1,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;if(t)e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Pt.none));return r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let a=this.doc.type.schema;if(t==null){if(!e)return this.deleteSelection();return this.replaceSelectionWith(a.text(e),!0)}else{if(r==null)r=t;if(!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let l=this.doc.resolve(t);i=r==t?l.marks():l.marksAcross(this.doc.resolve(r))}if(this.replaceRangeWith(t,r,a.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length)this.setSelection(Fe.near(this.selection.$to));return this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=$B,this}get scrolledIntoView(){return(this.updated&$B)>0}};PZ=[new Vp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Vp("selection",{init(e,t){return e.selection||Fe.atStart(t.doc)},apply(e){return e.selection}}),new Vp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,a){return a.selection.$cursor?e.storedMarks:null}}),new Vp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];lR=Object.create(null)});function kB(e,t){let{$cursor:r}=e.selection;if(!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0))return null;return r}function NB(e,t,r){let a=t.nodeBefore,i=a,l=t.pos-1;for(;!i.isTextblock;l--){if(i.type.spec.isolating)return!1;let m=i.lastChild;if(!m)return!1;i=m}let c=t.nodeAfter,u=c,f=t.pos+1;for(;!u.isTextblock;f++){if(u.type.spec.isolating)return!1;let m=u.firstChild;if(!m)return!1;u=m}let h=qg(e.doc,l,f,Se.empty);if(!h||h.from!=l||h instanceof gn&&h.slice.size>=f-l)return!1;if(r){let m=e.tr.step(h);m.setSelection(Me.create(m.doc,l)),r(m.scrollIntoView())}return!0}function jp(e,t,r=!1){for(let a=e;a;a=t=="start"?a.firstChild:a.lastChild){if(a.isTextblock)return!0;if(r&&a.childCount!=1)return!1}return!1}function pR(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function OB(e,t){let{$cursor:r}=e.selection;if(!r||(t?!t.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return null;return r}function gR(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let r=e.node(t);if(e.index(t)+1<r.childCount)return e.doc.resolve(e.after(t+1));if(r.type.spec.isolating)break}return null}function yR(e){for(let t=0;t<e.edgeCount;t++){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}function LZ(e){return(t,r)=>{let{$from:a,$to:i}=t.selection;if(t.selection instanceof Pe&&t.selection.node.isBlock){if(!a.parentOffset||!qo(t.doc,a.pos))return!1;if(r)r(t.tr.split(a.pos).scrollIntoView());return!0}if(!a.depth)return!1;let l=[],c,u,f=!1,h=!1;for(let v=a.depth;;v--)if(a.node(v).isBlock){f=a.end(v)==a.pos+(a.depth-v),h=a.start(v)==a.pos-(a.depth-v),u=yR(a.node(v-1).contentMatchAt(a.indexAfter(v-1)));let w=e&&e(i.parent,f,a);l.unshift(w||(f&&u?{type:u}:null)),c=v;break}else{if(v==1)return!1;l.unshift(null)}let m=t.tr;if(t.selection instanceof Me||t.selection instanceof vr)m.deleteSelection();let b=m.mapping.map(a.pos),y=qo(m.doc,b,l.length,l);if(!y)l[0]=u?{type:u}:null,y=qo(m.doc,b,l.length,l);if(!y)return!1;if(m.split(b,l.length,l),!f&&h&&a.node(c).type!=u){let v=m.mapping.map(a.before(c)),S=m.doc.resolve(v);if(u&&a.node(c-1).canReplaceWith(S.index(),S.index()+1,u))m.setNodeMarkup(m.mapping.map(a.before(c)),u)}if(r)r(m.scrollIntoView());return!0}}function BZ(e,t,r){let{nodeBefore:a,nodeAfter:i}=t,l=t.index();if(!a||!i||!a.type.compatibleContent(i.type))return!1;if(!a.content.size&&t.parent.canReplace(l-1,l)){if(r)r(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView());return!0}if(!t.parent.canReplace(l,l+1)||!(i.isTextblock||$a(e.doc,t.pos)))return!1;if(r)r(e.tr.join(t.pos).scrollIntoView());return!0}function IB(e,t,r,a){let{nodeBefore:i,nodeAfter:l}=t,c,u,f=i.type.spec.isolating||l.type.spec.isolating;if(!f&&BZ(e,t,r))return!0;let h=!f&&t.parent.canReplace(t.index(),t.index()+1);if(h&&(c=(u=i.contentMatchAt(i.childCount)).findWrapping(l.type))&&u.matchType(c[0]||l.type).validEnd){if(r){let v=t.pos+l.nodeSize,S=le.empty;for(let R=c.length-1;R>=0;R--)S=le.from(c[R].create(null,S));S=le.from(i.copy(S));let w=e.tr.step(new Cn(t.pos-1,v,t.pos,v,new Se(S,1,0),c.length,!0)),E=w.doc.resolve(v+2*c.length);if(E.nodeAfter&&E.nodeAfter.type==i.type&&$a(w.doc,E.pos))w.join(E.pos);r(w.scrollIntoView())}return!0}let m=l.type.spec.isolating||a>0&&f?null:Fe.findFrom(t,1),b=m&&m.$from.blockRange(m.$to),y=b&&Ys(b);if(y!=null&&y>=t.depth){if(r)r(e.tr.lift(b,y).scrollIntoView());return!0}if(h&&jp(l,"start",!0)&&jp(i,"end")){let v=i,S=[];for(;;){if(S.push(v),v.isTextblock)break;v=v.lastChild}let w=l,E=1;for(;!w.isTextblock;w=w.firstChild)E++;if(v.canReplace(v.childCount,v.childCount,w.content)){if(r){let R=le.empty;for(let H=S.length-1;H>=0;H--)R=le.from(S[H].copy(R));let D=e.tr.step(new Cn(t.pos-S.length,t.pos+l.nodeSize,t.pos+E,t.pos+l.nodeSize-E,new Se(R,S.length,0),0,!0));r(D.scrollIntoView())}return!0}}return!1}function BB(e){return function(t,r){let a=t.selection,i=e<0?a.$from:a.$to,l=i.depth;while(i.node(l).isInline){if(!l)return!1;l--}if(!i.node(l).isTextblock)return!1;if(r)r(t.tr.setSelection(Me.create(t.doc,e<0?i.start(l):i.end(l))));return!0}}function zB(e,t=null){return function(r,a){let{$from:i,$to:l}=r.selection,c=i.blockRange(l),u=c&&Up(c,e,t);if(!u)return!1;if(a)a(r.tr.wrap(c,u).scrollIntoView());return!0}}function wR(e,t=null){return function(r,a){let i=!1;for(let l=0;l<r.selection.ranges.length&&!i;l++){let{$from:{pos:c},$to:{pos:u}}=r.selection.ranges[l];r.doc.nodesBetween(c,u,(f,h)=>{if(i)return!1;if(!f.isTextblock||f.hasMarkup(e,t))return;if(f.type==e)i=!0;else{let m=r.doc.resolve(h),b=m.index();i=m.parent.canReplaceWith(b,b+1,e)}})}if(!i)return!1;if(a){let l=r.tr;for(let c=0;c<r.selection.ranges.length;c++){let{$from:{pos:u},$to:{pos:f}}=r.selection.ranges[c];l.setBlockType(u,f,e,t)}a(l.scrollIntoView())}return!0}}function ER(...e){return function(t,r,a){for(let i=0;i<e.length;i++)if(e[i](t,r,a))return!0;return!1}}var RB=(e,t)=>{if(e.selection.empty)return!1;if(t)t(e.tr.deleteSelection().scrollIntoView());return!0},dR=(e,t,r)=>{let a=kB(e,r);if(!a)return!1;let i=pR(a);if(!i){let c=a.blockRange(),u=c&&Ys(c);if(u==null)return!1;if(t)t(e.tr.lift(c,u).scrollIntoView());return!0}let l=i.nodeBefore;if(IB(e,i,t,-1))return!0;if(a.parent.content.size==0&&(jp(l,"end")||Pe.isSelectable(l)))for(let c=a.depth;;c--){let u=qg(e.doc,a.before(c),a.after(c),Se.empty);if(u&&u.slice.size<u.to-u.from){if(t){let f=e.tr.step(u);f.setSelection(jp(l,"end")?Fe.findFrom(f.doc.resolve(f.mapping.map(i.pos,-1)),-1):Pe.create(f.doc,i.pos-l.nodeSize)),t(f.scrollIntoView())}return!0}if(c==1||a.node(c-1).childCount>1)break}if(l.isAtom&&i.depth==a.depth-1){if(t)t(e.tr.delete(i.pos-l.nodeSize,i.pos).scrollIntoView());return!0}return!1},AB=(e,t,r)=>{let a=kB(e,r);if(!a)return!1;let i=pR(a);return i?NB(e,i,t):!1},MB=(e,t,r)=>{let a=OB(e,r);if(!a)return!1;let i=gR(a);return i?NB(e,i,t):!1},fR=(e,t,r)=>{let{$head:a,empty:i}=e.selection,l=a;if(!i)return!1;if(a.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):a.parentOffset>0)return!1;l=pR(a)}let c=l&&l.nodeBefore;if(!c||!Pe.isSelectable(c))return!1;if(t)t(e.tr.setSelection(Pe.create(e.doc,l.pos-c.nodeSize)).scrollIntoView());return!0},hR=(e,t,r)=>{let a=OB(e,r);if(!a)return!1;let i=gR(a);if(!i)return!1;let l=i.nodeAfter;if(IB(e,i,t,1))return!0;if(a.parent.content.size==0&&(jp(l,"start")||Pe.isSelectable(l))){let c=qg(e.doc,a.before(),a.after(),Se.empty);if(c&&c.slice.size<c.to-c.from){if(t){let u=e.tr.step(c);u.setSelection(jp(l,"start")?Fe.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):Pe.create(u.doc,u.mapping.map(i.pos))),t(u.scrollIntoView())}return!0}}if(l.isAtom&&i.depth==a.depth-1){if(t)t(e.tr.delete(i.pos,i.pos+l.nodeSize).scrollIntoView());return!0}return!1},mR=(e,t,r)=>{let{$head:a,empty:i}=e.selection,l=a;if(!i)return!1;if(a.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):a.parentOffset<a.parent.content.size)return!1;l=gR(a)}let c=l&&l.nodeAfter;if(!c||!Pe.isSelectable(c))return!1;if(t)t(e.tr.setSelection(Pe.create(e.doc,l.pos)).scrollIntoView());return!0},DB=(e,t)=>{let r=e.selection,a=r instanceof Pe,i;if(a){if(r.node.isTextblock||!$a(e.doc,r.from))return!1;i=r.from}else if(i=Cd(e.doc,r.from,-1),i==null)return!1;if(t){let l=e.tr.join(i);if(a)l.setSelection(Pe.create(l.doc,i-e.doc.resolve(i).nodeBefore.nodeSize));t(l.scrollIntoView())}return!0},PB=(e,t)=>{let r=e.selection,a;if(r instanceof Pe){if(r.node.isTextblock||!$a(e.doc,r.to))return!1;a=r.to}else if(a=Cd(e.doc,r.to,1),a==null)return!1;if(t)t(e.tr.join(a).scrollIntoView());return!0},LB=(e,t)=>{let{$from:r,$to:a}=e.selection,i=r.blockRange(a),l=i&&Ys(i);if(l==null)return!1;if(t)t(e.tr.lift(i,l).scrollIntoView());return!0},bR=(e,t)=>{let{$head:r,$anchor:a}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(a))return!1;if(t)t(e.tr.insertText(`
256
+ `).scrollIntoView());return!0},vR=(e,t)=>{let{$head:r,$anchor:a}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(a))return!1;let i=r.node(-1),l=r.indexAfter(-1),c=yR(i.contentMatchAt(l));if(!c||!i.canReplaceWith(l,l,c))return!1;if(t){let u=r.after(),f=e.tr.replaceWith(u,u,c.createAndFill());f.setSelection(Fe.near(f.doc.resolve(u),1)),t(f.scrollIntoView())}return!0},xR=(e,t)=>{let r=e.selection,{$from:a,$to:i}=r;if(r instanceof vr||a.parent.inlineContent||i.parent.inlineContent)return!1;let l=yR(i.parent.contentMatchAt(i.indexAfter()));if(!l||!l.isTextblock)return!1;if(t){let c=(!a.parentOffset&&i.index()<i.parent.childCount?a:i).pos,u=e.tr.insert(c,l.createAndFill());u.setSelection(Me.create(u.doc,c+1)),t(u.scrollIntoView())}return!0},$R=(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let l=r.before();if(qo(e.doc,l)){if(t)t(e.tr.split(l).scrollIntoView());return!0}}let a=r.blockRange(),i=a&&Ys(a);if(i==null)return!1;if(t)t(e.tr.lift(a,i).scrollIntoView());return!0},_Z,_B=(e,t)=>{let{$from:r,to:a}=e.selection,i,l=r.sharedDepth(a);if(l==0)return!1;if(i=r.before(l),t)t(e.tr.setSelection(Pe.create(e.doc,i)));return!0},IZ=(e,t)=>{if(t)t(e.tr.setSelection(new vr(e.doc)));return!0},SR,CR,uR,TB,Ac,zZ,BRe;var HB=N(()=>{Rc();Ws();Js();_Z=LZ();SR=BB(-1),CR=BB(1);uR=ER(RB,dR,fR),TB=ER(RB,hR,mR),Ac={Enter:ER(bR,xR,$R,_Z),"Mod-Enter":vR,Backspace:uR,"Mod-Backspace":uR,"Shift-Backspace":uR,Delete:TB,"Mod-Delete":TB,"Mod-a":IZ},zZ={"Ctrl-h":Ac.Backspace,"Alt-Backspace":Ac["Mod-Backspace"],"Ctrl-d":Ac.Delete,"Ctrl-Alt-Backspace":Ac["Mod-Delete"],"Alt-Delete":Ac["Mod-Delete"],"Alt-d":Ac["Mod-Delete"],"Ctrl-a":SR,"Ctrl-e":CR};for(let e in Ac)zZ[e]=Ac[e];BRe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1});var Mr=N(()=>{HB()});var at=N(()=>{Js()});var Sa=N(()=>{Ws()});function UB(e,t=null){return function(r,a){let{$from:i,$to:l}=r.selection,c=i.blockRange(l);if(!c)return!1;let u=a?r.tr:null;if(!HZ(u,c,e,t))return!1;if(a)a(u.scrollIntoView());return!0}}function HZ(e,t,r,a=null){let i=!1,l=t,c=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(r)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let f=c.resolve(t.start-2);if(l=new Ip(f,f,t.depth),t.endIndex<t.parent.childCount)t=new Ip(t.$from,c.resolve(t.$to.end(t.depth)),t.depth);i=!0}let u=Up(l,r,a,t);if(!u)return!1;if(e)UZ(e,t,u,i,r);return!0}function UZ(e,t,r,a,i){let l=le.empty;for(let m=r.length-1;m>=0;m--)l=le.from(r[m].type.create(r[m].attrs,l));e.step(new Cn(t.start-(a?2:0),t.end,t.start,t.end,new Se(l,0,0),r.length,!0));let c=0;for(let m=0;m<r.length;m++)if(r[m].type==i)c=m+1;let u=r.length-c,f=t.start+r.length-(a?2:0),h=t.parent;for(let{startIndex:m,endIndex:b}=t,y=!0;m<b;m++,y=!1){if(!y&&qo(e.doc,f,u))e.split(f,u),f+=2*u;f+=h.child(m).nodeSize}return e}function FB(e){return function(t,r){let{$from:a,$to:i}=t.selection,l=a.blockRange(i,(c)=>c.childCount>0&&c.firstChild.type==e);if(!l)return!1;if(!r)return!0;if(a.node(l.depth-1).type==e)return FZ(t,r,e,l);else return VZ(t,r,l)}}function FZ(e,t,r,a){let i=e.tr,l=a.end,c=a.$to.end(a.depth);if(l<c)i.step(new Cn(l-1,c,l,c,new Se(le.from(r.create(null,a.parent.copy())),1,0),1,!0)),a=new Ip(i.doc.resolve(a.$from.pos),i.doc.resolve(c),a.depth);let u=Ys(a);if(u==null)return!1;i.lift(a,u);let f=i.doc.resolve(i.mapping.map(l,-1)-1);if($a(i.doc,f.pos)&&f.nodeBefore.type==f.nodeAfter.type)i.join(f.pos);return t(i.scrollIntoView()),!0}function VZ(e,t,r){let a=e.tr,i=r.parent;for(let v=r.end,S=r.endIndex-1,w=r.startIndex;S>w;S--)v-=i.child(S).nodeSize,a.delete(v-1,v+1);let l=a.doc.resolve(r.start),c=l.nodeAfter;if(a.mapping.map(r.end)!=r.start+l.nodeAfter.nodeSize)return!1;let u=r.startIndex==0,f=r.endIndex==i.childCount,h=l.node(-1),m=l.index(-1);if(!h.canReplace(m+(u?0:1),m+1,c.content.append(f?le.empty:le.from(i))))return!1;let b=l.pos,y=b+c.nodeSize;return a.step(new Cn(b-(u?1:0),y+(f?1:0),b+1,y-1,new Se((u?le.empty:le.from(i.copy(le.empty))).append(f?le.empty:le.from(i.copy(le.empty))),u?0:1,f?0:1),u?0:1)),t(a.scrollIntoView()),!0}function VB(e){return function(t,r){let{$from:a,$to:i}=t.selection,l=a.blockRange(i,(h)=>h.childCount>0&&h.firstChild.type==e);if(!l)return!1;let c=l.startIndex;if(c==0)return!1;let u=l.parent,f=u.child(c-1);if(f.type!=e)return!1;if(r){let h=f.lastChild&&f.lastChild.type==u.type,m=le.from(h?e.create():null),b=new Se(le.from(e.create(null,le.from(u.type.create(null,m)))),h?3:1,0),y=l.start,v=l.end;r(t.tr.step(new Cn(y-(h?3:1),v,y,v,b,1,!0)).scrollIntoView())}return!0}}var jB=N(()=>{Rc();Ws()});var o1=N(()=>{jB()});function KB(e,t,r,a,i){var l;for(;;){if(e==r&&t==a)return!0;if(t==(i<0?0:wa(e))){let c=e.parentNode;if(!c||c.nodeType!=1||tb(e)||KZ.test(e.nodeName)||e.contentEditable=="false")return!1;t=xr(e)+(i<0?0:1),e=c}else if(e.nodeType==1){let c=e.childNodes[t+(i<0?-1:0)];if(c.nodeType==1&&c.contentEditable=="false")if((l=c.pmViewDesc)===null||l===void 0?void 0:l.ignoreForSelection)t+=i;else return!1;else e=c,t=i<0?wa(e):0}else return!1}}function wa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function qZ(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=wa(e)}else if(e.parentNode&&!tb(e))t=xr(e),e=e.parentNode;else return null}}function GZ(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!tb(e))t=xr(e)+1,e=e.parentNode;else return null}}function WZ(e,t,r){for(let a=t==0,i=t==wa(e);a||i;){if(e==r)return!0;let l=xr(e);if(e=e.parentNode,!e)return!1;a=a&&l==0,i=i&&l==wa(e)}}function tb(e){let t;for(let r=e;r;r=r.parentNode)if(t=r.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}function wd(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function YZ(e){let t=e.activeElement;while(t&&t.shadowRoot)t=t.shadowRoot.activeElement;return t}function JZ(e,t,r){if(e.caretPositionFromPoint)try{let a=e.caretPositionFromPoint(t,r);if(a)return{node:a.offsetNode,offset:Math.min(wa(a.offsetNode),a.offset)}}catch(a){}if(e.caretRangeFromPoint){let a=e.caretRangeFromPoint(t,r);if(a)return{node:a.startContainer,offset:Math.min(wa(a.startContainer),a.startOffset)}}}function QZ(e){let t=e.defaultView&&e.defaultView.visualViewport;if(t)return{left:0,right:t.width,top:0,bottom:t.height};return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Xs(e,t){return typeof e=="number"?e:e[t]}function ZZ(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,a=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*a}}function GB(e,t,r){if(!LR(t)&&t.left==0)return;let a=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,l=e.dom.ownerDocument;for(let c=r||e.dom;;){if(!c)break;if(c.nodeType!=1){c=Wp(c);continue}let u=c,f=u==l.body,h=f?QZ(l):ZZ(u),m=0,b=0;if(t.top<h.top+Xs(a,"top"))b=-(h.top-t.top+Xs(i,"top"));else if(t.bottom>h.bottom-Xs(a,"bottom"))b=t.bottom-t.top>h.bottom-h.top?t.top+Xs(i,"top")-h.top:t.bottom-h.bottom+Xs(i,"bottom");if(t.left<h.left+Xs(a,"left"))m=-(h.left-t.left+Xs(i,"left"));else if(t.right>h.right-Xs(a,"right"))m=t.right-h.right+Xs(i,"right");if(m||b)if(f)l.defaultView.scrollBy(m,b);else{let{scrollLeft:v,scrollTop:S}=u;if(b)u.scrollTop+=b;if(m)u.scrollLeft+=m;let w=u.scrollLeft-v,E=u.scrollTop-S;t={left:t.left-w,top:t.top-E,right:t.right-w,bottom:t.bottom-E}}let y=f?"fixed":getComputedStyle(c).position;if(/^(fixed|sticky)$/.test(y))break;c=y=="absolute"?c.offsetParent:Wp(c)}}function eee(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),a,i;for(let l=(t.left+t.right)/2,c=r+1;c<Math.min(innerHeight,t.bottom);c+=5){let u=e.root.elementFromPoint(l,c);if(!u||u==e.dom||!e.dom.contains(u))continue;let f=u.getBoundingClientRect();if(f.top>=r-20){a=u,i=f.top;break}}return{refDOM:a,refTop:i,stack:wz(e.dom)}}function wz(e){let t=[],r=e.ownerDocument;for(let a=e;a;a=Wp(a))if(t.push({dom:a,top:a.scrollTop,left:a.scrollLeft}),e==r)break;return t}function tee({refDOM:e,refTop:t,stack:r}){let a=e?e.getBoundingClientRect().top:0;Ez(r,a==0?0:a-t)}function Ez(e,t){for(let r=0;r<e.length;r++){let{dom:a,top:i,left:l}=e[r];if(a.scrollTop!=i+t)a.scrollTop=i+t;if(a.scrollLeft!=l)a.scrollLeft=l}}function nee(e){if(e.setActive)return e.setActive();if(Kp)return e.focus(Kp);let t=wz(e);if(e.focus(Kp==null?{get preventScroll(){return Kp={preventScroll:!0},!0}}:void 0),!Kp)Kp=!1,Ez(t,0)}function Tz(e,t){let r,a=200000000,i,l=0,c=t.top,u=t.top,f,h;for(let m=e.firstChild,b=0;m;m=m.nextSibling,b++){let y;if(m.nodeType==1)y=m.getClientRects();else if(m.nodeType==3)y=Qs(m).getClientRects();else continue;for(let v=0;v<y.length;v++){let S=y[v];if(S.top<=c&&S.bottom>=u){c=Math.max(S.bottom,c),u=Math.min(S.top,u);let w=S.left>t.left?S.left-t.left:S.right<t.left?t.left-S.right:0;if(w<a){if(r=m,a=w,i=w&&r.nodeType==3?{left:S.right<t.left?S.right:S.left,top:t.top}:t,m.nodeType==1&&w)l=b+(t.left>=(S.left+S.right)/2?1:0);continue}}else if(S.top>t.top&&!f&&S.left<=t.left&&S.right>=t.left)f=m,h={left:Math.max(S.left,Math.min(S.right,t.left)),top:S.top};if(!r&&(t.left>=S.right&&t.top>=S.top||t.left>=S.left&&t.top>=S.bottom))l=b+1}}if(!r&&f)r=f,i=h,a=0;if(r&&r.nodeType==3)return ree(r,i);if(!r||a&&r.nodeType==1)return{node:e,offset:l};return Tz(r,i)}function ree(e,t){let r=e.nodeValue.length,a=document.createRange(),i;for(let l=0;l<r;l++){a.setEnd(e,l+1),a.setStart(e,l);let c=Mc(a,1);if(c.top==c.bottom)continue;if(FR(t,c)){i={node:e,offset:l+(t.left>=(c.left+c.right)/2?1:0)};break}}return a.detach(),i||{node:e,offset:0}}function FR(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function oee(e,t){let r=e.parentNode;if(r&&/^li$/i.test(r.nodeName)&&t.left<e.getBoundingClientRect().left)return r;return e}function aee(e,t,r){let{node:a,offset:i}=Tz(t,r),l=-1;if(a.nodeType==1&&!a.firstChild){let c=a.getBoundingClientRect();l=c.left!=c.right&&r.left>(c.left+c.right)/2?1:-1}return e.docView.posFromDOM(a,i,l)}function iee(e,t,r,a){let i=-1;for(let l=t,c=!1;;){if(l==e.dom)break;let u=e.docView.nearestDesc(l,!0),f;if(!u)return null;if(u.dom.nodeType==1&&(u.node.isBlock&&u.parent||!u.contentDOM)&&((f=u.dom.getBoundingClientRect()).width||f.height)){if(u.node.isBlock&&u.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(u.dom.nodeName)){if(!c&&f.left>a.left||f.top>a.top)i=u.posBefore;else if(!c&&f.right<a.left||f.bottom<a.top)i=u.posAfter;c=!0}if(!u.contentDOM&&i<0&&!u.node.isText)return(u.node.isBlock?a.top<(f.top+f.bottom)/2:a.left<(f.left+f.right)/2)?u.posBefore:u.posAfter}l=u.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,r,-1)}function Rz(e,t,r){let a=e.childNodes.length;if(a&&r.top<r.bottom)for(let i=Math.max(0,Math.min(a-1,Math.floor(a*(t.top-r.top)/(r.bottom-r.top))-2)),l=i;;){let c=e.childNodes[l];if(c.nodeType==1){let u=c.getClientRects();for(let f=0;f<u.length;f++){let h=u[f];if(FR(t,h))return Rz(c,t,h)}}if((l=(l+1)%a)==i)break}return e}function see(e,t){let r=e.dom.ownerDocument,a,i=0,l=JZ(r,t.left,t.top);if(l)({node:a,offset:i}=l);let c=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top),u;if(!c||!e.dom.contains(c.nodeType!=1?c.parentNode:c)){let h=e.dom.getBoundingClientRect();if(!FR(t,h))return null;if(c=Rz(e.dom,t,h),!c)return null}if(Or){for(let h=c;a&&h;h=Wp(h))if(h.draggable)a=void 0}if(c=oee(c,t),a){if(Ea&&a.nodeType==1){if(i=Math.min(i,a.childNodes.length),i<a.childNodes.length){let m=a.childNodes[i],b;if(m.nodeName=="IMG"&&(b=m.getBoundingClientRect()).right<=t.left&&b.bottom>t.top)i++}}let h;if(nb&&i&&a.nodeType==1&&(h=a.childNodes[i-1]).nodeType==1&&h.contentEditable=="false"&&h.getBoundingClientRect().top>=t.top)i--;if(a==e.dom&&i==a.childNodes.length-1&&a.lastChild.nodeType==1&&t.top>a.lastChild.getBoundingClientRect().bottom)u=e.state.doc.content.size;else if(i==0||a.nodeType!=1||a.childNodes[i-1].nodeName!="BR")u=iee(e,a,i,t)}if(u==null)u=aee(e,c,t);let f=e.docView.nearestDesc(c,!0);return{pos:u,inside:f?f.posAtStart-f.border:-1}}function LR(e){return e.top<e.bottom||e.left<e.right}function Mc(e,t){let r=e.getClientRects();if(r.length){let a=r[t<0?0:r.length-1];if(LR(a))return a}return Array.prototype.find.call(r,LR)||e.getBoundingClientRect()}function kz(e,t,r){let{node:a,offset:i,atom:l}=e.docView.domFromPos(t,r<0?-1:1),c=nb||Ea;if(a.nodeType==3)if(c&&(lee.test(a.nodeValue)||(r<0?!i:i==a.nodeValue.length))){let f=Mc(Qs(a,i,i),r);if(Ea&&i&&/\s/.test(a.nodeValue[i-1])&&i<a.nodeValue.length){let h=Mc(Qs(a,i-1,i-1),-1);if(h.top==f.top){let m=Mc(Qs(a,i,i+1),-1);if(m.top!=f.top)return Yg(m,m.left<h.left)}}return f}else{let f=i,h=i,m=r<0?1:-1;if(r<0&&!i)h++,m=-1;else if(r>=0&&i==a.nodeValue.length)f--,m=1;else if(r<0)f--;else h++;return Yg(Mc(Qs(a,f,h),m),m<0)}if(!e.state.doc.resolve(t-(l||0)).parent.inlineContent){if(l==null&&i&&(r<0||i==wa(a))){let f=a.childNodes[i-1];if(f.nodeType==1)return TR(f.getBoundingClientRect(),!1)}if(l==null&&i<wa(a)){let f=a.childNodes[i];if(f.nodeType==1)return TR(f.getBoundingClientRect(),!0)}return TR(a.getBoundingClientRect(),r>=0)}if(l==null&&i&&(r<0||i==wa(a))){let f=a.childNodes[i-1],h=f.nodeType==3?Qs(f,wa(f)-(c?0:1)):f.nodeType==1&&(f.nodeName!="BR"||!f.nextSibling)?f:null;if(h)return Yg(Mc(h,1),!1)}if(l==null&&i<wa(a)){let f=a.childNodes[i];while(f.pmViewDesc&&f.pmViewDesc.ignoreForCoords)f=f.nextSibling;let h=!f?null:f.nodeType==3?Qs(f,0,c?0:1):f.nodeType==1?f:null;if(h)return Yg(Mc(h,-1),!0)}return Yg(Mc(a.nodeType==3?Qs(a):a,-r),r>=0)}function Yg(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function TR(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function Az(e,t,r){let a=e.state,i=e.root.activeElement;if(a!=t)e.updateState(t);if(i!=e.dom)e.focus();try{return r()}finally{if(a!=t)e.updateState(a);if(i!=e.dom&&i)i.focus()}}function cee(e,t,r){let a=t.selection,i=r=="up"?a.$from:a.$to;return Az(e,t,()=>{let{node:l}=e.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let u=e.docView.nearestDesc(l,!0);if(!u)break;if(u.node.isBlock){l=u.contentDOM||u.dom;break}l=u.dom.parentNode}let c=kz(e,i.pos,1);for(let u=l.firstChild;u;u=u.nextSibling){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=Qs(u,0,u.nodeValue.length).getClientRects();else continue;for(let h=0;h<f.length;h++){let m=f[h];if(m.bottom>m.top+1&&(r=="up"?c.top-m.top>(m.bottom-c.top)*2:m.bottom-c.bottom>(c.bottom-m.top)*2))return!1}}return!0})}function dee(e,t,r){let{$head:a}=t.selection;if(!a.parent.isTextblock)return!1;let i=a.parentOffset,l=!i,c=i==a.parent.content.size,u=e.domSelection();if(!u)return a.pos==a.start()||a.pos==a.end();if(!uee.test(a.parent.textContent)||!u.modify)return r=="left"||r=="backward"?l:c;return Az(e,t,()=>{let{focusNode:f,focusOffset:h,anchorNode:m,anchorOffset:b}=e.domSelectionRange(),y=u.caretBidiLevel;u.modify("move",r,"character");let v=a.depth?e.docView.domAfterPos(a.before()):e.dom,{focusNode:S,focusOffset:w}=e.domSelectionRange(),E=S&&!v.contains(S.nodeType==1?S:S.parentNode)||f==S&&h==w;try{if(u.collapse(m,b),f&&(f!=m||h!=b)&&u.extend)u.extend(f,h)}catch(R){}if(y!=null)u.caretBidiLevel=y;return E})}function fee(e,t,r){if(WB==t&&YB==r)return JB;return WB=t,YB=r,JB=r=="up"||r=="down"?cee(e,t,r):dee(e,t,r)}class Jp{constructor(e,t,r,a){this.parent=e,this.children=t,this.dom=r,this.contentDOM=a,this.dirty=Ta,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){if(this.parent=void 0,this.dom.pmViewDesc==this)this.dom.pmViewDesc=void 0;for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let a=this.children[t];if(a==e)return r;r+=a.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,l;if(e==this.contentDOM)i=e.childNodes[t-1];else{while(e.parentNode!=this.contentDOM)e=e.parentNode;i=e.previousSibling}while(i&&!((l=i.pmViewDesc)&&l.parent==this))i=i.previousSibling;return i?this.posBeforeChild(l)+l.size:this.posAtStart}else{let i,l;if(e==this.contentDOM)i=e.childNodes[t];else{while(e.parentNode!=this.contentDOM)e=e.parentNode;i=e.nextSibling}while(i&&!((l=i.pmViewDesc)&&l.parent==this))i=i.nextSibling;return i?this.posBeforeChild(l):this.posAtEnd}let a;if(e==this.dom&&this.contentDOM)a=t>xr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){a=!1;break}if(i.previousSibling)break}if(a==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){a=!0;break}if(i.nextSibling)break}}return(a==null?r>0:a)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,a=e;a;a=a.parentNode){let i=this.getDesc(a),l;if(i&&(!t||i.node))if(r&&(l=i.nodeDOM)&&!(l.nodeType==1?l.contains(e.nodeType==1?e:e.parentNode):l==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let a=e;a;a=a.parentNode){let i=this.getDesc(a);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let a=this.children[t],i=r+a.size;if(r==e&&i!=r){while(!a.border&&a.children.length)for(let l=0;l<a.children.length;l++){let c=a.children[l];if(c.size){a=c;break}}return a}if(e<i)return a.descAt(e-r-a.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,a=0;for(let i=0;r<this.children.length;r++){let l=this.children[r],c=i+l.size;if(c>e||l instanceof jR){a=e-i;break}i=c}if(a)return this.children[r].domFromPos(a-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof VR&&i.side>=0;r--);if(t<=0){let i,l=!0;for(;;r--,l=!1)if(i=r?this.children[r-1]:null,!i||i.dom.parentNode==this.contentDOM)break;if(i&&t&&l&&!i.border&&!i.domAtom)return i.domFromPos(i.size,t);return{node:this.contentDOM,offset:i?xr(i.dom)+1:0}}else{let i,l=!0;for(;;r++,l=!1)if(i=r<this.children.length?this.children[r]:null,!i||i.dom.parentNode==this.contentDOM)break;if(i&&l&&!i.border&&!i.domAtom)return i.domFromPos(0,t);return{node:this.contentDOM,offset:i?xr(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let a=-1,i=-1;for(let l=r,c=0;;c++){let u=this.children[c],f=l+u.size;if(a==-1&&e<=f){let h=l+u.border;if(e>=h&&t<=f-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(e,t,h);e=l;for(let m=c;m>0;m--){let b=this.children[m-1];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(1)){a=xr(b.dom)+1;break}e-=b.size}if(a==-1)a=0}if(a>-1&&(f>t||c==this.children.length-1)){t=f;for(let h=c+1;h<this.children.length;h++){let m=this.children[h];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=xr(m.dom);break}t+=m.size}if(i==-1)i=this.contentDOM.childNodes.length;break}l=f}return{node:this.contentDOM,from:e,to:t,fromOffset:a,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,a=!1){let i=Math.min(e,t),l=Math.max(e,t);for(let y=0,v=0;y<this.children.length;y++){let S=this.children[y],w=v+S.size;if(i>v&&l<w)return S.setSelection(e-v-S.border,t-v-S.border,r,a);v=w}let c=this.domFromPos(e,e?-1:1),u=t==e?c:this.domFromPos(t,t?-1:1),f=r.root.getSelection(),h=r.domSelectionRange(),m=!1;if((Ea||Or)&&e==t){let{node:y,offset:v}=c;if(y.nodeType==3){if(m=!!(v&&y.nodeValue[v-1]==`
257
+ `),m&&v==y.nodeValue.length)for(let S=y,w;S;S=S.parentNode){if(w=S.nextSibling){if(w.nodeName=="BR")c=u={node:w.parentNode,offset:xr(w)+1};break}let E=S.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let S=y.childNodes[v-1];m=S&&(S.nodeName=="BR"||S.contentEditable=="false")}}if(Ea&&h.focusNode&&h.focusNode!=u.node&&h.focusNode.nodeType==1){let y=h.focusNode.childNodes[h.focusOffset];if(y&&y.contentEditable=="false")a=!0}if(!(a||m&&Or)&&Ad(c.node,c.offset,h.anchorNode,h.anchorOffset)&&Ad(u.node,u.offset,h.focusNode,h.focusOffset))return;let b=!1;if((f.extend||e==t)&&!(m&&Ea)){f.collapse(c.node,c.offset);try{if(e!=t)f.extend(u.node,u.offset);b=!0}catch(y){}}if(!b){if(e>t){let v=c;c=u,u=v}let y=document.createRange();y.setEnd(u.node,u.offset),y.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(y)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,a=0;a<this.children.length;a++){let i=this.children[a],l=r+i.size;if(r==l?e<=l&&t>=r:e<l&&t>r){let c=r+i.border,u=l-i.border;if(e>=c&&t<=u){if(this.dirty=e==r||t==l?Ed:XB,e==c&&t==u&&(i.contentLost||i.dom.parentNode!=this.contentDOM))i.dirty=ni;else i.markDirty(e-c,t-c);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ed:ni}r=l}this.dirty=Ed}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Ed:XB;if(t.dirty<r)t.dirty=r}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}function QB(e,t,r,a,i){Pz(a,t,e);let l=new Lc(void 0,e,t,r,a,a,a);if(l.contentDOM)l.updateChildren(i,0);return l}function Oz(e,t,r){let a=e.firstChild,i=!1;for(let l=0;l<t.length;l++){let c=t[l],u=c.dom;if(u.parentNode==e){while(u!=a)a=ZB(a),i=!0;a=a.nextSibling}else i=!0,e.insertBefore(u,a);if(c instanceof Pc){let f=a?a.previousSibling:e.lastChild;Oz(c.contentDOM,c.children,r),a=f?f.nextSibling:e.firstChild}}while(a)a=ZB(a),i=!0;if(i&&r.trackWrites==e)r.trackWrites=null}function _R(e,t,r){if(e.length==0)return Td;let a=r?Td[0]:new Jg,i=[a];for(let l=0;l<e.length;l++){let c=e[l].type.attrs;if(!c)continue;if(c.nodeName)i.push(a=new Jg(c.nodeName));for(let u in c){let f=c[u];if(f==null)continue;if(r&&i.length==1)i.push(a=new Jg(t.isInline?"span":"div"));if(u=="class")a.class=(a.class?a.class+" ":"")+f;else if(u=="style")a.style=(a.style?a.style+";":"")+f;else if(u!="nodeName")a[u]=f}}return i}function Dz(e,t,r,a){if(r==Td&&a==Td)return t;let i=t;for(let l=0;l<a.length;l++){let c=a[l],u=r[l];if(l){let f;if(u&&u.nodeName==c.nodeName&&i!=e&&(f=i.parentNode)&&f.nodeName.toLowerCase()==c.nodeName)i=f;else f=document.createElement(c.nodeName),f.pmIsDeco=!0,f.appendChild(i),u=Td[0],i=f}pee(i,u||Td[0],c)}return i}function pee(e,t,r){for(let a in t)if(a!="class"&&a!="style"&&a!="nodeName"&&!(a in r))e.removeAttribute(a);for(let a in r)if(a!="class"&&a!="style"&&a!="nodeName"&&r[a]!=t[a])e.setAttribute(a,r[a]);if(t.class!=r.class){let a=t.class?t.class.split(" ").filter(Boolean):[],i=r.class?r.class.split(" ").filter(Boolean):[];for(let l=0;l<a.length;l++)if(i.indexOf(a[l])==-1)e.classList.remove(a[l]);for(let l=0;l<i.length;l++)if(a.indexOf(i[l])==-1)e.classList.add(i[l]);if(e.classList.length==0)e.removeAttribute("class")}if(t.style!=r.style){if(t.style){let a=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;while(i=a.exec(t.style))e.style.removeProperty(i[1])}if(r.style)e.style.cssText+=r.style}}function Pz(e,t,r){return Dz(e,e,Td,_R(t,r,e.nodeType!=1))}function a1(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].type.eq(t[r].type))return!1;return!0}function ZB(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Lz{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=hee(e.node.content,e)}destroyBetween(e,t){if(e==t)return;for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r,a){let i=0,l=this.stack.length>>1,c=Math.min(l,e.length);while(i<c&&(i==l-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1)i++;while(i<l)this.destroyRest(),this.top.dirty=Ta,this.index=this.stack.pop(),this.top=this.stack.pop(),l--;while(l<e.length){this.stack.push(this.top,this.index+1);let u=-1,f=this.top.children.length;if(a<this.preMatch.index)f=Math.min(this.index+3,f);for(let h=this.index;h<f;h++){let m=this.top.children[h];if(m.matchesMark(e[l])&&!this.isLocked(m.dom)){u=h;break}}if(u<0&&this.index<this.top.children.length){let h=this.top.children[this.index];if(h instanceof Pc&&h.dirty!=ni&&h.mark.type==e[l].type&&h.spec.update&&!this.isLocked(h.dom)&&h.spec.update(e[l]))h.mark=e[l],u=this.index,this.changed=!0}if(u>-1){if(u>this.index)this.changed=!0,this.destroyBetween(this.index,u);this.top=this.top.children[this.index]}else{let h=Pc.create(this.top,e[l],t,r);this.top.children.splice(this.index,0,h),this.top=h,this.changed=!0}this.index=0,l++}}findNodeMatch(e,t,r,a){let i=-1,l;if(a>=this.preMatch.index&&(l=this.preMatch.matches[a-this.preMatch.index]).parent==this.top&&l.matchesNode(e,t,r))i=this.top.children.indexOf(l,this.index);else for(let c=this.index,u=Math.min(this.top.children.length,c+5);c<u;c++){let f=this.top.children[c];if(f.matchesNode(e,t,r)&&!this.preMatch.matched.has(f)){i=c;break}}if(i<0)return!1;return this.destroyBetween(this.index,i),this.index++,!0}updateNodeAt(e,t,r,a,i){let l=this.top.children[a];if(l.dirty==ni&&l.dom==l.contentDOM)l.dirty=Ed;if(!l.update(e,t,r,i))return!1;return this.destroyBetween(this.index,a),this.index++,!0}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let a=this.index;a<this.top.children.length;a++)if(this.top.children[a]==r)return a}return-1}e=t}}updateNextNode(e,t,r,a,i,l){for(let c=this.index;c<this.top.children.length;c++){let u=this.top.children[c];if(u instanceof Lc){let f=this.preMatch.matched.get(u);if(f!=null&&f!=i)return!1;let h=u.dom,m,b=this.isLocked(h)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=ni&&a1(t,u.outerDeco));if(!b&&u.update(e,t,r,a)){if(this.destroyBetween(this.index,c),u.dom!=h)this.changed=!0;return this.index++,!0}else if(!b&&(m=this.recreateWrapper(u,e,t,r,a,l))){if(this.destroyBetween(this.index,c),this.top.children[this.index]=m,m.contentDOM)m.dirty=Ed,m.updateChildren(a,l+1),m.dirty=Ta;return this.changed=!0,this.index++,!0}break}}return!1}recreateWrapper(e,t,r,a,i,l){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!a1(r,e.outerDeco)||!a.eq(e.innerDeco))return null;let c=Lc.create(this.top,t,r,a,i,l);if(c.contentDOM){c.children=e.children,e.children=[];for(let u of c.children)u.parent=c}return e.destroy(),c}addNode(e,t,r,a,i){let l=Lc.create(this.top,e,t,r,a,i);if(l.contentDOM)l.updateChildren(a,i+1);this.top.children.splice(this.index++,0,l),this.changed=!0}placeWidget(e,t,r){let a=this.index<this.top.children.length?this.top.children[this.index]:null;if(a&&a.matchesWidget(e)&&(e==a.widget||!a.widget.type.toDOM.parentNode))this.index++;else{let i=new VR(this.top,e,t,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;while(e instanceof Pc)t=e,e=t.children[t.children.length-1];if(!e||!(e instanceof d1)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text)){if((Or||$r)&&e&&e.dom.contentEditable=="false")this.addHackNode("IMG",t);this.addHackNode("BR",this.top)}}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);if(e=="IMG")r.className="ProseMirror-separator",r.alt="";if(e=="BR")r.className="ProseMirror-trailingBreak";let a=new jR(this.top,[],r,null);if(t!=this.top)t.children.push(a);else t.children.splice(this.index++,0,a);this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function hee(e,t){let r=t,a=r.children.length,i=e.childCount,l=new Map,c=[];e:while(i>0){let u;for(;;)if(a){let h=r.children[a-1];if(h instanceof Pc)r=h,a=h.children.length;else{u=h,a--;break}}else if(r==t)break e;else a=r.parent.children.indexOf(r),r=r.parent;let f=u.node;if(!f)continue;if(f!=e.child(i-1))break;--i,l.set(u,i),c.push(u)}return{index:i,matched:l,matches:c.reverse()}}function mee(e,t){return e.type.side-t.type.side}function gee(e,t,r,a){let i=t.locals(e),l=0;if(i.length==0){for(let h=0;h<e.childCount;h++){let m=e.child(h);a(m,i,t.forChild(l,m),h),l+=m.nodeSize}return}let c=0,u=[],f=null;for(let h=0;;){let m,b;while(c<i.length&&i[c].to==l){let E=i[c++];if(E.widget)if(!m)m=E;else(b||(b=[m])).push(E)}if(m)if(b){b.sort(mee);for(let E=0;E<b.length;E++)r(b[E],h,!!f)}else r(m,h,!!f);let y,v;if(f)v=-1,y=f,f=null;else if(h<e.childCount)v=h,y=e.child(h++);else break;for(let E=0;E<u.length;E++)if(u[E].to<=l)u.splice(E--,1);while(c<i.length&&i[c].from<=l&&i[c].to>l)u.push(i[c++]);let S=l+y.nodeSize;if(y.isText){let E=S;if(c<i.length&&i[c].from<E)E=i[c].from;for(let R=0;R<u.length;R++)if(u[R].to<E)E=u[R].to;if(E<S)f=y.cut(E-l),y=y.cut(0,E-l),S=E,v=-1}else while(c<i.length&&i[c].to<S)c++;let w=y.isInline&&!y.isLeaf?u.filter((E)=>!E.inline):u.slice();a(y,w,t.forChild(l,y),v),l=S}}function bee(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function yee(e,t,r,a){for(let i=0,l=0;i<e.childCount&&l<=a;){let c=e.child(i++),u=l;if(l+=c.nodeSize,!c.isText)continue;let f=c.text;while(i<e.childCount){let h=e.child(i++);if(l+=h.nodeSize,!h.isText)break;f+=h.text}if(l>=r){if(l>=a&&f.slice(a-t.length-u,a-u)==t)return a-t.length;let h=u<a?f.lastIndexOf(t,a-u-1):-1;if(h>=0&&h+t.length+u>=r)return u+h;if(r==a&&f.length>=a+t.length-u&&f.slice(a-u,a-u+t.length)==t)return a}}return-1}function IR(e,t,r,a,i){let l=[];for(let c=0,u=0;c<e.length;c++){let f=e[c],h=u,m=u+=f.size;if(h>=r||m<=t)l.push(f);else{if(h<t)l.push(f.slice(0,t-h,a));if(i)l.push(i),i=void 0;if(m>r)l.push(f.slice(r-h,f.size,a))}}return l}function KR(e,t=null){let r=e.domSelectionRange(),a=e.state.doc;if(!r.focusNode)return null;let i=e.docView.nearestDesc(r.focusNode),l=i&&i.size==0,c=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(c<0)return null;let u=a.resolve(c),f,h;if(u1(r)){f=c;while(i&&!i.node)i=i.parent;let b=i.node;if(i&&b.isAtom&&Pe.isSelectable(b)&&i.parent&&!(b.isInline&&WZ(r.focusNode,r.focusOffset,i.dom))){let y=i.posBefore;h=new Pe(c==y?u:a.resolve(y))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let b=c,y=c;for(let v=0;v<r.rangeCount;v++){let S=r.getRangeAt(v);b=Math.min(b,e.docView.posFromDOM(S.startContainer,S.startOffset,1)),y=Math.max(y,e.docView.posFromDOM(S.endContainer,S.endOffset,-1))}if(b<0)return null;[f,c]=y==e.state.selection.anchor?[y,b]:[b,y],u=a.resolve(c)}else f=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(f<0)return null}let m=a.resolve(f);if(!h){let b=t=="pointer"||e.state.selection.head<u.pos&&!l?1:-1;h=qR(e,m,u,b)}return h}function _z(e){return e.editable?e.hasFocus():Bz(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function tl(e,t=!1){let r=e.state.selection;if(Iz(e,r),!_z(e))return;let a=e.input.mouseDown;if(!t&&$r&&a){let i=e.domSelectionRange(),l=e.domObserver.currentSelection;if(i.anchorNode&&l.anchorNode&&Ad(i.anchorNode,i.anchorOffset,l.anchorNode,l.anchorOffset)&&a.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)xee(e);else{let{anchor:i,head:l}=r,c,u;if(ez&&!(r instanceof Me)){if(!r.$from.parent.inlineContent)c=tz(e,r.from);if(!r.empty&&!r.$from.parent.inlineContent)u=tz(e,r.to)}if(e.docView.setSelection(i,l,e,t),ez){if(c)nz(c);if(u)nz(u)}if(r.visible)e.dom.classList.remove("ProseMirror-hideselection");else if(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document)vee(e)}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}function tz(e,t){let{node:r,offset:a}=e.docView.domFromPos(t,0),i=a<r.childNodes.length?r.childNodes[a]:null,l=a?r.childNodes[a-1]:null;if(Or&&i&&i.contentEditable=="false")return RR(i);if((!i||i.contentEditable=="false")&&(!l||l.contentEditable=="false")){if(i)return RR(i);else if(l)return RR(l)}}function RR(e){if(e.contentEditable="true",Or&&e.draggable)e.draggable=!1,e.wasDraggable=!0;return e}function nz(e){if(e.contentEditable="false",e.wasDraggable)e.draggable=!0,e.wasDraggable=null}function vee(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let r=e.domSelectionRange(),a=r.anchorNode,i=r.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{if(r.anchorNode!=a||r.anchorOffset!=i)t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{if(!_z(e)||e.state.selection.visible)e.dom.classList.remove("ProseMirror-hideselection")},20)})}function xee(e){let t=e.domSelection();if(!t)return;let r=e.cursorWrapper.dom,a=r.nodeName=="IMG";if(a)t.collapse(r.parentNode,xr(r)+1);else t.collapse(r,0);if(!a&&!e.state.selection.visible&&go&&Dc<=11)r.disabled=!0,r.disabled=!1}function Iz(e,t){if(t instanceof Pe){let r=e.docView.descAt(t.from);if(r!=e.lastSelectedViewDesc){if(rz(e),r)r.selectNode();e.lastSelectedViewDesc=r}}else rz(e)}function rz(e){if(e.lastSelectedViewDesc){if(e.lastSelectedViewDesc.parent)e.lastSelectedViewDesc.deselectNode();e.lastSelectedViewDesc=void 0}}function qR(e,t,r,a){return e.someProp("createSelectionBetween",(i)=>i(e,t,r))||Me.between(t,r,a)}function oz(e){if(e.editable&&!e.hasFocus())return!1;return Bz(e)}function Bz(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(r){return!1}}function $ee(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return Ad(t.node,t.offset,r.anchorNode,r.anchorOffset)}function BR(e,t){let{$anchor:r,$head:a}=e.selection,i=t>0?r.max(a):r.min(a),l=!i.parent.inlineContent?i:i.depth?e.doc.resolve(t>0?i.after():i.before()):null;return l&&Fe.findFrom(l,t)}function Nc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function az(e,t,r){let a=e.state.selection;if(a instanceof Me){if(r.indexOf("s")>-1){let{$head:i}=a,l=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!l||l.isText||!l.isLeaf)return!1;let c=e.state.doc.resolve(i.pos+l.nodeSize*(t<0?-1:1));return Nc(e,new Me(a.$anchor,c))}else if(!a.empty)return!1;else if(e.endOfTextblock(t>0?"forward":"backward")){let i=BR(e.state,t);if(i&&i instanceof Pe)return Nc(e,i);return!1}else if(!(Ca&&r.indexOf("m")>-1)){let i=a.$head,l=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,c;if(!l||l.isText)return!1;let u=t<0?i.pos-l.nodeSize:i.pos;if(!(l.isAtom||(c=e.docView.descAt(u))&&!c.contentDOM))return!1;if(Pe.isSelectable(l))return Nc(e,new Pe(t<0?e.state.doc.resolve(i.pos-l.nodeSize):i));else if(nb)return Nc(e,new Me(e.state.doc.resolve(t<0?u:u+l.nodeSize)));else return!1}}else if(a instanceof Pe&&a.node.isInline)return Nc(e,new Me(t>0?a.$to:a.$from));else{let i=BR(e.state,t);if(i)return Nc(e,i);return!1}}function i1(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Xg(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function qp(e,t){return t<0?See(e):Cee(e)}function See(e){let t=e.domSelectionRange(),r=t.focusNode,a=t.focusOffset;if(!r)return;let i,l,c=!1;if(Ea&&r.nodeType==1&&a<i1(r)&&Xg(r.childNodes[a],-1))c=!0;for(;;)if(a>0)if(r.nodeType!=1)break;else{let u=r.childNodes[a-1];if(Xg(u,-1))i=r,l=--a;else if(u.nodeType==3)r=u,a=r.nodeValue.length;else break}else if(zz(r))break;else{let u=r.previousSibling;while(u&&Xg(u,-1))i=r.parentNode,l=xr(u),u=u.previousSibling;if(!u){if(r=r.parentNode,r==e.dom)break;a=0}else r=u,a=i1(r)}if(c)zR(e,r,a);else if(i)zR(e,i,l)}function Cee(e){let t=e.domSelectionRange(),r=t.focusNode,a=t.focusOffset;if(!r)return;let i=i1(r),l,c;for(;;)if(a<i){if(r.nodeType!=1)break;let u=r.childNodes[a];if(Xg(u,1))l=r,c=++a;else break}else if(zz(r))break;else{let u=r.nextSibling;while(u&&Xg(u,1))l=u.parentNode,c=xr(u)+1,u=u.nextSibling;if(!u){if(r=r.parentNode,r==e.dom)break;a=i=0}else r=u,a=0,i=i1(r)}if(l)zR(e,l,c)}function zz(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function wee(e,t){while(e&&t==e.childNodes.length&&!tb(e))t=xr(e)+1,e=e.parentNode;while(e&&t<e.childNodes.length){let r=e.childNodes[t];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;e=r,t=0}}function Eee(e,t){while(e&&!t&&!tb(e))t=xr(e),e=e.parentNode;while(e&&t){let r=e.childNodes[t-1];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;e=r,t=e.childNodes.length}}function zR(e,t,r){if(t.nodeType!=3){let l,c;if(c=wee(t,r))t=c,r=0;else if(l=Eee(t,r))t=l,r=l.nodeValue.length}let a=e.domSelection();if(!a)return;if(u1(a)){let l=document.createRange();l.setEnd(t,r),l.setStart(t,r),a.removeAllRanges(),a.addRange(l)}else if(a.extend)a.extend(t,r);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{if(e.state==i)tl(e)},50)}function iz(e,t){let r=e.state.doc.resolve(t);if(!($r||Cz)&&r.parent.inlineContent){let i=e.coordsAtPos(t);if(t>r.start()){let l=e.coordsAtPos(t-1),c=(l.top+l.bottom)/2;if(c>i.top&&c<i.bottom&&Math.abs(l.left-i.left)>1)return l.left<i.left?"ltr":"rtl"}if(t<r.end()){let l=e.coordsAtPos(t+1),c=(l.top+l.bottom)/2;if(c>i.top&&c<i.bottom&&Math.abs(l.left-i.left)>1)return l.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function sz(e,t,r){let a=e.state.selection;if(a instanceof Me&&!a.empty||r.indexOf("s")>-1)return!1;if(Ca&&r.indexOf("m")>-1)return!1;let{$from:i,$to:l}=a;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let c=BR(e.state,t);if(c&&c instanceof Pe)return Nc(e,c)}if(!i.parent.inlineContent){let c=t<0?i:l,u=a instanceof vr?Fe.near(c,t):Fe.findFrom(c,t);return u?Nc(e,u):!1}return!1}function lz(e,t){if(!(e.state.selection instanceof Me))return!0;let{$head:r,$anchor:a,empty:i}=e.state.selection;if(!r.sameParent(a))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let l=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(l&&!l.isText){let c=e.state.tr;if(t<0)c.delete(r.pos-l.nodeSize,r.pos);else c.delete(r.pos,r.pos+l.nodeSize);return e.dispatch(c),!0}return!1}function cz(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function Tee(e){if(!Or||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let a=t.firstChild;cz(e,a,"true"),setTimeout(()=>cz(e,a,"false"),20)}return!1}function Ree(e){let t="";if(e.ctrlKey)t+="c";if(e.metaKey)t+="m";if(e.altKey)t+="a";if(e.shiftKey)t+="s";return t}function kee(e,t){let r=t.keyCode,a=Ree(t);if(r==8||Ca&&r==72&&a=="c")return lz(e,-1)||qp(e,-1);else if(r==46&&!t.shiftKey||Ca&&r==68&&a=="c")return lz(e,1)||qp(e,1);else if(r==13||r==27)return!0;else if(r==37||Ca&&r==66&&a=="c"){let i=r==37?iz(e,e.state.selection.from)=="ltr"?-1:1:-1;return az(e,i,a)||qp(e,i)}else if(r==39||Ca&&r==70&&a=="c"){let i=r==39?iz(e,e.state.selection.from)=="ltr"?1:-1:1;return az(e,i,a)||qp(e,i)}else if(r==38||Ca&&r==80&&a=="c")return sz(e,-1,a)||qp(e,-1);else if(r==40||Ca&&r==78&&a=="c")return Tee(e)||sz(e,1,a)||qp(e,1);else if(a==(Ca?"m":"c")&&(r==66||r==73||r==89||r==90))return!0;return!1}function GR(e,t){e.someProp("transformCopied",(v)=>{t=v(t,e)});let r=[],{content:a,openStart:i,openEnd:l}=t;while(i>1&&l>1&&a.childCount==1&&a.firstChild.childCount==1){i--,l--;let v=a.firstChild;r.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),a=v.content}let c=e.someProp("clipboardSerializer")||Xi.fromSchema(e.state.schema),u=Kz(),f=u.createElement("div");f.appendChild(c.serializeFragment(a,{document:u}));let h=f.firstChild,m,b=0;while(h&&h.nodeType==1&&(m=jz[h.nodeName.toLowerCase()])){for(let v=m.length-1;v>=0;v--){let S=u.createElement(m[v]);while(f.firstChild)S.appendChild(f.firstChild);f.appendChild(S),b++}h=f.firstChild}if(h&&h.nodeType==1)h.setAttribute("data-pm-slice",`${i} ${l}${b?` -${b}`:""} ${JSON.stringify(r)}`);let y=e.someProp("clipboardTextSerializer",(v)=>v(t,e))||t.content.textBetween(0,t.content.size,`
258
+
259
+ `);return{dom:f,text:y,slice:t}}function Hz(e,t,r,a,i){let l=i.parent.type.spec.code,c,u;if(!r&&!t)return null;let f=!!t&&(a||l||!r);if(f){if(e.someProp("transformPastedText",(y)=>{t=y(t,l||a,e)}),l)return u=new Se(le.from(e.state.schema.text(t.replace(/\r\n?/g,`
260
+ `))),0,0),e.someProp("transformPasted",(y)=>{u=y(u,e,!0)}),u;let b=e.someProp("clipboardTextParser",(y)=>y(t,i,a,e));if(b)u=b;else{let y=i.marks(),{schema:v}=e.state,S=Xi.fromSchema(v);c=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((w)=>{let E=c.appendChild(document.createElement("p"));if(w)E.appendChild(S.serializeNode(v.text(w,y)))})}}else if(e.someProp("transformPastedHTML",(b)=>{r=b(r,e)}),c=Oee(r),nb)Dee(c);let h=c&&c.querySelector("[data-pm-slice]"),m=h&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(h.getAttribute("data-pm-slice")||"");if(m&&m[3])for(let b=+m[3];b>0;b--){let y=c.firstChild;while(y&&y.nodeType!=1)y=y.nextSibling;if(!y)break;c=y}if(!u)u=(e.someProp("clipboardParser")||e.someProp("domParser")||va.fromSchema(e.state.schema)).parseSlice(c,{preserveWhitespace:!!(f||m),context:i,ruleFromNode(y){if(y.nodeName=="BR"&&!y.nextSibling&&y.parentNode&&!Aee.test(y.parentNode.nodeName))return{ignore:!0};return null}});if(m)u=Pee(uz(u,+m[1],+m[2]),m[4]);else if(u=Se.maxOpen(Mee(u.content,i),!0),u.openStart||u.openEnd){let b=0,y=0;for(let v=u.content.firstChild;b<u.openStart&&!v.type.spec.isolating;b++,v=v.firstChild);for(let v=u.content.lastChild;y<u.openEnd&&!v.type.spec.isolating;y++,v=v.lastChild);u=uz(u,b,y)}return e.someProp("transformPasted",(b)=>{u=b(u,e,f)}),u}function Mee(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),l,c=[];if(e.forEach((u)=>{if(!c)return;let f=i.findWrapping(u.type),h;if(!f)return c=null;if(h=c.length&&l.length&&Fz(f,l,u,c[c.length-1],0))c[c.length-1]=h;else{if(c.length)c[c.length-1]=Vz(c[c.length-1],l.length);let m=Uz(u,f);c.push(m),i=i.matchType(m.type),l=f}}),c)return le.from(c)}return e}function Uz(e,t,r=0){for(let a=t.length-1;a>=r;a--)e=t[a].create(null,le.from(e));return e}function Fz(e,t,r,a,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let l=Fz(e,t,r,a.lastChild,i+1);if(l)return a.copy(a.content.replaceChild(a.childCount-1,l));if(a.contentMatchAt(a.childCount).matchType(i==e.length-1?r.type:e[i+1]))return a.copy(a.content.append(le.from(Uz(r,e,i+1))))}}function Vz(e,t){if(t==0)return e;let r=e.content.replaceChild(e.childCount-1,Vz(e.lastChild,t-1)),a=e.contentMatchAt(e.childCount).fillBefore(le.empty,!0);return e.copy(r.append(a))}function HR(e,t,r,a,i,l){let c=t<0?e.firstChild:e.lastChild,u=c.content;if(e.childCount>1)l=0;if(i<a-1)u=HR(u,t,r,a,i+1,l);if(i>=r)u=t<0?c.contentMatchAt(0).fillBefore(u,l<=i).append(u):u.append(c.contentMatchAt(c.childCount).fillBefore(le.empty,!0));return e.replaceChild(t<0?0:e.childCount-1,c.copy(u))}function uz(e,t,r){if(t<e.openStart)e=new Se(HR(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd);if(r<e.openEnd)e=new Se(HR(e.content,1,r,e.openEnd,0,0),e.openStart,r);return e}function Kz(){return document.implementation.createHTMLDocument("title")}function Nee(e){let t=window.trustedTypes;if(!t)return e;if(!kR)kR=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:(r)=>r});return kR.createHTML(e)}function Oee(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);if(t)e=e.slice(t[0].length);let r=Kz(),a=r.body,i=/<([a-z][^>\s]+)/i.exec(e),l;if(l=i&&jz[i[1].toLowerCase()])e=l.map((c)=>"<"+c+">").join("")+e+l.map((c)=>"</"+c+">").reverse().join("");if(a.innerHTML=Nee(e),l)for(let c=0;c<l.length;c++)a=a.querySelector(l[c])||a;for(let c=0;c<r.styleSheets.length;c++){let u=r.styleSheets[c];for(let f=0;f<u.rules.length;f++){let h=u.rules[f];if(h instanceof CSSStyleRule){let m=a.querySelectorAll(h.selectorText);for(let b=0;b<m.length;b++)m[b].style.cssText+=h.style.cssText}}}return a}function Dee(e){let t=e.querySelectorAll($r?"span:not([class]):not([style])":"span.Apple-converted-space");for(let r=0;r<t.length;r++){let a=t[r];if(a.childNodes.length==1&&a.textContent==" "&&a.parentNode)a.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),a)}}function Pee(e,t){if(!e.size)return e;let r=e.content.firstChild.type.schema,a;try{a=JSON.parse(t)}catch(u){return e}let{content:i,openStart:l,openEnd:c}=e;for(let u=a.length-2;u>=0;u-=2){let f=r.nodes[a[u]];if(!f||f.hasRequiredAttrs())break;i=le.from(f.create(a[u+1],i)),l++,c++}return new Se(i,l,c)}class qz{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-200000000,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _ee(e){for(let t in Yr){let r=Yr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=(a)=>{if(Bee(e,a)&&!WR(e,a)&&(e.editable||!(a.type in Jr)))r(e,a)},Lee[t]?{passive:!0}:void 0)}if(Or)e.dom.addEventListener("input",()=>null);UR(e)}function el(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Iee(e){if(e.input.mouseDown)e.input.mouseDown.done();e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function UR(e){e.someProp("handleDOMEvents",(t)=>{for(let r in t)if(!e.input.eventHandlers[r])e.dom.addEventListener(r,e.input.eventHandlers[r]=(a)=>WR(e,a))})}function WR(e,t){return e.someProp("handleDOMEvents",(r)=>{let a=r[t.type];return a?a(e,t)||t.defaultPrevented:!1})}function Bee(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function zee(e,t){if(!WR(e,t)&&Yr[t.type]&&(e.editable||!(t.type in Jr)))Yr[t.type](e,t)}function rb(e){return{left:e.clientX,top:e.clientY}}function Hee(e,t){let r=t.x-e.clientX,a=t.y-e.clientY;return r*r+a*a<100}function YR(e,t,r,a,i){if(a==-1)return!1;let l=e.state.doc.resolve(a);for(let c=l.depth+1;c>0;c--)if(e.someProp(t,(u)=>c>l.depth?u(e,r,l.nodeAfter,l.before(c),i,!0):u(e,r,l.node(c),l.before(c),i,!1)))return!0;return!1}function ob(e,t,r){if(!e.focused)e.focus();if(e.state.selection.eq(t))return;let a=e.state.tr.setSelection(t);if(r=="pointer")a.setMeta("pointer",!0);e.dispatch(a)}function Uee(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),a=r.nodeAfter;if(a&&a.isAtom&&Pe.isSelectable(a))return ob(e,new Pe(r),"pointer"),!0;return!1}function Fee(e,t){if(t==-1)return!1;let r=e.state.selection,a,i;if(r instanceof Pe)a=r.node;let l=e.state.doc.resolve(t);for(let c=l.depth+1;c>0;c--){let u=c>l.depth?l.nodeAfter:l.node(c);if(Pe.isSelectable(u)){if(a&&r.$from.depth>0&&c>=r.$from.depth&&l.before(r.$from.depth+1)==r.$from.pos)i=l.before(r.$from.depth);else i=l.before(c);break}}if(i!=null)return ob(e,Pe.create(e.state.doc,i),"pointer"),!0;else return!1}function Vee(e,t,r,a,i){return YR(e,"handleClickOn",t,r,a)||e.someProp("handleClick",(l)=>l(e,t,a))||(i?Fee(e,r):Uee(e,r))}function jee(e,t,r,a){return YR(e,"handleDoubleClickOn",t,r,a)||e.someProp("handleDoubleClick",(i)=>i(e,t,a))}function Kee(e,t,r,a){return YR(e,"handleTripleClickOn",t,r,a)||e.someProp("handleTripleClick",(i)=>i(e,t,a))||qee(e,r,a)}function qee(e,t,r){if(r.button!=0)return!1;let a=Gz(e,t,!0),i=e.state.doc;if(!a)return!1;if(ob(e,a,"pointer"),a instanceof Me&&i.eq(e.state.doc))e.input.mouseDown=new Jz(e,a);return!0}function Gz(e,t,r){let a=e.state.doc;if(t==-1)return a.inlineContent?Me.create(a,0,a.content.size):null;let i=a.resolve(t);for(let l=i.depth+1;l>0;l--){let c=l>i.depth?i.nodeAfter:i.node(l),u=i.before(l);if(c.inlineContent)return Me.create(a,u+1,u+1+c.content.size);else if(r&&Pe.isSelectable(c))return Pe.create(a,u)}return null}function JR(e){return s1(e)}class XR{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){if(e.buttons==0)this.done()}done(){if(this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this)this.view.input.mouseDown=null}delaySelUpdate(){return!1}}function Xz(e,t){if(e.composing)return!0;if(Or&&Math.abs(Date.now()-e.input.compositionEndedAt)<500)return e.input.compositionEndedAt=-200000000,!0;return!1}function Wee(e){let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(!t||t.nodeType!=1||r>=t.childNodes.length)return!1;let a=t.childNodes[r];return a.nodeType==1&&a.contentEditable=="false"}function Qz(e,t){if(clearTimeout(e.input.composingTimeout),t>-1)e.input.composingTimeout=setTimeout(()=>s1(e),t)}function Zz(e){if(e.composing)e.input.composing=!1,e.input.compositionEndedAt=Date.now();while(e.input.compositionNodes.length>0)e.input.compositionNodes.pop().markParentsDirty()}function Yee(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let r=qZ(t.focusNode,t.focusOffset),a=GZ(t.focusNode,t.focusOffset);if(r&&a&&r!=a){let i=a.pmViewDesc,l=e.domObserver.lastChangedTextNode;if(r==l||a==l)return l;if(!i||!i.isText(a.nodeValue))return a;else if(e.input.compositionNode==a){let c=r.pmViewDesc;if(!(!c||!c.isText(r.nodeValue)))return a}}return r||a}function s1(e,t=!1){if(Zs&&e.domObserver.flushingSoon>=0)return;if(e.domObserver.forceFlush(),Zz(e),t||e.docView&&e.docView.dirty){let r=KR(e),a=e.state.selection;if(r&&!r.eq(a))e.dispatch(e.state.tr.setSelection(r));else if((e.markCursor||t)&&!a.$from.node(a.$from.sharedDepth(a.to)).inlineContent)e.dispatch(e.state.tr.deleteSelection());else e.updateState(e.state);return!0}return!1}function Jee(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let a=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),a.removeAllRanges(),a.addRange(i),setTimeout(()=>{if(r.parentNode)r.parentNode.removeChild(r);e.focus()},50)}function Xee(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Qee(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,a=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));if(!r)a.contentEditable="true";a.style.cssText="position: fixed; left: -10000px; top: 10px",a.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{if(e.focus(),a.parentNode)a.parentNode.removeChild(a);if(r)Zg(e,a.value,null,i,t);else Zg(e,a.textContent,a.innerHTML,i,t)},50)}function Zg(e,t,r,a,i){let l=Hz(e,t,r,a,e.state.selection.$from);if(e.someProp("handlePaste",(f)=>f(e,i,l||Se.empty)))return!0;if(!l)return!1;let c=Xee(l),u=c?e.state.tr.replaceSelectionWith(c,a):e.state.tr.replaceSelection(l);return e.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function eH(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let r=e.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}class QR{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}function tH(e,t){let r;return e.someProp("dragCopies",(a)=>{r=r||a(t)}),r!=null?!r:!t[Zee]}function ete(e,t,r){if(!t.dataTransfer)return;let a=e.posAtCoords(rb(t));if(!a)return;let i=e.state.doc.resolve(a.pos),l=r&&r.slice;if(l)e.someProp("transformPasted",(v)=>{l=v(l,e,!1)});else l=Hz(e,eH(t.dataTransfer),Qg?null:t.dataTransfer.getData("text/html"),!1,i);let c=!!(r&&tH(e,t));if(e.someProp("handleDrop",(v)=>v(e,t,l||Se.empty,c))){t.preventDefault();return}if(!l)return;t.preventDefault();let u=l?e1(e.state.doc,i.pos,l):i.pos;if(u==null)u=i.pos;let f=e.state.tr;if(c){let{node:v}=r;if(v)v.replace(f);else f.deleteSelection()}let h=f.mapping.map(u),m=l.openStart==0&&l.openEnd==0&&l.content.childCount==1,b=f.doc;if(m)f.replaceRangeWith(h,h,l.content.firstChild);else f.replaceRange(h,h,l);if(f.doc.eq(b))return;let y=f.doc.resolve(h);if(m&&Pe.isSelectable(l.content.firstChild)&&y.nodeAfter&&y.nodeAfter.sameMarkup(l.content.firstChild))f.setSelection(new Pe(y));else{let v=f.mapping.map(u);f.mapping.maps[f.mapping.maps.length-1].forEach((S,w,E,R)=>v=R),f.setSelection(qR(e,y,f.doc.resolve(v)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))}function eb(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class l1{constructor(e,t){this.toDOM=e,this.spec=t||Rd,this.side=this.spec.side||0}map(e,t,r,a){let{pos:i,deleted:l}=e.mapResult(t.from+a,this.side<0?-1:1);return l?null:new Jn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof l1&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&eb(this.spec,e.spec))}destroy(e){if(this.spec.destroy)this.spec.destroy(e)}}class _c{constructor(e,t){this.attrs=e,this.spec=t||Rd}map(e,t,r,a){let i=e.map(t.from+a,this.spec.inclusiveStart?-1:1)-r,l=e.map(t.to+a,this.spec.inclusiveEnd?1:-1)-r;return i>=l?null:new Jn(i,l,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof _c&&eb(this.attrs,e.attrs)&&eb(this.spec,e.spec)}static is(e){return e.type instanceof _c}destroy(){}}class ZR{constructor(e,t){this.attrs=e,this.spec=t||Rd}map(e,t,r,a){let i=e.mapResult(t.from+a,1);if(i.deleted)return null;let l=e.mapResult(t.to+a,-1);if(l.deleted||l.pos<=i.pos)return null;return new Jn(i.pos-r,l.pos-r,this)}valid(e,t){let{index:r,offset:a}=e.content.findIndex(t.from),i;return a==t.from&&!(i=e.child(r)).isText&&a+i.nodeSize==t.to}eq(e){return this==e||e instanceof ZR&&eb(this.attrs,e.attrs)&&eb(this.spec,e.spec)}destroy(){}}class Jn{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new Jn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new Jn(e,e,new l1(t,r))}static inline(e,t,r,a){return new Jn(e,t,new _c(r,a))}static node(e,t,r,a){return new Jn(e,t,new ZR(r,a))}get spec(){return this.type.spec}get inline(){return this.type instanceof _c}get widget(){return this.type instanceof l1}}class Lt{constructor(e,t){this.local=e.length?e:Gp,this.children=t.length?t:Gp}static create(e,t){return t.length?c1(t,e,0,Rd):Nr}find(e,t,r){let a=[];return this.findInner(e==null?0:e,t==null?1e9:t,a,0,r),a}findInner(e,t,r,a,i){for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<=t&&c.to>=e&&(!i||i(c.spec)))r.push(c.copy(c.from+a,c.to+a))}for(let l=0;l<this.children.length;l+=3)if(this.children[l]<t&&this.children[l+1]>e){let c=this.children[l]+1;this.children[l+2].findInner(e-c,t-c,r,a+c,i)}}map(e,t,r){if(this==Nr||e.maps.length==0)return this;return this.mapInner(e,t,0,0,r||Rd)}mapInner(e,t,r,a,i){let l;for(let c=0;c<this.local.length;c++){let u=this.local[c].map(e,r,a);if(u&&u.type.valid(t,u))(l||(l=[])).push(u);else if(i.onRemove)i.onRemove(this.local[c].spec)}if(this.children.length)return tte(this.children,l||[],e,t,r,a,i);else return l?new Lt(l.sort(kd),Gp):Nr}add(e,t){if(!t.length)return this;if(this==Nr)return Lt.create(e,t);return this.addInner(e,t,0)}addInner(e,t,r){let a,i=0;e.forEach((c,u)=>{let f=u+r,h;if(!(h=rH(t,c,f)))return;if(!a)a=this.children.slice();while(i<a.length&&a[i]<u)i+=3;if(a[i]==u)a[i+2]=a[i+2].addInner(c,h,f+1);else a.splice(i,0,u,u+c.nodeSize,c1(h,c,f+1,Rd));i+=3});let l=nH(i?oH(t):t,-r);for(let c=0;c<l.length;c++)if(!l[c].type.valid(e,l[c]))l.splice(c--,1);return new Lt(l.length?this.local.concat(l).sort(kd):this.local,a||this.children)}remove(e){if(e.length==0||this==Nr)return this;return this.removeInner(e,0)}removeInner(e,t){let r=this.children,a=this.local;for(let i=0;i<r.length;i+=3){let l,c=r[i]+t,u=r[i+1]+t;for(let h=0,m;h<e.length;h++)if(m=e[h]){if(m.from>c&&m.to<u)e[h]=null,(l||(l=[])).push(m)}if(!l)continue;if(r==this.children)r=this.children.slice();let f=r[i+2].removeInner(l,c+1);if(f!=Nr)r[i+2]=f;else r.splice(i,3),i-=3}if(a.length){for(let i=0,l;i<e.length;i++)if(l=e[i]){for(let c=0;c<a.length;c++)if(a[c].eq(l,t)){if(a==this.local)a=this.local.slice();a.splice(c--,1)}}}if(r==this.children&&a==this.local)return this;return a.length||r.length?new Lt(a,r):Nr}forChild(e,t){if(this==Nr)return this;if(t.isLeaf)return Lt.empty;let r,a;for(let c=0;c<this.children.length;c+=3)if(this.children[c]>=e){if(this.children[c]==e)r=this.children[c+2];break}let i=e+1,l=i+t.content.size;for(let c=0;c<this.local.length;c++){let u=this.local[c];if(u.from<l&&u.to>i&&u.type instanceof _c){let f=Math.max(i,u.from)-i,h=Math.min(l,u.to)-i;if(f<h)(a||(a=[])).push(u.copy(f,h))}}if(a){let c=new Lt(a.sort(kd),Gp);return r?new Oc([c,r]):c}return r||Nr}eq(e){if(this==e)return!0;if(!(e instanceof Lt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return e4(this.localsInner(e))}localsInner(e){if(this==Nr)return Gp;if(e.inlineContent||!this.local.some(_c.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)if(!(this.local[r].type instanceof _c))t.push(this.local[r]);return t}forEachSet(e){e(this)}}class Oc{constructor(e){this.members=e}map(e,t){let r=this.members.map((a)=>a.map(e,t,Rd));return Oc.from(r)}forChild(e,t){if(t.isLeaf)return Lt.empty;let r=[];for(let a=0;a<this.members.length;a++){let i=this.members[a].forChild(e,t);if(i==Nr)continue;if(i instanceof Oc)r=r.concat(i.members);else r.push(i)}return Oc.from(r)}eq(e){if(!(e instanceof Oc)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let a=0;a<this.members.length;a++){let i=this.members[a].localsInner(e);if(!i.length)continue;if(!t)t=i;else{if(r)t=t.slice(),r=!1;for(let l=0;l<i.length;l++)t.push(i[l])}}return t?e4(r?t:t.sort(kd)):Gp}static from(e){switch(e.length){case 0:return Nr;case 1:return e[0];default:return new Oc(e.every((t)=>t instanceof Lt)?e:e.reduce((t,r)=>t.concat(r instanceof Lt?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function tte(e,t,r,a,i,l,c){let u=e.slice();for(let h=0,m=l;h<r.maps.length;h++){let b=0;r.maps[h].forEach((y,v,S,w)=>{let E=w-S-(v-y);for(let R=0;R<u.length;R+=3){let D=u[R+1];if(D<0||y>D+m-b)continue;let H=u[R]+m-b;if(v>=H)u[R+1]=y<=H?-2:-1;else if(y>=m&&E)u[R]+=E,u[R+1]+=E}b+=E}),m=r.maps[h].map(m,-1)}let f=!1;for(let h=0;h<u.length;h+=3)if(u[h+1]<0){if(u[h+1]==-2){f=!0,u[h+1]=-1;continue}let m=r.map(e[h]+l),b=m-i;if(b<0||b>=a.content.size){f=!0;continue}let y=r.map(e[h+1]+l,-1),v=y-i,{index:S,offset:w}=a.content.findIndex(b),E=a.maybeChild(S);if(E&&w==b&&w+E.nodeSize==v){let R=u[h+2].mapInner(r,E,m+1,e[h]+l+1,c);if(R!=Nr)u[h]=b,u[h+1]=v,u[h+2]=R;else u[h+1]=-2,f=!0}else f=!0}if(f){let h=nte(u,e,t,r,i,l,c),m=c1(h,a,0,c);t=m.local;for(let b=0;b<u.length;b+=3)if(u[b+1]<0)u.splice(b,3),b-=3;for(let b=0,y=0;b<m.children.length;b+=3){let v=m.children[b];while(y<u.length&&u[y]<v)y+=3;u.splice(y,0,m.children[b],m.children[b+1],m.children[b+2])}}return new Lt(t.sort(kd),u)}function nH(e,t){if(!t||!e.length)return e;let r=[];for(let a=0;a<e.length;a++){let i=e[a];r.push(new Jn(i.from+t,i.to+t,i.type))}return r}function nte(e,t,r,a,i,l,c){function u(f,h){for(let m=0;m<f.local.length;m++){let b=f.local[m].map(a,i,h);if(b)r.push(b);else if(c.onRemove)c.onRemove(f.local[m].spec)}for(let m=0;m<f.children.length;m+=3)u(f.children[m+2],f.children[m]+h+1)}for(let f=0;f<e.length;f+=3)if(e[f+1]==-1)u(e[f+2],t[f]+l+1);return r}function rH(e,t,r){if(t.isLeaf)return null;let a=r+t.nodeSize,i=null;for(let l=0,c;l<e.length;l++)if((c=e[l])&&c.from>r&&c.to<a)(i||(i=[])).push(c),e[l]=null;return i}function oH(e){let t=[];for(let r=0;r<e.length;r++)if(e[r]!=null)t.push(e[r]);return t}function c1(e,t,r,a){let i=[],l=!1;t.forEach((u,f)=>{let h=rH(e,u,f+r);if(h){l=!0;let m=c1(h,u,r+f+1,a);if(m!=Nr)i.push(f,f+u.nodeSize,m)}});let c=nH(l?oH(e):e,-r).sort(kd);for(let u=0;u<c.length;u++)if(!c[u].type.valid(t,c[u])){if(a.onRemove)a.onRemove(c[u].spec);c.splice(u--,1)}return c.length||i.length?new Lt(c,i):Nr}function kd(e,t){return e.from-t.from||e.to-t.to}function e4(e){let t=e;for(let r=0;r<t.length-1;r++){let a=t[r];if(a.from!=a.to)for(let i=r+1;i<t.length;i++){let l=t[i];if(l.from==a.from){if(l.to!=a.to){if(t==e)t=e.slice();t[i]=l.copy(l.from,a.to),dz(t,i+1,l.copy(a.to,l.to))}continue}else{if(l.from<a.to){if(t==e)t=e.slice();t[r]=a.copy(a.from,l.from),dz(t,i,a.copy(l.from,a.to))}break}}}return t}function dz(e,t,r){while(t<e.length&&kd(r,e[t])>0)t++;e.splice(t,0,r)}function AR(e){let t=[];if(e.someProp("decorations",(r)=>{let a=r(e.state);if(a&&a!=Nr)t.push(a)}),e.cursorWrapper)t.push(Lt.create(e.state.doc,[e.cursorWrapper.deco]));return Oc.from(t)}class aH{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class iH{constructor(e,t){if(this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new aH,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((r)=>{for(let a=0;a<r.length;a++)this.queue.push(r[a]);if(go&&Dc<=11&&r.some((a)=>a.type=="childList"&&a.removedNodes.length||a.type=="characterData"&&a.oldValue.length>a.target.nodeValue.length))this.flushSoon();else if(Or&&e.composing&&r.some((a)=>a.type=="childList"&&a.target.nodeName=="TR"))e.input.badSafariComposition=!0,this.flushSoon();else this.flush()}),ote)this.onCharData=(r)=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()};this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){if(this.flushingSoon<0)this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20)}forceFlush(){if(this.flushingSoon>-1)window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush()}start(){if(this.observer)this.observer.takeRecords(),this.observer.observe(this.view.dom,rte);if(this.onCharData)this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}if(this.onCharData)this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData);this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(!oz(this.view))return;if(this.suppressingSelectionUpdates)return tl(this.view);if(go&&Dc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ad(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=Wp(i))t.add(i);for(let i=e.anchorNode;i;i=Wp(i))if(t.has(i)){r=i;break}let a=r&&this.view.docView.nearestDesc(r);if(a&&a.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();if(t.length)this.queue=[];let r=e.domSelectionRange(),a=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&oz(e)&&!this.ignoreSelectionChange(r),i=-1,l=-1,c=!1,u=[];if(e.editable)for(let h=0;h<t.length;h++){let m=this.registerMutation(t[h],u);if(m){if(i=i<0?m.from:Math.min(m.from,i),l=l<0?m.to:Math.max(m.to,l),m.typeOver)c=!0}}if(u.some((h)=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||$r&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some((h)=>h.type=="childList"&&h.removedNodes.length))){for(let h of u)if(h.nodeName=="BR"&&h.parentNode){let m=h.nextSibling;while(m&&m.nodeType==1){if(m.contentEditable=="false"){h.parentNode.removeChild(h);break}m=m.firstChild}}}else if(Ea&&u.length){let h=u.filter((m)=>m.nodeName=="BR");if(h.length==2){let[m,b]=h;if(m.parentNode&&m.parentNode.parentNode==b.parentNode)b.remove();else m.remove()}else{let{focusNode:m}=this.currentSelection;for(let b of h){let y=b.parentNode;if(y&&y.nodeName=="LI"&&(!m||ste(e,m)!=y))b.remove()}}}let f=null;if(i<0&&a&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&u1(r)&&(f=KR(e))&&f.eq(Fe.near(e.state.doc.resolve(0),1)))e.input.lastFocus=0,tl(e),this.currentSelection.set(r),e.scrollToSelection();else if(i>-1||a){if(i>-1)e.docView.markDirty(i,l),ate(e);if(e.input.badSafariComposition)e.input.badSafariComposition=!1,lte(e,u);if(this.handleDOMChange(i,l,c,u),e.docView&&e.docView.dirty)e.updateState(e.state);else if(!this.currentSelection.eq(r))tl(e);this.currentSelection.set(r)}}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let m=e.addedNodes[h];if(t.push(m),m.nodeType==3)this.lastChangedTextNode=m}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let{previousSibling:a,nextSibling:i}=e;if(go&&Dc<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:m,nextSibling:b}=e.addedNodes[h];if(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)a=m;if(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)i=b}let l=a&&a.parentNode==e.target?xr(a)+1:0,c=r.localPosFromDOM(e.target,l,-1),u=i&&i.parentNode==e.target?xr(i):e.target.childNodes.length,f=r.localPosFromDOM(e.target,u,1);return{from:c,to:f}}else if(e.type=="attributes")return{from:r.posAtStart-r.border,to:r.posAtEnd+r.border};else return this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}function ate(e){if(fz.has(e))return;if(fz.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1){if(e.requiresGeckoHackNode=Ea,pz)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),pz=!0}}function hz(e,t){let{startContainer:r,startOffset:a,endContainer:i,endOffset:l}=t,c=e.domAtPos(e.state.selection.anchor);if(Ad(c.node,c.offset,i,l))[r,a,i,l]=[i,l,r,a];return{anchorNode:r,anchorOffset:a,focusNode:i,focusOffset:l}}function ite(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return hz(e,i)}let r;function a(i){i.preventDefault(),i.stopImmediatePropagation(),r=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",a,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",a,!0),r?hz(e,r):null}function ste(e,t){for(let r=t.parentNode;r&&r!=e.dom;r=r.parentNode){let a=e.docView.nearestDesc(r,!0);if(a&&a.node.isBlock)return r}return null}function lte(e,t){var r;let{focusNode:a,focusOffset:i}=e.domSelectionRange();for(let l of t)if(((r=l.parentNode)===null||r===void 0?void 0:r.nodeName)=="TR"){let c=l.nextSibling;while(c&&(c.nodeName!="TD"&&c.nodeName!="TH"))c=c.nextSibling;if(c){let u=c;for(;;){let f=u.firstChild;if(!f||f.nodeType!=1||f.contentEditable=="false"||/^(BR|IMG)$/.test(f.nodeName))break;u=f}if(u.insertBefore(l,u.firstChild),a==l)e.domSelection().collapse(l,i)}else l.parentNode.removeChild(l)}}function cte(e,t,r,a){let{node:i,fromOffset:l,toOffset:c,from:u,to:f}=e.docView.parseRange(t,r),h=e.domSelectionRange(),m,b=h.anchorNode;if(b&&e.dom.contains(b.nodeType==1?b:b.parentNode)){if(m=[{node:b,offset:h.anchorOffset}],!u1(h))m.push({node:h.focusNode,offset:h.focusOffset})}if($r&&e.input.lastKeyCode===8)for(let R=c;R>l;R--){let D=i.childNodes[R-1],H=D.pmViewDesc;if(D.nodeName=="BR"&&!H){c=R;break}if(!H||H.size)break}let y=e.state.doc,v=e.someProp("domParser")||va.fromSchema(e.state.schema),S=y.resolve(u),w=null,E=v.parse(i,{topNode:S.parent,topMatch:S.parent.contentMatchAt(S.index()),topOpen:!0,from:l,to:c,preserveWhitespace:S.parent.type.whitespace=="pre"?"full":!0,findPositions:m,ruleFromNode:ute(a),context:S});if(m&&m[0].pos!=null){let R=m[0].pos,D=m[1]&&m[1].pos;if(D==null)D=R;w={anchor:R+u,head:D+u}}return{doc:E,sel:w,from:u,to:f}}function fte(e,t,r,a,i){let l=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let U=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,P=KR(e,U);if(P&&!e.state.selection.eq(P)){if($r&&Zs&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(J)=>J(e,wd(13,"Enter"))))return;let re=e.state.tr.setSelection(P);if(U=="pointer")re.setMeta("pointer",!0);else if(U=="key")re.scrollIntoView();if(l)re.setMeta("composition",l);e.dispatch(re)}return}let c=e.state.doc.resolve(t),u=c.sharedDepth(r);t=c.before(u+1),r=e.state.doc.resolve(r).after(u+1);let f=e.state.selection,h=cte(e,t,r,i),m=e.state.doc,b=m.slice(h.from,h.to),y,v;if(e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime)y=e.state.selection.to,v="end";else y=e.state.selection.from,v="start";e.input.lastKeyCode=null;let S=mte(b.content,h.doc.content,h.from,y,v);if(S)e.input.domChangeCount++;if((Yp&&e.input.lastIOSEnter>Date.now()-225||Zs)&&i.some((U)=>U.nodeType==1&&!dte.test(U.nodeName))&&(!S||S.endA>=S.endB)&&e.someProp("handleKeyDown",(U)=>U(e,wd(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!S)if(a&&f instanceof Me&&!f.empty&&f.$head.sameParent(f.$anchor)&&!e.composing&&!(h.sel&&h.sel.anchor!=h.sel.head))S={start:f.from,endA:f.to,endB:f.to};else{if(h.sel){let U=mz(e,e.state.doc,h.sel);if(U&&!U.eq(e.state.selection)){let P=e.state.tr.setSelection(U);if(l)P.setMeta("composition",l);e.dispatch(P)}}return}if(e.state.selection.from<e.state.selection.to&&S.start==S.endB&&e.state.selection instanceof Me){if(S.start>e.state.selection.from&&S.start<=e.state.selection.from+2&&e.state.selection.from>=h.from)S.start=e.state.selection.from;else if(S.endA<e.state.selection.to&&S.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to)S.endB+=e.state.selection.to-S.endA,S.endA=e.state.selection.to}if(go&&Dc<=11&&S.endB==S.start+1&&S.endA==S.start&&S.start>h.from&&h.doc.textBetween(S.start-h.from-1,S.start-h.from+1)=="  ")S.start--,S.endA--,S.endB--;let w=h.doc.resolveNoCache(S.start-h.from),E=h.doc.resolveNoCache(S.endB-h.from),R=m.resolve(S.start),D=w.sameParent(E)&&w.parent.inlineContent&&R.end()>=S.endA;if((Yp&&e.input.lastIOSEnter>Date.now()-225&&(!D||i.some((U)=>U.nodeName=="DIV"||U.nodeName=="P"))||!D&&w.pos<h.doc.content.size&&(!w.sameParent(E)||!w.parent.inlineContent)&&w.pos<E.pos&&!/\S/.test(h.doc.textBetween(w.pos,E.pos,"","")))&&e.someProp("handleKeyDown",(U)=>U(e,wd(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>S.start&&hte(m,S.start,S.endA,w,E)&&e.someProp("handleKeyDown",(U)=>U(e,wd(8,"Backspace")))){if(Zs&&$r)e.domObserver.suppressSelectionUpdates();return}if($r&&S.endB==S.start)e.input.lastChromeDelete=Date.now();if(Zs&&!D&&w.start()!=E.start()&&E.parentOffset==0&&w.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==S.endA)S.endB-=2,E=h.doc.resolveNoCache(S.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(U){return U(e,wd(13,"Enter"))})},20);let{start:H,endA:z}=S,G=(U)=>{let P=U||e.state.tr.replace(H,z,h.doc.slice(S.start-h.from,S.endB-h.from));if(h.sel){let re=mz(e,P.doc,h.sel);if(re&&!($r&&e.composing&&re.empty&&(S.start!=S.endB||e.input.lastChromeDelete<Date.now()-100)&&(re.head==H||re.head==P.mapping.map(z)-1)||go&&re.empty&&re.head==H))P.setSelection(re)}if(l)P.setMeta("composition",l);return P.scrollIntoView()},ee;if(D)if(w.pos==E.pos){if(go&&Dc<=11&&w.parentOffset==0)e.domObserver.suppressSelectionUpdates(),setTimeout(()=>tl(e),20);let U=G(e.state.tr.delete(H,z)),P=m.resolve(S.start).marksAcross(m.resolve(S.endA));if(P)U.ensureMarks(P);e.dispatch(U)}else if(S.endA==S.endB&&(ee=pte(w.parent.content.cut(w.parentOffset,E.parentOffset),R.parent.content.cut(R.parentOffset,S.endA-R.start())))){let U=G(e.state.tr);if(ee.type=="add")U.addMark(H,z,ee.mark);else U.removeMark(H,z,ee.mark);e.dispatch(U)}else if(w.parent.child(w.index()).isText&&w.index()==E.index()-(E.textOffset?0:1)){let U=w.parent.textBetween(w.parentOffset,E.parentOffset),P=()=>G(e.state.tr.insertText(U,H,z));if(!e.someProp("handleTextInput",(re)=>re(e,H,z,U,P)))e.dispatch(P())}else e.dispatch(G());else e.dispatch(G())}function mz(e,t,r){if(Math.max(r.anchor,r.head)>t.content.size)return null;return qR(e,t.resolve(r.anchor),t.resolve(r.head))}function pte(e,t){let r=e.firstChild.marks,a=t.firstChild.marks,i=r,l=a,c,u,f;for(let m=0;m<a.length;m++)i=a[m].removeFromSet(i);for(let m=0;m<r.length;m++)l=r[m].removeFromSet(l);if(i.length==1&&l.length==0)u=i[0],c="add",f=(m)=>m.mark(u.addToSet(m.marks));else if(i.length==0&&l.length==1)u=l[0],c="remove",f=(m)=>m.mark(u.removeFromSet(m.marks));else return null;let h=[];for(let m=0;m<t.childCount;m++)h.push(f(t.child(m)));if(le.from(h).eq(e))return{mark:u,type:c}}function hte(e,t,r,a,i){if(r-t<=i.pos-a.pos||MR(a,!0,!1)<i.pos)return!1;let l=e.resolve(t);if(!a.parent.isTextblock){let u=l.nodeAfter;return u!=null&&r==t+u.nodeSize}if(l.parentOffset<l.parent.content.size||!l.parent.isTextblock)return!1;let c=e.resolve(MR(l,!0,!0));if(!c.parent.isTextblock||c.pos>r||MR(c,!0,!1)<r)return!1;return a.parent.content.cut(a.parentOffset).eq(c.parent.content)}function MR(e,t,r){let a=e.depth,i=t?e.end():e.pos;while(a>0&&(t||e.indexAfter(a)==e.node(a).childCount))a--,i++,t=!1;if(r){let l=e.node(a).maybeChild(e.indexAfter(a));while(l&&!l.isLeaf)l=l.firstChild,i++}return i}function mte(e,t,r,a,i){let l=e.findDiffStart(t,r),c=r+e.size,u=r+t.size;if(l==null)return null;let{a:f,b:h}=e.findDiffEnd(t,c,u);if(i=="end"){let m=Math.max(0,l-Math.min(f,h));a-=f+m-l}if(f<l&&c<u){let m=a<=l&&a>=f?l-a:0;l-=m,h=l+(h-f),f=l}else if(h<l){let m=a<=l&&a>=h?l-a:0;l-=m,f=l+(f-h),h=l}return{start:l,endA:f,endB:h}}class f1{constructor(e,t){if(this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new qz,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(xz),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e){if(e.appendChild)e.appendChild(this.dom);else if(typeof e=="function")e(this.dom);else if(e.mount)this.mounted=!0}this.editable=yz(this),bz(this),this.nodeViews=vz(this),this.docView=QB(this.state.doc,gz(this),AR(this),this.dom,this),this.domObserver=new iH(this,(r,a,i,l)=>fte(this,r,a,i,l)),this.domObserver.start(),_ee(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){if(e.handleDOMEvents!=this._props.handleDOMEvents)UR(this);let t=this._props;if(this._props=e,e.plugins)e.plugins.forEach(xz),this.directPlugins=e.plugins;this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let a=this.state,i=!1,l=!1;if(e.storedMarks&&this.composing)Zz(this),l=!0;this.state=e;let c=a.plugins!=e.plugins||this._props.plugins!=t.plugins;if(c||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let y=vz(this);if(bte(y,this.nodeViews))this.nodeViews=y,i=!0}if(c||t.handleDOMEvents!=this._props.handleDOMEvents)UR(this);this.editable=yz(this),bz(this);let u=AR(this),f=gz(this),h=a.plugins!=e.plugins&&!a.doc.eq(e.doc)?"reset":e.scrollToSelection>a.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(e.doc,f,u);if(m||!e.selection.eq(a.selection))l=!0;let b=h=="preserve"&&l&&this.dom.style.overflowAnchor==null&&eee(this);if(l){this.domObserver.stop();let y=m&&(go||$r)&&!this.composing&&!a.selection.empty&&!e.selection.empty&&gte(a.selection,e.selection);if(m){let S=$r?this.trackWrites=this.domSelectionRange().focusNode:null;if(this.composing)this.input.compositionNode=Yee(this);if(i||!this.docView.update(e.doc,f,u,this))this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=QB(e.doc,f,u,this.dom,this);if(S&&(!this.trackWrites||!this.dom.contains(this.trackWrites)))y=!0}let v=this.input.mouseDown;if(y||!(v&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&$ee(this)&&v.delaySelUpdate()))tl(this,y);else Iz(this,e.selection),this.domObserver.setCurSelection();this.domObserver.start()}if(this.updatePluginViews(a),((r=this.dragging)===null||r===void 0?void 0:r.node)&&!a.doc.eq(e.doc))this.updateDraggedNode(this.dragging,a);if(h=="reset")this.dom.scrollTop=0;else if(h=="to selection")this.scrollToSelection();else if(b)tee(b)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode));else if(this.someProp("handleScrollToSelection",(t)=>t(this)));else if(this.state.selection instanceof Pe){let t=this.docView.domAfterPos(this.state.selection.from);if(t.nodeType==1)GB(this,t.getBoundingClientRect(),e)}else GB(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;while(e=this.pluginViews.pop())if(e.destroy)e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];if(r.spec.view)this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];if(r.spec.view)this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];if(r.update)r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,a=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)a=r.from;else{let i=r.from+(this.state.doc.content.size-t.doc.content.size);if((i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==r.node)a=i}this.dragging=new QR(e.slice,e.move,a<0?void 0:Pe.create(this.state.doc,a))}someProp(e,t){let r=this._props&&this._props[e],a;if(r!=null&&(a=t?t(r):r))return a;for(let l=0;l<this.directPlugins.length;l++){let c=this.directPlugins[l].props[e];if(c!=null&&(a=t?t(c):c))return a}let i=this.state.plugins;if(i)for(let l=0;l<i.length;l++){let c=i[l].props[e];if(c!=null&&(a=t?t(c):c))return a}}hasFocus(){if(go){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;while(e&&this.dom!=e&&this.dom.contains(e)){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){if(this.domObserver.stop(),this.editable)nee(this.dom);tl(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host){if(!t.getSelection)Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection();return this._root=t}}return e||document}updateRoot(){this._root=null}posAtCoords(e){return see(this,e)}coordsAtPos(e,t=1){return kz(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let a=this.docView.posFromDOM(e,t,r);if(a==null)throw RangeError("DOM position not inside the editor");return a}endOfTextblock(e,t){return fee(this,t||this.state,e)}pasteHTML(e,t){return Zg(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Zg(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return GR(this,e)}destroy(){if(!this.docView)return;if(Iee(this),this.destroyPluginViews(),this.mounted)this.docView.update(this.state.doc,[],AR(this),this),this.dom.textContent="";else if(this.dom.parentNode)this.dom.parentNode.removeChild(this.dom);this.docView.destroy(),this.docView=null,jZ()}get isDestroyed(){return this.docView==null}dispatchEvent(e){return zee(this,e)}domSelectionRange(){let e=this.domSelection();if(!e)return{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0};return Or&&this.root.nodeType===11&&YZ(this.dom.ownerDocument)==this.dom&&ite(this,e)||e}domSelection(){return this.root.getSelection()}}function gz(e){let t=Object.create(null);if(t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(r)=>{if(typeof r=="function")r=r(e.state);if(r){for(let a in r)if(a=="class")t.class+=" "+r[a];else if(a=="style")t.style=(t.style?t.style+";":"")+r[a];else if(!t[a]&&a!="contenteditable"&&a!="nodeName")t[a]=String(r[a])}}),!t.translate)t.translate="no";return[Jn.node(0,e.state.doc.content.size,t)]}function bz(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Jn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function yz(e){return!e.someProp("editable",(t)=>t(e.state)===!1)}function gte(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function vz(e){let t=Object.create(null);function r(a){for(let i in a)if(!Object.prototype.hasOwnProperty.call(t,i))t[i]=a[i]}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function bte(e,t){let r=0,a=0;for(let i in e){if(e[i]!=t[i])return!0;r++}for(let i in t)a++;return r!=a}function xz(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}var xr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Wp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},NR=null,Qs=function(e,t,r){let a=NR||(NR=document.createRange());return a.setEnd(e,r==null?e.nodeValue.length:r),a.setStart(e,t||0),a},jZ=function(){NR=null},Ad=function(e,t,r,a){return r&&(KB(e,t,r,a,-1)||KB(e,t,r,a,1))},KZ,u1=function(e){return e.focusNode&&Ad(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)},Qi,qB,Ic,OR,$z,DR,go,Dc,Ea,PR,$r,Sz,Or,Yp,Ca,Cz,Zs,nb,XZ,Kp=null,lee,uee,WB=null,YB=null,JB=!1,Ta=0,XB=1,Ed=2,ni=3,VR,Mz,Pc,Lc,d1,jR,Nz,Jg=function(e){if(e)this.nodeName=e},Td,ez,Aee,jz,kR=null,Yr,Jr,Lee,Wz,Yz,Jz,Gee,Qg,Zee,Gp,Rd,Nr,rte,ote,fz,pz=!1,ute=(e)=>(t)=>{let r=t.pmViewDesc;if(r)return r.parseRule(e);else if(t.nodeName=="BR"&&t.parentNode){if(Or&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let a=document.createElement("div");return a.appendChild(document.createElement("li")),{skip:a}}else if(t.parentNode.lastChild==t||Or&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null},dte;var t4=N(()=>{Js();Ws();Rc();KZ=/^(img|br|input|textarea|hr)$/i;Qi=typeof navigator<"u"?navigator:null,qB=typeof document<"u"?document:null,Ic=Qi&&Qi.userAgent||"",OR=/Edge\/(\d+)/.exec(Ic),$z=/MSIE \d/.exec(Ic),DR=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ic),go=!!($z||DR||OR),Dc=$z?document.documentMode:DR?+DR[1]:OR?+OR[1]:0,Ea=!go&&/gecko\/(\d+)/i.test(Ic);Ea&&+(/Firefox\/(\d+)/.exec(Ic)||[0,0])[1];PR=!go&&/Chrome\/(\d+)/.exec(Ic),$r=!!PR,Sz=PR?+PR[1]:0,Or=!go&&!!Qi&&/Apple Computer/.test(Qi.vendor),Yp=Or&&(/Mobile\/\w+/.test(Ic)||!!Qi&&Qi.maxTouchPoints>2),Ca=Yp||(Qi?/Mac/.test(Qi.platform):!1),Cz=Qi?/Win/.test(Qi.platform):!1,Zs=/Android \d/.test(Ic),nb=!!qB&&"webkitFontSmoothing"in qB.documentElement.style,XZ=nb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;lee=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;uee=/[\u0590-\u08ac]/;VR=class VR extends Jp{constructor(e,t,r,a){let i,l=t.type.toDOM;if(typeof l=="function")l=l(r,()=>{if(!i)return a;if(i.parent)return i.parent.posBeforeChild(i)});if(!t.type.spec.raw){if(l.nodeType!=1){let c=document.createElement("span");c.appendChild(l),l=c}l.contentEditable="false",l.classList.add("ProseMirror-widget")}super(e,[],l,null);this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==Ta&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}};Mz=class Mz extends Jp{constructor(e,t,r,a){super(e,[],t,null);this.textDOM=r,this.text=a}get size(){return this.text.length}localPosFromDOM(e,t){if(e!=this.textDOM)return this.posAtStart+(t?this.size:0);return this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}};Pc=class Pc extends Jp{constructor(e,t,r,a,i){super(e,[],r,a);this.mark=t,this.spec=i}static create(e,t,r,a){let i=a.nodeViews[t.type.name],l=i&&i(t,a,r);if(!l||!l.dom)l=Xi.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs);return new Pc(e,t,l.dom,l.contentDOM||l.dom,l)}parseRule(){if(this.dirty&ni||this.mark.type.spec.reparseInView)return null;return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ni&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Ta){let r=this.parent;while(!r.node)r=r.parent;if(r.dirty<this.dirty)r.dirty=this.dirty;this.dirty=Ta}}slice(e,t,r){let a=Pc.create(this.parent,this.mark,!0,r),i=this.children,l=this.size;if(t<l)i=IR(i,t,l,r);if(e>0)i=IR(i,0,e,r);for(let c=0;c<i.length;c++)i[c].parent=a;return a.children=i,a}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}};Lc=class Lc extends Jp{constructor(e,t,r,a,i,l,c){super(e,[],i,l);this.node=t,this.outerDeco=r,this.innerDeco=a,this.nodeDOM=c}static create(e,t,r,a,i,l){let c=i.nodeViews[t.type.name],u,f=c&&c(t,i,()=>{if(!u)return l;if(u.parent)return u.parent.posBeforeChild(u)},r,a),h=f&&f.dom,m=f&&f.contentDOM;if(t.isText){if(!h)h=document.createTextNode(t.text);else if(h.nodeType!=3)throw RangeError("Text must be rendered as a DOM text node")}else if(!h)({dom:h,contentDOM:m}=Xi.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));if(!m&&!t.isText&&h.nodeName!="BR"){if(!h.hasAttribute("contenteditable"))h.contentEditable="false";if(t.type.spec.draggable)h.draggable=!0}let b=h;if(h=Pz(h,r,t),f)return u=new Nz(e,t,r,a,h,m||null,b,f);else if(t.isText)return new d1(e,t,r,a,h,b);else return new Lc(e,t,r,a,h,m||null,b)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre")t.preserveWhitespace="full";if(!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let a=this.children[r];if(this.dom.contains(a.dom.parentNode)){t.contentElement=a.dom.parentNode;break}}if(!t.contentElement){let r=e&&e.find((a)=>a.nodeType==1&&e.indexOf(a.parentNode)<0&&this.dom.contains(a));if(r)t.contentElement=r;else t.getContent=()=>le.empty}}return t}matchesNode(e,t,r){return this.dirty==Ta&&e.eq(this.node)&&a1(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,a=t,i=e.composing?this.localCompositionInfo(e,t):null,l=i&&i.pos>-1?i:null,c=i&&i.pos<0,u=new Lz(this,l&&l.node,e);if(gee(this.node,this.innerDeco,(f,h,m)=>{if(f.spec.marks)u.syncToMarks(f.spec.marks,r,e,h);else if(f.type.side>=0&&!m)u.syncToMarks(h==this.node.childCount?Pt.none:this.node.child(h).marks,r,e,h);u.placeWidget(f,e,a)},(f,h,m,b)=>{u.syncToMarks(f.marks,r,e,b);let y;if(u.findNodeMatch(f,h,m,b));else if(c&&e.state.selection.from>a&&e.state.selection.to<a+f.nodeSize&&(y=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(f,h,m,y,e));else if(u.updateNextNode(f,h,m,e,b,a));else u.addNode(f,h,m,e,a);a+=f.nodeSize}),u.syncToMarks([],r,e,0),this.node.isTextblock)u.addTextblockHacks();if(u.destroyRest(),u.changed||this.dirty==Ed){if(l)this.protectLocalComposition(e,l);if(Oz(this.contentDOM,this.children,e),Yp)bee(this.dom)}}localCompositionInfo(e,t){let{from:r,to:a}=e.state.selection;if(!(e.state.selection instanceof Me)||r<t||a>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let l=i.nodeValue,c=yee(this.node.content,l,r-t,a-t);return c<0?null:{node:i,pos:c,text:l}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:a}){if(this.getDesc(t))return;let i=t;for(;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);if(i.pmViewDesc)i.pmViewDesc=void 0}let l=new Mz(this,i,t,a);e.input.compositionNodes.push(l),this.children=IR(this.children,r,r+a.length,e,l)}update(e,t,r,a){if(this.dirty==ni||!e.sameMarkup(this.node))return!1;return this.updateInner(e,t,r,a),!0}updateInner(e,t,r,a){if(this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM)this.updateChildren(a,this.posAtStart);this.dirty=Ta}updateOuterDeco(e){if(a1(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;if(this.dom=Dz(this.dom,this.nodeDOM,_R(this.outerDeco,this.node,t),_R(e,this.node,t)),this.dom!=r)r.pmViewDesc=void 0,this.dom.pmViewDesc=this;this.outerDeco=e}selectNode(){if(this.nodeDOM.nodeType==1){if(this.nodeDOM.classList.add("ProseMirror-selectednode"),this.contentDOM||!this.node.type.spec.draggable)this.nodeDOM.draggable=!0}}deselectNode(){if(this.nodeDOM.nodeType==1){if(this.nodeDOM.classList.remove("ProseMirror-selectednode"),this.contentDOM||!this.node.type.spec.draggable)this.nodeDOM.removeAttribute("draggable")}}get domAtom(){return this.node.isAtom}};d1=class d1 extends Lc{constructor(e,t,r,a,i,l){super(e,t,r,a,i,null,l)}parseRule(){let e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}}update(e,t,r,a){if(this.dirty==ni||this.dirty!=Ta&&!this.inParent()||!e.sameMarkup(this.node))return!1;if(this.updateOuterDeco(t),(this.dirty!=Ta||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue){if(this.nodeDOM.nodeValue=e.text,a.trackWrites==this.nodeDOM)a.trackWrites=null}return this.node=e,this.dirty=Ta,!0}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){if(e==this.nodeDOM)return this.posAtStart+Math.min(t,this.node.text.length);return super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let a=this.node.cut(e,t),i=document.createTextNode(a.text);return new d1(this.parent,a,this.outerDeco,this.innerDeco,i,i)}markDirty(e,t){if(super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length))this.dirty=ni}get domAtom(){return!1}isText(e){return this.node.text==e}};jR=class jR extends Jp{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ta&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}};Nz=class Nz extends Lc{constructor(e,t,r,a,i,l,c,u){super(e,t,r,a,i,l,c);this.spec=u}update(e,t,r,a){if(this.dirty==ni)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,r);if(i)this.updateInner(e,t,r,a);return i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,r,a)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,a){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,a)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};Jg.prototype=Object.create(null);Td=[new Jg];ez=Or||$r&&Sz<63;Aee=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;jz={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};Yr={},Jr={},Lee={touchstart:!0,touchmove:!0};Jr.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,Xz(e))return;if(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),Zs&&$r&&r.keyCode==13)return;if(r.keyCode!=229)e.domObserver.forceFlush();if(Yp&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let a=Date.now();e.input.lastIOSEnter=a,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{if(e.input.lastIOSEnter==a)e.someProp("handleKeyDown",(i)=>i(e,wd(13,"Enter"))),e.input.lastIOSEnter=0},200)}else if(e.someProp("handleKeyDown",(a)=>a(e,r))||kee(e,r))r.preventDefault();else el(e,"key")};Jr.keyup=(e,t)=>{if(t.keyCode==16)e.input.shiftKey=!1};Jr.keypress=(e,t)=>{let r=t;if(Xz(e)||!r.charCode||r.ctrlKey&&!r.altKey||Ca&&r.metaKey)return;if(e.someProp("handleKeyPress",(i)=>i(e,r))){r.preventDefault();return}let a=e.state.selection;if(!(a instanceof Me)||!a.$from.sameParent(a.$to)){let i=String.fromCharCode(r.charCode),l=()=>e.state.tr.insertText(i).scrollIntoView();if(!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",(c)=>c(e,a.$from.pos,a.$to.pos,i,l)))e.dispatch(l());r.preventDefault()}};Wz=Ca?"metaKey":"ctrlKey";Yr.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let a=JR(e),i=Date.now(),l="singleClick";if(i-e.input.lastClick.time<500&&Hee(r,e.input.lastClick)&&!r[Wz]&&e.input.lastClick.button==r.button){if(e.input.lastClick.type=="singleClick")l="doubleClick";else if(e.input.lastClick.type=="doubleClick")l="tripleClick"}if(e.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:l,button:r.button},e.input.mouseDown)e.input.mouseDown.done();let c=e.posAtCoords(rb(r));if(!c)return;if(l=="singleClick")e.input.mouseDown=new Yz(e,c,r,!!a);else if((l=="doubleClick"?jee:Kee)(e,c.pos,c.inside,r))r.preventDefault();else el(e,"pointer")};Yz=class Yz extends XR{constructor(e,t,r,a){super(e);this.pos=t,this.event=r,this.flushed=a,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[Wz],this.allowDefault=r.shiftKey;let i,l;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),l=t.inside;else{let h=e.state.doc.resolve(t.pos);i=h.parent,l=h.depth?h.before():0}let c=a?null:r.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u&&u.nodeDOM.nodeType==1?u.nodeDOM:null;let{selection:f}=e.state;if(r.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof Pe&&f.from<=l&&f.to>l))this.mightDrag={node:i,pos:l,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ea&&!this.target.hasAttribute("contentEditable"))};if(this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)){if(this.view.domObserver.stop(),this.mightDrag.addAttr)this.target.draggable=!0;if(this.mightDrag.setUneditable)setTimeout(()=>{if(this.view.input.mouseDown==this)this.target.setAttribute("contentEditable","false")},20);this.view.domObserver.start()}el(e,"pointer")}done(){if(super.done(),this.mightDrag&&this.target){if(this.view.domObserver.stop(),this.mightDrag.addAttr)this.target.removeAttribute("draggable");if(this.mightDrag.setUneditable)this.target.removeAttribute("contentEditable");this.view.domObserver.start()}if(this.delayedSelectionSync)setTimeout(()=>{if(!this.view.isDestroyed)tl(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc)t=this.view.posAtCoords(rb(e));if(this.updateAllowDefault(e),this.allowDefault||!t)el(this.view,"pointer");else if(Vee(this.view,t.pos,t.inside,e,this.selectNode))e.preventDefault();else if(e.button==0&&(this.flushed||Or&&this.mightDrag&&!this.mightDrag.node.isAtom||$r&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2))ob(this.view,Fe.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault();else el(this.view,"pointer")}move(e){this.updateAllowDefault(e),el(this.view,"pointer"),super.move(e)}updateAllowDefault(e){if(!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4))this.allowDefault=!0}delaySelUpdate(){if(!this.allowDefault)return!1;return this.delayedSelectionSync=!0,!0}};Jz=class Jz extends XR{constructor(e,t){super(e);this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),el(this.view,"pointer");let t=this.view.posAtCoords(rb(e)),r=t&&Gz(this.view,t.inside,!1);if(!r)return;let{doc:a}=this.view.state,i=this.startSelection,[l,c]=r.from<i.from?[i.to,r.from]:[i.from,r.to];ob(this.view,Me.create(a,l,c),"pointer")}};Yr.touchstart=(e)=>{e.input.lastTouch=Date.now(),JR(e),el(e,"pointer")};Yr.touchmove=(e)=>{e.input.lastTouch=Date.now(),el(e,"pointer")};Yr.contextmenu=(e)=>JR(e);Gee=Zs?5000:-1;Jr.compositionstart=Jr.compositionupdate=(e)=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$to;if(t.selection instanceof Me&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some((a)=>a.type.spec.inclusive===!1)||$r&&Cz&&Wee(e)))e.markCursor=e.state.storedMarks||r.marks(),s1(e,!0),e.markCursor=null;else if(s1(e,!t.selection.empty),Ea&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let a=e.domSelectionRange();for(let{focusNode:i,focusOffset:l}=a;i&&i.nodeType==1&&l!=0;){let c=l<0?i.lastChild:i.childNodes[l-1];if(!c)break;if(c.nodeType==3){let u=e.domSelection();if(u)u.collapse(c,c.nodeValue.length);break}else i=c,l=-1}}e.input.composing=!0}Qz(e,Gee)};Jr.compositionend=(e,t)=>{if(e.composing){if(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition)e.domObserver.forceFlush();else if(e.input.compositionPendingChanges)Promise.resolve().then(()=>e.domObserver.flush());e.input.compositionID++,Qz(e,20)}};Qg=go&&Dc<15||Yp&&XZ<604;Yr.copy=Jr.cut=(e,t)=>{let r=t,a=e.state.selection,i=r.type=="cut";if(a.empty)return;let l=Qg?null:r.clipboardData,c=a.content(),{dom:u,text:f}=GR(e,c);if(l)r.preventDefault(),l.clearData(),l.setData("text/html",u.innerHTML),l.setData("text/plain",f);else Jee(e,u);if(i)e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};Jr.paste=(e,t)=>{let r=t;if(e.composing&&!Zs)return;let a=Qg?null:r.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;if(a&&Zg(e,eH(a),a.getData("text/html"),i,r))r.preventDefault();else Qee(e,r)};Zee=Ca?"altKey":"ctrlKey";Yr.dragstart=(e,t)=>{let r=t,a=e.input.mouseDown;if(a)a.done();if(!r.dataTransfer)return;let i=e.state.selection,l=i.empty?null:e.posAtCoords(rb(r)),c;if(l&&l.pos>=i.from&&l.pos<=(i instanceof Pe?i.to-1:i.to));else if(a&&a.mightDrag)c=Pe.create(e.state.doc,a.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let b=e.docView.nearestDesc(r.target,!0);if(b&&b.node.type.spec.draggable&&b!=e.docView)c=Pe.create(e.state.doc,b.posBefore)}let u=(c||e.state.selection).content(),{dom:f,text:h,slice:m}=GR(e,u);if(!r.dataTransfer.files.length||!$r||Sz>120)r.dataTransfer.clearData();if(r.dataTransfer.setData(Qg?"Text":"text/html",f.innerHTML),r.dataTransfer.effectAllowed="copyMove",!Qg)r.dataTransfer.setData("text/plain",h);e.dragging=new QR(m,tH(e,r),c)};Yr.dragend=(e)=>{let t=e.dragging;window.setTimeout(()=>{if(e.dragging==t)e.dragging=null},50)};Jr.dragover=Jr.dragenter=(e,t)=>t.preventDefault();Jr.drop=(e,t)=>{try{ete(e,t,e.dragging)}finally{e.dragging=null}};Yr.focus=(e)=>{if(e.input.lastFocus=Date.now(),!e.focused)e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{if(e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange()))tl(e)},20)};Yr.blur=(e,t)=>{let r=t;if(e.focused){if(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget))e.domObserver.currentSelection.clear();e.focused=!1}};Yr.beforeinput=(e,t)=>{if(Zs&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:a}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=a)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(l)=>l(e,wd(8,"Backspace"))))return;let{$cursor:i}=e.state.selection;if(i&&i.pos>0)e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in Jr)Yr[e]=Jr[e];Gp=[],Rd={};Lt.empty=new Lt([],[]);Lt.removeOverlap=e4;Nr=Lt.empty;rte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ote=go&&Dc<=11;fz=new WeakMap;dte=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;f1.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;if(t)t.call(this,e);else this.updateState(this.state.apply(e))}});var Bc=N(()=>{t4()});function sH(e){var t=yte&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||vte&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?p1:nl)[e.keyCode]||e.key||"Unidentified";if(r=="Esc")r="Escape";if(r=="Del")r="Delete";if(r=="Left")r="ArrowLeft";if(r=="Up")r="ArrowUp";if(r=="Right")r="ArrowRight";if(r=="Down")r="ArrowDown";return r}var nl,p1,yte,vte,bn,bn,bn,ab;var lH=N(()=>{nl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},p1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},yte=typeof navigator<"u"&&/Mac/.test(navigator.platform),vte=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(bn=0;bn<10;bn++)nl[48+bn]=nl[96+bn]=String(bn);for(bn=1;bn<=24;bn++)nl[bn+111]="F"+bn;for(bn=65;bn<=90;bn++)nl[bn]=String.fromCharCode(bn+32),p1[bn]=String.fromCharCode(bn);for(ab in nl)if(!p1.hasOwnProperty(ab))p1[ab]=nl[ab]});function Ste(e){let t=e.split(/-(?!$)/),r=t[t.length-1];if(r=="Space")r=" ";let a,i,l,c;for(let u=0;u<t.length-1;u++){let f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))a=!0;else if(/^(c|ctrl|control)$/i.test(f))i=!0;else if(/^s(hift)?$/i.test(f))l=!0;else if(/^mod$/i.test(f))if(xte)c=!0;else i=!0;else throw Error("Unrecognized modifier name: "+f)}if(a)r="Alt-"+r;if(i)r="Ctrl-"+r;if(c)r="Meta-"+r;if(l)r="Shift-"+r;return r}function Cte(e){let t=Object.create(null);for(let r in e)t[Ste(r)]=e[r];return t}function n4(e,t,r=!0){if(t.altKey)e="Alt-"+e;if(t.ctrlKey)e="Ctrl-"+e;if(t.metaKey)e="Meta-"+e;if(r&&t.shiftKey)e="Shift-"+e;return e}function cH(e){return new qe({props:{handleKeyDown:ib(e)}})}function ib(e){let t=Cte(e);return function(r,a){let i=sH(a),l,c=t[n4(i,a)];if(c&&c(r.state,r.dispatch,r))return!0;if(i.length==1&&i!=" "){if(a.shiftKey){let u=t[n4(i,a,!1)];if(u&&u(r.state,r.dispatch,r))return!0}if((a.altKey||a.metaKey||a.ctrlKey)&&!($te&&a.ctrlKey&&a.altKey)&&(l=nl[a.keyCode])&&l!=i){let u=t[n4(l,a)];if(u&&u(r.state,r.dispatch,r))return!0}}return!1}}var xte,$te;var h1=N(()=>{lH();Js();xte=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),$te=typeof navigator<"u"&&/Win/.test(navigator.platform)});var uH=N(()=>{h1()});function S1(e){let{state:t,transaction:r}=e,{selection:a}=r,{doc:i}=r,{storedMarks:l}=r;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return l},get selection(){return a},get doc(){return i},get tr(){return a=r.selection,i=r.doc,l=r.storedMarks,r}}}function wn(e,t){if(typeof e==="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function u4(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function x1(e,t,r={strict:!0}){let a=Object.keys(t);if(!a.length)return!0;return a.every((i)=>{if(r.strict)return t[i]===e[i];if(u4(t[i]))return t[i].test(e[i]);return t[i]===e[i]})}function CH(e,t,r={}){return e.find((a)=>a.type===t&&x1(Object.fromEntries(Object.keys(r).map((i)=>[i,a.attrs[i]])),r))}function fH(e,t,r={}){return!!CH(e,t,r)}function d4(e,t,r){if(!e||!t)return;let a=e.parent.childAfter(e.parentOffset);if(!a.node||!a.node.marks.some((h)=>h.type===t))a=e.parent.childBefore(e.parentOffset);if(!a.node||!a.node.marks.some((h)=>h.type===t))return;if(!r){let h=a.node.marks.find((m)=>m.type===t);if(h)r=h.attrs}if(!CH([...a.node.marks],t,r))return;let l=a.index,c=e.start()+a.offset,u=l+1,f=c+a.node.nodeSize;while(l>0&&fH([...e.parent.child(l-1).marks],t,r))l-=1,c-=e.parent.child(l).nodeSize;while(u<e.parent.childCount&&fH([...e.parent.child(u).marks],t,r))f+=e.parent.child(u).nodeSize,u+=1;return{from:c,to:f}}function ol(e,t){if(typeof e==="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function w1(e){return e instanceof Me}function rl(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function i4(e,t=null){if(!t)return null;let r=Fe.atStart(e),a=Fe.atEnd(e);if(t==="start"||t===!0)return r;if(t==="end")return a;let i=r.from,l=a.to;if(t==="all")return Me.create(e,rl(0,i,l),rl(e.content.size,i,l));return Me.create(e,rl(t,i,l),rl(t,i,l))}function pH(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function $1(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Ute(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}function m1(e){if(typeof window>"u")throw Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`,r=new window.DOMParser().parseFromString(t,"text/html").body;return wH(r)}function Xp(e,t,r){if(e instanceof Wr||e instanceof le)return e;r={slice:!0,parseOptions:{},...r};let a=typeof e==="object"&&e!==null,i=typeof e==="string";if(a)try{if(Array.isArray(e)&&e.length>0)return le.fromArray(e.map((u)=>t.nodeFromJSON(u)));let c=t.nodeFromJSON(e);if(r.errorOnInvalidContent)c.check();return c}catch(l){if(r.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:l});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",l),Xp("",t,r)}if(i){if(r.errorOnInvalidContent){let c=!1,u="",f=new Fg({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:(h)=>(c=!0,u=typeof h==="string"?h:h.outerHTML,null)}]}})});if(r.slice)va.fromSchema(f).parseSlice(m1(e),r.parseOptions);else va.fromSchema(f).parse(m1(e),r.parseOptions);if(r.errorOnInvalidContent&&c)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${u}`)})}let l=va.fromSchema(t);if(r.slice)return l.parseSlice(m1(e),r.parseOptions).content;return l.parse(m1(e),r.parseOptions)}return Xp("",t,r)}function EH(e,t,r){let a=e.steps.length-1;if(a<t)return;let i=e.steps[a];if(!(i instanceof gn||i instanceof Cn))return;let l=e.mapping.maps[a],c=0;l.forEach((u,f,h,m)=>{if(c===0)c=m}),e.setSelection(Fe.near(e.doc.resolve(c),r))}function TH(e){for(let t=0;t<e.edgeCount;t+=1){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}function RH(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function nne(e){let t=e.split(/-(?!$)/),r=t[t.length-1];if(r==="Space")r=" ";let a,i,l,c;for(let u=0;u<t.length-1;u+=1){let f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))a=!0;else if(/^(c|ctrl|control)$/i.test(f))i=!0;else if(/^s(hift)?$/i.test(f))l=!0;else if(/^mod$/i.test(f))if($1()||RH())c=!0;else i=!0;else throw Error(`Unrecognized modifier name: ${f}`)}if(a)r=`Alt-${r}`;if(i)r=`Ctrl-${r}`;if(c)r=`Meta-${r}`;if(l)r=`Shift-${r}`;return r}function Zi(e,t,r={}){let{from:a,to:i,empty:l}=e.selection,c=t?wn(t,e.schema):null,u=[];e.doc.nodesBetween(a,i,(b,y)=>{if(b.isText)return;let v=Math.max(a,y),S=Math.min(i,y+b.nodeSize);u.push({node:b,from:v,to:S})});let f=i-a,h=u.filter((b)=>{if(!c)return!0;return c.name===b.node.type.name}).filter((b)=>x1(b.node.attrs,r,{strict:!1}));if(l)return!!h.length;return h.reduce((b,y)=>b+y.to-y.from,0)>=f}function E1(e,t){if(t.nodes[e])return"node";if(t.marks[e])return"mark";return null}function hH(e,t){let r=typeof t==="string"?[t]:t;return Object.keys(e).reduce((a,i)=>{if(!r.includes(i))a[i]=e[i];return a},{})}function s4(e,t,r={},a={}){return Xp(e,t,{slice:!1,parseOptions:r,errorOnInvalidContent:a.errorOnInvalidContent})}function kH(e,t){let r=ol(t,e.schema),{from:a,to:i,empty:l}=e.selection,c=[];if(l){if(e.storedMarks)c.push(...e.storedMarks);c.push(...e.selection.$head.marks())}else e.doc.nodesBetween(a,i,(f)=>{c.push(...f.marks)});let u=c.find((f)=>f.type.name===r.name);if(!u)return{};return{...u.attrs}}function f4(e,t){let r=new Gg(e);return t.forEach((a)=>{a.steps.forEach((i)=>{r.step(i)})}),r}function AH(e,t,r){let a=[];return e.nodesBetween(t.from,t.to,(i,l)=>{if(r(i))a.push({node:i,pos:l})}),a}function bne(e,t){for(let r=e.depth;r>0;r-=1){let a=e.node(r);if(t(a))return{pos:r>0?e.before(r):0,start:e.start(r),depth:r,node:a}}}function T1(e){return(t)=>bne(t.$from,e)}function ze(e,t,r){if(e.config[t]===void 0&&e.parent)return ze(e.parent,t,r);if(typeof e.config[t]==="function")return e.config[t].bind({...r,parent:e.parent?ze(e.parent,t,r):null});return e.config[t]}function p4(e){return e.map((t)=>{let r={name:t.name,options:t.options,storage:t.storage},a=ze(t,"addExtensions",r);if(a)return[t,...p4(a())];return t}).flat(10)}function h4(e,t){let r=Xi.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}function MH(e){return typeof e==="function"}function Bt(e,t=void 0,...r){if(MH(e)){if(t)return e.bind(t)(...r);return e(...r)}return e}function yne(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Qp(e){let t=e.filter((i)=>i.type==="extension"),r=e.filter((i)=>i.type==="node"),a=e.filter((i)=>i.type==="mark");return{baseExtensions:t,nodeExtensions:r,markExtensions:a}}function NH(e){let t=[],{nodeExtensions:r,markExtensions:a}=Qp(e),i=[...r,...a],l={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},c=r.filter((h)=>h.name!=="text").map((h)=>h.name),u=a.map((h)=>h.name),f=[...c,...u];return e.forEach((h)=>{let m={name:h.name,options:h.options,storage:h.storage,extensions:i},b=ze(h,"addGlobalAttributes",m);if(!b)return;b().forEach((v)=>{let S;if(Array.isArray(v.types))S=v.types;else if(v.types==="*")S=f;else if(v.types==="nodes")S=c;else if(v.types==="marks")S=u;else S=[];S.forEach((w)=>{Object.entries(v.attributes).forEach(([E,R])=>{t.push({type:w,name:E,attribute:{...l,...R}})})})})}),i.forEach((h)=>{let m={name:h.name,options:h.options,storage:h.storage},b=ze(h,"addAttributes",m);if(!b)return;let y=b();Object.entries(y).forEach(([v,S])=>{let w={...l,...S};if(typeof(w==null?void 0:w.default)==="function")w.default=w.default();if((w==null?void 0:w.isRequired)&&(w==null?void 0:w.default)===void 0)delete w.default;t.push({type:h.name,name:v,attribute:w})})}),t}function vne(e){let t=[],r="",a=!1,i=!1,l=0,c=e.length;for(let u=0;u<c;u+=1){let f=e[u];if(f==="'"&&!i){a=!a,r+=f;continue}if(f==='"'&&!a){i=!i,r+=f;continue}if(!a&&!i){if(f==="("){l+=1,r+=f;continue}if(f===")"&&l>0){l-=1,r+=f;continue}if(f===";"&&l===0){t.push(r),r="";continue}}r+=f}if(r)t.push(r);return t}function mH(e){let t=[],r=vne(e||""),a=r.length;for(let i=0;i<a;i+=1){let l=r[i],c=l.indexOf(":");if(c===-1)continue;let u=l.slice(0,c).trim(),f=l.slice(c+1).trim();if(u&&f)t.push([u,f])}return t}function xt(...e){return e.filter((t)=>!!t).reduce((t,r)=>{let a={...t};return Object.entries(r).forEach(([i,l])=>{if(!a[i]){a[i]=l;return}if(i==="class"){let u=l?String(l).split(" "):[],f=a[i]?a[i].split(" "):[],h=u.filter((m)=>!f.includes(m));a[i]=[...f,...h].join(" ")}else if(i==="style"){let u=new Map([...mH(a[i]),...mH(l)]);a[i]=Array.from(u.entries()).map(([f,h])=>`${f}: ${h}`).join("; ")}else a[i]=l}),a},{})}function Zp(e,t){return t.filter((r)=>r.type===e.type.name).filter((r)=>r.attribute.rendered).map((r)=>{if(!r.attribute.renderHTML)return{[r.name]:e.attrs[r.name]};return r.attribute.renderHTML(e.attrs)||{}}).reduce((r,a)=>xt(r,a),{})}function xne(e){if(typeof e!=="string")return e;if(e.match(/^[+-]?(?:\d*\.)?\d+$/))return Number(e);if(e==="true")return!0;if(e==="false")return!1;return e}function gH(e,t){if("style"in e)return e;return{...e,getAttrs:(r)=>{let a=e.getAttrs?e.getAttrs(r):e.attrs;if(a===!1)return!1;let i=t.reduce((l,c)=>{let u=c.attribute.parseHTML?c.attribute.parseHTML(r):xne(r.getAttribute(c.name));if(u===null||u===void 0)return l;return{...l,[c.name]:u}},{});return{...a,...i}}}}function bH(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>{if(t==="attrs"&&yne(r))return!1;return r!==null&&r!==void 0}))}function yH(e){var t,r;let a={};if(!((t=e==null?void 0:e.attribute)==null?void 0:t.isRequired)&&"default"in((e==null?void 0:e.attribute)||{}))a.default=e.attribute.default;if(((r=e==null?void 0:e.attribute)==null?void 0:r.validate)!==void 0)a.validate=e.attribute.validate;return[e.name,a]}function $ne(e,t){var r;let a=NH(e),{nodeExtensions:i,markExtensions:l}=Qp(e),c=(r=i.find((h)=>ze(h,"topNode")))==null?void 0:r.name,u=Object.fromEntries(i.map((h)=>{let m=a.filter((R)=>R.type===h.name),b={name:h.name,options:h.options,storage:h.storage,editor:t},y=e.reduce((R,D)=>{let H=ze(D,"extendNodeSchema",b);return{...R,...H?H(h):{}}},{}),v=bH({...y,content:Bt(ze(h,"content",b)),marks:Bt(ze(h,"marks",b)),group:Bt(ze(h,"group",b)),inline:Bt(ze(h,"inline",b)),atom:Bt(ze(h,"atom",b)),selectable:Bt(ze(h,"selectable",b)),draggable:Bt(ze(h,"draggable",b)),code:Bt(ze(h,"code",b)),whitespace:Bt(ze(h,"whitespace",b)),linebreakReplacement:Bt(ze(h,"linebreakReplacement",b)),defining:Bt(ze(h,"defining",b)),isolating:Bt(ze(h,"isolating",b)),attrs:Object.fromEntries(m.map(yH))}),S=Bt(ze(h,"parseHTML",b));if(S)v.parseDOM=S.map((R)=>gH(R,m));let w=ze(h,"renderHTML",b);if(w)v.toDOM=(R)=>w({node:R,HTMLAttributes:Zp(R,m)});let E=ze(h,"renderText",b);if(E)v.toText=E;return[h.name,v]})),f=Object.fromEntries(l.map((h)=>{let m=a.filter((E)=>E.type===h.name),b={name:h.name,options:h.options,storage:h.storage,editor:t},y=e.reduce((E,R)=>{let D=ze(R,"extendMarkSchema",b);return{...E,...D?D(h):{}}},{}),v=bH({...y,inclusive:Bt(ze(h,"inclusive",b)),excludes:Bt(ze(h,"excludes",b)),group:Bt(ze(h,"group",b)),spanning:Bt(ze(h,"spanning",b)),code:Bt(ze(h,"code",b)),attrs:Object.fromEntries(m.map(yH))}),S=Bt(ze(h,"parseHTML",b));if(S)v.parseDOM=S.map((E)=>gH(E,m));let w=ze(h,"renderHTML",b);if(w)v.toDOM=(E)=>w({mark:E,HTMLAttributes:Zp(E,m)});return[h.name,v]}));return new Fg({topNode:c,nodes:u,marks:f})}function Sne(e){let t=e.filter((r,a)=>e.indexOf(r)!==a);return Array.from(new Set(t))}function lb(e){return e.sort((r,a)=>{let i=ze(r,"priority")||100,l=ze(a,"priority")||100;if(i>l)return-1;if(i<l)return 1;return 0})}function OH(e){let t=lb(p4(e)),r=Sne(t.map((a)=>a.name));if(r.length)console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((a)=>`'${a}'`).join(", ")}]. This can lead to issues.`);return t}function DH(e,t,r){let{from:a,to:i}=t,{blockSeparator:l=`
261
+
262
+ `,textSerializers:c={}}=r||{},u="";return e.nodesBetween(a,i,(f,h,m,b)=>{var y;if(f.isBlock&&h>a)u+=l;let v=c==null?void 0:c[f.type.name];if(v){if(m)u+=v({node:f,pos:h,parent:m,index:b,range:t});return!1}if(f.isText)u+=(y=f==null?void 0:f.text)==null?void 0:y.slice(Math.max(a,h)-h,i-h)}),u}function m4(e,t){let r={from:0,to:e.content.size};return DH(e,r,t)}function R1(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,r])=>[t,r.spec.toText]))}function Cne(e,t){let r=wn(t,e.schema),{from:a,to:i}=e.selection,l=[];e.doc.nodesBetween(a,i,(u)=>{l.push(u)});let c=l.reverse().find((u)=>u.type.name===r.name);if(!c)return{};return{...c.attrs}}function g4(e,t){let r=E1(typeof t==="string"?t:t.name,e.schema);if(r==="node")return Cne(e,t);if(r==="mark")return kH(e,t);return{}}function wne(e,t=JSON.stringify){let r={};return e.filter((a)=>{let i=t(a);return Object.prototype.hasOwnProperty.call(r,i)?!1:r[i]=!0})}function Ene(e){let t=wne(e);return t.length===1?t:t.filter((r,a)=>!t.filter((l,c)=>c!==a).some((l)=>r.oldRange.from>=l.oldRange.from&&r.oldRange.to<=l.oldRange.to&&r.newRange.from>=l.newRange.from&&r.newRange.to<=l.newRange.to))}function cb(e){let{mapping:t,steps:r}=e,a=[];return t.maps.forEach((i,l)=>{let c=[];if(!i.ranges.length){let{from:u,to:f}=r[l];if(u===void 0||f===void 0)return;c.push({from:u,to:f})}else i.forEach((u,f)=>{c.push({from:u,to:f})});c.forEach(({from:u,to:f})=>{let h=t.slice(l).map(u,-1),m=t.slice(l).map(f),b=t.invert().map(h,-1),y=t.invert().map(m);a.push({oldRange:{from:b,to:y},newRange:{from:h,to:m}})})}),Ene(a)}function k1(e,t,r){let a=[];if(e===t)r.resolve(e).marks().forEach((i)=>{let l=r.resolve(e),c=d4(l,i.type);if(!c)return;a.push({mark:i,...c})});else r.nodesBetween(e,t,(i,l)=>{if(!i||(i==null?void 0:i.nodeSize)===void 0)return;a.push(...i.marks.map((c)=>({from:l,to:l+i.nodeSize,mark:c})))});return a}function sb(e,t){return t.nodes[e]||t.marks[e]||null}function v1(e,t,r){return Object.fromEntries(Object.entries(r).filter(([a])=>{let i=e.find((l)=>l.type===t&&l.name===a);if(!i)return!1;return i.attribute.keepOnSplit}))}function l4(e,t,r={}){let{empty:a,ranges:i}=e.selection,l=t?ol(t,e.schema):null;if(a)return!!(e.storedMarks||e.selection.$from.marks()).filter((b)=>{if(!l)return!0;return l.name===b.type.name}).find((b)=>x1(b.attrs,r,{strict:!1}));let c=0,u=[];if(i.forEach(({$from:b,$to:y})=>{let v=b.pos,S=y.pos;e.doc.nodesBetween(v,S,(w,E)=>{if(l&&w.inlineContent&&!w.type.allowsMarkType(l))return!1;if(!w.isText&&!w.marks.length)return;let R=Math.max(v,E),D=Math.min(S,E+w.nodeSize),H=D-R;c+=H,u.push(...w.marks.map((z)=>({mark:z,from:R,to:D})))})}),c===0)return!1;let f=u.filter((b)=>{if(!l)return!0;return l.name===b.mark.type.name}).filter((b)=>x1(b.mark.attrs,r,{strict:!1})).reduce((b,y)=>b+y.to-y.from,0),h=u.filter((b)=>{if(!l)return!0;return b.mark.type!==l&&b.mark.type.excludes(l)}).reduce((b,y)=>b+y.to-y.from,0);return(f>0?f+h:f)>=c}function Rne(e,t,r={}){if(!t)return Zi(e,null,r)||l4(e,null,r);let a=E1(t,e.schema);if(a==="node")return Zi(e,t,r);if(a==="mark")return l4(e,t,r);return!1}function vH(e,t){if(Array.isArray(t))return t.some((r)=>(typeof r==="string"?r:r.name)===e.name);return t}function r4(e,t){let{nodeExtensions:r}=Qp(t),a=r.find((c)=>c.name===e);if(!a)return!1;let i={name:a.name,options:a.options,storage:a.storage},l=Bt(ze(a,"group",i));if(typeof l!=="string")return!1;return l.split(" ").includes("list")}function eh(e,{checkChildren:t=!0,ignoreWhitespace:r=!1}={}){var a;if(r){if(e.type.name==="hardBreak")return!0;if(e.isText)return!/\S/.test((a=e.text)!=null?a:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach((l)=>{if(i===!1)return;if(!eh(l,{ignoreWhitespace:r,checkChildren:t}))i=!1}),i}return!1}function A1(e){return e instanceof Pe}function kne(e,t){let r=t.mapping.mapResult(e.position);return{position:new IH(r.pos),mapResult:r}}function Ane(e){return new IH(e)}function M1(e,t,r){let i=e.state.doc.content.size,l=rl(t,0,i),c=rl(r,0,i),u=e.coordsAtPos(l),f=e.coordsAtPos(c,-1),h=Math.min(u.top,f.top),m=Math.max(u.bottom,f.bottom),b=Math.min(u.left,f.left),y=Math.max(u.right,f.right),v=y-b,S=m-h,R={top:h,bottom:m,left:b,right:y,width:v,height:S,x:b,y:h};return{...R,toJSON:()=>R}}function Mne(e,t,r){var a;let{selection:i}=t,l=null;if(w1(i))l=i.$cursor;if(l){let u=(a=e.storedMarks)!=null?a:l.marks();return l.parent.type.allowsMarkType(r)&&(!!r.isInSet(u)||!u.some((h)=>h.type.excludes(r)))}let{ranges:c}=i;return c.some(({$from:u,$to:f})=>{let h=u.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(r):!1;return e.doc.nodesBetween(u.pos,f.pos,(m,b,y)=>{if(h)return!1;if(m.isInline){let v=!y||y.type.allowsMarkType(r),S=!!r.isInSet(m.marks)||!m.marks.some((w)=>w.type.excludes(r));h=v&&S}return!h}),h})}function xH(e,t){let r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(r){let a=r.filter((i)=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(a)}}function $H(e){return!e||e==="1"?null:e}function BH(e,t){return $H(e)===$H(t)}function Hne(e){let t=e.doc,r=t.firstChild;if(!r)return null;let a=t.resolve(1),i=t.resolve(r.nodeSize-1);return Me.between(a,i)}function zH(e,t){let{selection:r}=e,{$from:a}=r;if(r instanceof Pe){let l=a.index();return a.parent.canReplaceWith(l,l+1,t)}let i=a.depth;while(i>=0){let l=a.index(i);if(a.node(i).contentMatchAt(l).matchType(t))return!0;i-=1}return!1}function Zne(e,t,r){let a=document.querySelector(`style[data-tiptap-style${r?`-${r}`:""}]`);if(a!==null)return a;let i=document.createElement("style");if(t)i.setAttribute("nonce",t);return i.setAttribute(`data-tiptap-style${r?`-${r}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}function HH(e,t){let r=e.getAttribute("style");if(!r)return null;let a=r.split(";").map((l)=>l.trim()).filter(Boolean),i=t.toLowerCase();for(let l=a.length-1;l>=0;l-=1){let c=a[l],u=c.indexOf(":");if(u===-1)continue;if(c.slice(0,u).trim().toLowerCase()===i)return c.slice(u+1).trim()}return null}function ere(e){return typeof e==="number"}function tre(e){return Object.prototype.toString.call(e).slice(8,-1)}function g1(e){if(tre(e)!=="Object")return!1;return e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function b4(e){if(!(e==null?void 0:e.trim()))return{};let t={},r=[],a=e.replace(/["']([^"']*)["']/g,(h)=>(r.push(h),`__QUOTED_${r.length-1}__`)),i=a.match(/(?:^|\s)\.([\w-]+)/g);if(i){let h=i.map((m)=>m.trim().slice(1));t.class=h.join(" ")}let l=a.match(/(?:^|\s)#([\w-]+)/);if(l)t.id=l[1];let c=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(a.matchAll(c)).forEach(([,h,m])=>{var b;let y=parseInt(((b=m.match(/__QUOTED_(\d+)__/))==null?void 0:b[1])||"0",10),v=r[y];if(v)t[h]=v.slice(1,-1)});let f=a.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(f)f.split(/\s+/).filter(Boolean).forEach((m)=>{if(m.match(/^[a-zA-Z][\w-]*$/))t[m]=!0});return t}function y4(e){if(!e||Object.keys(e).length===0)return"";let t=[];if(e.class)String(e.class).split(/\s+/).filter(Boolean).forEach((a)=>t.push(`.${a}`));if(e.id)t.push(`#${e.id}`);return Object.entries(e).forEach(([r,a])=>{if(r==="class"||r==="id")return;if(a===!0)t.push(r);else if(a!==!1&&a!=null)t.push(`${r}="${String(a)}"`)}),t.join(" ")}function rre(e){let{nodeName:t,name:r,parseAttributes:a=b4,serializeAttributes:i=y4,defaultAttributes:l={},requiredAttributes:c=[],allowedAttributes:u}=e,f=r||t,h=(m)=>{if(!u)return m;let b={};return u.forEach((y)=>{if(y in m)b[y]=m[y]}),b};return{parseMarkdown:(m,b)=>{let y={...l,...m.attributes};return b.createNode(t,y,[])},markdownTokenizer:{name:t,level:"block",start(m){var b;let y=new RegExp(`^:::${f}(?:\\s|$)`,"m"),v=(b=m.match(y))==null?void 0:b.index;return v!==void 0?v:-1},tokenize(m,b,y){let v=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),S=m.match(v);if(!S)return;let w=S[1]||"",E=a(w);if(c.find((D)=>!(D in E)))return;return{type:t,raw:S[0],attributes:E}}},renderMarkdown:(m)=>{let b=h(m.attrs||{}),y=i(b),v=y?` {${y}}`:"";return`:::${f}${v} :::`}}}function ore(e){let{nodeName:t,name:r,getContent:a,parseAttributes:i=b4,serializeAttributes:l=y4,defaultAttributes:c={},content:u="block",allowedAttributes:f}=e,h=r||t,m=(b)=>{if(!f)return b;let y={};return f.forEach((v)=>{if(v in b)y[v]=b[v]}),y};return{parseMarkdown:(b,y)=>{let v;if(a){let w=a(b);v=typeof w==="string"?[{type:"text",text:w}]:w}else if(u==="block")v=y.parseChildren(b.tokens||[]);else v=y.parseInline(b.tokens||[]);let S={...c,...b.attributes};return y.createNode(t,S,v)},markdownTokenizer:{name:t,level:"block",start(b){var y;let v=new RegExp(`^:::${h}`,"m"),S=(y=b.match(v))==null?void 0:y.index;return S!==void 0?S:-1},tokenize(b,y,v){var S;let w=new RegExp(`^:::${h}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),E=b.match(w);if(!E)return;let[R,D=""]=E,H=i(D),z=1,G=R.length,ee="",U=/^:::([\w-]*)(\s.*)?/gm,P=b.slice(G);U.lastIndex=0;for(;;){let re=U.exec(P);if(re===null)break;let J=re.index,ye=re[1];if((S=re[2])==null?void 0:S.endsWith(":::"))continue;if(ye)z+=1;else if(z-=1,z===0){let ce=P.slice(0,J);ee=ce.trim();let se=b.slice(0,G+J+re[0].length),_=[];if(ee)if(u==="block"){_=v.blockTokens(ce),_.forEach((W)=>{if(W.text&&(!W.tokens||W.tokens.length===0))W.tokens=v.inlineTokens(W.text)});while(_.length>0){let W=_[_.length-1];if(W.type==="paragraph"&&(!W.text||W.text.trim()===""))_.pop();else break}}else _=v.inlineTokens(ee);return{type:t,raw:se,attributes:H,content:ee,tokens:_}}}return}},renderMarkdown:(b,y)=>{let v=m(b.attrs||{}),S=l(v),w=S?` {${S}}`:"",E=y.renderChildren(b.content||[],`
263
+
264
+ `);return`:::${h}${w}
265
+
266
+ ${E}
267
+
268
+ :::`}}}function are(e){if(!e.trim())return{};let t={},r=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,a=r.exec(e);while(a!==null){let[,i,l,c]=a;t[i]=l||c,a=r.exec(e)}return t}function ire(e){return Object.entries(e).filter(([,t])=>t!==void 0&&t!==null).map(([t,r])=>`${t}="${r}"`).join(" ")}function sre(e){let{nodeName:t,name:r,getContent:a,parseAttributes:i=are,serializeAttributes:l=ire,defaultAttributes:c={},selfClosing:u=!1,allowedAttributes:f}=e,h=r||t,m=(y)=>{if(!f)return y;let v={};return f.forEach((S)=>{let w=typeof S==="string"?S:S.name,E=typeof S==="string"?void 0:S.skipIfDefault;if(w in y){let R=y[w];if(E!==void 0&&R===E)return;v[w]=R}}),v},b=h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(y,v)=>{let S={...c,...y.attributes};if(u)return v.createNode(t,S);let w=a?a(y):y.content||"";if(w)return v.createNode(t,S,[v.createTextNode(w)]);return v.createNode(t,S,[])},markdownTokenizer:{name:t,level:"inline",start(y){let v=u?new RegExp(`\\[${b}\\s*[^\\]]*\\]`):new RegExp(`\\[${b}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${b}\\]`),S=y.match(v),w=S==null?void 0:S.index;return w!==void 0?w:-1},tokenize(y,v,S){let w=u?new RegExp(`^\\[${b}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${b}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${b}\\]`),E=y.match(w);if(!E)return;let R="",D="";if(u){let[,z]=E;D=z}else{let[,z,G]=E;D=z,R=G||""}let H=i(D.trim());return{type:t,raw:E[0],content:R.trim(),attributes:H}}},renderMarkdown:(y)=>{let v="";if(a)v=a(y);else if(y.content&&y.content.length>0)v=y.content.filter((R)=>R.type==="text").map((R)=>R.text).join("");let S=m(y.attrs||{}),w=l(S),E=w?` ${w}`:"";if(u)return`[${h}${E}]`;return`[${h}${E}]${v}[/${h}]`}}}function N1(e,t,r){var a,i,l,c;let u=e.split(`
269
+ `),f=[],h="",m=0,b=t.baseIndentSize||2;while(m<u.length){let y=u[m],v=y.match(t.itemPattern);if(!v)if(f.length>0)break;else if(y.trim()===""){m+=1,h=`${h}${y}
270
+ `;continue}else return;let S=t.extractItemData(v),{indentLevel:w,mainContent:E}=S;h=`${h}${y}
271
+ `;let R=[E];m+=1;while(m<u.length){let G=u[m];if(G.trim()===""){let U=u.slice(m+1).findIndex((J)=>J.trim()!=="");if(U===-1)break;if((((i=(a=u[m+1+U].match(/^(\s*)/))==null?void 0:a[1])==null?void 0:i.length)||0)>w){R.push(G),h=`${h}${G}
272
+ `,m+=1;continue}else break}if((((c=(l=G.match(/^(\s*)/))==null?void 0:l[1])==null?void 0:c.length)||0)>w)R.push(G),h=`${h}${G}
273
+ `,m+=1;else break}let D,H=R.slice(1);if(H.length>0){let G=H.map((ee)=>ee.slice(w+b)).join(`
274
+ `);if(G.trim())if(t.customNestedParser)D=t.customNestedParser(G);else D=r.blockTokens(G)}let z=t.createToken(S,D);f.push(z)}if(f.length===0)return;return{items:f,raw:h}}function ub(e,t,r,a){if(!e||!Array.isArray(e.content))return"";let i=typeof r==="function"?r(a):r,[l,...c]=e.content,u=t.renderChildren([l]),f=`${i}${u}`;if(c&&c.length>0)c.forEach((h,m)=>{var b,y;let v=(y=(b=t.renderChild)==null?void 0:b.call(t,h,m+1))!=null?y:t.renderChildren([h]);if(v!==void 0&&v!==null){let S=v.split(`
275
+ `).map((w)=>w?t.indent(w):t.indent("")).join(`
276
+ `);f+=h.type==="paragraph"?`
277
+
278
+ ${S}`:`
279
+ ${S}`}});return f}function UH(e,t){let r={...e};if(g1(e)&&g1(t))Object.keys(t).forEach((a)=>{if(g1(t[a])&&g1(e[a]))r[a]=UH(e[a],t[a]);else r[a]=t[a]});return r}function lre(e,t,r={}){let{state:a}=t,{doc:i,tr:l}=a,c=e;if(i.descendants((u,f)=>{let h=l.mapping.map(f),m=l.mapping.map(f)+u.nodeSize,b=null;if(u.marks.forEach((v)=>{if(v!==c)return!1;b=v}),!b)return;let y=!1;if(Object.keys(r).forEach((v)=>{if(r[v]!==b.attrs[v])y=!0}),y){let v=e.type.create({...e.attrs,...r});l.removeMark(h,m,e.type),l.addMark(h,m,v)}}),l.docChanged)t.view.dispatch(l)}function b1(e){var t;let{editor:r,from:a,to:i,text:l,rules:c,plugin:u}=e,{view:f}=r;if(f.composing)return!1;let h=f.state.doc.resolve(a);if(h.parent.type.spec.code||!!((t=h.nodeBefore||h.nodeAfter)==null?void 0:t.marks.find((y)=>y.type.spec.code)))return!1;let m=!1,b=Tne(h)+l;return c.forEach((y)=>{if(m)return;let v=cre(b,y.find);if(!v)return;let S=v[0].length-l.length;if(S>0){let ee=h.parentOffset-S;if(ee<0||h.parent.textBetween(ee,h.parentOffset)!==v[0].slice(0,S))return}let w=f.state.tr,E=S1({state:f.state,transaction:w}),R={from:a-(v[0].length-l.length),to:i},{commands:D,chain:H,can:z}=new C1({editor:r,state:E});if(y.handler({state:E,range:R,match:v,commands:D,chain:H,can:z})===null||!w.steps.length)return;if(y.undoable)w.setMeta(u,{transform:w,from:a,to:i,text:l});f.dispatch(w),m=!0}),m}function ure(e){let{editor:t,rules:r}=e,a=new qe({state:{init(){return null},apply(i,l,c){let u=i.getMeta(a);if(u)return u;let f=i.getMeta("applyInputRules");if(!!f)setTimeout(()=>{let{text:m}=f;if(typeof m==="string")m=m;else m=h4(le.from(m),c.schema);let{from:b}=f,y=b+m.length;b1({editor:t,from:b,to:y,text:m,rules:r,plugin:a})});return i.selectionSet||i.docChanged?null:l}},props:{handleTextInput(i,l,c,u){return b1({editor:t,from:l,to:c,text:u,rules:r,plugin:a})},handleDOMEvents:{compositionend:(i)=>(setTimeout(()=>{let{$cursor:l}=i.state.selection;if(l)b1({editor:t,from:l.pos,to:l.pos,text:"",rules:r,plugin:a})}),!1)},handleKeyDown(i,l){if(l.key!=="Enter")return!1;let{$cursor:c}=i.state.selection;if(c)return b1({editor:t,from:c.pos,to:c.pos,text:`
280
+ `,rules:r,plugin:a});return!1}},isInputRules:!0});return a}function fre(e){let{editor:t,state:r,from:a,to:i,rule:l,pasteEvent:c,dropEvent:u}=e,{commands:f,chain:h,can:m}=new C1({editor:t,state:r}),b=[];return r.doc.nodesBetween(a,i,(v,S)=>{var w,E,R,D,H;if(((E=(w=v.type)==null?void 0:w.spec)==null?void 0:E.code)||!(v.isText||v.isTextblock||v.isInline))return;let z=(H=(D=(R=v.content)==null?void 0:R.size)!=null?D:v.nodeSize)!=null?H:0,G=Math.max(a,S),ee=Math.min(i,S+z);if(G>=ee)return;let U=v.isText?v.text||"":v.textBetween(G-S,ee-S,void 0,"");dre(U,l.find,c).forEach((re)=>{if(re.index===void 0)return;let J=G+re.index+1,ye=J+re[0].length,ce={from:r.tr.mapping.map(J),to:r.tr.mapping.map(ye)},se=l.handler({state:r,range:ce,match:re,commands:f,chain:h,can:m,pasteEvent:c,dropEvent:u});b.push(se)})}),b.every((v)=>v!==null)}function hre(e){let{editor:t,rules:r}=e,a=null,i=!1,l=!1,c=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,u;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}let f=({state:m,from:b,to:y,rule:v,pasteEvt:S})=>{let w=m.tr,E=S1({state:m,transaction:w});if(!fre({editor:t,state:E,from:Math.max(b-1,0),to:y.b-1,rule:v,pasteEvent:S,dropEvent:u})||!w.steps.length)return;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}return c=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,w};return r.map((m)=>new qe({view(b){let y=(S)=>{var w;if(a=((w=b.dom.parentElement)==null?void 0:w.contains(S.target))?b.dom.parentElement:null,a)y1=t},v=()=>{if(y1)y1=null};return window.addEventListener("dragstart",y),window.addEventListener("dragend",v),{destroy(){window.removeEventListener("dragstart",y),window.removeEventListener("dragend",v)}}},props:{handleDOMEvents:{drop:(b,y)=>{if(l=a===b.dom.parentElement,u=y,!l){let v=y1;if(v==null?void 0:v.isEditable)setTimeout(()=>{let S=v.state.selection;if(S)v.commands.deleteRange({from:S.from,to:S.to})},10)}return!1},paste:(b,y)=>{var v;let S=(v=y.clipboardData)==null?void 0:v.getData("text/html");return c=y,i=!!(S==null?void 0:S.includes("data-pm-slice")),!1}}},appendTransaction:(b,y,v)=>{let S=b[0],w=S.getMeta("uiEvent")==="paste"&&!i,E=S.getMeta("uiEvent")==="drop"&&!l,R=S.getMeta("applyPasteRules"),D=!!R;if(!w&&!E&&!D)return;if(D){let{text:G}=R;if(typeof G==="string")G=G;else G=h4(le.from(G),v.schema);let{from:ee}=R,U=ee+G.length,P=pre(G);return f({rule:m,state:v,from:ee,to:{b:U},pasteEvt:P})}let H=y.doc.content.findDiffStart(v.doc.content),z=y.doc.content.findDiffEnd(v.doc.content);if(!ere(H)||!z||H===z.b)return;return f({rule:m,state:v,from:H,to:z,pasteEvt:c})}}))}function bo(e){return new th({find:e.find,handler:({state:t,range:r,match:a})=>{let i=Bt(e.getAttributes,void 0,a);if(i===!1||i===null)return null;let{tr:l}=t,c=a[a.length-1],u=a[0];if(c){let f=u.search(/\S/),h=r.from+u.indexOf(c),m=h+c.length;if(k1(r.from,r.to,t.doc).filter((v)=>v.mark.type.excluded.find((w)=>w===e.type&&w!==v.mark.type)).filter((v)=>v.to>h).length)return null;if(m<r.to)l.delete(m,r.to);if(h>r.from)l.delete(r.from+f,h);let y=r.from+f+c.length;l.addMark(r.from+f,y,e.type.create(i||{})),l.removeStoredMark(e.type)}},undoable:e.undoable})}function eU(e){return new th({find:e.find,handler:({state:t,range:r,match:a})=>{let i=Bt(e.getAttributes,void 0,a)||{},{tr:l}=t,c=r.from,u=r.to,f=e.type.create(i);if(a[1]){let h=a[0].lastIndexOf(a[1]),m=c+h;if(m>u)m=u;else u=m+a[1].length;let b=a[0][a[0].length-1];l.insertText(b,c+a[0].length-1),l.replaceWith(m,u,f)}else if(a[0]){let h=e.type.isInline?c:c-1;l.insert(h,e.type.create(i)).delete(l.mapping.map(c),l.mapping.map(u))}l.scrollIntoView()},undoable:e.undoable})}function db(e){return new th({find:e.find,handler:({state:t,range:r,match:a})=>{let i=t.doc.resolve(r.from),l=Bt(e.getAttributes,void 0,a)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(r.from,r.to).setBlockType(r.from,r.from,e.type,l)},undoable:e.undoable})}function es(e){return new th({find:e.find,handler:({state:t,range:r,match:a,chain:i})=>{let l=Bt(e.getAttributes,void 0,a)||{},c=t.tr.delete(r.from,r.to),f=c.doc.resolve(r.from).blockRange(),h=f&&Up(f,e.type,l);if(!h)return null;if(c.wrap(f,h),e.keepMarks&&e.editor){let{selection:b,storedMarks:y}=t,{splittableMarks:v}=e.editor.extensionManager,S=y||b.$to.parentOffset&&b.$from.marks();if(S){let w=S.filter((E)=>v.includes(E.type.name));c.ensureMarks(w)}}if(e.keepAttributes){let b=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(b,l).run()}let m=c.doc.resolve(r.from-1).nodeBefore;if(m&&m.type===e.type&&$a(c.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(a,m)))c.join(r.from-1)},undoable:e.undoable})}function Dr(e){return new x4({find:e.find,handler:({state:t,range:r,match:a,pasteEvent:i})=>{let l=Bt(e.getAttributes,void 0,a,i);if(l===!1||l===null)return null;let{tr:c}=t,u=a[a.length-1],f=a[0],h=r.to;if(u){let m=f.search(/\S/),b=r.from+f.indexOf(u),y=b+u.length;if(k1(r.from,r.to,t.doc).filter((w)=>w.mark.type.excluded.find((R)=>R===e.type&&R!==w.mark.type)).filter((w)=>w.to>b).length)return null;if(y<r.to)c.delete(y,r.to);if(b>r.from)c.delete(r.from+m,b);if(h=r.from+m+u.length,c.addMark(r.from+m,h,e.type.create(l||{})),!(a.index!==void 0&&a.input!==void 0&&a.index+a[0].length>=a.input.length))c.removeStoredMark(e.type)}}})}var wte,c4=(e,t)=>{for(var r in t)wte(e,r,{get:t[r],enumerable:!0})},C1=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:r}=this,{view:a}=t,{tr:i}=r,l=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([c,u])=>[c,(...h)=>{let m=u(...h)(l);if(!i.getMeta("preventDispatch")&&!this.hasCustomState)a.dispatch(i);return m}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:r,editor:a,state:i}=this,{view:l}=a,c=[],u=!!e,f=e||i.tr,h=()=>{if(!u&&t&&!f.getMeta("preventDispatch")&&!this.hasCustomState)l.dispatch(f);return c.every((b)=>b===!0)},m={...Object.fromEntries(Object.entries(r).map(([b,y])=>[b,(...S)=>{let w=this.buildProps(f,t),E=y(...S)(w);return c.push(E),m}])),run:h};return m}createCan(e){let{rawCommands:t,state:r}=this,a=!1,i=e||r.tr,l=this.buildProps(i,!1);return{...Object.fromEntries(Object.entries(t).map(([u,f])=>[u,(...h)=>f(...h)({...l,dispatch:void 0})])),chain:()=>this.createChain(i,!1)}}buildProps(e,t=!0){let{rawCommands:r,editor:a,state:i}=this,{view:l}=a,c={tr:e,editor:a,view:l,state:S1({state:i,transaction:e}),dispatch:t?()=>{return}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([u,f])=>[u,(...h)=>f(...h)(c)]))}};return c}},SH,Ete=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var r;if(!e.isDestroyed)t.dom.blur(),(r=window==null?void 0:window.getSelection())==null||r.removeAllRanges()}),!0),Tte=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),Rte=()=>({state:e,tr:t,dispatch:r})=>{let{selection:a}=t,{ranges:i}=a;if(!r)return!0;return i.forEach(({$from:l,$to:c})=>{e.doc.nodesBetween(l.pos,c.pos,(u,f)=>{if(u.type.isText)return;let{doc:h,mapping:m}=t,b=h.resolve(m.map(f)),y=h.resolve(m.map(f+u.nodeSize)),v=b.blockRange(y);if(!v)return;let S=Ys(v);if(u.type.isTextblock){let{defaultType:w}=b.parent.contentMatchAt(b.index());t.setNodeMarkup(v.start,w)}if(S||S===0)t.lift(v,S)})}),!0},kte=(e)=>(t)=>e(t),Ate=()=>({state:e,dispatch:t})=>xR(e,t),Mte=(e,t)=>({editor:r,tr:a})=>{let{state:i}=r,l=i.doc.slice(e.from,e.to);a.deleteRange(e.from,e.to);let c=a.mapping.map(t);return a.insert(c,l.content),a.setSelection(new Me(a.doc.resolve(Math.max(c-1,0)))),!0},Nte=()=>({tr:e,dispatch:t})=>{let{selection:r}=e,a=r.$anchor.node();if(a.content.size>0)return!1;let i=e.selection.$anchor;for(let l=i.depth;l>0;l-=1)if(i.node(l).type===a.type){if(t){let u=i.before(l),f=i.after(l);e.delete(u,f).scrollIntoView()}return!0}return!1},Ote=(e)=>({tr:t,state:r,dispatch:a})=>{let i=wn(e,r.schema),l=t.selection.$anchor;for(let c=l.depth;c>0;c-=1)if(l.node(c).type===i){if(a){let f=l.before(c),h=l.after(c);t.delete(f,h).scrollIntoView()}return!0}return!1},Dte=(e)=>({tr:t,dispatch:r})=>{let{from:a,to:i}=e;if(r)t.delete(a,i);return!0},Pte=(e)=>{if(!e.content)return!1;return/^text(\*|\+)/.test(e.content)},dH=(e,t,r)=>{if(!e.parent.isInline)return e.pos;if(r==="left"&&e.pos>e.start()||r==="right"&&e.pos<e.end())return e.pos;let a=t.nodes[e.parent.type.name].spec;if(!Pte(a))return e.pos;return r==="left"?e.start()-1:e.end()+1},Lte=(e,t,r)=>{let a=dH(e,r,"left"),i=dH(t,r,"right");return{from:a,to:i}},_te=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let r=e.tr,{ranges:a}=e.selection,i=r.steps.length;if(a.forEach((l)=>{let c=r.mapping.slice(i),u=r.doc.resolve(c.map(l.$from.pos)),f=r.doc.resolve(c.map(l.$to.pos)),{from:h,to:m}=Lte(u,f,e.schema);r.deleteRange(h,m)}),!r.selection.empty)r.setSelection(Me.near(r.doc.resolve(r.selection.from)));r.scrollIntoView(),t(r)}return!0},Ite=()=>({commands:e})=>e.keyboardShortcut("Enter"),Bte=()=>({state:e,dispatch:t})=>vR(e,t),zte=(e,t)=>({tr:r,state:a,dispatch:i})=>{let l=ol(e,a.schema),{doc:c,selection:u}=r,{$from:f,from:h,to:m}=u;if(i){let b=d4(f,l,t);if(b&&b.from<=h&&b.to>=m){let y=Me.create(c,b.from,b.to);r.setSelection(y)}}return!0},Hte=(e)=>(t)=>{let r=typeof e==="function"?e(t):e;for(let a=0;a<r.length;a+=1)if(r[a](t))return!0;return!1},Fte=(e=null,t={})=>({editor:r,view:a,tr:i,dispatch:l})=>{t={scrollIntoView:!0,...t};let c=()=>{if($1()||pH())a.dom.focus();if(Ute()&&!$1()&&!pH())a.dom.focus({preventScroll:!0});requestAnimationFrame(()=>{if(!r.isDestroyed){if(a.focus(),t==null?void 0:t.scrollIntoView)r.commands.scrollIntoView()}})};try{if(a.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(l&&e===null&&!w1(r.state.selection))return c(),!0;let u=i4(i.doc,e)||r.state.selection,f=r.state.selection.eq(u);if(l){if(!f)i.setSelection(u);if(f&&i.storedMarks)i.setStoredMarks(i.storedMarks);c()}return!0},Vte=(e,t)=>(r)=>e.every((a,i)=>t(a,{...r,index:i})),jte=(e,t)=>({tr:r,commands:a})=>a.insertContentAt({from:r.selection.from,to:r.selection.to},e,t),wH=(e)=>{let t=e.childNodes;for(let r=t.length-1;r>=0;r-=1){let a=t[r];if(a.nodeType===3&&a.nodeValue&&/^(\n\s\s|\n)$/.test(a.nodeValue))e.removeChild(a);else if(a.nodeType===1)wH(a)}return e},Kte=(e)=>!("type"in e),qte=(e,t,r)=>({tr:a,dispatch:i,editor:l})=>{var c;if(i){r={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let u,f=(E)=>{l.emit("contentError",{editor:l,error:E,disableCollaboration:()=>{if("collaboration"in l.storage&&typeof l.storage.collaboration==="object"&&l.storage.collaboration)l.storage.collaboration.isDisabled=!0}})},h={preserveWhitespace:"full",...r.parseOptions};if(!r.errorOnInvalidContent&&!l.options.enableContentCheck&&l.options.emitContentError)try{Xp(t,l.schema,{parseOptions:h,errorOnInvalidContent:!0})}catch(E){f(E)}try{u=Xp(t,l.schema,{parseOptions:h,errorOnInvalidContent:(c=r.errorOnInvalidContent)!=null?c:l.options.enableContentCheck})}catch(E){return f(E),!1}let{from:m,to:b}=typeof e==="number"?{from:e,to:e}:{from:e.from,to:e.to},y=!0,v=!0;if((Kte(u)?u:[u]).forEach((E)=>{E.check(),y=y?E.isText&&E.marks.length===0:!1,v=v?E.isBlock:!1}),m===b&&v){let{parent:E}=a.doc.resolve(m);if(E.isTextblock&&!E.type.spec.code&&!E.childCount)m-=1,b+=1}let w;if(y){if(Array.isArray(t))w=t.map((E)=>E.text||"").join("");else if(t instanceof le){let E="";t.forEach((R)=>{if(R.text)E+=R.text}),w=E}else if(typeof t==="object"&&!!t&&!!t.text)w=t.text;else w=t;a.insertText(w,m,b)}else{w=u;let E=a.doc.resolve(m),R=E.node(),D=E.parentOffset===0,H=R.isText||R.isTextblock,z=R.content.size>0;if(D&&H&&z&&v)m=Math.max(0,m-1);a.replaceWith(m,b,w)}if(r.updateSelection)EH(a,a.steps.length-1,-1);if(r.applyInputRules)a.setMeta("applyInputRules",{from:m,text:w});if(r.applyPasteRules)a.setMeta("applyPasteRules",{from:m,text:w})}return!0},Gte=(e={})=>({tr:t,dispatch:r,editor:a})=>{let{pos:i,attrs:l,content:c,updateSelection:u=!0}=e,f;if(typeof i==="number")f=t.doc.resolve(i);else if(i)f=i;else f=t.selection.$from;let h=TH(f.parent.contentMatchAt(f.index()));if(!h)return!1;let m=Object.keys(h.spec.attrs||{}),b=l?Object.fromEntries(Object.entries(l).filter(([v])=>m.includes(v))):{},y;if(c){let v=Xp(c,a.schema);y=h.createAndFill(b,v)}else y=h.createAndFill(b);if(!y)return!1;if(r){if(t.insert(f.pos,y),u)EH(t,t.steps.length-1,-1)}return!0},Wte=()=>({state:e,dispatch:t})=>DB(e,t),Yte=()=>({state:e,dispatch:t})=>PB(e,t),Jte=()=>({state:e,dispatch:t})=>dR(e,t),Xte=()=>({state:e,dispatch:t})=>hR(e,t),Qte=()=>({state:e,dispatch:t,tr:r})=>{try{let a=Cd(e.doc,e.selection.$from.pos,-1);if(a===null||a===void 0)return!1;if(r.join(a,2),t)t(r);return!0}catch{return!1}},Zte=()=>({state:e,dispatch:t,tr:r})=>{try{let a=Cd(e.doc,e.selection.$from.pos,1);if(a===null||a===void 0)return!1;if(r.join(a,2),t)t(r);return!0}catch{return!1}},ene=()=>({state:e,dispatch:t})=>AB(e,t),tne=()=>({state:e,dispatch:t})=>MB(e,t),rne=(e)=>({editor:t,view:r,tr:a,dispatch:i})=>{let l=nne(e).split(/-(?!$)/),c=l.find((h)=>!["Alt","Ctrl","Meta","Shift"].includes(h)),u=new KeyboardEvent("keydown",{key:c==="Space"?" ":c,altKey:l.includes("Alt"),ctrlKey:l.includes("Ctrl"),metaKey:l.includes("Meta"),shiftKey:l.includes("Shift"),bubbles:!0,cancelable:!0}),f=t.captureTransaction(()=>{r.someProp("handleKeyDown",(h)=>h(r,u))});return f==null||f.steps.forEach((h)=>{let m=h.map(a.mapping);if(m&&i)a.maybeStep(m)}),!0},one=(e,t={})=>({state:r,dispatch:a})=>{let i=wn(e,r.schema);if(!Zi(r,i,t))return!1;return LB(r,a)},ane=()=>({state:e,dispatch:t})=>$R(e,t),ine=(e)=>({state:t,dispatch:r})=>{let a=wn(e,t.schema);return FB(a)(t,r)},sne=()=>({state:e,dispatch:t})=>bR(e,t),lne=(e,t)=>({tr:r,state:a,dispatch:i})=>{let l=null,c=null,u=E1(typeof e==="string"?e:e.name,a.schema);if(!u)return!1;if(u==="node")l=wn(e,a.schema);if(u==="mark")c=ol(e,a.schema);let f=!1;return r.selection.ranges.forEach((h)=>{a.doc.nodesBetween(h.$from.pos,h.$to.pos,(m,b)=>{if(l&&l===m.type){if(f=!0,i)r.setNodeMarkup(b,void 0,hH(m.attrs,t))}if(c&&m.marks.length)m.marks.forEach((y)=>{if(c===y.type){if(f=!0,i)r.addMark(b,b+m.nodeSize,c.create(hH(y.attrs,t)))}})})}),f},cne=()=>({tr:e,dispatch:t})=>{if(t)e.scrollIntoView();return!0},une=()=>({tr:e,dispatch:t})=>{if(t){let r=new vr(e.doc);e.setSelection(r)}return!0},dne=()=>({state:e,dispatch:t})=>fR(e,t),fne=()=>({state:e,dispatch:t})=>mR(e,t),pne=()=>({state:e,dispatch:t})=>_B(e,t),hne=()=>({state:e,dispatch:t})=>CR(e,t),mne=()=>({state:e,dispatch:t})=>SR(e,t),gne=(e,{errorOnInvalidContent:t,emitUpdate:r=!0,parseOptions:a={}}={})=>({editor:i,tr:l,dispatch:c,commands:u})=>{let{doc:f}=l;if(a.preserveWhitespace!=="full"){let h=s4(e,i.schema,a,{errorOnInvalidContent:t!=null?t:i.options.enableContentCheck});if(c)l.replaceWith(0,f.content.size,h).setMeta("preventUpdate",!r);return!0}if(c)l.setMeta("preventUpdate",!r);return u.insertContentAt({from:0,to:f.content.size},e,{parseOptions:a,errorOnInvalidContent:t!=null?t:i.options.enableContentCheck})},PH=(e,t,r,a=20)=>{let i=e.doc.resolve(r),l=a,c=null;while(l>0&&c===null){let u=i.node(l);if((u==null?void 0:u.type.name)===t)c=u;else l-=1}return[c,l]},Tne=(e,t=500)=>{let r="",a=e.parentOffset;return e.parent.nodesBetween(Math.max(0,a-t),a,(i,l,c,u)=>{var f,h;let m=((h=(f=i.type.spec).toText)==null?void 0:h.call(f,{node:i,pos:l,parent:c,index:u}))||i.textContent||"%leaf%";r+=i.isAtom&&!i.isText?m:m.slice(0,Math.max(0,a-l))}),r},LH=(e,t)=>{let{$from:r,$to:a,$anchor:i}=e.selection;if(t){let l=T1((u)=>u.type.name===t)(e.selection);if(!l)return!1;let c=e.doc.resolve(l.pos+1);if(i.pos+1===c.end())return!0;return!1}if(a.parentOffset<a.parent.nodeSize-2||r.pos!==a.pos)return!1;return!0},_H=(e)=>{let{$from:t,$to:r}=e.selection;if(t.parentOffset>0||t.pos!==r.pos)return!1;return!0},IH=class e{constructor(t){this.position=t}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}},Nne=(e,t={})=>({tr:r,state:a,dispatch:i})=>{let{selection:l}=r,{empty:c,ranges:u}=l,f=ol(e,a.schema);if(i)if(c){let h=kH(a,f);r.addStoredMark(f.create({...h,...t}))}else u.forEach((h)=>{let m=h.$from.pos,b=h.$to.pos;a.doc.nodesBetween(m,b,(y,v)=>{let S=Math.max(v,m),w=Math.min(v+y.nodeSize,b);if(y.marks.find((R)=>R.type===f))y.marks.forEach((R)=>{if(f===R.type)r.addMark(S,w,f.create({...R.attrs,...t}))});else r.addMark(S,w,f.create(t))})});return Mne(a,r,f)},One=(e,t)=>({tr:r})=>(r.setMeta(e,t),!0),Dne=(e,t={})=>({state:r,dispatch:a,chain:i})=>{let l=wn(e,r.schema),c;if(r.selection.$anchor.sameParent(r.selection.$head))c=r.selection.$anchor.parent.attrs;if(!l.isTextblock)return console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1;return i().command(({commands:u})=>{if(wR(l,{...c,...t})(r))return!0;return u.clearNodes()}).command(({state:u})=>wR(l,{...c,...t})(u,a)).run()},Pne=(e)=>({tr:t,dispatch:r})=>{if(r){let{doc:a}=t,i=rl(e,0,a.content.size),l=Pe.create(a,i);t.setSelection(l)}return!0},Lne=(e,t)=>({tr:r,state:a,dispatch:i})=>{let{selection:l}=a,c,u;if(typeof t==="number")c=t,u=t;else if(t&&"from"in t&&"to"in t)c=t.from,u=t.to;else c=l.from,u=l.to;if(i)r.doc.nodesBetween(c,u,(f,h)=>{if(f.isText)return;r.setNodeMarkup(h,void 0,{...f.attrs,dir:e})});return!0},_ne=(e)=>({tr:t,dispatch:r})=>{if(r){let{doc:a}=t,{from:i,to:l}=typeof e==="number"?{from:e,to:e}:e,c=Me.atStart(a).from,u=Me.atEnd(a).to,f=rl(i,c,u),h=rl(l,c,u),m=Me.create(a,f,h);t.setSelection(m)}return!0},Ine=(e)=>({state:t,dispatch:r})=>{let a=wn(e,t.schema);return VB(a)(t,r)},Bne=({keepMarks:e=!0}={})=>({tr:t,state:r,dispatch:a,editor:i})=>{let{selection:l,doc:c}=t,{$from:u,$to:f}=l,h=i.extensionManager.attributes,m=v1(h,u.node().type.name,u.node().attrs);if(l instanceof Pe&&l.node.isBlock){if(!u.parentOffset||!qo(c,u.pos))return!1;if(a){if(e)xH(r,i.extensionManager.splittableMarks);t.split(u.pos).scrollIntoView()}return!0}if(!u.parent.isBlock)return!1;let b=f.parentOffset===f.parent.content.size,y=u.depth===0?void 0:TH(u.node(-1).contentMatchAt(u.indexAfter(-1))),v=b&&y?[{type:y,attrs:m}]:void 0,S=qo(t.doc,t.mapping.map(u.pos),1,v);if(!v&&!S&&qo(t.doc,t.mapping.map(u.pos),1,y?[{type:y}]:void 0))S=!0,v=y?[{type:y,attrs:m}]:void 0;if(a){if(S){if(l instanceof Me)t.deleteSelection();if(t.split(t.mapping.map(u.pos),1,v),y&&!b&&!u.parentOffset&&u.parent.type!==y){let w=t.mapping.map(u.before()),E=t.doc.resolve(w);if(u.node(-1).canReplaceWith(E.index(),E.index()+1,y))t.setNodeMarkup(t.mapping.map(u.before()),y)}}if(e)xH(r,i.extensionManager.splittableMarks);t.scrollIntoView()}return S},zne=(e,t={})=>({tr:r,state:a,dispatch:i,editor:l})=>{var c;let u=wn(e,a.schema),{$from:f,$to:h}=a.selection,m=a.selection.node;if(m&&m.isBlock||f.depth<2||!f.sameParent(h))return!1;let b=f.node(-1);if(b.type!==u)return!1;let y=l.extensionManager.attributes;if(f.parent.content.size===0&&f.node(-1).childCount===f.indexAfter(-1)){if(f.depth===2||f.node(-3).type!==u||f.index(-2)!==f.node(-2).childCount-1)return!1;if(i){let R=le.empty,D=f.index(-1)?1:f.index(-2)?2:3;for(let P=f.depth-D;P>=f.depth-3;P-=1)R=le.from(f.node(P).copy(R));let H=f.indexAfter(-1)<f.node(-2).childCount?1:f.indexAfter(-2)<f.node(-3).childCount?2:3,z={...v1(y,f.node().type.name,f.node().attrs),...t},G=((c=u.contentMatch.defaultType)==null?void 0:c.createAndFill(z))||void 0;R=R.append(le.from(u.createAndFill(null,G)||void 0));let ee=f.before(f.depth-(D-1));r.replace(ee,f.after(-H),new Se(R,4-D,0));let U=-1;if(r.doc.nodesBetween(ee,r.doc.content.size,(P,re)=>{if(U>-1)return!1;if(P.isTextblock&&P.content.size===0)U=re+1}),U>-1)r.setSelection(Me.near(r.doc.resolve(U)));r.scrollIntoView()}return!0}let v=h.pos===f.end()?b.contentMatchAt(0).defaultType:null,S={...v1(y,b.type.name,b.attrs),...t},w={...v1(y,f.node().type.name,f.node().attrs),...t};r.delete(f.pos,h.pos);let E=v?[{type:u,attrs:S},{type:v,attrs:w}]:[{type:u,attrs:S}];if(!qo(r.doc,f.pos,2))return!1;if(i){let{selection:R,storedMarks:D}=a,{splittableMarks:H}=l.extensionManager,z=D||R.$to.parentOffset&&R.$from.marks();if(r.split(f.pos,2,E).scrollIntoView(),!z||!i)return!0;let G=z.filter((ee)=>H.includes(ee.type.name));r.ensureMarks(G)}return!0},o4=(e,t)=>{let r=T1((c)=>c.type===t)(e.selection);if(!r)return!0;let a=e.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(a===void 0)return!0;let i=e.doc.nodeAt(a);if(!(r.node.type===(i==null?void 0:i.type)&&$a(e.doc,r.pos)))return!0;if(!BH(r.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(r.pos),!0},a4=(e,t)=>{let r=T1((c)=>c.type===t)(e.selection);if(!r)return!0;let a=e.doc.resolve(r.start).after(r.depth);if(a===void 0)return!0;let i=e.doc.nodeAt(a);if(!(r.node.type===(i==null?void 0:i.type)&&$a(e.doc,a)))return!0;if(!BH(r.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(a),!0},Une=(e,t,r,a={})=>({editor:i,tr:l,state:c,dispatch:u,chain:f,commands:h,can:m})=>{let{extensions:b,splittableMarks:y}=i.extensionManager,v=wn(e,c.schema),S=wn(t,c.schema),{selection:w,storedMarks:E}=c,{$from:R,$to:D}=w,H=R.blockRange(D),z=E||w.$to.parentOffset&&w.$from.marks();if(!H)return!1;let G=T1((se)=>r4(se.type.name,b))(w),ee=w.from===0&&w.to===c.doc.content.size,U=c.doc.content.content,P=U.length===1?U[0]:null,re=ee&&P&&r4(P.type.name,b)?{node:P,pos:0,depth:0}:null,J=G!=null?G:re,ye=!!G&&H.depth>=1&&H.depth-G.depth<=1,ce=!!re;if((ye||ce)&&J){if(J.node.type===v){if(ee&&ce)return f().command(({tr:se,dispatch:_})=>{let W=Hne(se);if(!W)return!1;if(se.setSelection(W),_)_(se);return!0}).liftListItem(S).run();return h.liftListItem(S)}if(r4(J.node.type.name,b)&&v.validContent(J.node.content))return f().command(()=>(l.setNodeMarkup(J.pos,v),!0)).command(()=>o4(l,v)).command(()=>a4(l,v)).run()}if(!r||!z||!u)return f().command(()=>{if(m().wrapInList(v,a))return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>o4(l,v)).command(()=>a4(l,v)).run();return f().command(()=>{let se=m().wrapInList(v,a),_=z.filter((W)=>y.includes(W.type.name));if(l.ensureMarks(_),se)return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>o4(l,v)).command(()=>a4(l,v)).run()},Fne=(e,t={},r={})=>({state:a,commands:i})=>{let{extendEmptyMarkRange:l=!1}=r,c=ol(e,a.schema);if(l4(a,c,t))return i.unsetMark(c,{extendEmptyMarkRange:l});return i.setMark(c,t)},Vne=(e,t,r={})=>({state:a,commands:i})=>{let l=wn(e,a.schema),c=wn(t,a.schema),u=Zi(a,l,r),f;if(a.selection.$anchor.sameParent(a.selection.$head))f=a.selection.$anchor.parent.attrs;if(u)return i.setNode(c,f);return i.setNode(l,{...f,...r})},jne=(e,t={})=>({state:r,commands:a})=>{let i=wn(e,r.schema);if(Zi(r,i,t))return a.lift(i);return a.wrapIn(i,t)},Kne=()=>({state:e,dispatch:t})=>{let r=e.plugins;for(let a=0;a<r.length;a+=1){let i=r[a],l;if(i.spec.isInputRules&&(l=i.getState(e))){if(t){let c=e.tr,u=l.transform;for(let f=u.steps.length-1;f>=0;f-=1)c.step(u.steps[f].invert(u.docs[f]));if(l.text){let f=c.doc.resolve(l.from).marks();c.replaceWith(l.from,l.to,e.schema.text(l.text,f))}else c.delete(l.from,l.to)}return!0}}return!1},qne=(e={})=>({tr:t,dispatch:r,editor:a})=>{let{ignoreClearable:i=!1}=e,{selection:l}=t,{empty:c,ranges:u}=l;if(c)return!0;let{nonClearableMarks:f}=a.extensionManager;if(r){let h=Object.values(a.schema.marks).filter((m)=>i||!f.includes(m.name));u.forEach((m)=>{for(let b of h)t.removeMark(m.$from.pos,m.$to.pos,b)})}return!0},Gne=(e,t={})=>({tr:r,state:a,dispatch:i})=>{var l;let{extendEmptyMarkRange:c=!1}=t,{selection:u}=r,f=ol(e,a.schema),{$from:h,empty:m,ranges:b}=u;if(!i)return!0;if(m&&c){let{from:y,to:v}=u,S=(l=h.marks().find((E)=>E.type===f))==null?void 0:l.attrs,w=d4(h,f,S);if(w)y=w.from,v=w.to;r.removeMark(y,v,f)}else b.forEach((y)=>{r.removeMark(y.$from.pos,y.$to.pos,f)});return r.removeStoredMark(f),!0},Wne=(e)=>({tr:t,state:r,dispatch:a})=>{let{selection:i}=r,l,c;if(typeof e==="number")l=e,c=e;else if(e&&"from"in e&&"to"in e)l=e.from,c=e.to;else l=i.from,c=i.to;if(a)t.doc.nodesBetween(l,c,(u,f)=>{if(u.isText)return;let h={...u.attrs};delete h.dir,t.setNodeMarkup(f,void 0,h)});return!0},Yne=(e,t={})=>({tr:r,state:a,dispatch:i})=>{let l=null,c=null,u=E1(typeof e==="string"?e:e.name,a.schema);if(!u)return!1;if(u==="node")l=wn(e,a.schema);if(u==="mark")c=ol(e,a.schema);let f=!1;return r.selection.ranges.forEach((h)=>{let m=h.$from.pos,b=h.$to.pos,y,v,S,w;if(r.selection.empty)a.doc.nodesBetween(m,b,(E,R)=>{if(l&&l===E.type)f=!0,S=Math.max(R,m),w=Math.min(R+E.nodeSize,b),y=R,v=E});else a.doc.nodesBetween(m,b,(E,R)=>{if(R<m&&l&&l===E.type)f=!0,S=Math.max(R,m),w=Math.min(R+E.nodeSize,b),y=R,v=E;if(R>=m&&R<=b){if(l&&l===E.type){if(f=!0,i)r.setNodeMarkup(R,void 0,{...E.attrs,...t})}if(c&&E.marks.length)E.marks.forEach((D)=>{if(c===D.type){if(f=!0,i){let H=Math.max(R,m),z=Math.min(R+E.nodeSize,b);r.addMark(H,z,c.create({...D.attrs,...t}))}}})}});if(v){if(y!==void 0&&i)r.setNodeMarkup(y,void 0,{...v.attrs,...t});if(c&&v.marks.length)v.marks.forEach((E)=>{if(c===E.type&&i)r.addMark(S,w,c.create({...E.attrs,...t}))})}}),f},Jne=(e,t={})=>({state:r,dispatch:a})=>{let i=wn(e,r.schema);return zB(i,t)(r,a)},Xne=(e,t={})=>({state:r,dispatch:a})=>{let i=wn(e,r.schema);return UB(i,t)(r,a)},Qne=class{constructor(){this.callbacks={}}on(e,t){if(!this.callbacks[e])this.callbacks[e]=[];return this.callbacks[e].push(t),this}emit(e,...t){let r=this.callbacks[e];if(r)r.forEach((a)=>a.apply(this,t));return this}off(e,t){let r=this.callbacks[e];if(r)if(t)this.callbacks[e]=r.filter((a)=>a!==t);else delete this.callbacks[e];return this}once(e,t){let r=(...a)=>{this.off(e,r),t.apply(this,a)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}},nre,th=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},cre=(e,t)=>{if(u4(t))return t.exec(e);let r=t(e);if(!r)return null;let a=[r.text];if(a.index=r.index,a.input=e,a.data=r.data,r.replaceWith){if(!r.text.includes(r.replaceWith))console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".');a.push(r.replaceWith)}return a},v4=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Bt(ze(this,"addOptions",{name:this.name}))}}get storage(){return{...Bt(ze(this,"addStorage",{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>UH(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Xr,x4=class{constructor(e){this.find=e.find,this.handler=e.handler}},dre=(e,t,r)=>{if(u4(t))return[...e.matchAll(t)];let a=t(e,r);if(!a)return[];return a.map((i)=>{let l=[i.text];if(l.index=i.index,l.input=e,l.data=i.data,i.replaceWith){if(!i.text.includes(i.replaceWith))console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".');l.push(i.replaceWith)}return l})},y1=null,pre=(e)=>{var t;let r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=r.clipboardData)==null||t.setData("text/html",e),r},O1=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=OH(e),this.schema=$ne(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:sb(t.name,this.schema)},a=ze(t,"addCommands",r);if(!a)return e;return{...e,...a()}},{})}get plugins(){let{editor:e}=this;return lb([...this.extensions].reverse()).flatMap((a)=>{let i={name:a.name,options:a.options,storage:this.editor.extensionStorage[a.name],editor:e,type:sb(a.name,this.schema)},l=[],c=ze(a,"addKeyboardShortcuts",i),u={};if(a.type==="mark"&&ze(a,"exitable",i))u.ArrowRight=()=>Xr.handleExit({editor:e,mark:a});if(c){let y=Object.fromEntries(Object.entries(c()).map(([v,S])=>[v,()=>S({editor:e})]));u={...u,...y}}let f=cH(u);l.push(f);let h=ze(a,"addInputRules",i);if(vH(a,e.options.enableInputRules)&&h){let y=h();if(y&&y.length){let v=ure({editor:e,rules:y}),S=Array.isArray(v)?v:[v];l.push(...S)}}let m=ze(a,"addPasteRules",i);if(vH(a,e.options.enablePasteRules)&&m){let y=m();if(y&&y.length){let v=hre({editor:e,rules:y});l.push(...v)}}let b=ze(a,"addProseMirrorPlugins",i);if(b){let y=b();l.push(...y)}return l})}get attributes(){return NH(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Qp(this.extensions);return Object.fromEntries(t.filter((r)=>!!ze(r,"addNodeView")).map((r)=>{let a=this.attributes.filter((f)=>f.type===r.name),i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:wn(r.name,this.schema)},l=ze(r,"addNodeView",i);if(!l)return[];let c=l();if(!c)return[];let u=(f,h,m,b,y)=>{let v=Zp(f,a);return c({node:f,view:h,getPos:m,decorations:b,innerDecorations:y,editor:e,extension:r,HTMLAttributes:v})};return[r.name,u]}))}dispatchTransaction(e){let{editor:t}=this;return lb([...this.extensions].reverse()).reduceRight((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:sb(i.name,this.schema)},c=ze(i,"dispatchTransaction",l);if(!c)return a;return(u)=>{c.call(l,{transaction:u,next:a})}},e)}transformPastedHTML(e){let{editor:t}=this;return lb([...this.extensions]).reduce((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:sb(i.name,this.schema)},c=ze(i,"transformPastedHTML",l);if(!c)return a;return(u,f)=>{let h=a(u,f);return c.call(l,h)}},e||((a)=>a))}get markViews(){let{editor:e}=this,{markExtensions:t}=Qp(this.extensions);return Object.fromEntries(t.filter((r)=>!!ze(r,"addMarkView")).map((r)=>{let a=this.attributes.filter((u)=>u.type===r.name),i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:ol(r.name,this.schema)},l=ze(r,"addMarkView",i);if(!l)return[];let c=(u,f,h)=>{let m=Zp(u,a);return l()({mark:u,view:f,inline:h,editor:e,extension:r,HTMLAttributes:m,updateAttributes:(b)=>{lre(u,e,b)}})};return[r.name,c]}))}destroy(){this.extensions.forEach((e)=>{let t=e;while(t.parent){let r=t.parent;if(r.child===t)r.child=null;t=r}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map((t)=>[t.name,t.storage])),e.forEach((t)=>{var r,a;let i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:sb(t.name,this.schema)};if(t.type==="mark"){if((r=Bt(ze(t,"keepOnSplit",i)))!=null?r:!0)this.splittableMarks.push(t.name);if(!((a=Bt(ze(t,"clearable",i)))!=null?a:!0))this.nonClearableMarks.push(t.name)}let l=ze(t,"onBeforeCreate",i),c=ze(t,"onCreate",i),u=ze(t,"onUpdate",i),f=ze(t,"onSelectionUpdate",i),h=ze(t,"onTransaction",i),m=ze(t,"onFocus",i),b=ze(t,"onBlur",i),y=ze(t,"onDestroy",i);if(l)this.editor.on("beforeCreate",l);if(c)this.editor.on("create",c);if(u)this.editor.on("update",u);if(f)this.editor.on("selectionUpdate",f);if(h)this.editor.on("transaction",h);if(m)this.editor.on("focus",m);if(b)this.editor.on("blur",b);if(y)this.editor.on("destroy",y)})}},mre,$t,FH,VH,jH,KH,qH,GH,WH,YH,JH,XH,QH,gre=class e{constructor(t,r,a=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=a,this.resolvedPos=t,this.editor=r,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let r=this.from,a=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,a=this.to-1}this.editor.commands.insertContentAt({from:r,to:a},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){if(this.isBlock)return this.pos;return this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){if(this.isBlock)return this.pos+this.size;return this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(t);return new e(r,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));if(t.depth!==this.depth)t=this.resolvedPos.doc.resolve(this.from-3);return new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));if(t.depth!==this.depth)t=this.resolvedPos.doc.resolve(this.to+3);return new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((r,a)=>{let i=r.isBlock&&!r.isTextblock,l=r.isAtom&&!r.isText,c=r.isInline,u=this.pos+a+(l?0:1);if(u<0||u>this.resolvedPos.doc.nodeSize-2)return;let f=this.resolvedPos.doc.resolve(u);if(!i&&!c&&f.depth<=this.depth)return;let h=new e(f,this.editor,i,i||c?r:null);if(i)h.actualDepth=this.depth+1;t.push(h)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,r={}){let a=null,i=this.parent;while(i&&!a){if(i.node.type.name===t)if(Object.keys(r).length>0){let l=i.node.attrs,c=Object.keys(r);for(let u=0;u<c.length;u+=1){let f=c[u];if(l[f]!==r[f])break}}else a=i;i=i.parent}return a}querySelector(t,r={}){return this.querySelectorAll(t,r,!0)[0]||null}querySelectorAll(t,r={},a=!1){let i=[];if(!this.children||this.children.length===0)return i;let l=Object.keys(r);return this.children.forEach((c)=>{if(a&&i.length>0)return;if(c.node.type.name===t){if(l.every((f)=>r[f]===c.node.attrs[f]))i.push(c)}if(a&&i.length>0)return;i=i.concat(c.querySelectorAll(t,r,a))}),i}setAttribute(t){let{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(r)}},bre=`.ProseMirror {
281
+ position: relative;
282
+ }
283
+
284
+ .ProseMirror {
285
+ word-wrap: break-word;
286
+ white-space: pre-wrap;
287
+ white-space: break-spaces;
288
+ -webkit-font-variant-ligatures: none;
289
+ font-variant-ligatures: none;
290
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
291
+ }
292
+
293
+ .ProseMirror [contenteditable="false"] {
294
+ white-space: normal;
295
+ }
296
+
297
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
298
+ white-space: pre-wrap;
299
+ }
300
+
301
+ .ProseMirror pre {
302
+ white-space: pre-wrap;
303
+ }
304
+
305
+ img.ProseMirror-separator {
306
+ display: inline !important;
307
+ border: none !important;
308
+ margin: 0 !important;
309
+ width: 0 !important;
310
+ height: 0 !important;
311
+ }
312
+
313
+ .ProseMirror-gapcursor {
314
+ display: none;
315
+ pointer-events: none;
316
+ position: absolute;
317
+ margin: 0;
318
+ }
319
+
320
+ .ProseMirror-gapcursor:after {
321
+ content: "";
322
+ display: block;
323
+ position: absolute;
324
+ top: -2px;
325
+ width: 20px;
326
+ border-top: 1px solid black;
327
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
328
+ }
329
+
330
+ @keyframes ProseMirror-cursor-blink {
331
+ to {
332
+ visibility: hidden;
333
+ }
334
+ }
335
+
336
+ .ProseMirror-hideselection *::selection {
337
+ background: transparent;
338
+ }
339
+
340
+ .ProseMirror-hideselection *::-moz-selection {
341
+ background: transparent;
342
+ }
343
+
344
+ .ProseMirror-hideselection * {
345
+ caret-color: transparent;
346
+ }
347
+
348
+ .ProseMirror-focused .ProseMirror-gapcursor {
349
+ display: block;
350
+ }`,ZH,en;var Ye=N(()=>{ti();Mr();at();at();Mr();at();at();at();Sa();Sa();at();ti();Mr();ti();ti();Mr();Mr();Mr();Mr();o1();Mr();at();Mr();Mr();Mr();Mr();Mr();ti();Sa();Sa();Sa();Sa();Sa();at();Mr();at();at();o1();at();ti();Sa();at();ti();at();ti();Mr();o1();at();Bc();uH();at();Sa();at();Sa();at();at();ti();at();at();at();at();at();at();at();ti();at();wte=Object.defineProperty;SH={};c4(SH,{blur:()=>Ete,clearContent:()=>Tte,clearNodes:()=>Rte,command:()=>kte,createParagraphNear:()=>Ate,cut:()=>Mte,deleteCurrentNode:()=>Nte,deleteNode:()=>Ote,deleteRange:()=>Dte,deleteSelection:()=>_te,enter:()=>Ite,exitCode:()=>Bte,extendMarkRange:()=>zte,first:()=>Hte,focus:()=>Fte,forEach:()=>Vte,insertContent:()=>jte,insertContentAt:()=>qte,insertDefaultBlock:()=>Gte,joinBackward:()=>Jte,joinDown:()=>Yte,joinForward:()=>Xte,joinItemBackward:()=>Qte,joinItemForward:()=>Zte,joinTextblockBackward:()=>ene,joinTextblockForward:()=>tne,joinUp:()=>Wte,keyboardShortcut:()=>rne,lift:()=>one,liftEmptyBlock:()=>ane,liftListItem:()=>ine,newlineInCode:()=>sne,resetAttributes:()=>lne,scrollIntoView:()=>cne,selectAll:()=>une,selectNodeBackward:()=>dne,selectNodeForward:()=>fne,selectParentNode:()=>pne,selectTextblockEnd:()=>hne,selectTextblockStart:()=>mne,setContent:()=>gne,setMark:()=>Nne,setMeta:()=>One,setNode:()=>Dne,setNodeSelection:()=>Pne,setTextDirection:()=>Lne,setTextSelection:()=>_ne,sinkListItem:()=>Ine,splitBlock:()=>Bne,splitListItem:()=>zne,toggleList:()=>Une,toggleMark:()=>Fne,toggleNode:()=>Vne,toggleWrap:()=>jne,undoInputRule:()=>Kne,unsetAllMarks:()=>qne,unsetMark:()=>Gne,unsetTextDirection:()=>Wne,updateAttributes:()=>Yne,wrapIn:()=>Jne,wrapInList:()=>Xne});nre={};c4(nre,{createAtomBlockMarkdownSpec:()=>rre,createBlockMarkdownSpec:()=>ore,createInlineMarkdownSpec:()=>sre,parseAttributes:()=>b4,parseIndentedBlocks:()=>N1,renderNestedMarkdownContent:()=>ub,serializeAttributes:()=>y4});Xr=class e extends v4{constructor(){super(...arguments);this.type="mark"}static create(t={}){let r=typeof t==="function"?t():t;return new e(r)}static handleExit({editor:t,mark:r}){let{tr:a}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){let c=i.marks();if(!c.find((h)=>(h==null?void 0:h.type.name)===r.name))return!1;let f=c.find((h)=>(h==null?void 0:h.type.name)===r.name);if(f)a.removeStoredMark(f);return a.insertText(" ",i.pos),t.view.dispatch(a),!0}return!1}configure(t){return super.configure(t)}extend(t){let r=typeof t==="function"?t():t;return super.extend(r)}};O1.resolve=OH;O1.sort=lb;O1.flatten=p4;mre={};c4(mre,{ClipboardTextSerializer:()=>FH,Commands:()=>VH,Delete:()=>jH,Drop:()=>KH,Editable:()=>qH,FocusEvents:()=>WH,Keymap:()=>YH,Paste:()=>JH,Tabindex:()=>XH,TextDirection:()=>QH,focusEventsPluginKey:()=>GH});$t=class e extends v4{constructor(){super(...arguments);this.type="extension"}static create(t={}){let r=typeof t==="function"?t():t;return new e(r)}configure(t){return super.configure(t)}extend(t){let r=typeof t==="function"?t():t;return super.extend(r)}},FH=$t.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new qe({key:new Qe("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:r}=e,{doc:a,selection:i}=t,l=R1(r),{blockSeparator:c}=this.options,u={...c!==void 0?{blockSeparator:c}:{},textSerializers:l};return[...i.ranges].sort((h,m)=>h.$from.pos-m.$from.pos).map(({$from:h,$to:m})=>DH(a,{from:h.pos,to:m.pos},u)).join(c!=null?c:`
351
+
352
+ `)}}})]}}),VH=$t.create({name:"commands",addCommands(){return{...SH}}}),jH=$t.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var r,a,i;let l=()=>{var c,u,f,h;if((h=(f=(u=(c=this.editor.options.coreExtensionOptions)==null?void 0:c.delete)==null?void 0:u.filterTransaction)==null?void 0:f.call(u,e))!=null?h:e.getMeta("y-sync$"))return;let m=f4(e.before,[e,...t]);cb(m).forEach((v)=>{if(m.mapping.mapResult(v.oldRange.from).deletedAfter&&m.mapping.mapResult(v.oldRange.to).deletedBefore)m.before.nodesBetween(v.oldRange.from,v.oldRange.to,(S,w)=>{let E=w+S.nodeSize-2,R=v.oldRange.from<=w&&E<=v.oldRange.to;this.editor.emit("delete",{type:"node",node:S,from:w,to:E,newFrom:m.mapping.map(w),newTo:m.mapping.map(E),deletedRange:v.oldRange,newRange:v.newRange,partial:!R,editor:this.editor,transaction:e,combinedTransform:m})})});let y=m.mapping;m.steps.forEach((v,S)=>{var w,E;if(v instanceof xa){let R=y.slice(S).map(v.from,-1),D=y.slice(S).map(v.to),H=y.invert().map(R,-1),z=y.invert().map(D),G=R>0?(w=m.doc.nodeAt(R-1))==null?void 0:w.marks.some((U)=>U.eq(v.mark)):!1,ee=(E=m.doc.nodeAt(D))==null?void 0:E.marks.some((U)=>U.eq(v.mark));this.editor.emit("delete",{type:"mark",mark:v.mark,from:v.from,to:v.to,deletedRange:{from:H,to:z},newRange:{from:R,to:D},partial:Boolean(ee||G),editor:this.editor,transaction:e,combinedTransform:m})}})};if((i=(a=(r=this.editor.options.coreExtensionOptions)==null?void 0:r.delete)==null?void 0:a.async)!=null?i:!0)setTimeout(l,0);else l()}}),KH=$t.create({name:"drop",addProseMirrorPlugins(){return[new qe({key:new Qe("tiptapDrop"),props:{handleDrop:(e,t,r,a)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:r,moved:a})}}})]}}),qH=$t.create({name:"editable",addProseMirrorPlugins(){return[new qe({key:new Qe("editable"),props:{editable:()=>this.editor.options.editable}})]}}),GH=new Qe("focusEvents"),WH=$t.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new qe({key:GH,props:{handleDOMEvents:{focus:(t,r)=>{e.isFocused=!0;let a=e.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return t.dispatch(a),!1},blur:(t,r)=>{e.isFocused=!1;let a=e.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return t.dispatch(a),!1}}}})]}}),YH=$t.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:c})=>[()=>c.undoInputRule(),()=>c.command(({tr:u})=>{let{selection:f,doc:h}=u,{empty:m,$anchor:b}=f,{pos:y,parent:v}=b,S=b.parent.isTextblock&&y>0?u.doc.resolve(y-1):b,w=S.parent.type.spec.isolating,E=b.pos-b.parentOffset,R=w&&S.parent.childCount===1?E===b.pos:Fe.atStart(h).from===y;if(!m||!v.type.isTextblock||v.textContent.length||!R||R&&b.parent.type.name==="paragraph")return!1;return c.clearNodes()}),()=>c.deleteSelection(),()=>c.joinBackward(),()=>c.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:c})=>[()=>c.deleteSelection(),()=>c.deleteCurrentNode(),()=>c.joinForward(),()=>c.selectNodeForward()]),a={Enter:()=>this.editor.commands.first(({commands:c})=>[()=>c.newlineInCode(),()=>c.createParagraphNear(),()=>c.liftEmptyBlock(),()=>c.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...a},l={...a,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};if($1()||RH())return l;return i},addProseMirrorPlugins(){return[new qe({key:new Qe("clearDocument"),appendTransaction:(e,t,r)=>{if(e.some((w)=>w.getMeta("composition")))return;let a=e.some((w)=>w.docChanged)&&!t.doc.eq(r.doc),i=e.some((w)=>w.getMeta("preventClearDocument"));if(!a||i)return;let{empty:l,from:c,to:u}=t.selection,f=Fe.atStart(t.doc).from,h=Fe.atEnd(t.doc).to;if(l||!(c===f&&u===h))return;if(!eh(r.doc))return;let y=r.tr,v=S1({state:r,transaction:y}),{commands:S}=new C1({editor:this.editor,state:v});if(S.clearNodes(),!y.steps.length)return;return y}})]}}),JH=$t.create({name:"paste",addProseMirrorPlugins(){return[new qe({key:new Qe("tiptapPaste"),props:{handlePaste:(e,t,r)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:r})}}})]}}),XH=$t.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new qe({key:new Qe("tabindex"),props:{attributes:()=>{var e;if(!this.editor.isEditable&&this.options.value===void 0)return{};return{tabindex:(e=this.options.value)!=null?e:"0"}}}})]}}),QH=$t.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Qp(this.extensions);return[{types:e.filter((t)=>t.name!=="text").map((t)=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:(t)=>{let r=t.getAttribute("dir");if(r&&(r==="ltr"||r==="rtl"||r==="auto"))return r;return this.options.direction},renderHTML:(t)=>{if(!t.dir)return{};return{dir:t.dir}}}}}]},addProseMirrorPlugins(){return[new qe({key:new Qe("textDirection"),props:{attributes:()=>{let e=this.options.direction;if(!e)return{};return{dir:e}}}})]}}),ZH=class extends Qne{constructor(e={}){super();this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:kne,createMappablePosition:Ane},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:a,moved:i})=>this.options.onDrop(r,a,i)),this.on("paste",({event:r,slice:a})=>this.options.onPaste(r,a)),this.on("delete",this.options.onDelete);let t=this.createDoc();if(!this.editorState){let r=i4(t,this.options.autofocus);this.editorState=kc.create({doc:t,schema:this.schema,selection:r||void 0})}if(this.options.element)this.mount(this.options.element)}mount(e){if(typeof document>"u")throw Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");if(this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css))document.head.appendChild(this.css);window.setTimeout(()=>{if(this.isDestroyed)return;if(this.options.autofocus!==!1&&this.options.autofocus!==null)this.commands.focus(this.options.autofocus);this.emit("create",{editor:this}),this.isInitialized=!0},0)}unmount(){if(this.editorView){let e=this.editorView.dom;if(e==null?void 0:e.editor)delete e.editor;this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{if(typeof this.css.remove==="function")this.css.remove();else if(this.css.parentNode)this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){if(this.options.injectCSS&&typeof document<"u")this.css=Zne(bre,this.options.injectNonce)}setOptions(e={}){if(this.options={...this.options,...e},!this.editorView||!this.state||this.isDestroyed)return;if(this.options.editorProps)this.view.setProps(this.options.editorProps);this.view.updateState(this.state)}setEditable(e,t=!0){if(this.setOptions({editable:e}),t)this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){if(this.editorView)return this.editorView;return new Proxy({state:this.editorState,updateState:(e)=>{this.editorState=e},dispatch:(e)=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){if(this.editorView)this.editorState=this.view.state;return this.editorState}registerPlugin(e,t){let r=MH(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],a=this.state.reconfigure({plugins:r});return this.view.updateState(a),a}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,r=t;if([].concat(e).forEach((i)=>{let l=typeof i==="string"?`${i}$`:i.key;r=r.filter((c)=>!c.key.startsWith(l))}),t.length===r.length)return;let a=this.state.reconfigure({plugins:r});return this.view.updateState(a),a}createExtensionManager(){var e,t,r,a;let l=[...this.options.enableCoreExtensions?[qH,FH.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),VH,WH,YH,XH.configure({value:(a=(r=this.options.coreExtensionOptions)==null?void 0:r.tabindex)==null?void 0:a.value}),KH,JH,jH,QH.configure({direction:this.options.textDirection})].filter((c)=>{if(typeof this.options.enableCoreExtensions==="object")return this.options.enableCoreExtensions[c.name]!==!1;return!0}):[],...this.options.extensions].filter((c)=>["extension","node","mark"].includes(c==null?void 0:c.type));this.extensionManager=new O1(l,this)}createCommandManager(){this.commandManager=new C1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=s4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;let r=s4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=kc.create({doc:r,schema:this.schema,selection:i4(r,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{if("collaboration"in this.storage&&typeof this.storage.collaboration==="object"&&this.storage.collaboration)this.storage.collaboration.isDisabled=!0;this.options.extensions=this.options.extensions.filter((a)=>a.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:r}=this.options,a=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=r?this.extensionManager.dispatchTransaction(a):a,l=t.transformPastedHTML,c=this.extensionManager.transformPastedHTML(l);this.editorView=new f1(e,{...t,attributes:{role:"textbox",...t==null?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:c,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let u=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(u),this.prependClass(),this.injectCSS();let f=this.view.dom;f.editor=this}createNodeViews(){if(this.view.isDestroyed)return;this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach((h)=>{var m;return(m=this.capturedTransaction)==null?void 0:m.step(h)});return}let{state:t,transactions:r}=this.state.applyTransaction(e),a=!this.state.selection.eq(t.selection),i=r.includes(e),l=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;if(this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:r.slice(1)}),a)this.emit("selectionUpdate",{editor:this,transaction:e});let c=r.findLast((h)=>h.getMeta("focus")||h.getMeta("blur")),u=c==null?void 0:c.getMeta("focus"),f=c==null?void 0:c.getMeta("blur");if(u)this.emit("focus",{editor:this,event:u.event,transaction:c});if(f)this.emit("blur",{editor:this,event:f.event,transaction:c});if(e.getMeta("preventUpdate")||!r.some((h)=>h.docChanged)||l.doc.eq(t.doc))return;this.emit("update",{editor:this,transaction:e,appendedTransactions:r.slice(1)})}getAttributes(e){return g4(this.state,e)}isActive(e,t){let r=typeof e==="string"?e:null,a=typeof e==="string"?t:e;return Rne(this.state,r,a)}getJSON(){return this.state.doc.toJSON()}getHTML(){return h4(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
353
+
354
+ `,textSerializers:r={}}=e||{};return m4(this.state.doc,{blockSeparator:t,textSerializers:{...R1(this.schema),...r}})}get isEmpty(){return eh(this.state.doc)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={}}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var r;return((r=this.$doc)==null?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e),r=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new gre(t,this,!1,r)}get $doc(){return this.$pos(0)}};en=class e extends v4{constructor(){super(...arguments);this.type="node"}static create(t={}){let r=typeof t==="function"?t():t;return new e(r)}configure(t){return super.configure(t)}extend(t){let r=typeof t==="function"?t():t;return super.extend(r)}}});function $4(e,t){return function(a,i,l){return e(a,i,l)&&t(a,i,l)}}function D1(e){return function(r,a,i){if(!r||!a||typeof r!=="object"||typeof a!=="object")return e(r,a,i);let{cache:l}=i,c=l.get(r),u=l.get(a);if(c&&u)return c===a&&u===r;l.set(r,a),l.set(a,r);let f=e(r,a,i);return l.delete(r),l.delete(a),f}}function $re(e){return e!=null?e[Symbol.toStringTag]:void 0}function tU(e){return yre(e).concat(vre(e))}function Md(e,t){return e===t||!e&&!t&&e!==e&&t!==t}function Tre(e,t){return e.byteLength===t.byteLength&&P1(new Uint8Array(e),new Uint8Array(t))}function Rre(e,t,r){let a=e.length;if(t.length!==a)return!1;while(a-- >0)if(!r.equals(e[a],t[a],a,a,e,t,r))return!1;return!0}function kre(e,t){return e.byteLength===t.byteLength&&P1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Are(e,t){return Md(e.getTime(),t.getTime())}function Mre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Nre(e,t){return e===t}function oU(e,t,r){let a=e.size;if(a!==t.size)return!1;if(!a)return!0;let i=Array(a),l=e.entries(),c,u,f=0;while(c=l.next()){if(c.done)break;let h=t.entries(),m=!1,b=0;while(u=h.next()){if(u.done)break;if(i[b]){b++;continue}let y=c.value,v=u.value;if(r.equals(y[0],v[0],f,b,e,t,r)&&r.equals(y[1],v[1],y[0],v[0],e,t,r)){m=i[b]=!0;break}b++}if(!m)return!1;f++}return!0}function Dre(e,t,r){let a=rU(e),i=a.length;if(rU(t).length!==i)return!1;while(i-- >0)if(!iU(e,t,r,a[i]))return!1;return!0}function fb(e,t,r){let a=tU(e),i=a.length;if(tU(t).length!==i)return!1;let l,c,u;while(i-- >0){if(l=a[i],!iU(e,t,r,l))return!1;if(c=nU(e,l),u=nU(t,l),(c||u)&&(!c||!u||c.configurable!==u.configurable||c.enumerable!==u.enumerable||c.writable!==u.writable))return!1}return!0}function Pre(e,t){return Md(e.valueOf(),t.valueOf())}function Lre(e,t){return e.source===t.source&&e.flags===t.flags}function aU(e,t,r){let a=e.size;if(a!==t.size)return!1;if(!a)return!0;let i=Array(a),l=e.values(),c,u;while(c=l.next()){if(c.done)break;let f=t.values(),h=!1,m=0;while(u=f.next()){if(u.done)break;if(!i[m]&&r.equals(c.value,u.value,c.value,u.value,e,t,r)){h=i[m]=!0;break}m++}if(!h)return!1}return!0}function P1(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;while(r-- >0)if(e[r]!==t[r])return!1;return!0}function _re(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function iU(e,t,r,a){if((a===Ere||a===wre||a===Cre)&&(e.$$typeof||t.$$typeof))return!0;return Sre(t,a)&&r.equals(e[a],t[a],a,a,e,t,r)}function Qre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:a,areErrorsEqual:i,areFunctionsEqual:l,areMapsEqual:c,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:m,areSetsEqual:b,areTypedArraysEqual:y,areUrlsEqual:v,unknownTagComparators:S}){return function(E,R,D){if(E===R)return!0;if(E==null||R==null)return!1;let H=typeof E;if(H!==typeof R)return!1;if(H!=="object"){if(H==="number")return u(E,R,D);if(H==="function")return l(E,R,D);return!1}let z=E.constructor;if(z!==R.constructor)return!1;if(z===Object)return f(E,R,D);if(Array.isArray(E))return t(E,R,D);if(z===Date)return a(E,R,D);if(z===RegExp)return m(E,R,D);if(z===Map)return c(E,R,D);if(z===Set)return b(E,R,D);let G=Xre.call(E);if(G===Ure)return a(E,R,D);if(G===qre)return m(E,R,D);if(G===Vre)return c(E,R,D);if(G===Gre)return b(E,R,D);if(G===Kre)return typeof E.then!=="function"&&typeof R.then!=="function"&&f(E,R,D);if(G===Jre)return v(E,R,D);if(G===Fre)return i(E,R,D);if(G===Bre)return f(E,R,D);if(Yre[G])return y(E,R,D);if(G===Ire)return e(E,R,D);if(G===Hre)return r(E,R,D);if(G===zre||G===jre||G===Wre)return h(E,R,D);if(S){let ee=S[G];if(!ee){let U=$re(E);if(U)ee=S[U]}if(ee)return ee(E,R,D)}return!1}}function Zre({circular:e,createCustomConfig:t,strict:r}){let a={areArrayBuffersEqual:Tre,areArraysEqual:r?fb:Rre,areDataViewsEqual:kre,areDatesEqual:Are,areErrorsEqual:Mre,areFunctionsEqual:Nre,areMapsEqual:r?$4(oU,fb):oU,areNumbersEqual:Ore,areObjectsEqual:r?fb:Dre,arePrimitiveWrappersEqual:Pre,areRegExpsEqual:Lre,areSetsEqual:r?$4(aU,fb):aU,areTypedArraysEqual:r?$4(P1,fb):P1,areUrlsEqual:_re,unknownTagComparators:void 0};if(t)a=Object.assign({},a,t(a));if(e){let i=D1(a.areArraysEqual),l=D1(a.areMapsEqual),c=D1(a.areObjectsEqual),u=D1(a.areSetsEqual);a=Object.assign({},a,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:u})}return a}function eoe(e){return function(t,r,a,i,l,c,u){return e(t,r,u)}}function toe({circular:e,comparator:t,createState:r,equals:a,strict:i}){if(r)return function(u,f){let{cache:h=e?new WeakMap:void 0,meta:m}=r();return t(u,f,{cache:h,equals:a,meta:m,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};let l={cache:void 0,equals:a,meta:void 0,strict:i};return function(u,f){return t(u,f,l)}}function zc(e={}){let{circular:t=!1,createInternalComparator:r,createState:a,strict:i=!1}=e,l=Zre(e),c=Qre(l),u=r?r(c):eoe(c);return toe({circular:t,comparator:c,createState:a,equals:u,strict:i})}var yre,vre,xre,Sre,Cre="__v",wre="__o",Ere="_owner",nU,rU,Ore,Ire="[object ArrayBuffer]",Bre="[object Arguments]",zre="[object Boolean]",Hre="[object DataView]",Ure="[object Date]",Fre="[object Error]",Vre="[object Map]",jre="[object Number]",Kre="[object Object]",qre="[object RegExp]",Gre="[object Set]",Wre="[object String]",Yre,Jre="[object URL]",Xre,sU,Ake,Mke,Nke,Oke,Dke,Pke,Lke;var lU=N(()=>{({getOwnPropertyNames:yre,getOwnPropertySymbols:vre}=Object),{hasOwnProperty:xre}=Object.prototype;Sre=Object.hasOwn||((e,t)=>xre.call(e,t));({getOwnPropertyDescriptor:nU,keys:rU}=Object);Ore=Md;Yre={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Xre=Object.prototype.toString;sU=zc(),Ake=zc({strict:!0}),Mke=zc({circular:!0}),Nke=zc({circular:!0,strict:!0}),Oke=zc({createInternalComparator:()=>Md}),Dke=zc({strict:!0,createInternalComparator:()=>Md}),Pke=zc({circular:!0,createInternalComparator:()=>Md}),Lke=zc({circular:!0,createInternalComparator:()=>Md,strict:!0})});var cU=Bi(function(noe){var al=j(ae());(function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Sp(),r=typeof Object.is==="function"?Object.is:e,a=t.useSyncExternalStore,i=al.useRef,l=al.useEffect,c=al.useMemo,u=al.useDebugValue;noe.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var v=i(null);if(v.current===null){var S={hasValue:!1,value:null};v.current=S}else S=v.current;v=c(function(){function E(G){if(!R){if(R=!0,D=G,G=b(G),y!==void 0&&S.hasValue){var ee=S.value;if(y(ee,G))return H=ee}return H=G}if(ee=H,r(D,G))return ee;var U=b(G);if(y!==void 0&&y(ee,U))return D=G,ee;return D=G,H=U}var R=!1,D,H,z=m===void 0?null:m;return[function(){return E(h())},z===null?void 0:function(){return E(z())}]},[h,m,b,y]);var w=a(f,v[0],v[1]);return l(function(){S.hasValue=!0,S.value=w},[w]),u(w),w},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});function aoe(){let e=new Set,t={},r=!1,a=()=>{if(r||!e.size)return;r=!0,queueMicrotask(()=>{r=!1,e.forEach((i)=>i())})};return{subscribe(i){return e.add(i),()=>{e.delete(i)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(i,l){t={...t,[i]:dU.default.createPortal(l.reactElement,l.element,i)},a()},removeRenderer(i){let l={...t};delete l[i],t=l,a()}}}function C4(e){var t;let[r]=Fc.useState(()=>new coe(e.editor)),a=hU.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:sU);return loe(()=>r.watch(e.editor),[e.editor,r]),Fc.useDebugValue(a),a}function gU(e={},t=[]){let r=Uc.useRef(e);r.current=e;let[a]=Uc.useState(()=>new doe(r)),i=pU.useSyncExternalStore(a.subscribe,a.getEditor,a.getServerSnapshot);return Uc.useDebugValue(i),Uc.useEffect(a.onRender(t)),C4({editor:i,selector:({transactionNumber:l})=>{if(e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0)return null;if(e.immediatelyRender&&l===0)return 0;return l+1}}),i}function $U({children:e,...t}){let r="editor"in t?t.editor:t.instance;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let a=Nd.useMemo(()=>({editor:r}),[r]),i=Nd.useMemo(()=>({editor:r}),[r]);return L1.jsx(w4.Provider,{value:i,children:L1.jsx(T4.Provider,{value:a,children:e})})}function SU({...e}){let{editor:t}=xoe();return L1.jsx(S4,{editor:t,...e})}var pb,Hc,dU,fU,il,Uc,pU,Fc,hU,bU,hb,hoe,yU,vU,xU,moe,goe,boe,yoe,E4,voe,Nd,L1,roe=(...e)=>(t)=>{e.forEach((r)=>{if(typeof r==="function")r(t);else if(r)r.current=t})},ooe=({contentComponent:e})=>{let t=fU.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return il.jsx(il.Fragment,{children:Object.values(t)})},ioe,soe,S4,loe,coe=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){if(this.transactionNumber===this.lastTransactionNumber)return this.lastSnapshot;return this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t,r=(i)=>{if((i==null?void 0:i.transaction)!==void 0&&i.transaction===t)return;t=i==null?void 0:i.transaction,this.transactionNumber+=1,this.subscribers.forEach((l)=>l())},a=this.editor;return a.on("transaction",r),a.on("update",r),()=>{a.off("transaction",r),a.off("update",r)}}return}},uU=!0,mU,uoe,doe=class e{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((r)=>r())}getInitialEditor(){let t=this.options.current.immediatelyRender,r=t!=null?t:!0;if(mU){if(r&&uU)console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches");r=!1}else if(uoe&&t===void 0){if(r=!1,uU)console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")}return r?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...a)=>{var i,l;return(l=(i=this.options.current).onBeforeCreate)==null?void 0:l.call(i,...a)},onBlur:(...a)=>{var i,l;return(l=(i=this.options.current).onBlur)==null?void 0:l.call(i,...a)},onCreate:(...a)=>{var i,l;return(l=(i=this.options.current).onCreate)==null?void 0:l.call(i,...a)},onDestroy:(...a)=>{var i,l;return(l=(i=this.options.current).onDestroy)==null?void 0:l.call(i,...a)},onFocus:(...a)=>{var i,l;return(l=(i=this.options.current).onFocus)==null?void 0:l.call(i,...a)},onSelectionUpdate:(...a)=>{var i,l;return(l=(i=this.options.current).onSelectionUpdate)==null?void 0:l.call(i,...a)},onTransaction:(...a)=>{var i,l;return(l=(i=this.options.current).onTransaction)==null?void 0:l.call(i,...a)},onUpdate:(...a)=>{var i,l;return(l=(i=this.options.current).onUpdate)==null?void 0:l.call(i,...a)},onContentError:(...a)=>{var i,l;return(l=(i=this.options.current).onContentError)==null?void 0:l.call(i,...a)},onDrop:(...a)=>{var i,l;return(l=(i=this.options.current).onDrop)==null?void 0:l.call(i,...a)},onPaste:(...a)=>{var i,l;return(l=(i=this.options.current).onPaste)==null?void 0:l.call(i,...a)},onDelete:(...a)=>{var i,l;return(l=(i=this.options.current).onDelete)==null?void 0:l.call(i,...a)},onMount:(...a)=>{var i,l;return(l=(i=this.options.current).onMount)==null?void 0:l.call(i,...a)},onUnmount:(...a)=>{var i,l;return(l=(i=this.options.current).onUnmount)==null?void 0:l.call(i,...a)}};return new ZH(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,r){return Object.keys(t).every((a)=>{if(["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(a))return!0;if(a==="extensions"&&t.extensions&&r.extensions){if(t.extensions.length!==r.extensions.length)return!1;return t.extensions.every((i,l)=>{var c;if(i!==((c=r.extensions)==null?void 0:c[l]))return!1;return!0})}if(t[a]!==r[a])return!1;return!0})}onRender(t){return()=>{if(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0){if(!e.compareOptions(this.options.current,this.editor.options))this.editor.setOptions({...this.options.current,editable:this.editor.isEditable})}else this.refreshEditorInstance(t);return()=>{this.isComponentMounted=!1,this.scheduleDestroy()}}}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((a,i)=>a===t[i]))return}if(this.editor&&!this.editor.isDestroyed)this.editor.destroy();this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){if(r)r.setOptions(this.options.current);return}if(r&&!r.isDestroyed){if(r.destroy(),this.instanceId===t)this.setEditor(null)}},1)}},w4,Fke,_1=()=>pb.useContext(w4),foe,poe=()=>hb.useContext(foe),Vke,jke,T4,xoe=()=>Nd.useContext(T4),Kke;var I1=N(()=>{Ye();lU();pb=j(ae(),1),Hc=j(ae(),1),dU=j(Vr(),1),fU=j(Sp(),1),il=j(io(),1),Uc=j(ae(),1),pU=j(Sp(),1),Fc=j(ae(),1),hU=j(cU(),1),bU=j(io(),1),hb=j(ae(),1),hoe=j(io(),1),yU=j(ae(),1),vU=j(io(),1),xU=j(ae(),1),moe=j(ae(),1),goe=j(Vr(),1),boe=j(io(),1),yoe=j(io(),1),E4=j(ae(),1),voe=j(io(),1),Nd=j(ae(),1),L1=j(io(),1);Ye();ioe=class extends Hc.default.Component{constructor(e){super(e);this.editorContentRef=Hc.default.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)==null?void 0:e.parentNode)){if(t.contentComponent)return;let r=this.editorContentRef.current;r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r}),t.contentComponent=aoe(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(!t)return;if(t.isEditorContentInitialized=!1,!t.isDestroyed)t.view.setProps({nodeViews:{}});t.contentComponent=null;try{if(!((e=t.view.dom)==null?void 0:e.parentNode))return;let r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch{}}render(){let{editor:e,innerRef:t,...r}=this.props;return il.jsxs(il.Fragment,{children:[il.jsx("div",{ref:roe(t,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&il.jsx(ooe,{contentComponent:e.contentComponent})]})}},soe=Hc.forwardRef((e,t)=>{let r=Hc.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Hc.default.createElement(ioe,{key:r,innerRef:t,...e})}),S4=Hc.default.memo(soe),loe=typeof window<"u"?Fc.useLayoutEffect:Fc.useEffect;mU=typeof window>"u",uoe=mU||Boolean(typeof window<"u"&&window.next);w4=pb.createContext({editor:null}),Fke=w4.Consumer,foe=hb.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Vke=yU.default.forwardRef((e,t)=>{let{onDragStart:r}=poe(),a=e.as||"div";return vU.jsx(a,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})}),jke=xU.default.createContext({markViewContentRef:()=>{}}),T4=Nd.createContext({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});T4.displayName="TiptapContext";$U.displayName="Tiptap";SU.displayName="Tiptap.Content";Kke=Object.assign($U,{Content:SU})});function A4(e,t,r){return Go(e,Ra(t,r))}function ns(e,t){return typeof e==="function"?e(t):e}function ka(e){return e.split("-")[0]}function Aa(e){return e.split("-")[1]}function M4(e){return e==="x"?"y":"x"}function B1(e){return e==="y"?"height":"width"}function ri(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function z1(e){return M4(ri(e))}function N4(e,t,r){if(r===void 0)r=!1;let a=Aa(e),i=z1(e),l=B1(i),c=i==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(t.reference[l]>t.floating[l])c=gb(c);return[c,gb(c)]}function TU(e){let t=gb(e);return[mb(e),t,mb(t)]}function mb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function woe(e,t,r){switch(e){case"top":case"bottom":if(r)return t?EU:wU;return t?wU:EU;case"left":case"right":return t?Soe:Coe;default:return[]}}function RU(e,t,r,a){let i=Aa(e),l=woe(ka(e),r==="start",a);if(i){if(l=l.map((c)=>c+"-"+i),t)l=l.concat(l.map(mb))}return l}function gb(e){let t=ka(e);return $oe[t]+e.slice(t.length)}function Eoe(e){var t,r,a,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(a=e.bottom)!=null?a:0,left:(i=e.left)!=null?i:0}}function H1(e){return typeof e!=="number"?Eoe(e):{top:e,right:e,bottom:e,left:e}}function oi(e){let{x:t,y:r,width:a,height:i}=e;return{width:a,height:i,top:r,left:t,right:t+a,bottom:r+i,x:t,y:r}}var R4,CU,k4,Ra,Go,bb,ts=(e)=>({x:e,y:e}),$oe,wU,EU,Soe,Coe;var U1=N(()=>{R4=["top","right","bottom","left"],CU=["start","end"],k4=R4.reduce((e,t)=>e.concat(t,t+"-"+CU[0],t+"-"+CU[1]),[]),Ra=Math.min,Go=Math.max,bb=Math.round,$oe={left:"right",right:"left",bottom:"top",top:"bottom"};wU=["left","right"],EU=["right","left"],Soe=["top","bottom"],Coe=["bottom","top"]});function kU(e,t,r){let{reference:a,floating:i}=e,l=ri(t),c=z1(t),u=B1(c),f=ka(t),h=l==="y",m=a.x+a.width/2-i.width/2,b=a.y+a.height/2-i.height/2,y=a[u]/2-i[u]/2,v;switch(f){case"top":v={x:m,y:a.y-i.height};break;case"bottom":v={x:m,y:a.y+a.height};break;case"right":v={x:a.x+a.width,y:b};break;case"left":v={x:a.x-i.width,y:b};break;default:v={x:a.x,y:a.y}}let S=Aa(t);if(S)v[c]+=y*(S==="end"?1:-1)*(r&&h?-1:1);return v}async function NU(e,t){var r;if(t===void 0)t={};let{x:a,y:i,platform:l,rects:c,elements:u,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:y=!1,padding:v=0}=ns(t,e),S=H1(v),E=u[y?b==="floating"?"reference":"floating":b],R=oi(await l.getClippingRect({element:((r=await(l.isElement==null?void 0:l.isElement(E)))!=null?r:!0)?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:f})),D=b==="floating"?{x:a,y:i,width:c.floating.width,height:c.floating.height}:c.reference,H=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),z=await(l.isElement==null?void 0:l.isElement(H))&&await(l.getScale==null?void 0:l.getScale(H))||{x:1,y:1},G=oi(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:D,offsetParent:H,strategy:f}):D);return{top:(R.top-G.top+S.top)/z.y,bottom:(G.bottom-R.bottom+S.bottom)/z.y,left:(R.left-G.left+S.left)/z.x,right:(G.right-R.right+S.right)/z.x}}function Roe(e,t,r){return(e?[...r.filter((i)=>Aa(i)===e),...r.filter((i)=>Aa(i)!==e)]:r.filter((i)=>ka(i)===i)).filter((i)=>{if(e)return Aa(i)===e||(t?mb(i)!==i:!1);return!0})}function AU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MU(e){return R4.some((t)=>e[t]>=0)}function IU(e){let t=Ra(...e.map((l)=>l.left)),r=Ra(...e.map((l)=>l.top)),a=Go(...e.map((l)=>l.right)),i=Go(...e.map((l)=>l.bottom));return{x:t,y:r,width:a-t,height:i-r}}function koe(e){let t=e.slice().sort((i,l)=>i.y-l.y),r=[],a=null;for(let i=0;i<t.length;i++){let l=t[i];if(!a||l.y-a.y>a.height/2)r.push([l]);else r[r.length-1].push(l);a=l}return r.map((i)=>oi(IU(i)))}async function Moe(e,t){let{placement:r,platform:a,elements:i}=e,l=await(a.isRTL==null?void 0:a.isRTL(i.floating)),c=ka(r),u=Aa(r),f=ri(r)==="y",h=Aoe.has(c)?-1:1,m=l&&f?-1:1,b=ns(t,e),{mainAxis:y,crossAxis:v,alignmentAxis:S}=typeof b==="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};if(u&&typeof S==="number")v=u==="end"?S*-1:S;return f?{x:v*m,y:y*h}:{x:y*h,y:v*m}}var Toe=50,OU=async(e,t,r)=>{let{placement:a="bottom",strategy:i="absolute",middleware:l=[],platform:c}=r,u=c.detectOverflow?c:{...c,detectOverflow:NU},f=await(c.isRTL==null?void 0:c.isRTL(t)),h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:b}=kU(h,a,f),y=a,v=0,S={};for(let w=0;w<l.length;w++){let E=l[w];if(!E)continue;let{name:R,fn:D}=E,{x:H,y:z,data:G,reset:ee}=await D({x:m,y:b,initialPlacement:a,placement:y,strategy:i,middlewareData:S,rects:h,platform:u,elements:{reference:e,floating:t}});if(m=H!=null?H:m,b=z!=null?z:b,S[R]={...S[R],...G},ee&&v<Toe){if(v++,typeof ee==="object"){if(ee.placement)y=ee.placement;if(ee.rects)h=ee.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):ee.rects;({x:m,y:b}=kU(h,y,f))}w=-1}}return{x:m,y:b,placement:y,strategy:i,middlewareData:S}},DU=(e)=>({name:"arrow",options:e,async fn(t){let{x:r,y:a,placement:i,rects:l,platform:c,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=ns(e,t)||{};if(h==null)return{};let b=H1(m),y={x:r,y:a},v=z1(i),S=B1(v),w=await c.getDimensions(h),E=v==="y",R=E?"top":"left",D=E?"bottom":"right",H=E?"clientHeight":"clientWidth",z=l.reference[S]+l.reference[v]-y[v]-l.floating[S],G=y[v]-l.reference[v],ee=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h)),U=ee?ee[H]:0;if(!U||!await(c.isElement==null?void 0:c.isElement(ee)))U=u.floating[H]||l.floating[S];let P=z/2-G/2,re=U/2-w[S]/2-1,J=Ra(b[R],re),ye=Ra(b[D],re),ce=U-w[S]-ye,se=U/2-w[S]/2+P,_=A4(J,se,ce),W=!f.arrow&&Aa(i)!=null&&se!==_&&l.reference[S]/2-(se<J?J:ye)-w[S]/2<0,Y=W?se<J?se-J:se-ce:0;return{[v]:y[v]+Y,data:{[v]:_,centerOffset:se-_-Y,...W&&{alignmentOffset:Y}},reset:W}}}),PU=function(e){if(e===void 0)e={};return{name:"autoPlacement",options:e,async fn(t){var r,a,i;let{rects:l,middlewareData:c,placement:u,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:b,allowedPlacements:y=k4,autoAlignment:v=!0,...S}=ns(e,t),w=b!==void 0||y===k4?Roe(b||null,v,y):y,E=((r=c.autoPlacement)==null?void 0:r.index)||0,R=w[E];if(R==null)return{};if(u!==R)return{reset:{placement:w[0]}};let D=await f.detectOverflow(t,S),H=N4(R,l,await(f.isRTL==null?void 0:f.isRTL(h.floating))),z=[D[ka(R)],D[H[0]],D[H[1]]],G=[...((a=c.autoPlacement)==null?void 0:a.overflows)||[],{placement:R,overflows:z}],ee=w[E+1];if(ee)return{data:{index:E+1,overflows:G},reset:{placement:ee}};let U=G.map((J)=>{let ye=Aa(J.placement);return[J.placement,ye&&m?J.overflows.slice(0,2).reduce((ce,se)=>ce+se,0):J.overflows[0],J.overflows]}).sort((J,ye)=>J[1]-ye[1]),re=((i=U.filter((J)=>J[2].slice(0,Aa(J[0])?2:3).every((ye)=>ye<=0))[0])==null?void 0:i[0])||U[0][0];if(re!==u)return{data:{index:E+1,overflows:G},reset:{placement:re}};return{}}}},LU=function(e){if(e===void 0)e={};return{name:"flip",options:e,async fn(t){var r,a;let{placement:i,middlewareData:l,rects:c,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...E}=ns(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};let R=ka(i),D=ri(u),H=ka(u)===u,z=await(f.isRTL==null?void 0:f.isRTL(h.floating)),G=y||(H||!w?[gb(u)]:TU(u)),ee=S!=="none";if(!y&&ee)G.push(...RU(u,w,S,z));let U=[u,...G],P=await f.detectOverflow(t,E),re=[],J=((a=l.flip)==null?void 0:a.overflows)||[];if(m)re.push(P[R]);if(b){let _=N4(i,c,z);re.push(P[_[0]],P[_[1]])}if(J=[...J,{placement:i,overflows:re}],!re.every((_)=>_<=0)){var ye,ce;let _=(((ye=l.flip)==null?void 0:ye.index)||0)+1,W=U[_];if(W){if(!(b==="alignment"?D!==ri(W):!1)||J.every((pe)=>ri(pe.placement)===D?pe.overflows[0]>0:!0))return{data:{index:_,overflows:J},reset:{placement:W}}}let Y=(ce=J.filter((Z)=>Z.overflows[0]<=0).sort((Z,pe)=>Z.overflows[1]-pe.overflows[1])[0])==null?void 0:ce.placement;if(!Y)switch(v){case"bestFit":{var se;let Z=(se=J.filter((pe)=>{if(ee){let V=ri(pe.placement);return V===D||V==="y"}return!0}).map((pe)=>[pe.placement,pe.overflows.filter((V)=>V>0).reduce((V,k)=>V+k,0)]).sort((pe,V)=>pe[1]-V[1])[0])==null?void 0:se[0];if(Z)Y=Z;break}case"initialPlacement":Y=u;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},_U=function(e){if(e===void 0)e={};return{name:"hide",options:e,async fn(t){let{rects:r,platform:a}=t,{strategy:i="referenceHidden",...l}=ns(e,t);switch(i){case"referenceHidden":{let c=await a.detectOverflow(t,{...l,elementContext:"reference"}),u=AU(c,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:MU(u)}}}case"escaped":{let c=await a.detectOverflow(t,{...l,altBoundary:!0}),u=AU(c,r.floating);return{data:{escapedOffsets:u,escaped:MU(u)}}}default:return{}}}}},BU=function(e){if(e===void 0)e={};return{name:"inline",options:e,async fn(t){let{placement:r,elements:a,rects:i,platform:l,strategy:c}=t,{padding:u=2,x:f,y:h}=ns(e,t),m=Array.from(await(l.getClientRects==null?void 0:l.getClientRects(a.reference))||[]);if(!m.length)return{};let b=koe(m),y=oi(IU(m)),v=H1(u);function S(){if(b.length===2&&(b[0].left>b[1].right||b[1].left>b[0].right)&&f!=null&&h!=null)return b.find((E)=>f>E.left-v.left&&f<E.right+v.right&&h>E.top-v.top&&h<E.bottom+v.bottom)||y;if(b.length>=2){if(ri(r)==="y"){let ee=b[0],U=b[b.length-1],P=ka(r)==="top",re=ee.top,J=U.bottom,ye=P?ee.left:U.left,ce=P?ee.right:U.right;return oi({x:ye,y:re,width:ce-ye,height:J-re})}let E=ka(r)==="left",R=Go(...b.map((ee)=>ee.right)),D=Ra(...b.map((ee)=>ee.left)),H=b.filter((ee)=>E?ee.left===D:ee.right===R),z=H[0].top,G=H[H.length-1].bottom;return oi({x:D,y:z,width:R-D,height:G-z})}return y}let w=await l.getElementRects({reference:{getBoundingClientRect:S},floating:a.floating,strategy:c});if(i.reference.x!==w.reference.x||i.reference.y!==w.reference.y||i.reference.width!==w.reference.width||i.reference.height!==w.reference.height)return{reset:{rects:w}};return{}}}},Aoe,zU=function(e){if(e===void 0)e=0;return{name:"offset",options:e,async fn(t){var r,a;let{x:i,y:l,placement:c,middlewareData:u}=t,f=await Moe(t,e);if(c===((r=u.offset)==null?void 0:r.placement)&&(a=u.arrow)!=null&&a.alignmentOffset)return{};return{x:i+f.x,y:l+f.y,data:{...f,placement:c}}}}},HU=function(e){if(e===void 0)e={};return{name:"shift",options:e,async fn(t){let{x:r,y:a,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:f={fn:(D)=>{let{x:H,y:z}=D;return{x:H,y:z}}},...h}=ns(e,t),m={x:r,y:a},b=await l.detectOverflow(t,h),y=ri(i),v=M4(y),S=m[v],w=m[y],E=(D,H)=>A4(H+b[D==="y"?"top":"left"],H,H-b[D==="y"?"bottom":"right"]);if(c)S=E(v,S);if(u)w=E(y,w);let R=f.fn({...t,[v]:S,[y]:w});return{...R,data:{x:R.x-r,y:R.y-a,enabled:{[v]:c,[y]:u}}}}}},UU=function(e){if(e===void 0)e={};return{name:"size",options:e,async fn(t){let{placement:r,rects:a,platform:i,elements:l}=t,{apply:c=()=>{},...u}=ns(e,t),f=await i.detectOverflow(t,u),h=ka(r),m=Aa(r),b=ri(r)==="y",{width:y,height:v}=a.floating,S,w;if(h==="top"||h==="bottom")S=h,w=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right";else w=h,S=m==="end"?"top":"bottom";let E=v-f.top-f.bottom,R=y-f.left-f.right,D=Ra(v-f[S],E),H=Ra(y-f[w],R),z=t.middlewareData.shift,G=!z,ee=D,U=H;if(z!=null&&z.enabled.x)U=R;if(z!=null&&z.enabled.y)ee=E;if(G&&!m)if(b)U=y-2*Go(f.left,f.right);else ee=v-2*Go(f.top,f.bottom);await c({...t,availableWidth:U,availableHeight:ee});let P=await i.getDimensions(l.floating);if(y!==P.width||v!==P.height)return{reset:{rects:!0}};return{}}}};var FU=N(()=>{U1();U1();Aoe=new Set(["left","top"])});function V1(){return typeof window<"u"}function Dd(e){if(jU(e))return(e.nodeName||"").toLowerCase();return"#document"}function yo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sl(e){var t;return(t=(jU(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jU(e){if(!V1())return!1;return e instanceof Node||e instanceof yo(e).Node}function ai(e){if(!V1())return!1;return e instanceof Element||e instanceof yo(e).Element}function ll(e){if(!V1())return!1;return e instanceof HTMLElement||e instanceof yo(e).HTMLElement}function VU(e){if(!V1()||typeof ShadowRoot>"u")return!1;return e instanceof ShadowRoot||e instanceof yo(e).ShadowRoot}function yb(e){let{overflow:t,overflowX:r,overflowY:a,display:i}=ii(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&i!=="inline"&&i!=="contents"}function KU(e){return/^(table|td|th)$/.test(Dd(e))}function vb(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}function j1(e){let t=ai(e)?ii(e):e;return Od(t.transform)||Od(t.translate)||Od(t.scale)||Od(t.rotate)||Od(t.perspective)||!K1()&&(Od(t.backdropFilter)||Od(t.filter))||Noe.test(t.willChange||"")||Ooe.test(t.contain||"")}function qU(e){let t=Vc(e);while(ll(t)&&!nh(t)){if(j1(t))return t;else if(vb(t))return null;t=Vc(t)}return null}function K1(){if(O4==null)O4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return O4}function nh(e){return/^(html|body|#document)$/.test(Dd(e))}function ii(e){return yo(e).getComputedStyle(e)}function xb(e){if(ai(e))return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop};return{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vc(e){if(Dd(e)==="html")return e;let t=e.assignedSlot||e.parentNode||VU(e)&&e.host||sl(e);return VU(t)?t.host:t}function GU(e){let t=Vc(e);if(nh(t))return(e.ownerDocument||e).body;if(ll(t)&&yb(t))return t;return GU(t)}function F1(e,t,r){var a;if(t===void 0)t=[];if(r===void 0)r=!0;let i=GU(e),l=i===((a=e.ownerDocument)==null?void 0:a.body),c=yo(i);if(l){let u=q1(c);return t.concat(c,c.visualViewport||[],yb(i)?i:[],u&&r?F1(u):[])}else return t.concat(i,F1(i,[],r))}function q1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Noe,Ooe,Od=(e)=>!!e&&e!=="none",O4;var WU=N(()=>{Noe=/transform|translate|scale|rotate|perspective|filter/,Ooe=/paint|layout|strict|content/});function XU(e){let t=ii(e),r=parseFloat(t.width)||0,a=parseFloat(t.height)||0,i=ll(e),l=i?e.offsetWidth:r,c=i?e.offsetHeight:a,u=bb(r)!==l||bb(a)!==c;if(u)r=l,a=c;return{width:r,height:a,$:u}}function QU(e){return!ai(e)?e.contextElement:e}function rh(e){let t=QU(e);if(!ll(t))return ts(1);let r=t.getBoundingClientRect(),{width:a,height:i,$:l}=XU(t),c=(l?bb(r.width):r.width)/a,u=(l?bb(r.height):r.height)/i;if(!c||!Number.isFinite(c))c=1;if(!u||!Number.isFinite(u))u=1;return{x:c,y:u}}function ZU(e){let t=yo(e);if(!K1()||!t.visualViewport)return Doe;return{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Poe(e,t,r){if(t===void 0)t=!1;return!!r&&t&&r===yo(e)}function $b(e,t,r,a){if(t===void 0)t=!1;if(r===void 0)r=!1;let i=e.getBoundingClientRect(),l=QU(e),c=ts(1);if(t)if(a){if(ai(a))c=rh(a)}else c=rh(e);let u=Poe(l,r,a)?ZU(l):ts(0),f=(i.left+u.x)/c.x,h=(i.top+u.y)/c.y,m=i.width/c.x,b=i.height/c.y;if(l&&a){let y=yo(l),v=ai(a)?yo(a):a,S=y,w=q1(S);while(w&&v!==S){let E=rh(w),R=w.getBoundingClientRect(),D=ii(w),H=R.left+(w.clientLeft+parseFloat(D.paddingLeft))*E.x,z=R.top+(w.clientTop+parseFloat(D.paddingTop))*E.y;f*=E.x,h*=E.y,m*=E.x,b*=E.y,f+=H,h+=z,S=yo(w),w=q1(S)}}return oi({width:m,height:b,x:f,y:h})}function G1(e,t){let r=xb(e).scrollLeft;if(!t)return $b(sl(e)).left+r;return t.left+r}function eF(e,t){let r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-G1(e,r),i=r.top+t.scrollTop;return{x:a,y:i}}function Loe(e){let{elements:t,rect:r,offsetParent:a,strategy:i}=e,l=i==="fixed",c=sl(a),u=t?vb(t.floating):!1;if(a===c||u&&l)return r;let f={scrollLeft:0,scrollTop:0},h=ts(1),m=ts(0),b=ll(a);if(b||!l){if(Dd(a)!=="body"||yb(c))f=xb(a);if(b){let v=$b(a);h=rh(a),m.x=v.x+a.clientLeft,m.y=v.y+a.clientTop}}let y=c&&!b&&!l?eF(c,f):ts(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-f.scrollLeft*h.x+m.x+y.x,y:r.y*h.y-f.scrollTop*h.y+m.y+y.y}}function _oe(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ioe(e){let t=xb(e),r=e.ownerDocument.body,a=Go(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Go(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),l=-t.scrollLeft+G1(e),c=-t.scrollTop;if(ii(r).direction==="rtl")l+=Go(e.clientWidth,r.clientWidth)-a;return{width:a,height:i,x:l,y:c}}function zoe(e,t,r){if(r===void 0)r="viewport";let a=r==="layoutViewport",i=yo(e),l=sl(e),c=i.visualViewport,u=l.clientWidth,f=l.clientHeight,h=0,m=0;if(c){let y=!K1()||t==="fixed";if(a){if(!y)h=-c.offsetLeft,m=-c.offsetTop}else if(u=c.width,f=c.height,y)h=c.offsetLeft,m=c.offsetTop}if(G1(l)<=0){let y=l.ownerDocument,v=y.body,S=getComputedStyle(v),w=y.compatMode==="CSS1Compat"?parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0:0,E=Math.abs(l.clientWidth-v.clientWidth-w),R=getComputedStyle(l).scrollbarGutter==="stable both-edges"?E/2:E;if(R<=Boe)u-=R}return{width:u,height:f,x:h,y:m}}function Hoe(e,t){let r=$b(e,!0,t==="fixed"),a=r.top+e.clientTop,i=r.left+e.clientLeft,l=rh(e),c=e.clientWidth*l.x,u=e.clientHeight*l.y,f=i*l.x,h=a*l.y;return{width:c,height:u,x:f,y:h}}function YU(e,t,r){let a;if(t==="viewport"||t==="layoutViewport")a=zoe(e,r,t);else if(t==="document")a=Ioe(sl(e));else if(ai(t))a=Hoe(t,r);else{let i=ZU(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oi(a)}function Uoe(e,t){let r=t.get(e);if(r)return r;let a=F1(e,[],!1).filter((u)=>ai(u)&&Dd(u)!=="body"),i=null,l=ii(e).position==="fixed",c=l?Vc(e):e;while(ai(c)&&!nh(c)){let u=ii(c),f=j1(c),h=i?i.position:l?"fixed":"";if(!f&&(h==="fixed"||h==="absolute"&&u.position==="static"))a=a.filter((b)=>b!==c);else i=u;c=Vc(c)}return t.set(e,a),a}function Foe(e){let{element:t,boundary:r,rootBoundary:a,strategy:i}=e,c=[...r==="clippingAncestors"?vb(t)?[]:Uoe(t,this._c):[].concat(r),a],u=YU(t,c[0],i),f=u.top,h=u.right,m=u.bottom,b=u.left;for(let y=1;y<c.length;y++){let v=YU(t,c[y],i);f=Go(v.top,f),h=Ra(v.right,h),m=Ra(v.bottom,m),b=Go(v.left,b)}return{width:h-b,height:m-f,x:b,y:f}}function Voe(e){let{width:t,height:r}=XU(e);return{width:t,height:r}}function joe(e,t,r){let a=ll(t),i=sl(t),l=r==="fixed",c=$b(e,!0,l,t),u={scrollLeft:0,scrollTop:0},f=ts(0);if(a||!l){if(Dd(t)!=="body"||yb(i))u=xb(t);if(a){let y=$b(t,!0,l,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}}if(!a&&i)f.x=G1(i);let h=i&&!a&&!l?eF(i,u):ts(0),m=c.left+u.scrollLeft-f.x-h.x,b=c.top+u.scrollTop-f.y-h.y;return{x:m,y:b,width:c.width,height:c.height}}function D4(e){return ii(e).position==="static"}function JU(e,t){if(!ll(e)||ii(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;if(sl(e)===r)r=r.ownerDocument.body;return r}function tF(e,t){let r=yo(e);if(vb(e))return r;if(!ll(e)){let i=Vc(e);while(i&&!nh(i)){if(ai(i)&&!D4(i))return i;i=Vc(i)}return r}let a=JU(e,t);while(a&&KU(a)&&D4(a))a=JU(a,t);if(a&&nh(a)&&D4(a)&&!j1(a))return r;return a||qU(e)||r}function qoe(e){return ii(e).direction==="rtl"}var Doe,Boe=25,Koe=async function(e){let t=this.getOffsetParent||tF,r=this.getDimensions,a=await r(e.floating);return{reference:joe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}},Goe,W1,Y1,J1,X1,Q1,Z1,e$,t$,n$=(e,t,r)=>{let a=new Map,i=r!=null?r:{},l={...Goe,...i.platform,_c:a};return OU(e,t,{...i,platform:l})};var P4=N(()=>{FU();U1();WU();Doe=ts(0);Goe={convertOffsetParentRelativeRectToViewportRelativeRect:Loe,getDocumentElement:sl,getClippingRect:Foe,getOffsetParent:tF,getElementRects:Koe,getClientRects:_oe,getDimensions:Voe,getScale:rh,isElement:ai,isRTL:qoe},W1=zU,Y1=PU,J1=HU,X1=LU,Q1=UU,Z1=_U,e$=DU,t$=BU});function Woe(e){if(e.type.spec.tableRole!="table")throw RangeError("Not a table node: "+e.type.name);let t=Yoe(e),r=e.childCount,a=[],i=0,l=null,c=[];for(let h=0,m=t*r;h<m;h++)a[h]=0;for(let h=0,m=0;h<r;h++){let b=e.child(h);m++;for(let S=0;;S++){while(i<a.length&&a[i]!=0)i++;if(S==b.childCount)break;let w=b.child(S),{colspan:E,rowspan:R,colwidth:D}=w.attrs;for(let H=0;H<R;H++){if(H+h>=r){(l||(l=[])).push({type:"overlong_rowspan",pos:m,n:R-H});break}let z=i+H*t;for(let G=0;G<E;G++){if(a[z+G]==0)a[z+G]=m;else(l||(l=[])).push({type:"collision",row:h,pos:m,n:E-G});let ee=D&&D[G];if(ee){let U=(z+G)%t*2,P=c[U];if(P==null||P!=ee&&c[U+1]==1)c[U]=ee,c[U+1]=1;else if(P==ee)c[U+1]++}}}i+=E,m+=w.nodeSize}let y=(h+1)*t,v=0;while(i<y)if(a[i++]==0)v++;if(v)(l||(l=[])).push({type:"missing",row:h,n:v});m++}if(t===0||r===0)(l||(l=[])).push({type:"zero_sized"});let u=new cl(t,r,a,l),f=!1;for(let h=0;!f&&h<c.length;h+=2)if(c[h]!=null&&c[h+1]<r)f=!0;if(f)Joe(u,c,e);return u}function Yoe(e){let t=-1,r=!1;for(let a=0;a<e.childCount;a++){let i=e.child(a),l=0;if(r)for(let c=0;c<a;c++){let u=e.child(c);for(let f=0;f<u.childCount;f++){let h=u.child(f);if(c+h.attrs.rowspan>a)l+=h.attrs.colspan}}for(let c=0;c<i.childCount;c++){let u=i.child(c);if(l+=u.attrs.colspan,u.attrs.rowspan>1)r=!0}if(t==-1)t=l;else if(t!=l)t=Math.max(t,l)}return t}function Joe(e,t,r){if(!e.problems)e.problems=[];let a={};for(let i=0;i<e.map.length;i++){let l=e.map[i];if(a[l])continue;a[l]=!0;let c=r.nodeAt(l);if(!c)throw RangeError(`No cell with offset ${l} found`);let u=null,f=c.attrs;for(let h=0;h<f.colspan;h++){let m=t[(i+h)%e.width*2];if(m!=null&&(!f.colwidth||f.colwidth[h]!=m))(u||(u=Xoe(f)))[h]=m}if(u)e.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:u})}}function Xoe(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let r=0;r<e.colspan;r++)t.push(0);return t}function I4(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let r in e.nodes){let a=e.nodes[r],i=a.spec.tableRole;if(i)t[i]=a}}return t}function Qoe(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function aF(e){let t=e.selection.$head;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="row")return!0;return!1}function Zoe(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;else if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let r=Qoe(t.$head)||eae(t.$head);if(r)return r;throw RangeError(`No cell found around position ${t.head}`)}function eae(e){for(let{nodeAfter:t,pos:r}=e;t;t=t.firstChild,r++){let a=t.type.spec.tableRole;if(a=="cell"||a=="header_cell")return e.doc.resolve(r)}for(let{nodeBefore:t,pos:r}=e;t;t=t.lastChild,r--){let a=t.type.spec.tableRole;if(a=="cell"||a=="header_cell")return e.doc.resolve(r-t.nodeSize)}}function nF(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function iF(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function sF(e,t,r){let a=e.node(-1),i=cl.get(a),l=e.start(-1),c=i.nextCell(e.pos-l,t,r);return c==null?null:e.node(0).resolve(l+c)}function rF(e,t,r=1){let a={...e,colspan:e.colspan-r};if(a.colwidth){if(a.colwidth=a.colwidth.slice(),a.colwidth.splice(t,r),!a.colwidth.some((i)=>i>0))a.colwidth=null}return a}function lF(e){let t=e.selection,r=Zoe(e),a=r.node(-1),i=r.start(-1),l=cl.get(a);return{...t instanceof si?l.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):l.findCell(r.pos-i),tableStart:i,map:l,table:a}}function nae(e){return function(t,r){if(!aF(t))return!1;if(r){let a=I4(t.schema),i=lF(t),l=t.tr,c=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),u=c.map((f)=>i.table.nodeAt(f));for(let f=0;f<c.length;f++)if(u[f].type==a.header_cell)l.setNodeMarkup(i.tableStart+c[f],a.cell,u[f].attrs);if(l.steps.length===0)for(let f=0;f<c.length;f++)l.setNodeMarkup(i.tableStart+c[f],a.header_cell,u[f].attrs);r(l)}return!0}}function oF(e,t,r){let a=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<a.length;i++){let l=t.table.nodeAt(a[i]);if(l&&l.type!==r.header_cell)return!1}return!0}function B4(e,t){if(t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic)return nae(e);return function(r,a){if(!aF(r))return!1;if(a){let i=I4(r.schema),l=lF(r),c=r.tr,u=oF("row",l,i),f=oF("column",l,i),h=(e==="column"?u:e==="row"?f:!1)?1:0,m=e=="column"?{left:0,top:h,right:1,bottom:l.map.height}:e=="row"?{left:h,top:0,right:l.map.width,bottom:1}:l,b=e=="column"?f?i.cell:i.header_cell:e=="row"?u?i.cell:i.header_cell:i.cell;l.map.cellsInRect(m).forEach((y)=>{let v=y+l.tableStart,S=c.doc.nodeAt(v);if(S)c.setNodeMarkup(v,b,S.attrs)}),a(c)}return!0}}function r$(e,t){let r=e.selection;if(!(r instanceof si))return!1;if(t){let a=e.tr,i=I4(e.schema).cell.createAndFill().content;if(r.forEachCell((l,c)=>{if(!l.content.eq(i))a.replace(a.mapping.map(c+1),a.mapping.map(c+l.nodeSize-1),new Se(i,0,0))}),a.docChanged)t(a)}return!0}function i$(e,t,r){if(r.eq(e.selection))return!1;if(t)t(e.tr.setSelection(r).scrollIntoView());return!0}function o$(e,t){return(r,a,i)=>{if(!i)return!1;let l=r.selection;if(l instanceof si)return i$(r,a,Fe.near(l.$headCell,t));if(e!="horiz"&&!l.empty)return!1;let c=cF(i,e,t);if(c==null)return!1;if(e=="horiz")return i$(r,a,Fe.near(r.doc.resolve(l.head+t),t));else{let u=r.doc.resolve(c),f=sF(u,e,t),h;if(f)h=Fe.near(f,1);else if(t<0)h=Fe.near(r.doc.resolve(u.before(-1)),-1);else h=Fe.near(r.doc.resolve(u.after(-1)),1);return i$(r,a,h)}}}function a$(e,t){return(r,a,i)=>{if(!i)return!1;let l=r.selection,c;if(l instanceof si)c=l;else{let f=cF(i,e,t);if(f==null)return!1;c=new si(r.doc.resolve(f))}let u=sF(c.$headCell,e,t);if(!u)return!1;return i$(r,a,new si(c.$anchorCell,u))}}function cF(e,t,r){if(!(e.state.selection instanceof Me))return null;let{$head:a}=e.state.selection;for(let i=a.depth-1;i>=0;i--){let l=a.node(i);if((r<0?a.index(i):a.indexAfter(i))!=(r<0?0:l.childCount))return null;if(l.type.spec.tableRole=="cell"||l.type.spec.tableRole=="header_cell"){let c=a.before(i),u=t=="vert"?r>0?"down":"up":r>0?"right":"left";return e.endOfTextblock(u)?c:null}}return null}var L4,_4,cl=class{constructor(e,t,r,a){this.width=e,this.height=t,this.map=r,this.problems=a}findCell(e){for(let t=0;t<this.map.length;t++){let r=this.map[t];if(r!=e)continue;let a=t%this.width,i=t/this.width|0,l=a+1,c=i+1;for(let u=1;l<this.width&&this.map[t+u]==r;u++)l++;for(let u=1;c<this.height&&this.map[t+this.width*u]==r;u++)c++;return{left:a,top:i,right:l,bottom:c}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,r){let{left:a,right:i,top:l,bottom:c}=this.findCell(e);if(t=="horiz"){if(r<0?a==0:i==this.width)return null;return this.map[l*this.width+(r<0?a-1:i)]}else{if(r<0?l==0:c==this.height)return null;return this.map[a+this.width*(r<0?l-1:c)]}}rectBetween(e,t){let{left:r,right:a,top:i,bottom:l}=this.findCell(e),{left:c,right:u,top:f,bottom:h}=this.findCell(t);return{left:Math.min(r,c),top:Math.min(i,f),right:Math.max(a,u),bottom:Math.max(l,h)}}cellsInRect(e){let t=[],r={};for(let a=e.top;a<e.bottom;a++)for(let i=e.left;i<e.right;i++){let l=a*this.width+i,c=this.map[l];if(r[c])continue;if(r[c]=!0,i==e.left&&i&&this.map[l-1]==c||a==e.top&&a&&this.map[l-this.width]==c)continue;t.push(c)}return t}positionAt(e,t,r){for(let a=0,i=0;;a++){let l=i+r.child(a).nodeSize;if(a==e){let c=t+e*this.width,u=(e+1)*this.width;while(c<u&&this.map[c]<i)c++;return c==u?l-1:this.map[c]}i=l}}static get(e){return L4(e)||_4(e,Woe(e))}},u5e,si,tae=class e{constructor(t,r){this.anchor=t,this.head=r}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){let r=t.resolve(this.anchor),a=t.resolve(this.head);if(r.parent.type.spec.tableRole=="row"&&a.parent.type.spec.tableRole=="row"&&r.index()<r.parent.childCount&&a.index()<a.parent.childCount&&iF(r,a))return new si(r,a);else return Fe.near(a,1)}},d5e,f5e,p5e,h5e,m5e,g5e;var uF=N(()=>{Js();Ws();h1();if(typeof WeakMap<"u"){let e=new WeakMap;L4=(t)=>e.get(t),_4=(t,r)=>(e.set(t,r),r)}else{let e=[],t=10,r=0;L4=(a)=>{for(let i=0;i<e.length;i+=2)if(e[i]==a)return e[i+1]},_4=(a,i)=>{if(r==10)r=0;return e[r++]=a,e[r++]=i}}u5e=new Qe("selectingCells");si=class e extends Fe{constructor(t,r=t){let a=t.node(-1),i=cl.get(a),l=t.start(-1),c=i.rectBetween(t.pos-l,r.pos-l),u=t.node(0),f=i.cellsInRect(c).filter((m)=>m!=r.pos-l);f.unshift(r.pos-l);let h=f.map((m)=>{let b=a.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);let y=l+m+1;return new Wg(u.resolve(y),u.resolve(y+b.content.size))});super(h[0].$from,h[0].$to,h);this.$anchorCell=t,this.$headCell=r}map(t,r){let a=t.resolve(r.map(this.$anchorCell.pos)),i=t.resolve(r.map(this.$headCell.pos));if(nF(a)&&nF(i)&&iF(a,i)){let l=this.$anchorCell.node(-1)!=a.node(-1);if(l&&this.isRowSelection())return e.rowSelection(a,i);else if(l&&this.isColSelection())return e.colSelection(a,i);else return new e(a,i)}return Me.between(a,i)}content(){let t=this.$anchorCell.node(-1),r=cl.get(t),a=this.$anchorCell.start(-1),i=r.rectBetween(this.$anchorCell.pos-a,this.$headCell.pos-a),l={},c=[];for(let f=i.top;f<i.bottom;f++){let h=[];for(let m=f*r.width+i.left,b=i.left;b<i.right;b++,m++){let y=r.map[m];if(l[y])continue;l[y]=!0;let v=r.findCell(y),S=t.nodeAt(y);if(!S)throw RangeError(`No cell with offset ${y} found`);let w=i.left-v.left,E=v.right-i.right;if(w>0||E>0){let R=S.attrs;if(w>0)R=rF(R,0,w);if(E>0)R=rF(R,R.colspan-E,E);if(v.left<i.left){if(S=S.type.createAndFill(R),!S)throw RangeError(`Could not create cell with attrs ${JSON.stringify(R)}`)}else S=S.type.create(R,S.content)}if(v.top<i.top||v.bottom>i.bottom){let R={...S.attrs,rowspan:Math.min(v.bottom,i.bottom)-Math.max(v.top,i.top)};if(v.top<i.top)S=S.type.createAndFill(R);else S=S.type.create(R,S.content)}h.push(S)}c.push(t.child(f).copy(le.from(h)))}let u=this.isColSelection()&&this.isRowSelection()?t:c;return new Se(le.from(u),1,1)}replace(t,r=Se.empty){let a=t.steps.length,i=this.ranges;for(let c=0;c<i.length;c++){let{$from:u,$to:f}=i[c],h=t.mapping.slice(a);t.replace(h.map(u.pos),h.map(f.pos),c?Se.empty:r)}let l=Fe.findFrom(t.doc.resolve(t.mapping.slice(a).map(this.to)),-1);if(l)t.setSelection(l)}replaceWith(t,r){this.replace(t,new Se(le.from(r),0,0))}forEachCell(t){let r=this.$anchorCell.node(-1),a=cl.get(r),i=this.$anchorCell.start(-1),l=a.cellsInRect(a.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let c=0;c<l.length;c++)t(r.nodeAt(l[c]),i+l[c])}isColSelection(){let t=this.$anchorCell.index(-1),r=this.$headCell.index(-1);if(Math.min(t,r)>0)return!1;let a=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=r+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(a,i)==this.$headCell.node(-1).childCount}static colSelection(t,r=t){let a=t.node(-1),i=cl.get(a),l=t.start(-1),c=i.findCell(t.pos-l),u=i.findCell(r.pos-l),f=t.node(0);if(c.top<=u.top){if(c.top>0)t=f.resolve(l+i.map[c.left]);if(u.bottom<i.height)r=f.resolve(l+i.map[i.width*(i.height-1)+u.right-1])}else{if(u.top>0)r=f.resolve(l+i.map[u.left]);if(c.bottom<i.height)t=f.resolve(l+i.map[i.width*(i.height-1)+c.right-1])}return new e(t,r)}isRowSelection(){let t=this.$anchorCell.node(-1),r=cl.get(t),a=this.$anchorCell.start(-1),i=r.colCount(this.$anchorCell.pos-a),l=r.colCount(this.$headCell.pos-a);if(Math.min(i,l)>0)return!1;let c=i+this.$anchorCell.nodeAfter.attrs.colspan,u=l+this.$headCell.nodeAfter.attrs.colspan;return Math.max(c,u)==r.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,r=t){let a=t.node(-1),i=cl.get(a),l=t.start(-1),c=i.findCell(t.pos-l),u=i.findCell(r.pos-l),f=t.node(0);if(c.left<=u.left){if(c.left>0)t=f.resolve(l+i.map[c.top*i.width]);if(u.right<i.width)r=f.resolve(l+i.map[i.width*(u.top+1)-1])}else{if(u.left>0)r=f.resolve(l+i.map[u.top*i.width]);if(c.right<i.width)t=f.resolve(l+i.map[i.width*(c.top+1)-1])}return new e(t,r)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,r){return new e(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,a=r){return new e(t.resolve(r),t.resolve(a))}getBookmark(){return new tae(this.$anchorCell.pos,this.$headCell.pos)}};si.prototype.visible=!1;Fe.jsonID("cell",si);d5e=new Qe("fix-tables");f5e=B4("row",{useDeprecatedLogic:!0}),p5e=B4("column",{useDeprecatedLogic:!0}),h5e=B4("cell",{useDeprecatedLogic:!0});m5e=ib({ArrowLeft:o$("horiz",-1),ArrowRight:o$("horiz",1),ArrowUp:o$("vert",-1),ArrowDown:o$("vert",1),"Shift-ArrowLeft":a$("horiz",-1),"Shift-ArrowRight":a$("horiz",1),"Shift-ArrowUp":a$("vert",-1),"Shift-ArrowDown":a$("vert",1),Backspace:r$,"Mod-Backspace":r$,Delete:r$,"Mod-Delete":r$});g5e=new Qe("tableColumnResizing")});var dF=N(()=>{uF()});function rae(e,t){let r=Math.min(e.top,t.top),a=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),c=Math.max(e.right,t.right)-i,u=a-r;return new DOMRect(i,r,c,u)}var oae=class{constructor({editor:e,element:t,view:r,pluginKey:a="bubbleMenu",updateDelay:i=250,resizeDelay:l=60,shouldShow:c,appendTo:u,getReferencedVirtualElement:f,options:h}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:b,state:y,from:v,to:S})=>{let{doc:w,selection:E}=y,{empty:R}=E,D=!w.textBetween(v,S).length&&w1(y.selection),H=this.element.contains(document.activeElement);if(!(b.hasFocus()||H)||R||D||!this.editor.isEditable)return!1;return!0},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:b})=>{var y;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}if((b==null?void 0:b.relatedTarget)&&((y=this.element.parentNode)==null?void 0:y.contains(b.relatedTarget)))return;if((b==null?void 0:b.relatedTarget)===this.editor.view.dom)return;this.hide()},this.handleDebouncedUpdate=(b,y)=>{let v=!(y==null?void 0:y.selection.eq(b.state.selection)),S=!(y==null?void 0:y.doc.eq(b.state.doc));if(!v&&!S)return;if(this.updateDebounceTimer)clearTimeout(this.updateDebounceTimer);this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(b,v,S,y)},this.updateDelay)},this.updateHandler=(b,y,v,S)=>{let{composing:w}=b;if(w||!y&&!v)return;if(!this.getShouldShow(S)){this.hide();return}this.show(),this.updatePosition()},this.transactionHandler=({transaction:b})=>{let y=b.getMeta(this.pluginKey);if(y==="updatePosition")this.updatePosition();else if(y&&typeof y==="object"&&y.type==="updateOptions")this.updateOptions(y.options);else if(y==="hide")this.hide();else if(y==="show")this.updatePosition(),this.show()};var m;if(this.editor=e,this.element=t,this.view=r,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(m=h==null?void 0:h.scrollTarget)!=null?m:window,this.getReferencedVirtualElement=f,this.floatingUIOptions={...this.floatingUIOptions,...h},this.element.tabIndex=0,c)this.shouldShow=c;if(this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(r,r.state),this.getShouldShow())this.show(),this.updatePosition()}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(X1(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(J1(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(W1(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(e$(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(Q1(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(Y1(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(Z1(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(t$(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return e}get virtualElement(){var e,t,r;let{selection:a}=this.editor.state,i=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(i)return i;if(!((r=(t=this.view)==null?void 0:t.dom)==null?void 0:r.parentNode))return;let l=M1(this.view,a.from,a.to),c={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(a instanceof Pe){let u=this.view.nodeDOM(a.from),f=u.dataset.nodeViewWrapper?u:u.querySelector("[data-node-view-wrapper]");if(f)u=f;if(u)c={getBoundingClientRect:()=>u.getBoundingClientRect(),getClientRects:()=>[u.getBoundingClientRect()]}}if(a instanceof si){let{$anchorCell:u,$headCell:f}=a,h=u?u.pos:f.pos,m=f?f.pos:u.pos,b=this.view.nodeDOM(h),y=this.view.nodeDOM(m);if(!b||!y)return;let v=b===y?b.getBoundingClientRect():rae(b.getBoundingClientRect(),y.getBoundingClientRect());c={getBoundingClientRect:()=>v,getClientRects:()=>[v]}}return c}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;if(!e)return;n$(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:r,strategy:a,middlewareData:i})=>{var l,c;if(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)return;if(((l=i.hide)==null?void 0:l.referenceHidden)||((c=i.hide)==null?void 0:c.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=a,this.element.style.left=`${t}px`,this.element.style.top=`${r}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(e,t){let{state:r}=e,a=r.selection.from!==r.selection.to;if(this.updateDelay>0&&a){this.handleDebouncedUpdate(e,t);return}let i=!(t==null?void 0:t.selection.eq(e.state.selection)),l=!(t==null?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,i,l,t)}getShouldShow(e){var t;let{state:r}=this.view,{selection:a}=r,{ranges:i}=a,l=Math.min(...i.map((f)=>f.$from.pos)),c=Math.max(...i.map((f)=>f.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:r,oldState:e,from:l,to:c}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((e=t!=null?t:this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow)this.floatingUIOptions.onShow();this.isVisible=!0}hide(){if(!this.isVisible)return;if(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide)this.floatingUIOptions.onHide();this.isVisible=!1}updateOptions(e){var t;if(e.updateDelay!==void 0)this.updateDelay=e.updateDelay;if(e.resizeDelay!==void 0)this.resizeDelay=e.resizeDelay;if(e.appendTo!==void 0)this.appendTo=e.appendTo;if(e.getReferencedVirtualElement!==void 0)this.getReferencedVirtualElement=e.getReferencedVirtualElement;if(e.shouldShow!==void 0){if(e.shouldShow)this.shouldShow=e.shouldShow}if(e.options!==void 0){let r=(t=e.options.scrollTarget)!=null?t:window;if(r!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=r,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){if(this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy)this.floatingUIOptions.onDestroy()}},z4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Qe(e.pluginKey):e.pluginKey,view:(t)=>new oae({view:t,...e})}),T5e;var fF=N(()=>{Ye();P4();Ye();at();dF();T5e=$t.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){if(!this.options.element)return[];return[z4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]}})});var aae=class{constructor({editor:e,element:t,view:r,pluginKey:a="floatingMenu",updateDelay:i=250,resizeDelay:l=60,options:c,appendTo:u,shouldShow:f}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:m,state:b})=>{let{selection:y}=b,{$anchor:v,empty:S}=y,w=v.depth===1,E=v.parent.isTextblock&&!v.parent.type.spec.code&&!v.parent.textContent&&v.parent.childCount===0&&!this.getTextContent(v.parent);if(!m.hasFocus()||!S||!w||!E||!this.editor.isEditable)return!1;return!0},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(m,b,y,v)=>{let{composing:S}=m;if(S||!b&&!y)return;if(!this.getShouldShow(v)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:m})=>{var b;if(this.preventHide){this.preventHide=!1;return}if((m==null?void 0:m.relatedTarget)&&((b=this.element.parentNode)==null?void 0:b.contains(m.relatedTarget)))return;if((m==null?void 0:m.relatedTarget)===this.editor.view.dom)return;this.hide()},this.transactionHandler=({transaction:m})=>{let b=m.getMeta(this.pluginKey);if(b==="updatePosition")this.updatePosition();else if(b&&typeof b==="object"&&b.type==="updateOptions")this.updateOptions(b.options);else if(b==="hide")this.hide();else if(b==="show")this.updatePosition(),this.show()},this.resizeHandler=()=>{if(this.resizeDebounceTimer)clearTimeout(this.resizeDebounceTimer);this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)};var h;if(this.editor=e,this.element=t,this.view=r,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(h=c==null?void 0:c.scrollTarget)!=null?h:window,this.floatingUIOptions={...this.floatingUIOptions,...c},this.element.tabIndex=0,f)this.shouldShow=f;if(this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(r,r.state),this.getShouldShow())this.show(),this.updatePosition()}getTextContent(e){return m4(e,{textSerializers:R1(this.editor.schema)})}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(X1(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(J1(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(W1(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(e$(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(Q1(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(Y1(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(Z1(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(t$(typeof this.floatingUIOptions.inline!=="boolean"?this.floatingUIOptions.inline:void 0));return e}getShouldShow(e){var t;let{state:r}=this.view,{selection:a}=r,{ranges:i}=a,l=Math.min(...i.map((f)=>f.$from.pos)),c=Math.max(...i.map((f)=>f.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:r,oldState:e,from:l,to:c})}updateOptions(e){var t;if(e.updateDelay!==void 0)this.updateDelay=e.updateDelay;if(e.resizeDelay!==void 0)this.resizeDelay=e.resizeDelay;if(e.appendTo!==void 0)this.appendTo=e.appendTo;if(e.shouldShow!==void 0){if(e.shouldShow)this.shouldShow=e.shouldShow}if(e.options!==void 0){let r=(t=e.options.scrollTarget)!=null?t:window;if(r!==this.scrollTarget)this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=r,this.scrollTarget.addEventListener("scroll",this.resizeHandler);this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){var e,t;if(!((t=(e=this.view)==null?void 0:e.dom)==null?void 0:t.parentNode))return;let{selection:r}=this.editor.state,a=M1(this.view,r.from,r.to);n$({getBoundingClientRect:()=>a,getClientRects:()=>[a]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:l,y:c,strategy:u,middlewareData:f})=>{var h,m;if(((h=f.hide)==null?void 0:h.referenceHidden)||((m=f.hide)==null?void 0:m.escaped)){this.element.style.visibility="hidden";return}if(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=u,this.element.style.left=`${l}px`,this.element.style.top=`${c}px`,this.isVisible&&this.floatingUIOptions.onUpdate)this.floatingUIOptions.onUpdate()})}update(e,t){let r=!(t==null?void 0:t.selection.eq(e.state.selection)),a=!(t==null?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,r,a,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t=typeof this.appendTo==="function"?this.appendTo():this.appendTo;if((e=t!=null?t:this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow)this.floatingUIOptions.onShow();this.isVisible=!0}hide(){if(!this.isVisible)return;if(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide)this.floatingUIOptions.onHide();this.isVisible=!1}destroy(){if(this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy)this.floatingUIOptions.onDestroy()}},H4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Qe(e.pluginKey):e.pluginKey,view:(t)=>new aae({view:t,...e})}),D5e;var pF=N(()=>{Ye();P4();Ye();at();D5e=$t.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>{if(t)e.setMeta(this.options.pluginKey,"updatePosition");return!0}}},addProseMirrorPlugins(){if(!this.options.element)return[];return[H4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]}})});function gF(e,t){return e!=null?e:new Qe(t)}function F4(e,t){return/^on[A-Z]/.test(e)&&typeof t==="function"}function fae(e){if(e.startsWith("aria-")||e.startsWith("data-"))return e;return e}function pae(e){return e.startsWith("aria-")||e.startsWith("data-")||uae.has(e)}function yF(e){if(e.startsWith("--"))return e;return e.replace(/[A-Z]/g,(t)=>`-${t.toLowerCase()}`)}function hae(e){var t;let r=e.endsWith("Capture"),i=(r?e.slice(0,-7):e).slice(2);return{eventName:(t=dae[i])!=null?t:i.toLowerCase(),options:r?{capture:!0}:void 0}}function mae(e,t){let r=t.defaultPrevented,a=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>{return}},isDefaultPrevented:{value:()=>r},isPropagationStopped:{value:()=>a},preventDefault:{value:()=>{r=!0,t.preventDefault()}},stopPropagation:{value:()=>{a=!0,t.stopPropagation()}}}),i}function U4(e){return cae.has(e)}function hF(e,t,r){if(t==="tabIndex"){e.tabIndex=Number(r);return}e[t]=r}function gae(e,t){if(t==="tabIndex"){e.removeAttribute("tabindex");return}let r=e[t];if(typeof r==="boolean"){e[t]=!1;return}if(typeof r==="number"){e[t]=0;return}e[t]=""}function bae(e,t){if(typeof t!=="number"||t===0||e.startsWith("--")||sae.has(e))return String(t);return`${t}px`}function yae(e,t){if(bF.has(t))return;e.style.removeProperty(yF(t))}function vae(e,t,r){if(bF.has(t))return;e.style.setProperty(yF(t),bae(t,r))}function xae(e,t,r){new Set([...Object.keys(t),...Object.keys(r)]).forEach((i)=>{if(lae.has(i)||!pae(i)||F4(i,t[i])||F4(i,r[i]))return;let l=t[i],c=r[i];if(l===c)return;let u=fae(i);if(c==null||c===!1){if(U4(i))gae(e,i);e.removeAttribute(u);return}if(c===!0){if(U4(i))hF(e,i,!0);e.setAttribute(u,"");return}if(U4(i)){hF(e,i,c);return}e.setAttribute(u,String(c))})}function $ae(e,t,r){if(t===r)return;if(r){e.className=r;return}e.removeAttribute("class")}function Sae(e,t,r){let a=t!=null?t:{},i=r!=null?r:{};new Set([...Object.keys(a),...Object.keys(i)]).forEach((c)=>{let u=a[c],f=i[c];if(u===f)return;if(f==null){yae(e,c);return}vae(e,c,f)})}function Cae(e,t,r){t.forEach(({eventName:i,listener:l,options:c})=>{e.removeEventListener(i,l,c)});let a=[];return Object.entries(r).forEach(([i,l])=>{if(!F4(i,l))return;let{eventName:c,options:u}=hae(i),f=(h)=>{l(mae(e,h))};e.addEventListener(c,f,u),a.push({eventName:c,listener:f,options:u})}),a}function vF(e,t){let r=Pd.useRef({}),a=Pd.useRef([]);iae(()=>{let i=r.current;return $ae(e,i.className,t.className),Sae(e,i.style,t.style),xae(e,i,t),a.current=Cae(e,a.current,t),r.current=t,()=>{a.current.forEach(({eventName:l,listener:c,options:u})=>{e.removeEventListener(l,c,u)}),a.current=[]}},[e,t])}var Ma,mF,Pd,Na,$F,iae,bF,sae,lae,cae,uae,dae,xF,U5e;var SF=N(()=>{fF();I1();at();pF();I1();Ma=j(ae(),1),mF=j(Vr(),1),Pd=j(ae(),1),Na=j(ae(),1),$F=j(Vr(),1);iae=typeof window<"u"?Pd.useLayoutEffect:Pd.useEffect,bF=new Set(["left","opacity","position","top","visibility","width"]),sae=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),lae=new Set(["children","className","style"]),cae=new Set(["tabIndex"]),uae=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),dae={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};xF=Ma.default.forwardRef(({pluginKey:e,editor:t,updateDelay:r,resizeDelay:a,appendTo:i,shouldShow:l=null,getReferencedVirtualElement:c,options:u,children:f,...h},m)=>{let b=Ma.useRef(document.createElement("div")),y=Ma.useRef(gF(e,"bubbleMenu")).current;if(vF(b.current,h),typeof m==="function")m(b.current);else if(m)m.current=b.current;let{editor:v}=_1(),S=t||v,w={updateDelay:r,resizeDelay:a,appendTo:i,pluginKey:y,shouldShow:l,getReferencedVirtualElement:c,options:u},E=Ma.useRef(w);E.current=w;let[R,D]=Ma.useState(!1),H=Ma.useRef(!0);return Ma.useEffect(()=>{if(S==null?void 0:S.isDestroyed)return;if(!S){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let z=b.current;z.style.visibility="hidden",z.style.position="absolute";let G=z4({...E.current,editor:S,element:z});S.registerPlugin(G);let ee=E.current.pluginKey;return H.current=!0,D(!0),()=>{D(!1),S.unregisterPlugin(ee),window.requestAnimationFrame(()=>{if(z.parentNode)z.parentNode.removeChild(z)})}},[S]),Ma.useEffect(()=>{if(!R||!S||S.isDestroyed)return;if(H.current){H.current=!1;return}S.view.dispatch(S.state.tr.setMeta(y,{type:"updateOptions",options:E.current}))},[R,S,r,a,l,u,i,c,y]),mF.createPortal(f,b.current)}),U5e=Na.default.forwardRef(({pluginKey:e,editor:t,updateDelay:r,resizeDelay:a,appendTo:i,shouldShow:l=null,options:c,children:u,...f},h)=>{let m=Na.useRef(document.createElement("div")),b=Na.useRef(gF(e,"floatingMenu")).current;if(vF(m.current,f),typeof h==="function")h(m.current);else if(h)h.current=m.current;let{editor:y}=_1(),v=t||y,S={updateDelay:r,resizeDelay:a,appendTo:i,pluginKey:b,shouldShow:l,options:c},w=Na.useRef(S);w.current=S;let[E,R]=Na.useState(!1),D=Na.useRef(!0);return Na.useEffect(()=>{if(v==null?void 0:v.isDestroyed)return;if(!v){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}let H=m.current;H.style.visibility="hidden",H.style.position="absolute";let z=H4({...w.current,editor:v,element:H});v.registerPlugin(z);let G=w.current.pluginKey;return D.current=!0,R(!0),()=>{R(!1),v.unregisterPlugin(G),window.requestAnimationFrame(()=>{if(H.parentNode)H.parentNode.removeChild(H)})}},[v]),Na.useEffect(()=>{if(!E||!v||v.isDestroyed)return;if(D.current){D.current=!1;return}v.view.dispatch(v.state.tr.setMeta(b,{type:"updateOptions",options:w.current}))},[E,v,r,a,l,c,i,b]),$F.createPortal(u,m.current)})});var oh=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let{children:r,...a}=t!=null?t:{};if(e==="svg")throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,a,r]};var CF=()=>{};var V4=N(()=>{CF()});var wae=(e,t)=>{var r;let{state:a,view:i}=e,{selection:l}=a;if(!l.empty)return!1;let{$from:c}=l;if(c.parentOffset!==0)return!1;let u=c.depth-1;if(u<0)return!1;let f=c.node(u),h=c.index(u);if(h===0)return!1;if(f.type===t)return e.commands.lift(t.name);let m=f.child(h-1);if(m.type!==t||!((r=m.lastChild)==null?void 0:r.isTextblock))return!1;let b=c.before(),v=b-1-1,{tr:S}=a;return S.delete(b,c.after()).insert(v,c.parent.content),S.setSelection(Me.create(S.doc,v)),i.dispatch(S.scrollIntoView()),!0},Eae,wF;var EF=N(()=>{Ye();at();V4();Eae=/^\s*>\s$/,wF=en.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return oh("blockquote",{...xt(this.options.HTMLAttributes,e),children:oh("slot",{})})},parseMarkdown:(e,t)=>{var r;let a=(r=t.parseBlockChildren)!=null?r:t.parseChildren;return t.createNode("blockquote",void 0,a(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let r=">",a=[];return e.content.forEach((i,l)=>{var c,u;let m=((u=(c=t.renderChild)==null?void 0:c.call(t,i,l))!=null?u:t.renderChildren([i])).split(`
355
+ `).map((b)=>{if(b.trim()==="")return r;return`${r} ${b}`});a.push(m.join(`
356
+ `))}),a.join(`
357
+ ${r}
358
+ `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>wae(this.editor,this.type)}},addInputRules(){return[es({find:Eae,type:this.type})]}})});var Tae,Rae,kae,Aae,TF;var RF=N(()=>{Ye();V4();Tae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Rae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,kae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Aae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,TF=Xr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:(e)=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:(e)=>e.type.name===this.name},{style:"font-weight",getAttrs:(e)=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return oh("strong",{...xt(this.options.HTMLAttributes,e),children:oh("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bo({find:Tae,type:this.type}),bo({find:kae,type:this.type})]},addPasteRules(){return[Dr({find:Rae,type:this.type}),Dr({find:Aae,type:this.type})]}})});var Mae=(e)=>{let t=/`([^`]+)`(?!`)$/.exec(e);if(!t)return null;if(t.index>0&&e[t.index-1]==="`")return null;return{index:t.index,text:t[0],replaceWith:t[1]}},Nae=(e)=>{let t=/`([^`]+)`(?!`)/g,r=[],a;while((a=t.exec(e))!==null){if(a.index>0&&e[a.index-1]==="`")continue;r.push({index:a.index,text:a[0],replaceWith:a[1]})}return r},kF;var AF=N(()=>{Ye();kF=Xr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",xt(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>{if(!e.content)return"";return`\`${t.renderChildren(e.content)}\``},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bo({find:Mae,type:this.type})]},addPasteRules(){return[Dr({find:Nae,type:this.type})]}})});var j4=4,Oae,Dae,MF;var NF=N(()=>{Ye();at();Oae=/^```([a-z]+)?[\s\n]$/,Dae=/^~~~([a-z]+)?[\s\n]$/,MF=en.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:j4,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:(e)=>{var t;let{languageClassPrefix:r}=this.options;if(!r)return null;let l=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter((c)=>c.startsWith(r)).map((c)=>c.replace(r,""))[0];if(!l)return null;return l},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",xt(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var r,a;if(((r=e.raw)==null?void 0:r.startsWith("```"))===!1&&((a=e.raw)==null?void 0:a.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented")return[];return t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var r;let a="",i=((r=e.attrs)==null?void 0:r.language)||"";if(!e.content)a=`\`\`\`${i}
359
+
360
+ \`\`\``;else a=[`\`\`\`${i}`,t.renderChildren(e.content),"```"].join(`
361
+ `);return a},addCommands(){return{setCodeBlock:(e)=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:(e)=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,r=t.pos===1;if(!e||t.parent.type.name!==this.name)return!1;if(r||!t.parent.textContent.length)return this.editor.commands.clearNodes();return!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let r=(t=this.options.tabSize)!=null?t:j4,{state:a}=e,{selection:i}=a,{$from:l,empty:c}=i;if(l.parent.type!==this.type)return!1;let u=" ".repeat(r);if(c)return e.commands.insertContent(u);return e.commands.command(({tr:f})=>{let{from:h,to:m}=i,v=a.doc.textBetween(h,m,`
362
+ `,`
363
+ `).split(`
364
+ `).map((S)=>u+S).join(`
365
+ `);return f.replaceWith(h,m,a.schema.text(v)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let r=(t=this.options.tabSize)!=null?t:j4,{state:a}=e,{selection:i}=a,{$from:l,empty:c}=i;if(l.parent.type!==this.type)return!1;if(c)return e.commands.command(({tr:u})=>{var f;let{pos:h}=l,m=l.start(),b=l.end(),v=a.doc.textBetween(m,b,`
366
+ `,`
367
+ `).split(`
368
+ `),S=0,w=0,E=h-m;for(let ee=0;ee<v.length;ee+=1){if(w+v[ee].length>=E){S=ee;break}w+=v[ee].length+1}let D=((f=v[S].match(/^ */))==null?void 0:f[0])||"",H=Math.min(D.length,r);if(H===0)return!0;let z=m;for(let ee=0;ee<S;ee+=1)z+=v[ee].length+1;if(u.delete(z,z+H),h-z<=H)u.setSelection(Me.create(u.doc,z));return!0});return e.commands.command(({tr:u})=>{let{from:f,to:h}=i,y=a.doc.textBetween(f,h,`
369
+ `,`
370
+ `).split(`
371
+ `).map((v)=>{var S;let w=((S=v.match(/^ */))==null?void 0:S[0])||"",E=Math.min(w.length,r);return v.slice(E)}).join(`
372
+ `);return u.replaceWith(f,h,a.schema.text(y)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:r}=t,{$from:a,empty:i}=r;if(!i||a.parent.type!==this.type)return!1;let l=a.parentOffset===a.parent.nodeSize-2,c=a.parent.textContent.endsWith(`
373
+
374
+ `);if(!l||!c)return!1;return e.chain().command(({tr:u})=>(u.delete(a.pos-2,a.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:r}=t,{$from:a,empty:i}=r;if(!i||a.parent.type!==this.type)return!1;if(a.parentOffset!==0)return!1;let l=a.before();if(l>0)return!1;return e.commands.insertDefaultBlock({pos:l})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:r,doc:a}=t,{$from:i,empty:l}=r;if(!l||i.parent.type!==this.type)return!1;if(i.parentOffset!==i.parent.nodeSize-2)return!1;let u=i.after();if(u===void 0)return!1;if(a.nodeAt(u))return e.commands.command(({tr:h})=>(h.setSelection(Fe.near(a.resolve(u))),!0));return e.commands.exitCode()}}},addInputRules(){return[db({find:Oae,type:this.type,getAttributes:(e)=>({language:e[1]})}),db({find:Dae,type:this.type,getAttributes:(e)=>({language:e[1]})})]},addProseMirrorPlugins(){return[new qe({key:new Qe("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;let r=t.clipboardData.getData("text/plain"),a=t.clipboardData.getData("vscode-editor-data"),i=a?JSON.parse(a):void 0,l=i==null?void 0:i.mode;if(!r||!l)return!1;let{tr:c,schema:u}=e.state,f=u.text(r.replace(/\r\n?/g,`
375
+ `));if(c.replaceSelectionWith(this.type.create({language:l},f)),c.selection.$from.parent.type!==this.type)c.setSelection(Me.near(c.doc.resolve(Math.max(0,c.selection.from-2))));return c.setMeta("paste",!0),e.dispatch(c),!0}}})]}})});var OF;var DF=N(()=>{Ye();OF=en.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
376
+
377
+ `)}})});var PF;var LF=N(()=>{Ye();PF=en.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",xt(this.options.HTMLAttributes,e)]},renderText(){return`
378
+ `},renderMarkdown:()=>`
379
+ `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:r,editor:a})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:i,storedMarks:l}=r;if(i.$from.parent.type.spec.isolating)return!1;let{keepMarks:c}=this.options,{splittableMarks:u}=a.extensionManager,f=l||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:h,dispatch:m})=>{if(m&&f&&c){let b=f.filter((y)=>u.includes(y.type.name));h.ensureMarks(b)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})});var _F;var IF=N(()=>{Ye();_F=en.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map((e)=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,xt(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var r;let a=((r=e.attrs)==null?void 0:r.level)?parseInt(e.attrs.level,10):1,i="#".repeat(a);if(!e.content)return"";return`${i} ${t.renderChildren(e.content)}`},addCommands(){return{setHeading:(e)=>({commands:t})=>{if(!this.options.levels.includes(e.level))return!1;return t.setNode(this.name,e)},toggleHeading:(e)=>({commands:t})=>{if(!this.options.levels.includes(e.level))return!1;return t.toggleNode(this.name,"paragraph",e)}}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map((e)=>db({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}})});var BF;var zF=N(()=>{Ye();at();BF=en.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",xt(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!zH(t,t.schema.nodes[this.name]))return!1;let{selection:r}=t,{$to:a}=r,i=e();if(A1(r))i.insertContentAt(a.pos,{type:this.name});else i.insertContent({type:this.name});return i.command(({state:l,tr:c,dispatch:u})=>{if(u){let{$to:f}=c.selection,h=f.end();if(f.nodeAfter)if(f.nodeAfter.isTextblock)c.setSelection(Me.create(c.doc,f.pos+1));else if(f.nodeAfter.isBlock)c.setSelection(Pe.create(c.doc,f.pos));else c.setSelection(Me.create(c.doc,f.pos));else{let m=l.schema.nodes[this.options.nextNodeType]||f.parent.type.contentMatch.defaultType,b=m==null?void 0:m.create();if(b)c.insert(h,b),c.setSelection(Me.create(c.doc,h+1))}c.scrollIntoView()}return!0}).run()}}},addInputRules(){return[eU({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})});var Pae,Lae,_ae,Iae,HF;var UF=N(()=>{Ye();Pae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Lae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,_ae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Iae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,HF=Xr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:(e)=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:(e)=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",xt(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bo({find:Pae,type:this.type}),bo({find:_ae,type:this.type})]},addPasteRules(){return[Dr({find:Lae,type:this.type}),Dr({find:Iae,type:this.type})]}})});function Bae(e,t){if(!(e in t))t[e]=[];return t[e]}function Ld(e,t,r){if(t.numeric)t.asciinumeric=!0,t.alphanumeric=!0;if(t.ascii)t.asciinumeric=!0,t.alpha=!0;if(t.asciinumeric)t.alphanumeric=!0;if(t.alpha)t.alphanumeric=!0;if(t.alphanumeric)t.domain=!0;if(t.emoji)t.domain=!0;for(let a in t){let i=Bae(a,r);if(i.indexOf(e)<0)i.push(e)}}function zae(e,t){let r={};for(let a in t)if(t[a].indexOf(e)>=0)r[a]=!0;return r}function vo(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}function Fae(e=[]){let t={};vo.groups=t;let r=new vo;if(s$==null)s$=jF("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2");if(l$==null)l$=jF("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2");ge(r,"'",T$),ge(r,"{",Cb),ge(r,"}",wb),ge(r,"[",d$),ge(r,"]",f$),ge(r,"(",p$),ge(r,")",h$),ge(r,"<",m$),ge(r,">",g$),ge(r,"(",b$),ge(r,")",y$),ge(r,"「",v$),ge(r,"」",x$),ge(r,"『",$$),ge(r,"』",S$),ge(r,"<",C$),ge(r,">",w$),ge(r,"&",E$),ge(r,"*",R$),ge(r,"@",Kc),ge(r,"`",A$),ge(r,"^",M$),ge(r,":",_d),ge(r,",",nk),ge(r,"$",N$),ge(r,".",rs),ge(r,"=",O$),ge(r,"!",rk),ge(r,"-",Da),ge(r,"%",Eb),ge(r,"|",D$),ge(r,"+",P$),ge(r,"#",L$),ge(r,"?",Tb),ge(r,'"',ok),ge(r,"/",as),ge(r,";",ak),ge(r,"~",Rb),ge(r,"_",_$),ge(r,"\\",k$),ge(r,"・",YF);let a=En(r,dl,ek,{["numeric"]:!0});En(a,dl,a);let i=En(a,ul,GF,{["asciinumeric"]:!0}),l=En(a,Sb,WF,{["alphanumeric"]:!0}),c=En(r,ul,fl,{["ascii"]:!0});En(c,dl,i),En(c,ul,c),En(i,dl,i),En(i,ul,i);let u=En(r,Sb,J4,{["alpha"]:!0});En(u,ul),En(u,dl,l),En(u,Sb,u),En(l,dl,l),En(l,ul),En(l,Sb,l);let f=ge(r,G4,tk,{["whitespace"]:!0}),h=ge(r,VF,Z4,{["whitespace"]:!0}),m=En(r,q4,Z4,{["whitespace"]:!0});ge(r,W4,m),ge(h,G4,f),ge(h,W4,m),En(h,q4,m),ge(m,VF),ge(m,G4),En(m,q4,m),ge(m,W4,m);let b=En(r,K4,JF,{["emoji"]:!0});ge(b,"#"),En(b,K4,b),ge(b,Hae,b);let y=ge(b,Uae);ge(y,"#"),En(y,K4,b);let v=[[ul,c],[dl,i]],S=[[ul,null],[Sb,u],[dl,l]];for(let w=0;w<s$.length;w++)jc(r,s$[w],X4,fl,v);for(let w=0;w<l$.length;w++)jc(r,l$[w],Q4,J4,S);Ld(X4,{tld:!0,ascii:!0},t),Ld(Q4,{utld:!0,alpha:!0},t),jc(r,"file",u$,fl,v),jc(r,"mailto",u$,fl,v),jc(r,"http",ah,fl,v),jc(r,"https",ah,fl,v),jc(r,"ftp",ah,fl,v),jc(r,"ftps",ah,fl,v),Ld(u$,{scheme:!0,ascii:!0},t),Ld(ah,{slashscheme:!0,ascii:!0},t),e=e.sort((w,E)=>w[0]>E[0]?1:-1);for(let w=0;w<e.length;w++){let E=e[w][0],D=e[w][1]?{["scheme"]:!0}:{["slashscheme"]:!0};if(E.indexOf("-")>=0)D.domain=!0;else if(!ul.test(E))D.numeric=!0;else if(dl.test(E))D.asciinumeric=!0;else D.ascii=!0;FF(r,E,E,D)}return FF(r,"localhost",kb,{ascii:!0}),r.jd=new vo(I$),{start:r,tokens:Object.assign({groups:t},XF)}}function QF(e,t){let r=Vae(t.replace(/[A-Z]/g,(u)=>u.toLowerCase())),a=r.length,i=[],l=0,c=0;while(c<a){let u=e,f=null,h=0,m=null,b=-1,y=-1;while(c<a&&(f=u.go(r[c]))){if(u=f,u.accepts())b=0,y=0,m=u;else if(b>=0)b+=r[c].length,y++;h+=r[c].length,l+=r[c].length,c++}l-=b,c-=y,h-=b,i.push({t:m.t,v:t.slice(l-h,l),s:l-h,e:l})}return i}function Vae(e){let t=[],r=e.length,a=0;while(a<r){let i=e.charCodeAt(a),l,c=i<55296||i>56319||a+1===r||(l=e.charCodeAt(a+1))<56320||l>57343?e[a]:e.slice(a,a+2);t.push(c),a+=c.length}return t}function jc(e,t,r,a,i){let l,c=t.length;for(let u=0;u<c-1;u++){let f=t[u];if(e.j[f])l=e.j[f];else l=new vo(a),l.jr=i.slice(),e.j[f]=l;e=l}return l=new vo(r),l.jr=i.slice(),e.j[t[c-1]]=l,l}function jF(e){let t=[],r=[],a=0,i="0123456789";while(a<e.length){let l=0;while(i.indexOf(e[a+l])>=0)l++;if(l>0){t.push(r.join(""));for(let c=parseInt(e.substring(a,a+l),10);c>0;c--)r.pop();a+=l}else r.push(e[a]),a++}return t}function ik(e,t=null){let r=Object.assign({},Ab);if(e)r=Object.assign(r,e instanceof ik?e.o:e);let a=r.ignoreTags,i=[];for(let l=0;l<a.length;l++)i.push(a[l].toUpperCase());if(this.o=r,t)this.defaultRender=t;this.ignoreTags=i}function KF(e){return e}function ZF(e,t){this.t="token",this.v=e,this.tk=t}function B$(e,t){class r extends ZF{constructor(a,i){super(a,i);this.t=e}}for(let a in t)r.prototype[a]=t[a];return r.t=e,r}function qae({groups:e}){let t=e.domain.concat([E$,R$,Kc,k$,A$,M$,N$,O$,Da,ek,Eb,D$,P$,L$,as,I$,Rb,_$]),r=[T$,_d,nk,rs,rk,Eb,Tb,ok,ak,m$,g$,Cb,wb,f$,d$,p$,h$,b$,y$,v$,x$,$$,S$,C$,w$],a=[E$,T$,R$,k$,A$,M$,N$,O$,Da,Cb,wb,Eb,D$,P$,L$,Tb,as,I$,Rb,_$],i=Oa(),l=ge(i,Rb);yt(l,a,l),yt(l,e.domain,l);let c=Oa(),u=Oa(),f=Oa();yt(i,e.domain,c),yt(i,e.scheme,u),yt(i,e.slashscheme,f),yt(c,a,l),yt(c,e.domain,c);let h=ge(c,Kc);ge(l,Kc,h),ge(u,Kc,h),ge(f,Kc,h);let m=ge(l,rs);yt(m,a,l),yt(m,e.domain,l);let b=Oa();yt(h,e.domain,b),yt(b,e.domain,b);let y=ge(b,rs);yt(y,e.domain,b);let v=Oa(jae);yt(y,e.tld,v),yt(y,e.utld,v),ge(h,kb,v);let S=ge(b,Da);ge(S,Da,S),yt(S,e.domain,b),yt(v,e.domain,b),ge(v,rs,y),ge(v,Da,S);let w=ge(c,Da),E=ge(c,rs);ge(w,Da,w),yt(w,e.domain,c),yt(E,a,l),yt(E,e.domain,c);let R=Oa(c$);yt(E,e.tld,R),yt(E,e.utld,R),yt(R,e.domain,c),yt(R,a,l),ge(R,rs,E),ge(R,Da,w),ge(R,Kc,h);let D=ge(R,_d),H=Oa(c$);yt(D,e.numeric,H);let z=Oa(c$),G=Oa();yt(z,t,z),yt(z,r,G),yt(G,t,z),yt(G,r,G),ge(R,as,z),ge(H,as,z);let ee=ge(u,_d),U=ge(f,_d),P=ge(U,as),re=ge(P,as);yt(u,e.domain,c),ge(u,rs,E),ge(u,Da,w),yt(f,e.domain,c),ge(f,rs,E),ge(f,Da,w),yt(ee,e.domain,z),ge(ee,as,z),ge(ee,Tb,z),yt(re,e.domain,z),yt(re,t,z),ge(re,as,z);let J=[[Cb,wb],[d$,f$],[p$,h$],[m$,g$],[b$,y$],[v$,x$],[$$,S$],[C$,w$]];for(let ye=0;ye<J.length;ye++){let[ce,se]=J[ye],_=ge(z,ce);ge(G,ce,_);let W=Oa(c$);yt(_,t,W);let Y=Oa();yt(_,r,Y),ge(_,se,z),yt(W,t,W),yt(W,r,Y),yt(Y,t,W),yt(Y,r,Y),ge(W,se,z),ge(Y,se,z)}return ge(i,kb,R),ge(i,tk,Kae),{start:i,tokens:XF}}function Gae(e,t,r){let a=r.length,i=0,l=[],c=[];while(i<a){let u=e,f=null,h=null,m=0,b=null,y=-1;while(i<a&&!(f=u.go(r[i].t)))c.push(r[i++]);while(i<a&&(h=f||u.go(r[i].t))){if(f=null,u=h,u.accepts())y=0,b=u;else if(y>=0)y++;i++,m++}if(y<0){if(i-=m,i<a)c.push(r[i]),i++}else{if(c.length>0)l.push(Y4(qF,t,c)),c=[];i-=y,m-=y;let v=b.t,S=r.slice(i-m,i);l.push(Y4(v,t,S))}}if(c.length>0)l.push(Y4(qF,t,c));return l}function Y4(e,t,r){let a=r[0].s,i=r[r.length-1].e,l=t.slice(a,i);return new e(l,r)}function eV(){return vo.groups={},sn.scanner=null,sn.parser=null,sn.tokenQueue=[],sn.pluginQueue=[],sn.customSchemes=[],sn.initialized=!1,sn}function sk(e,t=!1){if(sn.initialized)Wae(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Yae}`);if(!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
380
+ 1. Must only contain digits, lowercase ASCII letters or "-"
381
+ 2. Cannot start or end with "-"
382
+ 3. "-" cannot repeat`);sn.customSchemes.push([e,t])}function Jae(){sn.scanner=Fae(sn.customSchemes);for(let e=0;e<sn.tokenQueue.length;e++)sn.tokenQueue[e][1]({scanner:sn.scanner});sn.parser=qae(sn.scanner.tokens);for(let e=0;e<sn.pluginQueue.length;e++)sn.pluginQueue[e][1]({scanner:sn.scanner,parser:sn.parser});return sn.initialized=!0,sn}function z$(e){if(!sn.initialized)Jae();return Gae(sn.parser.start,e,QF(sn.scanner.start,e))}function H$(e,t=null,r=null){if(t&&typeof t==="object"){if(r)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);r=t,t=null}let a=new ik(r),i=z$(e),l=[];for(let c=0;c<i.length;c++){let u=i[c];if(u.isLink&&(!t||u.t===t)&&a.check(u))l.push(u.toFormattedObject(a))}return l}var yt=(e,t,r,a,i)=>e.ta(t,r,a,i),En=(e,t,r,a,i)=>e.tr(t,r,a,i),FF=(e,t,r,a,i)=>e.ts(t,r,a,i),ge=(e,t,r,a,i)=>e.tt(t,r,a,i),fl="WORD",J4="UWORD",GF="ASCIINUMERICAL",WF="ALPHANUMERICAL",kb="LOCALHOST",X4="TLD",Q4="UTLD",u$="SCHEME",ah="SLASH_SCHEME",ek="NUM",Z4="WS",tk="NL",Cb="OPENBRACE",wb="CLOSEBRACE",d$="OPENBRACKET",f$="CLOSEBRACKET",p$="OPENPAREN",h$="CLOSEPAREN",m$="OPENANGLEBRACKET",g$="CLOSEANGLEBRACKET",b$="FULLWIDTHLEFTPAREN",y$="FULLWIDTHRIGHTPAREN",v$="LEFTCORNERBRACKET",x$="RIGHTCORNERBRACKET",$$="LEFTWHITECORNERBRACKET",S$="RIGHTWHITECORNERBRACKET",C$="FULLWIDTHLESSTHAN",w$="FULLWIDTHGREATERTHAN",E$="AMPERSAND",T$="APOSTROPHE",R$="ASTERISK",Kc="AT",k$="BACKSLASH",A$="BACKTICK",M$="CARET",_d="COLON",nk="COMMA",N$="DOLLAR",rs="DOT",O$="EQUALS",rk="EXCLAMATION",Da="HYPHEN",Eb="PERCENT",D$="PIPE",P$="PLUS",L$="POUND",Tb="QUERY",ok="QUOTE",YF="FULLWIDTHMIDDLEDOT",ak="SEMI",as="SLASH",Rb="TILDE",_$="UNDERSCORE",JF="EMOJI",I$="SYM",XF,ul,Sb,K4,dl,q4,VF="\r",G4=`
383
+ `,Hae="️",Uae="‍",W4="",s$=null,l$=null,Ab,jae,qF,Kae,c$,Oa=(e)=>new vo(e),Wae,Yae="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",sn;var U$=N(()=>{vo.groups={};vo.prototype={accepts(){return!!this.t},go(e){let t=this,r=t.j[e];if(r)return r;for(let a=0;a<t.jr.length;a++){let i=t.jr[a][0],l=t.jr[a][1];if(l&&i.test(e))return l}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,r,a){for(let i=0;i<e.length;i++)this.tt(e[i],t,r,a)},tr(e,t,r,a){a=a||vo.groups;let i;if(t&&t.j)i=t;else if(i=new vo(t),r&&a)Ld(t,r,a);return this.jr.push([e,i]),i},ts(e,t,r,a){let i=this,l=e.length;if(!l)return i;for(let c=0;c<l-1;c++)i=i.tt(e[c]);return i.tt(e[l-1],t,r,a)},tt(e,t,r,a){a=a||vo.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let l=t,c,u=i.go(e);if(u)c=new vo,Object.assign(c.j,u.j),c.jr.push.apply(c.jr,u.jr),c.jd=u.jd,c.t=u.t;else c=new vo;if(l){if(a){if(c.t&&typeof c.t==="string"){let f=Object.assign(zae(c.t,a),r);Ld(l,f,a)}else if(r)Ld(l,r,a)}c.t=l}return i.j[e]=c,c}};XF=Object.freeze({__proto__:null,ALPHANUMERICAL:WF,AMPERSAND:E$,APOSTROPHE:T$,ASCIINUMERICAL:GF,ASTERISK:R$,AT:Kc,BACKSLASH:k$,BACKTICK:A$,CARET:M$,CLOSEANGLEBRACKET:g$,CLOSEBRACE:wb,CLOSEBRACKET:f$,CLOSEPAREN:h$,COLON:_d,COMMA:nk,DOLLAR:N$,DOT:rs,EMOJI:JF,EQUALS:O$,EXCLAMATION:rk,FULLWIDTHGREATERTHAN:w$,FULLWIDTHLEFTPAREN:b$,FULLWIDTHLESSTHAN:C$,FULLWIDTHMIDDLEDOT:YF,FULLWIDTHRIGHTPAREN:y$,HYPHEN:Da,LEFTCORNERBRACKET:v$,LEFTWHITECORNERBRACKET:$$,LOCALHOST:kb,NL:tk,NUM:ek,OPENANGLEBRACKET:m$,OPENBRACE:Cb,OPENBRACKET:d$,OPENPAREN:p$,PERCENT:Eb,PIPE:D$,PLUS:P$,POUND:L$,QUERY:Tb,QUOTE:ok,RIGHTCORNERBRACKET:x$,RIGHTWHITECORNERBRACKET:S$,SCHEME:u$,SEMI:ak,SLASH:as,SLASH_SCHEME:ah,SYM:I$,TILDE:Rb,TLD:X4,UNDERSCORE:_$,UTLD:Q4,UWORD:J4,WORD:fl,WS:Z4}),ul=/[a-z]/,Sb=/\p{L}/u,K4=/\p{Emoji}/u,dl=/\d/,q4=/\s/;Ab={defaultProtocol:"http",events:null,format:KF,formatHref:KF,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};ik.prototype={o:Ab,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,r){let a=t!=null,i=this.o[e];if(!i)return i;if(typeof i==="object"){if(i=r.t in i?i[r.t]:Ab[e],typeof i==="function"&&a)i=i(t,r)}else if(typeof i==="function"&&a)i=i(t,r.t,r);return i},getObj(e,t,r){let a=this.o[e];if(typeof a==="function"&&t!=null)a=a(t,r.t,r);return a},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};ZF.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),r=e.get("truncate",t,this),a=e.get("format",t,this);return r&&a.length>r?a.substring(0,r)+"…":a},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Ab.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,r=this.toHref(e.get("defaultProtocol")),a=e.get("formatHref",r,this),i=e.get("tagName",r,t),l=this.toFormattedString(e),c={},u=e.get("className",r,t),f=e.get("target",r,t),h=e.get("rel",r,t),m=e.getObj("attributes",r,t),b=e.getObj("events",r,t);if(c.href=a,u)c.class=u;if(f)c.target=f;if(h)c.rel=h;if(m)Object.assign(c,m);return{tagName:i,attributes:c,content:l,eventListeners:b}}};jae=B$("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),qF=B$("text"),Kae=B$("nl"),c$=B$("url",{isLink:!0,toHref(e=Ab.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==kb&&e[1].t===_d}});Wae=typeof console<"u"&&console&&console.warn||(()=>{}),sn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};z$.scan=QF});function eie(e){if(e.length===1)return e[0].isLink;if(e.length===3&&e[1].isLink)return["()","[]"].includes(e[0].value+e[2].value);return!1}function tie(e){return new qe({key:new Qe("autolink"),appendTransaction:(t,r,a)=>{let i=t.some((h)=>h.docChanged)&&!r.doc.eq(a.doc),l=t.some((h)=>h.getMeta("preventAutolink"));if(!i||l)return;let{tr:c}=a,u=f4(r.doc,[...t]);if(cb(u).forEach(({newRange:h})=>{let m=AH(a.doc,h,(v)=>v.isTextblock),b,y;if(m.length>1)b=m[0],y=a.doc.textBetween(b.pos,b.pos+b.node.nodeSize,void 0," ");else if(m.length){let v=a.doc.textBetween(h.from,h.to," "," ");if(!Qae.test(v))return;b=m[0],y=a.doc.textBetween(b.pos,h.to,void 0," ")}if(b&&y){let v=y.split(Xae).filter(Boolean);if(v.length<=0)return!1;let S=v[v.length-1],w=b.pos+y.lastIndexOf(S);if(!S)return!1;let E=z$(S).map((R)=>R.toObject(e.defaultProtocol));if(!eie(E))return!1;E.filter((R)=>R.isLink).map((R)=>({...R,from:w+R.start+1,to:w+R.end+1})).filter((R)=>{if(!a.schema.marks.code)return!0;return!a.doc.rangeHasMark(R.from,R.to,a.schema.marks.code)}).filter((R)=>e.validate(R.value)).filter((R)=>e.shouldAutoLink(R.value)).forEach((R)=>{if(k1(R.from,R.to,a.doc).some((D)=>D.mark.type===e.type))return;c.addMark(R.from,R.to,e.type.create({href:R.href}))})}}),!c.steps.length)return;return c}})}function nie(e){return new qe({key:new Qe("handleClickLink"),props:{handleClick:(t,r,a)=>{var i,l;if(a.button!==0)return!1;if(!t.editable)return!1;let c=null;if(a.target instanceof HTMLAnchorElement)c=a.target;else{let f=a.target;if(!f)return!1;let h=e.editor.view.dom;if(c=f.closest("a"),c&&!h.contains(c))c=null}if(!c)return!1;let u=!1;if(e.enableClickSelection)u=e.editor.commands.extendMarkRange(e.type.name);if(e.openOnClick){let f=g4(t.state,e.type.name),h=(i=c.href)!=null?i:f.href,m=(l=c.target)!=null?l:f.target;if(h)window.open(h,m),u=!0}return u}}})}function tV(e,t){let r=0;for(let a=t-1;a>=0&&e[a]==="\\";a-=1)r+=1;return r%2===1}function aie(e,t){let r=0,a=0;while(a<t){if(e[a]!=="`"){a+=1;continue}if(r===0&&tV(e,a)){a+=1;continue}let i=0;while(a<t&&e[a]==="`")i+=1,a+=1;if(r===0)r=i;else if(i===r)r=0}return r>0}function nV(e,t,r){var a,i;let[,l,c]=t;if((t.index?e[t.index-1]:void 0)==="!"||tV(e,(a=t.index)!=null?a:0))return!1;if(aie(e,(i=t.index)!=null?i:0))return!1;return!!l.trim()&&r(c)}function rV(e){var t,r;let[a,i,l,,c,u,f]=e,h=(t=c!=null?c:u)!=null?t:f;return{index:(r=e.index)!=null?r:0,text:a,replaceWith:i,data:{href:l,title:h||null,markdown:!0}}}function iie(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function oV(e){var t,r,a;return{href:(t=e.data)==null?void 0:t.href,title:(a=(r=e.data)==null?void 0:r.title)!=null?a:null}}function sie(e){let t=bo({find:(r)=>{let a=rie.exec(r);if(!a||!nV(r,a,e.isAllowedHref))return null;return rV(a)},type:e.type,getAttributes:oV});return new th({find:t.find,handler:(r)=>{let a=t.handler(r);if(a!==null&&r.state.tr.steps.length)r.state.tr.setMeta("preventAutolink",!0);return a}})}function lie(e){let t=Dr({find:(r)=>{var a,i;let l=[];for(let u of r.matchAll(oie))if(nV(r,u,e.isAllowedHref))l.push(rV(u));let c=((i=(a=e.findPlainUrls)==null?void 0:a.call(e,r))!=null?i:[]).filter((u)=>!l.some((f)=>iie(f,u)));return[...l,...c]},type:e.type,getAttributes:oV});return new x4({find:t.find,handler:(r)=>{var a;let i=t.handler(r);if(i!==null&&r.state.tr.steps.length&&((a=r.match.data)==null?void 0:a.markdown))r.state.tr.setMeta("preventAutolink",!0);return i}})}function cie(e){return new qe({key:new Qe("handlePasteLink"),props:{handlePaste:(t,r,a)=>{let{shouldAutoLink:i}=e,{state:l}=t,{selection:c}=l,{empty:u}=c;if(u)return!1;let f="";a.content.forEach((m)=>{f+=m.textContent});let h=H$(f,{defaultProtocol:e.defaultProtocol}).find((m)=>m.isLink&&m.value===f);if(!f||!h||i!==void 0&&!i(h.value))return!1;return e.editor.commands.setMark(e.type,{href:h.href})}}})}function pl(e,t){let r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];if(t)t.forEach((a)=>{let i=typeof a==="string"?a:a.scheme;if(i)r.push(i)});return!e||e.replace(Zae,"").match(new RegExp(`^(?:(?:${r.map((a)=>a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var lk="[\x00-   ᠎ -\u2029  ]",Xae,Qae,Zae,rie,oie,aV;var iV=N(()=>{Ye();U$();Ye();at();U$();Ye();at();Ye();at();U$();Xae=new RegExp(lk),Qae=new RegExp(`${lk}$`),Zae=new RegExp(lk,"g");rie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,oie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;aV=Xr.create({name:"link",priority:1000,keepOnSplit:!1,exitable:!0,onCreate(){if(this.options.validate&&!this.options.shouldAutoLink)this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.");this.options.protocols.forEach((e)=>{if(typeof e==="string"){sk(e);return}sk(e.scheme,e.optionalSlashes)})},onDestroy(){eV()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!pl(e,t.protocols),validate:(e)=>!!e,shouldAutoLink:(e)=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),r=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||r&&!e.includes("@"))return!0;let i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];if(/^\d{1,3}(\.\d{1,3}){3}$/.test(i))return!1;if(!/\./.test(i))return!1;return!0}}},addAttributes(){var e,t,r;return{href:{default:null,parseHTML(a){return a.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!=null?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!=null?t:null},class:{default:(r=this.options.HTMLAttributes.class)!=null?r:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:(e)=>{let t=e.getAttribute("href");if(!t||!this.options.isAllowedUri(t,{defaultValidate:(r)=>!!pl(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return null}}]},renderHTML({HTMLAttributes:e}){if(!this.options.isAllowedUri(e.href,{defaultValidate:(t)=>!!pl(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return["a",xt(this.options.HTMLAttributes,{...e,href:""}),0];return["a",xt(this.options.HTMLAttributes,e),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var r,a,i,l;let c=(a=(r=e.attrs)==null?void 0:r.href)!=null?a:"",u=(l=(i=e.attrs)==null?void 0:i.title)!=null?l:"",f=t.renderChildren(e);return u?`[${f}](${c} "${u}")`:`[${f}](${c})`},addCommands(){return{setLink:(e)=>({chain:t})=>{let{href:r}=e;if(!this.options.isAllowedUri(r,{defaultValidate:(a)=>!!pl(a,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:(e)=>({chain:t})=>{let{href:r}=e||{};if(r&&!this.options.isAllowedUri(r,{defaultValidate:(a)=>!!pl(a,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))return!1;return t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){if(!this.options.markdownLinks)return[];return[sie({type:this.type,isAllowedHref:(e)=>this.options.isAllowedUri(e,{defaultValidate:(t)=>!!pl(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]},addPasteRules(){let e=(t)=>{let r=[];if(t){let{protocols:a,defaultProtocol:i}=this.options;H$(t).filter((c)=>c.isLink&&this.options.isAllowedUri(c.value,{defaultValidate:(u)=>!!pl(u,a),protocols:a,defaultProtocol:i})).forEach((c)=>{if(!this.options.shouldAutoLink(c.value))return;r.push({text:c.value,data:{href:c.href},index:c.start})})}return r};if(this.options.markdownLinks)return[lie({type:this.type,isAllowedHref:(t)=>this.options.isAllowedUri(t,{defaultValidate:(r)=>!!pl(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})];return[Dr({find:e,type:this.type,getAttributes:(t)=>{var r;return{href:(r=t.data)==null?void 0:r.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:r}=this.options;if(this.options.autolink)e.push(tie({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:(a)=>this.options.isAllowedUri(a,{defaultValidate:(i)=>!!pl(i,t),protocols:t,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink}));if(e.push(nie({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste)e.push(cie({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink}));return e}})});function j$(e){let t=e,r="";for(let[a,i]of pV)while(t>=a)r+=i,t-=a;return r}function pk(e){return j$(e).toUpperCase()}function mV(e){let t=e.toLowerCase(),r=0,a=0;while(r<t.length){let i=!1;for(let[l,c]of pV)if(t.startsWith(c,r)){a+=l,r+=c.length,i=!0;break}if(!i)return 0}return a}function bie(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=mV(e);if(t<=0)return!1;return(e===e.toLowerCase()?j$(t):pk(t))===e}function yie(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let r=t.charCodeAt(0)-97,a=t.charCodeAt(1)-97;return(r+1)*26+a+1}return 0}function V$(e){if(e<=26)return F$[e-1];let t=Math.floor((e-1)/26)-1,r=(e-1)%26;if(t<0)return F$[r];return F$[t]+F$[r]}function K$(e){if(!e||/^\d+$/.test(e))return;if(bie(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A";return}function hk(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=K$(e);if(t==="i"||t==="I")return mV(e);if(t==="a"||t==="A"){let a=yie(e);return a>0?a:1}let r=parseInt(e,10);return Number.isNaN(r)?1:r}function vie(e,t){if(e==="numeric")return String(t);switch(e){case"a":return V$(t);case"A":return V$(t).toUpperCase();case"i":return j$(t);case"I":return pk(t);default:return String(t)}}function xie(e){var t;if(e.length===0)return!1;let r=(t=K$(e[0]))!=null?t:"numeric",a=hk(e[0]);if(a<1)return!1;for(let i=0;i<e.length;i++){let l=vie(r,a+i);if(e[i]!==l)return!1}return!0}function $ie(e){return{type:K$(e),start:hk(e)}}function Sie(e){let{type:t,start:r}=$ie(e),a={};if(t)a.type=t;if(r!==1)a.start=r;return a}function Cie(e,t,r=". "){let a=t+1;if(!e||e==="1")return`${a}${r}`;switch(e){case"a":return`${V$(a)}${r}`;case"A":return`${V$(a).toUpperCase()}${r}`;case"i":return`${j$(a)}${r}`;case"I":return`${pk(a)}${r}`;default:return`${a}${r}`}}function wie(e){var t,r;let a=(t=e.tokens)==null?void 0:t[0];return Boolean(e.text&&((r=e.tokens)==null?void 0:r.length)===1&&(a==null?void 0:a.type)==="list"&&a.ordered&&a.raw===e.text)}function Eie(e,t){if(t.tokenizeInline)return t.parseInline(t.tokenizeInline(e));return t.parseInline([{type:"text",raw:e,text:e}])}function Nie(e){return dk.test(e.trimStart())}function Oie(e){let t=e.trimStart();return Mb.bulletItem.test(t)||Nie(t)||Mb.heading.test(t)||Mb.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||Mb.codeFence.test(t)}function Die(e){return Object.values(Mb).some((t)=>t.test(e))}function Pie(e){let t=[],r=[],a=!1;return e.forEach((i)=>{if(a){r.push(i);return}if(i.trim()===""){a=!0,r.push(i);return}if(t.length>0&&Oie(i)){a=!0,r.push(i);return}t.push(i)}),{paragraphLines:t,blockLines:r}}function Lie(e){let t=[],r=0,a=0;while(r<e.length){let i=e[r],l=i.match(dk);if(!l)break;let[,c,u,f,h]=l,m=c.length,b=parseInt(u,10),y=isNaN(b)?K$(u):void 0,v=isNaN(b)?hk(u):b,S=[h],w=r+1,E=[i],R=!1;while(w<e.length){let D=e[w];if(D.match(dk))break;if(D.trim()==="")E.push(D),S.push(""),R=!0,w+=1;else if(D.match(Mie)){let z=D.length-D.trimStart().length,G=m+u.length+1;E.push(D),S.push(D.slice(Math.min(z,G))),w+=1}else{if(R||Die(D))break;E.push(D),S.push(D),w+=1}}t.push({indent:m,number:v,type:y,content:S.join(`
384
+ `).trim(),contentLines:S,raw:E.join(`
385
+ `)}),a=w,r=w}return[t,a]}function Iie(e){let t=e.split(`
386
+ `).filter((l)=>l.trim().length>0);if(t.length===0)return null;let r=[];for(let l of t){let c=l.trim().match(_ie);if(!c)return null;r.push({marker:c[1],content:c[3]})}let a=r.map((l)=>l.marker);if(!xie(a))return null;return{type:"orderedList",attrs:Sie(r[0].marker),content:r.map((l)=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:l.content}]}]}))}}function vV(e,t,r){let a=[],i=0;while(i<e.length){let l=e[i];if(l.indent===t){let{paragraphLines:c,blockLines:u}=Pie(l.contentLines),f=c.join(`
387
+ `).trim(),h=[];if(f)h.push({type:"paragraph",raw:f,tokens:r.inlineTokens(f)});let m=u.join(`
388
+ `).trim();if(m){let v=r.blockTokens(m);h.push(...v)}let b=i+1,y=[];while(b<e.length&&e[b].indent>t)y.push(e[b]),b+=1;if(y.length>0){let v=Math.min(...y.map((w)=>w.indent)),S=vV(y,v,r);h.push({type:"list",ordered:!0,start:y[0].number,typeMarker:y[0].type,items:S,raw:y.map((w)=>w.raw).join(`
389
+ `)})}a.push({type:"list_item",raw:l.raw,tokens:h}),i=b}else i+=1}return a}function Bie(e,t){return e.map((r)=>{if(r.type!=="list_item")return t.parseChildren([r])[0];let a=[];if(r.tokens&&r.tokens.length>0)r.tokens.forEach((i)=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")a.push(...t.parseChildren([i]));else if(i.type==="text"&&i.tokens){let l=t.parseChildren([i]);a.push({type:"paragraph",content:l})}else{let l=t.parseChildren([i]);if(l.length>0)a.push(...l)}});return{type:"listItem",content:a}})}function dV(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var uie,die=(e,t)=>{for(var r in t)uie(e,r,{get:t[r],enumerable:!0})},fie="listItem",sV="textStyle",lV,fk,pie=(e,t,r)=>{let{selection:a}=e;if(!a.empty)return null;let{$from:i}=a;if(!i.parent.isTextblock)return null;if(i.parentOffset!==i.parent.content.size)return null;let l=-1;for(let v=i.depth;v>0;v-=1)if(i.node(v).type.name===t){l=v;break}if(l<0)return null;let c=i.node(l),u=i.index(l);if(u+1>=c.childCount)return null;let f=c.child(u+1);if(!r.includes(f.type.name))return null;let h=e.schema.nodes[t],m=!1;if(f.forEach((v)=>{if(v.type===h&&v.childCount>1)m=!0}),!m)return null;let b=e.doc.resolve(i.after()).nodeAfter;if(!b||!r.includes(b.type.name))return null;let y=[];if(b.forEach((v)=>{y.push(v)}),y.length===0)return null;return{listItemDepth:l,nestedList:b,nestedListPos:i.after(),insertPos:i.after(l),items:y}},hie=(e,t,r,a)=>{let i=pie(e,r,a);if(!i)return!1;let{selection:l}=e,{nestedList:c,nestedListPos:u,insertPos:f,items:h}=i,m=e.tr;m.delete(u,u+c.nodeSize);let b=m.mapping.map(f);if(m.insert(b,le.from(h)),m.setSelection(l.map(m.doc,m.mapping)),t)t(m);return!0},mie=(e,t,r)=>hie(e.state,e.view.dispatch,t,r),fV=(e,t)=>$t.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let r=()=>mie(this.editor,e,t);return{Delete:r,"Mod-Delete":r}}}),pV,F$="abcdefghijklmnopqrstuvwxyz",gie="[a-zA-Z]{1,2}",hV,mk,Tie,q$=(e,t)=>{let{$from:r}=t.selection,a=wn(e,t.schema),i=null,l=r.depth,c=r.pos,u=null;while(l>0&&u===null)if(i=r.node(l),i.type===a)u=l;else l-=1,c-=1;if(u===null)return null;return{$pos:t.doc.resolve(c),depth:u}},gk=(e,t)=>{let r=q$(e,t);if(!r)return!1;let[,a]=PH(t,e,r.$pos.pos+4);return a},gV=(e,t,r)=>{let{$anchor:a}=e.selection,i=Math.max(0,a.pos-2),l=e.doc.resolve(i).node();if(!l||!r.includes(l.type.name))return!1;return!0},ck=(e,t,r)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Zi(e.state,t)&&gV(e.state,t,r)){let{$anchor:a}=e.state.selection,i=e.state.doc.resolve(a.before()-1),l=[];i.node().descendants((f,h)=>{if(f.type.name===t)l.push({node:f,pos:h})});let c=l.at(-1);if(!c)return!1;let u=e.state.doc.resolve(i.start()+c.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},u.end()).joinForward().run()}if(!Zi(e.state,t))return!1;if(!_H(e.state))return!1;return e.chain().liftListItem(t).run()},bV=(e,t)=>{let r=gk(e,t),a=q$(e,t);if(!a||!r)return!1;if(r>a.depth)return!0;return!1},yV=(e,t)=>{let r=gk(e,t),a=q$(e,t);if(!a||!r)return!1;if(r<a.depth)return!0;return!1},uk=(e,t)=>{if(!Zi(e.state,t))return!1;if(!LH(e.state,t))return!1;let{selection:r}=e.state,{$from:a,$to:i}=r;if(!r.empty&&a.sameParent(i))return!1;if(bV(t,e.state))return e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run();if(yV(t,e.state))return e.chain().joinForward().joinBackward().run();return e.commands.joinItemForward()},Rie=(e,t)=>{var r;let{$anchor:a}=t.selection,i=t.doc.resolve(a.pos-a.parentOffset-2);if(i.index()===i.parent.childCount-1)return!1;if(((r=i.nodeAfter)==null?void 0:r.type.name)!==e)return!1;return!0},kie=(e,t)=>{var r;let{$anchor:a}=t.selection,i=t.doc.resolve(a.pos-2);if(i.index()===0)return!1;if(((r=i.nodeBefore)==null?void 0:r.type.name)!==e)return!1;return!0},Aie=(e,t,r)=>{if(!r)return!1;let a=wn(e,t.schema),i=!1;return r.descendants((l)=>{if(l.type===a)i=!0}),i},bk,dk,Mie,Mb,_ie,zie="listItem",cV="textStyle",uV,yk,Hie,G$,W$,FAe;var ih=N(()=>{Ye();Ye();Ye();Sa();Ye();Ye();Ye();Ye();Ye();Ye();Ye();at();Ye();Ye();Ye();uie=Object.defineProperty,lV=/^\s*([-+*])\s$/,fk=en.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",xt(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||e.ordered)return[];return{type:"bulletList",content:e.items?t.parseChildren(e.items):[]}},renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
390
+ `)},markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>{if(this.options.keepAttributes)return t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(fie,this.editor.getAttributes(sV)).run();return e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=es({find:lV,type:this.type});if(this.options.keepMarks||this.options.keepAttributes)e=es({find:lV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(sV),editor:this.editor});return[e]}}),pV=[[1000,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],hV=String.raw`\d+|[ivxlcdmIVXLCDM]+|${gie}`;mk=en.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",xt(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var r;if(e.type!=="list_item")return[];let a=(r=t.parseBlockChildren)!=null?r:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0){if(wie(e))return{type:"listItem",content:[{type:"paragraph",content:Eie(e.text||"",t)}]};if(e.tokens.some((c)=>c.type==="paragraph"))i=a(e.tokens);else{let c=e.tokens[0];if(c&&c.type==="text"&&c.tokens&&c.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(c.tokens)}],e.tokens.length>1){let f=e.tokens.slice(1),h=a(f);i.push(...h)}}else i=a(e.tokens)}}if(i.length===0)i=[{type:"paragraph",content:[]}];return{type:"listItem",content:i}},renderMarkdown:(e,t,r)=>ub(e,t,(a)=>{var i,l,c,u;if(a.parentType==="bulletList")return"- ";if(a.parentType==="orderedList"){let f=((l=(i=a.meta)==null?void 0:i.parentAttrs)==null?void 0:l.start)||1,h=(u=(c=a.meta)==null?void 0:c.parentAttrs)==null?void 0:u.type,m=f-1+(a.index||0);return Cie(h,m,". ")}return"- "},r),addExtensions(){return[fV(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Tie={};die(Tie,{findListItemPos:()=>q$,getNextListDepth:()=>gk,handleBackspace:()=>ck,handleDelete:()=>uk,hasListBefore:()=>gV,hasListItemAfter:()=>Rie,hasListItemBefore:()=>kie,listItemHasSubList:()=>Aie,nextListIsDeeper:()=>bV,nextListIsHigher:()=>yV});bk=$t.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:r})=>{if(e.state.schema.nodes[r]===void 0)return;if(uk(e,r))t=!0}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:r})=>{if(e.state.schema.nodes[r]===void 0)return;if(uk(e,r))t=!0}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:r,wrapperNames:a})=>{if(e.state.schema.nodes[r]===void 0)return;if(ck(e,r,a))t=!0}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:r,wrapperNames:a})=>{if(e.state.schema.nodes[r]===void 0)return;if(ck(e,r,a))t=!0}),t}}}}),dk=new RegExp(`^(\\s*)(${hV})([.)])\\s+(.*)$`),Mie=/^\s/,Mb={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};_ie=new RegExp(`^(${hV})([.)])\\s+(.+)$`);uV=/^(\d+)\.\s$/;yk=en.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:(e)=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:(e)=>{let t=e.getAttribute("type");if(t)return t;let r=e.getAttribute("style");if(r){let i=dV(r);if(i)return i}let a=e.querySelector("li");if(a){let i=a.getAttribute("style");if(i){let l=dV(i);if(l)return l}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,type:r,...a}=e,i=xt(this.options.HTMLAttributes,a);if(t!==1)i.start=t;if(r&&r!=="1")i.type=r;return["ol",i,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let r=e.start||1,a=e.typeMarker,i=e.items?Bie(e.items,t):[],l={};if(r!==1)l.start=r;if(a)l.type=a;if(Object.keys(l).length>0)return{type:"orderedList",attrs:l,content:i};return{type:"orderedList",content:i}},renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
391
+ `)},markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,r)=>{var a,i;let l=e.split(`
392
+ `),[c,u]=Lie(l);if(c.length===0)return;let f=vV(c,c[0].indent,r);if(f.length===0)return;let h=((a=c[0])==null?void 0:a.number)||1,m=(i=c[0])==null?void 0:i.type;return{type:"list",ordered:!0,start:h,typeMarker:m,items:f,raw:l.slice(0,u).join(`
393
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>{if(this.options.keepAttributes)return t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(zie,this.editor.getAttributes(cV)).run();return e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new qe({props:{handlePaste:(e,t)=>{var r,a;let i=(r=t.clipboardData)==null?void 0:r.getData("text/html");if(i==null?void 0:i.trim())return!1;let l=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!l)return!1;let c=Iie(l);if(!c)return!1;try{let u=e.state.schema.nodeFromJSON(c),f=e.state.tr.replaceSelectionWith(u);return e.dispatch(f),!0}catch{return!1}}}})]},addInputRules(){let e=(r,a)=>(!a.attrs.type||a.attrs.type==="1")&&a.childCount+a.attrs.start===+r[1],t=es({find:uV,type:this.type,getAttributes:(r)=>({start:+r[1]}),joinPredicate:e});if(this.options.keepMarks||this.options.keepAttributes)t=es({find:uV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:(r)=>({start:+r[1],...this.editor.getAttributes(cV)}),joinPredicate:e,editor:this.editor});return[t]}}),Hie=/^\s*(\[([( |x])?\])\s$/,G$=en.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:(e)=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:(e)=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",xt(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let r=[];if(e.tokens&&e.tokens.length>0)r.push(t.createNode("paragraph",{},t.parseInline(e.tokens)));else if(e.text)r.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})]));else r.push(t.createNode("paragraph",{},[]));if(e.nestedTokens&&e.nestedTokens.length>0){let a=t.parseChildren(e.nestedTokens);r.push(...a)}return t.createNode("taskItem",{checked:e.checked||!1},r)},renderMarkdown:(e,t)=>{var r;let i=`- [${((r=e.attrs)==null?void 0:r.checked)?"x":" "}] `;return ub(e,t,i)},addExtensions(){if(!this.options.nested)return[];return[fV(this.name,[this.options.taskListTypeName])]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};if(!this.options.nested)return e;return{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}},addNodeView(){return({node:e,HTMLAttributes:t,getPos:r,editor:a})=>{let i=document.createElement("li"),l=document.createElement("label"),c=document.createElement("span"),u=document.createElement("input"),f=document.createElement("div"),h=(b)=>{var y,v;u.ariaLabel=((v=(y=this.options.a11y)==null?void 0:y.checkboxLabel)==null?void 0:v.call(y,b,u.checked))||`Task item checkbox for ${b.textContent||"empty task item"}`};h(e),l.contentEditable="false",u.type="checkbox",u.addEventListener("mousedown",(b)=>b.preventDefault()),u.addEventListener("change",(b)=>{if(!a.isEditable&&!this.options.onReadOnlyChecked){u.checked=!u.checked;return}let{checked:y}=b.target;if(a.isEditable&&typeof r==="function")a.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:v})=>{let S=r();if(typeof S!=="number")return!1;let w=v.doc.nodeAt(S);return v.setNodeMarkup(S,void 0,{...w==null?void 0:w.attrs,checked:y}),!0}).run();if(!a.isEditable&&this.options.onReadOnlyChecked){if(!this.options.onReadOnlyChecked(e,y))u.checked=!u.checked}}),Object.entries(this.options.HTMLAttributes).forEach(([b,y])=>{i.setAttribute(b,y)}),i.dataset.checked=e.attrs.checked,u.checked=e.attrs.checked,l.append(u,c),i.append(l,f),Object.entries(t).forEach(([b,y])=>{i.setAttribute(b,y)});let m=new Set(Object.keys(t));return{dom:i,contentDOM:f,update:(b)=>{if(b.type!==this.type)return!1;i.dataset.checked=b.attrs.checked,u.checked=b.attrs.checked,h(b);let y=a.extensionManager.attributes,v=Zp(b,y),S=new Set(Object.keys(v)),w=this.options.HTMLAttributes;return m.forEach((E)=>{if(!S.has(E))if(E in w)i.setAttribute(E,w[E]);else i.removeAttribute(E)}),Object.entries(v).forEach(([E,R])=>{if(R===null||R===void 0)if(E in w)i.setAttribute(E,w[E]);else i.removeAttribute(E);else i.setAttribute(E,R)}),m=S,!0}}}},addInputRules(){return[es({find:Hie,type:this.type,getAttributes:(e)=>({checked:e[e.length-1]==="x"})})]}}),W$=en.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",xt(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
394
+ `)},markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let r=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return r!==void 0?r:-1},tokenize(e,t,r){let a=(l)=>{let c=N1(l,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(u)=>({indentLevel:u[1].length,mainContent:u[4],checked:u[3].toLowerCase()==="x"}),createToken:(u,f)=>({type:"taskItem",raw:"",mainContent:u.mainContent,indentLevel:u.indentLevel,checked:u.checked,text:u.mainContent,tokens:r.inlineTokens(u.mainContent),nestedTokens:f}),customNestedParser:a},r);if(c){let u={type:"taskList",raw:c.raw,items:c.items},f=l.slice(c.raw.length);if(f.trim())return[u,...r.blockTokens(f)];return[u]}return r.blockTokens(l)},i=N1(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:(l)=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,c)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:r.inlineTokens(l.mainContent),nestedTokens:c}),customNestedParser:a},r);if(!i)return;return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),FAe=$t.create({name:"listKit",addExtensions(){let e=[];if(this.options.bulletList!==!1)e.push(fk.configure(this.options.bulletList));if(this.options.listItem!==!1)e.push(mk.configure(this.options.listItem));if(this.options.listKeymap!==!1)e.push(bk.configure(this.options.listKeymap));if(this.options.orderedList!==!1)e.push(yk.configure(this.options.orderedList));if(this.options.taskItem!==!1)e.push(G$.configure(this.options.taskItem));if(this.options.taskList!==!1)e.push(W$.configure(this.options.taskList));return e}})});var Y$="&nbsp;",vk=" ",xV;var $V=N(()=>{Ye();xV=en.create({name:"paragraph",priority:1000,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",xt(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let r=e.tokens||[];if(r.length===1&&r[0].type==="image")return t.parseChildren([r[0]]);let a=t.parseInline(r);if(r.length===1&&r[0].type==="text"&&(r[0].raw===Y$||r[0].text===Y$||r[0].raw===vk||r[0].text===vk)&&a.length===1&&a[0].type==="text"&&(a[0].text===Y$||a[0].text===vk))return t.createNode("paragraph",void 0,[]);return t.createNode("paragraph",void 0,a)},renderMarkdown:(e,t,r)=>{var a,i;if(!e)return"";let l=Array.isArray(e.content)?e.content:[];if(l.length===0){let c=Array.isArray((a=r==null?void 0:r.previousNode)==null?void 0:a.content)?r.previousNode.content:[];return((i=r==null?void 0:r.previousNode)==null?void 0:i.type)==="paragraph"&&c.length===0?Y$:""}return t.renderChildren(l)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var Uie,Fie,SV;var CV=N(()=>{Ye();Uie=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Fie=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,SV=Xr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:(e)=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",xt(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bo({find:Uie,type:this.type})]},addPasteRules(){return[Dr({find:Fie,type:this.type})]}})});var wV;var EV=N(()=>{Ye();wV=en.create({name:"text",group:"inline",parseMarkdown:(e)=>({type:"text",text:e.text||""}),renderMarkdown:(e)=>e.text||""})});var TV;var RV=N(()=>{Ye();TV=Xr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:(e)=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",xt(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,r){let i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;let l=i[2].trim();return{type:"underline",raw:i[0],text:l,tokens:r.inlineTokens(l)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})});function kV(e={}){return new qe({view(t){return new AV(t,e)}})}class AV{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((a)=>{let i=(l)=>{this[a](l)};return e.dom.addEventListener(a,i),{name:a,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);if(r==this.cursorPos)this.updateOverlay();else this.setCursor(r)}else this.updateOverlay()}setCursor(e){if(e==this.cursorPos)return;if(this.cursorPos=e,e==null)this.element.parentNode.removeChild(this.element),this.element=null;else this.updateOverlay()}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r,a=this.editorView.dom,i=a.getBoundingClientRect(),l=i.width/a.offsetWidth,c=i.height/a.offsetHeight;if(t){let{nodeBefore:m,nodeAfter:b}=e;if(m||b){let y=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(y){let v=y.getBoundingClientRect(),S=m?v.bottom:v.top;if(m&&b)S=(S+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2;let w=this.width/2*c;r={left:v.left,right:v.right,top:S-w,bottom:S+w}}}}if(!r){let m=this.editorView.coordsAtPos(this.cursorPos),b=this.width/2*l;r={left:m.left-b,right:m.left+b,top:m.top,bottom:m.bottom}}let u=this.editorView.dom.offsetParent;if(!this.element){if(this.element=u.appendChild(document.createElement("div")),this.class)this.element.className=this.class;if(this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color)this.element.style.backgroundColor=this.color}this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let f,h;if(!u||u==document.body&&getComputedStyle(u).position=="static")f=-pageXOffset,h=-pageYOffset;else{let m=u.getBoundingClientRect(),b=m.width/u.offsetWidth,y=m.height/u.offsetHeight;f=m.left-u.scrollLeft*b,h=m.top-u.scrollTop*y}this.element.style.left=(r.left-f)/l+"px",this.element.style.top=(r.top-h)/c+"px",this.element.style.width=(r.right-r.left)/l+"px",this.element.style.height=(r.bottom-r.top)/c+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),a=r&&r.type.spec.disableDropCursor,i=typeof a=="function"?a(this.editorView,t,e):a;if(!t||i)return null;let l=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let c=e1(this.editorView.state.doc,l,this.editorView.dragging.slice);if(c!=null)l=c}return l}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);if(t!=null)this.setCursor(t),this.scheduleRemoval(5000)}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){if(!this.editorView.dom.contains(e.relatedTarget))this.setCursor(null)}}var MV=N(()=>{Js();Rc()});var NV=N(()=>{MV()});class xk{constructor(e){this.pos=e}map(e){return new xk(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Tn.valid(t)?new Tn(t):Fe.near(t)}}function OV(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Vie(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),a=e.node(t);if(r==0){if(a.type.spec.isolating)return!0;continue}for(let i=a.child(r-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||OV(i.type))return!0;if(i.inlineContent)return!1}}return!0}function jie(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),a=e.node(t);if(r==a.childCount){if(a.type.spec.isolating)return!0;continue}for(let i=a.child(r);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||OV(i.type))return!0;if(i.inlineContent)return!1}}return!0}function DV(){return new qe({props:{decorations:Wie,createSelectionBetween(e,t,r){return t.pos==r.pos&&Tn.valid(r)?new Tn(r):null},handleClick:qie,handleKeyDown:Kie,handleDOMEvents:{beforeinput:Gie}}})}function J$(e,t){let r=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(a,i,l){let c=a.selection,u=t>0?c.$to:c.$from,f=c.empty;if(c instanceof Me){if(!l.endOfTextblock(r)||u.depth==0)return!1;f=!1,u=a.doc.resolve(t>0?u.after():u.before())}let h=Tn.findGapCursorFrom(u,t,f);if(!h)return!1;if(i)i(a.tr.setSelection(new Tn(h)));return!0}}function qie(e,t,r){if(!e||!e.editable)return!1;let a=e.state.doc.resolve(t);if(!Tn.valid(a))return!1;let i=e.posAtCoords({left:r.clientX,top:r.clientY});if(i&&i.inside>-1&&Pe.isSelectable(e.state.doc.nodeAt(i.inside)))return!1;return e.dispatch(e.state.tr.setSelection(new Tn(a))),!0}function Gie(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Tn))return!1;let{$from:r}=e.state.selection,a=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!a)return!1;let i=le.empty;for(let c=a.length-1;c>=0;c--)i=le.from(a[c].createAndFill(null,i));let l=e.state.tr.replace(r.pos,r.pos,new Se(i,0,0));return l.setSelection(Me.near(l.doc.resolve(r.pos+1))),e.dispatch(l),!1}function Wie(e){if(!(e.selection instanceof Tn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Lt.create(e.doc,[Jn.widget(e.selection.head,t,{key:"gapcursor"})])}var Tn,Kie;var PV=N(()=>{h1();Js();Ws();t4();Tn=class Tn extends Fe{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return Tn.valid(r)?new Tn(r):Fe.near(r)}content(){return Se.empty}eq(e){return e instanceof Tn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw RangeError("Invalid input for GapCursor.fromJSON");return new Tn(e.resolve(t.pos))}getBookmark(){return new xk(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Vie(e)||!jie(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let a=t.contentMatchAt(e.index()).defaultType;return a&&a.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&Tn.valid(e))return e;let a=e.pos,i=null;for(let l=e.depth;;l--){let c=e.node(l);if(t>0?e.indexAfter(l)<c.childCount:e.index(l)>0){i=c.child(t>0?e.indexAfter(l):e.index(l)-1);break}else if(l==0)return null;a+=t;let u=e.doc.resolve(a);if(Tn.valid(u))return u}for(;;){let l=t>0?i.firstChild:i.lastChild;if(!l){if(i.isAtom&&!i.isText&&!Pe.isSelectable(i)){e=e.doc.resolve(a+i.nodeSize*t),r=!1;continue e}break}i=l,a+=t;let c=e.doc.resolve(a);if(Tn.valid(c))return c}return null}}};Tn.prototype.visible=!1;Tn.findFrom=Tn.findGapCursorFrom;Fe.jsonID("gapcursor",Tn);Kie=ib({ArrowLeft:J$("horiz",-1),ArrowRight:J$("horiz",1),ArrowUp:J$("vert",-1),ArrowDown:J$("vert",1)})});var LV=N(()=>{PV()});var X$=200,Sr=function(){},_V,Yie,$k;var IV=N(()=>{Sr.prototype.append=function(t){if(!t.length)return this;return t=Sr.from(t),!this.length&&t||t.length<X$&&this.leafAppend(t)||this.length<X$&&t.leafPrepend(this)||this.appendInner(t)};Sr.prototype.prepend=function(t){if(!t.length)return this;return Sr.from(t).append(this)};Sr.prototype.appendInner=function(t){return new Yie(this,t)};Sr.prototype.slice=function(t,r){if(t===void 0)t=0;if(r===void 0)r=this.length;if(t>=r)return Sr.empty;return this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Sr.prototype.get=function(t){if(t<0||t>=this.length)return;return this.getInner(t)};Sr.prototype.forEach=function(t,r,a){if(r===void 0)r=0;if(a===void 0)a=this.length;if(r<=a)this.forEachInner(t,r,a,0);else this.forEachInvertedInner(t,r,a,0)};Sr.prototype.map=function(t,r,a){if(r===void 0)r=0;if(a===void 0)a=this.length;var i=[];return this.forEach(function(l,c){return i.push(t(l,c))},r,a),i};Sr.from=function(t){if(t instanceof Sr)return t;return t&&t.length?new _V(t):Sr.empty};_V=function(e){function t(a){e.call(this),this.values=a}if(e)t.__proto__=e;t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,l){if(i==0&&l==this.length)return this;return new t(this.values.slice(i,l))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,l,c,u){for(var f=l;f<c;f++)if(i(this.values[f],u+f)===!1)return!1},t.prototype.forEachInvertedInner=function(i,l,c,u){for(var f=l-1;f>=c;f--)if(i(this.values[f],u+f)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=X$)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=X$)return new t(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t}(Sr);Sr.empty=new _V([]);Yie=function(e){function t(r,a){e.call(this),this.left=r,this.right=a,this.length=r.length+a.length,this.depth=Math.max(r.depth,a.depth)+1}if(e)t.__proto__=e;return t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(a){return a<this.left.length?this.left.get(a):this.right.get(a-this.left.length)},t.prototype.forEachInner=function(a,i,l,c){var u=this.left.length;if(i<u&&this.left.forEachInner(a,i,Math.min(l,u),c)===!1)return!1;if(l>u&&this.right.forEachInner(a,Math.max(i-u,0),Math.min(this.length,l)-u,c+u)===!1)return!1},t.prototype.forEachInvertedInner=function(a,i,l,c){var u=this.left.length;if(i>u&&this.right.forEachInvertedInner(a,i-u,Math.max(l,u)-u,c+u)===!1)return!1;if(l<u&&this.left.forEachInvertedInner(a,Math.min(i,u),l,c)===!1)return!1},t.prototype.sliceInner=function(a,i){if(a==0&&i==this.length)return this;var l=this.left.length;if(i<=l)return this.left.slice(a,i);if(a>=l)return this.right.slice(a-l,i-l);return this.left.slice(a,l).append(this.right.slice(0,i-l))},t.prototype.leafAppend=function(a){var i=this.right.leafAppend(a);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(a){var i=this.left.leafPrepend(a);if(i)return new t(i,this.right)},t.prototype.appendInner=function(a){if(this.left.depth>=Math.max(this.right.depth,a.depth)+1)return new t(this.left,new t(this.right,a));return new t(this,a)},t}(Sr),$k=Sr});class li{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let a,i;if(t)a=this.remapping(r,this.items.length),i=a.maps.length;let l=e.tr,c,u,f=[],h=[];return this.items.forEach((m,b)=>{if(!m.step){if(!a)a=this.remapping(r,b+1),i=a.maps.length;i--,h.push(m);return}if(a){h.push(new is(m.map));let y=m.step.map(a.slice(i)),v;if(y&&l.maybeStep(y).doc)v=l.mapping.maps[l.mapping.maps.length-1],f.push(new is(v,void 0,void 0,f.length+h.length));if(i--,v)a.appendMap(v,i)}else l.maybeStep(m.step);if(m.selection)return c=a?m.selection.map(a.slice(i)):m.selection,u=new li(this.items.slice(0,r).append(h.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:l,selection:c}}addTransform(e,t,r,a){let i=[],l=this.eventCount,c=this.items,u=!a&&c.length?c.get(c.length-1):null;for(let h=0;h<e.steps.length;h++){let m=e.steps[h].invert(e.docs[h]),b=new is(e.mapping.maps[h],m,t),y;if(y=u&&u.merge(b))if(b=y,h)i.pop();else c=c.slice(0,c.length-1);if(i.push(b),t)l++,t=void 0;if(!a)u=b}let f=l-r.depth;if(f>Qie)c=Xie(c,f),l-=f;return new li(c.append(i),l)}remapping(e,t){let r=new zp;return this.items.forEach((a,i)=>{let l=a.mirrorOffset!=null&&i-a.mirrorOffset>=e?r.maps.length-a.mirrorOffset:void 0;r.appendMap(a.map,l)},e,t),r}addMaps(e){if(this.eventCount==0)return this;return new li(this.items.append(e.map((t)=>new is(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],a=Math.max(0,this.items.length-t),i=e.mapping,l=e.steps.length,c=this.eventCount;this.items.forEach((b)=>{if(b.selection)c--},a);let u=t;this.items.forEach((b)=>{let y=i.getMirror(--u);if(y==null)return;l=Math.min(l,y);let v=i.maps[y];if(b.step){let S=e.steps[y].invert(e.docs[y]),w=b.selection&&b.selection.map(i.slice(u+1,y));if(w)c++;r.push(new is(v,S,w))}else r.push(new is(v))},a);let f=[];for(let b=t;b<l;b++)f.push(new is(i.maps[b]));let h=this.items.slice(0,a).append(f).append(r),m=new li(h,c);if(m.emptyItemCount()>Jie)m=m.compress(this.items.length-r.length);return m}emptyItemCount(){let e=0;return this.items.forEach((t)=>{if(!t.step)e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,a=[],i=0;return this.items.forEach((l,c)=>{if(c>=e){if(a.push(l),l.selection)i++}else if(l.step){let u=l.step.map(t.slice(r)),f=u&&u.getMap();if(r--,f)t.appendMap(f,r);if(u){let h=l.selection&&l.selection.map(t.slice(r));if(h)i++;let m=new is(f.invert(),u,h),b,y=a.length-1;if(b=a.length&&a[y].merge(m))a[y]=b;else a.push(m)}}else if(l.map)r--},this.items.length,0),new li($k.from(a.reverse()),i)}}function Xie(e,t){let r;return e.forEach((a,i)=>{if(a.selection&&t--==0)return r=i,!1}),e.slice(r)}class is{constructor(e,t,r,a){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=a}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new is(t.getMap().invert(),t,this.selection)}}}class hl{constructor(e,t,r,a,i){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=a,this.prevComposition=i}}function Zie(e,t,r,a){let i=r.getMeta(Id),l;if(i)return i.historyState;if(r.getMeta(nse))e=new hl(e.done,e.undone,null,0,-1);let c=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;else if(c&&c.getMeta(Id))if(c.getMeta(Id).redo)return new hl(e.done.addTransform(r,void 0,a,Q$(t)),e.undone,BV(r.mapping.maps),e.prevTime,e.prevComposition);else return new hl(e.done,e.undone.addTransform(r,void 0,a,Q$(t)),null,e.prevTime,e.prevComposition);else if(r.getMeta("addToHistory")!==!1&&!(c&&c.getMeta("addToHistory")===!1)){let u=r.getMeta("composition"),f=e.prevTime==0||!c&&e.prevComposition!=u&&(e.prevTime<(r.time||0)-a.newGroupDelay||!ese(r,e.prevRanges)),h=c?Sk(e.prevRanges,r.mapping):BV(r.mapping.maps);return new hl(e.done.addTransform(r,f?t.selection.getBookmark():void 0,a,Q$(t)),li.empty,h,r.time,u==null?e.prevComposition:u)}else if(l=r.getMeta("rebased"))return new hl(e.done.rebased(r,l),e.undone.rebased(r,l),Sk(e.prevRanges,r.mapping),e.prevTime,e.prevComposition);else return new hl(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),Sk(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function ese(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;return e.mapping.maps[0].forEach((a,i)=>{for(let l=0;l<t.length;l+=2)if(a<=t[l+1]&&i>=t[l])r=!0}),r}function BV(e){let t=[];for(let r=e.length-1;r>=0&&t.length==0;r--)e[r].forEach((a,i,l,c)=>t.push(l,c));return t}function Sk(e,t){if(!e)return null;let r=[];for(let a=0;a<e.length;a+=2){let i=t.map(e[a],1),l=t.map(e[a+1],-1);if(i<=l)r.push(i,l)}return r}function tse(e,t,r){let a=Q$(t),i=Id.get(t).spec.config,l=(r?e.undone:e.done).popEvent(t,a);if(!l)return null;let c=l.selection.resolve(l.transform.doc),u=(r?e.done:e.undone).addTransform(l.transform,t.selection.getBookmark(),i,a),f=new hl(r?u:l.remaining,r?l.remaining:u,null,0,-1);return l.transform.setSelection(c).setMeta(Id,{redo:r,historyState:f})}function Q$(e){let t=e.plugins;if(zV!=t){Ck=!1,zV=t;for(let r=0;r<t.length;r++)if(t[r].spec.historyPreserveItems){Ck=!0;break}}return Ck}function HV(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new qe({key:Id,state:{init(){return new hl(li.empty,li.empty,null,0,-1)},apply(t,r,a){return Zie(r,a,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,r){let a=r.inputType,i=a=="historyUndo"?wk:a=="historyRedo"?Ek:null;if(!i||!t.editable)return!1;return r.preventDefault(),i(t.state,t.dispatch)}}}})}function Z$(e,t){return(r,a)=>{let i=Id.getState(r);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(a){let l=tse(i,r,e);if(l)a(t?l.scrollIntoView():l)}return!0}}var Jie=500,Qie=20,Ck=!1,zV=null,Id,nse,wk,Ek,hMe,mMe;var UV=N(()=>{IV();Rc();Js();li.empty=new li($k.empty,0);Id=new Qe("history"),nse=new Qe("closeHistory");wk=Z$(!1,!0),Ek=Z$(!0,!0),hMe=Z$(!1,!1),mMe=Z$(!0,!1)});var FV=N(()=>{UV()});function WV(e){let{editor:t,placeholder:r,dataAttribute:a,pos:i,node:l,isEmptyDoc:c,hasAnchor:u,classes:{emptyNode:f,emptyEditor:h}}=e,m=[f];if(c)m.push(h);return Jn.node(i,i+l.nodeSize,{class:m.join(" "),[a]:typeof r==="function"?r({editor:t,node:l,pos:i,hasAnchor:u}):r})}function YV(e,t){return typeof e==="function"?e(t):e}function JV({editor:e,options:t,dataAttribute:r,doc:a,selection:i,from:l,to:c}){let{anchor:u}=i,f=[],h=e.isEmpty;return a.nodesBetween(l,c,(m,b)=>{let y=u>=b&&u<=b+m.nodeSize,v=!m.isLeaf&&eh(m);if(!m.type.isTextblock)return t.includeChildren;if((y||!t.showOnlyCurrent)&&v)f.push(WV({editor:e,isEmptyDoc:h,dataAttribute:r,hasAnchor:y,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:YV(t.emptyNodeClass,{editor:e,node:m,pos:b,hasAnchor:y})},node:m,pos:b}));return t.includeChildren}),f}function XV({editor:e,options:t,dataAttribute:r,doc:a,selection:i}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:c}=i,u=[],f=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let m=a.resolve(c),b=m.depth>0?m.node(1):m.nodeAfter,y=m.depth>0?m.before(1):c;if(b&&b.type.isTextblock&&eh(b)){let v=c>=y&&c<=y+b.nodeSize;u.push(WV({editor:e,isEmptyDoc:f,dataAttribute:r,hasAnchor:v,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:YV(t.emptyNodeClass,{editor:e,node:b,pos:y,hasAnchor:v})},node:b,pos:y}))}}else u.push(...JV({editor:e,options:t,dataAttribute:r,doc:a,selection:i,from:0,to:a.content.size}));return Lt.create(a,u)}function Nb(e,t){var r;let a=e.resolve(t);if(a.depth===0){let c=(r=a.nodeAfter)!=null?r:a.nodeBefore;if(!c)return{from:t,to:t};let u=a.nodeAfter?t:t-c.nodeSize;return{from:u,to:u+c.nodeSize}}let i=a.before(1),l=a.node(1);return{from:i,to:i+l.nodeSize}}function Ob(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function rse(e,t,r){let a=[];return e.forEach((i,l)=>{let c=l,u=c+i.nodeSize,f=c+1,h=u+1;if(f<r&&h>t)a.push({from:c,to:u})}),a}function ose(e){if(e.length===0)return[];let t=[...e].sort((a,i)=>a.from-i.from),r=[{...t[0]}];for(let a=1;a<t.length;a+=1){let i=r[r.length-1],l=t[a];if(l.from<=i.to)i.to=Math.max(i.to,l.to);else r.push({...l})}return r}function ase(e,t){let r=rse(e,t.from,t.to);if(r.push(Ob(e,Nb(e,t.from))),t.to>t.from)r.push(Ob(e,Nb(e,Math.min(t.to,e.content.size+1)-1)));else if(t.from<e.content.size+1)r.push(Ob(e,Nb(e,Math.min(t.from+1,e.content.size))));return r}function ise(e,t,r){let a=[];if(e.docChanged){let i=cb(e);for(let l of i)a.push(...ase(r.doc,l.newRange))}if(e.selectionSet)a.push(Ob(r.doc,Nb(r.doc,e.mapping.map(t.selection.anchor)))),a.push(Ob(r.doc,Nb(r.doc,r.selection.anchor)));return ose(a)}function sse(e,t,r){let a=Math.max(0,Math.min(e,r.content.size)),i=Math.max(a,Math.min(t,r.content.size));return{from:a,to:i}}function lse({decorations:e,ranges:t,editor:r,options:a,dataAttribute:i,doc:l,selection:c}){let u=e;for(let f of t){let{from:h,to:m}=sse(f.from,f.to,l),b=u.find(h,m).filter((v)=>v.from>=h&&v.to<=m);if(b.length)u=u.remove(b);let y=JV({editor:r,options:a,dataAttribute:i,doc:l,selection:c,from:h,to:m});if(y.length)u=u.add(l,y)}return u}function cse({editor:e,options:t,dataAttribute:r}){return{init(a,i){let l=XV({editor:e,options:t,dataAttribute:r,doc:i.doc,selection:i.selection});return l!=null?l:Lt.empty},apply(a,i,l,c){if(!a.docChanged&&!a.selectionSet)return i;let u=i.map(a.mapping,a.doc),f=ise(a,l,c);return lse({decorations:u,ranges:f,editor:e,options:t,dataAttribute:r,doc:c.doc,selection:c.selection})}}}function use(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function dse({editor:e,options:t}){let r=t.dataAttribute?`data-${use(t.dataAttribute)}`:`data-${GV}`,a=t.showOnlyCurrent&&!t.includeChildren;return new qe({key:VV,...a?{}:{state:cse({editor:e,options:t,dataAttribute:r})},props:{decorations:a?({doc:i,selection:l})=>XV({editor:e,options:t,dataAttribute:r,doc:i,selection:l}):(i)=>{var l;if(t.showOnlyWhenEditable&&!e.isEditable)return Lt.empty;return(l=VV.getState(i))!=null?l:Lt.empty}}})}function Tk(e,t){return!e.selection.empty&&!A1(e.selection)&&t.isEditable}function fse(e,t){return Tk(e,t)&&!t.isFocused&&!t.view.dragging}function pse(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function hse(e){e.focus()}function jV({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var $Me,KV,RMe,qV,GV="placeholder",VV,Rk,FMe,mse="skipTrailingNode",QV,ZV;var e2=N(()=>{Ye();at();Ye();NV();Ye();at();Bc();Ye();LV();at();Ye();at();Bc();Ye();Bc();Bc();Ye();Bc();Ye();at();Bc();Ye();at();Ye();FV();$Me=$t.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:(e)=>e.length,wordCounter:(e)=>e.split(" ").filter((t)=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=(e)=>{let t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){let a=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(a)}return t.nodeSize},this.storage.words=(e)=>{let t=(e==null?void 0:e.node)||this.editor.state.doc,r=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let e=!1;return[new qe({key:new Qe("characterCount"),appendTransaction:(t,r,a)=>{if(e)return;let i=this.options.limit,l=this.options.autoTrim;if(i===null||i===void 0||i===0||l===!1){e=!0;return}let c=this.storage.characters({node:a.doc});if(c>i){let u=c-i,f=0,h=u;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let m=a.tr.deleteRange(0,h);return e=!0,m}e=!0},filterTransaction:(t,r)=>{let a=this.options.limit;if(!t.docChanged||a===0||a===null||a===void 0)return!0;let i=this.storage.characters({node:r.doc}),l=this.storage.characters({node:t.doc});if(l<=a)return!0;if(i>a&&l>a&&l<=i)return!0;if(i>a&&l>a&&l>i)return!1;if(!t.getMeta("paste"))return!1;let u=t.selection.$head.pos,f=l-a,h=u-f,m=u;if(t.deleteRange(h,m),this.storage.characters({node:t.doc})>a)return!1;return!0}})]}}),KV=$t.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[kV(this.options)]}}),RMe=$t.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new qe({key:new Qe("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:r,isFocused:a}=this.editor,{anchor:i}=t,l=[];if(!r||!a)return Lt.create(e,[]);let c=0;if(this.options.mode==="deepest")e.descendants((f,h)=>{if(f.isText)return;if(!(i>=h&&i<=h+f.nodeSize-1))return!1;c+=1});let u=0;return e.descendants((f,h)=>{if(f.isText)return!1;if(!(i>=h&&i<=h+f.nodeSize-1))return!1;if(u+=1,this.options.mode==="deepest"&&c-u>0||this.options.mode==="shallowest"&&u>1)return this.options.mode==="deepest";l.push(Jn.node(h,h+f.nodeSize,{class:this.options.className}))}),Lt.create(e,l)}}})]}}),qV=$t.create({name:"gapCursor",addProseMirrorPlugins(){return[DV()]},extendNodeSchema(e){var t;let r={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Bt(ze(e,"allowGapCursor",r)))!=null?t:null}}}),VV=new Qe("tiptap__placeholder");Rk=$t.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:GV,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[dse({editor:this.editor,options:this.options})]}});FMe=$t.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new qe({key:new Qe("selection"),props:{decorations(r){if(!fse(r,e))return null;return Lt.create(r.doc,[Jn.inline(r.selection.from,r.selection.to,{class:t.className})])},handleDOMEvents:{blur(r){if(!Tk(r.state,e))return!1;return pse(),!1},focus(r){if(!Tk(r.state,e))return!1;return requestAnimationFrame(()=>{if(!e.isDestroyed&&r.hasFocus())hse(r)}),!1}}}})]}});QV=$t.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Qe(this.name),r=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",a=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter((i)=>(this.options.notAfter||[]).concat(r).includes(i.name));return[new qe({key:t,appendTransaction:(i,l,c)=>{let{doc:u,tr:f,schema:h}=c,m=t.getState(c),b=u.content.size,y=h.nodes[r];if(i.some((v)=>v.getMeta(mse)))return;if(!m)return;return f.insert(b,y.create())},state:{init:(i,l)=>{let c=l.tr.doc.lastChild;return!jV({node:c,types:a})},apply:(i,l)=>{if(!i.docChanged)return l;if(i.getMeta("__uniqueIDTransaction"))return l;let c=i.doc.lastChild;return!jV({node:c,types:a})}}})]}}),ZV=$t.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>wk(e,t),redo:()=>({state:e,dispatch:t})=>Ek(e,t)}},addProseMirrorPlugins(){return[HV(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})});var gse,ej;var tj=N(()=>{Ye();EF();RF();AF();NF();DF();LF();IF();zF();UF();iV();ih();$V();CV();EV();RV();e2();gse=$t.create({name:"starterKit",addExtensions(){var e,t,r,a;let i=[];if(this.options.bold!==!1)i.push(TF.configure(this.options.bold));if(this.options.blockquote!==!1)i.push(wF.configure(this.options.blockquote));if(this.options.bulletList!==!1)i.push(fk.configure(this.options.bulletList));if(this.options.code!==!1)i.push(kF.configure(this.options.code));if(this.options.codeBlock!==!1)i.push(MF.configure(this.options.codeBlock));if(this.options.document!==!1)i.push(OF.configure(this.options.document));if(this.options.dropcursor!==!1)i.push(KV.configure(this.options.dropcursor));if(this.options.gapcursor!==!1)i.push(qV.configure(this.options.gapcursor));if(this.options.hardBreak!==!1)i.push(PF.configure(this.options.hardBreak));if(this.options.heading!==!1)i.push(_F.configure(this.options.heading));if(this.options.undoRedo!==!1)i.push(ZV.configure(this.options.undoRedo));if(this.options.horizontalRule!==!1)i.push(BF.configure(this.options.horizontalRule));if(this.options.italic!==!1)i.push(HF.configure(this.options.italic));if(this.options.listItem!==!1)i.push(mk.configure(this.options.listItem));if(this.options.listKeymap!==!1)i.push(bk.configure((e=this.options)==null?void 0:e.listKeymap));if(this.options.link!==!1)i.push(aV.configure((t=this.options)==null?void 0:t.link));if(this.options.orderedList!==!1)i.push(yk.configure(this.options.orderedList));if(this.options.paragraph!==!1)i.push(xV.configure(this.options.paragraph));if(this.options.strike!==!1)i.push(SV.configure(this.options.strike));if(this.options.text!==!1)i.push(wV.configure(this.options.text));if(this.options.underline!==!1)i.push(TV.configure((r=this.options)==null?void 0:r.underline));if(this.options.trailingNode!==!1)i.push(QV.configure((a=this.options)==null?void 0:a.trailingNode));return i}}),ej=gse});var nj;var rj=N(()=>{e2();e2();nj=Rk});var bse,yse,vse,oj;var aj=N(()=>{Ye();bse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,yse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,vse=Xr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){if(!this.options.multicolor)return{};return{color:{default:null,parseHTML:(e)=>e.getAttribute("data-color")||HH(e,"background-color")||e.style.backgroundColor,renderHTML:(e)=>{if(!e.color)return{};return{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}}}}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",xt(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:(e)=>e.indexOf("=="),tokenize(e,t,r){let i=/^(==)([^=]+)(==)/.exec(e);if(i){let l=i[2].trim(),c=r.inlineTokens(l);return{type:"highlight",raw:i[0],text:l,tokens:c}}}},addCommands(){return{setHighlight:(e)=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:(e)=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[bo({find:bse,type:this.type})]},addPasteRules(){return[Dr({find:yse,type:this.type})]}}),oj=vse});var ij;var sj=N(()=>{ih();ih();ij=W$});var lj;var cj=N(()=>{ih();ih();lj=G$});function kk(e){let t=e.trim().toLowerCase();if(!t)return[...uj];return uj.filter((r)=>r.title.toLowerCase().includes(t)||r.keywords.some((a)=>a.includes(t)))}function xse(e,t){if(t<0||t>e.doc.content.size)return!1;let r=e.doc.resolve(t);if(r.parent.type.spec.code)return!1;if(r.parentOffset===0)return!0;return/^\s*$/.test(r.parent.textBetween(r.parentOffset-1,r.parentOffset))}function Ak({value:e,onChange:t,placeholder:r="Write, or press '/' for blocks…",label:a,editable:i=!0,minHeight:l=200,className:c,...u}){let f=Dt.useRef(t);f.current=t;let h=Dt.useRef(e),m=Dt.useRef(r);m.current=r;let b=Dt.useRef(null),[y,v]=Dt.useState(null),S=Dt.useCallback((fe)=>{b.current=fe,v(fe)},[]),[w,E]=Dt.useState(!1),R=Dt.useRef(!1);R.current=w;let[D,H]=Dt.useState(""),[z,G]=Dt.useState(null),ee=Dt.useRef(null),U=Dt.useRef(null),[P,re]=Dt.useState(null),[J,ye]=Dt.useState(!1);Dt.useEffect(()=>ye(!0),[]);let ce=Dt.useId(),se=`${ce}-label`,_=`${ce}-slash`,W=(fe)=>`${_}-option-${fe}`,Y=Dt.useRef(()=>{}),Z=u["aria-label"],pe=Dt.useMemo(()=>kk(y?.query??""),[y?.query]),V=y?Math.min(y.index,Math.max(pe.length-1,0)):0,k=y!==null&&pe.length>0,X=gU({editable:i,immediatelyRender:!1,extensions:[ej.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),oj,ij,lj.configure({nested:!0}),nj.configure({placeholder:()=>m.current})],content:e||"",editorProps:{attributes:{class:zo("prose prose-sm max-w-none px-4 py-3 text-fg outline-none","prose-headings:text-fg prose-p:text-fg prose-strong:text-fg prose-a:text-accent-strong","prose-code:text-fg prose-blockquote:text-fg-muted prose-li:text-fg"),style:`min-height:${typeof l==="number"?`${l}px`:l}`,role:"textbox","aria-multiline":"true",...a?{"aria-labelledby":se}:{},...Z?{"aria-label":Z}:{},"aria-expanded":k?"true":"false",...k?{"aria-controls":_,"aria-activedescendant":W(V)}:{}},handleTextInput(fe,Oe,Rt,he){if(he!=="/"||b.current)return!1;if(!xse(fe.state,Oe))return!1;return S({from:Oe,query:"",index:0}),!1},handleKeyDown(fe,Oe){let Rt=b.current;if(!Rt)return!1;if(Oe.key==="Escape")return S(null),!0;let he=kk(Rt.query);if(he.length===0)return S(null),!1;if(Oe.key==="ArrowDown")return S({...Rt,index:(Rt.index+1)%he.length}),!0;if(Oe.key==="ArrowUp")return S({...Rt,index:(Rt.index-1+he.length)%he.length}),!0;if(Oe.key==="Enter"||Oe.key==="Tab")return Y.current(he[Math.min(Rt.index,he.length-1)]),!0;return!1}},onUpdate({editor:fe}){let Oe=fe.getHTML();h.current=Oe,f.current(Oe);let Rt=b.current;if(!Rt)return;let he=fe.state.selection.from;if(he<Rt.from)return S(null);let ln=fe.state.doc.textBetween(Rt.from,he,`
395
+ `,`
396
+ `);if(!ln.startsWith("/"))return S(null);let Dn=ln.slice(1);if(/\s/.test(Dn)||kk(Dn).length===0)return S(null);S({...Rt,query:Dn,index:0})},onSelectionUpdate({editor:fe}){let Oe=b.current;if(!Oe)return;let Rt=fe.state.selection.from;if(Rt<Oe.from||Rt>Oe.from+Oe.query.length+1)S(null)},onBlur(){S(null)}});Dt.useEffect(()=>{if(!X)return;if(e!==h.current&&e!==X.getHTML())X.commands.setContent(e||"",{emitUpdate:!1}),h.current=e},[e,X]),Dt.useEffect(()=>{if(X)X.setEditable(i)},[i,X]);let ve=Dt.useCallback((fe)=>{let Oe=b.current;if(!X||!Oe||!fe)return;let Rt=X.state.doc.content.size,he=Math.min(Math.max(Oe.from,0),Rt),ln=Math.min(Math.max(X.state.selection.from,he),Rt);X.chain().focus().deleteRange({from:he,to:ln}).run(),fe.run(X),S(null)},[X,S]);Y.current=ve;let $e=Dt.useCallback(()=>{let fe=b.current,Oe=U.current;if(!X||!fe||!Oe)return;let Rt=X.state.doc.content.size;if(fe.from>Rt)return S(null);let he=X.view.coordsAtPos(fe.from),ln=Oe.getBoundingClientRect(),Dn=6,Rn=8,tn=he.bottom+Dn;if(tn+ln.height>window.innerHeight-Rn)tn=Math.max(Rn,he.top-Dn-ln.height);let Ie=Math.max(Rn,Math.min(he.left,window.innerWidth-ln.width-Rn));re((Qr)=>Qr&&Qr.left===Ie&&Qr.top===tn?Qr:{left:Ie,top:tn})},[X,S]);Dt.useLayoutEffect(()=>{if(y)$e();else re(null)},[y,$e]),Dt.useEffect(()=>{if(!y)return;let fe=()=>$e();return window.addEventListener("scroll",fe,!0),window.addEventListener("resize",fe),()=>{window.removeEventListener("scroll",fe,!0),window.removeEventListener("resize",fe)}},[y,$e]);let ke=C4({editor:X,selector:({editor:fe})=>fe?{bold:fe.isActive("bold"),italic:fe.isActive("italic"),strike:fe.isActive("strike"),highlight:fe.isActive("highlight"),code:fe.isActive("code"),link:fe.isActive("link"),hasSelection:!fe.state.selection.empty}:null}),He=Dt.useCallback(()=>{E(!1),G(null),R.current=!1},[]);Dt.useEffect(()=>{if(w&&ke&&!ke.hasSelection&&!ke.link)He()},[w,ke,He]),Dt.useEffect(()=>{if(w)ee.current?.focus()},[w]);let Ee=()=>{if(!X)return;H(X.getAttributes("link").href??""),G(null),R.current=!0,E(!0)},Ze=()=>{if(!X)return;if(D.trim()===""){X.chain().focus().extendMarkRange("link").unsetLink().run(),He();return}let fe=D3(D);if(!fe)return G(P3);X.chain().focus().extendMarkRange("link").setLink({href:fe}).run(),He()};return Kt.jsxDEV("div",{className:zo("flex w-full flex-col gap-2",c),children:[a?Kt.jsxDEV("span",{id:se,className:"text-small font-medium text-fg",children:a},void 0,!1,void 0,this):null,Kt.jsxDEV("div",{className:"relative rounded-lg border border-border bg-surface focus-within:border-brand-green",children:[X?Kt.jsxDEV(xF,{editor:X,shouldShow:({editor:fe,view:Oe,state:Rt,element:he})=>{let ln=he.contains(document.activeElement);if(!fe.isEditable||!(Oe.hasFocus()||ln))return!1;return R.current||!Rt.selection.empty},className:"flex flex-col gap-1 rounded-lg border border-border bg-surface-card p-1 shadow-md",children:w?Kt.jsxDEV(Kt.Fragment,{children:[Kt.jsxDEV("div",{className:"flex items-center gap-1",children:[Kt.jsxDEV("input",{ref:ee,type:"text",value:D,"aria-label":"Link URL","aria-invalid":z?!0:void 0,placeholder:"https://, mailto:, /path",className:"h-8 w-56 rounded-md border border-border bg-surface px-2 text-small text-fg outline-none placeholder:text-fg-subtle focus:border-brand-green",onChange:(fe)=>{H(fe.target.value),G(null)},onKeyDown:(fe)=>{if(fe.key==="Enter")fe.preventDefault(),Ze();if(fe.key==="Escape")fe.preventDefault(),He(),X.chain().focus().run()}},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:t2,onMouseDown:(fe)=>fe.preventDefault(),onClick:Ze,title:"Apply link",children:"Apply"},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:t2,onMouseDown:(fe)=>fe.preventDefault(),onClick:()=>{He(),X.chain().focus().run()},title:"Cancel",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z?Kt.jsxDEV("span",{className:"px-1 pb-0.5 text-caption text-danger",children:z},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):Kt.jsxDEV("div",{className:"flex items-center gap-0.5",children:[$se.map((fe)=>Kt.jsxDEV("button",{type:"button",className:t2,"data-active":ke?.[fe.key]??!1,"aria-pressed":ke?.[fe.key]??!1,onMouseDown:(Oe)=>Oe.preventDefault(),onClick:()=>fe.run(X),title:fe.title,children:fe.label},fe.key,!1,void 0,this)),Kt.jsxDEV("button",{type:"button",className:t2,"data-active":ke?.link??!1,"aria-pressed":ke?.link??!1,onMouseDown:(fe)=>fe.preventDefault(),onClick:Ee,title:"Link",children:Kt.jsxDEV(Sse,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,Kt.jsxDEV(S4,{editor:X},void 0,!1,void 0,this),J&&k&&y?dj.createPortal(Kt.jsxDEV("div",{ref:U,id:_,role:"listbox","aria-label":"Insert block",className:"fixed z-50 max-h-72 w-64 overflow-auto rounded-lg border border-border bg-surface-card p-1 shadow-md",style:{left:P?.left??0,top:P?.top??0,visibility:P?"visible":"hidden"},children:pe.map((fe,Oe)=>Kt.jsxDEV("div",{id:W(Oe),role:"option","aria-selected":Oe===V,className:zo("flex w-full cursor-pointer flex-col items-start rounded-md px-3 py-1.5 text-left",Oe===V?"bg-surface-muted":"hover:bg-surface-muted"),onMouseDown:(Rt)=>Rt.preventDefault(),onClick:()=>ve(fe),children:[Kt.jsxDEV("span",{className:"text-small text-fg",children:fe.title},void 0,!1,void 0,this),Kt.jsxDEV("span",{className:"text-caption text-fg-subtle",children:fe.hint},void 0,!1,void 0,this)]},fe.title,!0,void 0,this))},void 0,!1,void 0,this),document.body):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Dt,dj,Kt,uj,t2="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-small text-fg-muted transition-colors hover:bg-surface-muted hover:text-fg data-[active=true]:bg-surface-muted data-[active=true]:text-fg",$se,Sse=()=>Kt.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[Kt.jsxDEV("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},void 0,!1,void 0,this),Kt.jsxDEV("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var fj=N(()=>{I1();SF();tj();rj();aj();sj();cj();Ds();Dt=j(ae(),1),dj=j(Vr(),1),Kt=j(Et(),1),uj=[{title:"Text",hint:"Plain paragraph",keywords:["text","paragraph","body","p"],run:(e)=>e.chain().focus().setParagraph().run()},{title:"Heading 1",hint:"Big section heading",keywords:["h1","heading","title"],run:(e)=>e.chain().focus().toggleHeading({level:1}).run()},{title:"Heading 2",hint:"Medium heading",keywords:["h2","subheading"],run:(e)=>e.chain().focus().toggleHeading({level:2}).run()},{title:"Heading 3",hint:"Small heading",keywords:["h3"],run:(e)=>e.chain().focus().toggleHeading({level:3}).run()},{title:"Bulleted list",hint:"Unordered list",keywords:["bullet","unordered","ul","list"],run:(e)=>e.chain().focus().toggleBulletList().run()},{title:"Numbered list",hint:"Ordered list",keywords:["numbered","ordered","ol","list"],run:(e)=>e.chain().focus().toggleOrderedList().run()},{title:"To-do list",hint:"Checklist",keywords:["todo","task","checkbox","check"],run:(e)=>e.chain().focus().toggleTaskList().run()},{title:"Quote",hint:"Block quote",keywords:["quote","blockquote","citation"],run:(e)=>e.chain().focus().toggleBlockquote().run()},{title:"Code",hint:"Code block",keywords:["code","snippet","pre"],run:(e)=>e.chain().focus().toggleCodeBlock().run()},{title:"Divider",hint:"Horizontal rule",keywords:["divider","rule","hr","separator"],run:(e)=>e.chain().focus().setHorizontalRule().run()}];$se=[{key:"bold",title:"Bold",label:Kt.jsxDEV("b",{children:"B"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleBold().run()},{key:"italic",title:"Italic",label:Kt.jsxDEV("i",{children:"i"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleItalic().run()},{key:"strike",title:"Strikethrough",label:Kt.jsxDEV("s",{children:"S"},void 0,!1,void 0,this),run:(e)=>e.chain().focus().toggleStrike().run()},{key:"highlight",title:"Highlight",label:"H",run:(e)=>e.chain().focus().toggleHighlight().run()},{key:"code",title:"Inline code",label:"</>",run:(e)=>e.chain().focus().toggleCode().run()}]});var pj=N(()=>{fj()});function Bd({label:e,children:t}){return be.jsxDEV("label",{className:"flex w-full flex-col gap-2",children:[e===void 0?null:be.jsxDEV("span",{className:"text-sm font-medium text-fg",children:e},void 0,!1,void 0,this),t]},void 0,!0,void 0,this)}function Cse(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(a)=>String(a).padStart(2,"0");return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}T${r(t.getHours())}:${r(t.getMinutes())}`}function wse(e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}function hj(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Ese(e){let[t,r]=On.useState(0);On.useEffect(()=>{if(e===null)return;let a=e-Date.now();if(a<=0)return;let i=setTimeout(()=>r((l)=>l+1),Math.min(a+1000,2147483647));return()=>clearTimeout(i)},[e,t])}function Tse({value:e,onChange:t}){let[r,a]=On.useState(!1),[i,l]=On.useState(""),c=Boolean(e),u=c?new Date(e).getTime():Number.NaN,f=Number.isFinite(u)&&u>Date.now();Ese(f?u:null);let h=!c?{text:"Not published",tone:"text-fg-muted"}:f?{text:`Scheduled for ${hj(e)}`,tone:"text-accent-strong"}:{text:`Published ${hj(e)}`,tone:"text-fg"},m=()=>{l(Cse(e)),a((b)=>!b)};return be.jsxDEV("div",{className:"flex flex-col gap-2",children:[be.jsxDEV("span",{className:`text-sm ${h.tone}`,children:h.text},void 0,!1,void 0,this),be.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[!c||f?be.jsxDEV(Ae,{size:"sm",onPress:()=>{a(!1),t(new Date().toISOString())},children:"Publish now"},void 0,!1,void 0,this):null,be.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:m,children:f?"Change schedule":c?"Change time":"Schedule…"},void 0,!1,void 0,this),c?be.jsxDEV(Ae,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>{a(!1),t(null)},children:"Unpublish"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),r?be.jsxDEV("input",{className:zd,type:"datetime-local",value:i,autoFocus:!0,onChange:(b)=>{l(b.target.value);let y=b.target.value?wse(b.target.value):null;if(y)t(y)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function lh({schema:e,value:t,onChange:r,api:a}){let i=(l,c)=>r({...t,[l]:c});return be.jsxDEV("div",{className:"flex flex-col gap-4",children:e.map((l)=>be.jsxDEV(mj,{def:l,value:t[l.name],onChange:(c)=>i(l.name,c),api:a,siblings:t},l.name,!1,void 0,this))},void 0,!1,void 0,this)}function mj({def:e,value:t,onChange:r,api:a,hideLabelAs:i,siblings:l}){let c=i!==void 0?void 0:be.jsxDEV(be.Fragment,{children:[e.label??e.name," ",e.required?be.jsxDEV("span",{className:"text-danger",children:"*"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),u=(f)=>typeof f==="string"?f:f==null?"":JSON.stringify(f);switch(e.type){case"text":case"url":{let f=e.type==="url"?"https://…":"";return i!==void 0?be.jsxDEV("input",{className:zd,type:"text","aria-label":i,placeholder:f,value:t??"",onChange:(h)=>r(h.target.value)},void 0,!1,void 0,this):be.jsxDEV($n,{label:c,value:t??"",onChange:r,placeholder:f},void 0,!1,void 0,this)}case"textarea":return i!==void 0?be.jsxDEV("textarea",{className:`${zd} h-auto min-h-20 py-2.5`,"aria-label":i,value:u(t),onChange:(f)=>r(f.target.value)},void 0,!1,void 0,this):be.jsxDEV(Px,{label:c,value:u(t),onChange:r},void 0,!1,void 0,this);case"richtext":return be.jsxDEV(Bd,{label:c,children:be.jsxDEV(Rse,{value:typeof t==="string"?t:"",onChange:r},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"number":return be.jsxDEV(Bd,{label:c,children:be.jsxDEV("input",{className:zd,type:"number","aria-label":i,value:t==null?"":String(t),onChange:(f)=>r(f.target.value===""?null:Number(f.target.value))},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"date":case"datetime":return be.jsxDEV(Bd,{label:c,children:be.jsxDEV("input",{className:zd,type:e.type==="date"?"date":"datetime-local","aria-label":i,value:t??"",onChange:(f)=>r(f.target.value||null)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"slug":return be.jsxDEV(Ase,{def:e,label:c,value:typeof t==="string"?t:"",source:typeof l?.[e.from??""]==="string"?l[e.from??""]:"",onChange:r},void 0,!1,void 0,this);case"publish":return be.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[be.jsxDEV("span",{className:"text-sm font-medium text-fg",children:c},void 0,!1,void 0,this),be.jsxDEV(Tse,{value:typeof t==="string"?t:"",onChange:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"boolean":return be.jsxDEV("label",{className:"flex items-center gap-2",children:[be.jsxDEV("input",{type:"checkbox",checked:Boolean(t),onChange:(f)=>r(f.target.checked)},void 0,!1,void 0,this),be.jsxDEV("span",{className:"text-sm text-fg",children:e.label??e.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"select":return be.jsxDEV(Bd,{label:c,children:be.jsxDEV(Mse,{def:e,value:t,onChange:r,api:a,ariaLabel:i},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"media":return be.jsxDEV(Bd,{label:c,children:be.jsxDEV(Nse,{value:t,onChange:r,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"group":return be.jsxDEV(Bd,{label:c,children:be.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-muted p-3.5",children:be.jsxDEV(lh,{schema:e.fields??[],value:t??{},onChange:r,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"repeater":return be.jsxDEV(kse,{def:e,value:t??[],onChange:r,api:a,label:c},void 0,!1,void 0,this);default:return null}}function Rse({value:e,onChange:t}){return be.jsxDEV(Ak,{value:e,onChange:t,minHeight:180,placeholder:"Write, or press '/' for blocks…"},void 0,!1,void 0,this)}function kse({def:e,value:t,onChange:r,api:a,label:i}){let l=Array.isArray(t)?t:[],c=e.fields??[],u=c.length===1&&!["repeater","group","richtext","media"].includes(c[0].type),[f,h]=On.useState(null),m=(U,P)=>r(l.map((re,J)=>J===U?P:re)),b=()=>r([...l,{}]),y=(U)=>r(l.filter((P,re)=>re!==U)),v=(U,P)=>{if(U===P||P<0||P>=l.length)return;let re=l.slice(),[J]=re.splice(U,1);re.splice(P,0,J),r(re)},S=(U,P)=>v(U,U+P),w=e.max!=null&&l.length>=e.max,E=e.min!=null&&l.length<=e.min,R=(U)=>{let P=["text","textarea","richtext","select","url"];for(let re of c){if(!P.includes(re.type))continue;let J=U[re.name];if(typeof J==="string"&&J.trim())return J.replace(/<[^>]+>/g," ").trim().slice(0,80)}return""},D=(U)=>({onDragOver:(P)=>{if(!f)return;P.preventDefault(),h((re)=>re&&re.over!==U?{...re,over:U}:re)},onDrop:(P)=>{if(!f)return;P.preventDefault(),v(f.from,U),h(null)}}),H=(U)=>be.jsxDEV("span",{draggable:!0,onDragStart:(P)=>{P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",""),h({from:U,over:U})},onDragEnd:()=>h(null),className:"cursor-grab select-none px-1 text-fg-subtle transition-colors hover:text-fg active:cursor-grabbing",title:"Drag to reorder","aria-hidden":!0,children:"⠿"},void 0,!1,void 0,this),z=(U)=>`${f&&f.over===U&&f.from!==U?"ring-2 ring-brand-green":""} ${f&&f.from===U?"opacity-40":""}`,G="opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 [@media(hover:none)]:opacity-100",ee=(U)=>be.jsxDEV("div",{className:"flex shrink-0 items-center",children:[be.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-fg disabled:opacity-30",title:"Move up",disabled:U===0,onClick:()=>S(U,-1),children:"↑"},void 0,!1,void 0,this),be.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-fg disabled:opacity-30",title:"Move down",disabled:U===l.length-1,onClick:()=>S(U,1),children:"↓"},void 0,!1,void 0,this),be.jsxDEV("button",{type:"button",className:"px-1.5 text-fg-subtle hover:text-danger disabled:opacity-30",title:"Remove",disabled:E,onClick:()=>y(U),children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return be.jsxDEV("div",{className:"flex flex-col gap-2",children:[be.jsxDEV("span",{className:"text-sm font-medium text-fg",children:i},void 0,!1,void 0,this),l.length===0?be.jsxDEV("span",{className:"text-sm text-fg-muted",children:"None yet."},void 0,!1,void 0,this):null,be.jsxDEV("div",{className:`flex flex-col ${u?"gap-1":"gap-2"}`,children:l.map((U,P)=>u?be.jsxDEV("div",{className:`group/row flex items-center gap-1 rounded-lg px-1 py-0.5 transition-colors ${z(P)}`,...D(P),children:[H(P),be.jsxDEV("div",{className:"min-w-0 flex-1",children:be.jsxDEV(mj,{def:c[0],hideLabelAs:`${e.label??e.name} ${P+1}`,value:U[c[0].name],onChange:(re)=>m(P,{...U,[c[0].name]:re}),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),be.jsxDEV("div",{className:"opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 [@media(hover:none)]:opacity-100",children:ee(P)},void 0,!1,void 0,this)]},P,!0,void 0,this):be.jsxDEV("div",{className:`rounded-lg border border-border bg-surface-muted transition-colors ${z(P)}`,...D(P),children:[be.jsxDEV("div",{className:"flex items-center gap-1 border-b border-border px-2 py-1.5",children:[H(P),be.jsxDEV("span",{className:"text-caption text-fg-subtle",children:P+1},void 0,!1,void 0,this),be.jsxDEV("span",{className:"min-w-0 flex-1 truncate text-sm text-fg-muted",children:R(U)},void 0,!1,void 0,this),ee(P)]},void 0,!0,void 0,this),be.jsxDEV("div",{className:"p-3.5",children:be.jsxDEV(lh,{schema:c,value:U,onChange:(re)=>m(P,re),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},P,!0,void 0,this))},void 0,!1,void 0,this),be.jsxDEV(Ae,{variant:"secondary",size:"sm",className:"self-start",onPress:b,isDisabled:w,children:["+ Add ",e.label??e.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function sh(e){return gj(e).replace(/-+$/,"")}function gj(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+/,"").slice(0,80)}function Ase({def:e,label:t,value:r,source:a,onChange:i}){let l=On.useRef(null),c=On.useRef(!1),u=On.useRef(null);On.useEffect(()=>{if(!e.from)return;let m=u.current;if(u.current=a,m===null||m===a||!a)return;if(c.current)return;if(r!==""&&r!==l.current)return;let b=sh(a);if(b===r)return;l.current=b,i(b)},[a,r,e.from,i]);let f=a?sh(a):"",h=Boolean(f)&&f!==r;return be.jsxDEV(Bd,{label:t,children:[be.jsxDEV("input",{className:zd,value:r,onChange:(m)=>{c.current=!0,l.current=null,i(gj(m.target.value))},onBlur:()=>{let m=sh(r);if(m!==r)i(m)},placeholder:f},void 0,!1,void 0,this),h?be.jsxDEV("button",{type:"button",className:"self-start text-caption text-fg-subtle underline hover:text-fg",onClick:()=>{l.current=f,c.current=!1,i(f)},children:["Generate from ",e.from,": ",f]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function Mse({def:e,value:t,onChange:r,api:a,ariaLabel:i}){let[l,c]=On.useState(null),u=e.optionsFrom;On.useEffect(()=>{if(!u)return;let m=!0;return a.call(u).then((b)=>{if(m)c(Array.isArray(b)?b:[])}).catch(()=>{if(m)c([])}),()=>{m=!1}},[u,a]);let f=Boolean(u)&&l===null,h=u?l??[]:(e.options??[]).map((m)=>({value:m,label:m}));return be.jsxDEV("select",{className:zd,"aria-label":i,value:t??"",onChange:(m)=>r(m.target.value||null),children:[be.jsxDEV("option",{value:"",children:f?"Načítám…":"—"},void 0,!1,void 0,this),h.map((m)=>be.jsxDEV("option",{value:m.value,children:m.label},m.value,!1,void 0,this))]},void 0,!0,void 0,this)}function Nse({value:e,onChange:t,api:r}){let[a,i]=On.useState(!1),[l,c]=On.useState(null);return On.useEffect(()=>{if(e)r.call("getMedia",{id:e}).then(c).catch(()=>c(null));else c(null)},[e,r]),be.jsxDEV("div",{children:[be.jsxDEV("div",{className:"flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",children:[l?be.jsxDEV("img",{className:"h-10 w-10 rounded object-cover",src:r.resolve(`/media/${l.file.key}`),alt:""},void 0,!1,void 0,this):be.jsxDEV("span",{className:"text-fg-subtle",children:"no media"},void 0,!1,void 0,this),be.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:l?.file.filename??e??""},void 0,!1,void 0,this),be.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:()=>i(!0),children:"pick"},void 0,!1,void 0,this),e?be.jsxDEV(Ae,{variant:"ghost",size:"sm",className:"text-danger",onPress:()=>t(null),children:"clear"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),a?be.jsxDEV(Ose,{api:r,onClose:()=>i(!1),onPick:(u)=>{t(u),i(!1)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function Ose({api:e,onClose:t,onPick:r}){let[a,i]=On.useState([]),[l,c]=On.useState(!1),[u,f]=On.useState(""),h=()=>e.listMedia().then(i).catch((b)=>f(String(b.message??b)));On.useEffect(()=>{h()},[]);let m=async(b)=>{c(!0),f("");try{let y=await e.uploadMedia(b);r(y.id)}catch(y){f(String(y.message??y))}finally{c(!1)}};return be.jsxDEV(Lx,{isOpen:!0,isDismissable:!0,onOpenChange:(b)=>!b&&t(),children:be.jsxDEV(_x,{className:"w-full max-w-[680px] px-9 py-8",children:be.jsxDEV(Ix,{className:"max-h-[86vh] overflow-auto outline-none",children:[be.jsxDEV(Hx,{level:"1",className:"mb-5 font-normal",children:["Choose ",be.jsxDEV("span",{className:"text-fg-subtle",children:"a file"},void 0,!1,void 0,this)," from the library"]},void 0,!0,void 0,this),u?be.jsxDEV("div",{className:"my-2 rounded-lg border border-danger bg-surface-card px-3.5 py-2.5 text-small text-danger",children:u},void 0,!1,void 0,this):null,be.jsxDEV("label",{className:"mb-4 flex w-full flex-col gap-2",children:[be.jsxDEV(zx,{size:"small",weight:"medium",children:"Upload a new file"},void 0,!1,void 0,this),be.jsxDEV("input",{type:"file",className:"text-small text-fg-muted",disabled:l,onChange:(b)=>b.target.files?.[0]&&m(b.target.files[0])},void 0,!1,void 0,this)]},void 0,!0,void 0,this),be.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:a.map((b)=>be.jsxDEV("div",{className:"cursor-pointer overflow-hidden rounded-lg border border-border bg-surface-card",onClick:()=>r(b.id),children:[(b.file.contentType??"").startsWith("image/")?be.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${b.file.key}`),alt:""},void 0,!1,void 0,this):be.jsxDEV("div",{className:"h-[130px] bg-surface-muted"},void 0,!1,void 0,this),be.jsxDEV("div",{className:"truncate px-2 py-1.5 text-caption text-fg-muted",children:b.file.filename??b.id},void 0,!1,void 0,this)]},b.id,!0,void 0,this))},void 0,!1,void 0,this),be.jsxDEV("div",{className:"mt-3 text-right",children:be.jsxDEV(Ae,{variant:"ghost",onPress:t,children:"close"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var On,be,zd="h-10 w-full rounded-lg border border-border bg-surface-card px-4 text-sm text-fg outline-none transition-colors placeholder:text-fg-muted focus:border-brand-green";var bj=N(()=>{Yi();pj();On=j(ae(),1),be=j(Et(),1)});function Pb({lead:e,em:t,children:r}){return O.jsxDEV("div",{className:"mx-auto grid max-w-[1200px] grid-cols-[1fr_auto] items-center gap-6 px-7 pb-6 pt-8 max-[820px]:grid-cols-1",children:[O.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[O.jsxDEV("span",{className:"block text-fg-subtle",children:e},void 0,!1,void 0,this),O.jsxDEV("span",{className:"block text-fg",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r]},void 0,!0,void 0,this)}function n2({text:e,em:t,children:r}){return O.jsxDEV("div",{className:"flex min-w-[360px] items-center gap-4 rounded-full bg-brand-green py-3 pl-7 pr-3 max-[820px]:min-w-0",children:[O.jsxDEV("span",{className:"text-callout text-fg-on-brand",children:[e," ",O.jsxDEV("span",{className:"font-semibold",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r]},void 0,!0,void 0,this)}function ml({children:e}){return O.jsxDEV("div",{className:"mb-2 mt-[18px] text-sm text-fg-subtle first:mt-0",children:e},void 0,!1,void 0,this)}function qc({status:e,children:t}){return O.jsxDEV("span",{className:`inline-block whitespace-nowrap rounded-full border px-2.5 py-0.5 text-caption font-medium ${e==="published"||e==="active"?"bg-brand-green text-fg-on-brand border-transparent":e==="in_review"||e==="review"?"bg-accent-yellow text-fg-on-brand border-transparent":e==="rejected"||e==="archived"||e==="inactive"?"border-danger text-danger bg-surface-card":"border-border text-fg-muted bg-surface-card"}`,children:t},void 0,!1,void 0,this)}function Nk({onClose:e,wide:t,children:r}){return O.jsxDEV(Lx,{isOpen:!0,isDismissable:!0,onOpenChange:(a)=>!a&&e(),children:O.jsxDEV(_x,{className:`w-full px-9 py-8 ${t?"max-w-[680px]":"max-w-[520px]"}`,children:O.jsxDEV(Ix,{className:"max-h-[86vh] overflow-auto outline-none",children:r},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Ok({children:e}){return O.jsxDEV(Hx,{level:"1",className:"mb-5 font-normal",children:e},void 0,!1,void 0,this)}function r2({children:e,className:t}){return O.jsxDEV("div",{className:`grid grid-cols-[auto_1fr] gap-x-3.5 gap-y-2 text-[13px] text-fg-muted [&>span:nth-child(odd)]:text-fg-subtle ${t??""}`,children:e},void 0,!1,void 0,this)}function Sj({children:e}){return O.jsxDEV("div",{className:"overflow-auto rounded-lg border border-border bg-surface-card p-6",children:e},void 0,!1,void 0,this)}function uh({ok:e,children:t}){return O.jsxDEV("div",{className:`my-2 rounded-lg border px-3.5 py-2.5 text-small ${e?"border-brand-green bg-brand-green/20 text-fg":"border-danger bg-surface-card text-danger"}`,children:t},void 0,!1,void 0,this)}function Cj({api:e,pages:t,blockTypes:r,onOpen:a,onCreated:i,onError:l}){let[c,u]=ue.useState(!1);return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Pb,{lead:"Pages",em:t.length===0?"None yet":t.length===1?"1 page total":`${t.length} pages total`,children:O.jsxDEV(n2,{text:"Let's",em:"create something",children:O.jsxDEV(Ae,{className:"shrink-0",onPress:()=>u(!0),children:"+ New page"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:ch,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[t.map((f)=>O.jsxDEV("div",{className:`${Hd} cursor-pointer hover:bg-surface-muted`,onClick:()=>a(f),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:f.title},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:["/",f.slug]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:f.locale},void 0,!1,void 0,this),O.jsxDEV(qc,{status:f.status,children:f.status},void 0,!1,void 0,this)]},f.id,!0,void 0,this)),t.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:["No pages yet. ",r.length===0?"Define block types + a content type first (via the API/admin).":"Create one."]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),c?O.jsxDEV(Dse,{api:e,onClose:()=>u(!1),onCreated:()=>{u(!1),i()},onError:l},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function Dse({api:e,onClose:t,onCreated:r,onError:a}){let[i,l]=ue.useState([]),[c,u]=ue.useState(""),[f,h]=ue.useState(""),[m,b]=ue.useState("");ue.useEffect(()=>{e.listContentTypes().then((v)=>{if(l(v),v[0])u(v[0].id)}).catch((v)=>a(Tt(v)))},[e,a]);let y=async()=>{try{await e.call("createPage",{typeId:c,title:f,slug:m||sh(f)}),r()}catch(v){a(Tt(v))}};return O.jsxDEV(Nk,{onClose:t,children:[O.jsxDEV(Ok,{children:["Create a ",O.jsxDEV(Db,{children:"new page"},void 0,!1,void 0,this)," and define the essentials",O.jsxDEV(Db,{children:"."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[O.jsxDEV("span",{className:"text-sm font-medium text-fg",children:"Content type"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-wrap gap-2",children:i.map((v)=>O.jsxDEV("button",{type:"button",onClick:()=>u(v.id),className:`rounded-lg border px-4 py-2.5 text-sm font-medium transition-colors ${c===v.id?"border-brand-green bg-surface-muted text-fg":"border-border bg-surface-card text-fg-muted hover:border-fg-subtle hover:text-fg"}`,children:v.name},v.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV($n,{label:"Title",value:f,onChange:h},void 0,!1,void 0,this),O.jsxDEV($n,{label:"Slug",value:m,onChange:b,placeholder:sh(f)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[O.jsxDEV(Ae,{variant:"ghost",onPress:t,children:"cancel"},void 0,!1,void 0,this),O.jsxDEV(Ae,{onPress:y,isDisabled:!c||!f,children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function yj(e){if(e==null)return"";if(typeof e==="boolean")return e?"yes":"no";if(Array.isArray(e))return e.length===1?"1 item":`${e.length} items`;if(typeof e==="object")return"—";return String(e)}function wj({api:e,def:t,onOpen:r,onNew:a,onError:i}){let[l,c]=ue.useState([]),[u,f]=ue.useState(0),[h,m]=ue.useState(!1),[b,y]=ue.useState(!0),v=ue.useCallback((w)=>(y(!0),e.call("collectionList",{collection:t.slug,limit:vj,offset:w}).then((E)=>{c((R)=>w===0?E:[...R,...E]),m(E.length===vj),f(w+E.length)}).catch((E)=>i(Tt(E))).finally(()=>y(!1))),[e,t.slug,i]);ue.useEffect(()=>{c([]),f(0),m(!1),v(0)},[v]);let S=(w)=>t.fields.find((E)=>E.name===w)?.label??w;return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Pb,{lead:t.pluralLabel,em:l.length===0?"None yet":l.length===1?`1 ${t.label.toLowerCase()}`:`${l.length}${h?"+":""} ${t.pluralLabel.toLowerCase()}`,children:O.jsxDEV(n2,{text:"Let's",em:`add a ${t.label.toLowerCase()}`,children:O.jsxDEV(Ae,{className:"shrink-0",onPress:a,children:["+ New ",t.label.toLowerCase()]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:ch,children:[O.jsxDEV("div",{className:"flex flex-col gap-2",children:[l.map((w)=>{let E=String(w[t.idField]??""),[R,...D]=t.list;return O.jsxDEV("div",{className:`${Hd} cursor-pointer hover:bg-surface-muted`,onClick:()=>r(E),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:yj(w[R??t.titleField])||O.jsxDEV(Db,{children:"untitled"},void 0,!1,void 0,this)},void 0,!1,void 0,this),D.map((H)=>O.jsxDEV("span",{className:"truncate text-fg-subtle",title:S(H),children:yj(w[H])},H,!1,void 0,this))]},E,!0,void 0,this)}),!b&&l.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:["No ",t.pluralLabel.toLowerCase()," yet. Create one."]},void 0,!0,void 0,this):null,b?O.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),h&&!b?O.jsxDEV("div",{className:"mt-3.5 text-center",children:O.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:()=>void v(u),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Ej({api:e,def:t,id:r,onSaved:a,onDeleted:i,onBack:l,onError:c}){let u=r===null,[f,h]=ue.useState({}),[m,b]=ue.useState(!u),[y,v]=ue.useState(!1),[S,w]=ue.useState(!1),[E,R]=ue.useState(!1);ue.useEffect(()=>{if(u){h({});return}let z=!0;return b(!0),v(!1),e.call("collectionGet",{collection:t.slug,id:r}).then((G)=>{if(!z)return;if(G)h(G);else v(!0)}).catch((G)=>c(Tt(G))).finally(()=>{if(z)b(!1)}),()=>{z=!1}},[e,t.slug,r,u,c]);let D=async()=>{w(!0);try{if(u)await e.call("collectionCreate",{collection:t.slug,values:f}),a();else{let z=await e.call("collectionUpdate",{collection:t.slug,id:r,values:f});if(z)h(z);R(!0),setTimeout(()=>R(!1),1200)}}catch(z){c(Tt(z))}finally{w(!1)}},H=async()=>{if(u||!confirm(`Delete this ${t.label.toLowerCase()}? This cannot be undone.`))return;w(!0);try{await e.call("collectionDelete",{collection:t.slug,id:r}),i()}catch(z){c(Tt(z))}finally{w(!1)}};return O.jsxDEV("div",{className:ch,children:[O.jsxDEV("div",{className:"mb-4 mt-2 flex items-center gap-3",children:[O.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:l,children:["← ",t.pluralLabel]},void 0,!0,void 0,this),O.jsxDEV("h1",{className:"text-[22px] font-normal text-fg",children:u?`New ${t.label.toLowerCase()}`:`Edit ${t.label.toLowerCase()}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y?O.jsxDEV("p",{className:"text-fg-subtle",children:"Not found."},void 0,!1,void 0,this):m?O.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this):O.jsxDEV("div",{className:"flex max-w-[720px] flex-col gap-4",children:[E?O.jsxDEV(uh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(lh,{schema:t.fields,value:f,onChange:h,api:e},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[O.jsxDEV(Ae,{onPress:D,isDisabled:S,children:S?"Saving…":u?"Create":"Save"},void 0,!1,void 0,this),!u?O.jsxDEV(Ae,{variant:"ghost",className:"text-danger",onPress:H,isDisabled:S,children:"Delete"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Tj({api:e,page:t,blockTypes:r,tab:a,onTab:i,onBack:l,onChange:c,registerGuard:u}){let[f,h]=ue.useState(null),[m,b]=ue.useState(null),[y,v]=ue.useState(""),S=ue.useRef(new Set),[w,E]=ue.useState(0),R=ue.useCallback((V,k)=>{let X=S.current;if(k?X.has(V):!X.has(V))return;if(k)X.add(V);else X.delete(V);E(X.size)},[]),D=ue.useCallback(()=>S.current.size===0||window.confirm(`You have ${S.current.size} unsaved change${S.current.size===1?"":"s"}. Leave without saving?`),[]);ue.useEffect(()=>(u(D),()=>u(null)),[u,D]);let H=ue.useMemo(()=>new Map(r.map((V)=>[V.slug,V])),[r]),z=ue.useCallback(async()=>{try{let[V,k]=await Promise.all([e.getContentType(t.typeId),e.getPagePreview(t.slug,t.locale)]);h(V??null),b(k)}catch(V){v(Tt(V))}},[e,t.typeId,t.slug,t.locale]);ue.useEffect(()=>{z()},[z]),ue.useEffect(()=>{if(w===0)return;let V=(k)=>{k.preventDefault(),k.returnValue=""};return window.addEventListener("beforeunload",V),()=>window.removeEventListener("beforeunload",V)},[w]);let G=f?.regions??[],ee=f?.fieldsSchema??[],U=(V,k)=>b((X)=>X?{...X,regions:{...X.regions,[V]:k(X.regions[V]??[])}}:X),P=async(V,k,X)=>{let ve=`tmp:${crypto.randomUUID()}`,$e=(m?.regions[V]??[]).map((He)=>He.id),ke=X!=null&&X>=0&&X<$e.length?X:$e.length;U(V,(He)=>{let Ee=[...He];return Ee.splice(ke,0,{id:ve,block_id:ve,block_type:k,title:null,fields:{},is_shared:!1,pending:!0}),Ee});try{let{block:He,placement:Ee}=await e.call("addBlock",{pageId:t.id,blockTypeSlug:k,region:V,fields:{}}),Ze={id:String(Ee.id),block_id:String(He.id),block_type:k,title:He.title??null,fields:He.fields??{},is_shared:Boolean(Ee.isShared)};if(U(V,(fe)=>fe.map((Oe)=>Oe.id===ve?Ze:Oe)),ke<$e.length){let fe=[...$e];fe.splice(ke,0,Ze.id),await J(V,fe)}}catch(He){U(V,(Ee)=>Ee.filter((Ze)=>Ze.id!==ve)),v(Tt(He))}},re=async(V)=>{try{await e.call("removeBlock",{pageBlockId:V.id}),await z()}catch(k){v(Tt(k))}},J=async(V,k)=>{try{await e.call("reorderRegion",{pageId:t.id,region:V,order:k}),await z()}catch(X){v(Tt(X))}},ye=ue.useCallback((V,k)=>{b((X)=>{if(!X)return X;let ve={};for(let[$e,ke]of Object.entries(X.regions))ve[$e]=ke.map((He)=>He.id===V?{...He,fields:k}:He);return{...X,regions:ve}})},[]),[ce,se]=ue.useState(null),_=(V,k)=>se({region:V,from:k,over:k}),W=(V,k)=>se((X)=>X&&X.region===V&&X.over!==k?{...X,over:k}:X),Y=()=>se(null),Z=(V)=>{if(se(null),!ce||ce.region!==V||ce.from===ce.over)return;let k=(m?.regions[V]??[]).map((ve)=>ve.id),[X]=k.splice(ce.from,1);k.splice(ce.over,0,X),J(V,k)},pe=w>0?O.jsxDEV("span",{className:"text-[11px] text-accent-strong",children:["● ",w," unsaved change",w===1?"":"s"]},void 0,!0,void 0,this):null;return O.jsxDEV("div",{className:`grid min-h-[calc(100vh-68px)] gap-5 px-7 pb-7 pt-2 max-[820px]:grid-cols-1 ${G.length?"grid-cols-[260px_1fr_400px]":"grid-cols-[1fr_400px]"}`,children:[G.length===0?null:O.jsxDEV("div",{className:"overflow-auto rounded-panel bg-surface-muted p-[18px]",children:[O.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>{if(D())l()},children:"← all pages"},void 0,!1,void 0,this),pe?O.jsxDEV("p",{className:"mt-2",children:pe},void 0,!1,void 0,this):null,O.jsxDEV(ml,{children:"Regions"},void 0,!1,void 0,this),G.map((V)=>O.jsxDEV("div",{className:`${Hd} mb-2`,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:V.label??V.name},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:(m?.regions[V.name]??[]).length},void 0,!1,void 0,this)]},V.name,!0,void 0,this)),O.jsxDEV(ml,{children:"Status"},void 0,!1,void 0,this),O.jsxDEV("div",{className:Hd,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:t.title},void 0,!1,void 0,this),O.jsxDEV(qc,{status:t.status,children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"overflow-auto py-1.5 pl-8 pr-2",children:[y?O.jsxDEV(uh,{children:y},void 0,!1,void 0,this):null,G.length===0?O.jsxDEV("div",{className:"mb-2 flex items-center gap-2",children:[O.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>{if(D())l()},children:"← all pages"},void 0,!1,void 0,this),O.jsxDEV(qc,{status:t.status,children:t.status},void 0,!1,void 0,this),pe]},void 0,!0,void 0,this):null,ee.length?O.jsxDEV(_se,{api:e,page:t,schema:ee,initialFields:m?.page.fields??{},onDirtyChange:R,onError:v},void 0,!1,void 0,this):null,G.map((V)=>{let k=m?.regions[V.name]??[],X=V.allowedTypes&&V.allowedTypes.length?V.allowedTypes:r.map((ve)=>ve.slug);return O.jsxDEV("div",{className:"mb-10",children:[O.jsxDEV("div",{className:"mb-1 text-caption font-medium uppercase tracking-wide text-fg-subtle",children:V.label??V.name},void 0,!1,void 0,this),k.map((ve,$e)=>O.jsxDEV("div",{children:[O.jsxDEV(xj,{compact:!0,allowed:X,btBySlug:H,onAdd:(ke)=>P(V.name,ke,$e)},void 0,!1,void 0,this),O.jsxDEV(Pse,{api:e,block:ve,blockType:H.get(ve.block_type),isFirst:$e===0,isLast:$e===k.length-1,onMove:(ke)=>Jse(k,V.name,$e,ke,J),onRemove:()=>re(ve),onPatch:ye,onDirtyChange:R,onError:v,dragging:ce?.region===V.name&&ce.from===$e,isOver:!!ce&&ce.region===V.name&&ce.over===$e&&ce.from!==$e,onDragStartBlock:()=>_(V.name,$e),onDragOverBlock:()=>W(V.name,$e),onDropBlock:()=>Z(V.name),onDragEndBlock:Y},void 0,!1,void 0,this)]},ve.id,!0,void 0,this)),O.jsxDEV("div",{className:"mt-1",children:O.jsxDEV(xj,{allowed:X,btBySlug:H,onAdd:(ve)=>P(V.name,ve)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},V.name,!0,void 0,this)}),G.length===0&&ee.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"This page's content type defines no fields or regions."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"overflow-auto rounded-panel border border-border bg-surface-card p-5",children:[O.jsxDEV("div",{className:"mb-3 flex gap-1",children:Mk.map((V)=>O.jsxDEV(Ae,{variant:"ghost",size:"sm",className:a===V?"bg-surface-muted text-fg":"text-fg-muted",onPress:()=>i(V),children:V},V,!1,void 0,this))},void 0,!1,void 0,this),a==="settings"?O.jsxDEV(Lse,{api:e,page:t,onSaved:c,onError:v},void 0,!1,void 0,this):null,a==="seo"?O.jsxDEV(Ise,{api:e,page:t,onError:v},void 0,!1,void 0,this):null,a==="workflow"?O.jsxDEV(Bse,{api:e,page:t,onChanged:(V)=>{c(V)},onError:v},void 0,!1,void 0,this):null,a==="i18n"?O.jsxDEV(zse,{api:e,page:t,onError:v},void 0,!1,void 0,this):null,a==="audit"?O.jsxDEV(Hse,{api:e,pageId:t.id,onError:v},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Pse({api:e,block:t,blockType:r,isFirst:a,isLast:i,onMove:l,onRemove:c,onPatch:u,onDirtyChange:f,onError:h,dragging:m,isOver:b,onDragStartBlock:y,onDragOverBlock:v,onDropBlock:S,onDragEndBlock:w}){let[E,R]=ue.useState(null),[D,H]=ue.useState(!1),[z,G]=ue.useState("idle"),ee=ue.useRef(""),U=ue.useRef(null),P=t.block_id,re=t.id;ue.useEffect(()=>{if(t.pending){R({}),ee.current="{}";return}let Y=!0;return e.call("getBlock",{blockId:P}).then((Z)=>{if(!Y)return;let pe=Z?.fields??{};R(pe),ee.current=JSON.stringify(pe)}).catch((Z)=>h(Tt(Z))),()=>{Y=!1}},[e,P,h,t.pending]);let J=E!=null&&JSON.stringify(E)!==ee.current,ye=ue.useCallback(async()=>{if(t.pending||E==null)return;let Y=JSON.stringify(E);if(Y===ee.current)return;G("saving");try{await e.call("updateBlock",{blockId:P,fields:E}),ee.current=Y,u(re,E),G("saved"),setTimeout(()=>G((Z)=>Z==="saved"?"idle":Z),1500)}catch(Z){h(Tt(Z)),G("idle")}},[e,P,re,E,u,h,t.pending]),ce=ue.useRef(ye);ce.current=ye,ue.useEffect(()=>{if(E==null||t.pending)return;if(JSON.stringify(E)===ee.current)return;let Y=setTimeout(()=>void ce.current(),800);return()=>clearTimeout(Y)},[E,t.pending]);let se=(Y)=>R(Y);ue.useEffect(()=>{f(re,J)},[J,re,f]),ue.useEffect(()=>()=>{f(re,!1)},[re,f]);let _=r?.fieldsSchema??[],W=r?.name??t.block_type;return O.jsxDEV("div",{ref:U,className:`group relative rounded-lg px-2 py-1 transition-colors ${b?"ring-2 ring-brand-green":""} ${m?"opacity-40":""} ${t.pending?"pointer-events-none opacity-60":""}`,onDragOver:(Y)=>{Y.preventDefault(),v()},onDrop:(Y)=>{Y.preventDefault(),S()},children:[O.jsxDEV("span",{draggable:!0,onDragStart:(Y)=>{if(U.current)Y.dataTransfer.setDragImage(U.current,12,12);Y.dataTransfer.effectAllowed="move",Y.dataTransfer.setData("text/plain",""),y()},onDragEnd:w,className:"absolute -left-6 top-1.5 cursor-grab select-none px-1 text-fg-subtle opacity-0 transition-opacity hover:text-fg group-hover:opacity-100 active:cursor-grabbing",title:"Drag to reorder",children:"⠿"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex items-center gap-2 opacity-60 transition-opacity group-hover:opacity-100",children:[O.jsxDEV("button",{type:"button",className:"w-4 shrink-0 text-fg-subtle hover:text-fg",title:D?"Expand":"Collapse",onClick:()=>H((Y)=>!Y),children:D?"▸":"▾"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:W},void 0,!1,void 0,this),t.is_shared?O.jsxDEV("span",{className:"text-caption text-accent-strong",children:"shared"},void 0,!1,void 0,this):null,O.jsxDEV("span",{className:`text-caption ${J&&z!=="saving"?"text-accent-strong":"text-fg-subtle"}`,children:z==="saving"?"saving…":z==="saved"?"saved ✓":J?"● unsaved":""},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",size:"sm",isDisabled:a,onPress:()=>l(-1),children:"↑"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",size:"sm",isDisabled:i,onPress:()=>l(1),children:"↓"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",size:"sm",className:"text-danger",onPress:c,children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D?O.jsxDEV("div",{className:"cursor-pointer truncate pb-1 pl-6 text-small text-fg-subtle",onClick:()=>H(!1),children:E==null?"…":Yse(E)||O.jsxDEV("span",{className:"italic",children:"empty"},void 0,!1,void 0,this)},void 0,!1,void 0,this):O.jsxDEV("div",{className:"pb-1 pl-6",children:E==null?O.jsxDEV("p",{className:"text-small text-fg-subtle",children:"loading…"},void 0,!1,void 0,this):_.length===0?O.jsxDEV("p",{className:"text-small text-fg-subtle",children:"This block has no editable fields."},void 0,!1,void 0,this):O.jsxDEV(O.Fragment,{children:[O.jsxDEV(lh,{schema:_,value:E,onChange:se,api:e},void 0,!1,void 0,this),J||z==="saving"?O.jsxDEV("div",{className:"mt-2 flex items-center gap-2",children:[O.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:()=>void ye(),isDisabled:!J||z==="saving"||t.pending,children:z==="saving"?"Saving…":"Save now"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-caption text-fg-subtle",children:z==="saving"?"":"Autosaving…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function xj({allowed:e,btBySlug:t,onAdd:r,compact:a}){let[i,l]=ue.useState(!1),[c,u]=ue.useState(""),[f,h]=ue.useState(0),m=ue.useRef(null),b=ue.useMemo(()=>{let S=e.map((E)=>({slug:E,name:t.get(E)?.name??E})),w=c.trim().toLowerCase();return w?S.filter((E)=>E.name.toLowerCase().includes(w)||E.slug.toLowerCase().includes(w)):S},[e,t,c]);ue.useEffect(()=>{if(i)m.current?.focus()},[i]),ue.useEffect(()=>{h(0)},[c]);let y=()=>{l(!1),u("")},v=(S)=>{if(S)r(S);y()};if(!i){if(a)return O.jsxDEV("button",{type:"button",onClick:()=>l(!0),"aria-label":"Insert block here",className:"group/ins flex h-3 w-full items-center justify-center opacity-0 transition-opacity hover:opacity-100",children:O.jsxDEV("span",{className:"flex h-full w-full items-center",children:[O.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"mx-1 rounded bg-brand-green/15 px-1 text-caption leading-none text-brand-green",children:"+"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"h-px flex-1 bg-brand-green/40"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return O.jsxDEV("button",{type:"button",onClick:()=>l(!0),className:"flex w-full items-center gap-2 rounded-lg px-1 py-1.5 text-left text-small text-fg-subtle opacity-70 transition-colors hover:bg-surface-muted hover:text-fg-muted hover:opacity-100",children:[O.jsxDEV("span",{className:"text-base leading-none",children:"+"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Add block"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return O.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-card p-1 shadow-md",children:[O.jsxDEV("input",{ref:m,value:c,placeholder:"Filter blocks…",spellCheck:!1,className:"mb-1 w-full rounded-md bg-surface px-2.5 py-1.5 text-small text-fg outline-none placeholder:text-fg-subtle",onChange:(S)=>u(S.target.value),onBlur:()=>setTimeout(y,120),onKeyDown:(S)=>{if(S.key==="Escape")y();else if(S.key==="ArrowDown")S.preventDefault(),h((w)=>(w+1)%Math.max(b.length,1));else if(S.key==="ArrowUp")S.preventDefault(),h((w)=>(w-1+Math.max(b.length,1))%Math.max(b.length,1));else if(S.key==="Enter")S.preventDefault(),v(b[f]?.slug)}},void 0,!1,void 0,this),O.jsxDEV("div",{className:"max-h-64 overflow-auto",children:b.length===0?O.jsxDEV("div",{className:"px-2.5 py-2 text-small text-fg-subtle",children:"No matching block types"},void 0,!1,void 0,this):b.map((S,w)=>O.jsxDEV("button",{type:"button",onMouseEnter:()=>h(w),onMouseDown:(E)=>E.preventDefault(),onClick:()=>v(S.slug),className:`flex w-full items-center rounded-md px-2.5 py-1.5 text-left text-small ${w===f?"bg-surface-muted text-fg":"text-fg-muted hover:bg-surface-muted"}`,children:S.name},S.slug,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Lse({api:e,page:t,onSaved:r,onError:a}){let[i,l]=ue.useState(t.title),[c,u]=ue.useState(t.slug),[f,h]=ue.useState(t.locale),[m,b]=ue.useState(!1),[y,v]=ue.useState(!1);return ue.useEffect(()=>{l(t.title),u(t.slug),h(t.locale)},[t.id,t.title,t.slug,t.locale]),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(ml,{children:"Page"},void 0,!1,void 0,this),m?O.jsxDEV(uh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV($n,{label:"Title",value:i,onChange:l},void 0,!1,void 0,this),O.jsxDEV($n,{label:"Slug",value:c,onChange:u},void 0,!1,void 0,this),O.jsxDEV($n,{label:"Locale",value:f,onChange:h},void 0,!1,void 0,this),O.jsxDEV(Ae,{onPress:async()=>{v(!0);try{let w=await e.call("updatePage",{pageId:t.id,title:i,slug:c,locale:f});if(w?.page)r(w.page);b(!0),setTimeout(()=>b(!1),1500)}catch(w){a(Tt(w))}finally{v(!1)}},isDisabled:y||!i.trim()||!c.trim(),children:y?"Saving…":"Save"},void 0,!1,void 0,this),O.jsxDEV(r2,{children:[O.jsxDEV("span",{children:"Status"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function _se({api:e,page:t,schema:r,initialFields:a,onDirtyChange:i,onError:l}){let[c,u]=ue.useState(a),[f,h]=ue.useState(!1),[m,b]=ue.useState(!1),y=ue.useRef(JSON.stringify(a)),v=JSON.stringify(c)!==y.current,S=ue.useRef(t.id);return ue.useEffect(()=>{if(S.current===t.id)return;S.current=t.id,u(a),y.current=JSON.stringify(a)},[t.id,a]),ue.useEffect(()=>{i("page",v)},[v,i]),ue.useEffect(()=>()=>{i("page",!1)},[i]),O.jsxDEV("div",{className:"mb-10",children:[O.jsxDEV("div",{className:"mb-1 flex items-center gap-2",children:[O.jsxDEV("span",{className:"text-caption font-medium uppercase tracking-wide text-fg-subtle",children:"Content"},void 0,!1,void 0,this),v?O.jsxDEV("span",{className:"text-[11px] text-accent-strong",children:"● unsaved"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),f?O.jsxDEV(uh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(lh,{schema:r,value:c,onChange:u,api:e},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-3",children:O.jsxDEV(Ae,{onPress:async()=>{let E=JSON.stringify(c);b(!0);try{await e.call("updatePage",{pageId:t.id,fields:c}),y.current=E,h(!0),setTimeout(()=>h(!1),1500)}catch(R){l(Tt(R))}finally{b(!1)}},isDisabled:m,children:m?"Saving…":"Save"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ise({api:e,page:t,onError:r}){let[a,i]=ue.useState({metaTitle:t.metaTitle??"",metaDescription:t.metaDescription??"",canonicalUrl:t.canonicalUrl??"",robots:t.robots??"",ogTitle:t.ogTitle??"",ogDescription:t.ogDescription??""}),[l,c]=ue.useState(!1),u=async()=>{try{await e.call("updatePageSeo",{pageId:t.id,...a}),c(!0),setTimeout(()=>c(!1),1500)}catch(h){r(Tt(h))}},f=(h,m,b=!1)=>b?O.jsxDEV(Px,{label:m,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this):O.jsxDEV($n,{label:m,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this);return O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV(ml,{children:"SEO"},void 0,!1,void 0,this),l?O.jsxDEV(uh,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,f("metaTitle","Meta title"),f("metaDescription","Meta description",!0),f("canonicalUrl","Canonical URL"),f("robots","Robots (e.g. noindex)"),f("ogTitle","OG title"),f("ogDescription","OG description",!0),O.jsxDEV(Ae,{className:"w-full",onPress:u,children:"Save SEO"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Bse({api:e,page:t,onChanged:r,onError:a}){let i=async(u,f)=>{try{let h=await e.call(u,{pageId:t.id,...f});if(h?.page)r(h.page)}catch(h){a(Tt(h))}},l=String(t.status),c=l==="review"?[{label:"Approve (publish)",action:"approve"},{label:"Reject",action:"reject",variant:"secondary"},{label:"Publish directly",action:"publishPage",variant:"secondary"}]:l==="published"?[{label:"Unpublish",action:"unpublishPage",variant:"secondary"}]:[{label:"Publish",action:"publishPage"},{label:"Submit for review",action:"submitForReview",variant:"secondary"}];return O.jsxDEV("div",{children:[O.jsxDEV(ml,{children:"Workflow"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mb-3 flex items-center gap-2 text-[13px] text-fg-muted",children:[O.jsxDEV("span",{className:"text-fg-subtle",children:"Status"},void 0,!1,void 0,this),O.jsxDEV(qc,{status:t.status,children:t.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:c.map((u)=>O.jsxDEV(Ae,{variant:u.variant,onPress:()=>i(u.action),children:u.label},u.action,!1,void 0,this))},void 0,!1,void 0,this),O.jsxDEV("p",{className:"mt-2.5 text-fg-subtle",children:"Publish needs a reviewer/admin role; submit-for-review is editor-gated."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function zse({api:e,page:t,onError:r}){let[a,i]=ue.useState([]),[l,c]=ue.useState(""),u=ue.useCallback(()=>e.call("listTranslations",{pageId:t.id}).then(i).catch((h)=>r(Tt(h))),[e,t.id,r]);ue.useEffect(()=>{u()},[u]);let f=async()=>{try{await e.call("createTranslation",{pageId:t.id,locale:l}),c(""),u()}catch(h){r(Tt(h))}};return O.jsxDEV("div",{children:[O.jsxDEV(ml,{children:"Translations"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:a.map((h)=>O.jsxDEV("div",{className:Hd,children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:h.locale},void 0,!1,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:["/",h.slug]},void 0,!0,void 0,this),O.jsxDEV(qc,{status:h.status,children:h.status},void 0,!1,void 0,this)]},h.id,!0,void 0,this))},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex items-end gap-1.5",children:[O.jsxDEV($n,{label:"",value:l,onChange:c,placeholder:"locale (e.g. cs)"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"secondary",onPress:f,isDisabled:!l,children:"add"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Hse({api:e,pageId:t,onError:r}){let[a,i]=ue.useState([]);return ue.useEffect(()=>{e.listPageAudit(t).then(i).catch((l)=>r(Tt(l)))},[e,t,r]),O.jsxDEV("div",{children:[O.jsxDEV(ml,{children:"Audit trail"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((l)=>O.jsxDEV("div",{className:`${Hd} text-xs`,children:[O.jsxDEV("span",{className:"rounded-full bg-surface-muted px-2 py-0.5 font-mono text-xs text-fg-muted",children:l.action},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:[l.fromStatus," → ",l.toStatus]},void 0,!0,void 0,this),O.jsxDEV("span",{className:"text-fg-subtle",children:l.actor??"system"},void 0,!1,void 0,this)]},l.id,!0,void 0,this)),a.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No history yet."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Rj({api:e,onError:t}){let[r,a]=ue.useState([]),[i,l]=ue.useState(0),[c,u]=ue.useState(!1),[f,h]=ue.useState(null),[m,b]=ue.useState(!1),y=ue.useCallback((S)=>{e.listMedia($j,S).then((w)=>{a((E)=>S===0?w:[...E,...w]),u(w.length===$j),l(S+w.length)}).catch((w)=>t(Tt(w)))},[e,t]);ue.useEffect(()=>{y(0)},[y]);let v=async(S)=>{if(!S?.length)return;b(!0),t("");try{for(let w of Array.from(S))await e.uploadMedia(w);y(0)}catch(w){t(Tt(w))}finally{b(!1)}};return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Pb,{lead:"Media",em:r.length===0?"None yet":r.length===1?"1 file":`${r.length}${c?"+":""} files`,children:O.jsxDEV(n2,{text:"Let's",em:"upload something",children:O.jsxDEV("label",{className:`inline-flex shrink-0 cursor-pointer items-center rounded-full bg-surface-inverted px-6 py-3 text-compact text-fg-inverted ${m?"pointer-events-none opacity-50":""}`,children:[m?"Uploading…":"+ Upload",O.jsxDEV("input",{type:"file",multiple:!0,hidden:!0,disabled:m,onChange:(S)=>{v(S.target.files),S.target.value=""}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:ch,children:[r.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No media yet. Upload images to use them in blocks and SEO."},void 0,!1,void 0,this):O.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:r.map((S)=>O.jsxDEV("div",{className:`cursor-pointer overflow-hidden rounded-lg border bg-surface-card ${f?.id===S.id?"border-fg":"border-border"}`,onClick:()=>h(S),children:[Mj(S)?O.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${S.file.key}`),alt:S.alt??""},void 0,!1,void 0,this):O.jsxDEV("div",{className:"flex h-[130px] items-center justify-center bg-surface-muted font-mono text-xs text-fg-subtle",children:Nj(S)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"truncate px-2 py-1.5 text-[11px] text-fg-muted",children:S.file.filename??S.id},void 0,!1,void 0,this)]},S.id,!0,void 0,this))},void 0,!1,void 0,this),c?O.jsxDEV("div",{className:"mt-3.5 text-center",children:O.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:()=>y(i),children:"Load more"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,f?O.jsxDEV(Use,{api:e,media:f,onClose:()=>h(null),onSaved:(S)=>{h(S),a((w)=>w.map((E)=>E.id===S.id?S:E))},onDeleted:(S)=>{h(null),a((w)=>w.filter((E)=>E.id!==S))},onError:t},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Use({api:e,media:t,onClose:r,onSaved:a,onDeleted:i,onError:l}){let[c,u]=ue.useState(t.alt??""),[f,h]=ue.useState(!1);ue.useEffect(()=>u(t.alt??""),[t]);let m=e.resolve(`/media/${t.file.key}`),b=async()=>{h(!0);try{a(await e.updateMedia(t.id,c||null))}catch(v){l(Tt(v))}finally{h(!1)}},y=async()=>{if(!confirm("Delete this file permanently? If a block or page still references it, that image will break — this cannot be undone."))return;h(!0);try{await e.deleteMedia(t.id),i(t.id)}catch(v){l(Tt(v))}finally{h(!1)}};return O.jsxDEV(Nk,{onClose:r,wide:!0,children:[O.jsxDEV(Ok,{children:[O.jsxDEV(Db,{children:"Media"},void 0,!1,void 0,this)," ",t.file.filename??""]},void 0,!0,void 0,this),Mj(t)?O.jsxDEV("img",{className:"mx-auto mb-3.5 block max-h-[340px] max-w-full rounded-lg bg-surface-muted object-contain",src:m,alt:t.alt??""},void 0,!1,void 0,this):O.jsxDEV("div",{className:"mb-3.5 flex h-[200px] items-center justify-center rounded-lg bg-surface-muted font-mono text-fg-subtle",children:Nj(t)},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mb-4",children:O.jsxDEV($n,{label:"Alt text (for accessibility & SEO)",value:c,onChange:u,placeholder:"Describe the image…"},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV(r2,{children:[O.jsxDEV("span",{children:"Type"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.file.contentType??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Size"},void 0,!1,void 0,this),O.jsxDEV("span",{children:Gse(t.file.size)},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Uploaded"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t.file.uploadedAt?new Date(t.file.uploadedAt).toLocaleString():t.createdAt??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"URL"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"break-all",children:O.jsxDEV("a",{className:"underline underline-offset-2",href:m,target:"_blank",rel:"noreferrer",children:["/media/",t.file.key]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"mt-3.5 flex items-center gap-2",children:[O.jsxDEV(Ae,{onPress:b,isDisabled:f||c===(t.alt??""),children:"Save"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:()=>navigator.clipboard?.writeText(m),children:"Copy URL"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"flex-1"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",className:"text-danger",onPress:y,isDisabled:f,children:"Delete"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",onPress:r,children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Fse(e){let t=e.roles;if(Array.isArray(t))return t.filter((r)=>typeof r==="string");if(typeof t==="string")try{let r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}return[]}function kj({api:e,me:t,onError:r}){let[a,i]=ue.useState([]),[l,c]=ue.useState(!1),[u,f]=ue.useState(""),h=ue.useCallback(()=>{e.call("listUsers",{limit:200}).then(i).catch((v)=>r(Tt(v)))},[e,r]);ue.useEffect(()=>{h()},[h]);let m=async(v,S)=>{f(v.username);try{await e.call("setUserRoles",{username:v.username,roles:S}),h()}catch(w){r(Tt(w))}finally{f("")}},b=async(v,S)=>{f(v.username);try{await e.call("setUserActive",{username:v.username,active:S}),h()}catch(w){r(Tt(w))}finally{f("")}},y=async(v)=>{if(!confirm(`Delete user ${v.username}? This cannot be undone.`))return;f(v.username);try{await e.call("deleteUser",{username:v.username}),h()}catch(S){r(Tt(S))}finally{f("")}};return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Pb,{lead:"Users",em:a.length===0?"None yet":a.length===1?"1 account":`${a.length} accounts`,children:O.jsxDEV(n2,{text:"Let's",em:"invite someone",children:O.jsxDEV(Ae,{className:"shrink-0",onPress:()=>c(!0),children:"+ Invite"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.jsxDEV("div",{className:ch,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((v)=>{let S=Fse(v),w=t?.userId===v.username,E=v.active===void 0||v.active===null?!0:Boolean(Number(v.active));return O.jsxDEV("div",{className:`${Hd} flex-wrap items-start`,children:[O.jsxDEV("div",{className:"flex min-w-[200px] flex-1 flex-col gap-0.5",children:[O.jsxDEV("span",{className:"font-semibold",children:[v.username,w?O.jsxDEV("span",{className:"ml-1.5 font-normal text-fg-subtle",children:"(you)"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),v.email&&v.email!==v.username?O.jsxDEV("span",{className:"text-xs text-fg-subtle",children:v.email},void 0,!1,void 0,this):null,v.createdAt?O.jsxDEV("span",{className:"text-[11px] text-fg-subtle",children:["joined ",new Date(Number(v.createdAt)).toLocaleDateString()]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),O.jsxDEV(Vse,{value:S,disabled:u===v.username,onSave:(R)=>m(v,R)},void 0,!1,void 0,this),O.jsxDEV(qc,{status:E?"active":"inactive",children:E?"active":"inactive"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",size:"sm",isDisabled:u===v.username||w,onPress:()=>b(v,!E),children:E?"Deactivate":"Activate"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",size:"sm",className:"text-danger",isDisabled:u===v.username||w,onPress:()=>y(v),children:"Delete"},void 0,!1,void 0,this)]},v.username,!0,void 0,this)}),a.length===0?O.jsxDEV("p",{className:"text-fg-subtle",children:"No users yet. Invite someone to get started."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l?O.jsxDEV(jse,{api:e,onClose:()=>c(!1),onInvited:()=>{c(!1),h()},onError:r},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function Vse({value:e,disabled:t,onSave:r}){let[a,i]=ue.useState(e.join(", ")),[l,c]=ue.useState(!1);ue.useEffect(()=>{i(e.join(", "))},[e]);let u=()=>{c(!1);let f=a.split(",").map((h)=>h.trim()).filter(Boolean);if(f.length===0){i(e.join(", "));return}if(f.length===e.length&&f.every((h,m)=>h===e[m]))return;r(f)};if(l)return O.jsxDEV("input",{autoFocus:!0,className:"h-10 w-[220px] rounded-lg border border-border bg-surface-card px-4 text-sm text-fg outline-none focus:border-brand-green",value:a,disabled:t,onChange:(f)=>i(f.target.value),onBlur:u,onKeyDown:(f)=>{if(f.key==="Enter")u();if(f.key==="Escape")i(e.join(", ")),c(!1)}},void 0,!1,void 0,this);return O.jsxDEV("span",{className:"flex cursor-pointer flex-wrap gap-1",onClick:()=>c(!0),title:"Click to edit",children:e.length===0?O.jsxDEV(qc,{children:"no roles"},void 0,!1,void 0,this):e.map((f)=>O.jsxDEV(qc,{status:f==="admin"?"published":void 0,children:f},f,!1,void 0,this))},void 0,!1,void 0,this)}function jse({api:e,onClose:t,onInvited:r,onError:a}){let[i,l]=ue.useState(""),[c,u]=ue.useState("editor"),[f,h]=ue.useState(!1);return O.jsxDEV(Nk,{onClose:t,children:[O.jsxDEV(Ok,{children:["Invite an ",O.jsxDEV(Db,{children:"editor"},void 0,!1,void 0,this)," or teammate"]},void 0,!0,void 0,this),O.jsxDEV("p",{className:"-mt-2 mb-4 text-fg-subtle",children:"They'll get a one-time magic link that logs them in and creates their account."},void 0,!1,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV($n,{label:"Email",type:"email",autoFocus:!0,value:i,onChange:l,placeholder:"them@example.com"},void 0,!1,void 0,this),O.jsxDEV($n,{label:"Roles (comma-separated — e.g. editor, reviewer, admin)",value:c,onChange:u,placeholder:"editor"},void 0,!1,void 0,this),O.jsxDEV("div",{className:"mt-2 flex justify-end gap-2",children:[O.jsxDEV(Ae,{variant:"ghost",onPress:t,children:"Cancel"},void 0,!1,void 0,this),O.jsxDEV(Ae,{onPress:async()=>{h(!0);try{let b=c.split(",").map((y)=>y.trim()).filter(Boolean);await e.call("inviteUser",{email:i,roles:b}),r()}catch(b){a(Tt(b))}finally{h(!1)}},isDisabled:f||!i,children:f?"Sending…":"Send invite"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Aj({api:e,cfg:t,me:r,onSignOut:a,onError:i}){return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Pb,{lead:"Settings",em:r?.userId??"your account"},void 0,!1,void 0,this),O.jsxDEV("div",{className:`${ch} grid grid-cols-2 gap-5 max-[820px]:grid-cols-1`,children:[O.jsxDEV(Kse,{api:e,me:r,onError:i,onSignOut:a},void 0,!1,void 0,this),O.jsxDEV(qse,{cfg:t,me:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Kse({api:e,me:t,onError:r,onSignOut:a}){let[i,l]=ue.useState(""),[c,u]=ue.useState(""),[f,h]=ue.useState(""),[m,b]=ue.useState(""),[y,v]=ue.useState(!1),S=(R)=>{b(R),setTimeout(()=>b(""),1800)},w=async()=>{v(!0);try{await e.call("changeEmail",{email:i}),l(""),S("Contact email updated")}catch(R){r(Tt(R))}finally{v(!1)}},E=async()=>{v(!0);try{await e.call("changePassword",{currentPassword:c,newPassword:f}),u(""),h(""),S("Password updated")}catch(R){r(Tt(R))}finally{v(!1)}};return O.jsxDEV(Sj,{children:[O.jsxDEV(ml,{children:"My account"},void 0,!1,void 0,this),m?O.jsxDEV(uh,{ok:!0,children:m},void 0,!1,void 0,this):null,O.jsxDEV(r2,{className:"mb-4",children:[O.jsxDEV("span",{children:"Username"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t?.userId??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Roles"},void 0,!1,void 0,this),O.jsxDEV("span",{children:(t?.roles??[]).join(", ")||"—"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.jsxDEV("div",{className:"flex flex-col gap-4",children:[O.jsxDEV($n,{label:"Change contact email",type:"email",value:i,onChange:l,placeholder:"you@example.com"},void 0,!1,void 0,this),O.jsxDEV(Ae,{className:"w-full",onPress:w,isDisabled:y||!i,children:"Save email"},void 0,!1,void 0,this),O.jsxDEV($n,{label:"Current password",type:"password",value:c,onChange:u,autoComplete:"current-password"},void 0,!1,void 0,this),O.jsxDEV($n,{label:"New password (at least 8 characters)",type:"password",value:f,onChange:h,autoComplete:"new-password"},void 0,!1,void 0,this),O.jsxDEV(Ae,{className:"w-full",onPress:E,isDisabled:y||f.length<8||c.length===0,children:"Change password"},void 0,!1,void 0,this),O.jsxDEV(Ae,{variant:"ghost",className:"mt-2 w-full text-danger",onPress:a,children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function qse({cfg:e,me:t}){return O.jsxDEV(Sj,{children:[O.jsxDEV(ml,{children:"About"},void 0,!1,void 0,this),O.jsxDEV(r2,{children:[O.jsxDEV("span",{children:"Tenant"},void 0,!1,void 0,this),O.jsxDEV("span",{children:e.tenant||"main"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"API"},void 0,!1,void 0,this),O.jsxDEV("span",{className:"break-all",children:e.baseUrl},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Signed in as"},void 0,!1,void 0,this),O.jsxDEV("span",{children:t?.userId??"—"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"Editor"},void 0,!1,void 0,this),O.jsxDEV("span",{children:"pramen · cms-editor"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Mj(e){return(e.file.contentType??"").startsWith("image/")}function Nj(e){let t=(e.file.contentType??"").split("/")[1];return(e.file.filename?.split(".").pop()??t??"file").slice(0,5).toUpperCase()}function Gse(e){if(!e||e<=0)return"—";let t=["B","KB","MB","GB"],r=0,a=e;while(a>=1024&&r<t.length-1)a/=1024,r++;return`${a<10&&r>0?a.toFixed(1):Math.round(a)} ${t[r]}`}function Tt(e){if(e instanceof _p)return e.message;return e instanceof Error?e.message:String(e)}function Wse(e){return e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/\s+/g," ").trim()}function Yse(e){let t=Object.values(e).find((a)=>typeof a==="string"&&a.trim());if(typeof t!=="string")return"";let r=Wse(t);return r.length>90?r.slice(0,90)+"…":r}function Jse(e,t,r,a,i){let l=r+a;if(l<0||l>=e.length)return;let c=e.map((u)=>u.id);[c[r],c[l]]=[c[l],c[r]],i(t,c)}var ue,O,Mk,Hd="flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",ch="mx-auto max-w-[1200px] px-7 pb-8 pt-2",Db=({children:e})=>O.jsxDEV("span",{className:"text-fg-subtle",children:e},void 0,!1,void 0,this),vj=50,$j=60;var Gc=N(()=>{Yi();G3();bj();ue=j(ae(),1),O=j(Et(),1),Mk=["settings","seo","workflow","i18n","audit"]});var Oj={};ic(Oj,{default:()=>Xse});var Lb,Xse;var Dj=N(()=>{ua();Yi();Ji();Gc();Lb=j(Et(),1),Xse=dr().params({slug:"string",id:"string"}).route("/collections/:slug/:id").render(function({params:t}){let{api:r,collections:a,setError:i}=kr(),l=Rr(),c=a.find((f)=>f.slug===t.slug),u=()=>l("collection",{params:{slug:t.slug}});if(!c)return Lb.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Lb.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?Lb.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return Lb.jsxDEV(Ej,{api:r,def:c,id:t.id==="new"?null:t.id,onSaved:u,onDeleted:u,onBack:u,onError:i},void 0,!1,void 0,this)})});var Pj={};ic(Pj,{default:()=>Qse});var _b,Qse;var Lj=N(()=>{ua();Yi();Ji();Gc();_b=j(Et(),1),Qse=dr().params({slug:"string"}).route("/collections/:slug").render(function({params:t}){let{api:r,collections:a,setError:i}=kr(),l=Rr(),c=a.find((u)=>u.slug===t.slug);if(!c)return _b.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[_b.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?_b.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← Pages"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return _b.jsxDEV(wj,{api:r,def:c,onOpen:(u)=>l("collection-item",{params:{slug:c.slug,id:u}}),onNew:()=>l("collection-item",{params:{slug:c.slug,id:"new"}}),onError:i},void 0,!1,void 0,this)})});var _j={};ic(_j,{default:()=>Zse});var dh,Ij,Zse;var Bj=N(()=>{ua();Ji();Gc();dh=j(ae(),1),Ij=j(Et(),1),Zse=dr().route("/").render(function(){let{api:t,setError:r,collections:a}=kr(),i=Rr(),[l,c]=dh.useState([]),[u,f]=dh.useState([]),h=typeof window<"u"&&window.PRAMEN_CMS_EDITOR?.hidePages===!0,m=a[0]?.slug;dh.useEffect(()=>{if(h&&m)i("collection",{params:{slug:m},replace:!0})},[h,m,i]);let b=()=>t.listPages().then(c).catch((y)=>r(Tt(y)));if(dh.useEffect(()=>{if(h)return;b(),t.listBlockTypes().then(f).catch((y)=>r(Tt(y)))},[t,h]),h&&m)return null;return Ij.jsxDEV(Cj,{api:t,pages:l,blockTypes:u,onOpen:(y)=>i("page",{params:{pageId:y.id}}),onCreated:b,onError:r},void 0,!1,void 0,this)})});var zj={};ic(zj,{default:()=>ele});var Hj,ele;var Uj=N(()=>{ua();Ji();Gc();Hj=j(Et(),1),ele=dr().route("/media").render(function(){let{api:t,setError:r}=kr();return Hj.jsxDEV(Rj,{api:t,onError:r},void 0,!1,void 0,this)})});var Fj={};ic(Fj,{default:()=>tle});var fh,Ud,tle;var Vj=N(()=>{ua();Yi();Ji();Gc();fh=j(ae(),1),Ud=j(Et(),1),tle=dr().params({pageId:"string",tab:"?string"}).route("/pages/:pageId").render(function({params:t}){let{api:r,setError:a,setNavGuard:i}=kr(),l=Rr(),[c,u]=fh.useState(null),[f,h]=fh.useState([]),[m,b]=fh.useState(!1);fh.useEffect(()=>{let S=!0;return b(!1),r.listPages().then((w)=>{if(!S)return;let E=w.find((R)=>R.id===t.pageId)??null;u(E),b(!E)}).catch((w)=>a(Tt(w))),r.listBlockTypes().then((w)=>S&&h(w)).catch((w)=>a(Tt(w))),()=>{S=!1}},[r,t.pageId,a]);let y=Mk.includes(t.tab)?t.tab:"settings",v=(S)=>l("page",{params:{pageId:t.pageId,tab:S},replace:!0});if(m)return Ud.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Ud.jsxDEV("p",{className:"text-fg-subtle",children:"Page not found."},void 0,!1,void 0,this),Ud.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← all pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(!c)return Ud.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Ud.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);return Ud.jsxDEV(Tj,{api:r,page:c,blockTypes:f,tab:y,onTab:v,onBack:()=>l("home"),onChange:u,registerGuard:i},void 0,!1,void 0,this)})});var jj={};ic(jj,{default:()=>nle});var Kj,nle;var qj=N(()=>{ua();Ji();Gc();Kj=j(Et(),1),nle=dr().route("/settings").render(function(){let{api:t,cfg:r,me:a,setError:i,reconfigure:l}=kr();return Kj.jsxDEV(Aj,{api:t,cfg:r,me:a,onSignOut:l,onError:i},void 0,!1,void 0,this)})});var Gj={};ic(Gj,{default:()=>rle});var Fd,rle;var Wj=N(()=>{ua();Yi();Ji();Gc();Fd=j(Et(),1),rle=dr().route("/users").render(function(){let{api:t,me:r,isAdmin:a,setError:i}=kr(),l=Rr();if(r===null)return Fd.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Fd.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!a)return Fd.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Fd.jsxDEV("p",{className:"text-fg-subtle",children:"Admins only."},void 0,!1,void 0,this),Fd.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>l("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return Fd.jsxDEV(kj,{api:t,me:r,onError:i},void 0,!1,void 0,this)})});var Yj={};ic(Yj,{default:()=>ole});var Wc,ole;var Jj=N(()=>{ua();Yi();Wc=j(Et(),1),ole=dr().render(function(){let t=Rr();return Wc.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:[Wc.jsxDEV("h1",{className:"m-0 text-[56px] font-normal leading-[1.05] tracking-[-0.01em] max-[820px]:text-[40px]",children:[Wc.jsxDEV("span",{className:"block text-fg-subtle",children:"Not found"},void 0,!1,void 0,this),Wc.jsxDEV("span",{className:"block text-fg",children:"Nothing lives here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Wc.jsxDEV("div",{className:"mt-4 flex items-center gap-2",children:[Wc.jsxDEV("p",{className:"text-fg-subtle",children:"That page doesn't exist."},void 0,!1,void 0,this),Wc.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:()=>t("home"),children:"← back to pages"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)})});ua();var iK=j(ae(),1),sK=j(_6(),1);ua();var gl=j(ae(),1);ua();Yi();Ji();var jx=j(ae(),1),Sn=j(Et(),1),wI="pramen.cms.theme";function Y3(){let{isAdmin:e,collections:t,error:r,reconfigure:a,confirmNavigation:i}=kr(),l=Rr(),{pathname:c}=sv(),u=(w)=>()=>{if(i())w()},[f,h]=jx.useState(()=>typeof localStorage<"u"?localStorage.getItem(wI)??"light":"light");jx.useEffect(()=>{document.documentElement.dataset.theme=f==="dark"?"dark":"light",localStorage.setItem(wI,f)},[f]);let m=c.startsWith("/collections/")?c.split("/")[2]:void 0,b=m?`col:${m}`:c.startsWith("/pages")||c==="/"?"pages":c.startsWith("/media")?"media":c.startsWith("/users")?"users":c.startsWith("/settings")?"settings":"",y=(w)=>b===w?"bg-surface-muted text-fg":"text-fg-muted",v=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.extraNav??[]:[],S=typeof window<"u"?window.PRAMEN_CMS_EDITOR?.hidePages===!0:!1;return Sn.jsxDEV("div",{className:"min-h-screen bg-surface text-fg",children:[Sn.jsxDEV(Pg,{className:"sticky top-0 z-10 bg-surface px-7",children:[Sn.jsxDEV(Pg.Brand,{children:Sn.jsxDEV("button",{type:"button",onClick:u(()=>l("home")),"aria-label":"pramen cms — home",className:"flex items-baseline gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-surface-muted",children:[Sn.jsxDEV("span",{className:"text-callout font-bold tracking-[0.01em] text-fg",children:"pramen"},void 0,!1,void 0,this),Sn.jsxDEV("span",{className:"text-fg-subtle",children:"· cms"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Sn.jsxDEV(Pg.Nav,{"aria-label":"Primary",children:[S?null:Sn.jsxDEV(Ae,{variant:"ghost",size:"sm",className:y("pages"),onPress:u(()=>l("home")),children:"Pages"},void 0,!1,void 0,this),t.map((w)=>Sn.jsxDEV(Ae,{variant:"ghost",size:"sm",className:y(`col:${w.slug}`),onPress:u(()=>l("collection",{params:{slug:w.slug}})),children:[w.icon?`${w.icon} `:"",w.pluralLabel]},w.slug,!0,void 0,this)),Sn.jsxDEV(Ae,{variant:"ghost",size:"sm",className:y("media"),onPress:u(()=>l("media")),children:"Media"},void 0,!1,void 0,this),e?Sn.jsxDEV(Ae,{variant:"ghost",size:"sm",className:y("users"),onPress:u(()=>l("users")),children:"Users"},void 0,!1,void 0,this):null,Sn.jsxDEV(Ae,{variant:"ghost",size:"sm",className:y("settings"),onPress:u(()=>l("settings")),children:"Settings"},void 0,!1,void 0,this),v.map((w)=>Sn.jsxDEV("a",{href:w.href,target:"_blank",rel:"noopener noreferrer",className:"rounded-md px-2.5 py-1.5 text-small text-fg-muted transition-colors hover:bg-surface-muted hover:text-fg",children:w.label},w.href,!1,void 0,this))]},void 0,!0,void 0,this),Sn.jsxDEV(Pg.Actions,{children:[Sn.jsxDEV(Ae,{variant:"ghost",size:"sm","aria-label":f==="dark"?"Switch to light theme":"Switch to dark theme",onPress:()=>h(f==="dark"?"light":"dark"),children:f==="dark"?Sn.jsxDEV(rI,{className:"h-4 w-4"},void 0,!1,void 0,this):Sn.jsxDEV(oI,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Sn.jsxDEV(Ae,{variant:"ghost",size:"sm",onPress:u(a),children:"sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r?Sn.jsxDEV(V_,{variant:"outlined",padding:"none",className:"mx-7 mt-2 border-danger px-4 py-2.5",children:Sn.jsxDEV(zx,{size:"small",className:"text-danger",children:r},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,Sn.jsxDEV(Xf,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Xj=()=>Promise.resolve().then(() => (Dj(),Oj)).then((e)=>({default:e.default.component})),Qj=()=>Promise.resolve().then(() => (Lj(),Pj)).then((e)=>({default:e.default.component})),Zj=()=>Promise.resolve().then(() => (Bj(),_j)).then((e)=>({default:e.default.component})),eK=()=>Promise.resolve().then(() => (Uj(),zj)).then((e)=>({default:e.default.component})),tK=()=>Promise.resolve().then(() => (Vj(),Fj)).then((e)=>({default:e.default.component})),nK=()=>Promise.resolve().then(() => (qj(),jj)).then((e)=>({default:e.default.component})),rK=()=>Promise.resolve().then(() => (Wj(),Gj)).then((e)=>({default:e.default.component})),oK=()=>Promise.resolve().then(() => (Jj(),Yj)).then((e)=>({default:e.default.component})),Dk={"collection-item":"/collections/:slug/:id",collection:"/collections/:slug",home:"/",media:"/media",page:"/pages/:pageId",settings:"/settings",users:"/users"},ale=[{path:"/",component:Y3,isLayout:!0,children:[{path:"/collection-item",matchPath:"/collections/:slug/:id",component:gl.lazy(Xj),preload:Xj},{path:"/collection",matchPath:"/collections/:slug",component:gl.lazy(Qj),preload:Qj},{path:"/home",matchPath:"/",component:gl.lazy(Zj),preload:Zj},{path:"/media",component:gl.lazy(eK),preload:eK},{path:"/page",matchPath:"/pages/:pageId",component:gl.lazy(tK),preload:tK},{path:"/settings",component:gl.lazy(nK),preload:nK},{path:"/users",component:gl.lazy(rK),preload:rK},{path:"/:__notFound+",component:gl.lazy(oK),preload:oK}]}],Pk=Kw(ale);Ji();var o2=j(Et(),1),aK=document.getElementById("app");if(aK)sK.createRoot(aK).render(o2.jsxDEV(iK.StrictMode,{children:o2.jsxDEV(CI,{children:o2.jsxDEV(iv,{routes:Pk,pageRegistry:Dk},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this));