@pramen/cms-editor 0.0.46 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/main.t7eeyc52.js +396 -0
- package/package.json +1 -1
- package/src/fields.tsx +318 -28
- package/src/types.ts +2 -0
- package/dist/main.w2tw3v4q.js +0 -396
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
var UW=Object.create;var{getPrototypeOf:FW,defineProperty:Bw,getOwnPropertyNames:VW}=Object;var jW=Object.prototype.hasOwnProperty;function KW(e){return this[e]}var qW,GW,j=(e,t,r)=>{var a=e!=null&&typeof e==="object";if(a){var i=t?qW??=new WeakMap:GW??=new WeakMap,l=i.get(e);if(l)return l}r=e!=null?UW(FW(e)):{};let c=t||!e||!e.__esModule?Bw(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let u of VW(e))if(!jW.call(c,u))Bw(c,u,{get:KW.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 WW=(e)=>e;function YW(e,t){this[e]=WW.bind(null,t)}var ic=(e,t)=>{for(var r in t)Bw(e,r,{get:t[r],enumerable:!0,configurable:!0,set:YW.bind(t,r)})};var N=(e,t)=>()=>(e&&(t=e(e=0)),t);class Qy{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 qf(e,t){let r=t.pathname,a=r.split("/").filter(Boolean);return zw(e.root,a,0,{},r)}function zw(e,t,r,a,i){if(r===t.length){if(e.route)return y6(e.route.chain,a,i);return null}let l=t[r],c=e.staticChildren.get(l);if(c){let u=zw(c,t,r+1,a,i);if(u)return u}if(e.dynamicChild){let u={...a,[e.dynamicChild.paramName]:decodeURIComponent(l)},f=zw(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 y6(e.catchAllChild.chain,f,i)}return null}function y6(e,t,r){return e.map((a)=>({node:a,params:t,pathname:r}))}function Hw(e){let t=e.endsWith("+");return{name:t?e.slice(1,-1):e.slice(1),isCatchAll:t}}function jm(e){let t=[];for(let r of e.split("/"))if(r.startsWith(":"))t.push(Hw(r).name);return t}class Zy{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 Qy(e.loaderCacheSize):void 0;let t=this.adapter.getCurrentURL(),r=this.createMatchUrl(t),a=qf(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=qf(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 g of this.blockers){if(this.navigationId!==c)return;if(!await g())throw new Uw}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=qf(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:g,isCatchAll:b}=Hw(h),y=t?.[g];if(y===void 0)i.push(g);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(jm(e)),c=new URLSearchParams;if(t){for(let[h,g]of Object.entries(t))if(!l.has(h)&&g!==void 0)c.set(h,g)}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=jm(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=qf(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 Uw;var Fw=N(()=>{Uw=class Uw extends Error{constructor(){super("Navigation aborted by blocker");this.name="NavigationAbortedError"}}});function x6(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:v6(t),fullPath:v6(r),component:a,searchSchema:i,preload:l,isLayout:c,isIndex:u}}function jw(e,t=""){let r=$6(e,t,[]),a=Vw();for(let i of r)JW(a,i.pattern,i.chain);return{root:a}}function $6(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=QW(t||"/",l);let g=x6({path:l,fullPath:h,component:i.component,searchSchema:i.searchSchema,preload:i.preload,isLayout:u,isIndex:f});if(u){let b=[...r,g];if(i.children){let y=i.isPathlessGroup?t:h;a.push(...$6(i.children,y,b))}}else a.push({pattern:h,chain:[...r,g]})}return a}function Vw(){return{staticChildren:new Map}}function JW(e,t,r){let a=XW(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:Vw()};i=i.dynamicChild.node}else{let u=i.staticChildren.get(c);if(!u)u=Vw(),i.staticChildren.set(c,u);i=u}}i.route={chain:r}}function XW(e){return e.split("/").filter(Boolean)}function v6(e){if(e===""||e==="/")return"/";let t=e.startsWith("/")?e:`/${e}`;return t.endsWith("/")?t.slice(0,-1):t}function QW(e,t){if(t==="/")return e==="/"?"/":e;let r=e==="/"?"":e,a=t.startsWith("/")?t:`/${t}`;return r+a}function Kw(){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 S6(e){return!("issues"in e["~standard"].validate(void 0))}function qw(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 C6(e){let t=e.startsWith("?"),r=t?e.slice(1):e,a=r.endsWith("[]"),i=a?r.slice(0,-2):r,l=eY[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 g=l(h);if("issues"in g)return g;f.push(g.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 ZW,eY;var ev=N(()=>{ZW=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,eY={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"&&ZW.test(e)?{value:e}:{issues:[{message:"expected UUID"}]}}});var ae=Bi(function(tY,tv){(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 g(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(Ud.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(){_b||(_b=!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(Vd,"$&/")+"/"),U(_e,Q,me,"",function(Sr){return Sr})):_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(Vd,"$&/")+"/")+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&&(Fd||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fd=!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 be(){it.asyncTransitions--}function ce(M){if(Xc===null)try{var Q=("require"+Math.random()).slice(0,7);Xc=(tv&&tv[Q]).call(tv,"timers").setImmediate}catch(me){Xc=function(Ce){Ib===!1&&(Ib=!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")}},On=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,On(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},Ud=Object.prototype.hasOwnProperty,qt=console.createTask?console.createTask:function(){return null};tn={react_stack_bottom_frame:function(M){return M()}};var _b,ci,Yc={},Jc=tn.react_stack_bottom_frame.bind(tn,y)(),o2=qt(g(y)),Fd=!1,Vd=/\/+/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)},Ib=!1,Xc=null,Qc=0,Zc=!1,eu=!1,fh=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}};tY.Activity=Oe,tY.Children=yl,tY.Component=a,tY.Fragment=V,tY.Profiler=X,tY.PureComponent=l,tY.StrictMode=k,tY.Suspense=He,tY.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=it,tY.__COMPILER_RUNTIME=tn,tY.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 fh(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,Sr){_e=!0,tt.then(function(xo){if(_(Q,me),me===0){try{Y(Ce),ce(function(){return W(xo,je,Sr)})}catch(ph){it.thrownErrors.push(ph)}if(0<it.thrownErrors.length){var vl=se(it.thrownErrors);it.thrownErrors.length=0,Sr(vl)}}else je(xo)},function(xo){_(Q,me),0<it.thrownErrors.length?(xo=se(it.thrownErrors),it.thrownErrors.length=0,Sr(xo)):Sr(xo)})}}}var Mt=et;if(_(Q,me),me===0&&(Y(Ce),Ce.length!==0&&fh(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,Sr){_e=!0,me===0?(it.actQueue=Ce,ce(function(){return W(Mt,je,Sr)})):je(Mt)}}},tY.cache=function(M){return function(){return M.apply(null,arguments)}},tY.cacheSignal=function(){return null},tY.captureOwnerStack=function(){var M=it.getCurrentStack;return M===null?null:M()},tY.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=On({},M.props),_e=M.key,et=M._owner;if(Q!=null){var tt;e:{if(Ud.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)!Ud.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},tY.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},tY.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)Ud.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(g(M)):o2)},tY.createRef=function(){var M={current:null};return Object.seal(M),M},tY.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},tY.isValidElement=H,tY.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},tY.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},tY.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(be,be),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}},tY.unstable_useCacheRefresh=function(){return J().useCacheRefresh()},tY.use=function(M){return J().use(M)},tY.useActionState=function(M,Q,me){return J().useActionState(M,Q,me)},tY.useCallback=function(M,Q){return J().useCallback(M,Q)},tY.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)},tY.useDebugValue=function(M,Q){return J().useDebugValue(M,Q)},tY.useDeferredValue=function(M,Q){return J().useDeferredValue(M,Q)},tY.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)},tY.useEffectEvent=function(M){return J().useEffectEvent(M)},tY.useId=function(){return J().useId()},tY.useImperativeHandle=function(M,Q,me){return J().useImperativeHandle(M,Q,me)},tY.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)},tY.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)},tY.useMemo=function(M,Q){return J().useMemo(M,Q)},tY.useOptimistic=function(M,Q){return J().useOptimistic(M,Q)},tY.useReducer=function(M,Q,me){return J().useReducer(M,Q,me)},tY.useRef=function(M){return J().useRef(M)},tY.useState=function(M){return J().useState(M)},tY.useSyncExternalStore=function(M,Q,me){return J().useSyncExternalStore(M,Q,me)},tY.useTransition=function(){return J().useTransition()},tY.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(nY){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=be.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 g(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"),be=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={};nY.Fragment=w,nY.jsx=function(k,X,ve){var $e=1e4>be.recentlyCreatedOwnerStacks++;return g(k,X,ve,!1,$e?Error("react-stack-top-frame"):Z,$e?_(a(k)):pe)},nY.jsxs=function(k,X,ve){var $e=1e4>be.recentlyCreatedOwnerStacks++;return g(k,X,ve,!0,$e?Error("react-stack-top-frame"):Z,$e?_(a(k)):pe)}})()});class Gw{activeUrlHref=null;activeCacheKey=null;activePromise=null;activeResolvedData;hasResolved=!1;pendingBackgroundKey=null;id;constructor(){this.id=rY++}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 rY=0;var Ww,sc,ca;var Gf=N(()=>{Ww=j(ae(),1),sc=Ww.createContext(null),ca=Ww.createContext(null)});var nv,Hu;var rv=N(()=>{nv=j(ae(),1);Hu=class Hu extends nv.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 nv.default.createElement("div",{style:{color:"red"}},`Route error: ${this.state.error.message}`)}return this.props.children}}});function oY(e){return"~standard"in e}function aY(e){if(oY(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=C6(c);a[l]=u.schema,r.push({name:l,optional:u.optional,array:u.array})}else a[l]=c,r.push({name:l,optional:S6(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 g=h["~standard"].validate(c[f]);if("issues"in g)return g;u[f]=g.value}return{value:u}}}},paramsMeta:r}}class Wf{pageId;params;__buzolaRedirect=!0;constructor(e,t){this.pageId=e,this.params=t}}function Km(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 Wf);if(a)return a;return Object.assign({},...r)}}function qm(e,t,r,a,i,l){let c=new Set(t.filter((b)=>b.array).map((b)=>b.name)),u=r?new Gw:void 0;function f(){let b=tr.use(ca);if(!b)throw Error("createPage component must be used within a <BuzolaProvider>");let y=tr.use(sc),v=tr.useMemo(()=>{let{state:G,matches:ee,params:U}=b,P=ee.find((be)=>be.node.component===f),re=new Set(P?jm(P.node.fullPath):[]),J={};if(c.size>0)for(let be of c){if(re.has(be))continue;let ce=[...G.location.searchParams.getAll(be),...G.location.searchParams.getAll(`${be}[]`)];if(ce.length>0)J[be]=ce}G.location.searchParams.forEach((be,ce)=>{let se=ce.endsWith("[]")?ce.slice(0,-2):ce;if(!re.has(se)&&!(se in J))J[se]=be});for(let[be,ce]of Object.entries(U))if(c.has(be))J[be]=ce.split(",");else J[be]=ce;if(e)return qw(e,J,"Page params validation failed: ");return J},[b]),[S,w]=tr.useState(0),[,E]=tr.useReducer((G)=>G+1,0),R=tr.useCallback(()=>w((G)=>G+1),[]);tr.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:w6}),loaderCache:y?.loaderCache,onBackgroundSettled:(P)=>{if(P.ok){if(P.result instanceof Wf){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=tr.use(U.promise);if(P instanceof Wf)y?.navigateToPage(P.pageId,P.params,{replace:!0}),z=!0;else D=P,u.commitResult(D)}}if(tr.useEffect(()=>()=>u?.dispose(y?.loaderCache),[]),z)return null;return ov.jsx(i,{params:v,data:D,invalidate:R,isLoading:H})}function h(){let b=tr.use(ca),[y,v]=tr.useState(0),S=tr.useCallback(()=>v((R)=>R+1),[]),w=`${b?.state.location.href??""}:${y}`;return ov.jsx(Hu,{fallback:typeof l==="function"?(R)=>l({error:R,params:b?.params??{},retry:S}):l,resetKey:w,children:ov.jsx(f,{},y)})}return{__buzolaPage:!0,component:l?h:f,route:a,paramsSchema:e,paramsMeta:t,loader:r}}function iY(e,t,r,a){return{route(i){return{render(l){return qm(e,t,Km(r),i,l,a)}}},render(i){return qm(e,t,Km(r),void 0,i,a)}}}function Yw(e,t,r){return{loader(a){return Yw(e,t,[...r,a])},catch(a){return iY(e,t,r,a)},route(a){return{catch(i){return{render(l){return qm(e,t,Km(r),a,l,i)}}},render(i){return qm(e,t,Km(r),a,i)}}},render(a){return qm(e,t,Km(r),void 0,a)}}}function ur(){return{params(e){let{schema:t,paramsMeta:r}=aY(e);return Yw(t,r,[])},...Yw(void 0,[],[])}}var ov,tr,w6=(e,t)=>new Wf(e,t);var E6=N(()=>{ev();Gf();rv();ov=j(io(),1),tr=j(ae(),1)});function lY(){return so.default.createElement("div",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem",maxWidth:"600px",margin:"0 auto"}},sY?[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 Yf({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(lY,null)}return null}let g=f.node.component;return Gm.jsx(Hu,{fallback:t,resetKey:f.node.id,children:Gm.jsx(so.Suspense,{fallback:e??null,children:h&&Gm.jsx(ca,{value:h,children:Gm.jsx(g,{})})})})}var Gm,so,sY;var Jw=N(()=>{Gf();rv();Gm=j(io(),1),so=j(ae(),1),sY=typeof process<"u"&&!0});function av({routes:e,children:t,middleware:r,...a}){let i=Bo.useRef(a.router);if(!i.current)i.current=new Zy({routes:e,adapter:Kw(),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]),g=Bo.useMemo(()=>{let y={};for(let v of f.matches)y={...y,...v.params};return y},[f.matches]),b=t??Wm.jsx(Yf,{});return Wm.jsx(sc,{value:l,children:Wm.jsx(ca,{value:h,children:r?Wm.jsx(r,{params:g,matches:f.matches,children:b}):b})})}var Wm,Bo;var T6=N(()=>{Fw();Gf();Jw();Wm=j(io(),1),Bo=j(ae(),1)});function Ym(){let e=zi.use(sc);if(!e)throw Error("useRouter must be used within a <BuzolaProvider>");return e}function cY(){let e=zi.use(ca);if(!e)throw Error("Route hooks must be used within a <BuzolaProvider>");return e}function Tr(){let e=Ym();return zi.useCallback((t,r)=>{e.navigateToPage(t,r?.params,r)},[e])}function iv(){let e=cY(),t=Ym(),{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 Xw=N(()=>{ev();Gf();zi=j(ae(),1)});var uY,sv;var k6=N(()=>{Xw();uY=j(io(),1),sv=j(ae(),1)});var A6=N(()=>{T6();Jw();k6();rv();Xw();Gf()});var ua=N(()=>{Fw();ev();E6();A6()});var M6=Bi(function(bY){(function(){function e(){if(z=!1,P){var W=bY.unstable_now();be=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=bY.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:bY.unstable_now()-be<J?!1:!0}function f(W,Y){re=G(function(){W(bY.unstable_now())},Y)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),bY.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var h=performance;bY.unstable_now=function(){return h.now()}}else{var g=Date,b=g.now();bY.unstable_now=function(){return g.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,be=-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)};bY.unstable_IdlePriority=5,bY.unstable_ImmediatePriority=1,bY.unstable_LowPriority=4,bY.unstable_NormalPriority=3,bY.unstable_Profiling=null,bY.unstable_UserBlockingPriority=2,bY.unstable_cancelCallback=function(W){W.callback=null},bY.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},bY.unstable_getCurrentPriorityLevel=function(){return E},bY.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}},bY.unstable_requestPaint=function(){z=!0},bY.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}},bY.unstable_scheduleCallback=function(W,Y,Z){var pe=bY.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},bY.unstable_shouldYield=u,bY.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 N6=Bi(function(yY){var Qw=j(ae());(function(){function e(){}function t(g){return""+g}function r(g,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:g,containerInfo:b,implementation:y}}function a(g,b){if(g==="font")return"";if(typeof b==="string")return b==="use-credentials"?b:""}function i(g){return g===null?"`null`":g===void 0?"`undefined`":g===""?"an empty string":'something with type "'+typeof g+'"'}function l(g){return g===null?"`null`":g===void 0?"`undefined`":g===""?"an empty string":typeof g==="string"?JSON.stringify(g):typeof g==="number"?"`"+g+"`":'something with type "'+typeof g+'"'}function c(){var g=h.H;return g===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.`),g}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=Qw.__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"),yY.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,yY.createPortal=function(g,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(g,b,null,y)},yY.flushSync=function(g){var b=h.T,y=u.p;try{if(h.T=null,u.p=2,g)return g()}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.")}},yY.preconnect=function(g,b){typeof g==="string"&&g?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(g)),typeof g==="string"&&(b?(b=b.crossOrigin,b=typeof b==="string"?b==="use-credentials"?b:"":void 0):b=null,u.d.C(g,b))},yY.prefetchDNS=function(g){if(typeof g!=="string"||!g)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(g));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 g==="string"&&u.d.D(g)},yY.preinit=function(g,b){if(typeof g==="string"&&g?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(g)),typeof g==="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(g,typeof b.precedence==="string"?b.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:w}):y==="script"&&u.d.X(g,{crossOrigin:v,integrity:S,fetchPriority:w,nonce:typeof b.nonce==="string"?b.nonce:void 0})}},yY.preinitModule=function(g,b){var y="";if(typeof g==="string"&&g||(y+=" The `href` argument encountered was "+i(g)+"."),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,g)}if(typeof g==="string")if(typeof b==="object"&&b!==null){if(b.as==null||b.as==="script")y=a(b.as,b.crossOrigin),u.d.M(g,{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(g)},yY.preload=function(g,b){var y="";if(typeof g==="string"&&g||(y+=" The `href` argument encountered was "+i(g)+"."),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 g==="string"&&typeof b==="object"&&b!==null&&typeof b.as==="string"){y=b.as;var v=a(y,b.crossOrigin);u.d.L(g,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})}},yY.preloadModule=function(g,b){var y="";typeof g==="string"&&g||(y+=" The `href` argument encountered was "+i(g)+"."),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 g==="string"&&(b?(y=a(b.as,b.crossOrigin),u.d.m(g,{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(g))},yY.requestFormReset=function(g){u.d.r(g)},yY.unstable_batchedUpdates=function(g,b){return g(b)},yY.useFormState=function(g,b,y){return c().useFormState(g,b,y)},yY.useFormStatus=function(){return c().useHostTransitionStatus()},yY.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(kue,O6){var vY=j(N6());O6.exports=vY});var D6=Bi(function(xY){var Nt=j(M6()),Jf=j(ae()),Zw=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],m=Kn(n)?n.slice():ft({},n);return m[p]=t(n[p],o,s+1,d),m}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],m=Kn(n)?n.slice():ft({},n);return d+1===o.length?(m[s[d]]=m[p],Kn(m)?m.splice(p,1):delete m[p]):m[p]=a(n[p],o,s,d+1),m}function i(n,o,s){var d=o[s],p=Kn(n)?n.slice():ft({},n);if(s+1===o.length)return Kn(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 g(){}function b(n){var o=[];return n.forEach(function(s){o.push(s)}),o.sort().join(", ")}function y(n,o,s,d){return new MK(n,o,s,d)}function v(n,o){n.context===zl&&(oC(n.current,2,o,n,null,null),nf())}function S(n,o){if(Zo!==null){var s=o.staleFamilies;o=o.updatedFamilies,zh(),w5(n.current,o,s),nf()}}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 m=p.alternate;if(m===null){if(d=p.return,d!==null){s=d;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===s)return z(p),n;if(m===d)return z(p),o;m=m.sibling}throw Error("Unable to find node on an unmounted component.")}if(s.return!==d.return)s=p,d=m;else{for(var x=!1,C=p.child;C;){if(C===s){x=!0,s=p,d=m;break}if(C===d){x=!0,d=p,s=m;break}C=C.sibling}if(!x){for(C=m.child;C;){if(C===s){x=!0,s=m,d=p;break}if(C===d){x=!0,d=m,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=NN&&n[NN]||n["@@iterator"],typeof n==="function"?n:null}function P(n){if(n==null)return null;if(typeof n==="function")return n.$$typeof===Xq?null:n.displayName||n.name||null;if(typeof n==="string")return n;switch(n){case uf:return"Fragment";case uC:return"Profiler";case q0:return"StrictMode";case fC:return"Suspense";case pC:return"SuspenseList";case hC: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 cf:return"Portal";case Ri:return n.displayName||"Context";case dC:return(n._context.displayName||"Context")+".Consumer";case Yh:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case G0: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===q0?"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 be(n){return{current:n}}function ce(n,o){0>gs?console.error("Unexpected pop."):(o!==gC[gs]&&console.error("Unexpected Fiber popped."),n.current=mC[gs],mC[gs]=null,gC[gs]=null,gs--)}function se(n,o,s){gs++,mC[gs]=n.current,gC[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(Jh,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)?tN(o):Ms:Ms;break;default:if(s=o.tagName,o=o.namespaceURI)o=tN(o),o=nN(o,s);else switch(s){case"svg":o=jf;break;case"math":o=Ky;break;default:o=Ms}}s=s.toLowerCase(),s=Yk(null,s),s={context:o,ancestorInfo:s},ce(Ol,n),se(Ol,s,n)}function Y(n){ce(Ol,n),ce(Jh,n),ce(Dl,n)}function Z(){return _(Ol.current)}function pe(n){n.memoizedState!==null&&se(W0,n,n);var o=_(Ol.current),s=n.type,d=nN(o.context,s);s=Yk(o.ancestorInfo,s),d={context:d,ancestorInfo:s},o!==d&&(se(Jh,n,n),se(Ol,d,n))}function V(n){Jh.current===n&&(ce(Ol,n),ce(Jh,n)),W0.current===n&&(ce(W0,n),Um._currentValue=Bu)}function k(){}function X(){if(Xh===0){ON=console.log,DN=console.info,PN=console.warn,LN=console.error,_N=console.group,IN=console.groupCollapsed,BN=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})}Xh++}function ve(){if(Xh--,Xh===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ft({},n,{value:ON}),info:ft({},n,{value:DN}),warn:ft({},n,{value:PN}),error:ft({},n,{value:LN}),group:ft({},n,{value:_N}),groupCollapsed:ft({},n,{value:IN}),groupEnd:ft({},n,{value:BN})})}0>Xh&&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(bC===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);bC=o&&o[1]||"",zN=-1<s.stack.indexOf(`
|
|
26
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
27
|
+
`+bC+n+zN}function He(n,o){if(!n||yC)return"";var s=vC.get(n);if(s!==void 0)return s;yC=!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 m=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");m&&m.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=m=0;m<A.length&&!A[m].includes("DetermineComponentFrameRoot");)m++;for(;x<K.length&&!K[x].includes("DetermineComponentFrameRoot");)x++;if(m===A.length||x===K.length)for(m=A.length-1,x=K.length-1;1<=m&&0<=x&&A[m]!==K[x];)x--;for(;1<=m&&0<=x;m--,x--)if(A[m]!==K[x]){if(m!==1||x!==1)do if(m--,x--,0>x||A[m]!==K[x]){var q=`
|
|
30
|
+
`+A[m].replace(" at new "," at ");return n.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",n.displayName)),typeof n==="function"&&vC.set(n,q),q}while(1<=m&&0<=x);break}}}finally{yC=!1,oe.H=d,ve(),Error.prepareStackTrace=s}return A=(A=n?n.displayName||n.name:"")?ke(A):"",typeof n==="function"&&vC.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 m=d[p];if(typeof m.name==="string"){var x=o;e:{var{name:C,env:T,debugLocation:A}=m;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 m=n.debugStack;(n=n.owner)&&m&&(o+=`
|
|
36
|
+
`+$e(m))}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,m,x){var C=Mo;ln(n);try{return n!==null&&n._debugTask?n._debugTask.run(o.bind(null,s,d,p,m,x)):o(s,d,p,m,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 On(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,On(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,On(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.",On(n)),tn(n)}function Ud(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{ff=o.inject(n),wr=o}catch(s){console.error("React instrumentation encountered an error: %o.",s)}return o.checkDCE?!0:!1}function qt(n){if(typeof oG==="function"&&aG(n),wr&&typeof wr.setStrictMode==="function")try{wr.setStrictMode(ff,n)}catch(o){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",o))}}function _b(n){return n>>>=0,n===0?32:31-(iG(n)/sG|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,m=n.suspendedLanes,x=n.pingedLanes;n=n.warmLanes;var C=d&134217727;return C!==0?(d=C&~m,d!==0?p=ci(d):(x&=C,x!==0?p=ci(x):s||(s=C&~n,s!==0&&(p=ci(s))))):(C=d&~m,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&m)===0&&(m=p&-p,s=o&-o,m>=s||m===32&&(s&4194048)!==0)?o:p}function Jc(n,o){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&o)===0}function o2(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 Fd(){var n=X0;return X0<<=1,(X0&62914560)===0&&(X0=4194304),n}function Vd(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 Ib(n,o,s,d,p,m){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),m!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=m&~(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 fh(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(m){var x=m.alternate;x!==null&&d.has(x)||d.add(m)}),p.clear()),o&=~n}}function M(n){return n&=-n,No!==0&&No<n?Ba!==0&&Ba<n?(n&134217727)!==0?Ni:Q0:Ba:No}function Q(){var n=It.p;if(n!==0)return n;return n=window.event,n===void 0?Ni:wN(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[lr],delete n[_r],delete n[wC],delete n[lG],delete n[cG]}function _e(n){var o=n[lr];if(o)return o;for(var s=n.parentNode;s;){if(o=s[Ll]||s[lr]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=uN(n);n!==null;){if(s=n[lr])return s;n=uN(n)}return o}n=s,s=n.parentNode}return null}function et(n){if(n=n[lr]||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[HN];return o||(o=n[HN]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function je(n){n[Qh]=!0}function Sr(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();EC[s]=n,n==="onDoubleClick"&&(EC.ondblclick=n);for(n=0;n<o.length;n++)UN.add(o[n])}function vl(n,o){uG[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 ph(n){if(Ia.call(VN,n))return!0;if(Ia.call(FN,n))return!1;if(dG.test(n))return VN[n]=!0;return FN[n]=!0,console.error("Invalid attribute name: `%s`",n),!1}function Pk(n,o,s){if(ph(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 Bb(n,o,s){if(ph(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 zb(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 Lk(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function sK(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:m}=d;return Object.defineProperty(n,o,{configurable:!0,get:function(){return p.call(this)},set:function(x){it(x),s=""+x,m.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 a2(n){if(!n._valueTracker){var o=Lk(n)?"checked":"value";n._valueTracker=sK(n,o,""+n[o])}}function _k(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),d="";return n&&(d=Lk(n)?n.checked?"true":"false":n.value),n=d,n!==s?(o.setValue(n),!0):!1}function Hb(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(fG,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Ik(n,o){o.checked===void 0||o.defaultChecked===void 0||KN||(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),KN=!0),o.value===void 0||o.defaultValue===void 0||jN||(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),jN=!0)}function i2(n,o,s,d,p,m,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?s2(n,x,Wo(o)):s!=null?s2(n,x,Wo(s)):d!=null&&n.removeAttribute("value"),p==null&&m!=null&&(n.defaultChecked=!!m),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 Bk(n,o,s,d,p,m,x,C){if(m!=null&&typeof m!=="function"&&typeof m!=="symbol"&&typeof m!=="boolean"&&(Ie(m,"type"),n.type=m),o!=null||s!=null){if(!(m!=="submit"&&m!=="reset"||o!==void 0&&o!==null)){a2(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),a2(n)}function s2(n,o,s){o==="number"&&Hb(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function zk(n,o){o.value==null&&(typeof o.children==="object"&&o.children!==null?Jf.Children.forEach(o.children,function(s){s==null||typeof s==="string"||typeof s==="number"||typeof s==="bigint"||GN||(GN=!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||WN||(WN=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),o.selected==null||qN||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),qN=!0)}function Hk(){var n=Oe();return n?`
|
|
39
|
+
|
|
40
|
+
Check the render method of \``+n+"`.":""}function jd(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 Uk(n,o){for(n=0;n<JN.length;n++){var s=JN[n];if(o[s]!=null){var d=Kn(o[s]);o.multiple&&!d?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,Hk()):!o.multiple&&d&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,Hk())}}o.value===void 0||o.defaultValue===void 0||YN||(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"),YN=!0)}function Fk(n,o){o.value===void 0||o.defaultValue===void 0||XN||(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"),XN=!0),o.children!=null&&o.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function Vk(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 jk(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(Kn(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),a2(n)}function Kk(n,o){return n.serverProps===void 0&&n.serverTail.length===0&&n.children.length===1&&3<n.distanceFromLeaf&&n.distanceFromLeaf>15-o?Kk(n.children[0],o):n}function $o(n){return" "+" ".repeat(n)}function Kd(n){return"+ "+" ".repeat(n)}function tu(n){return"- "+" ".repeat(n)}function qk(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 hh(n,o){return QN.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 Ub(n,o,s){var d=120-2*s;if(o===null)return Kd(s)+hh(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)),Kd(s)+hh(n,d)+`
|
|
42
|
+
`+tu(s)+hh(o,d)+`
|
|
43
|
+
`}return $o(s)+hh(n,d)+`
|
|
44
|
+
`}function l2(n){return Object.prototype.toString.call(n).replace(/^\[object (.*)\]$/,function(o,s){return s})}function mh(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(Kn(n))return"[...]";if(n.$$typeof===Ti)return(o=P(n.type))?"<"+o+">":"<...>";var s=l2(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=mh(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 qd(n,o){return typeof n!=="string"||QN.test(n)?"{"+mh(n,o-2)+"}":n.length>o-2?5>o?'"..."':'"'+n.slice(0,o-5)+'..."':'"'+n+'"'}function c2(n,o,s){var d=120-s.length-n.length,p=[],m;for(m in o)if(o.hasOwnProperty(m)&&m!=="children"){var x=qd(o[m],120-s.length-m.length-1);d-=m.length+x.length+2,p.push(m+"="+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 lK(n,o,s){var d="",p=ft({},o),m;for(m in n)if(n.hasOwnProperty(m)){delete p[m];var x=120-2*s-m.length-2,C=mh(n[m],x);o.hasOwnProperty(m)?(x=mh(o[m],x),d+=Kd(s)+m+": "+C+`
|
|
51
|
+
`,d+=tu(s)+m+": "+x+`
|
|
52
|
+
`):d+=Kd(s)+m+": "+C+`
|
|
53
|
+
`}for(var T in p)p.hasOwnProperty(T)&&(n=mh(p[T],120-2*s-T.length-2),d+=tu(s)+T+": "+n+`
|
|
54
|
+
`);return d}function cK(n,o,s,d){var p="",m=new Map;for(A in s)s.hasOwnProperty(A)&&m.set(A.toLowerCase(),A);if(m.size===1&&m.has("children"))p+=c2(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=m.get(x.toLowerCase());if(T!==void 0){m.delete(x.toLowerCase());var A=o[x];T=s[T];var K=qd(A,C);C=qd(T,C),typeof A==="object"&&A!==null&&typeof T==="object"&&T!==null&&l2(A)==="Object"&&l2(T)==="Object"&&(2<Object.keys(A).length||2<Object.keys(T).length||-1<K.indexOf("...")||-1<C.indexOf("..."))?p+=$o(d+1)+x+`={{
|
|
55
|
+
`+lK(A,T,d+2)+$o(d+1)+`}}
|
|
56
|
+
`:(p+=Kd(d+1)+x+"="+K+`
|
|
57
|
+
`,p+=tu(d+1)+x+"="+C+`
|
|
58
|
+
`)}else p+=$o(d+1)+x+"="+qd(o[x],C)+`
|
|
59
|
+
`}m.forEach(function(q){if(q!=="children"){var I=120-2*(d+1)-q.length-1;p+=tu(d+1)+q+"="+qd(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(m="",typeof o==="string"||typeof o==="number"||typeof o==="bigint")m=""+o;p+=Ub(m,""+n,d+1)}else if(typeof o==="string"||typeof o==="number"||typeof o==="bigint")p=n==null?p+Ub(""+o,null,d+1):p+Ub(""+o,void 0,d+1);return p}function Gk(n,o){var s=qk(n);if(s===null){s="";for(n=n.child;n;)s+=Gk(n,o),n=n.sibling;return s}return $o(o)+"<"+s+`>
|
|
64
|
+
`}function u2(n,o){var s=Kk(n,o);if(s!==n&&(n.children.length!==1||n.children[0]!==s))return $o(o)+`...
|
|
65
|
+
`+u2(s,o+1);s="";var d=n.fiber._debugInfo;if(d)for(var p=0;p<d.length;p++){var m=d[p].name;typeof m==="string"&&(s+=$o(o)+"<"+m+`>
|
|
66
|
+
`,o++)}if(d="",p=n.fiber.pendingProps,n.fiber.tag===6)d=Ub(p,n.serverProps,o),o++;else if(m=qk(n.fiber),m!==null)if(n.serverProps===void 0){d=o;var x=120-2*d-m.length-2,C="";for(A in p)if(p.hasOwnProperty(A)&&A!=="children"){var T=qd(p[A],15);if(x-=A.length+T.length+2,0>x){C+=" ...";break}C+=" "+A+"="+T}d=$o(d)+"<"+m+C+`>
|
|
67
|
+
`,o++}else n.serverProps===null?(d=c2(m,p,Kd(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=cK(m,p,n.serverProps,o),o++);var A="";p=n.fiber.child;for(m=0;p&&m<n.children.length;)x=n.children[m],x.fiber===p?(A+=u2(x,o),m++):A+=Gk(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++)m=p[n],A=typeof m==="string"?A+(tu(o)+hh(m,120-2*o)+`
|
|
69
|
+
`):A+c2(m.type,m.props,tu(o));return s+d+A}function d2(n){try{return`
|
|
70
|
+
|
|
71
|
+
`+u2(n,0)}catch(o){return""}}function Wk(n,o,s){for(var d=o,p=null,m=0;d;)d===n&&(m=0),p={fiber:d,children:p!==null?[p]:[],serverProps:d===o?s:d===n?null:void 0,serverTail:[],distanceFromLeaf:m},m++,d=d.return;return p!==null?d2(p).replaceAll(/^[+-]/gm,">"):""}function Yk(n,o){var s=ft({},n||e8),d={tag:o};if(ZN.indexOf(o)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),hG.indexOf(o)!==-1&&(s.pTagInButtonScope=null),pG.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 Jk(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 mG.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 uK(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 Xk(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 f2(n,o){o=o||e8;var s=o.current;if(o=(s=Jk(n,s&&s.tag,o.implicitRootScope)?null:s)?null:uK(n,o),o=s||o,!o)return!0;var d=o.tag;if(o=String(!!s)+"|"+n+"|"+d,Z0[o])return!1;Z0[o]=!0;var p=(o=Mo)?Xk(o.return,d):null,m=o!==null&&p!==null?Wk(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,m)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
73
|
+
This will cause a hydration error.%s`,x,d,m),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 Fb(n,o,s){if(s||Jk("#text",o,!1))return!0;if(s="#text|"+o,Z0[s])return!1;Z0[s]=!0;var d=(s=Mo)?Xk(s,o):null;return s=s!==null&&d!==null?Wk(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 gh(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}function dK(n){return n.replace(yG,function(o,s){return s.toUpperCase()})}function Qk(n,o,s){var d=o.indexOf("--")===0;d||(-1<o.indexOf("-")?pf.hasOwnProperty(o)&&pf[o]||(pf[o]=!0,console.error("Unsupported style property %s. Did you mean %s?",o,dK(o.replace(bG,"ms-")))):gG.test(o)?pf.hasOwnProperty(o)&&pf[o]||(pf[o]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",o,o.charAt(0).toUpperCase()+o.slice(1))):!r8.test(s)||RC.hasOwnProperty(s)&&RC[s]||(RC[s]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,o,s.replace(r8,""))),typeof s==="number"&&(isNaN(s)?o8||(o8=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",o)):isFinite(s)||a8||(a8=!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||i8.has(o)?o==="float"?n.cssFloat=s:(Qr(s,o),n[o]=(""+s).trim()):n[o]=s+"px"}function Zk(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 m=TC[p]||[p],x=0;x<m.length;x++)d[m[x]]=p}for(var C in o)if(o.hasOwnProperty(C)&&(!s||s[C]!==o[C]))for(p=TC[C]||[C],m=0;m<p.length;m++)d[p[m]]=C;C={};for(var T in o)for(p=TC[T]||[T],m=0;m<p.length;m++)C[p[m]]=T;T={};for(var A in d)if(p=d[A],(m=C[A])&&p!==m&&(x=p+","+m,!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,m)}}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&&Qk(n,I,A)}else for(d in o)o.hasOwnProperty(d)&&Qk(n,d,o[d])}function bh(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 e5(n){return vG.get(n)||n}function fK(n,o){if(Ia.call(mf,o)&&mf[o])return!0;if($G.test(o)){if(n="aria-"+o.slice(4).toLowerCase(),n=s8.hasOwnProperty(n)?n:null,n==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",o),mf[o]=!0;if(o!==n)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",o,n),mf[o]=!0}if(xG.test(o)){if(n=o.toLowerCase(),n=s8.hasOwnProperty(n)?n:null,n==null)return mf[o]=!0,!1;o!==n&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",o,n),mf[o]=!0)}return!0}function pK(n,o){var s=[],d;for(d in o)fK(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 hK(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(c8.test(o))return console.error("Unknown event handler property `%s`. It will be ignored.",o),Ir[o]=!0}else if(c8.test(o))return SG.test(o)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",o),Ir[o]=!0;if(CG.test(o)||wG.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(ty.hasOwnProperty(p)){if(p=ty[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 mK(n,o,s){var d=[],p;for(p in o)hK(n,p,o[p],s)||d.push(p);o=d.map(function(m){return"`"+m+"`"}).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 yh(n){return EG.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ls(){}function p2(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}function t5(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(i2(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.");i2(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&&_k(d)}break e;case"textarea":Vk(n,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&jd(n,!!s.multiple,o,!1)}}}function n5(n,o,s){if(kC)return n(o,s);kC=!0;try{var d=n(o);return d}finally{if(kC=!1,gf!==null||bf!==null){if(nf(),gf&&(o=gf,n=bf,bf=gf=null,t5(o),n))for(o=0;o<n.length;o++)t5(n[o])}}}function vh(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 r5(){if(ny)return ny;var n,o=MC,s=o.length,d,p="value"in _l?_l.value:_l.textContent,m=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[m-d];d++);return ny=p.slice(n,1<d?1-d:void 0)}function Vb(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 jb(){return!0}function o5(){return!1}function Zr(n){function o(s,d,p,m,x){this._reactName=s,this._targetInst=p,this.type=d,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(s=n[C],this[C]=s?s(m):m[C]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?jb:o5,this.isPropagationStopped=o5,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=jb)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!=="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=jb)},persist:function(){},isPersistent:jb}),o}function gK(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=BG[n])?!!o[n]:!1}function h2(){return gK}function a5(n,o){switch(n){case"keyup":return JG.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==p8;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function i5(n){return n=n.detail,typeof n==="object"&&"data"in n?n.data:null}function bK(n,o){switch(n){case"compositionend":return i5(o);case"keypress":if(o.which!==m8)return null;return b8=!0,g8;case"textInput":return n=o.data,n===g8&&b8?null:n;default:return null}}function yK(n,o){if(yf)return n==="compositionend"||!PC&&a5(n,o)?(n=r5(),ny=MC=_l=null,yf=!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 h8&&o.locale!=="ko"?null:o.data;default:return null}}function s5(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!QG[n.type]:o==="textarea"?!0:!1}function vK(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 l5(n,o,s,d){gf?bf?bf.push(d):bf=[d]:gf=d,o=_0(o,"onChange"),0<o.length&&(s=new ry("onChange","change",null,s,d),n.push({event:s,listeners:o}))}function xK(n){jM(n,0)}function Kb(n){var o=tt(n);if(_k(o))return n}function c5(n,o){if(n==="change")return o}function u5(){om&&(om.detachEvent("onpropertychange",d5),am=om=null)}function d5(n){if(n.propertyName==="value"&&Kb(am)){var o=[];l5(o,am,n,p2(n)),n5(xK,o)}}function $K(n,o,s){n==="focusin"?(u5(),om=o,am=s,om.attachEvent("onpropertychange",d5)):n==="focusout"&&u5()}function SK(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Kb(am)}function CK(n,o){if(n==="click")return Kb(o)}function wK(n,o){if(n==="input"||n==="change")return Kb(o)}function EK(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}function xh(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 f5(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function p5(n,o){var s=f5(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=f5(s)}}function h5(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?h5(n,o.parentNode):("contains"in n)?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function m5(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var o=Hb(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=Hb(n.document)}return o}function m2(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 g5(n,o,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;_C||vf==null||vf!==Hb(d)||(d=vf,("selectionStart"in d)&&m2(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}),im&&xh(im,d)||(im=d,d=_0(LC,"onSelect"),0<d.length&&(o=new ry("onSelect","select",null,o,s),n.push({event:o,listeners:d}),o.target=vf)))}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(IC[n])return IC[n];if(!xf[n])return n;var o=xf[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in v8)return IC[n]=o[s];return n}function Pa(n,o){w8.set(n,o),Sr(o,[n])}function TK(n){for(var o=ay,s=0;s<n.length;s++){var d=n[s];if(typeof d==="object"&&d!==null)if(Kn(d)&&d.length===2&&typeof d[0]==="string"){if(o!==ay&&o!==FC)return HC;o=FC}else return HC;else{if(typeof d==="function"||typeof d==="string"&&50<d.length||o!==ay&&o!==UC)return HC;o=UC}}return o}function g2(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 m=P(o.type)||"…",x=o.key;o=o.props;var C=Object.keys(o),T=C.length;if(x==null&&T===0){o="<"+m+" />";break}if(3>d||T===1&&C[0]==="children"&&x==null){o="<"+m+" … />";break}s.push([p+" ".repeat(d)+n,"<"+m]),x!==null&&ui("key",x,s,d+1,p),n=!1;for(var A in o)A==="children"?o.children!=null&&(!Kn(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?">…</"+m+">":"/>"]);return}if(m=Object.prototype.toString.call(o),m=m.slice(8,m.length-1),m==="Array"){if(A=TK(o),A===UC||A===ay){o=JSON.stringify(o);break}else if(A===FC){s.push([p+" ".repeat(d)+n,""]);for(n=0;n<o.length;n++)m=o[n],ui(m[0],m[1],s,d+1,p);return}}if(m==="Promise"){if(o.status==="fulfilled"){if(m=s.length,ui(n,o.value,s,d,p),s.length>m){s=s[m],s[1]="Promise<"+(s[1]||"Object")+">";return}}else if(o.status==="rejected"&&(m=s.length,ui(n,o.reason,s,d,p),s.length>m)){s=s[m],s[1]="Rejected Promise<"+s[1]+">";return}s.push([" ".repeat(d)+n,"Promise"]);return}m==="Object"&&(A=Object.getPrototypeOf(o))&&typeof A.constructor==="function"&&(m=A.constructor.name),s.push([p+" ".repeat(d)+n,m==="Object"?3>d?"":"…":m]),3>d&&g2(o,s,d+1,p);return}case"function":o=o.name===""?"() => {}":o.name+"() {}";break;case"string":o=o===aW?"…":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 b5(n,o,s,d){var p=!0;for(x in n)x in o||(s.push([iy+" ".repeat(d)+x,"…"]),p=!1);for(var m in o)if(m in n){var x=n[m],C=o[m];if(x!==C){if(d===0&&m==="children")p=" ".repeat(d)+m,s.push([iy+p,"…"],[sy+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)+m,x="<"+x+" … />",s.push([iy+p,x],[sy+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=[R8+" ".repeat(d)+m,A==="[object Array]"?"Array":""],s.push(T),A=s.length,b5(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([R8+" ".repeat(d)+m,x+" Referentially unequal function closure. Consider memoization."]);continue}}ui(m,x,s,d,iy),ui(m,C,s,d,sy)}p=!1}}else s.push([sy+" ".repeat(d)+m,"…"]),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 qb(n,o,s){di(n,o,s,"Reconnect")}function Gb(n,o,s,d,p){var m=J(n);if(m!==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=[iW],A=b5(x.memoizedProps,A,T,0),1<T.length&&(A&&!Il&&(x.lanes&p)===0&&100<n.actualDuration?(Il=!0,T[0]=sW,bs.color="warning",bs.tooltipText=k8):(bs.color=d,bs.tooltipText=m),bs.properties=T,Bl.start=o,Bl.end=s,C!=null?C.run(performance.measure.bind(performance,""+m,Bl)):performance.measure(""+m,Bl))):C!=null?C.run(console.timeStamp.bind(console,m,o,s,Xo,void 0,d)):console.timeStamp(m,o,s,Xo,void 0,d)}}function b2(n,o,s,d){if(Jt){var p=J(n);if(p!==null){for(var m=null,x=[],C=0;C<d.length;C++){var T=d[C];m==null&&T.source!==null&&(m=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&&g2(n.memoizedProps,x,0,""),m==null&&(m=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}}},m?m.run(performance.measure.bind(performance,""+p,n)):performance.measure(""+p,n)}}}function fi(n,o,s,d,p){if(p!==null){if(Jt){var m=J(n);if(m!==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&&g2(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,""+m,o)):performance.measure(""+m,o)}}}else m=J(n),m!==null&&Jt&&(p=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(n=n._debugTask)?n.run(console.timeStamp.bind(console,m,o,s,Xo,void 0,p)):console.timeStamp(m,o,s,Xo,void 0,p))}function RK(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 y5(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 v5(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 kK(n,o,s,d,p,m){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}}},m?m.run(performance.measure.bind(performance,"Recovered",n)):performance.measure("Recovered",n)}}function y2(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 AK(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 x5(n,o,s,d,p){if(Jt&&!(o<=n)){for(var m=[],x=0;x<s.length;x++){var C=s[x].value;m.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:m}}},p?p.run(performance.measure.bind(performance,"Errored",n)):performance.measure("Errored",n)}}function $h(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 Wb(){for(var n=$f,o=VC=$f=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 m=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}m!==0&&$5(s,p,m)}}function Yb(n,o,s,d){Qo[$f++]=n,Qo[$f++]=o,Qo[$f++]=s,Qo[$f++]=d,VC|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}function v2(n,o,s,d){return Yb(n,o,s,d),Jb(n)}function Cr(n,o){return Yb(n,null,null,o),Jb(n)}function $5(n,o,s){n.lanes|=s;var d=n.alternate;d!==null&&(d.lanes|=s);for(var p=!1,m=n.return;m!==null;)m.childLanes|=s,d=m.alternate,d!==null&&(d.childLanes|=s),m.tag===22&&(n=m.stateNode,n===null||n._visibility&sm||(p=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,p&&o!==null&&(p=31-Lr(s),n=m.hiddenUpdates,d=n[p],d===null?n[p]=[o]:d.push(o),o.lane=s|536870912),m):null}function Jb(n){if(Pm>SW)throw Ou=Pm=0,Lm=Sw=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>CW&&(Ou=0,Lm=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&&IM(n);for(var o=n,s=o.return;s!==null;)o.alternate===null&&(o.flags&4098)!==0&&IM(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 x2(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:Yh,render:o},n.displayName!==void 0&&(o.displayName=n.displayName),o):n:o.current}function S5(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===Yh?d=!0:p===Ao&&(d=!0);break;case 14:case 15:p===G0?d=!0:p===Ao&&(d=!0);break;default:return!1}return d&&(n=Zo(s),n!==void 0&&n===Zo(o))?!0:!1}function C5(n){Zo!==null&&typeof WeakSet==="function"&&(Sf===null&&(Sf=new WeakSet),Sf.add(n))}function w5(n,o,s){do{var d=n,p=d.alternate,m=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))),Sf!==null&&(Sf.has(n)||p!==null&&Sf.has(p))&&(d=!0),d&&(n._debugNeedsRemount=!0),d||A)p=Cr(n,2),p!==null&&fn(p,n,2);if(m===null||d||w5(m,o,s),x===null)break;n=x}while(1)}function MK(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,A8||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function $2(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=x2(n.type)}return s}function E5(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 S2(n,o,s,d,p,m){var x=0,C=n;if(typeof n==="function")$2(n)&&(x=1),C=ou(C);else if(typeof n==="string")x=Z(),x=zq(n,s,x)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case hC:return o=y(31,s,o,p),o.elementType=hC,o.lanes=m,o;case uf:return au(s.children,p,m,o);case q0:x=8,p|=Er,p|=za;break;case uC: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=uC,o.lanes=m,o.stateNode={effectDuration:0,passiveEffectDuration:0},o;case fC:return o=y(13,s,o,p),o.elementType=fC,o.lanes=m,o;case pC:return o=y(19,s,o,p),o.elementType=pC,o.lanes=m,o;default:if(typeof n==="object"&&n!==null)switch(n.$$typeof){case Ri:x=10;break e;case dC:x=9;break e;case Yh:x=11,C=x2(C);break e;case G0: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":Kn(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=m,o._debugOwner=d,o}function Xb(n,o,s){return o=S2(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 C2(n,o,s){return n=y(6,n,null,o),n.lanes=s,n}function T5(n){var o=y(18,null,null,We);return o.stateNode=n,o}function w2(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=jC.get(n);if(s!==void 0)return s;return o={value:n,source:o,stack:Ze(o)},jC.set(n,o),o}return{value:n,source:o,stack:Ze(o)}}function us(n,o){xl(),Cf[wf++]=lm,Cf[wf++]=ly,ly=n,lm=o}function R5(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 m=32-Lr(o)+p;if(30<m){var x=p-p%5;m=(d&(1<<x)-1).toString(32),d>>=x,p-=x,vs=1<<32-Lr(o)+p|s<<p|d,xs=m+n}else vs=1<<m|s<<p|d,xs=n}function E2(n){xl(),n.return!==null&&(us(n,1),R5(n,1,0))}function T2(n){for(;n===ly;)ly=Cf[--wf],Cf[wf]=null,lm=Cf[--wf],Cf[wf]=null;for(;n===yu;)yu=ea[--ta],ea[ta]=null,xs=ea[--ta],ea[ta]=null,vs=ea[--ta],ea[ta]=null}function k5(){return xl(),yu!==null?{id:vs,overflow:xs}:null}function A5(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 M5(){vt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Qb(n,o){Di||(n=iu(n,0),n.serverProps=null,o!==null&&(o=lN(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=d2(d)),Sh(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)),KC}function N5(n){var{stateNode:o,type:s,memoizedProps:d}=n;switch(o[lr]=n,o[_r]=d,qS(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<_m.length;s++)St(_m[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),Ik(o,d),Bk(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"option":zk(o,d);break;case"select":vl("select",d),St("invalid",o),Uk(o,d);break;case"textarea":vl("textarea",d),St("invalid",o),Fk(o,d),jk(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||WM(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 O5(n){for(cr=n.return;cr;)switch(cr.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:cr=cr.return}}function Gd(n){if(n!==cr)return!1;if(!vt)return O5(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")||XS(n.type,n.memoizedProps);s=!s}if(s&&Xt){for(s=Xt;s;){var d=iu(n,0),p=lN(s);d.serverTail.push(p),s=p.type==="Suspense"?tC(s):ko(s.nextSibling)}$l(n)}if(O5(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=tC(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=tC(n)}else o===27?(o=Xt,Nl(n.type)?(n=Pw,Pw=null,Xt=n):Xt=o):Xt=cr?ko(n.stateNode.nextSibling):null;return!0}function su(){Xt=cr=null,Di=vt=!1}function R2(){var n=Hl;return n!==null&&(Fr===null?Fr=n:Fr.push.apply(Fr,n),Hl=null),n}function Sh(n){Hl===null?Hl=[n]:Hl.push(n)}function k2(){var n=Oo;if(n!==null){Oo=null;for(var o=d2(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 Zb(){Ef=cy=null,Tf=!1}function Sl(n,o,s){se(qC,o._currentValue,n),o._currentValue=s,se(GC,o._currentRenderer,n),o._currentRenderer!==void 0&&o._currentRenderer!==null&&o._currentRenderer!==N8&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),o._currentRenderer=N8}function ds(n,o){n._currentValue=qC.current;var s=GC.current;ce(GC,o),n._currentRenderer=s,ce(qC,o)}function A2(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 M2(n,o,s,d){var p=n.child;p!==null&&(p.return=n);for(;p!==null;){var m=p.dependencies;if(m!==null){var x=p.child;m=m.firstContext;e:for(;m!==null;){var C=m;m=p;for(var T=0;T<o.length;T++)if(C.context===o[T]){m.lanes|=s,C=m.alternate,C!==null&&(C.lanes|=s),A2(m.return,s,n),d||(x=null);break e}m=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,m=x.alternate,m!==null&&(m.lanes|=s),A2(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 Wd(n,o,s,d){n=null;for(var p=o,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!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===W0.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(Um):n=[Um])}p=p.return}n!==null&&M2(o,n,s,d),o.flags|=262144}function e0(n){for(n=n.firstContext;n!==null;){if(!Br(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function lu(n){cy=n,Ef=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function nn(n){return Tf&&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()."),D5(cy,n)}function t0(n,o){return cy===null&&lu(n),D5(n,o)}function D5(n,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},Ef===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().");Ef=o,n.dependencies={lanes:0,firstContext:o,_debugThenableState:null},n.flags|=524288}else Ef=Ef.next=o;return s}function N2(){return{controller:new uW,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 Ch(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&&dW(fW,function(){n.controller.abort()})}function pi(n,o,s){if((n&127)!==0)0>Pi&&(Pi=Pn(),um=uy(o),WC=o,s!=null&&(YC=J(s)),(kt&(Gn|Lo))!==er&&(pn=!0,Vl=cm),n=jh(),o=Vh(),n!==Rf||o!==dm?Rf=-1.1:o!==null&&(Vl=cm),xu=n,dm=o);else if((n&4194048)!==0&&0>ra&&(ra=Pn(),fm=uy(o),O8=o,s!=null&&(D8=J(s)),0>Cs)){if(n=jh(),o=Vh(),n!==Kl||o!==$u)Kl=-1.1;jl=n,$u=o}}function NK(n){if(0>Pi){Pi=Pn(),um=n._debugTask!=null?n._debugTask:null,(kt&(Gn|Lo))!==er&&(Vl=cm);var o=jh(),s=Vh();o!==Rf||s!==dm?Rf=-1.1:s!==null&&(Vl=cm),xu=o,dm=s}if(0>ra&&(ra=Pn(),fm=n._debugTask!=null?n._debugTask:null,0>Cs)){if(n=jh(),o=Vh(),n!==Kl||o!==$u)Kl=-1.1;jl=n,$u=o}}function fs(){var n=vu;return vu=0,n}function n0(n){var o=vu;return vu=n,o}function wh(n){var o=vu;return vu+=n,o}function r0(){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 O2(n){zr=Pn(),0>n.actualStartTime&&(n.actualStartTime=zr)}function D2(n){if(0<=zr){var o=Pn()-zr;n.actualDuration+=o,n.selfBaseDuration=o,zr=-1}}function P5(n){if(0<=zr){var o=Pn()-zr;n.actualDuration+=o,zr=-1}}function yi(){if(0<=zr){var n=Pn(),o=n-zr;zr=-1,vu+=o,cn+=o,Ge=n}}function L5(n){rn===null&&(rn=[]),rn.push(n),Ss===null&&(Ss=[]),Ss.push(n)}function vi(){zr=Pn(),0>Ke&&(Ke=zr)}function Eh(n){for(var o=n.child;o;)n.actualDuration+=o.actualDuration,o=o.sibling}function OK(n,o){if(hm===null){var s=hm=[];XC=0,Su=FS(),kf={status:"pending",value:void 0,then:function(d){s.push(d)}}}return XC++,o.then(_5,_5),o}function _5(){if(--XC===0&&(-1<ra||(Cs=-1.1),hm!==null)){kf!==null&&(kf.status="fulfilled");var n=hm;hm=null,Su=0,kf=null;for(var o=0;o<n.length;o++)(0,n[o])()}}function DK(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 P2(){var n=Cu.current;return n!==null?n:jt.pooledCache}function o0(n,o){o===null?se(Cu,Cu.current,n):se(Cu,o.pool,n)}function I5(){var n=P2();return n===null?null:{parent:Dn._currentValue,pool:n}}function B5(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function z5(n){return n=n.status,n==="fulfilled"||n==="rejected"}function H5(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,F5(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(m){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=m}},function(m){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=m}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,F5(n),n}throw Eu=o,$m=!0,Af}}function Cl(n){try{return gW(n)}catch(o){if(o!==null&&typeof o==="object"&&typeof o.then==="function")throw Eu=o,$m=!0,Af;throw o}}function U5(){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,$m=!1,n}function F5(n){if(n===Af||n===yy)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 ar(n){var o=lt;return n!=null&&(lt=o===null?n:o.concat(n)),o}function L2(){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 a0(n,o,s){for(var d=Object.keys(n.props),p=0;p<d.length;p++){var m=d[p];if(m!=="children"&&m!=="key"){o===null&&(o=Xb(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)},m);break}}}function i0(n){var o=Sm;return Sm+=1,Mf===null&&(Mf=B5()),H5(Mf,n,o)}function Th(n,o){o=o.props.ref,n.ref=o!==void 0?o:null}function V5(n,o){if(o.$$typeof===Yq)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 s0(n,o){var s=L2();s!==null?s.run(V5.bind(null,n,o)):V5(n,o)}function j5(n,o){var s=J(n)||"Component";Z8[s]||(Z8[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 l0(n,o){var s=L2();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=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 c0(n,o){var s=L2();s!==null?s.run(K5.bind(null,n,o)):K5(n,o)}function q5(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 m(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=C2(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===uf)return B=K(L,B,F.props.children,ie,F.key),a0(F,B,L),B;if(B!==null&&(B.elementType===we||S5(B,F)||typeof we==="object"&&we!==null&&we.$$typeof===Ao&&Cl(we)===B.type))return B=p(B,F.props),Th(B,F),B.return=L,B._debugOwner=F._owner,B._debugInfo=lt,B;return B=Xb(F,L.mode,ie),Th(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=w2(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=C2(""+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=Xb(B,L.mode,F),Th(F,B),F.return=L,L=ar(B._debugInfo),F._debugInfo=lt,lt=L,F;case cf:return B=w2(B,L.mode,F),B.return=L,B._debugInfo=lt,B;case Ao:var ie=ar(B._debugInfo);return B=Cl(B),L=q(L,B,F),lt=ie,L}if(Kn(B)||U(B))return F=au(B,L.mode,F,null),F.return=L,F._debugOwner=L,F._debugTask=L._debugTask,L=ar(B._debugInfo),F._debugInfo=lt,lt=L,F;if(typeof B.then==="function")return ie=ar(B._debugInfo),L=q(L,i0(B),F),lt=ie,L;if(B.$$typeof===Ri)return q(L,t0(L,B),F);s0(L,B)}return typeof B==="function"&&l0(L,B),typeof B==="symbol"&&c0(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=ar(F._debugInfo),L=T(L,B,F,ie),lt=we,L):null;case cf:return F.key===we?A(L,B,F,ie):null;case Ao:return we=ar(F._debugInfo),F=Cl(F),L=I(L,B,F,ie),lt=we,L}if(Kn(F)||U(F)){if(we!==null)return null;return we=ar(F._debugInfo),L=K(L,B,F,ie,null),lt=we,L}if(typeof F.then==="function")return we=ar(F._debugInfo),L=I(L,B,i0(F),ie),lt=we,L;if(F.$$typeof===Ri)return I(L,B,t0(L,F),ie);s0(L,F)}return typeof F==="function"&&l0(L,F),typeof F==="symbol"&&c0(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=ar(ie._debugInfo),B=T(B,F,ie,we),lt=L,B;case cf:return L=L.get(ie.key===null?F:ie.key)||null,A(B,L,ie,we);case Ao:var Xe=ar(ie._debugInfo);return ie=Cl(ie),B=te(L,B,F,ie,we),lt=Xe,B}if(Kn(ie)||U(ie))return F=L.get(F)||null,L=ar(ie._debugInfo),B=K(B,F,ie,we,null),lt=L,B;if(typeof ie.then==="function")return Xe=ar(ie._debugInfo),B=te(L,B,F,i0(ie),we),lt=Xe,B;if(ie.$$typeof===Ri)return te(L,B,F,t0(B,ie),we);s0(B,ie)}return typeof ie==="function"&&l0(B,ie),typeof ie==="symbol"&&c0(B,ie),null}function xe(L,B,F,ie){if(typeof F!=="object"||F===null)return ie;switch(F.$$typeof){case Ti:case cf:g(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=m(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=m(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=m(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=m(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=m(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=m(ot,B,Be),Xe===null?we=ot:Xe.sibling=ot,Xe=ot);return n&&Ve.forEach(function(HW){return o(L,HW)}),vt&&us(L,Be),we}function Ct(L,B,F,ie){if(typeof F==="object"&&F!==null&&F.type===uf&&F.key===null&&(a0(F,null,L),F=F.props.children),typeof F==="object"&&F!==null){switch(F.$$typeof){case Ti:var we=ar(F._debugInfo);e:{for(var Xe=F.key;B!==null;){if(B.key===Xe){if(Xe=F.type,Xe===uf){if(B.tag===7){s(L,B.sibling),ie=p(B,F.props.children),ie.return=L,ie._debugOwner=F._owner,ie._debugInfo=lt,a0(F,ie,L),L=ie;break e}}else if(B.elementType===Xe||S5(B,F)||typeof Xe==="object"&&Xe!==null&&Xe.$$typeof===Ao&&Cl(Xe)===B.type){s(L,B.sibling),ie=p(B,F.props),Th(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===uf?(ie=au(F.props.children,L.mode,ie,F.key),ie.return=L,ie._debugOwner=L,ie._debugTask=L._debugTask,ie._debugInfo=lt,a0(F,ie,L),L=ie):(ie=Xb(F,L.mode,ie),Th(ie,F),ie.return=L,ie._debugInfo=lt,L=ie)}return L=x(L),lt=we,L;case cf: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=w2(we,L.mode,ie),ie.return=L,L=ie}return x(L);case Ao:return we=ar(F._debugInfo),F=Cl(F),L=Ct(L,B,F,ie),lt=we,L}if(Kn(F))return we=ar(F._debugInfo),L=Re(L,B,F,ie),lt=we,L;if(U(F)){if(we=ar(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]")X8||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."),X8=!0}else F.entries!==Xe||tw||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),tw=!0);return L=Wt(L,B,Ve,ie),lt=we,L}if(typeof F.then==="function")return we=ar(F._debugInfo),L=Ct(L,B,i0(F),ie),lt=we,L;if(F.$$typeof===Ri)return Ct(L,B,t0(L,F),ie);s0(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=C2(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"&&l0(L,F),typeof F==="symbol"&&c0(L,F),s(L,B)}return function(L,B,F,ie){var we=lt;lt=null;try{Sm=0;var Xe=Ct(L,B,F,ie);return Mf=null,Xe}catch(Qt){if(Qt===Af||Qt===yy)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 G5(n,o){var s=Kn(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 _2(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function I2(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:n7,payload:null,callback:null,next:null}}function El(n,o,s){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,rw===d&&!a7){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),a7=!0}if((kt&Gn)!==er)return p=d.pending,p===null?o.next=o:(o.next=p.next,p.next=o),d.pending=o,o=Jb(n),$5(n,null,s),o;return Yb(n,d,o,s),Jb(n)}function Rh(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 u0(n,o){var{updateQueue:s,alternate:d}=n;if(d!==null&&(d=d.updateQueue,s===d)){var p=null,m=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};m===null?p=m=x:m=m.next=x,s=s.next}while(s!==null);m===null?p=m=o:m=m.next=o}else p=m=o;s={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:m,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 kh(){if(ow){var n=kf;if(n!==null)throw n}}function Ah(n,o,s,d){ow=!1;var p=n.updateQueue;ql=!1,rw=p.shared;var{firstBaseUpdate:m,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?m=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(m!==null){var q=p.baseState;x=0,K=A=T=null,C=m;do{var I=C.lane&-536870913,te=I!==C.lane;if(te?(ct&I)===I:(d&I)===I){I!==0&&I===Su&&(ow=!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 r7:if(xe=xe.payload,typeof xe==="function"){Tf=!0;var Ct=xe.call(Wt,q,Re);if(I.mode&Er){qt(!0);try{xe.call(Wt,q,Re)}finally{qt(!1)}}Tf=!1,q=Ct;break e}q=xe;break e;case nw:I.flags=I.flags&-65537|128;case n7:if(Ct=xe.payload,typeof Ct==="function"){if(Tf=!0,xe=Ct.call(Wt,q,Re),I.mode&Er){qt(!0);try{Ct.call(Wt,q,Re)}finally{qt(!1)}}Tf=!1}else xe=Ct;if(xe===null||xe===void 0)break e;q=ft({},q,xe);break e;case o7: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,m===null&&(p.shared.lanes=0),Yl|=x,n.lanes=x,n.memoizedState=q}rw=null}function W5(n,o){if(typeof n!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+n);n.call(o)}function PK(n,o){var s=n.shared.hiddenCallbacks;if(s!==null)for(n.shared.hiddenCallbacks=null,n=0;n<s.length;n++)W5(s[n],o)}function Y5(n,o){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)W5(s[n],o)}function J5(n,o){var s=Ii;se(xy,s,n),se(Nf,o,n),Ii=s|o.baseLanes}function B2(n){se(xy,Ii,n),se(Nf,Nf.current,n)}function z2(n){Ii=xy.current,ce(Nf,n),ce(xy,n)}function Tl(n){var o=n.alternate;se(kn,kn.current&Of,n),se(Do,n,n),oa===null&&(o===null||Nf.current!==null?oa=n:o.memoizedState!==null&&(oa=n))}function H2(n){se(kn,kn.current,n),se(Do,n,n),oa===null&&(oa=n)}function X5(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 d0(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||ZS(s)||eC(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(!i7.has(o)&&(i7.add(o),ia!==null)){for(var s="",d=0;d<=Rs;d++){var p=ia[d],m=d===Rs?n:p;for(p=d+1+". "+p;30>p.length;)p+=" ";p+=m+`
|
|
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 Yd(n){n===void 0||n===null||Kn(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 f0(){var n=J(Je);l7.has(n)||(l7.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 U2(n,o){if(Em)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 F2(n,o,s,d,p,m){if(Es=m,Je=o,ia=n!==null?n._debugHookTypes:null,Rs=-1,Em=n!==null&&n.type!==o.type,Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")m=J(Je),aw.has(m)||(aw.add(m),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.",m===null?"An unknown Component":"<"+m+">"));o.memoizedState=null,o.updateQueue=null,o.lanes=0,oe.H=n!==null&&n.memoizedState!==null?sw:ia!==null?c7:iw,Ru=m=(o.mode&Er)!==We;var x=QC(s,d,p);if(Ru=!1,Pf&&(x=V2(o,s,d,p)),m){qt(!0);try{x=V2(o,s,d,p)}finally{qt(!1)}}return Q5(n,o),x}function Q5(n,o){o._debugHookTypes=ia,o.dependencies===null?Ts!==null&&(o.dependencies={lanes:0,firstContext:null,_debugThenableState:Ts}):o.dependencies._debugThenableState=Ts,oe.H=Tm;var s=Vt!==null&&Vt.next!==null;if(Es=0,ia=ne=Ln=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."),Sy=!1,wm=0,Ts=null,s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");n===null||_n||(n=n.dependencies,n!==null&&e0(n)&&(_n=!0)),$m?($m=!1,n=!0):n=!1,n&&(o=J(o)||"Unknown",s7.has(o)||aw.has(o)||(s7.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 V2(n,o,s,d){Je=n;var p=0;do{if(Pf&&(Ts=null),wm=0,Pf=!1,p>=yW)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(p+=1,Em=!1,Ln=Vt=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}Rs=-1,oe.H=u7,m=QC(o,s,d)}while(Pf);return m}function LK(){var n=oe.H,o=n.useState()[0];return o=typeof o.then==="function"?Mh(o):o,n=n.useState()[0],(Vt!==null?Vt.memoizedState:null)!==n&&(Je.flags|=1024),o}function j2(){var n=Cy!==0;return Cy=0,n}function K2(n,o,s){o.updateQueue=n.updateQueue,o.flags=(o.mode&za)!==We?o.flags&-402655237:o.flags&-2053,n.lanes&=~s}function q2(n){if(Sy){for(n=n.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Sy=!1}Es=0,ia=Ln=Vt=Je=null,Rs=-1,ne=null,Pf=!1,wm=Cy=0,Ts=null}function Pr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ln===null?Je.memoizedState=Ln=n:Ln=Ln.next=n,Ln}function zt(){if(Vt===null){var n=Je.alternate;n=n!==null?n.memoizedState:null}else n=Vt.next;var o=Ln===null?Je.memoizedState:Ln.next;if(o!==null)Ln=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},Ln===null?Je.memoizedState=Ln=n:Ln=Ln.next=n}return Ln}function p0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mh(n){var o=wm;return wm+=1,Ts===null&&(Ts=B5()),n=H5(Ts,n,o),o=Je,(Ln===null?o.memoizedState:Ln.next)===null&&(o=o.alternate,oe.H=o!==null&&o.memoizedState!==null?sw:iw),n}function kl(n){if(n!==null&&typeof n==="object"){if(typeof n.then==="function")return Mh(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=p0(),Je.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0||Em)for(s=o.data[o.index]=Array(n),d=0;d<n;d++)s[d]=Jq;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 G2(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=HK.bind(null,Je,n),[d.memoizedState,n]}function Jd(n){var o=zt();return W2(o,Vt,n)}function W2(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,m=d.pending;if(m!==null){if(p!==null){var x=p.next;p.next=m.next,m.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=m,d.pending=null}if(m=n.baseState,p===null)n.memoizedState=m;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=m):T=T.next=q,Je.lanes|=I,Yl|=I;q=A.action,Ru&&s(m,q),m=A.hasEagerState?A.eagerState:s(m,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=m):T=T.next=I,Je.lanes|=q,Yl|=q;A=A.next}while(A!==null&&A!==o);if(T===null?x=m:T.next=C,!Br(m,n.memoizedState)&&(_n=!0,K&&(s=kf,s!==null)))throw s;n.memoizedState=m,n.baseState=x,n.baseQueue=T,d.lastRenderedState=m}return p===null&&(d.lanes=0),[n.memoizedState,d.dispatch]}function Nh(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,m=o.memoizedState;if(p!==null){s.pending=null;var x=p=p.next;do m=n(m,x.action),x=x.next;while(x!==p);Br(m,o.memoizedState)||(_n=!0),o.memoizedState=m,o.baseQueue===null&&(o.baseState=m),s.lastRenderedState=m}return[m,d]}function Y2(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 m=s();Df||m===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Df=!0)}else{if(m=o(),Df||(s=o(),Br(m,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Df=!0)),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ct&127)!==0||Z5(d,o,m)}return p.memoizedState=m,s={value:m,getSnapshot:o},p.queue=s,b0(tA.bind(null,d,s,n),[n]),d.flags|=2048,Qd(aa|Ur,{destroy:void 0},eA.bind(null,d,s,m,o),null),m}function h0(n,o,s){var d=Je,p=zt(),m=vt;if(m){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(),!Df){var x=o();Br(s,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Df=!0)}if(x=!Br((Vt||p).memoizedState,s))p.memoizedState=s,_n=!0;p=p.queue;var C=tA.bind(null,d,p,n);if(eo(2048,Ur,C,[n]),p.getSnapshot!==o||x||Ln!==null&&Ln.memoizedState.tag&aa){if(d.flags|=2048,Qd(aa|Ur,{destroy:void 0},eA.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.");m||(Es&127)!==0||Z5(d,o,s)}return s}function Z5(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=Je.updateQueue,o===null?(o=p0(),Je.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function eA(n,o,s,d){o.value=s,o.getSnapshot=d,nA(o)&&rA(n)}function tA(n,o,s){return s(function(){nA(o)&&(pi(2,"updateSyncExternalStore()",n),rA(n))})}function nA(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!Br(n,s)}catch(d){return!0}}function rA(n){var o=Cr(n,2);o!==null&&fn(o,n,2)}function J2(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 X2(n){n=J2(n);var o=n.queue,s=SA.bind(null,Je,o);return o.dispatch=s,[n.memoizedState,s]}function Q2(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=fS.bind(null,Je,!0,s),s.dispatch=o,[n,o]}function oA(n,o){var s=zt();return aA(s,Vt,n,o)}function aA(n,o,s,d){return n.baseState=s,W2(n,Vt,typeof d==="function"?d:La)}function iA(n,o){var s=zt();if(Vt!==null)return aA(s,Vt,n,o);return s.baseState=n,[n,s.queue.dispatch]}function _K(n,o,s,d,p){if(C0(n))throw Error("Cannot update form state while rendering.");if(n=o.action,n!==null){var m={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};oe.T!==null?s(!0):m.isTransition=!1,d(m),s=o.pending,s===null?(m.next=o.pending=m,sA(o,m)):(m.next=s.next,o.pending=s.next=m)}}function sA(n,o){var{action:s,payload:d}=o,p=n.state;if(o.isTransition){var m=oe.T,x={};x._updatedFibers=new Set,oe.T=x;try{var C=s(p,d),T=oe.S;T!==null&&T(x,C),lA(n,o,C)}catch(A){Z2(n,o,A)}finally{m!==null&&x.types!==null&&(m.types!==null&&m.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."),m.types=x.types),oe.T=m,m===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),lA(n,o,x)}catch(A){Z2(n,o,A)}}function lA(n,o,s){s!==null&&typeof s==="object"&&typeof s.then==="function"?(oe.asyncTransitions++,s.then(S0,S0),s.then(function(d){cA(n,o,d)},function(d){return Z2(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.")):cA(n,o,s)}function cA(n,o,s){o.status="fulfilled",o.value=s,uA(o),n.state=s,o=n.pending,o!==null&&(s=o.next,s===o?n.pending=null:(s=s.next,o.next=s,sA(n,s)))}function Z2(n,o,s){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=s,uA(o),o=o.next;while(o!==d)}n.action=null}function uA(n){n=n.listeners;for(var o=0;o<n.length;o++)(0,n[o])()}function dA(n,o){return o}function Xd(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 m=na;p.nodeType!==8;){if(!m){p=null;break t}if(p=ko(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m===Mw||m===Y7?p:null}if(p){Xt=ko(p.nextSibling),d=p.data===Mw;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:dA,lastRenderedState:o},s.queue=d,s=SA.bind(null,Je,d),d.dispatch=s,d=J2(!1),m=fS.bind(null,Je,!1,d.queue),d=Pr(),p={state:o,dispatch:null,action:n,pending:null},d.queue=p,s=_K.bind(null,Je,p,m,s),p.dispatch=s,d.memoizedState=n,[o,s,!1]}function m0(n){var o=zt();return fA(o,Vt,n)}function fA(n,o,s){if(o=W2(n,o,dA)[0],n=Jd(La)[0],typeof o==="object"&&o!==null&&typeof o.then==="function")try{var d=Mh(o)}catch(x){if(x===Af)throw yy;throw x}else d=o;o=zt();var p=o.queue,m=p.dispatch;return s!==o.memoizedState&&(Je.flags|=2048,Qd(aa|Ur,{destroy:void 0},IK.bind(null,p,s),null)),[d,m,n]}function IK(n,o){n.action=o}function g0(n){var o=zt(),s=Vt;if(s!==null)return fA(o,s,n);zt(),o=o.memoizedState,s=zt();var d=s.queue.dispatch;return s.memoizedState=n,[o,d,!1]}function Qd(n,o,s,d){return n={tag:n,create:s,deps:d,inst:o,next:null},o=Je.updateQueue,o===null&&(o=p0(),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 eS(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=Qd(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 m=p.memoizedState.inst;Vt!==null&&d!==null&&U2(d,Vt.memoizedState.deps)?p.memoizedState=Qd(o,m,s,d):(Je.flags|=n,p.memoizedState=Qd(aa|o,m,s,d))}function b0(n,o){(Je.mode&za)!==We?du(276826112,Ur,n,o):du(8390656,Ur,n,o)}function BK(n){Je.flags|=4;var o=Je.updateQueue;if(o===null)o=p0(),Je.updateQueue=o,o.events=[n];else{var s=o.events;s===null?o.events=[n]:s.push(n)}}function tS(n){var o=Pr(),s={impl:n};return o.memoizedState=s,function(){if((kt&Gn)!==er)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return s.impl.apply(void 0,arguments)}}function y0(n){var o=zt().memoizedState;return BK({ref:o,nextImpl:n}),function(){if((kt&Gn)!==er)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function nS(n,o){var s=4194308;return(Je.mode&za)!==We&&(s|=134217728),du(s,Po,n,o)}function pA(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 rS(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,pA.bind(null,o,n),s)}function v0(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,pA.bind(null,o,n),s)}function oS(n,o){return Pr().memoizedState=[n,o===void 0?null:o],n}function x0(n,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&U2(o,d[1]))return d[0];return s.memoizedState=[n,o],n}function aS(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 $0(n,o){var s=zt();o=o===void 0?null:o;var d=s.memoizedState;if(o!==null&&U2(o,d[1]))return d[0];if(d=n(),Ru){qt(!0);try{n()}finally{qt(!1)}}return s.memoizedState=[d,o],d}function iS(n,o){var s=Pr();return sS(s,n,o)}function hA(n,o){var s=zt();return gA(s,Vt.memoizedState,n,o)}function mA(n,o){var s=zt();return Vt===null?sS(s,n,o):gA(s,Vt.memoizedState,n,o)}function sS(n,o,s){if(s===void 0||(Es&1073741824)!==0&&(ct&261930)===0)return n.memoizedState=o;return n.memoizedState=s,n=bM(),Je.lanes|=n,Yl|=n,s}function gA(n,o,s,d){if(Br(s,o))return s;if(Nf.current!==null)return n=sS(n,s,d),Br(n,o)||(_n=!0),n;if((Es&42)===0||(Es&1073741824)!==0&&(ct&261930)===0)return _n=!0,n.memoizedState=s;return n=bM(),Je.lanes|=n,Yl|=n,o}function S0(){oe.asyncTransitions--}function bA(n,o,s,d,p){var m=It.p;It.p=m!==0&&m<Ba?m:Ba;var x=oe.T,C={};C._updatedFibers=new Set,oe.T=C,fS(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(S0,S0);var K=DK(T,d);Oh(n,o,K,Ro(n))}else Oh(n,o,d,Ro(n))}catch(q){Oh(n,o,{then:function(){},status:"rejected",reason:q},Ro(n))}finally{It.p=m,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 lS(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=yA(n).queue;NK(n),bA(n,p,o,Bu,s===null?h:function(){return vA(n),s(d)})}function yA(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 vA(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=yA(n);o.next===null&&(o=n.alternate.memoizedState),Oh(n,o.next.queue,{},Ro(n))}function cS(){var n=J2(!1);return n=bA.bind(null,Je,n.queue,!0,!1),Pr().memoizedState=n,[!1,n]}function xA(){var n=Jd(La)[0],o=zt().memoizedState;return[typeof n==="boolean"?n:Mh(n),o]}function $A(){var n=Nh(La)[0],o=zt().memoizedState;return[typeof n==="boolean"?n:Mh(n),o]}function fu(){return nn(Um)}function uS(){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=Cy++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=bW++,o="_"+o+"r_"+s.toString(32)+"_";return n.memoizedState=o}function dS(){return Pr().memoizedState=zK.bind(null,Je)}function zK(n,o){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var d=Ro(s),p=wl(d),m=El(s,p,d);m!==null&&(pi(d,"refresh()",n),fn(m,s,d),Rh(m,s,d)),n=N2(),o!==null&&o!==void 0&&m!==null&&console.error("The seed argument is not enabled outside experimental channels."),p.payload={cache:n};return}s=s.return}}function HK(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};C0(n)?CA(o,p):(p=v2(n,o,p,d),p!==null&&(pi(d,"dispatch()",n),fn(p,n,d),wA(p,o,d)))}function SA(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),Oh(n,o,s,d)&&pi(d,"setState()",n)}function Oh(n,o,s,d){var p={lane:d,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(C0(n))CA(o,p);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null)){var x=oe.H;oe.H=Ua;try{var C=o.lastRenderedState,T=m(C,s);if(p.hasEagerState=!0,p.eagerState=T,Br(T,C))return Yb(n,o,p,0),jt===null&&Wb(),!1}catch(A){}finally{oe.H=x}}if(s=v2(n,o,p,d),s!==null)return fn(s,n,d),wA(s,o,d),!0}return!1}function fS(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:FS(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},C0(n)){if(o)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else o=v2(n,s,d,2),o!==null&&(pi(2,"setOptimistic()",n),fn(o,n,2))}function C0(n){var o=n.alternate;return n===Je||o!==null&&o===Je}function CA(n,o){Pf=Sy=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function wA(n,o,s){if((s&4194048)!==0){var d=o.lanes;d&=n.pendingLanes,s|=d,o.lanes=s,Qc(n,s)}}function pS(n){if(n!==null&&typeof n!=="function"){var o=String(n);$7.has(o)||($7.add(o),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",n))}}function hS(n,o,s,d){var p=n.memoizedState,m=s(d,p);if(n.mode&Er){qt(!0);try{m=s(d,p)}finally{qt(!1)}}m===void 0&&(o=P(o)||"Component",b7.has(o)||(b7.add(o),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",o))),p=m===null||m===void 0?p:ft({},p,m),n.memoizedState=p,n.lanes===0&&(n.updateQueue.baseState=p)}function EA(n,o,s,d,p,m,x){var C=n.stateNode;if(typeof C.shouldComponentUpdate==="function"){if(s=C.shouldComponentUpdate(d,m,x),n.mode&Er){qt(!0);try{s=C.shouldComponentUpdate(d,m,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?!xh(s,d)||!xh(p,m):!0}function TA(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",f7.has(n)||(f7.add(n),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",n)),lw.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 RA(n){zC(n),console.warn(`%s
|
|
121
|
+
|
|
122
|
+
%s
|
|
123
|
+
`,Lf?"An error occurred in the <"+Lf+"> 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 kA(n){var o=Lf?"The above error occurred in the <"+Lf+"> 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, "+((cw||"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,r6+" "+n[0],o6,Wy+d+Wy,a6):n.splice(0,0,r6,o6,Wy+d+Wy,a6),n.unshift(console),d=BW.apply(console.error,n),d()}else console.error(`%o
|
|
130
|
+
|
|
131
|
+
%s
|
|
132
|
+
|
|
133
|
+
%s
|
|
134
|
+
`,n,o,s)}function AA(n){zC(n)}function w0(n,o){try{Lf=o.source?J(o.source):null,cw=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 MA(n,o,s){try{Lf=s.source?J(s.source):null,cw=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 mS(n,o,s){return s=wl(s),s.tag=nw,s.payload={element:null},s.callback=function(){he(o.source,w0,n,o)},s}function gS(n){return n=wl(n),n.tag=nw,n}function bS(n,o,s,d){var p=s.type.getDerivedStateFromError;if(typeof p==="function"){var m=d.value;n.payload=function(){return p(m)},n.callback=function(){C5(s),he(d.source,MA,o,s,d)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch==="function"&&(n.callback=function(){C5(s),he(d.source,MA,o,s,d),typeof p!=="function"&&(Xl===null?Xl=new Set([this]):Xl.add(this)),pW(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 UK(n,o,s,d,p){if(s.flags|=32768,Mi&&Hh(n,p),d!==null&&typeof d==="object"&&typeof d.then==="function"){if(o=s.alternate,o!==null&&Wd(o,s,p,!0),vt&&(Di=!0),s=Do.current,s!==null){switch(s.tag){case 31:case 13:return oa===null?D0():s.alternate===null&&un===As&&(un=Ty),s.flags&=-257,s.flags|=65536,s.lanes=p,d===vy?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([d]):o.add(d),BS(n,d,p)),!1;case 22:return s.flags|=65536,d===vy?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)),BS(n,d,p)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return BS(n,d,p),D0(),!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!==KC&&Sh(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!==KC&&Sh(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=mS(n.stateNode,d,p),u0(n,p),un!==Gl&&(un=ku)),!1;var m=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(Om===null?Om=[m]:Om.push(m),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=mS(s.stateNode,d,n),u0(s,n),!1;case 1:if(o=s.type,m=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError==="function"||m!==null&&typeof m.componentDidCatch==="function"&&(Xl===null||!Xl.has(m))))return s.flags|=65536,p&=-p,s.lanes|=p,p=gS(p),bS(p,n,s,d),u0(s,p),!1}s=s.return}while(s!==null);return!1}function ir(n,o,s,d){o.child=n===null?t7(o,null,s,d):Tu(o,n.child,s,d)}function NA(n,o,s,d,p){s=s.render;var m=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=F2(n,o,s,x,m,p),C=j2(),n!==null&&!_n)return K2(n,o,p),ps(n,o,p);return vt&&C&&E2(o),o.flags|=1,ir(n,o,d,p),o.child}function OA(n,o,s,d,p){if(n===null){var m=s.type;if(typeof m==="function"&&!$2(m)&&m.defaultProps===void 0&&s.compare===null)return s=ou(m),o.tag=15,o.type=s,vS(o,m),DA(n,o,s,d,p);return n=S2(s.type,null,d,o,o.mode,p),n.ref=o.ref,n.return=o,o.child=n}if(m=n.child,!ES(n,p)){var x=m.memoizedProps;if(s=s.compare,s=s!==null?s:xh,s(x,d)&&n.ref===o.ref)return ps(n,o,p)}return o.flags|=1,n=cs(m,d),n.ref=o.ref,n.return=o,o.child=n}function DA(n,o,s,d,p){if(n!==null){var m=n.memoizedProps;if(xh(m,d)&&n.ref===o.ref&&o.type===n.type)if(_n=!1,o.pendingProps=d=m,ES(n,p))(n.flags&131072)!==0&&(_n=!0);else return o.lanes=n.lanes,ps(n,o,p)}return yS(n,o,s,d,p)}function PA(n,o,s,d){var p=d.children,m=n!==null?n.memoizedState:null;if(n===null&&o.stateNode===null&&(o.stateNode={_visibility:sm,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(m=m!==null?m.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&~m}else d=0,o.child=null;return LA(n,o,m,s,d)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},n!==null&&o0(o,m!==null?m.cachePool:null),m!==null?J5(o,m):B2(o),X5(o);else return d=o.lanes=536870912,LA(n,o,m!==null?m.baseLanes|s:s,s,d)}else m!==null?(o0(o,m.cachePool),J5(o,m),Rl(o),o.memoizedState=null):(n!==null&&o0(o,null),B2(o),Rl(o));return ir(n,o,p,s),o.child}function Dh(n,o){return n!==null&&n.tag===22||o.stateNode!==null||(o.stateNode={_visibility:sm,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function LA(n,o,s,d,p){var m=P2();return m=m===null?null:{parent:Dn._currentValue,pool:m},o.memoizedState={baseLanes:s,cachePool:m},n!==null&&o0(o,null),B2(o),X5(o),n!==null&&Wd(n,o,d,!0),o.childLanes=p,null}function E0(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=R0({mode:o.mode,children:o.children},n.mode),o.ref=n.ref,n.child=o,o.return=n,o}function _A(n,o,s){return Tu(o,n.child,null,s),n=E0(o,o.pendingProps),n.flags|=2,To(o),o.memoizedState=null,n}function FK(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=E0(o,d),o.lanes=536870912,Dh(null,n);if(H2(o),(n=Xt)?(s=sN(n,na),s=s!==null&&s.data===Pu?s:null,s!==null&&(d={dehydrated:s,treeContext:k5(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=T5(s),d.return=o,o.child=d,cr=o,Xt=null)):s=null,s===null)throw Qb(o,n),$l(o);return o.lanes=536870912,null}return E0(o,d)}var m=n.memoizedState;if(m!==null){var x=m.dehydrated;if(H2(o),p)if(o.flags&256)o.flags&=-257,o=_A(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(M5(),(s&536870912)!==0&&O0(o),_n||Wd(n,o,s,!1),p=(s&n.childLanes)!==0,_n||p){if(d=jt,d!==null&&(x=Zc(d,s),x!==0&&x!==m.retryLane))throw m.retryLane=x,Cr(n,x),fn(d,n,x),uw;D0(),o=_A(n,o,s)}else n=m.treeContext,Xt=ko(x.nextSibling),cr=o,vt=!0,Hl=null,Di=!1,Oo=null,na=!1,n!==null&&A5(o,n),o=E0(o,d),o.flags|=4096;return o}return m=n.child,d={mode:d.mode,children:d.children},(s&536870912)!==0&&(s&n.lanes)!==0&&O0(o),n=cs(m,d),n.ref=o.ref,o.child=n,n.return=o,n}function T0(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 yS(n,o,s,d,p){if(s.prototype&&typeof s.prototype.render==="function"){var m=P(s)||"Unknown";S7[m]||(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.",m,m),S7[m]=!0)}if(o.mode&Er&&Ha.recordLegacyContextWarning(o,null),n===null&&(vS(o,o.type),s.contextTypes&&(m=P(s)||"Unknown",w7[m]||(w7[m]=!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)",m)))),lu(o),s=F2(n,o,s,d,void 0,p),d=j2(),n!==null&&!_n)return K2(n,o,p),ps(n,o,p);return vt&&d&&E2(o),o.flags|=1,ir(n,o,s,p),o.child}function IA(n,o,s,d,p,m){if(lu(o),Rs=-1,Em=n!==null&&n.type!==o.type,o.updateQueue=null,s=V2(o,d,s,p),Q5(n,o),d=j2(),n!==null&&!_n)return K2(n,o,m),ps(n,o,m);return vt&&d&&E2(o),o.flags|=1,ir(n,o,s,m),o.child}function BA(n,o,s,d,p){switch(c(o)){case!1:var m=o.stateNode,x=new o.type(o.memoizedProps,m.context).state;m.updater.enqueueSetState(m,x,null);break;case!0:o.flags|=128,o.flags|=65536,m=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=gS(C),bS(C,x,o,Co(m,o)),u0(o,C)}if(lu(o),o.stateNode===null){if(x=zl,m=s.contextType,"contextType"in s&&m!==null&&(m===void 0||m.$$typeof!==Ri)&&!x7.has(s)&&(x7.add(s),C=m===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 m!=="object"?" However, it is set to a "+typeof m+".":m.$$typeof===dC?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(m).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 m==="object"&&m!==null&&(x=nn(m)),m=new s(d,x),o.mode&Er){qt(!0);try{m=new s(d,x)}finally{qt(!1)}}if(x=o.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=lw,o.stateNode=m,m._reactInternals=o,m._reactInternalInstance=d7,typeof s.getDerivedStateFromProps==="function"&&x===null&&(x=P(s)||"Component",p7.has(x)||(p7.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,m.state===null?"null":"undefined",x))),typeof s.getDerivedStateFromProps==="function"||typeof m.getSnapshotBeforeUpdate==="function"){var T=C=x=null;if(typeof m.componentWillMount==="function"&&m.componentWillMount.__suppressDeprecationWarning!==!0?x="componentWillMount":typeof m.UNSAFE_componentWillMount==="function"&&(x="UNSAFE_componentWillMount"),typeof m.componentWillReceiveProps==="function"&&m.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof m.UNSAFE_componentWillReceiveProps==="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof m.componentWillUpdate==="function"&&m.componentWillUpdate.__suppressDeprecationWarning!==!0?T="componentWillUpdate":typeof m.UNSAFE_componentWillUpdate==="function"&&(T="UNSAFE_componentWillUpdate"),x!==null||C!==null||T!==null){m=P(s)||"Component";var A=typeof s.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";m7.has(m)||(m7.add(m),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`,m,A,x!==null?`
|
|
142
|
+
`+x:"",C!==null?`
|
|
143
|
+
`+C:"",T!==null?`
|
|
144
|
+
`+T:""))}}m=o.stateNode,x=P(s)||"Component",m.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)),!m.getInitialState||m.getInitialState.isReactClassApproved||m.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),m.getDefaultProps&&!m.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),m.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",x),s.childContextTypes&&!v7.has(s)&&(v7.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&&!y7.has(s)&&(y7.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 m.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 m.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 m.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",x),typeof m.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 m.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",x),typeof m.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",x),C=m.props!==d,m.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),m.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 m.getSnapshotBeforeUpdate!=="function"||typeof m.componentDidUpdate==="function"||h7.has(s)||(h7.add(s),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",P(s))),typeof m.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 m.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=m.state)&&(typeof C!=="object"||Kn(C))&&console.error("%s.state: must be set to an object or null",x),typeof m.getChildContext==="function"&&typeof s.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",x),m=o.stateNode,m.props=d,m.state=o.memoizedState,m.refs={},_2(o),x=s.contextType,m.context=typeof x==="object"&&x!==null?nn(x):zl,m.state===d&&(x=P(s)||"Component",g7.has(x)||(g7.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&Er&&Ha.recordLegacyContextWarning(o,m),Ha.recordUnsafeLifecycleWarnings(o,m),m.state=o.memoizedState,x=s.getDerivedStateFromProps,typeof x==="function"&&(hS(o,s,x,d),m.state=o.memoizedState),typeof s.getDerivedStateFromProps==="function"||typeof m.getSnapshotBeforeUpdate==="function"||typeof m.UNSAFE_componentWillMount!=="function"&&typeof m.componentWillMount!=="function"||(x=m.state,typeof m.componentWillMount==="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount==="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J(o)||"Component"),lw.enqueueReplaceState(m,m.state,null)),Ah(o,d,m,p),kh(),m.state=o.memoizedState),typeof m.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),m=!0}else if(n===null){m=o.stateNode;var K=o.memoizedProps;C=pu(s,K),m.props=C;var q=m.context;T=s.contextType,x=zl,typeof T==="object"&&T!==null&&(x=nn(T)),A=s.getDerivedStateFromProps,T=typeof A==="function"||typeof m.getSnapshotBeforeUpdate==="function",K=o.pendingProps!==K,T||typeof m.UNSAFE_componentWillReceiveProps!=="function"&&typeof m.componentWillReceiveProps!=="function"||(K||q!==x)&&TA(o,m,d,x),ql=!1;var I=o.memoizedState;m.state=I,Ah(o,d,m,p),kh(),q=o.memoizedState,K||I!==q||ql?(typeof A==="function"&&(hS(o,s,A,d),q=o.memoizedState),(C=ql||EA(o,s,C,d,I,q,x))?(T||typeof m.UNSAFE_componentWillMount!=="function"&&typeof m.componentWillMount!=="function"||(typeof m.componentWillMount==="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount==="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728)):(typeof m.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),o.memoizedProps=d,o.memoizedState=q),m.props=d,m.state=q,m.context=x,m=C):(typeof m.componentDidMount==="function"&&(o.flags|=4194308),(o.mode&za)!==We&&(o.flags|=134217728),m=!1)}else{m=o.stateNode,I2(n,o),x=o.memoizedProps,T=pu(s,x),m.props=T,A=o.pendingProps,I=m.context,q=s.contextType,C=zl,typeof q==="object"&&q!==null&&(C=nn(q)),K=s.getDerivedStateFromProps,(q=typeof K==="function"||typeof m.getSnapshotBeforeUpdate==="function")||typeof m.UNSAFE_componentWillReceiveProps!=="function"&&typeof m.componentWillReceiveProps!=="function"||(x!==A||I!==C)&&TA(o,m,d,C),ql=!1,I=o.memoizedState,m.state=I,Ah(o,d,m,p),kh();var te=o.memoizedState;x!==A||I!==te||ql||n!==null&&n.dependencies!==null&&e0(n.dependencies)?(typeof K==="function"&&(hS(o,s,K,d),te=o.memoizedState),(T=ql||EA(o,s,T,d,I,te,C)||n!==null&&n.dependencies!==null&&e0(n.dependencies))?(q||typeof m.UNSAFE_componentWillUpdate!=="function"&&typeof m.componentWillUpdate!=="function"||(typeof m.componentWillUpdate==="function"&&m.componentWillUpdate(d,te,C),typeof m.UNSAFE_componentWillUpdate==="function"&&m.UNSAFE_componentWillUpdate(d,te,C)),typeof m.componentDidUpdate==="function"&&(o.flags|=4),typeof m.getSnapshotBeforeUpdate==="function"&&(o.flags|=1024)):(typeof m.componentDidUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=te),m.props=d,m.state=te,m.context=C,m=T):(typeof m.componentDidUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!=="function"||x===n.memoizedProps&&I===n.memoizedState||(o.flags|=1024),m=!1)}if(C=m,T0(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=U8(C),o.mode&Er){qt(!0);try{U8(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)):ir(n,o,s,p),o.memoizedState=C.state,n=o.child}else n=ps(n,o,p);return p=o.stateNode,m&&p.props!==d&&(_f||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"),_f=!0),n}function zA(n,o,s,d){return su(),o.flags|=256,ir(n,o,s,d),o.child}function vS(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",E7[n]||(console.error("%s: Function components do not support getDerivedStateFromProps.",n),E7[n]=!0)),typeof o.contextType==="object"&&o.contextType!==null&&(o=P(o)||"Unknown",C7[o]||(console.error("%s: Function components do not support contextType.",o),C7[o]=!0))}function xS(n){return{baseLanes:n,cachePool:I5()}}function $S(n,o,s){return n=n!==null?n.childLanes&~s:0,o&&(n|=ao),n}function HA(n,o,s){var d,p=o.pendingProps;l(o)&&(o.flags|=128);var m=!1,x=(o.flags&128)!==0;if((d=x)||(d=n!==null&&n.memoizedState===null?!1:(kn.current&Cm)!==0),d&&(m=!0,o.flags&=-129),d=(o.flags&32)!==0,o.flags&=-33,n===null){if(vt){if(m?Tl(o):Rl(o),(n=Xt)?(s=sN(n,na),s=s!==null&&s.data!==Pu?s:null,s!==null&&(d={dehydrated:s,treeContext:k5(),retryLane:536870912,hydrationErrors:null},o.memoizedState=d,d=T5(s),d.return=o,o.child=d,cr=o,Xt=null)):s=null,s===null)throw Qb(o,n),$l(o);return eC(s)?o.lanes=32:o.lanes=536870912,null}var C=p.children;if(p=p.fallback,m){Rl(o);var T=o.mode;return C=R0({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=xS(s),p.childLanes=$S(n,d,s),o.memoizedState=dw,Dh(null,p)}return Tl(o),SS(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=CS(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=R0({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=xS(s),p.childLanes=$S(n,d,s),o.memoizedState=dw,o=Dh(null,p));else if(Tl(o),M5(),(s&536870912)!==0&&O0(o),eC(K)){if(d=K.nextSibling&&K.nextSibling.dataset,d){C=d.dgst;var q=d.msg;T=d.stck;var I=d.cstck}m=q,d=C,p=T,K=I,C=m,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"&&jC.set(C,p),Sh(p),o=CS(n,o,s)}else if(_n||Wd(n,o,s,!1),d=(s&n.childLanes)!==0,_n||d){if(d=jt,d!==null&&(p=Zc(d,s),p!==0&&p!==A.retryLane))throw A.retryLane=p,Cr(n,p),fn(d,n,p),uw;ZS(K)||D0(),o=CS(n,o,s)}else ZS(K)?(o.flags|=192,o.child=n.child,o=null):(n=A.treeContext,Xt=ko(K.nextSibling),cr=o,vt=!0,Hl=null,Di=!1,Oo=null,na=!1,n!==null&&A5(o,n),o=SS(o,p.children),o.flags|=4096);return o}}if(m)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,Dh(null,p),p=o.child,C=n.child.memoizedState,C===null?C=xS(s):(T=C.cachePool,T!==null?(I=Dn._currentValue,T=T.parent!==I?{parent:I,pool:I}:T):T=I5(),C={baseLanes:C.baseLanes|s,cachePool:T}),p.memoizedState=C,p.childLanes=$S(n,d,s),o.memoizedState=dw,Dh(n.child,p);return A!==null&&(s&62914560)===s&&(s&n.lanes)!==0&&O0(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 SS(n,o){return o=R0({mode:"visible",children:o},n.mode),o.return=n,n.child=o}function R0(n,o){return n=y(22,n,null,o),n.lanes=0,n}function CS(n,o,s){return Tu(o,n.child,null,s),n=SS(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function UA(n,o,s){n.lanes|=o;var d=n.alternate;d!==null&&(d.lanes|=o),A2(n.return,o,s)}function wS(n,o,s,d,p,m){var x=n.memoizedState;x===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:p,treeForkCount:m}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=s,x.tailMode=p,x.treeForkCount=m)}function FA(n,o,s){var d=o.pendingProps,p=d.revealOrder,m=d.tail,x=d.children,C=kn.current;if((d=(C&Cm)!==0)?(C=C&Of|Cm,o.flags|=128):C&=Of,se(kn,C,o),C=p==null?"null":p,p!=="forwards"&&p!=="unstable_legacy-backwards"&&p!=="together"&&p!=="independent"&&!T7[C])if(T7[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=m==null?"null":m,!Ey[C])if(m==null){if(p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")Ey[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 m!=="visible"&&m!=="collapsed"&&m!=="hidden"?(Ey[C]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',m)):p!=="forwards"&&p!=="backwards"&&p!=="unstable_legacy-backwards"&&(Ey[C]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',m));e:if((p==="forwards"||p==="backwards"||p==="unstable_legacy-backwards")&&x!==void 0&&x!==null&&x!==!1)if(Kn(x)){for(C=0;C<x.length;C++)if(!G5(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(!G5(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(ir(n,o,x,s),vt?(xl(),x=lm):x=0,!d&&n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&UA(n,s,o);else if(n.tag===19)UA(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&&d0(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=o.child,o.child=null):(p=s.sibling,s.sibling=null),wS(o,!1,p,s,m,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&&d0(n)===null){o.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}wS(o,!0,s,null,m,x);break;case"together":wS(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(Wd(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 ES(n,o){if((n.lanes&o)!==0)return!0;return n=n.dependencies,n!==null&&e0(n)?!0:!1}function VK(n,o,s){switch(o.tag){case 3:W(o,o.stateNode.containerInfo),Sl(o,Dn,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,H2(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 HA(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||(Wd(n,o,s,!1),d=(s&o.childLanes)!==0),p){if(d)return FA(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,PA(n,o,s,o.pendingProps);case 24:Sl(o,Dn,n.memoizedState.cache)}return ps(n,o,s)}function TS(n,o,s){if(o._debugNeedsRemount&&n!==null){s=S2(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)_n=!0;else{if(!ES(n,s)&&(o.flags&128)===0)return _n=!1,VK(n,o,s);_n=(n.flags&131072)!==0?!0:!1}else{if(_n=!1,d=vt)xl(),d=(o.flags&1048576)!==0;d&&(d=o.index,xl(),R5(o,lm,d))}switch(o.lanes=0,o.tag){case 16:e:if(d=o.pendingProps,n=Cl(o.elementType),o.type=n,typeof n==="function")$2(n)?(d=pu(n,d),o.tag=1,o.type=n=ou(n),o=BA(null,o,n,d,s)):(o.tag=0,vS(o,n),o.type=n=ou(n),o=yS(null,o,n,d,s));else{if(n!==void 0&&n!==null){if(p=n.$$typeof,p===Yh){o.tag=11,o.type=n=x2(n),o=NA(null,o,n,d,s);break e}else if(p===G0){o.tag=14,o=OA(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 yS(n,o,o.type,o.pendingProps,s);case 1:return d=o.type,p=pu(d,o.pendingProps),BA(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 m=o.memoizedState;p=m.element,I2(n,o),Ah(o,d,null,s);var x=o.memoizedState;if(d=x.cache,Sl(o,Dn,d),d!==m.cache&&M2(o,[Dn],s,!0),kh(),d=x.element,m.isDehydrated)if(m={element:d,isDehydrated:!1,cache:x.cache},o.updateQueue.baseState=m,o.memoizedState=m,o.flags&256){o=zA(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),Sh(p),o=zA(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),cr=o,vt=!0,Hl=null,Di=!1,Oo=null,na=!0,s=t7(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}ir(n,o,d,s)}o=o.child}return o;case 26:return T0(n,o),n===null?(s=pN(o.type,null,o.pendingProps,null))?o.memoizedState=s:vt||(s=o.type,n=o.pendingProps,d=_(Dl.current),d=I0(d).createElement(s),d[lr]=o,d[_r]=n,sr(d,s,n),je(d),o.stateNode=d):o.memoizedState=pN(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=dN(o.type,o.pendingProps,d,p,!1),Di||(p=ZM(d,o.type,o.pendingProps,p),p!==null&&(iu(o,0).serverProps=p)),cr=o,na=!0,p=Xt,Nl(o.type)?(Pw=p,Xt=ko(d.firstChild)):Xt=p),ir(n,o,o.pendingProps.children,s),T0(n,o),n===null&&(o.flags|=4194304),o.child;case 5:return n===null&&vt&&(m=Z(),d=f2(o.type,m.ancestorInfo),p=Xt,(x=!p)||(x=Nq(p,o.type,o.pendingProps,na),x!==null?(o.stateNode=x,Di||(m=ZM(x,o.type,o.pendingProps,m),m!==null&&(iu(o,0).serverProps=m)),cr=o,Xt=ko(x.firstChild),na=!1,m=!0):m=!1,x=!m),x&&(d&&Qb(o,p),$l(o))),pe(o),p=o.type,m=o.pendingProps,x=n!==null?n.memoizedProps:null,d=m.children,XS(p,m)?d=null:x!==null&&XS(p,x)&&(o.flags|=32),o.memoizedState!==null&&(p=F2(n,o,LK,null,null,s),Um._currentValue=p),T0(n,o),ir(n,o,d,s),o.child;case 6:return n===null&&vt&&(s=o.pendingProps,n=Z(),d=n.ancestorInfo.current,s=d!=null?Fb(s,d.tag,n.ancestorInfo.implicitRootScope):!0,n=Xt,(d=!n)||(d=Oq(n,o.pendingProps,na),d!==null?(o.stateNode=d,cr=o,Xt=null,d=!0):d=!1,d=!d),d&&(s&&Qb(o,n),$l(o))),null;case 13:return HA(n,o,s);case 4:return W(o,o.stateNode.containerInfo),d=o.pendingProps,n===null?o.child=Tu(o,null,d,s):ir(n,o,d,s),o.child;case 11:return NA(n,o,o.type,o.pendingProps,s);case 7:return ir(n,o,o.pendingProps,s),o.child;case 8:return ir(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,ir(n,o,o.pendingProps.children,s),o.child;case 10:return d=o.type,p=o.pendingProps,m=p.value,"value"in p||R7||(R7=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Sl(o,d,m),ir(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=QC(d,p,void 0),o.flags|=1,ir(n,o,d,s),o.child;case 14:return OA(n,o,o.type,o.pendingProps,s);case 15:return DA(n,o,o.type,o.pendingProps,s);case 19:return FA(n,o,s);case 31:return FK(n,o,s);case 22:return PA(n,o,s,o.pendingProps);case 24:return lu(o),d=nn(Dn),n===null?(p=P2(),p===null&&(p=jt,m=N2(),p.pooledCache=m,cu(m),m!==null&&(p.pooledCacheLanes|=s),p=m),o.memoizedState={parent:d,cache:p},_2(o),Sl(o,Dn,p)):((n.lanes&s)!==0&&(I2(n,o),Ah(o,null,null,s),kh()),p=n.memoizedState,m=o.memoizedState,p.parent!==d?(p={parent:d,cache:d},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),Sl(o,Dn,d)):(d=m.cache,Sl(o,Dn,d),d!==p.cache&&M2(o,[Dn],s,!0))),ir(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 RS(n,o,s,d,p){if(o=(n.mode&cW)!==We)o=!1;if(o){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if($M())n.flags|=8192;else throw Eu=vy,ew}else n.flags&=-16777217}function VA(n,o){if(o.type!=="stylesheet"||(o.state.loading&sa)!==Iu)n.flags&=-16777217;else if(n.flags|=16777216,!yN(o))if($M())n.flags|=8192;else throw Eu=vy,ew}function k0(n,o){o!==null&&(n.flags|=4),n.flags&16384&&(o=n.tag!==22?Fd():536870912,n.lanes|=o,Nu|=o)}function Ph(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:m}=n;m!==null;)s|=m.lanes|m.childLanes,d|=m.subtreeFlags&65011712,d|=m.flags&65011712,p+=m.treeBaseDuration,m=m.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,m=n.selfBaseDuration;for(var x=n.child;x!==null;)s|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,p+=x.actualDuration,m+=x.treeBaseDuration,x=x.sibling;n.actualDuration=p,n.treeBaseDuration=m}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 jK(n,o,s){var d=o.pendingProps;switch(T2(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(Dn,o),Y(o),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),n===null||n.child===null)Gd(o)?(k2(),hs(o)):n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,R2());return Gt(o),null;case 26:var{type:p,memoizedState:m}=o;return n===null?(hs(o),m!==null?(Gt(o),VA(o,m)):(Gt(o),RS(o,p,null,d,s))):m?m!==n.memoizedState?(hs(o),Gt(o),VA(o,m)):(Gt(o),o.flags&=-16777217):(n=n.memoizedProps,n!==d&&hs(o),Gt(o),RS(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(),Gd(o)?N5(o,n):(n=dN(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(Gd(o))N5(o,x);else{switch(m=_(Dl.current),f2(p,x.ancestorInfo),x=x.context,m=I0(m),x){case jf:m=m.createElementNS(hf,p);break;case Ky:m=m.createElementNS(ey,p);break;default:switch(p){case"svg":m=m.createElementNS(hf,p);break;case"math":m=m.createElementNS(ey,p);break;case"script":m=m.createElement("div"),m.innerHTML="<script></script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof d.is==="string"?m.createElement("select",{is:d.is}):m.createElement("select"),d.multiple?m.multiple=!0:d.size&&(m.size=d.size);break;default:m=typeof d.is==="string"?m.createElement(p,{is:d.is}):m.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(m)!=="[object HTMLUnknownElement]"||Ia.call(X7,p)||(X7[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)))}}m[lr]=o,m[_r]=d;e:for(x=o.child;x!==null;){if(x.tag===5||x.tag===6)m.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=m;e:switch(sr(m,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),RS(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(),Gd(o)){if(n=o.stateNode,s=o.memoizedProps,p=!Di,d=null,m=cr,m!==null)switch(m.tag){case 3:p&&(p=cN(n,s,d),p!==null&&(iu(o,0).serverProps=p));break;case 27:case 5:d=m.memoizedProps,p&&(p=cN(n,s,d),p!==null&&(iu(o,0).serverProps=p))}n[lr]=o,n=n.nodeValue===s||d!==null&&d.suppressHydrationWarning===!0||WM(n.nodeValue,s)?!0:!1,n||$l(o,!0)}else p=s.ancestorInfo.current,p!=null&&Fb(d,p.tag,s.ancestorInfo.implicitRootScope),n=I0(n).createTextNode(d),n[lr]=o,o.stateNode=n}return Gt(o),null;case 31:if(s=o.memoizedState,n===null||n.memoizedState!==null){if(d=Gd(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[lr]=o,Gt(o),(o.mode&st)!==We&&s!==null&&(n=o.child,n!==null&&(o.treeBaseDuration-=n.treeBaseDuration))}else k2(),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=R2(),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,m=Gd(o),p!==null&&p.dehydrated!==null){if(n===null){if(!m)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(m=o.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");m[lr]=o,Gt(o),(o.mode&st)!==We&&p!==null&&(p=o.child,p!==null&&(o.treeBaseDuration-=p.treeBaseDuration))}else k2(),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=R2(),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&&Eh(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),m=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(m=d.memoizedState.cachePool.pool),m!==p&&(d.flags|=2048)),s!==n&&s&&(o.child.flags|=8192),k0(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&&jS(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,m=d.rendering,m===null)if(p)Ph(d,!1);else{if(un!==As||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(m=d0(n),m!==null){o.flags|=128,Ph(d,!1),n=m.updateQueue,o.updateQueue=n,k0(o,n),o.subtreeFlags=0,n=s;for(s=o.child;s!==null;)E5(s,n),s=s.sibling;return se(kn,kn.current&Of|Cm,o),vt&&us(o,d.treeForkCount),o.child}n=n.sibling}d.tail!==null&&Xn()>Oy&&(o.flags|=128,p=!0,Ph(d,!1),o.lanes=4194304)}else{if(!p)if(n=d0(m),n!==null){if(o.flags|=128,p=!0,n=n.updateQueue,o.updateQueue=n,k0(o,n),Ph(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!vt)return Gt(o),null}else 2*Xn()-d.renderingStartTime>Oy&&s!==536870912&&(o.flags|=128,p=!0,Ph(d,!1),o.lanes=4194304);d.isBackwards?(m.sibling=o.child,o.child=m):(n=d.last,n!==null?n.sibling=m:o.child=m,d.last=m)}if(d.tail!==null)return n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=Xn(),n.sibling=null,s=kn.current,s=p?s&Of|Cm:s&Of,se(kn,s,o),vt&&us(o,d.treeForkCount),n;return Gt(o),null;case 22:case 23:return To(o),z2(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&&k0(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(Dn,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 KK(n,o){switch(T2(o),o.tag){case 1:return n=o.flags,n&65536?(o.flags=n&-65537|128,(o.mode&st)!==We&&Eh(o),o):null;case 3:return ds(Dn,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&&Eh(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&&Eh(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),z2(o),n!==null&&ce(Cu,o),n=o.flags,n&65536?(o.flags=n&-65537|128,(o.mode&st)!==We&&Eh(o),o):null;case 24:return ds(Dn,o),null;case 25:return null;default:return null}}function jA(n,o){switch(T2(o),o.tag){case 3:ds(Dn,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),z2(o),n!==null&&ce(Cu,o);break;case 24:ds(Dn,o)}}function xi(n){return(n.mode&st)!==We}function KA(n,o){xi(n)?(vi(),Lh(o,n),yi()):Lh(o,n)}function kS(n,o,s){xi(n)?(vi(),Zd(s,n,o),yi()):Zd(s,n,o)}function Lh(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)!==$y&&(Uf=!0),d=he(o,hW,s),(n&Hr)!==$y&&(Uf=!1),d!==void 0&&typeof d!=="function")){var m=void 0;m=(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 `+m+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
148
|
+
|
|
149
|
+
`+m+`(() => {
|
|
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)},m,x)}s=s.next}while(s!==p)}}catch(C){_t(o,o.return,C)}}function Zd(n,o,s){try{var d=o.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var m=p.next;d=m;do{if((d.tag&n)===n){var x=d.inst,C=x.destroy;C!==void 0&&(x.destroy=void 0,(n&Hr)!==$y&&(Uf=!0),p=o,he(p,mW,p,s,C),(n&Hr)!==$y&&(Uf=!1))}d=d.next}while(d!==m)}}catch(T){_t(o,o.return,T)}}function qA(n,o){xi(n)?(vi(),Lh(o,n),yi()):Lh(o,n)}function AS(n,o,s){xi(n)?(vi(),Zd(s,n,o),yi()):Zd(s,n,o)}function GA(n){var o=n.updateQueue;if(o!==null){var s=n.stateNode;n.type.defaultProps||"ref"in n.memoizedProps||_f||(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,Y5,o,s)}catch(d){_t(n,n.return,d)}}}function qK(n,o,s){return n.getSnapshotBeforeUpdate(o,s)}function GK(n,o){var{memoizedProps:s,memoizedState:d}=o;o=n.stateNode,n.type.defaultProps||"ref"in n.memoizedProps||_f||(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),m=he(n,qK,o,p,d);s=k7,m!==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=m}catch(x){_t(n,n.return,x)}}function WA(n,o,s){s.props=pu(n.type,n.memoizedProps),s.state=n.memoizedState,xi(n)?(vi(),he(n,G8,n,o,s),yi()):he(n,G8,n,o,s)}function WK(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 _h(n,o){try{he(n,WK,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 YA(n,o,s,d){var p=n.memoizedProps,m=p.id,x=p.onCommit;p=p.onRender,o=o===null?"mount":"update",my&&(o="nested-update"),typeof p==="function"&&p(m,o,n.actualDuration,n.treeBaseDuration,n.actualStartTime,s),typeof x==="function"&&x(m,o,d,s)}function YK(n,o,s,d){var p=n.memoizedProps;n=p.id,p=p.onPostCommit,o=o===null?"mount":"update",my&&(o="nested-update"),typeof p==="function"&&p(n,o,d,s)}function JA(n){var{type:o,memoizedProps:s,stateNode:d}=n;try{he(n,vq,d,o,s,n)}catch(p){_t(n,n.return,p)}}function MS(n,o,s){try{he(n,$q,n.stateNode,n.type,s,o,n)}catch(d){_t(n,n.return,d)}}function XA(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Nl(n.type)||n.tag===4}function NS(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||XA(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 OS(n,o,s){var d=n.tag;if(d===5||d===6)n=n.stateNode,o?(oN(s),(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,o)):(oN(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(OS(n,o,s),n=n.sibling;n!==null;)OS(n,o,s),n=n.sibling}function A0(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(A0(n,o,s),n=n.sibling;n!==null;)A0(n,o,s),n=n.sibling}function JK(n){for(var o,s=n.return;s!==null;){if(XA(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=NS(n),A0(n,s,o);break;case 5:s=o.stateNode,o.flags&32&&(rN(s),o.flags&=-33),o=NS(n),A0(n,o,s);break;case 3:case 4:o=o.stateNode.containerInfo,s=NS(n),OS(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 QA(n){var{stateNode:o,memoizedProps:s}=n;try{he(n,Iq,n.type,s,o,n)}catch(d){_t(n,n.return,d)}}function ZA(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 XK(n,o){if(n=n.containerInfo,Nw=Yy,n=m5(n),m2(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:m}=d;d=d.focusOffset;try{s.nodeType,m.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!==m||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===m&&++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;Ow={focusedElem:n,selectionRange:s},Yy=!1;for(Zn=o;Zn!==null;)if(o=Zn,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,Zn=n;else for(;Zn!==null;){switch(n=o=Zn,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&&GK(n,s);break;case 3:if((p&1024)!==0){if(n=n.stateNode.containerInfo,s=n.nodeType,s===9)QS(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":QS(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,Zn=n;break}Zn=o.return}}function eM(n,o,s){var d=wo(),p=hi(),m=gi(),x=bi(),C=s.flags;switch(s.tag){case 0:case 11:case 15:Si(n,s),C&4&&KA(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||_f||(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,ZC,s,n),yi()):he(s,ZC,s,n);else{var T=pu(s.type,o.memoizedProps);o=o.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||_f||(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,j8,s,n,T,o,n.__reactInternalSnapshotBeforeUpdate),yi()):he(s,j8,s,n,T,o,n.__reactInternalSnapshotBeforeUpdate)}C&64&&GA(s),C&512&&_h(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,Y5,C,T)}catch(K){_t(s,s.return,K)}}n.effectDuration+=n0(o);break;case 27:o===null&&C&4&&QA(s);case 26:case 5:if(Si(n,s),o===null){if(C&4)JA(s);else if(C&64){n=s.type,o=s.memoizedProps,T=s.stateNode;try{he(s,xq,T,n,o,s)}catch(K){_t(s,s.return,K)}}}C&512&&_h(s,s.return);break;case 12:if(C&4){C=fs(),Si(n,s),n=s.stateNode,n.effectDuration+=wh(C);try{he(s,YA,s,o,Ul,n.effectDuration)}catch(K){_t(s,s.return,K)}}else Si(n,s);break;case 31:Si(n,s),C&4&&rM(n,s);break;case 13:Si(n,s),C&4&&oM(n,s),C&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(C=iq.bind(null,s),Dq(n,C))));break;case 22:if(C=s.memoizedState!==null||ks,!C){o=o!==null&&o.memoizedState!==null||In,T=ks;var A=In;ks=C,(In=o)&&!A?(Ci(n,s,(s.subtreeFlags&8772)!==0),(s.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&qb(s,Ke,Ge)):Si(n,s),ks=T,In=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&&(ZA(s.return.alternate,s.return)||di(s,Ke,Ge,"Mount"))),Eo(d),mi(p),rn=m,pn=x}function tM(n){var o=n.alternate;o!==null&&(n.alternate=null,tM(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;)nM(n,o,s),s=s.sibling}function nM(n,o,s){if(wr&&typeof wr.onCommitFiberUnmount==="function")try{wr.onCommitFiberUnmount(ff,s)}catch(A){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",A))}var d=wo(),p=hi(),m=gi(),x=bi();switch(s.tag){case 26:In||$i(s,o),ms(n,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(n=s.stateNode,n.parentNode.removeChild(n));break;case 27:In||$i(s,o);var C=Bn,T=ro;Nl(s.type)&&(Bn=s.stateNode,ro=!1),ms(n,o,s),he(s,Kh,s.stateNode),Bn=C,ro=T;break;case 5:In||$i(s,o);case 6:if(C=Bn,T=ro,Bn=null,ms(n,o,s),Bn=C,ro=T,Bn!==null)if(ro)try{he(s,wq,Bn,s.stateNode)}catch(A){_t(s,o,A)}else try{he(s,Cq,Bn,s.stateNode)}catch(A){_t(s,o,A)}break;case 18:Bn!==null&&(ro?(n=Bn,aN(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),lf(n)):aN(Bn,s.stateNode));break;case 4:C=Bn,T=ro,Bn=s.stateNode.containerInfo,ro=!0,ms(n,o,s),Bn=C,ro=T;break;case 0:case 11:case 14:case 15:Zd(Hr,s,o),In||kS(s,o,Po),ms(n,o,s);break;case 1:In||($i(s,o),C=s.stateNode,typeof C.componentWillUnmount==="function"&&WA(s,o,C)),ms(n,o,s);break;case 21:ms(n,o,s);break;case 22:In=(C=In)||s.memoizedState!==null,ms(n,o,s),In=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=m,pn=x}function rM(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{he(o,Lq,n)}catch(s){_t(o,o.return,s)}}}function oM(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{he(o,_q,n)}catch(s){_t(o,o.return,s)}}function QK(n){switch(n.tag){case 31:case 13:case 19:var o=n.stateNode;return o===null&&(o=n.stateNode=new A7),o;case 22:return n=n.stateNode,o=n._retryCache,o===null&&(o=n._retryCache=new A7),o;default:throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}}function M0(n,o){var s=QK(n);o.forEach(function(d){if(!s.has(d)){if(s.add(d),Mi)if(If!==null&&Bf!==null)Hh(Bf,If);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var p=sq.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,m=o,x=s[d],C=wo(),T=m;e:for(;T!==null;){switch(T.tag){case 27:if(Nl(T.type)){Bn=T.stateNode,ro=!1;break e}break;case 5:Bn=T.stateNode,ro=!1;break e;case 3:case 4:Bn=T.stateNode.containerInfo,ro=!0;break e}T=T.return}if(Bn===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");nM(p,m,x),Bn=null,ro=!1,(x.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(x,Ke,Ge,"Unmount"),Eo(C),p=x,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)aM(o,n),o=o.sibling}function aM(n,o){var s=wo(),d=hi(),p=gi(),m=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&&(Zd(Hr|aa,n,n.return),Lh(Hr|aa,n),kS(n,n.return,Po|aa));break;case 1:if(to(o,n),no(n),C&512&&(In||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&&(In||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[Qh]||A[lr]||A.namespaceURI===hf||A.hasAttribute("itemprop"))A=T.createElement(C),T.head.insertBefore(A,T.querySelector("head > title"));sr(A,C,x),A[lr]=n,je(A),C=A;break e;case"link":var K=gN("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),sr(A,C,x),T.head.appendChild(A);break;case"meta":if(K=gN("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),sr(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[lr]=n,je(A),C=A}n.stateNode=C}else bN(T,n.type,n.stateNode);else n.stateNode=mN(T,C,n.memoizedProps);else A!==C?(A===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):A.count--,C===null?bN(T,n.type,n.stateNode):mN(T,C,n.memoizedProps)):C===null&&n.stateNode!==null&&MS(n,n.memoizedProps,x.memoizedProps)}break;case 27:to(o,n),no(n),C&512&&(In||x===null||$i(x,x.return)),x!==null&&C&4&&MS(n,n.memoizedProps,x.memoizedProps);break;case 5:if(to(o,n),no(n),C&512&&(In||x===null||$i(x,x.return)),n.flags&32){T=n.stateNode;try{he(n,rN,T)}catch(Re){_t(n,n.return,Re)}}C&4&&n.stateNode!=null&&(T=n.memoizedProps,MS(n,T,x!==null?x.memoizedProps:T)),C&1024&&(fw=!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,Sq,T,x,C)}catch(Re){_t(n,n.return,Re)}}break;case 3:if(T=fs(),qy=null,A=Fa,Fa=B0(o.containerInfo),to(o,n),Fa=A,no(n),C&4&&x!==null&&x.memoizedState.isDehydrated)try{he(n,Pq,o.containerInfo)}catch(Re){_t(n,n.return,Re)}fw&&(fw=!1,iM(n)),o.effectDuration+=n0(T);break;case 4:C=Fa,Fa=B0(n.stateNode.containerInfo),to(o,n),no(n),Fa=C;break;case 12:C=fs(),to(o,n),no(n),n.stateNode.effectDuration+=wh(C);break;case 31:to(o,n),no(n),C&4&&(C=n.updateQueue,C!==null&&(n.updateQueue=null,M0(n,C)));break;case 13:to(o,n),no(n),n.child.flags&8192&&n.memoizedState!==null!==(x!==null&&x.memoizedState!==null)&&(Ny=Xn()),C&4&&(C=n.updateQueue,C!==null&&(n.updateQueue=null,M0(n,C)));break;case 22:T=n.memoizedState!==null;var I=x!==null&&x.memoizedState!==null,te=ks,xe=In;if(ks=te||T,In=xe||I,to(o,n),In=xe,ks=te,I&&!T&&!te&&!xe&&(n.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&qb(n,Ke,Ge),no(n),C&8192)e:for(o=n.stateNode,o._visibility=T?o._visibility&~sm:o._visibility|sm,!T||x===null||I||ks||In||(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,Tq,A):he(I,Aq,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,Rq,K):he(I,Mq,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,Eq,q):he(I,kq,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,M0(n,x))));break;case 19:to(o,n),no(n),C&4&&(C=n.updateQueue,C!==null&&(n.updateQueue=null,M0(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&&(ZA(n.return.alternate,n.return)||di(n,Ke,Ge,"Mount"))),Eo(s),mi(d),rn=p,pn=m}function no(n){var o=n.flags;if(o&2){try{he(n,JK,n)}catch(s){_t(n,n.return,s)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function iM(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var o=n;iM(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;)eM(n,o.alternate,o),o=o.sibling}function sM(n){var o=wo(),s=hi(),d=gi(),p=bi();switch(n.tag){case 0:case 11:case 14:case 15:kS(n,n.return,Po),hu(n);break;case 1:$i(n,n.return);var m=n.stateNode;typeof m.componentWillUnmount==="function"&&WA(n,n.return,m),hu(n);break;case 27:he(n,Kh,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;)sM(n),n=n.sibling}function lM(n,o,s,d){var p=wo(),m=hi(),x=gi(),C=bi(),T=s.flags;switch(s.tag){case 0:case 11:case 15:Ci(n,s,d),KA(s,Po);break;case 1:if(Ci(n,s,d),o=s.stateNode,typeof o.componentDidMount==="function"&&he(s,ZC,s,o),o=s.updateQueue,o!==null){n=s.stateNode;try{he(s,PK,o,n)}catch(A){_t(s,s.return,A)}}d&&T&64&&GA(s),_h(s,s.return);break;case 27:QA(s);case 26:case 5:Ci(n,s,d),d&&o===null&&T&4&&JA(s),_h(s,s.return);break;case 12:if(d&&T&4){T=fs(),Ci(n,s,d),d=s.stateNode,d.effectDuration+=wh(T);try{he(s,YA,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&&rM(n,s);break;case 13:Ci(n,s,d),d&&T&4&&oM(n,s);break;case 22:s.memoizedState===null&&Ci(n,s,d),_h(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(m),rn=x,pn=C}function Ci(n,o,s){s=s&&(o.subtreeFlags&8772)!==0;for(o=o.child;o!==null;)lM(n,o.alternate,o,s),o=o.sibling}function DS(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&&Ch(s))}function PS(n,o){n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(cu(o),n!=null&&Ch(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 m=o.sibling;cM(n,o,s,d,m!==null?m.actualStartTime:p),o=m}}function cM(n,o,s,d,p){var m=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&&Gb(o,o.actualStartTime,p,qn,s),_a(n,o,s,d,p),K&2048&&qA(o,Ur|aa);break;case 1:(o.mode&st)!==We&&0<o.actualStartTime&&((o.flags&128)!==0?b2(o,o.actualStartTime,p,[]):(o.flags&1)!==0&&Gb(o,o.actualStartTime,p,qn,s)),_a(n,o,s,d,p);break;case 3:var q=fs(),I=qn;qn=o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)===0,_a(n,o,s,d,p),qn=I,K&2048&&(s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),d=o.memoizedState.cache,d!==s&&(cu(d),s!=null&&Ch(s))),n.passiveEffectDuration+=n0(q);break;case 12:if(K&2048){K=fs(),_a(n,o,s,d,p),n=o.stateNode,n.passiveEffectDuration+=wh(K);try{he(o,YK,o,o.alternate,Ul,n.passiveEffectDuration)}catch(te){_t(o,o.return,te)}}else _a(n,o,s,d,p);break;case 31:K=qn,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?(qn=!1,q=q.hydrationErrors,q!==null&&b2(o,o.actualStartTime,p,q)):qn=!0):qn=!1,_a(n,o,s,d,p),qn=K;break;case 13:K=qn,q=o.alternate!==null?o.alternate.memoizedState:null,I=o.memoizedState,q===null||q.dehydrated===null||I!==null&&I.dehydrated!==null?qn=!1:(I=o.deletions,I!==null&&0<I.length&&I[0].tag===18?(qn=!1,q=q.hydrationErrors,q!==null&&b2(o,o.actualStartTime,p,q)):qn=!0),_a(n,o,s,d,p),qn=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):Ih(n,o,s,d,p):I._visibility&ys?_a(n,o,s,d,p):(I._visibility|=ys,ef(n,o,s,d,(o.subtreeFlags&10256)!==0||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child),p),(o.mode&st)===We||qn||(n=o.actualStartTime,0<=n&&0.05<p-n&&qb(o,n,p),0<=Ke&&0<=Ge&&0.05<Ge-Ke&&qb(o,Ke,Ge))),K&2048&&DS(q,o);break;case 24:_a(n,o,s,d,p),K&2048&&PS(o.alternate,o);break;default:_a(n,o,s,d,p)}if((o.mode&st)!==We){if(n=!qn&&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(m),mi(x),rn=C,pn=T,Il=A}function ef(n,o,s,d,p,m){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;uM(n,o,s,d,p,x!==null?x.actualStartTime:m),o=x}}function uM(n,o,s,d,p,m){var x=wo(),C=hi(),T=gi(),A=bi(),K=Il;p&&(o.mode&st)!==We&&0<o.actualStartTime&&(o.flags&1)!==0&&Gb(o,o.actualStartTime,m,qn,s);var q=o.flags;switch(o.tag){case 0:case 11:case 15:ef(n,o,s,d,p,m),qA(o,Ur);break;case 23:break;case 22:var I=o.stateNode;o.memoizedState!==null?I._visibility&ys?ef(n,o,s,d,p,m):Ih(n,o,s,d,m):(I._visibility|=ys,ef(n,o,s,d,p,m)),p&&q&2048&&DS(o.alternate,o);break;case 24:ef(n,o,s,d,p,m),p&&q&2048&&PS(o.alternate,o);break;default:ef(n,o,s,d,p,m)}(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 Ih(n,o,s,d,p){if(o.subtreeFlags&10256||o.actualDuration!==0&&(o.alternate===null||o.alternate.child!==o.child))for(var m=o.child;m!==null;){o=m.sibling;var x=n,C=s,T=d,A=o!==null?o.actualStartTime:p,K=Il;(m.mode&st)!==We&&0<m.actualStartTime&&(m.flags&1)!==0&&Gb(m,m.actualStartTime,A,qn,C);var q=m.flags;switch(m.tag){case 22:Ih(x,m,C,T,A),q&2048&&DS(m.alternate,m);break;case 24:Ih(x,m,C,T,A),q&2048&&PS(m.alternate,m);break;default:Ih(x,m,C,T,A)}Il=K,m=o}}function tf(n,o,s){if(n.subtreeFlags&Rm)for(n=n.child;n!==null;)dM(n,o,s),n=n.sibling}function dM(n,o,s){switch(n.tag){case 26:tf(n,o,s),n.flags&Rm&&n.memoizedState!==null&&Hq(s,Fa,n.memoizedState,n.memoizedProps);break;case 5:tf(n,o,s);break;case 3:case 4:var d=Fa;Fa=B0(n.stateNode.containerInfo),tf(n,o,s),Fa=d;break;case 22:n.memoizedState===null&&(d=n.alternate,d!==null&&d.memoizedState!==null?(d=Rm,Rm=16777216,tf(n,o,s),Rm=d):tf(n,o,s));break;default:tf(n,o,s)}}function fM(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 Bh(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();Zn=d,mM(d,n),(d.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(d,Ke,Ge,"Unmount"),Eo(p)}fM(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)pM(n),n=n.sibling}function pM(n){var o=wo(),s=hi(),d=gi(),p=bi();switch(n.tag){case 0:case 11:case 15:Bh(n),n.flags&2048&&AS(n,n.return,Ur|aa);break;case 3:var m=fs();Bh(n),n.stateNode.passiveEffectDuration+=n0(m);break;case 12:m=fs(),Bh(n),n.stateNode.passiveEffectDuration+=wh(m);break;case 22:m=n.stateNode,n.memoizedState!==null&&m._visibility&ys&&(n.return===null||n.return.tag!==13)?(m._visibility&=~ys,N0(n),(n.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(n,Ke,Ge,"Disconnect")):Bh(n);break;default:Bh(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 N0(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();Zn=d,mM(d,n),(d.mode&st)!==We&&0<=Ke&&0<=Ge&&0.05<Ge-Ke&&di(d,Ke,Ge,"Unmount"),Eo(p)}fM(n)}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:AS(n,n.return,Ur),N0(n);break;case 22:var m=n.stateNode;m._visibility&ys&&(m._visibility&=~ys,N0(n));break;default:N0(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 mM(n,o){for(;Zn!==null;){var s=Zn,d=s,p=o,m=wo(),x=hi(),C=gi(),T=bi();switch(d.tag){case 0:case 11:case 15:AS(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:Ch(d.memoizedState.cache)}if((d.mode&st)!==We&&0<=Ke&&0<=Ge&&(pn||0.05<cn)&&fi(d,Ke,Ge,cn,rn),Eo(m),mi(x),pn=T,rn=C,d=s.child,d!==null)d.return=s,Zn=d;else e:for(s=n;Zn!==null;){if(d=Zn,m=d.sibling,x=d.return,tM(d),d===s){Zn=null;break e}if(m!==null){m.return=x,Zn=m;break e}Zn=x}}}function ZK(){xW.forEach(function(n){return n()})}function gM(){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&Gn)!==er&&ct!==0)return ct&-ct;var o=oe.T;return o!==null?(o._updatedFibers||(o._updatedFibers=new Set),o._updatedFibers.add(n),FS()):Q()}function bM(){if(ao===0)if((ct&536870912)===0||vt){var n=J0;J0<<=1,(J0&3932160)===0&&(J0=262144),ao=n}else ao=536870912;return n=Do.current,n!==null&&(n.flags|=32),ao}function fn(n,o,s){if(Uf&&console.error("useInsertionEffect must not schedule updates."),Cw&&(Ly=!0),n===jt&&(Ht===Au||Ht===Mu)||n.cancelPendingCommit!==null)rf(n,0),Al(n,ct,ao,!1);if(bl(n,s),(kt&Gn)!==er&&n===jt){if(ki)switch(o.tag){case 0:case 11:case 15:n=ut&&J(ut)||"Unknown",j7.has(n)||(j7.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:V7||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),V7=!0)}}else Mi&&fh(n,o,s),cq(o),n===jt&&((kt&Gn)===er&&(Jl|=s),un===Gl&&Al(n,ct,ao,!1)),wi(n)}function yM(n,o,s){if((kt&(Gn|Lo))!==er)throw Error("Should not already be working.");if(ct!==0&&ut!==null){var d=ut,p=Xn();switch(_8){case Mm:case Au:var m=pm;Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",m,p,Xo,void 0,"primary-light")):console.timeStamp("Suspended",m,p,Xo,void 0,"primary-light"));break;case Mu:m=pm,Jt&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",m,p,Xo,void 0,"primary-light")):console.timeStamp("Action",m,p,Xo,void 0,"primary-light"));break;default:Jt&&(d=p-pm,3>d||console.timeStamp("Blocked",pm,p,Xo,void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}m=(s=!s&&(o&127)===0&&(o&n.expiredLanes)===0||Jc(n,o))?tq(n,o):_S(n,o,!0);var x=s;do{if(m===As){zf&&!s&&Al(n,o,0,!1),o=Ht,pm=Pn(),_8=o;break}else{if(d=Xn(),p=n.current.alternate,x&&!eq(p)){So(o),p=Qn,m=d,!Jt||m<=p||(vn?vn.run(console.timeStamp.bind(console,"Teared Render",p,m,mt,pt,"error")):console.timeStamp("Teared Render",p,m,mt,pt,"error")),mu(o,d),m=_S(n,o,!1),x=!1;continue}if(m===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),y2(Qn,d,o,vn),mu(o,d),o=C;e:{d=n,m=x,x=Om;var T=d.current.memoizedState.isDehydrated;if(T&&(rf(d,C).flags|=256),C=_S(d,C,!1),C!==ku){if(mw&&!T){d.errorRecoveryDisabledLanes|=m,Jl|=m,m=Gl;break e}d=Fr,Fr=x,d!==null&&(Fr===null?Fr=d:Fr.push.apply(Fr,d))}m=C}if(x=!1,m!==ku)continue;else d=Xn()}}if(m===Am){So(o),y2(Qn,d,o,vn),mu(o,d),rf(n,0),Al(n,o,0,!0);break}e:{switch(s=n,m){case As:case Am:throw Error("Root did not complete. This is a bug in React.");case Gl:if((o&4194048)!==o)break;case Ry:So(o),y5(Qn,d,o,vn),mu(o,d),p=o,(p&127)!==0?fy=d:(p&4194048)!==0&&(py=d),Al(s,o,ao,!Wl);break e;case ku:Fr=null;break;case Ty:case M7:break;default:throw Error("Unknown root exit status.")}if(oe.actQueue!==null)IS(s,p,o,Fr,Dm,My,ao,Jl,Nu,m,null,null,Qn,d);else{if((o&62914560)===o&&(x=Ny+D7-Xn(),10<x)){if(Al(s,o,ao,!Wl),Yc(s,0,!0)!==0)break e;Va=o,s.timeoutHandle=Q7(vM.bind(null,s,p,Fr,Dm,My,o,ao,Jl,Nu,Wl,m,"Throttled",Qn,d),x);break e}vM(s,p,Fr,Dm,My,o,ao,Jl,Nu,Wl,m,null,Qn,d)}}}break}while(1);wi(n)}function vM(n,o,s,d,p,m,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},dM(o,m,Re),xe=(m&62914560)===m?Ny-Xn():(m&4194048)===m?O7-Xn():0,xe=Uq(Re,xe),xe!==null){Va=m,n.cancelPendingCommit=xe(IS.bind(null,n,o,m,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,m,x,!A);return}}IS(n,o,m,s,d,p,x,C,T,K,Re,q,I,te)}function eq(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],m=p.getSnapshot;p=p.value;try{if(!Br(m(),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&=~gw,o&=~Jl,n.suspendedLanes|=o,n.pingedLanes&=~o,d&&(n.warmLanes|=o),d=n.expirationTimes;for(var p=o;0<p;){var m=31-Lr(p),x=1<<m;d[m]=-1,p&=~x}s!==0&&Xc(n,s,o)}function nf(){return(kt&(Gn|Lo))===er?(Uh(0,!1),!1):!0}function LS(){if(ut!==null){if(Ht===oo)var n=ut.return;else n=ut,Zb(),q2(n),Mf=null,Sm=0,n=ut;for(;n!==null;)jA(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&&(P8=o),(n&2080374784)!==0&&(L8=o)}function rf(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=Qn;if(Qn=Pn(),ct!==0&&0<s){if(So(ct),un===Ty||un===Gl)y5(s,Qn,o,vn);else{var d=Qn,p=vn;if(Jt&&!(d<=s)){var m=(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,m)):console.timeStamp(x,s,d,mt,pt,m)}}mu(ct,Qn)}if(s=vn,vn=null,(o&127)!==0){vn=um,p=0<=Pi&&Pi<Fl?Fl:Pi,d=0<=xu&&xu<Fl?Fl:xu,m=0<=d?d:0<=p?p:Qn,0<=fy?(So(2),v5(fy,m,o,s)):(hy&127)!==0&&(So(2),$h(Fl,m,ws)),s=p;var C=d,T=dm,A=0<Rf,K=Vl===cm,q=Vl===dy;if(p=Qn,d=um,m=WC,x=YC,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]),m!=null&&q.push(["Method name",m]),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,YC=WC=null,fy=-1.1,Rf=xu,xu=-1.1,Fl=Pn()}if((o&4194048)!==0&&(vn=fm,p=0<=Cs&&Cs<Li?Li:Cs,s=0<=ra&&ra<Li?Li:ra,d=0<=jl&&jl<Li?Li:jl,m=0<=d?d:0<=s?s:Qn,0<=py?(So(256),v5(py,m,o,vn)):(hy&4194048)!==0&&(So(256),$h(Li,m,ws)),q=d,C=$u,T=0<Kl,A=JC===dy,m=Qn,d=fm,x=O8,K=D8,Jt&&(mt="Transition",0<s?s>m&&(s=m):s=m,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")),m>s&&(p=A?"Promise Resolved":5<m-s?"Update Blocked":"Update",q=[],K!=null&&q.push(["Component name",K]),x!=null&&q.push(["Method name",x]),s={start:s,end:m,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,JC=0,py=-1.1,Kl=jl,jl=-1.1,Li=Pn()),(o&62914560)!==0&&(hy&62914560)!==0&&(So(4194304),$h(P8,Qn,ws)),(o&2080374784)!==0&&(hy&2080374784)!==0&&(So(268435456),$h(L8,Qn,ws)),s=n.timeoutHandle,s!==_u&&(n.timeoutHandle=_u,DW(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Va=0,LS(),jt=n,ut=s=cs(n.current,null),ct=o,Ht=oo,_o=null,Wl=!1,zf=Jc(n,o),mw=!1,un=As,Nu=ao=gw=Jl=Yl=0,Fr=Om=null,My=!1,(o&8)!==0&&(o|=o&32),d=n.entangledLanes,d!==0)for(n=n.entanglements,d&=o;0<d;)p=31-Lr(d),m=1<<p,o|=n[p],d&=~m;return Ii=o,Wb(),n=T8(),1000<n-E8&&(oe.recentlyCreatedOwnerStacks=0,E8=n),Ha.discardPendingWarnings(),s}function xM(n,o){Je=null,oe.H=Tm,oe.getCurrentStack=null,ki=!1,Mo=null,o===Af||o===yy?(o=U5(),Ht=Mm):o===ew?(o=U5(),Ht=N7):Ht=o===uw?hw:o!==null&&typeof o==="object"&&typeof o.then==="function"?Nm:ky,_o=o;var s=ut;s===null?(un=Am,w0(n,Co(o,n.current))):s.mode&st&&D2(s)}function $M(){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 SM(){var n=oe.H;return oe.H=Tm,n===null?Tm:n}function CM(){var n=oe.A;return oe.A=vW,n}function O0(n){vn===null&&(vn=n._debugTask==null?null:n._debugTask)}function D0(){un=Gl,Wl||(ct&4194048)!==ct&&Do.current!==null||(zf=!0),(Yl&134217727)===0&&(Jl&134217727)===0||jt===null||Al(jt,ct,ao,!1)}function _S(n,o,s){var d=kt;kt|=Gn;var p=SM(),m=CM();if(jt!==n||ct!==o){if(Mi){var x=n.memoizedUpdaters;0<x.size&&(Hh(n,ct),x.clear()),yl(n,o)}Dm=null,rf(n,o)}o=!1,x=un;e:do try{if(Ht!==oo&&ut!==null){var C=ut,T=_o;switch(Ht){case hw:LS(),x=Ry;break e;case Mm:case Au:case Mu:case Nm:Do.current===null&&(o=!0);var A=Ht;if(Ht=oo,_o=null,of(n,C,T,A),s&&zf){x=As;break e}break;default:A=Ht,Ht=oo,_o=null,of(n,C,T,A)}}wM(),x=un;break}catch(K){xM(n,K)}while(1);return o&&n.shellSuspendCounter++,Zb(),kt=d,oe.H=p,oe.A=m,ut===null&&(jt=null,ct=0,Wb()),x}function wM(){for(;ut!==null;)EM(ut)}function tq(n,o){var s=kt;kt|=Gn;var d=SM(),p=CM();if(jt!==n||ct!==o){if(Mi){var m=n.memoizedUpdaters;0<m.size&&(Hh(n,ct),m.clear()),yl(n,o)}Dm=null,Oy=Xn()+P7,rf(n,o)}else zf=Jc(n,o);e:do try{if(Ht!==oo&&ut!==null)t:switch(o=ut,m=_o,Ht){case ky:Ht=oo,_o=null,of(n,o,m,ky);break;case Au:case Mu:if(z5(m)){Ht=oo,_o=null,TM(o);break}o=function(){Ht!==Au&&Ht!==Mu||jt!==n||(Ht=Ay),wi(n)},m.then(o,o);break e;case Mm:Ht=Ay;break e;case N7:Ht=pw;break e;case Ay:z5(m)?(Ht=oo,_o=null,TM(o)):(Ht=oo,_o=null,of(n,o,m,Ay));break;case pw:var x=null;switch(ut.tag){case 26:x=ut.memoizedState;case 5:case 27:var C=ut;if(x?yN(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,P0(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,of(n,o,m,pw);break;case Nm:Ht=oo,_o=null,of(n,o,m,Nm);break;case hw:LS(),un=Ry;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}oe.actQueue!==null?wM():nq();break}catch(K){xM(n,K)}while(1);if(Zb(),oe.H=d,oe.A=p,kt=s,ut!==null)return As;return jt=null,ct=0,Wb(),un}function nq(){for(;ut!==null&&!eG();)EM(ut)}function EM(n){var o=n.alternate;(n.mode&st)!==We?(O2(n),o=he(n,TS,o,n,Ii),D2(n)):o=he(n,TS,o,n,Ii),n.memoizedProps=n.pendingProps,o===null?P0(n):ut=o}function TM(n){var o=he(n,rq,n);n.memoizedProps=n.pendingProps,o===null?P0(n):ut=o}function rq(n){var o=n.alternate,s=(n.mode&st)!==We;switch(s&&O2(n),n.tag){case 15:case 0:o=IA(o,n,n.pendingProps,n.type,void 0,ct);break;case 11:o=IA(o,n,n.pendingProps,n.type.render,n.ref,ct);break;case 5:q2(n);default:jA(o,n),n=ut=E5(n,Ii),o=TS(o,n,Ii)}return s&&D2(n),o}function of(n,o,s,d){Zb(),q2(o),Mf=null,Sm=0;var p=o.return;try{if(UK(n,p,o,s,ct)){un=Am,w0(n,Co(s,n.current)),ut=null;return}}catch(m){if(p!==null)throw ut=p,m;un=Am,w0(n,Co(s,n.current)),ut=null;return}if(o.flags&32768){if(vt||d===ky)n=!0;else if(zf||(ct&536870912)!==0)n=!1;else if(Wl=n=!0,d===Au||d===Mu||d===Mm||d===Nm)d=Do.current,d!==null&&d.tag===13&&(d.flags|=16384);RM(o,n)}else P0(o)}function P0(n){var o=n;do{if((o.flags&32768)!==0){RM(o,Wl);return}var s=o.alternate;if(n=o.return,O2(o),s=he(o,jK,s,o,Ii),(o.mode&st)!==We&&P5(o),s!==null){ut=s;return}if(o=o.sibling,o!==null){ut=o;return}ut=o=n}while(o!==null);un===As&&(un=M7)}function RM(n,o){do{var s=KK(n.alternate,n);if(s!==null){s.flags&=32767,ut=s;return}if((n.mode&st)!==We){P5(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=Ry,ut=null}function IS(n,o,s,d,p,m,x,C,T,A,K,q,I,te){n.cancelPendingCommit=null;do zh();while(zn!==Ql);if(Ha.flushLegacyContextWarning(),Ha.flushPendingUnsafeLifecycleWarnings(),(kt&(Gn|Lo))!==er)throw Error("Should not already be working.");if(So(s),A===ku?y2(I,te,s,vn):d!==null?kK(I,te,s,d,o!==null&&o.alternate!==null&&o.alternate.memoizedState.isDehydrated&&(o.flags&256)!==0,vn):RK(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(m=o.lanes|o.childLanes,m|=VC,Ib(n,s,m,x,C,T),n===jt&&(ut=jt=null,ct=0),Hf=o,Zl=n,Va=s,vw=m,$w=p,H7=d,xw=te,U7=q,ja=Dy,F7=null,o.actualDuration!==0||(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,lq(df,function(){return zm=window.event,ja===Dy&&(ja=yw),OM(),null})):(n.callbackNode=null,n.callbackPriority=0),Ss=null,Ul=Pn(),q!==null&&AK(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{XK(n,o,s)}finally{kt=x,It.p=p,oe.T=d}}zn=_7,kM(),AM(),MM()}}function kM(){if(zn===_7){zn=Ql;var n=Zl,o=Hf,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 m=kt;kt|=Lo;try{If=s,Bf=n,r0(),aM(o,n),Bf=If=null,s=Ow;var x=m5(n.containerInfo),C=s.focusedElem,T=s.selectionRange;if(x!==C&&C&&C.ownerDocument&&h5(C.ownerDocument.documentElement,C)){if(T!==null&&m2(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=p5(C,Re),L=p5(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}}Yy=!!Nw,Ow=Nw=null}finally{kt=m,It.p=p,oe.T=d}}n.current=o,zn=I7}}function AM(){if(zn===I7){zn=Ql;var n=F7;if(n!==null){Ul=Pn();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=Hf,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 m=kt;kt|=Lo;try{If=s,Bf=n,r0(),eM(n,o.alternate,o),Bf=If=null}finally{kt=m,It.p=p,oe.T=d}}n=xw,o=U7,$s=Pn(),n=o===null?n:Ul,o=$s,s=ja===bw,d=vn,Ss!==null?x5(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")),zn=B7}}function MM(){if(zn===z7||zn===B7){if(zn===z7){var n=$s;$s=Pn();var o=$s,s=ja===bw;!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!==bw&&(ja=L7)}zn=Ql,tG(),n=Zl;var d=Hf;o=Va,s=H7;var p=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;p?zn=Py:(zn=Ql,Hf=Zl=null,NM(n,n.pendingLanes),Ou=0,Lm=null);var m=n.pendingLanes;if(m===0&&(Xl=null),p||_M(n),m=M(o),d=d.stateNode,wr&&typeof wr.onCommitFiberRoot==="function")try{var x=(d.current.flags&128)===128;switch(m){case No:var C=$C;break;case Ba:C=SC;break;case Ni:C=df;break;case Q0:C=CC;break;default:C=df}wr.onCommitFiberRoot(ff,d,C,x)}catch(q){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",q))}if(Mi&&n.memoizedUpdaters.clear(),ZK(),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=oq(A.stack);he(A.source,T,A.value,K)}}finally{oe.T=x,It.p=C}}(Va&3)!==0&&zh(),wi(n),m=n.pendingLanes,(o&261930)!==0&&(m&42)!==0?(gy=!0,n===Sw?Pm++:(Pm=0,Sw=n)):Pm=0,p||mu(o,$s),Uh(0,!1)}}function oq(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 NM(n,o){(n.pooledCacheLanes&=o)===0&&(o=n.pooledCache,o!=null&&(n.pooledCache=null,Ch(o)))}function zh(){return kM(),AM(),MM(),OM()}function OM(){if(zn!==Py)return!1;var n=Zl,o=vw;vw=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 m=$w;$w=null,d=Zl;var x=Va;if(zn=Ql,Hf=Zl=null,Va=0,(kt&(Gn|Lo))!==er)throw Error("Cannot flush passive effects while already rendering.");So(x),Cw=!0,Ly=!1;var C=0;if(Ss=null,C=Xn(),ja===L7)$h($s,C,ws);else{var T=$s,A=C,K=ja===yw;!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;r0(),pM(q);var I=d.current;q=xw,r0(),cM(d,I,x,m,q),_M(d),kt=T;var te=Xn();if(I=C,q=vn,Ss!==null?x5(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),Uh(0,!1),Ly?d===Lm?Ou++:(Ou=0,Lm=d):Ou=0,Ly=Cw=!1,wr&&typeof wr.onPostCommitFiberRoot==="function")try{wr.onPostCommitFiberRoot(ff,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,NM(n,o)}}function DM(n,o,s){o=Co(s,o),L5(o),o=mS(n.stateNode,o,2),n=El(n,o,2),n!==null&&(bl(n,2),wi(n))}function _t(n,o,s){if(Uf=!1,n.tag===3)DM(n,n,s);else{for(;o!==null;){if(o.tag===3){DM(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),L5(n),s=gS(2),d=El(o,s,2),d!==null&&(bS(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 BS(n,o,s){var d=n.pingCache;if(d===null){d=n.pingCache=new $W;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)||(mw=!0,p.add(s),d=aq.bind(null,n,o,s),Mi&&Hh(n,s),o.then(d,d))}function aq(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=Pn(),um=uy("Promise Resolved"),Vl=dy):(s&4194048)!==0&&0>ra&&(Li=ra=Pn(),fm=uy("Promise Resolved"),JC=dy),gM()&&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===Ty&&(ct&62914560)===ct&&Xn()-Ny<D7?(kt&Gn)===er&&rf(n,0):gw|=s,Nu===ct&&(Nu=0)),wi(n)}function PM(n,o){o===0&&(o=Fd()),n=Cr(n,o),n!==null&&(bl(n,o),wi(n))}function iq(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),PM(n,s)}function sq(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),PM(n,s)}function zS(n,o,s){if((o.subtreeFlags&67117056)!==0)for(o=o.child;o!==null;){var d=n,p=o,m=p.type===q0;m=s||m,p.tag!==22?p.flags&67108864?m&&he(p,LM,d,p):zS(d,p,m):p.memoizedState===null&&(m&&p.flags&8192?he(p,LM,d,p):p.subtreeFlags&67108864&&he(p,zS,d,p,m)),o=o.sibling}}function LM(n,o){qt(!0);try{sM(o),hM(o),lM(n,o.alternate,o,!1),uM(n,o,0,null,!1,0)}finally{qt(!1)}}function _M(n){var o=!0;n.current.mode&(Er|za)||(o=!1),zS(n,n.current,o)}function IM(n){if((kt&Gn)===er){var o=n.tag;if(o===3||o===1||o===0||o===11||o===14||o===15){if(o=J(n)||"ReactComponent",_y!==null){if(_y.has(o))return;_y.add(o)}else _y=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 Hh(n,o){Mi&&n.memoizedUpdaters.forEach(function(s){fh(n,s,o)})}function lq(n,o){var s=oe.actQueue;return s!==null?(s.push(o),wW):xC(n,o)}function cq(n){gM()&&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!==Ff&&n.next===null&&(Ff===null?Iy=Ff=n:Ff=Ff.next=n),By=!0,oe.actQueue!==null?Ew||(Ew=!0,UM()):ww||(ww=!0,UM())}function Uh(n,o){if(!Tw&&By){Tw=!0;do{var s=!1;for(var d=Iy;d!==null;){if(!o)if(n!==0){var p=d.pendingLanes;if(p===0)var m=0;else{var{suspendedLanes:x,pingedLanes:C}=d;m=(1<<31-Lr(42|n)+1)-1,m&=p&~(x&~C),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(s=!0,HM(d,m))}else m=ct,m=Yc(d,d===jt?m:0,d.cancelPendingCommit!==null||d.timeoutHandle!==_u),(m&3)===0||Jc(d,m)||(s=!0,HM(d,m));d=d.next}}while(s);Tw=!1}}function uq(){zm=window.event,HS()}function HS(){By=Ew=ww=!1;var n=0;ec!==0&&bq()&&(n=ec);for(var o=Xn(),s=null,d=Iy;d!==null;){var p=d.next,m=BM(d,o);if(m===0)d.next=null,s===null?Iy=p:s.next=p,p===null&&(Ff=s);else if(s=d,n!==0||(m&3)!==0)By=!0;d=p}zn!==Ql&&zn!==Py||Uh(n,!1),ec!==0&&(ec=0)}function BM(n,o){for(var{suspendedLanes:s,pingedLanes:d,expirationTimes:p}=n,m=n.pendingLanes&-62914561;0<m;){var x=31-Lr(m),C=1<<x,T=p[x];if(T===-1){if((C&s)===0||(C&d)!==0)p[x]=o2(C,o)}else T<=o&&(n.expiredLanes|=C);m&=~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&&US(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!==Rw)US(d);else return o;switch(M(s)){case No:case Ba:s=SC;break;case Ni:s=df;break;case Q0:s=CC;break;default:s=df}return d=zM.bind(null,n),oe.actQueue!==null?(oe.actQueue.push(d),s=Rw):s=xC(s,d),n.callbackPriority=o,n.callbackNode=s,o}return d!==null&&US(d),n.callbackPriority=2,n.callbackNode=null,2}function zM(n,o){if(gy=my=!1,zm=window.event,zn!==Ql&&zn!==Py)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(ja===Dy&&(ja=yw),zh()&&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 yM(n,d,o),BM(n,Xn()),n.callbackNode!=null&&n.callbackNode===s?zM.bind(null,n):null}function HM(n,o){if(zh())return null;my=gy,gy=!1,yM(n,o,!0)}function US(n){n!==Rw&&n!==null&&Zq(n)}function UM(){oe.actQueue!==null&&oe.actQueue.push(function(){return HS(),null}),PW(function(){(kt&(Gn|Lo))!==er?xC($C,uq):HS()})}function FS(){if(ec===0){var n=Su;n===0&&(n=Y0,Y0<<=1,(Y0&261888)===0&&(Y0=256)),ec=n}return ec}function FM(n){if(n==null||typeof n==="symbol"||typeof n==="boolean")return null;if(typeof n==="function")return n;return Ie(n,"action"),yh(""+n)}function VM(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 dq(n,o,s,d,p){if(o==="submit"&&s&&s.stateNode===p){var m=FM((p[_r]||null).action),x=d.submitter;x&&(o=(o=x[_r]||null)?FM(o.formAction):x.getAttribute("formAction"),o!==null&&(m=o,x=null));var C=new ry("action","action",null,d,p);n.push({event:C,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ec!==0){var T=x?VM(p,x):new FormData(p),A={pending:!0,data:T,method:p.method,action:m};Object.freeze(A),lS(s,A,null,T)}}else typeof m==="function"&&(C.preventDefault(),T=x?VM(p,x):new FormData(p),A={pending:!0,data:T,method:p.method,action:m},Object.freeze(A),lS(s,A,m,T))},currentTarget:p}]})}}function L0(n,o,s){n.currentTarget=s;try{o(n)}catch(d){zC(d)}n.currentTarget=null}function jM(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var d=n[s];e:{var p=void 0,m=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&&m.isPropagationStopped())break e;T!==null?he(T,L0,m,C,A):L0(m,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&&m.isPropagationStopped())break e;T!==null?he(T,L0,m,C,A):L0(m,C,A),p=T}}}}function St(n,o){kw.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[wC];s===void 0&&(s=o[wC]=new Set);var d=n+"__bubble";s.has(d)||(KM(o,n,2,!1),s.add(d))}function VS(n,o,s){kw.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),KM(s,n,d,o)}function jS(n){if(!n[zy]){n[zy]=!0,UN.forEach(function(s){s!=="selectionchange"&&(kw.has(s)||VS(s,!1,n),VS(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[zy]||(o[zy]=!0,VS("selectionchange",!1,o))}}function KM(n,o,s,d){switch(wN(o)){case No:var p=Kq;break;case Ba:p=qq;break;default:p=iC}s=p.bind(null,o,s,n),p=void 0,!AC||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 KS(n,o,s,d,p){var m=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=m=x;continue e}C=C.parentNode}}d=d.return}n5(function(){var A=m,K=p2(s),q=[];e:{var I=w8.get(n);if(I!==void 0){var te=ry,xe=n;switch(n){case"keypress":if(Vb(s)===0)break e;case"keydown":case"keyup":te=HG;break;case"focusin":xe="focus",te=DC;break;case"focusout":xe="blur",te=DC;break;case"beforeblur":case"afterblur":te=DC;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=u8;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=kG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=VG;break;case x8:case $8:case S8:te=NG;break;case C8:te=KG;break;case"scroll":case"scrollend":te=TG;break;case"wheel":te=GG;break;case"copy":case"cut":case"paste":te=DG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=f8;break;case"toggle":case"beforetoggle":te=YG}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=vh(L,Ct),F!=null&&Re.push(Fh(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!==Zh&&(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=u8,F="onMouseLeave",Ct="onMouseEnter",L="mouse",n==="pointerout"||n==="pointerover")Re=f8,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=fq,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&&qM(q,I,te,Re,!1),xe!==null&&Wt!==null&&qM(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=c5;else if(s5(I))if(y8)we=wK;else{we=SK;var Xe=$K}else te=I.nodeName,!te||te.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?A&&bh(A.elementType)&&(we=c5):we=CK;if(we&&(we=we(n,A))){l5(q,we,s,K);break e}Xe&&Xe(n,I,A),n==="focusout"&&A&&I.type==="number"&&A.memoizedProps.value!=null&&s2(I,"number",I.value)}switch(Xe=A?tt(A):window,n){case"focusin":if(s5(Xe)||Xe.contentEditable==="true")vf=Xe,LC=A,im=null;break;case"focusout":im=LC=vf=null;break;case"mousedown":_C=!0;break;case"contextmenu":case"mouseup":case"dragend":_C=!1,g5(q,s,K);break;case"selectionchange":if(ZG)break;case"keydown":case"keyup":g5(q,s,K)}var Ve;if(PC)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 yf?a5(n,s)&&(Be="onCompositionEnd"):n==="keydown"&&s.keyCode===p8&&(Be="onCompositionStart");if(Be&&(h8&&s.locale!=="ko"&&(yf||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&yf&&(Ve=r5()):(_l=K,MC=("value"in _l)?_l.value:_l.textContent,yf=!0)),Xe=_0(A,Be),0<Xe.length&&(Be=new d8(Be,n,null,s,K),q.push({event:Be,listeners:Xe}),Ve?Be.data=Ve:(Ve=i5(s),Ve!==null&&(Be.data=Ve)))),Ve=XG?bK(n,s):yK(n,s))Be=_0(A,"onBeforeInput"),0<Be.length&&(Xe=new LG("onBeforeInput","beforeinput",null,s,K),q.push({event:Xe,listeners:Be}),Xe.data=Ve);dq(q,n,A,s,K)}jM(q,o)})}function Fh(n,o,s){return{instance:n,listener:o,currentTarget:s}}function _0(n,o){for(var s=o+"Capture",d=[];n!==null;){var p=n,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=vh(n,s),p!=null&&d.unshift(Fh(n,p,m)),p=vh(n,o),p!=null&&d.push(Fh(n,p,m))),n.tag===3)return d;n=n.return}return[]}function fq(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n?n:null}function qM(n,o,s,d,p){for(var m=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=vh(s,m),A!=null&&x.unshift(Fh(s,A,T))):p||(A=vh(s,m),A!=null&&x.push(Fh(s,A,T)))),s=s.return}x.length!==0&&n.push({event:o,listeners:x})}function qS(n,o){pK(n,o),n!=="input"&&n!=="textarea"&&n!=="select"||o==null||o.value!==null||l8||(l8=!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:EC};bh(n)||typeof o.is==="string"||mK(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 Jn(n,o,s,d){o!==s&&(s=Ml(s),Ml(o)!==s&&(d[n]=o))}function pq(n,o,s){o.forEach(function(d){s[YM(d)]=d==="style"?WS(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 GM(n,o){return n=n.namespaceURI===ey||n.namespaceURI===hf?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.",On(n)),tn(n)),(typeof n==="string"?n:""+n).replace(EW,`
|
|
181
|
+
`).replace(TW,"")}function WM(n,o){return o=Ml(o),Ml(n)===o?!0:!1}function Ft(n,o,s,d,p,m){switch(s){case"children":if(typeof d==="string")Fb(d,o,!1),o==="body"||o==="textarea"&&d===""||gh(n,d);else if(typeof d==="number"||typeof d==="bigint")Fb(""+d,o,!1),o!=="body"&&gh(n,""+d);break;case"className":zb(n,"class",d);break;case"tabIndex":zb(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":zb(n,s,d);break;case"style":Zk(n,d,m);break;case"data":if(o!=="object"){zb(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=yh(""+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||Fy||(Fy=!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||Uy||(Uy=!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"||Hy?o!=="button"||p.type==null||p.type==="submit"||Hy?typeof d==="function"&&(p.name==null||G7||(G7=!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||Fy||(Fy=!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||Uy||(Uy=!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."))):(Hy=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Hy=!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 m==="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=yh(""+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=yh(""+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!==""||Vy[s]||(Vy[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),Bb(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,Aw,"xml:base",d);break;case"xmlLang":ss(n,Aw,"xml:lang",d);break;case"xmlSpace":ss(n,Aw,"xml:space",d);break;case"is":m!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Bb(n,"is",d);break;case"innerText":case"textContent":break;case"popoverTarget":W7||d==null||typeof d!=="object"||(W7=!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=e5(s),Bb(n,s,d)):gu.hasOwnProperty(s)&&d!=null&&typeof d!=="function"&&Ei(s,d)}}function GS(n,o,s,d,p,m){switch(s){case"style":Zk(n,d,m);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"?gh(n,d):(typeof d==="number"||typeof d==="bigint")&&gh(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),m=n[_r]||null,m=m!=null?m[s]:null,typeof m==="function"&&n.removeEventListener(o,m,p),typeof d==="function")){typeof m!=="function"&&m!==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,""):Bb(n,s,d)}}}function sr(n,o,s){switch(qS(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,m;for(m in s)if(s.hasOwnProperty(m)){var x=s[m];if(x!=null)switch(m){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,m,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=m=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":m=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)}}Ik(n,s),Bk(n,m,C,T,A,x,p,!1);return;case"select":vl("select",s),St("invalid",n),d=x=m=null;for(p in s)if(s.hasOwnProperty(p)&&(C=s[p],C!=null))switch(p){case"value":m=C;break;case"defaultValue":x=C;break;case"multiple":d=C;default:Ft(n,o,p,C,s,null)}Uk(n,s),o=m,s=x,n.multiple=!!d,o!=null?jd(n,!!d,o,!1):s!=null&&jd(n,!!d,s,!0);return;case"textarea":vl("textarea",s),St("invalid",n),m=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":m=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)}Fk(n,s),jk(n,d,p,m);return;case"option":zk(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<_m.length;d++)St(_m[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(bh(o)){for(K in s)s.hasOwnProperty(K)&&(d=s[K],d!==void 0&&GS(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 hq(n,o,s,d){switch(qS(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,m=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":m=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||q7||(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"),q7=!0),!o||d||K7||(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"),K7=!0),i2(n,x,C,T,A,K,m,p);return;case"select":te=x=C=I=null;for(m in s)if(T=s[m],s.hasOwnProperty(m)&&T!=null)switch(m){case"value":break;case"multiple":te=T;default:d.hasOwnProperty(m)||Ft(n,o,m,null,d,T)}for(p in d)if(m=d[p],T=s[p],d.hasOwnProperty(p)&&(m!=null||T!=null))switch(p){case"value":I=m;break;case"defaultValue":C=m;break;case"multiple":x=m;default:m!==T&&Ft(n,o,p,m,d,T)}d=C,o=x,s=te,I!=null?jd(n,!!o,I,!1):!!s!==!!o&&(d!=null?jd(n,!!o,d,!0):jd(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],m=s[x],d.hasOwnProperty(x)&&(p!=null||m!=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!==m&&Ft(n,o,x,p,d,m)}Vk(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(bh(o)){for(var Wt in s)I=s[Wt],s.hasOwnProperty(Wt)&&I!==void 0&&!d.hasOwnProperty(Wt)&&GS(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||GS(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 YM(n){switch(n){case"class":return"className";case"for":return"htmlFor";default:return n}}function WS(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 JM(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="",m;for(m in o)if(o.hasOwnProperty(m)){var x=o[m];x!=null&&typeof x!=="boolean"&&x!==""&&(m.indexOf("--")===0?(Qr(x,m),d+=p+m+":"+(""+x).trim()):typeof x!=="number"||x===0||i8.has(m)?(Qr(x,m),d+=p+m.replace(t8,"-$1").toLowerCase().replace(n8,"-ms-")+":"+(""+x).trim()):d+=p+m.replace(t8,"-$1").toLowerCase().replace(n8,"-ms-")+":"+x+"px",p=";")}d=d||null,o=n.getAttribute("style"),o!==d&&(d=Ml(d),Ml(o)!==d&&(s.style=WS(n)))}}function Jo(n,o,s,d,p,m){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}Jn(o,n,d,m)}function XM(n,o,s,d,p,m){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}Jn(o,n,d,m)}function YS(n,o,s,d,p,m){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}Jn(o,n,d,m)}function QM(n,o,s,d,p,m){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}Jn(o,n,d,m)}function JS(n,o,s,d,p,m){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=yh(""+d),n===s)return}Jn(o,n,d,m)}function ZM(n,o,s,d){for(var p={},m=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:m.add(x[C].name)}if(bh(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"||Jn("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=GM(n,A),Jn(T,x,A,p));continue;case"style":m.delete(T),JM(n,A,p);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":m.delete(T.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",T);continue;case"className":m.delete("class"),x=Pk(n,"class",A),Jn("className",x,A,p);continue;default:d.context===Ms&&o!=="svg"&&o!=="math"?m.delete(T.toLowerCase()):m.delete(T),x=Pk(n,T,A),Jn(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"||Jn("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=GM(n,T),x!==T&&(p[A]={__html:x}));continue;case"className":Jo(n,A,"class",T,m,p);continue;case"tabIndex":Jo(n,A,"tabindex",T,m,p);continue;case"style":m.delete(A),JM(n,T,p);continue;case"multiple":m.delete(A),Jn(A,n.multiple,T,p);continue;case"muted":m.delete(A),Jn(A,n.muted,T,p);continue;case"autoFocus":m.delete("autofocus"),Jn(A,n.autofocus,T,p);continue;case"data":if(o!=="object"){m.delete(A),x=n.getAttribute("data"),Jn(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}JS(n,A,A,T,m,p);continue;case"action":case"formAction":if(x=n.getAttribute(A),typeof T==="function"){m.delete(A.toLowerCase()),A==="formAction"?(m.delete("name"),m.delete("formenctype"),m.delete("formmethod"),m.delete("formtarget")):(m.delete("enctype"),m.delete("method"),m.delete("target"));continue}else if(x===RW){m.delete(A.toLowerCase()),Jn(A,"function",T,p);continue}JS(n,A,A.toLowerCase(),T,m,p);continue;case"xlinkHref":JS(n,A,"xlink:href",T,m,p);continue;case"contentEditable":YS(n,A,"contenteditable",T,m,p);continue;case"spellCheck":YS(n,A,"spellcheck",T,m,p);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":YS(n,A,A,T,m,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":XM(n,A,A.toLowerCase(),T,m,p);continue;case"capture":case"download":e:{C=n;var K=x=A,q=p;if(m.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}Jn(x,C,T,q)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=n,K=x=A,q=p,m.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}Jn(x,C,T,q)}continue;case"rowSpan":QM(n,A,"rowspan",T,m,p);continue;case"start":QM(n,A,A,T,m,p);continue;case"xHeight":Jo(n,A,"x-height",T,m,p);continue;case"xlinkActuate":Jo(n,A,"xlink:actuate",T,m,p);continue;case"xlinkArcrole":Jo(n,A,"xlink:arcrole",T,m,p);continue;case"xlinkRole":Jo(n,A,"xlink:role",T,m,p);continue;case"xlinkShow":Jo(n,A,"xlink:show",T,m,p);continue;case"xlinkTitle":Jo(n,A,"xlink:title",T,m,p);continue;case"xlinkType":Jo(n,A,"xlink:type",T,m,p);continue;case"xmlBase":Jo(n,A,"xml:base",T,m,p);continue;case"xmlLang":Jo(n,A,"xml:lang",T,m,p);continue;case"xmlSpace":Jo(n,A,"xml:space",T,m,p);continue;case"inert":T!==""||Vy[A]||(Vy[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)),XM(n,A,A,T,m,p);continue;default:if(!(2<A.length)||A[0]!=="o"&&A[0]!=="O"||A[1]!=="n"&&A[1]!=="N"){C=e5(A),x=!1,d.context===Ms&&o!=="svg"&&o!=="math"?m.delete(C.toLowerCase()):(K=A.toLowerCase(),K=ty.hasOwnProperty(K)?ty[K]||null:null,K!==null&&K!==A&&(x=!0,m.delete(K)),m.delete(C));e:if(K=n,q=C,C=T,ph(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||Jn(A,C,T,p)}}}return 0<m.size&&s.suppressHydrationWarning!==!0&&pq(n,m,p),Object.keys(p).length===0?null:p}function mq(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 eN(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gq(){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],m=p.transferSize,x=p.initiatorType,C=p.duration;if(m&&C&&eN(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&&eN(q)&&(T=T.responseEnd,x+=K*(T<C?1:(C-A)/(T-A)))}if(--d,o+=8*(m+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 I0(n){return n.nodeType===9?n:n.ownerDocument}function tN(n){switch(n){case hf:return jf;case ey:return Ky;default:return Ms}}function nN(n,o){if(n===Ms)switch(o){case"svg":return jf;case"math":return Ky;default:return Ms}return n===jf&&o==="foreignObject"?Ms:n}function XS(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 bq(){var n=window.event;if(n&&n.type==="popstate"){if(n===Dw)return!1;return Dw=n,!0}return Dw=null,!1}function Vh(){var n=window.event;return n&&n!==zm?n.type:null}function jh(){var n=window.event;return n&&n!==zm?n.timeStamp:-1.1}function yq(n){setTimeout(function(){throw n})}function vq(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 xq(){}function $q(n,o,s,d){hq(n,o,s,d),n[_r]=d}function rN(n){gh(n,"")}function Sq(n,o,s){n.nodeValue=s}function oN(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 Cq(n,o){n.removeChild(o)}function wq(n,o){(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).removeChild(o)}function aN(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===Bm||s===jy){if(d===0){n.removeChild(p),lf(o);return}d--}else if(s===Im||s===tc||s===Lu||s===Vf||s===Pu)d++;else if(s===AW)Kh(n.ownerDocument.documentElement);else if(s===NW){s=n.ownerDocument.head,Kh(s);for(var m=s.firstChild;m;){var{nextSibling:x,nodeName:C}=m;m[Qh]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&m.rel.toLowerCase()==="stylesheet"||s.removeChild(m),m=x}}else s===MW&&Kh(n.ownerDocument.body);s=p}while(s);lf(o)}function iN(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===Bm)if(n===0)break;else n--;else s!==Im&&s!==tc&&s!==Lu&&s!==Vf||n++;s=d}while(s)}function Eq(n){iN(n,!0)}function Tq(n){n=n.style,typeof n.setProperty==="function"?n.setProperty("display","none","important"):n.display="none"}function Rq(n){n.nodeValue=""}function kq(n){iN(n,!1)}function Aq(n,o){o=o[OW],o=o!==void 0&&o!==null&&o.hasOwnProperty("display")?o.display:null,n.style.display=o==null||typeof o==="boolean"?"":(""+o).trim()}function Mq(n,o){n.nodeValue=o}function QS(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":QS(s),Ce(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function Nq(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 m=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;else if(!n[Qh])switch(o){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;else if(m!==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(m=n.getAttribute("src"),(m!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}if(n=ko(n.nextSibling),n===null)break}return null}function Oq(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 sN(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 ZS(n){return n.data===tc||n.data===Lu}function eC(n){return n.data===Vf||n.data===tc&&n.ownerDocument.readyState!==J7}function Dq(n,o){var s=n.ownerDocument;if(n.data===Lu)n._reactRetry=o;else if(n.data!==tc||s.readyState!==J7)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===Im||o===Vf||o===tc||o===Lu||o===Pu||o===Mw||o===Y7)break;if(o===Bm||o===jy)return null}}return n}function lN(n){if(n.nodeType===1){for(var o=n.nodeName.toLowerCase(),s={},d=n.attributes,p=0;p<d.length;p++){var m=d[p];s[YM(m.name)]=m.name.toLowerCase()==="style"?WS(n):m.value}return{type:o,props:s}}return n.nodeType===8?n.data===Pu?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:n.nodeValue}function cN(n,o,s){return s===null||s[kW]!==!0?(n.nodeValue===o?n=null:(o=Ml(o),n=Ml(n.nodeValue)===o?null:n.nodeValue),n):null}function tC(n){n=n.nextSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s===Bm||s===jy){if(o===0)return ko(n.nextSibling);o--}else s!==Im&&s!==Vf&&s!==tc&&s!==Lu&&s!==Pu||o++}n=n.nextSibling}return null}function uN(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s===Im||s===Vf||s===tc||s===Lu||s===Pu){if(o===0)return n;o--}else s!==Bm&&s!==jy||o++}n=n.previousSibling}return null}function Pq(n){lf(n)}function Lq(n){lf(n)}function _q(n){lf(n)}function dN(n,o,s,d,p){switch(p&&f2(n,d.ancestorInfo),o=I0(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 Iq(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]);sr(s,n,o),s[lr]=d,s[_r]=o}function Kh(n){for(var o=n.attributes;o.length;)n.removeAttributeNode(o[0]);Ce(n)}function B0(n){return typeof n.getRootNode==="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}function fN(n,o,s){var d=Kf;if(d&&typeof o==="string"&&o){var p=Yo(o);p='link[rel="'+n+'"][href="'+p+'"]',typeof s==="string"&&(p+='[crossorigin="'+s+'"]'),n6.has(p)||(n6.add(p),n={rel:n,crossOrigin:s,href:o},d.querySelector(p)===null&&(o=d.createElement("link"),sr(o,"link",n),je(o),d.head.appendChild(o)))}}function pN(n,o,s,d){var p=(p=Dl.current)?B0(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=af(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=af(s.href);var m=Mt(p).hoistableStyles,x=m.get(n);if(!x&&(p=p.ownerDocument||p,x={type:"stylesheet",instance:null,count:0,state:{loading:Iu,preload:null}},m.set(n,x),(m=p.querySelector(qh(n)))&&!m._p&&(x.instance=m,x.state.loading=Hm|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),m||Bq(p,n,C,x.state)}if(o&&d===null)throw s=`
|
|
182
|
+
|
|
183
|
+
- `+z0(o)+`
|
|
184
|
+
+ `+z0(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
|
+
- `+z0(o)+`
|
|
187
|
+
+ `+z0(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=sf(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 z0(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 af(n){return'href="'+Yo(n)+'"'}function qh(n){return'link[rel="stylesheet"]['+n+"]"}function hN(n){return ft({},n,{"data-precedence":n.precedence,precedence:null})}function Bq(n,o,s,d){n.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=Hm:(o=n.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=Hm}),o.addEventListener("error",function(){return d.loading|=e6}),sr(o,"link",s),je(o),n.head.appendChild(o))}function sf(n){return'[src="'+Yo(n)+'"]'}function Gh(n){return"script[async]"+n}function mN(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),sr(d,"style",p),H0(d,s.precedence,n),o.instance=d;case"stylesheet":p=af(s.href);var m=n.querySelector(qh(p));if(m)return o.state.loading|=sa,o.instance=m,je(m),m;d=hN(s),(p=la.get(p))&&nC(d,p),m=(n.ownerDocument||n).createElement("link"),je(m);var x=m;return x._p=new Promise(function(C,T){x.onload=C,x.onerror=T}),sr(m,"link",d),o.state.loading|=sa,H0(m,s.precedence,n),o.instance=m;case"script":if(m=sf(s.src),p=n.querySelector(Gh(m)))return o.instance=p,je(p),p;if(d=s,p=la.get(m))d=ft({},s),rC(d,p);return n=n.ownerDocument||n,p=n.createElement("script"),je(p),sr(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,H0(d,s.precedence,n));return o.instance}function H0(n,o,s){for(var d=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,m=p,x=0;x<d.length;x++){var C=d[x];if(C.dataset.precedence===o)m=C;else if(m!==p)break}m?m.parentNode.insertBefore(n,m.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(n,o.firstChild))}function nC(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.title==null&&(n.title=o.title)}function rC(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.integrity==null&&(n.integrity=o.integrity)}function gN(n,o,s){if(qy===null){var d=new Map,p=qy=new Map;p.set(s,d)}else p=qy,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 m=s[p];if(!(m[Qh]||m[lr]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!==hf){var x=m.getAttribute(o)||"";x=n+x;var C=d.get(x);C?C.push(m):d.set(x,[m])}}return d}function bN(n,o,s){n=n.ownerDocument||n,n.head.insertBefore(s,o==="title"?n.querySelector("head > title"):null)}function zq(n,o,s){var d=!s.ancestorInfo.containerTagInScope;if(s.context===jf||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:m}=o;s=[],o.onLoad&&s.push("`onLoad`"),p&&s.push("`onError`"),m!=null&&s.push("`disabled`"),p=mq(s,"and"),p+=s.length===1?" prop":" props",m=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,m,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 yN(n){return n.type==="stylesheet"&&(n.state.loading&t6)===Iu?!1:!0}function Hq(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=af(d.href),m=o.querySelector(qh(p));if(m){o=m._p,o!==null&&typeof o==="object"&&typeof o.then==="function"&&(n.count++,n=U0.bind(n),o.then(n,n)),s.state.loading|=sa,s.instance=m,je(m);return}m=o.ownerDocument||o,d=hN(d),(p=la.get(p))&&nC(d,p),m=m.createElement("link"),je(m);var x=m;x._p=new Promise(function(C,T){x.onload=C,x.onerror=T}),sr(m,"link",d),s.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&t6)===Iu&&(n.count++,s=U0.bind(n),o.addEventListener("load",s),o.addEventListener("error",s))}}function Uq(n,o){return n.stylesheets&&n.count===0&&F0(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var d=setTimeout(function(){if(n.stylesheets&&F0(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},LW+o);0<n.imgBytes&&Lw===0&&(Lw=125*gq()*IW);var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&F0(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Lw?50:_W)+o);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}function U0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)F0(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}function F0(n,o){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Gy=new Map,o.forEach(Fq,n),Gy=null,U0.call(n))}function Fq(n,o){if(!(o.state.loading&sa)){var s=Gy.get(n);if(s)var d=s.get(_w);else{s=new Map,Gy.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var x=p[m];if(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")s.set(x.dataset.precedence,x),d=x}d&&s.set(_w,d)}p=o.instance,x=p.getAttribute("data-precedence"),m=s.get(x)||d,m===d&&s.set(_w,p),s.set(x,p),this.count++,d=U0.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),m?m.parentNode.insertBefore(p,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),o.state.loading|=sa}}function Vq(n,o,s,d,p,m,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=Vd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vd(0),this.hiddenUpdates=Vd(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=m,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 vN(n,o,s,d,p,m,x,C,T,A,K,q){return n=new Vq(n,o,s,x,T,A,K,q,C),o=lW,m===!0&&(o|=Er|za),o|=st,m=y(3,null,null,o),n.current=m,m.stateNode=n,o=N2(),cu(o),n.pooledCache=o,cu(o),m.memoizedState={element:d,isDehydrated:s,cache:o},_2(m),n}function xN(n){if(!n)return zl;return n=zl,n}function oC(n,o,s,d,p,m){if(wr&&typeof wr.onScheduleFiberRoot==="function")try{wr.onScheduleFiberRoot(ff,d,s)}catch(x){Ai||(Ai=!0,console.error("React instrumentation encountered an error: %o",x))}p=xN(p),d.context===null?d.context=p:d.pendingContext=p,ki&&Mo!==null&&!i6&&(i6=!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},m=m===void 0?null:m,m!==null&&(typeof m!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",m),d.callback=m),s=El(n,d,o),s!==null&&(pi(o,"root.render()",null),fn(s,n,o),Rh(s,n,o))}function $N(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function aC(n,o){$N(n,o),(n=n.alternate)&&$N(n,o)}function SN(n){if(n.tag===13||n.tag===31){var o=Cr(n,67108864);o!==null&&fn(o,n,67108864),aC(n,67108864)}}function CN(n){if(n.tag===13||n.tag===31){var o=Ro(n);o=eu(o);var s=Cr(n,o);s!==null&&fn(s,n,o),aC(n,o)}}function jq(){return Mo}function Kq(n,o,s,d){var p=oe.T;oe.T=null;var m=It.p;try{It.p=No,iC(n,o,s,d)}finally{It.p=m,oe.T=p}}function qq(n,o,s,d){var p=oe.T;oe.T=null;var m=It.p;try{It.p=Ba,iC(n,o,s,d)}finally{It.p=m,oe.T=p}}function iC(n,o,s,d){if(Yy){var p=sC(d);if(p===null)KS(n,o,d,Jy,s),EN(n,d);else if(Gq(p,n,o,s,d))d.stopPropagation();else if(EN(n,d),o&4&&-1<zW.indexOf(n)){for(;p!==null;){var m=et(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=ci(m.pendingLanes);if(x!==0){var C=m;C.pendingLanes|=2;for(C.entangledLanes|=2;x;){var T=1<<31-Lr(x);C.entanglements[1]|=T,x&=~T}wi(m),(kt&(Gn|Lo))===er&&(Oy=Xn()+P7,Uh(0,!1))}}break;case 31:case 13:C=Cr(m,2),C!==null&&fn(C,m,2),nf(),aC(m,2)}if(m=sC(d),m===null&&KS(n,o,d,Jy,s),m===p)break;p=m}p!==null&&d.stopPropagation()}else KS(n,o,d,null,s)}}function sC(n){return n=p2(n),lC(n)}function lC(n){if(Jy=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 Jy=n,null}function wN(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(nG()){case $C:return No;case SC:return Ba;case df:case rG:return Ni;case CC:return Q0;default:return Ni}default:return Ni}}function EN(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":Fm.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vm.delete(o.pointerId)}}function Wh(n,o,s,d,p,m){if(n===null||n.nativeEvent!==m)return n={blockedOn:o,domEventName:s,eventSystemFlags:d,nativeEvent:m,targetContainers:[p]},o!==null&&(o=et(o),o!==null&&SN(o)),n;return n.eventSystemFlags|=d,o=n.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),n}function Gq(n,o,s,d,p){switch(o){case"focusin":return nc=Wh(nc,n,o,s,d,p),!0;case"dragenter":return rc=Wh(rc,n,o,s,d,p),!0;case"mouseover":return oc=Wh(oc,n,o,s,d,p),!0;case"pointerover":var m=p.pointerId;return Fm.set(m,Wh(Fm.get(m)||null,n,o,s,d,p)),!0;case"gotpointercapture":return m=p.pointerId,Vm.set(m,Wh(Vm.get(m)||null,n,o,s,d,p)),!0}return!1}function TN(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(){CN(s)});return}}else if(o===31){if(o=H(s),o!==null){n.blockedOn=o,me(n.priority,function(){CN(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 V0(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=sC(n.nativeEvent);if(s===null){s=n.nativeEvent;var d=new s.constructor(s.type,s),p=d;Zh!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Zh=p,s.target.dispatchEvent(d),Zh===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."),Zh=null}else return o=et(s),o!==null&&SN(o),n.blockedOn=s,!1;o.shift()}return!0}function RN(n,o,s){V0(n)&&s.delete(o)}function Wq(){Iw=!1,nc!==null&&V0(nc)&&(nc=null),rc!==null&&V0(rc)&&(rc=null),oc!==null&&V0(oc)&&(oc=null),Fm.forEach(RN),Vm.forEach(RN)}function j0(n,o){n.blockedOn===o&&(n.blockedOn=null,Iw||(Iw=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,Wq)))}function kN(n){Xy!==n&&(Xy=n,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,function(){Xy===n&&(Xy=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(lC(d||s)===null)continue;else break;var m=et(s);m!==null&&(n.splice(o,3),o-=3,s={pending:!0,data:p,method:s.method,action:d},Object.freeze(s),lS(m,s,d,p))}}))}function lf(n){function o(T){return j0(T,n)}nc!==null&&j0(nc,n),rc!==null&&j0(rc,n),oc!==null&&j0(oc,n),Fm.forEach(o),Vm.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);)TN(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],m=s[d+1],x=p[_r]||null;if(typeof m==="function")x||kN(s);else if(x){var C=null;if(m&&m.hasAttribute("formAction")){if(p=m,x=m[_r]||null)C=x.formAction;else if(lC(p)!==null)continue}else C=x.action;typeof C==="function"?s[d+1]=C:(s.splice(d,3),d-=3),kN(s)}}}function AN(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.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 m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.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 cC(n){this._internalRoot=n}function K0(n){this._internalRoot=n}function MN(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,Yq=Symbol.for("react.element"),Ti=Symbol.for("react.transitional.element"),cf=Symbol.for("react.portal"),uf=Symbol.for("react.fragment"),q0=Symbol.for("react.strict_mode"),uC=Symbol.for("react.profiler"),dC=Symbol.for("react.consumer"),Ri=Symbol.for("react.context"),Yh=Symbol.for("react.forward_ref"),fC=Symbol.for("react.suspense"),pC=Symbol.for("react.suspense_list"),G0=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy"),hC=Symbol.for("react.activity"),Jq=Symbol.for("react.memo_cache_sentinel"),NN=Symbol.iterator,Xq=Symbol.for("react.client.reference"),Kn=Array.isArray,oe=Jf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,It=Zw.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Qq=Object.freeze({pending:!1,data:null,method:null,action:null}),mC=[],gC=[],gs=-1,Ol=be(null),Jh=be(null),Dl=be(null),W0=be(null),Xh=0,ON,DN,PN,LN,_N,IN,BN;k.__reactDisabledLog=!0;var bC,zN,yC=!1,vC=new(typeof WeakMap==="function"?WeakMap:Map),Mo=null,ki=!1,Ia=Object.prototype.hasOwnProperty,xC=Nt.unstable_scheduleCallback,Zq=Nt.unstable_cancelCallback,eG=Nt.unstable_shouldYield,tG=Nt.unstable_requestPaint,Xn=Nt.unstable_now,nG=Nt.unstable_getCurrentPriorityLevel,$C=Nt.unstable_ImmediatePriority,SC=Nt.unstable_UserBlockingPriority,df=Nt.unstable_NormalPriority,rG=Nt.unstable_LowPriority,CC=Nt.unstable_IdlePriority,oG=Nt.log,aG=Nt.unstable_setDisableYieldValue,ff=null,wr=null,Ai=!1,Mi=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Lr=Math.clz32?Math.clz32:_b,iG=Math.log,sG=Math.LN2,Y0=256,J0=262144,X0=4194304,No=2,Ba=8,Ni=32,Q0=268435456,Pl=Math.random().toString(36).slice(2),lr="__reactFiber$"+Pl,_r="__reactProps$"+Pl,Ll="__reactContainer$"+Pl,wC="__reactEvents$"+Pl,lG="__reactListeners$"+Pl,cG="__reactHandles$"+Pl,HN="__reactResources$"+Pl,Qh="__reactMarker$"+Pl,UN=new Set,gu={},EC={},uG={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},dG=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]*$"),FN={},VN={},fG=/[\n"\\]/g,jN=!1,KN=!1,qN=!1,GN=!1,WN=!1,YN=!1,JN=["value","defaultValue"],XN=!1,QN=/["'&<>\n\t]|^\s|\s$/,pG="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(" "),ZN="applet caption html table td th marquee object template foreignObject desc title".split(" "),hG=ZN.concat(["button"]),mG="dd dt li option optgroup p rp rt".split(" "),e8={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Z0={},TC={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"]},t8=/([A-Z])/g,n8=/^ms-/,gG=/^(?:webkit|moz|o)[A-Z]/,bG=/^-ms-/,yG=/-(.)/g,r8=/;\s*$/,pf={},RC={},o8=!1,a8=!1,i8=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(" ")),ey="http://www.w3.org/1998/Math/MathML",hf="http://www.w3.org/2000/svg",vG=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"]]),ty={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"},s8={"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},mf={},xG=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]*$"),$G=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]*$"),l8=!1,Ir={},c8=/^on./,SG=/^on[^A-Z]/,CG=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]*$"),wG=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]*$"),EG=/^[\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,Zh=null,gf=null,bf=null,kC=!1,Oi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),AC=!1;if(Oi)try{var em={};Object.defineProperty(em,"passive",{get:function(){AC=!0}}),window.addEventListener("test",em,em),window.removeEventListener("test",em,em)}catch(n){AC=!1}var _l=null,MC=null,ny=null,bu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ry=Zr(bu),tm=ft({},bu,{view:0,detail:0}),TG=Zr(tm),NC,OC,nm,oy=ft({},tm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:h2,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!==nm&&(nm&&n.type==="mousemove"?(NC=n.screenX-nm.screenX,OC=n.screenY-nm.screenY):OC=NC=0,nm=n),NC},movementY:function(n){return"movementY"in n?n.movementY:OC}}),u8=Zr(oy),RG=ft({},oy,{dataTransfer:0}),kG=Zr(RG),AG=ft({},tm,{relatedTarget:0}),DC=Zr(AG),MG=ft({},bu,{animationName:0,elapsedTime:0,pseudoElement:0}),NG=Zr(MG),OG=ft({},bu,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),DG=Zr(OG),PG=ft({},bu,{data:0}),d8=Zr(PG),LG=d8,_G={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IG={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"},BG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},zG=ft({},tm,{key:function(n){if(n.key){var o=_G[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=Vb(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?IG[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:h2,charCode:function(n){return n.type==="keypress"?Vb(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Vb(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),HG=Zr(zG),UG=ft({},oy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),f8=Zr(UG),FG=ft({},tm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:h2}),VG=Zr(FG),jG=ft({},bu,{propertyName:0,elapsedTime:0,pseudoElement:0}),KG=Zr(jG),qG=ft({},oy,{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}),GG=Zr(qG),WG=ft({},bu,{newState:0,oldState:0}),YG=Zr(WG),JG=[9,13,27,32],p8=229,PC=Oi&&"CompositionEvent"in window,rm=null;Oi&&"documentMode"in document&&(rm=document.documentMode);var XG=Oi&&"TextEvent"in window&&!rm,h8=Oi&&(!PC||rm&&8<rm&&11>=rm),m8=32,g8=String.fromCharCode(m8),b8=!1,yf=!1,QG={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},om=null,am=null,y8=!1;Oi&&(y8=vK("input")&&(!document.documentMode||9<document.documentMode));var Br=typeof Object.is==="function"?Object.is:EK,ZG=Oi&&"documentMode"in document&&11>=document.documentMode,vf=null,LC=null,im=null,_C=!1,xf={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")},IC={},v8={};Oi&&(v8=document.createElement("div").style,("AnimationEvent"in window)||(delete xf.animationend.animation,delete xf.animationiteration.animation,delete xf.animationstart.animation),("TransitionEvent"in window)||delete xf.transitionend.transition);var x8=ru("animationend"),$8=ru("animationiteration"),S8=ru("animationstart"),eW=ru("transitionrun"),tW=ru("transitionstart"),nW=ru("transitioncancel"),C8=ru("transitionend"),w8=new Map,BC="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(" ");BC.push("scrollEnd");var E8=0;if(typeof performance==="object"&&typeof performance.now==="function")var rW=performance,T8=function(){return rW.now()};else{var oW=Date;T8=function(){return oW.now()}}var zC=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)},aW="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.",ay=0,HC=1,UC=2,FC=3,iy="– ",sy="+ ",R8=" ",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}},iW=["Changed Props",""],k8="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",sW=["Changed Props",k8],sm=1,ys=2,Qo=[],$f=0,VC=0,zl={};Object.freeze(zl);var Zo=null,Sf=null,We=0,lW=1,st=2,Er=8,za=16,cW=32,A8=!1;try{var M8=Object.preventExtensions({})}catch(n){A8=!0}var jC=new WeakMap,Cf=[],wf=0,ly=null,lm=0,ea=[],ta=0,yu=null,vs=1,xs="",cr=null,Xt=null,vt=!1,Di=!1,Oo=null,Hl=null,na=!1,KC=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."),qC=be(null),GC=be(null),N8={},cy=null,Ef=null,Tf=!1,uW=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()})}},dW=Nt.unstable_scheduleCallback,fW=Nt.unstable_NormalPriority,Dn={$$typeof:Ri,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Pn=Nt.unstable_now,uy=console.createTask?console.createTask:function(){return null},cm=1,dy=2,Qn=-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,um=null,Vl=0,WC=null,YC=null,xu=-1.1,dm=null,Rf=-1.1,fy=-1.1,Li=-0,Cs=-1.1,ra=-1.1,JC=0,fm=null,O8=null,D8=null,jl=-1.1,$u=null,Kl=-1.1,py=-1.1,P8=-0,L8=-0,hy=0,ws=null,_8=0,pm=-1.1,my=!1,gy=!1,hm=null,XC=0,Su=0,kf=null,I8=oe.S;oe.S=function(n,o){if(O7=Xn(),typeof o==="object"&&o!==null&&typeof o.then==="function"){if(0>Cs&&0>ra){Cs=Pn();var s=jh(),d=Vh();if(s!==Kl||d!==$u)Kl=-1.1;jl=s,$u=d}OK(n,o)}I8!==null&&I8(n,o)};var Cu=be(null),Ha={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},mm=[],gm=[],bm=[],ym=[],vm=[],xm=[],wu=new Set;Ha.recordUnsafeLifecycleWarnings=function(n,o){wu.has(n.type)||(typeof o.componentWillMount==="function"&&o.componentWillMount.__suppressDeprecationWarning!==!0&&mm.push(n),n.mode&Er&&typeof o.UNSAFE_componentWillMount==="function"&&gm.push(n),typeof o.componentWillReceiveProps==="function"&&o.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&bm.push(n),n.mode&Er&&typeof o.UNSAFE_componentWillReceiveProps==="function"&&ym.push(n),typeof o.componentWillUpdate==="function"&&o.componentWillUpdate.__suppressDeprecationWarning!==!0&&vm.push(n),n.mode&Er&&typeof o.UNSAFE_componentWillUpdate==="function"&&xm.push(n))},Ha.flushPendingUnsafeLifecycleWarnings=function(){var n=new Set;0<mm.length&&(mm.forEach(function(C){n.add(J(C)||"Component"),wu.add(C.type)}),mm=[]);var o=new Set;0<gm.length&&(gm.forEach(function(C){o.add(J(C)||"Component"),wu.add(C.type)}),gm=[]);var s=new Set;0<bm.length&&(bm.forEach(function(C){s.add(J(C)||"Component"),wu.add(C.type)}),bm=[]);var d=new Set;0<ym.length&&(ym.forEach(function(C){d.add(J(C)||"Component"),wu.add(C.type)}),ym=[]);var p=new Set;0<vm.length&&(vm.forEach(function(C){p.add(J(C)||"Component"),wu.add(C.type)}),vm=[]);var m=new Set;if(0<xm.length&&(xm.forEach(function(C){m.add(J(C)||"Component"),wu.add(C.type)}),xm=[]),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<m.size&&(x=b(m),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 by=new Map,B8=new Set;Ha.recordLegacyContextWarning=function(n,o){var s=null;for(var d=n;d!==null;)d.mode&Er&&(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."):!B8.has(n.type)&&(d=by.get(s),n.type.contextTypes!=null||n.type.childContextTypes!=null||o!==null&&typeof o.getChildContext==="function")&&(d===void 0&&(d=[],by.set(s,d)),d.push(n))},Ha.flushLegacyContextWarning=function(){by.forEach(function(n){if(n.length!==0){var o=n[0],s=new Set;n.forEach(function(p){s.add(J(p)||"Component"),B8.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(){mm=[],gm=[],bm=[],ym=[],vm=[],xm=[],by=new Map};var z8={react_stack_bottom_frame:function(n,o,s){var d=ki;ki=!0;try{return n(o,s)}finally{ki=d}}},QC=z8.react_stack_bottom_frame.bind(z8),H8={react_stack_bottom_frame:function(n){var o=ki;ki=!0;try{return n.render()}finally{ki=o}}},U8=H8.react_stack_bottom_frame.bind(H8),F8={react_stack_bottom_frame:function(n,o){try{o.componentDidMount()}catch(s){_t(n,n.return,s)}}},ZC=F8.react_stack_bottom_frame.bind(F8),V8={react_stack_bottom_frame:function(n,o,s,d,p){try{o.componentDidUpdate(s,d,p)}catch(m){_t(n,n.return,m)}}},j8=V8.react_stack_bottom_frame.bind(V8),K8={react_stack_bottom_frame:function(n,o){var s=o.stack;n.componentDidCatch(o.value,{componentStack:s!==null?s:""})}},pW=K8.react_stack_bottom_frame.bind(K8),q8={react_stack_bottom_frame:function(n,o,s){try{s.componentWillUnmount()}catch(d){_t(n,o,d)}}},G8=q8.react_stack_bottom_frame.bind(q8),W8={react_stack_bottom_frame:function(n){var o=n.create;return n=n.inst,o=o(),n.destroy=o}},hW=W8.react_stack_bottom_frame.bind(W8),Y8={react_stack_bottom_frame:function(n,o,s){try{s()}catch(d){_t(n,o,d)}}},mW=Y8.react_stack_bottom_frame.bind(Y8),J8={react_stack_bottom_frame:function(n){var o=n._init;return o(n._payload)}},gW=J8.react_stack_bottom_frame.bind(J8),Af=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`."),ew=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."),yy=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."),vy={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,$m=!1,Mf=null,Sm=0,lt=null,tw,X8=tw=!1,Q8={},Z8={},e7={};g=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(!Q8[p]){Q8[p]=!0,s=s._owner,n=n._debugOwner;var m="";n&&typeof n.tag==="number"&&(p=J(n))&&(m=`
|
|
225
|
+
|
|
226
|
+
Check the render method of \``+p+"`."),m||d&&(m=`
|
|
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.',m,x)})}}};var Tu=q5(!0),t7=q5(!1),n7=0,r7=1,o7=2,nw=3,ql=!1,a7=!1,rw=null,ow=!1,Nf=be(null),xy=be(0),Do=be(null),oa=null,Of=1,Cm=2,kn=be(0),$y=0,aa=1,Hr=2,Po=4,Ur=8,Df,i7=new Set,s7=new Set,aw=new Set,l7=new Set,Es=0,Je=null,Vt=null,Ln=null,Sy=!1,Pf=!1,Ru=!1,Cy=0,wm=0,Ts=null,bW=0,yW=25,ne=null,ia=null,Rs=-1,Em=!1,Tm={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};Tm.useEffectEvent=yn;var iw=null,c7=null,sw=null,u7=null,_i=null,Ua=null,wy=null;iw={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",dt(),Yd(o),oS(n,o)},useContext:function(n){return ne="useContext",dt(),nn(n)},useEffect:function(n,o){return ne="useEffect",dt(),Yd(o),b0(n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",dt(),Yd(s),rS(n,o,s)},useInsertionEffect:function(n,o){ne="useInsertionEffect",dt(),Yd(o),du(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",dt(),Yd(o),nS(n,o)},useMemo:function(n,o){ne="useMemo",dt(),Yd(o);var s=oe.H;oe.H=_i;try{return aS(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",dt();var d=oe.H;oe.H=_i;try{return G2(n,o,s)}finally{oe.H=d}},useRef:function(n){return ne="useRef",dt(),eS(n)},useState:function(n){ne="useState",dt();var o=oe.H;oe.H=_i;try{return X2(n)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",dt()},useDeferredValue:function(n,o){return ne="useDeferredValue",dt(),iS(n,o)},useTransition:function(){return ne="useTransition",dt(),cS()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",dt(),Y2(n,o,s)},useId:function(){return ne="useId",dt(),uS()},useFormState:function(n,o){return ne="useFormState",dt(),f0(),Xd(n,o)},useActionState:function(n,o){return ne="useActionState",dt(),Xd(n,o)},useOptimistic:function(n){return ne="useOptimistic",dt(),Q2(n)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",dt(),dS()},useEffectEvent:function(n){return ne="useEffectEvent",dt(),tS(n)}},c7={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",de(),oS(n,o)},useContext:function(n){return ne="useContext",de(),nn(n)},useEffect:function(n,o){return ne="useEffect",de(),b0(n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",de(),rS(n,o,s)},useInsertionEffect:function(n,o){ne="useInsertionEffect",de(),du(4,Hr,n,o)},useLayoutEffect:function(n,o){return ne="useLayoutEffect",de(),nS(n,o)},useMemo:function(n,o){ne="useMemo",de();var s=oe.H;oe.H=_i;try{return aS(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",de();var d=oe.H;oe.H=_i;try{return G2(n,o,s)}finally{oe.H=d}},useRef:function(n){return ne="useRef",de(),eS(n)},useState:function(n){ne="useState",de();var o=oe.H;oe.H=_i;try{return X2(n)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",de()},useDeferredValue:function(n,o){return ne="useDeferredValue",de(),iS(n,o)},useTransition:function(){return ne="useTransition",de(),cS()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",de(),Y2(n,o,s)},useId:function(){return ne="useId",de(),uS()},useActionState:function(n,o){return ne="useActionState",de(),Xd(n,o)},useFormState:function(n,o){return ne="useFormState",de(),f0(),Xd(n,o)},useOptimistic:function(n){return ne="useOptimistic",de(),Q2(n)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),dS()},useEffectEvent:function(n){return ne="useEffectEvent",de(),tS(n)}},sw={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",de(),x0(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(),v0(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 $0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",de();var d=oe.H;oe.H=Ua;try{return Jd(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 Jd(La)}finally{oe.H=n}},useDebugValue:function(){ne="useDebugValue",de()},useDeferredValue:function(n,o){return ne="useDeferredValue",de(),hA(n,o)},useTransition:function(){return ne="useTransition",de(),xA()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",de(),h0(n,o,s)},useId:function(){return ne="useId",de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",de(),f0(),m0(n)},useActionState:function(n){return ne="useActionState",de(),m0(n)},useOptimistic:function(n,o){return ne="useOptimistic",de(),oA(n,o)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),zt().memoizedState},useEffectEvent:function(n){return ne="useEffectEvent",de(),y0(n)}},u7={readContext:function(n){return nn(n)},use:kl,useCallback:function(n,o){return ne="useCallback",de(),x0(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(),v0(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=wy;try{return $0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",de();var d=oe.H;oe.H=wy;try{return Nh(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=wy;try{return Nh(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(),h0(n,o,s)},useId:function(){return ne="useId",de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",de(),f0(),g0(n)},useActionState:function(n){return ne="useActionState",de(),g0(n)},useOptimistic:function(n,o){return ne="useOptimistic",de(),iA(n,o)},useHostTransitionStatus:fu,useMemoCache:uu,useCacheRefresh:function(){return ne="useCacheRefresh",de(),zt().memoizedState},useEffectEvent:function(n){return ne="useEffectEvent",de(),y0(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(),oS(n,o)},useContext:function(n){return ne="useContext",u(),dt(),nn(n)},useEffect:function(n,o){return ne="useEffect",u(),dt(),b0(n,o)},useImperativeHandle:function(n,o,s){return ne="useImperativeHandle",u(),dt(),rS(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(),nS(n,o)},useMemo:function(n,o){ne="useMemo",u(),dt();var s=oe.H;oe.H=_i;try{return aS(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",u(),dt();var d=oe.H;oe.H=_i;try{return G2(n,o,s)}finally{oe.H=d}},useRef:function(n){return ne="useRef",u(),dt(),eS(n)},useState:function(n){ne="useState",u(),dt();var o=oe.H;oe.H=_i;try{return X2(n)}finally{oe.H=o}},useDebugValue:function(){ne="useDebugValue",u(),dt()},useDeferredValue:function(n,o){return ne="useDeferredValue",u(),dt(),iS(n,o)},useTransition:function(){return ne="useTransition",u(),dt(),cS()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",u(),dt(),Y2(n,o,s)},useId:function(){return ne="useId",u(),dt(),uS()},useFormState:function(n,o){return ne="useFormState",u(),dt(),Xd(n,o)},useActionState:function(n,o){return ne="useActionState",u(),dt(),Xd(n,o)},useOptimistic:function(n){return ne="useOptimistic",u(),dt(),Q2(n)},useMemoCache:function(n){return u(),uu(n)},useHostTransitionStatus:fu,useCacheRefresh:function(){return ne="useCacheRefresh",dt(),dS()},useEffectEvent:function(n){return ne="useEffectEvent",u(),dt(),tS(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(),x0(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(),v0(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 $0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",u(),de();var d=oe.H;oe.H=Ua;try{return Jd(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 Jd(La)}finally{oe.H=n}},useDebugValue:function(){ne="useDebugValue",u(),de()},useDeferredValue:function(n,o){return ne="useDeferredValue",u(),de(),hA(n,o)},useTransition:function(){return ne="useTransition",u(),de(),xA()},useSyncExternalStore:function(n,o,s){return ne="useSyncExternalStore",u(),de(),h0(n,o,s)},useId:function(){return ne="useId",u(),de(),zt().memoizedState},useFormState:function(n){return ne="useFormState",u(),de(),m0(n)},useActionState:function(n){return ne="useActionState",u(),de(),m0(n)},useOptimistic:function(n,o){return ne="useOptimistic",u(),de(),oA(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(),y0(n)}},wy={readContext:function(n){return f(),nn(n)},use:function(n){return u(),kl(n)},useCallback:function(n,o){return ne="useCallback",u(),de(),x0(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(),v0(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 $0(n,o)}finally{oe.H=s}},useReducer:function(n,o,s){ne="useReducer",u(),de();var d=oe.H;oe.H=Ua;try{return Nh(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 Nh(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(),h0(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(),iA(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(),y0(n)}};var d7={},f7=new Set,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;Object.freeze(d7);var lw={enqueueSetState:function(n,o,s){n=n._reactInternals;var d=Ro(n),p=wl(d);p.payload=o,s!==void 0&&s!==null&&(pS(s),p.callback=s),o=El(n,p,d),o!==null&&(pi(d,"this.setState()",n),fn(o,n,d),Rh(o,n,d))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var d=Ro(n),p=wl(d);p.tag=r7,p.payload=o,s!==void 0&&s!==null&&(pS(s),p.callback=s),o=El(n,p,d),o!==null&&(pi(d,"this.replaceState()",n),fn(o,n,d),Rh(o,n,d))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=Ro(n),d=wl(s);d.tag=o7,o!==void 0&&o!==null&&(pS(o),d.callback=o),o=El(n,d,s),o!==null&&(pi(s,"this.forceUpdate()",n),fn(o,n,s),Rh(o,n,s))}},Lf=null,cw=null,uw=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."),_n=!1,S7={},C7={},w7={},E7={},_f=!1,T7={},Ey={},dw={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},R7=!1,k7=null;k7=new Set;var ks=!1,In=!1,fw=!1,A7=typeof WeakSet==="function"?WeakSet:Set,Zn=null,If=null,Bf=null,Bn=null,ro=!1,Fa=null,qn=!1,Rm=8192,vW={getCacheForType:function(n){var o=nn(Dn),s=o.data.get(n);return s===void 0&&(s=n(),o.data.set(n,s)),s},cacheSignal:function(){return nn(Dn).controller.signal},getOwner:function(){return Mo}};if(typeof Symbol==="function"&&Symbol.for){var km=Symbol.for;km("selector.component"),km("selector.has_pseudo_class"),km("selector.role"),km("selector.test_id"),km("selector.text")}var xW=[],$W=typeof WeakMap==="function"?WeakMap:Map,er=0,Gn=2,Lo=4,As=0,Am=1,ku=2,Ty=3,Gl=4,Ry=6,M7=5,kt=er,jt=null,ut=null,ct=0,oo=0,ky=1,Au=2,Mm=3,N7=4,pw=5,Nm=6,Ay=7,hw=8,Mu=9,Ht=oo,_o=null,Wl=!1,zf=!1,mw=!1,Ii=0,un=As,Yl=0,Jl=0,gw=0,ao=0,Nu=0,Om=null,Fr=null,My=!1,Ny=0,O7=0,D7=300,Oy=1/0,P7=500,Dm=null,vn=null,Xl=null,Dy=0,bw=1,yw=2,L7=3,Ql=0,_7=1,I7=2,B7=3,z7=4,Py=5,zn=0,Zl=null,Hf=null,Va=0,vw=0,xw=-0,$w=null,H7=null,U7=null,ja=Dy,F7=null,SW=50,Pm=0,Sw=null,Cw=!1,Ly=!1,CW=50,Ou=0,Lm=null,Uf=!1,_y=null,V7=!1,j7=new Set,wW={},Iy=null,Ff=null,ww=!1,Ew=!1,By=!1,Tw=!1,ec=0,Rw={};(function(){for(var n=0;n<BC.length;n++){var o=BC[n],s=o.toLowerCase();o=o[0].toUpperCase()+o.slice(1),Pa(s,"on"+o)}Pa(x8,"onAnimationEnd"),Pa($8,"onAnimationIteration"),Pa(S8,"onAnimationStart"),Pa("dblclick","onDoubleClick"),Pa("focusin","onFocus"),Pa("focusout","onBlur"),Pa(eW,"onTransitionRun"),Pa(tW,"onTransitionStart"),Pa(nW,"onTransitionCancel"),Pa(C8,"onTransitionEnd")})(),xo("onMouseEnter",["mouseout","mouseover"]),xo("onMouseLeave",["mouseout","mouseover"]),xo("onPointerEnter",["pointerout","pointerover"]),xo("onPointerLeave",["pointerout","pointerover"]),Sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _m="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(" "),kw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_m)),zy="_reactListening"+Math.random().toString(36).slice(2),K7=!1,q7=!1,Hy=!1,G7=!1,Uy=!1,Fy=!1,W7=!1,Vy={},EW=/\r\n?/g,TW=/\u0000|\uFFFD/g,Du="http://www.w3.org/1999/xlink",Aw="http://www.w3.org/XML/1998/namespace",RW="javascript:throw new Error('React form unexpectedly submitted.')",kW="suppressHydrationWarning",Pu="&",jy="/&",Im="$",Bm="/$",tc="$?",Lu="$~",Vf="$!",AW="html",MW="body",NW="head",Mw="F!",Y7="F",J7="loading",OW="style",Ms=0,jf=1,Ky=2,Nw=null,Ow=null,X7={dialog:!0,webview:!0},Dw=null,zm=void 0,Q7=typeof setTimeout==="function"?setTimeout:void 0,DW=typeof clearTimeout==="function"?clearTimeout:void 0,_u=-1,Z7=typeof Promise==="function"?Promise:void 0,PW=typeof queueMicrotask==="function"?queueMicrotask:typeof Z7<"u"?function(n){return Z7.resolve(null).then(n).catch(yq)}:Q7,Pw=null,Iu=0,Hm=1,e6=2,t6=3,sa=4,la=new Map,n6=new Set,Ns=It.d;It.d={f:function(){var n=Ns.f(),o=nf();return n||o},r:function(n){var o=et(n);o!==null&&o.tag===5&&o.type==="form"?vA(o):Ns.r(n)},D:function(n){Ns.D(n),fN("dns-prefetch",n,null)},C:function(n,o){Ns.C(n,o),fN("preconnect",n,o)},L:function(n,o,s){Ns.L(n,o,s);var d=Kf;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 m=p;switch(o){case"style":m=af(n);break;case"script":m=sf(n)}la.has(m)||(n=ft({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:n,as:o},s),la.set(m,n),d.querySelector(p)!==null||o==="style"&&d.querySelector(qh(m))||o==="script"&&d.querySelector(Gh(m))||(o=d.createElement("link"),sr(o,"link",n),je(o),d.head.appendChild(o)))}},m:function(n,o){Ns.m(n,o);var s=Kf;if(s&&n){var d=o&&typeof o.as==="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Yo(d)+'"][href="'+Yo(n)+'"]',m=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=sf(n)}if(!la.has(m)&&(n=ft({rel:"modulepreload",href:n},o),la.set(m,n),s.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Gh(m)))return}d=s.createElement("link"),sr(d,"link",n),je(d),s.head.appendChild(d)}}},X:function(n,o){Ns.X(n,o);var s=Kf;if(s&&n){var d=Mt(s).hoistableScripts,p=sf(n),m=d.get(p);m||(m=s.querySelector(Gh(p)),m||(n=ft({src:n,async:!0},o),(o=la.get(p))&&rC(n,o),m=s.createElement("script"),je(m),sr(m,"link",n),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},d.set(p,m))}},S:function(n,o,s){Ns.S(n,o,s);var d=Kf;if(d&&n){var p=Mt(d).hoistableStyles,m=af(n);o=o||"default";var x=p.get(m);if(!x){var C={loading:Iu,preload:null};if(x=d.querySelector(qh(m)))C.loading=Hm|sa;else{n=ft({rel:"stylesheet",href:n,"data-precedence":o},s),(s=la.get(m))&&nC(n,s);var T=x=d.createElement("link");je(T),sr(T,"link",n),T._p=new Promise(function(A,K){T.onload=A,T.onerror=K}),T.addEventListener("load",function(){C.loading|=Hm}),T.addEventListener("error",function(){C.loading|=e6}),C.loading|=sa,H0(x,o,d)}x={type:"stylesheet",instance:x,count:1,state:C},p.set(m,x)}}},M:function(n,o){Ns.M(n,o);var s=Kf;if(s&&n){var d=Mt(s).hoistableScripts,p=sf(n),m=d.get(p);m||(m=s.querySelector(Gh(p)),m||(n=ft({src:n,async:!0,type:"module"},o),(o=la.get(p))&&rC(n,o),m=s.createElement("script"),je(m),sr(m,"link",n),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},d.set(p,m))}}};var Kf=typeof document>"u"?null:document,qy=null,LW=60000,_W=800,IW=500,Lw=0,_w=null,Gy=null,Bu=Qq,Um={$$typeof:Ri,Provider:null,Consumer:null,_currentValue:Bu,_currentValue2:Bu,_threadCount:0},r6="%c%s%c",o6="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",a6="",Wy=" ",BW=Function.prototype.bind,i6=!1,s6=null,l6=null,c6=null,u6=null,d6=null,f6=null,p6=null,h6=null,m6=null,g6=null;s6=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=Cr(n,2),s!==null&&fn(s,n,2))},l6=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=Cr(n,2),s!==null&&fn(s,n,2))},c6=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=Cr(n,2),s!==null&&fn(s,n,2))},u6=function(n,o,s){n.pendingProps=t(n.memoizedProps,o,0,s),n.alternate&&(n.alternate.pendingProps=n.pendingProps),o=Cr(n,2),o!==null&&fn(o,n,2)},d6=function(n,o){n.pendingProps=i(n.memoizedProps,o,0),n.alternate&&(n.alternate.pendingProps=n.pendingProps),o=Cr(n,2),o!==null&&fn(o,n,2)},f6=function(n,o,s){n.pendingProps=r(n.memoizedProps,o,s),n.alternate&&(n.alternate.pendingProps=n.pendingProps),o=Cr(n,2),o!==null&&fn(o,n,2)},p6=function(n){var o=Cr(n,2);o!==null&&fn(o,n,2)},h6=function(n){var o=Fd(),s=Cr(n,o);s!==null&&fn(s,n,o)},m6=function(n){c=n},g6=function(n){l=n};var Yy=!0,Jy=null,Iw=!1,nc=null,rc=null,oc=null,Fm=new Map,Vm=new Map,ac=[],zW="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(" "),Xy=null;if(K0.prototype.render=cC.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);oC(d,p,s,o,null,null)},K0.prototype.unmount=cC.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&(Gn|Lo))!==er&&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."),oC(n.current,2,null,n,null,null),nf(),o[Ll]=null}},K0.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&&TN(n)}},function(){var n=Jf.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=s6,n.overrideHookStateDeletePath=l6,n.overrideHookStateRenamePath=c6,n.overrideProps=u6,n.overridePropsDeletePath=d6,n.overridePropsRenamePath=f6,n.scheduleUpdate=p6,n.scheduleRetry=h6,n.setErrorHandler=m6,n.setSuspenseHandler=g6,n.scheduleRefresh=S,n.scheduleRoot=v,n.setRefreshHandler=w,n.getCurrentFiber=jq,Ud(n)}()&&Oi&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var b6=window.location.protocol;/^(https?|file):$/.test(b6)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(b6==="file:"?`
|
|
232
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}xY.createRoot=function(n,o){if(!E(n))throw Error("Target container is not a DOM element.");MN(n);var s=!1,d="",p=RA,m=kA,x=AA;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&&(m=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=vN(n,1,!1,null,null,s,d,null,p,m,x,AN),n[Ll]=o.current,jS(n),new cC(o)},xY.hydrateRoot=function(n,o,s){if(!E(n))throw Error("Target container is not a DOM element.");MN(n),o===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var d=!1,p="",m=RA,x=kA,C=AA,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&&(m=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.formState!==void 0&&(T=s.formState)),o=vN(n,1,!0,o,s!=null?s:null,d,p,T,m,x,C,AN),o.context=xN(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,jS(n),new K0(o)},xY.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var L6=Bi(function(_ue,P6){var $Y=j(D6());P6.exports=$Y});function _6(e,t){if(typeof e==="function")return e(t);else if(e!==null&&e!==void 0)e.current=t}function I6(...e){return(t)=>{let r=!1,a=e.map((i)=>{let l=_6(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 _6(e[i],null)}}}}var SY;var B6=N(()=>{SY=j(ae(),1)});function wY(e){return typeof e==="object"&&e!==null&&"then"in e}function z6(e){return e!=null&&typeof e==="object"&&"$$typeof"in e&&e.$$typeof===CY&&"_payload"in e&&wY(e._payload)}function EY(e){let t=TY(e),r=Hn.forwardRef((a,i)=>{let{children:l,...c}=a;if(z6(l)&&typeof cv==="function")l=cv(l._payload);let u=Hn.Children.toArray(l),f=u.find(kY);if(f){let h=f.props.children,g=u.map((b)=>{if(b===f){if(Hn.Children.count(h)>1)return Hn.Children.only(null);return Hn.isValidElement(h)?h.props.children:null}else return b});return lv.jsx(t,{...c,ref:i,children:Hn.isValidElement(h)?Hn.cloneElement(h,void 0,g):null})}return lv.jsx(t,{...c,ref:i,children:l})});return r.displayName=`${e}.Slot`,r}function TY(e){let t=Hn.forwardRef((r,a)=>{let{children:i,...l}=r;if(z6(i)&&typeof cv==="function")i=cv(i._payload);if(Hn.isValidElement(i)){let c=MY(i),u=AY(l,i.props);if(i.type!==Hn.Fragment)u.ref=a?I6(a,c):c;return Hn.cloneElement(i,u)}return Hn.Children.count(i)>1?Hn.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}function kY(e){return Hn.isValidElement(e)&&typeof e.type==="function"&&"__radixId"in e.type&&e.type.__radixId===RY}function AY(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 MY(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 Hn,lv,CY,cv,H6,RY;var U6=N(()=>{B6();Hn=j(ae(),1),lv=j(io(),1),CY=Symbol.for("react.lazy"),cv=Hn[" use ".trim().toString()];H6=EY("Slot");RY=Symbol("radix.slottable")});function F6(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=F6(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=F6(e))&&(a&&(a+=" "),a+=t);return a}var V6;var Ds=N(()=>{V6=zo});var j6=(e)=>typeof e==="boolean"?`${e}`:e===0?"0":e,K6,q6=(e,t)=>(r)=>{var a;if((t===null||t===void 0?void 0:t.variants)==null)return K6(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 g=r===null||r===void 0?void 0:r[h],b=l===null||l===void 0?void 0:l[h];if(g===null)return null;let y=j6(g)||j6(b);return i[h][y]}),u=r&&Object.entries(r).reduce((h,g)=>{let[b,y]=g;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,g)=>{let{class:b,className:y,...v}=g;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 K6(e,c,f,r===null||r===void 0?void 0:r.class,r===null||r===void 0?void 0:r.className)};var G6=N(()=>{Ds();K6=zo});var NY=(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},OY=(e,t)=>({classGroupId:e,validator:t}),tO=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),W6,DY=(e)=>{let t=LY(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:(c)=>{if(c.startsWith("[")&&c.endsWith("]"))return PY(c);let u=c.split("-"),f=u[0]===""&&u.length>1?1:0;return nO(u,f,t)},getConflictingClassGroupIds:(c,u)=>{if(u){let f=a[c],h=r[c];if(f){if(h)return NY(h,f);return f}return h||W6}return r[c]||W6}}},nO=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;let i=e[t],l=r.nextPart.get(i);if(l){let h=nO(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 g=c[h];if(g.validator(u))return g.classGroupId}return},PY=(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})(),LY=(e)=>{let{theme:t,classGroups:r}=e;return _Y(r,t)},_Y=(e,t)=>{let r=tO();for(let a in e){let i=e[a];nE(i,r,a,t)}return r},nE=(e,t,r,a)=>{let i=e.length;for(let l=0;l<i;l++){let c=e[l];IY(c,t,r,a)}},IY=(e,t,r,a)=>{if(typeof e==="string"){BY(e,t,r);return}if(typeof e==="function"){zY(e,t,r,a);return}HY(e,t,r,a)},BY=(e,t,r)=>{let a=e===""?t:rO(t,e);a.classGroupId=r},zY=(e,t,r,a)=>{if(UY(e)){nE(e(a),t,r,a);return}if(t.validators===null)t.validators=[];t.validators.push(OY(r,e))},HY=(e,t,r,a)=>{let i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){let[u,f]=i[c];nE(f,rO(t,u),r,a)}},rO=(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=tO(),r.nextPart.set(c,u);r=u}return r},UY=(e)=>("isThemeGetter"in e)&&e.isThemeGetter===!0,FY=(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)}}},VY,Y6=(e,t,r,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:i}),jY=(e)=>{let{prefix:t,experimentalParseClassName:r}=e,a=(i)=>{let l=[],c=0,u=0,f=0,h,g=i.length;for(let w=0;w<g;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 Y6(l,v,y,S)};if(t){let i=t+":",l=a;a=(c)=>c.startsWith(i)?l(c.slice(i.length)):Y6(VY,!1,c,void 0,!0)}if(r){let i=a;a=(l)=>r({className:l,parseClassName:i})}return a},KY=(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}},qY=(e)=>({cache:FY(e.cacheSize),parseClassName:jY(e),sortModifiers:KY(e),postfixLookupClassGroupIds:GY(e),...DY(e)}),GY=(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},WY,YY=(e,t)=>{let{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:c}=t,u=[],f=e.trim().split(WY),h="";for(let g=f.length-1;g>=0;g-=1){let b=f[g],{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},JY=(...e)=>{let t=0,r,a,i="";while(t<e.length)if(r=e[t++]){if(a=oO(r))i&&(i+=" "),i+=a}return i},oO=(e)=>{if(typeof e==="string")return e;let t,r="";for(let a=0;a<e.length;a++)if(e[a]){if(t=oO(e[a]))r&&(r+=" "),r+=t}return r},J6=(e,...t)=>{let r,a,i,l,c=(f)=>{let h=t.reduce((g,b)=>b(g),e());return r=qY(h),a=r.cache.get,i=r.cache.set,l=u,u(f)},u=(f)=>{let h=a(f);if(h)return h;let g=YY(f,r);return i(f,g),g};return l=c,(...f)=>l(JY(...f))},XY,Wn=(e)=>{let t=(r)=>r[e]||XY;return t.isThemeGetter=!0,t},aO,iO,QY,ZY,eJ,tJ,nJ,rJ,lc=(e)=>QY.test(e),gt=(e)=>!!e&&!Number.isNaN(Number(e)),Hi=(e)=>!!e&&Number.isInteger(Number(e)),eE=(e)=>e.endsWith("%")&>(e.slice(0,-1)),Ps=(e)=>ZY.test(e),sO=()=>!0,oJ=(e)=>eJ.test(e)&&!tJ.test(e),rE=()=>!1,aJ=(e)=>nJ.test(e),iJ=(e)=>rJ.test(e),sJ=(e)=>!Ne(e)&&!De(e),lJ=(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)),cJ=(e)=>cc(e,uO,rE),Ne=(e)=>aO.test(e),Fu=(e)=>cc(e,dO,oJ),X6=(e)=>cc(e,bJ,gt),uJ=(e)=>cc(e,pO,sO),dJ=(e)=>cc(e,fO,rE),Q6=(e)=>cc(e,lO,rE),fJ=(e)=>cc(e,cO,iJ),uv=(e)=>cc(e,hO,aJ),De=(e)=>iO.test(e),Jm=(e)=>Vu(e,dO),pJ=(e)=>Vu(e,fO),Z6=(e)=>Vu(e,lO),hJ=(e)=>Vu(e,uO),mJ=(e)=>Vu(e,cO),dv=(e)=>Vu(e,hO,!0),gJ=(e)=>Vu(e,pO,!0),cc=(e,t,r)=>{let a=aO.exec(e);if(a){if(a[1])return t(a[1]);return r(a[2])}return!1},Vu=(e,t,r=!1)=>{let a=iO.exec(e);if(a){if(a[1])return t(a[1]);return r}return!1},lO=(e)=>e==="position"||e==="percentage",cO=(e)=>e==="image"||e==="url",uO=(e)=>e==="length"||e==="size"||e==="bg-size",dO=(e)=>e==="length",bJ=(e)=>e==="number",fO=(e)=>e==="family-name",pO=(e)=>e==="number"||e==="weight",hO=(e)=>e==="shadow",eO=()=>{let e=Wn("color"),t=Wn("font"),r=Wn("text"),a=Wn("font-weight"),i=Wn("tracking"),l=Wn("leading"),c=Wn("breakpoint"),u=Wn("container"),f=Wn("spacing"),h=Wn("radius"),g=Wn("shadow"),b=Wn("inset-shadow"),y=Wn("text-shadow"),v=Wn("drop-shadow"),S=Wn("blur"),w=Wn("perspective"),E=Wn("aspect"),R=Wn("ease"),D=Wn("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],be=()=>["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(),Z6,Q6,{position:[De,Ne]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$e=()=>["auto","cover","contain",hJ,cJ,{size:[De,Ne]}],ke=()=>[eE,Jm,Fu],He=()=>["","none","full",h,De,Ne],Ee=()=>["",gt,Jm,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,eE,Z6,Q6],Rt=()=>["","none",S,De,Ne],he=()=>["none",gt,De,Ne],ln=()=>["none",gt,De,Ne],On=()=>[gt,De,Ne],Rn=()=>[lc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ps],breakpoint:[Ps],color:[sO],container:[Ps],"drop-shadow":[Ps],ease:["in","out","in-out"],font:[sJ],"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":[lJ],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:be()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:be()}],"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,Jm,Fu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,gJ,uJ]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eE,Ne]}],"font-family":[{font:[pJ,dJ,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,X6]}],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]},mJ,fJ]}],"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,Jm,Fu]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",g,dv,uv]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",b,dv,uv]}],"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,dv,uv]}],"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,dv,uv]}],"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:On()}],"skew-x":[{"skew-x":On()}],"skew-y":[{"skew-y":On()}],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,Jm,Fu,X6]}],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"]}},yJ=(e,{cacheSize:t,prefix:r,experimentalParseClassName:a,extend:i={},override:l={}})=>(Xf(e,"cacheSize",t),Xf(e,"prefix",r),Xf(e,"experimentalParseClassName",a),fv(e.theme,l.theme),fv(e.classGroups,l.classGroups),fv(e.conflictingClassGroups,l.conflictingClassGroups),fv(e.conflictingClassGroupModifiers,l.conflictingClassGroupModifiers),Xf(e,"postfixLookupClassGroups",l.postfixLookupClassGroups),Xf(e,"orderSensitiveModifiers",l.orderSensitiveModifiers),pv(e.theme,i.theme),pv(e.classGroups,i.classGroups),pv(e.conflictingClassGroups,i.conflictingClassGroups),pv(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),tE(e,i,"postfixLookupClassGroups"),tE(e,i,"orderSensitiveModifiers"),e),Xf=(e,t,r)=>{if(r!==void 0)e[t]=r},fv=(e,t)=>{if(t)for(let r in t)Xf(e,r,t[r])},pv=(e,t)=>{if(t)for(let r in t)tE(e,t,r)},tE=(e,t,r)=>{let a=t[r];if(a!==void 0)e[r]=e[r]?e[r].concat(a):a},mO=(e,...t)=>typeof e==="function"?J6(eO,e,...t):J6(()=>yJ(eO(),e),...t);var gO=N(()=>{W6=[],VY=[],WY=/\s+/,XY=[],aO=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,iO=/^\((?:(\w[\w-]*):)?(.+)\)$/i,QY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ZY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eJ=/\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$/,tJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/});var Ls,vJ,xJ=(e)=>{if(typeof e==="boolean")return e?"":void 0;if(e===void 0||e===null)return;return String(e)},$J=(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=q6(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 g={};for(let R in t?.variants)if(g[R]=f[R],R in f&&!a?.has(R))delete f[R];let b=$J(g),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}`]=xJ(H)}let v=f.style,S=Ls.useMemo(()=>t?.style?{...t.style,...v}:v,[v]),w=Ls.useMemo(()=>vJ(zo(r(b),h)),[b,h]),E=e;if(l.asChild&&typeof e==="string")E=H6,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(()=>{U6();G6();Ds();gO();Ls=j(ae(),1),vJ=mO({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 Qf=()=>{};var bO,nt;var dr=N(()=>{bO=j(ae(),1),nt=typeof document<"u"?bO.default.useLayoutEffect:()=>{}});function wJ(e=!1){let t=nr.useContext(yO),r=nr.useRef(null);if(r.current===null&&!e){let a=nr.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(a){let i=oE.get(a);if(i==null)oE.set(a,{id:t.current,state:a.memoizedState});else if(a.memoizedState!==i.state)t.current=i.id,oE.delete(a)}r.current=++t.current}return r.current}function EJ(e){let t=nr.useContext(yO);if(t===hv&&!CJ)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=wJ(!!e),a=`react-aria${t.prefix}`;return e||`${a}-${r}`}function TJ(e){let t=nr.default.useId(),[r]=nr.useState(jr()),a=r?"react-aria":`react-aria${hv.prefix}`;return e||`${a}-${t}`}function RJ(){return!1}function kJ(){return!0}function AJ(e){return()=>{}}function jr(){if(typeof nr.default.useSyncExternalStore==="function")return nr.default.useSyncExternalStore(AJ,RJ,kJ);return nr.useContext(SJ)}var nr,hv,yO,SJ,CJ,oE,vO;var uc=N(()=>{nr=j(ae(),1),hv={prefix:String(Math.round(Math.random()*10000000000)),current:0},yO=nr.default.createContext(hv),SJ=nr.default.createContext(!1),CJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),oE=new WeakMap;vO=typeof nr.default.useId==="function"?TJ:EJ});function xO(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 $O=N(()=>{dr();dc=j(ae(),1)});function Nn(e){let[t,r]=_s.useState(e),a=_s.useRef(null),i=vO(t),l=_s.useRef(null);if(Xm)Xm.register(l,i);if(MJ){let c=Zf.get(i);if(c&&!c.includes(a))c.push(a);else Zf.set(i,[a])}return nt(()=>{let c=i;return()=>{if(Xm)Xm.unregister(l);Zf.delete(c)}},[i]),_s.useEffect(()=>{let c=a.current;if(c)r(c);return()=>{if(c)a.current=null}}),i}function SO(e,t){if(e===t)return e;let r=Zf.get(e);if(r)return r.forEach((i)=>i.current=t),t;let a=Zf.get(t);if(a)return a.forEach((i)=>i.current=e),e;return t}function da(e=[]){let t=Nn(),[r,a]=xO(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,MJ,Zf,Xm;var Ho=N(()=>{dr();uc();$O();_s=j(ae(),1),MJ=Boolean(typeof window<"u"&&window.document&&window.document.createElement),Zf=new Map;if(typeof FinalizationRegistry<"u")Xm=new FinalizationRegistry((e)=>{Zf.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=CO(i,t);return r||=typeof l=="function",l});if(r)return()=>{a.forEach((i,l)=>{if(typeof i==="function")i();else CO(e[l],null)})}}}function CO(e,t){if(typeof e==="function")return e(t);else if(e!=null)e.current=t}var aE=()=>{};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]=V6(l,c);else if(i==="id"&&l&&c)t.id=SO(l,c);else if(i==="ref"&&l&&c)t.ref=Ui(l,c);else t[i]=c!==void 0?c:l}}return t}var fr=N(()=>{Qf();Ho();aE();Ds()});var fa=N(()=>{fr()});var mv=N(()=>{aE()});var wO=N(()=>{dr()});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 EO=N(()=>{ju=j(ae(),1)});var ep=N(()=>{EO()});function Kr({values:e,children:t}){for(let[r,a]of e)t=rr.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 rr.useMemo(()=>{let h,g,b;if(typeof t==="function")h=t({...u,defaultClassName:i});else h=t;if(typeof r==="function")g=r({...u,defaultStyle:c||{}});else g=r;if(typeof a==="function")b=a({...u,defaultChildren:l});else if(a==null)b=l;else b=a;return{className:h??i,style:g||c?{...c,...g}: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=rr.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(rr.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,g={...f.defaultStyle,...h},b=typeof e.style==="function"?e.style({...f,defaultStyle:g}):e.style;return{...g,...b}};else u.style={...l.style,...e.style};return[u,c]}function gv(e=!0){let[t,r]=rr.useState(e),a=rr.useRef(!1),i=rr.useCallback((l)=>{a.current=!0,r(!!l)},[]);return nt(()=>{if(!a.current)r(!1)},[]),[i,t]}function RO(e){let t=/^(data-.*)$/,r={};for(let a in e)if(!t.test(a))r[a]=e[a];return r}function NJ(e,t,r){let{render:a,...i}=t,l=rr.useRef(null),c=rr.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 rr.default.createElement(e,u)}var rr,Fi,TO,Ot;var qr=N(()=>{fa();mv();wO();ep();rr=j(ae(),1),Fi=Symbol("default");TO={},Ot=new Proxy({},{get(e,t){if(typeof t!=="string")return;let r=TO[t];if(!r)r=rr.forwardRef(NJ.bind(null,t)),TO[t]=r;return r}})});var kO="react-aria-clear-focus",AO="react-aria-focus";var MO=()=>{};function OJ(e){return e!==null&&typeof e==="object"&&"nodeType"in e&&typeof e.nodeType==="number"}function NO(e){return OJ(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 pr=()=>{};function Uo(){return DJ}var DJ=!1;var OO=()=>{};var bv=N(()=>{OO()});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(NO(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 Qm(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(()=>{pr();bv()});function yv(e){let t=LJ(rt(e));if(t!==e){if(t)PJ(t,e);if(e)iE(e,t)}}function PJ(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function iE(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function LJ(e){let t=wt(e),r=t?.getAttribute("aria-activedescendant");if(r)return e.getElementById(r)||t;return t}var sE=N(()=>{dn();pr()});function Gr(e){if(_J())e.focus({preventScroll:!0});else{let t=IJ(e);e.focus(),BJ(t)}}function _J(){if(vv==null){vv=!1;try{document.createElement("div").focus({get preventScroll(){return vv=!0,!0}})}catch{}}return vv}function IJ(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 BJ(e){for(let{element:t,scrollTop:r,scrollLeft:a}of e)t.scrollTop=r,t.scrollLeft=a}var vv=null;var qu=()=>{};function HJ(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 UJ(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 xv(e,t){if(zJ)return e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]");return e.nodeName!=="#comment"&&HJ(e)&&UJ(e,t)&&(!e.parentElement||xv(e.parentElement,e))}var zJ;var DO=N(()=>{pr();zJ=typeof Element<"u"&&"checkVisibility"in Element.prototype});function $v(e,t){return e.matches(FJ)&&!PO(e)&&(t?.skipVisibilityCheck||xv(e))}function Sv(e){return e.matches(VJ)&&xv(e)&&!PO(e)}function PO(e){let t=e;while(t!=null){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var lE,FJ,VJ;var Cv=N(()=>{DO();lE=["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"],FJ=lE.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";lE.push('[tabindex]:not([tabindex="-1"]):not([disabled])');VJ=lE.join(':not([hidden]):not([tabindex="-1"]),')});function eg(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ev(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Tv(e){let t=wv.useRef({isFocused:!1,observer:null});return nt(()=>{let r=t.current;return()=>{if(r.observer)r.observer.disconnect(),r.observer=null}},[]),wv.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=eg(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 LO(e){while(e&&!$v(e,{skipVisibilityCheck:!0}))e=e.parentElement;let t=hn(e),r=t.document.activeElement;if(!r||r===e)return;Zm=!0;let a=!1,i=(g)=>{if(Te(g)===r||a)g.stopImmediatePropagation()},l=(g)=>{if(Te(g)===r||a){if(g.stopImmediatePropagation(),!e&&!a)a=!0,Gr(r),f()}},c=(g)=>{if(Te(g)===e||a)g.stopImmediatePropagation()},u=(g)=>{if(Te(g)===e||a){if(g.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),Zm=!1,a=!1},h=requestAnimationFrame(f);return f}var wv,Zm=!1;var tg=N(()=>{qu();dn();pr();Cv();dr();wv=j(ae(),1)});function Rv(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 cE(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,jJ,uE,Ga,_O,IO,dE,ng,BO;var pa=N(()=>{qa=Is(function(){return cE(/^Mac/i)}),jJ=Is(function(){return cE(/^iPhone/i)}),uE=Is(function(){return cE(/^iPad/i)||qa()&&navigator.maxTouchPoints>1}),Ga=Is(function(){return jJ()||uE()}),_O=Is(function(){return qa()||Ga()}),IO=Is(function(){return Rv(/AppleWebKit/i)&&!dE()}),dE=Is(function(){return Rv(/Chrome/i)}),ng=Is(function(){return Rv(/Android/i)}),BO=Is(function(){return Rv(/Firefox/i)})});function kv(e){if(e.pointerType===""&&e.isTrusted)return!0;if(ng()&&e.pointerType)return e.type==="click"&&e.buttons===1;return e.detail===0&&!e.pointerType}function zO(e){return!ng()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var fE=N(()=>{pa()});function Gu(){return tp.useContext(KJ)}function qJ(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(BO()&&window.event?.type?.startsWith("key")&&e.target==="_blank")if(qa())a=!0;else i=!0;let u=IO()&&qa()&&!uE()?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 GJ(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 WJ(e,t){GJ(e,(r)=>ha(r,t))}function np(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 HO(e,t,r,a){if(!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&qJ(e.currentTarget,e)&&r)e.preventDefault(),t.open(e.currentTarget,e,r,a)}var tp,KJ;var fc=N(()=>{qu();pa();tp=j(ae(),1),KJ=tp.createContext({isNative:!0,open:WJ,useHref:(e)=>e});ha.isOpening=!1});function Mv(e,t){for(let r of pE)r(e,t)}function JJ(e){return!(e.metaKey||!qa()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Av(e){if(Wu=!0,!ha.isOpening&&JJ(e))Yu="keyboard",og="keyboard",Mv("keyboard",e)}function rp(e){if(Yu="pointer",og="pointerType"in e?e.pointerType:"mouse",e.type==="mousedown"||e.type==="pointerdown")Wu=!0,Mv("pointer",e)}function UO(e){if(!ha.isOpening&&kv(e))Wu=!0,Yu="virtual",og="virtual"}function FO(e){let t=hn(Te(e)),r=rt(Te(e));if(Te(e)===t||Te(e)===r||Zm||!e.isTrusted)return;if(!Wu&&!hE)Yu="virtual",og="virtual",Mv("virtual",e);Wu=!1,hE=!1}function VO(){if(Zm)return;Wu=!1,hE=!0}function mE(e){if(typeof window>"u"||typeof document>"u")return;let t=hn(e),r=rt(e);if(rg.get(t))return;let a=t.HTMLElement.prototype.focus;if(t.HTMLElement.prototype.focus=function(){Wu=!0,a.apply(this,arguments)},r.addEventListener("keydown",Av,!0),r.addEventListener("keyup",Av,!0),r.addEventListener("click",UO,!0),t.addEventListener("focus",FO,!0),t.addEventListener("blur",VO,!1),typeof PointerEvent<"u")r.addEventListener("pointerdown",rp,!0),r.addEventListener("pointermove",rp,!0),r.addEventListener("pointerup",rp,!0);t.addEventListener("beforeunload",()=>{jO(e)},{once:!0}),rg.set(t,{focus:a})}function XJ(e){let t=rt(e),r;if(t.readyState!=="loading")mE(e);else r=()=>{mE(e)},t.addEventListener("DOMContentLoaded",r);return()=>jO(e,r)}function Vi(){return Yu!=="pointer"}function Ju(){return Yu}function ag(e){Yu=e,og=e==="pointer"?"mouse":e,Mv(e,null)}function ZJ(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,g=wt(i);return e=e||g instanceof c&&!QJ.has(g.type)||g instanceof u||g instanceof f&&g.isContentEditable,!(e&&t==="keyboard"&&r instanceof h&&!YJ[r.key])}function KO(e,t,r){mE(),gE.useEffect(()=>{if(r?.enabled===!1)return;let a=(i,l)=>{if(!ZJ(!!r?.isTextInput,i,l))return;e(Vi())};return pE.add(a),()=>{pE.delete(a)}},t)}var gE,Yu=null,og="keyboard",pE,rg,Wu=!1,hE=!1,YJ,jO=(e,t)=>{let r=hn(e),a=rt(e);if(t)a.removeEventListener("DOMContentLoaded",t);if(!rg.has(r))return;if(r.HTMLElement.prototype.focus=rg.get(r).focus,a.removeEventListener("keydown",Av,!0),a.removeEventListener("keyup",Av,!0),a.removeEventListener("click",UO,!0),r.removeEventListener("focus",FO,!0),r.removeEventListener("blur",VO,!1),typeof PointerEvent<"u")a.removeEventListener("pointerdown",rp,!0),a.removeEventListener("pointermove",rp,!0),a.removeEventListener("pointerup",rp,!0);rg.delete(r)},QJ;var pc=N(()=>{dn();pr();tg();pa();fE();fc();gE=j(ae(),1),pE=new Set,rg=new Map,YJ={Tab:!0,Escape:!0};if(typeof document<"u")XJ();QJ=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&&!eX.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var eX;var ig=N(()=>{pa();eX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function hr(e){let t=op.useRef(null);return tX(()=>{t.current=e},[e]),op.useCallback((...r)=>{let a=t.current;return a?.(...r)},[])}var op,tX;var Qu=N(()=>{dr();op=j(ae(),1),tX=op.default.useInsertionEffect??nt});function Zu(e,t,r,a){let i=hr(r),l=r==null;qO.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 qO;var bE=N(()=>{Qu();qO=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 sg=N(()=>{Ho()});function GO(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 nX.has(r.script)}let t=e.split("-")[0];return rX.has(t)}var nX,rX;var WO=N(()=>{nX=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),rX=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"])});function XO(){let e=typeof window<"u"&&window[JO]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:GO(e)?"rtl":"ltr"}}function YO(){yE=XO();for(let e of lg)e(yE)}function QO(){let e=jr(),[t,r]=Nv.useState(yE);if(Nv.useEffect(()=>{if(lg.size===0)window.addEventListener("languagechange",YO);return lg.add(r),()=>{if(lg.delete(r),lg.size===0)window.removeEventListener("languagechange",YO)}},[]),e)return{locale:typeof window<"u"&&window[JO]||"en-US",direction:"ltr"};return t}var Nv,JO,yE,lg;var ZO=N(()=>{WO();uc();Nv=j(ae(),1),JO=Symbol.for("react-aria.i18n.locale");yE=XO(),lg=new Set});function ap(){let e=QO();return Ov.useContext(oX)||e}var Ov,oX;var Dv=N(()=>{ZO();Ov=j(ae(),1),oX=Ov.default.createContext(null)});class ip{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=sX(e,this.strings,this.defaultLocale),this.strings[e]=t;return t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[aX];if(Pv===void 0){let a=window[iX];if(!a)return null;Pv={};for(let i in a)Pv[i]=new ip({[t]:a[i]},t)}let r=Pv?.[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 sX(e,t,r="en-US"){if(t[e])return t[e];let a=lX(e);if(t[a])return t[a];for(let i in t)if(i.startsWith(a+"-"))return t[i];return t[r]}function lX(e){if(Intl.Locale)return new Intl.Locale(e).language;return e.split("-")[0]}var aX,iX,Pv=void 0;var eD=N(()=>{aX=Symbol.for("react-aria.i18n.locale"),iX=Symbol.for("react-aria.i18n.strings")});class Lv{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=tD.get(i);if(!l)l=new Intl.PluralRules(this.locale,{type:r}),tD.set(i,l);let c=l.select(e);return a=t[c]||t.other,typeof a==="function"?a():a}number(e){let t=nD.get(this.locale);if(!t)t=new Intl.NumberFormat(this.locale),nD.set(this.locale,t);return t.format(e)}select(e,t){let r=e[t]||e.other;return typeof r==="function"?r():r}}var tD,nD;var rD=N(()=>{tD=new Map,nD=new Map});var oD=N(()=>{eD();rD()});function cX(e){let t=aD.get(e);if(!t)t=new ip(e),aD.set(e,t);return t}function uX(e,t){return t&&ip.getGlobalDictionaryForPackage(t)||cX(e)}function sD(e,t){let{locale:r}=ap(),a=uX(e,t);return iD.useMemo(()=>new Lv(r,a),[r,a])}var iD,aD;var lD=N(()=>{Dv();oD();iD=j(ae(),1),aD=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;dX(()=>{l.current=f});let[,h]=co.useReducer(()=>({}),{}),g=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,g]}var co,dX;var _v=N(()=>{co=j(ae(),1),dX=typeof document<"u"?co.default.useInsertionEffect??co.default.useLayoutEffect:()=>{}});var Iv,cD;var uD=N(()=>{Iv=j(ae(),1),cD=Iv.createContext(null)});function Wa(e){let t=(r,a)=>{if(td.useContext(fX))return null;return e(r,a)};return t.displayName=e.displayName||e.name,td.forwardRef(t)}var td,fX;var dD=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)}});fX=td.createContext(!1)});var sp=N(()=>{dD()});var Bv,zv,gc;var vE=N(()=>{qr();sp();Bv=j(ae(),1),zv=Bv.createContext({}),gc=Wa(function(t,r){[t,r]=on(t,r,zv);let{elementType:a="label",...i}=t,l=Ot[a];return Bv.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)&&(pX.has(f)||r&&hX.has(f)||a&&mX.has(f)||i&&gX.has(f)||l&&(fD.has(f)||f.endsWith("Capture")&&fD.has(f.slice(0,-7)))||c?.has(f)||bX.test(f)))u[f]=e[f];return u}var pX,hX,mX,gX,fD,bX;var Bs=N(()=>{pX=new Set(["id"]),hX=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mX=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gX=new Set(["dir","lang","hidden","inert","translate"]),fD=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"]),bX=/^(data-.*)$/});function pD(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 hD=N(()=>{Ho();sg()});var Ya=N(()=>{Bs()});var Hv,mD;var gD=N(()=>{Hv=j(ae(),1),mD=Hv.createContext(null)});function Uv(e,t="assertive",r=7000){if(!lp)if(lp=new bD,!(typeof IS_REACT_ACT_ENVIRONMENT==="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"))setTimeout(()=>{if(lp?.isAttached())lp?.announce(e,t,r)},100);else lp.announce(e,t,r);else lp.announce(e,t,r)}class bD{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 lp=null;var yD=()=>{};var vD=N(()=>{yD()});function xD(){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 xE)c();xE.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",r)}function yX(){for(let[e]of bc)if("isConnected"in e&&!e.isConnected)bc.delete(e)}function Fv(e){requestAnimationFrame(()=>{if(yX(),bc.size===0)e();else xE.add(e)})}var bc,xE;var $E=N(()=>{dn();bc=new Map,xE=new Set;if(typeof document<"u")if(document.readyState!=="loading")xD();else document.addEventListener("DOMContentLoaded",xD)});function ma(e){if(!e.isConnected)return;let t=rt(e);if(Ju()==="virtual"){let r=wt(t);Fv(()=>{let a=wt(t);if((a===r||a===t.body)&&e.isConnected)Gr(e)})}else Gr(e)}var cp=N(()=>{qu();dn();pc();pr();$E()});function nd(e){let{isDisabled:t,onFocus:r,onBlur:a,onFocusChange:i}=e,l=SE.useCallback((f)=>{if(Te(f)===f.currentTarget){if(a)a(f);if(i)i(!1);return!0}},[a,i]),c=Tv(l),u=SE.useCallback((f)=>{let h=Te(f),g=rt(h),b=g?wt(g):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 SE;var Vv=N(()=>{dn();pr();tg();SE=j(ae(),1)});function CE(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 $D=()=>{};function rd(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:CE(e.onKeyDown),onKeyUp:CE(e.onKeyUp)}}}var jv=N(()=>{$D()});function Kv(e,t){nt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{if(e.ref)e.ref.current=null}})}var wE=N(()=>{dr()});function vX(e){let t=zs.useContext(qv)||{};Kv(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=vX(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,qv;var up=N(()=>{cp();fr();Vv();jv();wE();zs=j(ae(),1),qv=zs.default.createContext(null)});function SD(e){if(Ga()){if(dp==="default"){let t=rt(e);EE=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}dp="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Gv.set(e,e.style[t]),e.style[t]="none"}}function TE(e){if(Ga()){if(dp!=="disabled")return;dp="restoring",setTimeout(()=>{Fv(()=>{if(dp==="restoring"){let t=rt(e);if(t.documentElement.style.webkitUserSelect==="none")t.documentElement.style.webkitUserSelect=EE||"";EE="",dp="default"}})},300)}else if(e instanceof HTMLElement||e instanceof SVGElement){if(e&&Gv.has(e)){let t=Gv.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");Gv.delete(e)}}}var dp="default",EE="",Gv;var CD=N(()=>{pr();pa();$E();Gv=new WeakMap});function wD(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}function Wv(e){let t=e??(typeof document<"u"?document:void 0);if(!t)return wD(t);if(RE.has(t))return RE.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),a=r&&r instanceof hn(r).HTMLMetaElement&&(r.nonce||r.content)||wD(t)||void 0;if(a!==void 0)RE.set(t,a);return a}var RE;var kE=N(()=>{pr();RE=new WeakMap});var ED,cg;var AE=N(()=>{ED=j(ae(),1),cg=ED.default.createContext({register:()=>{}});cg.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 ug=N(()=>{vc=j(ae(),1)});function $X(e){let t=Un.useContext(cg);if(t){let{register:r,ref:a,...i}=t;e=Le(i,e),r()}return Kv(t,e.ref),e}class dg{#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:g,allowTextSelectionOnPress:b,ref:y,...v}=$X(e),[S,w]=Un.useState(!1),E=Un.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:R,removeAllGlobalListeners:D}=xc(),H=Un.useCallback((_,W)=>{let Y=E.current;if(u||Y.didFirePressStart)return!1;let Z=!0;if(Y.isTriggeringEvent=!0,a){let pe=new dg("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=Un.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 dg("pressend",W,_);i(V),pe=V.shouldStopPropagation}if(r)r(!1);if(w(!1),t&&Y&&!u){let V=new dg("press",W,_);t(V),pe&&=V.shouldStopPropagation}return Z.isTriggeringEvent=!1,pe},[u,i,r,t]),G=hr(z),ee=Un.useCallback((_,W)=>{let Y=E.current;if(u)return!1;if(l){Y.isTriggeringEvent=!0;let Z=new dg("pressup",W,_);return l(Z),Y.isTriggeringEvent=!1,Z.shouldStopPropagation}return!0},[u,l]),U=hr(ee),P=Un.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)TE(W.target);for(let Y of W.disposables)Y();W.disposables=[]}},[b,D,z]),re=hr(P);Un.useEffect(()=>{if(u&&E.current.isPressed)re({currentTarget:E.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[u]);let J=Un.useCallback((_)=>{if(g)P(_)},[g,P]),be=Un.useCallback((_)=>{if(u)return;c?.(_)},[u,c]),ce=Un.useCallback((_,W)=>{if(u)return;if(c){let Y=new MouseEvent("click",_);Ev(Y,W),c(eg(Y))}},[u,c]),se=Un.useMemo(()=>{let _=E.current,W={onKeyDown(Z){if(ME(Z.nativeEvent,Z.currentTarget)&&bt(Z.currentTarget,Te(Z))){if(AD(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(ME(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"||kv(Z.nativeEvent))){let V=H(Z,"virtual"),k=U(Z,"virtual"),X=G(Z,"virtual");be(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,be(Z),re(Z)}if(_.ignoreEmulatedMouseEvents=!1,pe)Z.stopPropagation()}}},Y=(Z)=>{if(_.isPressed&&_.target&&ME(Z,_.target)){if(AD(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"&&NE(_.target)&&bt(_.target,pe)&&!Z[TD])Z[TD]=!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(zO(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)SD(_.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=LO(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,be,ce]);return Un.useEffect(()=>{if(!y)return;let _=rt(y.current);if(!_||!_.head||_.getElementById(RD))return;let W=_.createElement("style");W.id=RD;let Y=Wv(_);if(Y)W.nonce=Y;W.textContent=`
|
|
236
|
+
@layer {
|
|
237
|
+
[${kD}] {
|
|
238
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`.trim(),_.head.prepend(W)},[y]),Un.useEffect(()=>{let _=E.current;return()=>{if(!b)TE(_.target??void 0);for(let W of _.disposables)W();_.disposables=[]}},[b]),{isPressed:f||S,pressProps:Le(v,se,{[kD]:!0})}}function NE(e){return e.tagName==="A"&&e.hasAttribute("href")}function ME(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&&!MD(i,r)||i instanceof hn(i).HTMLTextAreaElement||i.isContentEditable)&&!((l==="link"||!l&&NE(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 SX(e){if(e instanceof HTMLInputElement)return!1;if(e instanceof HTMLButtonElement)return e.type!=="submit"&&e.type!=="reset";if(NE(e))return!1;return!0}function AD(e,t){if(e instanceof HTMLInputElement)return!MD(e,t);return SX(e)}function MD(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":CX.has(e.type)}var xX,Un,TD,RD="react-aria-pressable-style",kD="data-react-aria-pressable",CX;var fg=N(()=>{Qf();tg();CD();qu();dn();kE();pr();pa();fE();fr();fc();AE();Qu();ug();wE();xX=j(Vr(),1),Un=j(ae(),1);TD=Symbol("linkClicked");CX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"])});function OE(e,t){let{elementType:r="button",isDisabled:a,onPress:i,onPressStart:l,onPressEnd:c,onPressUp:u,onPressChange:f,preventFocusOnPress:h,allowFocusWhenDisabled:g,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(g)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 ND=N(()=>{Bs();fr();up();fg()});var OD=N(()=>{ND()});function fp(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:a,onFocusWithinChange:i}=e,l=pg.useRef({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:u}=xc(),f=pg.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=Tv(f),g=pg.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});Ev(D,w);let H=eg(D);f(H)}},{capture:!0})}},[a,i,h,c,f]);if(t)return{focusWithinProps:{onFocus:void 0,onBlur:void 0}};return{focusWithinProps:{onFocus:g,onBlur:f}}}var pg;var Yv=N(()=>{tg();dn();pr();ug();pg=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),[]),g=Sc.useCallback((v)=>{i.current.isFocused=v,i.current.isFocusVisible=Vi(),c(v),h()},[h]);KO((v)=>{i.current.isFocusVisible=v,h()},[r,l],{enabled:l,isTextInput:r});let{focusProps:b}=nd({isDisabled:a,onFocusChange:g}),{focusWithinProps:y}=fp({isDisabled:!a,onFocusWithinChange:g});return{isFocused:l,isFocusVisible:u,focusProps:a?y:b}}var Sc;var DD=N(()=>{pc();Vv();Yv();Sc=j(ae(),1)});var pp=N(()=>{DD()});function wX(){DE=!0,setTimeout(()=>{DE=!1},500)}function PD(e){if(e.pointerType==="touch")wX()}function EX(){let e=rt(null);if(typeof e>"u")return;if(Jv===0){if(typeof PointerEvent<"u")e.addEventListener("pointerup",PD)}return Jv++,()=>{if(Jv--,Jv>0)return;if(typeof PointerEvent<"u")e.removeEventListener("pointerup",PD)}}function mr(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(EX,[]);let{addGlobalListener:f,removeAllGlobalListeners:h}=xc(),{hoverProps:g,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(DE&&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:g,isHovered:l}}var Hs,DE=!1,Jv=0;var Xv=N(()=>{dn();pr();ug();Hs=j(ae(),1)});var ad=N(()=>{Xv()});var PE=N(()=>{Ho()});function RX(e,t){if(t){for(let r in e)if(r.startsWith("on")&&!TX.test(r))e[r]=void 0;e.href=void 0,e.target=void 0}return e}var Us,id,Fs,TX;var Qv=N(()=>{qr();gD();vD();OD();sp();Ya();fa();pp();ad();PE();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}=OE(t,r);l=RX(l,i);let{focusProps:u,isFocused:f,isFocusVisible:h}=Fo(t),{hoverProps:g,isHovered:b}=mr({...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)Uv(H,"assertive");else if(R.current&&f&&!i)Uv(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,g),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(mD.Provider,{value:{id:w}},v.children))}),TX=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/});var Zv,LD;var _D=N(()=>{Zv=j(ae(),1),LD=Zv.createContext({})});var hp,Cc,ji;var mp=N(()=>{qr();hp=j(ae(),1),Cc=hp.createContext({}),ji=hp.forwardRef(function(t,r){[t,r]=on(t,r,Cc);let{elementType:a="span",...i}=t,l=Ot[a];return hp.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 hg=()=>{};function mg(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 LE=N(()=>{hg()});function ex(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 ID=N(()=>{hg()});function gg(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),g=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(g.scrollPaddingTop)||0,ee=parseFloat(g.scrollPaddingBottom)||0,U=parseFloat(g.scrollPaddingLeft)||0,P=parseFloat(g.scrollPaddingRight)||0,re=parseFloat(g.borderTopWidth)||0,J=parseFloat(g.borderBottomWidth)||0,be=parseFloat(g.borderLeftWidth)||0,ce=parseFloat(g.borderRightWidth)||0,se=u.top-R,_=u.bottom+D,W=u.left-H,Y=u.right+z,Z=e===b?0:be+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:be)+U,ke=E-(y?0:ce)-P;if(g.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 _E(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=ex(e,!0);for(let g of u)gg(g,e);let{left:f,top:h}=e.getBoundingClientRect();if(Math.abs(l-f)>1||Math.abs(c-h)>1){u=r?ex(r,!0):[];for(let g of u)gg(g,r,{block:"center",inline:"center"});for(let g of ex(e,!0))gg(g,e)}}}}var BD=N(()=>{ID();pa()});function HD(e){let[t,r]=zD.useState();return nt(()=>{if(!e)return;let a=IE.get(e);if(!a){let i=`react-aria-description-${kX++}`;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},IE.set(e,a)}else r(a.element.id);return a.refCount++,()=>{if(a&&--a.refCount===0)a.element.remove(),IE.delete(e)}},[e]),{"aria-describedby":e?t:void 0}}var zD,kX=0,IE;var UD=N(()=>{dr();zD=j(ae(),1),IE=new Map});function AX(e={}){let{style:t,isFocusable:r}=e,[a,i]=gp.useState(!1),{focusWithinProps:l}=fp({isDisabled:!r,onFocusWithinChange:(u)=>i(u)}),c=gp.useMemo(()=>{if(a)return t;else if(t)return{...FD,...t};else return FD},[a]);return{visuallyHiddenProps:{...l,style:c}}}function VD(e){let{children:t,elementType:r="div",isFocusable:a,style:i,...l}=e,{visuallyHiddenProps:c}=AX(e);return gp.default.createElement(r,Le(l,c),t)}var gp,FD;var jD=N(()=>{fr();Yv();gp=j(ae(),1),FD={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,bg,sd,MX;var BE=N(()=>{qr();mp();Ya();Ja=j(ae(),1),bg=Ja.createContext(null),sd=Ja.forwardRef(function(t,r){if(!Ja.useContext(bg)?.isInvalid)return null;return Ja.default.createElement(MX,{...t,ref:r})}),MX=Ja.forwardRef((e,t)=>{let r=Ja.useContext(bg),{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 VE(e){if(e[HE]){let{realtimeValidation:t,displayValidation:r,updateValidation:a,resetValidation:i,commitValidation:l}=e[HE];return{realtimeValidation:t,displayValidation:r,updateValidation:a,resetValidation:i,commitValidation:l}}return NX(e)}function NX(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:qD}:null,h=or.useMemo(()=>{if(!c||i==null)return null;let J=OX(c,i);return KD(J)},[c,i]);if(l?.validationDetails.valid)l=void 0;let g=or.useContext(GD),b=or.useMemo(()=>{if(a)return Array.isArray(a)?a.flatMap((J)=>UE(g[J])):UE(g[a]);return[]},[g,a]),[y,v]=or.useState(g),[S,w]=or.useState(!1);if(g!==y)v(g),w(!1);let E=or.useMemo(()=>KD(S?[]:b),[S,b]),R=or.useRef(bp),[D,H]=or.useState(bp),z=or.useRef(bp),G=()=>{if(!ee)return;U(!1);let J=h||l||R.current;if(!zE(J,z.current))z.current=J,H(J)},[ee,U]=or.useState(!1);return or.useEffect(G),{realtimeValidation:f||E||h||l||bp,displayValidation:u==="native"?f||E||D:f||E||h||l||D,updateValidation(J){if(u==="aria"&&!zE(D,J))H(J);else R.current=J},resetValidation(){let J=bp;if(!zE(J,z.current))z.current=J,H(J);if(u==="native")U(!1);w(!0)},commitValidation(){if(u==="native")U(!0);w(!0)}}}function UE(e){if(!e)return[];return Array.isArray(e)?e:[e]}function OX(e,t){if(typeof e==="function"){let r=e(t);if(r&&typeof r!=="boolean")return UE(r)}return[]}function KD(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:qD}:null}function zE(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 or,FE,qD,bp,GD,HE="__reactAriaFormValidationState";var WD=N(()=>{or=j(ae(),1),FE={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},qD={...FE,customError:!0,valid:!1},bp={isInvalid:!1,validationDetails:FE,validationErrors:[]},GD=or.createContext({})});var YD=N(()=>{WD()});var tx,JD;var XD=N(()=>{tx=j(ae(),1),JD=tx.createContext(null)});function QD(e){let{description:t,errorMessage:r,isInvalid:a,validationState:i}=e,{labelProps:l,fieldProps:c}=pD(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 ZD=N(()=>{hD();fr();Ho()});function tP(e,t,r){let a=hr((i)=>{if(r&&!i.defaultPrevented)r(t)});eP.useEffect(()=>{let i=e?.current?.form;return i?.addEventListener("reset",a),()=>{i?.removeEventListener("reset",a)}},[e])}var eP;var nP=N(()=>{Qu();eP=j(ae(),1)});function rP(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(PX(r.current))}});let l=nx.useRef(!1),c=hr(()=>{if(!l.current)t.resetValidation()}),u=hr((h)=>{if(!t.displayValidation.isInvalid)t.commitValidation();let g=r?.current?.form;if(!h.defaultPrevented&&r&&g&&LX(g)===r.current){if(i)i();else r.current?.focus();ag("keyboard")}h.preventDefault()}),f=hr(()=>{t.commitValidation()});nx.useEffect(()=>{let h=r?.current;if(!h)return;let g=h.form,b=g?.reset;if(g)g.reset=()=>{l.current=!window.event||window.event.type==="message"&&Te(window.event)instanceof MessagePort,b?.call(g),l.current=!1};return h.addEventListener("invalid",u),h.addEventListener("change",f),g?.addEventListener("reset",c),()=>{if(h.removeEventListener("invalid",u),h.removeEventListener("change",f),g?.removeEventListener("reset",c),g)g.reset=b}},[r,a])}function DX(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 PX(e){return{isInvalid:!e.validity.valid,validationDetails:DX(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function LX(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 nx;var oP=N(()=>{dn();pc();Qu();dr();nx=j(ae(),1)});var rx,aP;var iP=N(()=>{rx=j(ae(),1),aP=rx.createContext({})});var ox,ax,_X=(e)=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,...i}=e;return i},ld;var jE=N(()=>{qr();sp();fa();pp();ad();ox=j(ae(),1),ax=ox.createContext({}),ld=Wa(function(t,r){[t,r]=on(t,r,ax);let{hoverProps:a,isHovered:i}=mr({...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 ox.default.createElement(Ot.input,{...Le(_X(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 lP(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 ix,sP,sx,yp,lx,KE;var qE=N(()=>{ix=class ix extends Vo{filter(e,t,r){let[a,i]=lP(e,t,this.firstChildKey,r),l=this.clone();return l.firstChildKey=a,l.lastChildKey=i,l}};sP=class sP extends Vo{static{this.type="header"}};sx=class sx extends Vo{static{this.type="loader"}};yp=class yp extends ix{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}};lx=class lx extends ix{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}};KE=class KE{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]=lP(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 yg(e){let{children:t,items:r,idScope:a,addIdAndValue:i,dependencies:l=[]}=e,c=vp.useMemo(()=>typeof t==="function"?t.toString():void 0,[t]),u=vp.useMemo(()=>new WeakMap,[...l,c]);return vp.useMemo(()=>{if(r&&typeof t==="function"){let f=[];for(let h of r){let g=IX(h)?h:null,b=g?u.get(g):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=vp.cloneElement(b,i?{key:v,id:y,value:h}:{key:v}),g)u.set(g,b)}f.push(b)}return f}else if(typeof t!=="function")return t},[t,r,u,a,i])}function IX(e){switch(typeof e){case"object":return e!=null;case"function":case"symbol":return!0;default:return!1}}var vp;var GE=N(()=>{vp=j(ae(),1)});var xp=Bi(function(BX){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(!g){var w=v();i(S,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!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,g=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;BX.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 zX(e,t,r){let a=jr(),i=At.useRef(a);i.current=a;let l=At.useCallback(()=>i.current?r():t(),[t,r]);return dP.useSyncExternalStore(e,l)}function HX(e){return class extends Vo{static{this.type=e}}}function UX(e,t,r,a,i,l){if(typeof e==="string")e=HX(e);let c=At.useCallback((f)=>{f?.setProps(t,r,e,a,l)},[t,r,a,l,e]),u=At.useContext(YE);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(YE.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(qv);if(!At.useContext(fP)){if(t.length>=3)throw Error(t.name+" cannot be rendered outside a collection.");return t(i,l)}return UX(e,i,l,"children"in i?i.children:null,null,(f)=>At.default.createElement(qv.Provider,{value:c},At.default.createElement(r,{node:f})))});return a.displayName=t.name,a}function FX(e){return yg({...e,addIdAndValue:!0})}function JE(e){let t=At.useContext(cP),r=(t?.dependencies||[]).concat(e.dependencies),a=e.idScope??t?.idScope,i=FX({...e,idScope:a,dependencies:r});if(At.useContext(WE))i=At.default.createElement(VX,null,i);return t=At.useMemo(()=>({dependencies:r,idScope:a}),[a,...r]),At.default.createElement(cP.Provider,{value:t},i)}function VX({children:e}){let t=At.useContext(WE),r=At.useMemo(()=>At.default.createElement(WE.Provider,{value:null},At.default.createElement(fP.Provider,{value:!0},e)),[e]);return jr()?At.default.createElement(YE.Provider,{value:t},r):uP.createPortal(r,t)}var uP,At,dP,fP,WE,Eme,YE,cP;var XE=N(()=>{qE();GE();up();uc();uP=j(Vr(),1),At=j(ae(),1),dP=j(xp(),1),fP=At.createContext(!1),WE=At.createContext(null);Eme=typeof At.default.useSyncExternalStore==="function"?At.default.useSyncExternalStore:zX,YE=At.createContext(null);cP=At.createContext(null)});var vg=N(()=>{XE()});var hP=N(()=>{GE()});function mP(e,t,r){return yg({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,jX(e,a,r))}})}function jX(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 eT(e){return uo.useMemo(()=>e!=null?new Set([e]):null,[e])}var uo,ZE,xg;var tT=N(()=>{hP();uo=j(ae(),1),ZE={CollectionRoot({collection:e,renderDropIndicator:t}){return mP(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:r}){return mP(e,t,r)}};xg=uo.createContext(ZE)});var cd,gP;var bP=N(()=>{cd=j(ae(),1),gP=cd.createContext({})});var $g=N(()=>{qE()});function yP(e){let t=Vs.useRef({});return Vs.default.createElement(qX.Provider,{value:t},e.children)}var KX,Vs,qX;var vP=N(()=>{KX=j(Vr(),1),Vs=j(ae(),1),qX=Vs.createContext(null)});var cx,$p;var ux=N(()=>{cx=j(ae(),1),$p=cx.createContext({isSelected:!1})});function nT(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 xP=N(()=>{Bs()});var $P=N(()=>{xP()});var dx,SP,CP,rT;var wP=N(()=>{qr();$P();$g();vg();Ya();fa();dx=j(ae(),1),SP=dx.createContext({});CP=class CP 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}};rT=qi(CP,function(t,r){[t,r]=on(t,r,SP);let{elementType:a,orientation:i,style:l,className:c,slot:u,...f}=t,h=a||"hr";if(h==="hr"&&i==="vertical")h="div";let g=Ot[h],{separatorProps:b}=nT({...f,elementType:a,orientation:i}),y=ht(t,{global:!0});return dx.default.createElement(g,{render:t.render,...Le(y,b),style:l,className:c??"react-aria-Separator",ref:r,slot:u||void 0})})});function GX(e){if(typeof e==="string")return e.replace(/\s*/g,"");return""+e}function EP(e,t){let r=oT.get(e);if(!r)throw Error("Unknown list");return`${r.id}-option-${GX(t)}`}var oT;var TP=N(()=>{oT=new WeakMap});class RP{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 fx(e,t,r,a){if(Uo())return new RP(e,t,r,a);return e.createTreeWalker(t,r,a)}var aT=N(()=>{dn();bv()});function NP(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(kP)||{},h=xn.useMemo(()=>new hx({scopeRef:u}),[u]);nt(()=>{let y=f||Fn.root;if(Fn.getTreeNode(y.scopeRef)&&Zt&&!px(Zt,y.scopeRef)){let v=Fn.getTreeNode(Zt);if(v)y=v}y.addChild(h),Fn.addNode(h)},[h,f]),nt(()=>{let y=Fn.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(iT,S),y=y.nextSibling;return u.current=v,()=>{for(let w of v)w.removeEventListener(iT,S)}},[t]),ZX(u,a,r),XX(u,r),eQ(u,a,r),QX(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 Fn.traverse())if(S.scopeRef&&ba(y,S.scopeRef.current))v=S;if(v===Fn.getTreeNode(u))Zt=v.scopeRef}},[u]),nt(()=>()=>{let y=Fn.getTreeNode(u)?.parent?.scopeRef??null;if((u===Zt||px(u,Zt))&&(!y||Fn.getTreeNode(y)))Zt=y;Fn.removeTreeNode(u)},[u]);let g=xn.useMemo(()=>WX(u),[]),b=xn.useMemo(()=>({focusManager:g,parentNode:h}),[h,g]);return xn.default.createElement(kP.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 WX(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),g=ga(h,{tabbable:i,accept:c},r);g.currentNode=ba(u,r)?u:f;let b=g.nextNode();if(!b&&l)g.currentNode=f,b=g.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),g=ga(h,{tabbable:i,accept:c},r);g.currentNode=ba(u,r)?u:f;let b=g.previousNode();if(!b&&l)g.currentNode=f,b=g.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 Sg(e){let t=Fn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.contain)return!1;t=t.parent}return!0}function YX(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 JX(e){if(e.checked)return!0;let t=YX(e);return t.length>0&&!t.some((r)=>r.checked)}function XX(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||!Sg(e)||h.isComposing)return;let g=wt(l),b=e.current;if(!b||!ba(g,b))return;let y=ud(b),v=ga(y,{tabbable:!0},b);if(!g)return;v.currentNode=g;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||px(Zt,e))&&ba(Te(h),e.current))Zt=e,r.current=Te(h);else if(Sg(e)&&!wc(Te(h),e)){if(r.current)r.current.focus();else if(Zt&&Zt.current)sT(Zt.current)}else if(Sg(e))r.current=Te(h)},f=(h)=>{if(a.current)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{let g=Ju(),b=(g==="virtual"||g===null)&&ng()&&dE(),y=wt(l);if(!b&&y&&Sg(e)&&!wc(y,e)){Zt=e;let v=Te(h);if(v&&v.isConnected)r.current=v,r.current?.focus();else if(Zt.current)sT(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 OP(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 Fn.traverse(Fn.getTreeNode(t)))if(r&&ba(e,r.current))return!0;return!1}function DP(e){return wc(e,Zt)}function px(e,t){let r=Fn.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 PP(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 sT(e,t=!0){js(PP(e,t))}function QX(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)sT(e.current)}r.current=!1},[e])}function ZX(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(!OP(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 AP(e){let t=Fn.getTreeNode(Zt);while(t&&t.scopeRef!==e){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function eQ(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||px(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||!Sg(e)||c.isComposing)return;let u=i.activeElement;if(!wc(u,e)||!AP(e))return;let f=Fn.getTreeNode(e);if(!f)return;let h=f.nodeToRestore,g=ga(i.body,{tabbable:!0});g.currentNode=u;let b=c.shiftKey?g.previousNode():g.nextNode();if(!h||!h.isConnected||h===i.body)h=void 0,f.nodeToRestore=void 0;if((!b||!wc(b,e))&&h){g.currentNode=h;do b=c.shiftKey?g.previousNode():g.nextNode();while(wc(b,e));if(c.preventDefault(),c.stopPropagation(),b)js(b,!0);else if(!OP(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=Fn.getTreeNode(e);if(!l)return;return l.nodeToRestore=a.current??void 0,()=>{let c=Fn.getTreeNode(e);if(!c)return;let u=c.nodeToRestore,f=wt(i);if(t&&u&&(f&&wc(f,e)||f===i.body&&AP(e))){let h=Fn.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=h.getTreeNode(e);while(g){if(g.nodeToRestore&&g.nodeToRestore.isConnected){MP(g.nodeToRestore);return}g=g.parent}g=h.getTreeNode(e);while(g){if(g.scopeRef&&g.scopeRef.current&&Fn.getTreeNode(g.scopeRef)){let b=PP(g.scopeRef.current,!0);MP(b);return}g=g.parent}}})}}},[e,t])}function MP(e){if(e.dispatchEvent(new CustomEvent(iT,{bubbles:!0,cancelable:!0})))js(e)}function ga(e,t,r){let a=t?.tabbable?Sv:$v,i=e?.nodeType===Node.ELEMENT_NODE?e:null,l=rt(i),c=fx(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(!JX(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 lT{constructor(){this.fastMap=new Map,this.root=new hx({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 hx({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 lT;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class hx{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,kP,iT="react-aria-focus-scope-restore",Zt=null,Fn;var Cg=N(()=>{aT();cp();dn();pc();pr();pa();Cv();dr();xn=j(ae(),1),kP=xn.default.createContext(null);Fn=new lT});function wg(e){return _O()?e.altKey:e.ctrlKey}function mx(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 _P(e){let t=Nn();return LP.set(e,t),t}function IP(e){return LP.get(e)}var LP;var cT=N(()=>{pa();Ho();LP=new WeakMap});function zP(e){let{keyboardDelegate:t,selectionManager:r,onTypeSelect:a}=e,i=BP.useRef({search:"",timeout:void 0}).current,l=(c)=>{let u=nQ(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=""},tQ)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?l:void 0}}}function nQ(e){if(e.length===1||!/^[A-Z]/i.test(e))return e;return""}var BP,tQ=1000;var HP=N(()=>{dn();BP=j(ae(),1)});function dT(e,t){let r=uT.useRef(!0),a=uT.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 uT;var UP=N(()=>{dr();uT=j(ae(),1)});function VP(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:g=!1,shouldUseVirtualFocus:b,allowsTabNavigation:y=!1,scrollRef:v=a,linkBehavior:S="action"}=e,{direction:w}=ap(),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&&!wg(_)){FP.flushSync(()=>{t.setFocusedKey(Y,Z)});let pe=mx(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&&!wg(_))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&&(!Qm(Z)||V&&!Sv(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=mx(a,t.focusedKey);if(W instanceof HTMLElement){if(!Qm(W)&&!b)Gr(W);if(Ju()==="keyboard")_E(W,{containingElement:a.current})}}},z=(_)=>{if(!bt(_.currentTarget,_.relatedTarget))t.setFocused(!1)},G=Xa.useRef(!1);Zu(a,AO,!b?void 0:(_)=>{let{detail:W}=_;if(_.stopPropagation(),t.setFocused(!0),W?.focusStrategy==="first")G.current=!0}),dT(()=>{if(G.current){let _=r.getFirstKey?.()??null;if(_==null){let W=wt();if(yv(a.current),iE(W,null),t.collection.size>0)G.current=!1}else t.setFocusedKey(_),G.current=!1}},[t.collection]),dT(()=>{if(t.collection.size>0)G.current=!1},[t.focusedKey]),Zu(a,kO,!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=mx(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(gg(v.current,W),_!=="virtual")_E(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:be}=zP({keyboardDelegate:r,selectionManager:t});if(!g)J=Le(be,J);let ce=void 0;if(!b)ce=t.focusedKey==null?0:-1;let se=_P(t.collection);return{collectionProps:Le(J,{tabIndex:ce,"data-collection":se})}}var FP,Xa;var jP=N(()=>{MO();sE();cp();qu();dn();Cg();pc();cT();ig();Cv();fr();BD();bE();Dv();fc();HP();UP();FP=j(Vr(),1),Xa=j(ae(),1)});function qP(e){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:a,onLongPress:i,threshold:l=rQ,accessibilityDescription:c}=e,u=KP.useRef(void 0),{addGlobalListener:f,removeGlobalListener:h}=xc(),{pressProps:g}=$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=HD(i&&!t?c:void 0);return{longPressProps:Le(g,b)}}var KP,rQ=500;var GP=N(()=>{qu();pr();fr();UD();ug();fg();KP=j(ae(),1)});function Sp(e){let{id:t,selectionManager:r,key:a,ref:i,shouldSelectOnPressUp:l,shouldUseVirtualFocus:c,focus:u,isDisabled:f,onAction:h,allowsDifferentPressOrigin:g,linkBehavior:b="action"}=e,y=Gu();t=Nn(t);let v=(k)=>{if(k.pointerType==="keyboard"&&wg(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 yv(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),be=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,be.href,be.routerOptions)},se={ref:i};if(l)if(se.onPressStart=(k)=>{if(U.current=k.pointerType,re.current=P,k.pointerType==="keyboard"&&(!ee||YP(k.key)))v(k)},!g)se.onPress=(k)=>{if(z||G&&k.pointerType!=="mouse"){if(k.pointerType==="keyboard"&&!WP(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||YP(k.key))))v(k)},se.onPress=(k)=>{if(k.pointerType==="touch"||k.pointerType==="pen"||k.pointerType==="virtual"||k.pointerType==="keyboard"&&ee&&WP(k.key)||k.pointerType==="mouse"&&J.current){if(ee)ce(k);else if(D)v(k)}};if(S["data-collection"]=IP(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(be){for(let k of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])if(be[k])se[k]=Ka(se[k],be[k])}let{pressProps:_,isPressed:W}=$c(se),Y=G?(k)=>{if(U.current==="mouse")k.stopPropagation(),k.preventDefault(),ce(k)}:void 0,{longPressProps:Z}=qP({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 WP(e){return e==="Enter"}function YP(e){return e===" "}var dd;var gx=N(()=>{Qf();cp();dn();cT();ig();fr();sE();fc();fg();Ho();GP();dd=j(ae(),1)});function JP(e,t){if(typeof t.getChildren==="function")return t.getChildren(e.key);return e.childNodes}var XP=()=>{};function Eg(e){let t=QP.get(e);if(t!=null)return t;let r=0,a=(i)=>{for(let l of i)if(l.type==="section")a(JP(l,e));else if(l.type==="item")r++};return a(e),QP.set(e,r),r}var QP;var ZP=N(()=>{XP();QP=new WeakMap});var fT=N(()=>{ZP()});function pT(e,t,r){let{key:a}=e,i=oT.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,g=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(g){let re=Number(S?.index);v["aria-posinset"]=Number.isNaN(re)?void 0:re+1,v["aria-setsize"]=Eg(t.collection)}let w=i?.onAction?()=>i?.onAction?.(a):void 0,E=EP(t,a),{itemProps:R,isPressed:D,isFocused:H,hasAction:z,allowsSelection:G}=Sp({selectionManager:t.selectionManager,key:a,ref:r,shouldSelectOnPressUp:u,allowsDifferentPressOrigin:u&&f,isVirtualized:g,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}=mr({isDisabled:l||!f,onHoverStart(){if(!Vi())t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(a)}}),U=ht(S?.props);delete U.id;let P=np(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 e9=N(()=>{Qf();Bs();TP();pc();fr();gx();Xv();fc();Ho();fT()});var t9=N(()=>{e9()});var n9=N(()=>{XE()});function Cp(e){let t=r9.version.split(".");if(parseInt(t[0],10)>=19)return e;return e?"true":void 0}var r9;var o9=N(()=>{r9=j(ae(),1)});var hT=N(()=>{o9()});function mT(e,t){let{collection:r,onLoadMore:a,scrollOffset:i=1}=e,l=a9.useRef(null),c=hr((u)=>{for(let f of u)if(f.isIntersecting&&a)a()});nt(()=>{if(t.current)l.current=new IntersectionObserver(c,{root:mg(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 a9;var i9=N(()=>{LE();Qu();dr();a9=j(ae(),1)});var s9=N(()=>{i9()});var l9=N(()=>{Vv()});var c9=N(()=>{jv()});var mn,gT,Ks,oQ;var u9=N(()=>{qr();bP();ux();mp();t9();vg();Ya();hT();$g();s9();fa();l9();ad();c9();ep();mn=j(ae(),1),gT=mn.createContext(null),Ks=qi(yp,function(t,r,a){let i=lo(r),l=mn.useContext(gT),{dragAndDropHooks:c,dragState:u,dropState:f}=mn.useContext(gP),h=u&&!(u.isDisabled||u.selectionManager.isDisabled(a.key)),{optionProps:g,labelProps:b,descriptionProps:y,...v}=pT({key:a.key,"aria-label":t?.["aria-label"]},l,i),{hoverProps:S,isHovered:w}=mr({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&&g.tabIndex==null)g.tabIndex=-1;return mn.default.createElement(ee,{...Le(U,G,g,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}}],[$p,{isSelected:v.isSelected}]]},G.children))}),oQ=qi(sx,function(t,r,a){let i=mn.useContext(gT),{isLoading:l,onLoadMore:c,scrollOffset:u,...f}=t,h=mn.useRef(null),g=mn.useMemo(()=>({onLoadMore:c,collection:i?.collection,sentinelRef:h,scrollOffset:u}),[c,u,i?.collection]);mT(g,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:Cp(!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 d9(e){return e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer!==void 0}function f9(e,t){let r=hn(e?.[0]),a=t instanceof r.Element?{root:t}:t,i=a?.root??document.body,l=a?.shouldUseInert&&aQ,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},g=new Set;if(Uo())for(let E of e){let R=E;while(R&&R!==i){let D=R.getRootNode();if("shadowRoot"in D)g.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=fx(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=Tg.get(E)??0;if(f(E)&&R===0)return;if(R===0)h(E,!0);u.add(E),Tg.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)&&d9(D))c.add(D);else if(D instanceof Element)b(D)}if(Uo()){for(let D of g)if(!D.isConnected){v.disconnect();break}}}});v.observe(i,{childList:!0,subtree:!0});let S=new Set;if(Uo())for(let E of g){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)&&d9(z))c.add(z);else if(z instanceof Element)b(z)}if(Uo()){for(let z of g)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=Tg.get(E);if(R==null)continue;if(R===1)h(E,!1),Tg.delete(E);else Tg.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 aQ,Tg,ya;var p9=N(()=>{aT();pr();dn();bv();aQ=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;Tg=new WeakMap,ya=[]});function m9(e){let{ref:t,onInteractOutside:r,isDisabled:a,onInteractOutsideStart:i}=e,l=bx.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),c=hr((f)=>{if(r&&h9(f,t)){if(i)i(f);l.current.isPointerDown=!0}}),u=hr((f)=>{if(r)r(f)});bx.useEffect(()=>{let f=l.current;if(a)return;let h=t.current,g=rt(h);if(typeof PointerEvent<"u"){let b=(y)=>{if(f.isPointerDown&&h9(y,t))u(y);f.isPointerDown=!1};return g.addEventListener("pointerdown",c,!0),g.addEventListener("click",b,!0),()=>{g.removeEventListener("pointerdown",c,!0),g.removeEventListener("click",b,!0)}}},[t,a])}function h9(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 bx;var g9=N(()=>{dn();pr();Qu();bx=j(ae(),1)});function b9(e,t){let{onClose:r,shouldCloseOnBlur:a,isOpen:i,isDismissable:l=!1,isKeyboardDismissDisabled:c=!1,shouldCloseOnInteractOutside:u}=e,f=yx.useRef(void 0);yx.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()},g=(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()};m9({ref:t,onInteractOutside:l&&i?b:void 0,onInteractOutsideStart:g});let{focusWithinProps:v}=fp({isDisabled:!a,onBlurWithin:(S)=>{if(!S.relatedTarget||DP(S.relatedTarget))return;if(!u||u(S.relatedTarget))r?.()}});return{overlayProps:{onKeyDown:y,...v},underlayProps:{}}}var yx,Gi;var y9=N(()=>{dn();Cg();Yv();g9();yx=j(ae(),1),Gi=[]});function $9(e={}){let{isDisabled:t}=e;nt(()=>{if(t)return;if(vx++,vx===1)if(Ga())bT=sQ();else bT=iQ();return()=>{if(vx--,vx===0)bT()}},[t])}function iQ(){let e=window.innerWidth-document.documentElement.clientWidth;return Ka(e>0&&("scrollbarGutter"in document.documentElement.style?xx(document.documentElement,"scrollbarGutter","stable"):xx(document.documentElement,"paddingRight",`${e}px`)),xx(document.documentElement,"overflow","hidden"))}function sQ(){let e=xx(document.documentElement,"overflow","hidden"),t,r=!1,a=(g)=>{let b=Te(g);t=Ki(b)?b:mg(b,!0),r=!1;let y=b.ownerDocument.defaultView.getSelection();if(y&&!y.isCollapsed&&y.containsNode(b,!0))r=!0;if(g.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=Wv();if(l)i.nonce=l;i.textContent=`
|
|
242
|
+
@layer {
|
|
243
|
+
* {
|
|
244
|
+
overscroll-behavior: contain;
|
|
245
|
+
}
|
|
246
|
+
}`.trim(),document.head.prepend(i);let c=(g)=>{if(g.touches.length===2||r)return;if(!t||t===document.documentElement||t===document.body){g.preventDefault();return}if(t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth)g.preventDefault()},u=(g)=>{let b=Te(g),y=g.relatedTarget;if(y&&Xu(y))y.focus({preventScroll:!0}),v9(y,Xu(b));else if(!y)b.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},f=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(g){let b=wt(),y=b!=null&&Xu(b);if(f.call(this,{...g,preventScroll:!0}),!g||!g.preventScroll)v9(this,y)};let h=Ka(yT(document,"touchstart",a,{passive:!1,capture:!0}),yT(document,"touchmove",c,{passive:!1,capture:!0}),yT(document,"blur",u,!0));return()=>{e(),h(),i.remove(),HTMLElement.prototype.focus=f}}function xx(e,t,r){let a=e.style[t];return e.style[t]=r,()=>{e.style[t]=a}}function yT(e,t,r,a){return e.addEventListener(t,r,a),()=>{e.removeEventListener(t,r,a)}}function v9(e,t){if(t||!Rg)x9(e);else Rg.addEventListener("resize",()=>x9(e),{once:!0})}function x9(e){let t=document.scrollingElement||document.documentElement,r=e;while(r&&r!==t){let a=mg(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(Rg)c=Math.min(c,Rg.offsetTop+Rg.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 Rg,vx=0,bT;var S9=N(()=>{Qf();dn();kE();LE();pa();hg();dr();ig();Rg=typeof document<"u"&&window.visualViewport});var vT;var C9=N(()=>{vT={};vT={dismiss:"تجاهل"}});var xT;var w9=N(()=>{xT={};xT={dismiss:"Отхвърляне"}});var $T;var E9=N(()=>{$T={};$T={dismiss:"Odstranit"}});var ST;var T9=N(()=>{ST={};ST={dismiss:"Luk"}});var CT;var R9=N(()=>{CT={};CT={dismiss:"Schließen"}});var wT;var k9=N(()=>{wT={};wT={dismiss:"Απόρριψη"}});var ET;var A9=N(()=>{ET={};ET={dismiss:"Dismiss"}});var TT;var M9=N(()=>{TT={};TT={dismiss:"Descartar"}});var RT;var N9=N(()=>{RT={};RT={dismiss:"Lõpeta"}});var kT;var O9=N(()=>{kT={};kT={dismiss:"Hylkää"}});var AT;var D9=N(()=>{AT={};AT={dismiss:"Rejeter"}});var MT;var P9=N(()=>{MT={};MT={dismiss:"התעלם"}});var NT;var L9=N(()=>{NT={};NT={dismiss:"Odbaci"}});var OT;var _9=N(()=>{OT={};OT={dismiss:"Elutasítás"}});var DT;var I9=N(()=>{DT={};DT={dismiss:"Ignora"}});var PT;var B9=N(()=>{PT={};PT={dismiss:"閉じる"}});var LT;var z9=N(()=>{LT={};LT={dismiss:"무시"}});var _T;var H9=N(()=>{_T={};_T={dismiss:"Atmesti"}});var IT;var U9=N(()=>{IT={};IT={dismiss:"Nerādīt"}});var BT;var F9=N(()=>{BT={};BT={dismiss:"Lukk"}});var zT;var V9=N(()=>{zT={};zT={dismiss:"Negeren"}});var HT;var j9=N(()=>{HT={};HT={dismiss:"Zignoruj"}});var UT;var K9=N(()=>{UT={};UT={dismiss:"Descartar"}});var FT;var q9=N(()=>{FT={};FT={dismiss:"Dispensar"}});var VT;var G9=N(()=>{VT={};VT={dismiss:"Revocare"}});var jT;var W9=N(()=>{jT={};jT={dismiss:"Пропустить"}});var KT;var Y9=N(()=>{KT={};KT={dismiss:"Zrušiť"}});var qT;var J9=N(()=>{qT={};qT={dismiss:"Opusti"}});var GT;var X9=N(()=>{GT={};GT={dismiss:"Odbaci"}});var WT;var Q9=N(()=>{WT={};WT={dismiss:"Avvisa"}});var YT;var Z9=N(()=>{YT={};YT={dismiss:"Kapat"}});var JT;var eL=N(()=>{JT={};JT={dismiss:"Скасувати"}});var XT;var tL=N(()=>{XT={};XT={dismiss:"取消"}});var QT;var nL=N(()=>{QT={};QT={dismiss:"關閉"}});var ZT;var rL=N(()=>{C9();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();ZT={};ZT={"ar-AE":vT,"bg-BG":xT,"cs-CZ":$T,"da-DK":ST,"de-DE":CT,"el-GR":wT,"en-US":ET,"es-ES":TT,"et-EE":RT,"fi-FI":kT,"fr-FR":AT,"he-IL":MT,"hr-HR":NT,"hu-HU":OT,"it-IT":DT,"ja-JP":PT,"ko-KR":LT,"lt-LT":_T,"lv-LV":IT,"nb-NO":BT,"nl-NL":zT,"pl-PL":HT,"pt-BR":UT,"pt-PT":FT,"ro-RO":VT,"ru-RU":jT,"sk-SK":KT,"sl-SI":qT,"sr-SP":GT,"sv-SE":WT,"tr-TR":YT,"uk-UA":JT,"zh-CN":XT,"zh-TW":QT}});function lQ(e){return e&&e.__esModule?e.default:e}function t3(e){let{onDismiss:t,...r}=e,a=sD(lQ(ZT),"@react-aria/overlays"),i=mc(r,a.format("dismiss")),l=()=>{if(t)t()};return e3.default.createElement(VD,null,e3.default.createElement("button",{...i,tabIndex:-1,onClick:l,style:{width:1,height:1}}))}var e3;var oL=N(()=>{rL();sg();lD();jD();e3=j(ae(),1)});function aL({children:e}){let t=fd.useMemo(()=>({register:()=>{}}),[]);return fd.default.createElement(cg.Provider,{value:t},e)}var fd;var iL=N(()=>{AE();fd=j(ae(),1)});function sL(){return kg.useContext(cQ)??{}}var kg,cQ;var lL=N(()=>{kg=j(ae(),1),cQ=kg.createContext({})});function n3(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}=sL();if(!e.portalContainer&&u)r=u();if(!r)return null;let f=e.children;if(!e.disableFocusManagement)f=Qa.default.createElement(NP,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!a},f);return f=Qa.default.createElement(uL.Provider,{value:c},Qa.default.createElement(aL,null,f)),cL.default.createPortal(f,r)}function $x(){let t=Qa.useContext(uL)?.setContain;nt(()=>{t?.(!0)},[t])}var Qa,cL,uL;var Sx=N(()=>{iL();Cg();uc();dr();lL();Qa=j(ae(),1),cL=j(Vr(),1),uL=Qa.default.createContext(null)});var dL=N(()=>{oL();Sx()});function r3(e){let[t,r]=ed(e.isOpen,e.defaultOpen||!1,e.onOpenChange),a=Cx.useCallback(()=>{r(!0)},[r]),i=Cx.useCallback(()=>{r(!1)},[r]),l=Cx.useCallback(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:a,close:i,toggle:l}}var Cx;var fL=N(()=>{_v();Cx=j(ae(),1)});var pL=N(()=>{fL()});function Ep(e,t=!0){let[r,a]=wp.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]),mL(e,i,wp.useCallback(()=>a(!1),[])),i}function Tp(e,t){let[r,a]=wp.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 mL(e,i,wp.useCallback(()=>{a((l)=>l==="exiting"?"closed":l)},[])),i}function mL(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)hL.flushSync(()=>{r()})}),()=>{i=!0}}},[e,t,r])}var hL,wp;var gL=N(()=>{dr();hL=j(Vr(),1),wp=j(ae(),1)});var o3=N(()=>{gL()});var wx,bL;var yL=N(()=>{wx=j(ae(),1),bL=wx.createContext({})});var vL;var xL=N(()=>{vL=new WeakMap});function i3(e,t,r){let{id:a,key:i,closeOnSelect:l,shouldCloseOnSelect:c,isVirtualized:u,"aria-haspopup":f,onPressStart:h,onPressUp:g,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),be=e.isSelected??U.isSelected(i),ce=vL.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"]=be;if(u){let Ie=Number(se?.index);X["aria-posinset"]=Number.isNaN(Ie)?void 0:Ie+1,X["aria-setsize"]=Eg(t.collection)}let ve=a3.useRef(!1),$e=(Ie)=>{y?.(Ie),ve.current=Ie},ke=a3.useRef(null),He=(Ie)=>{if(Ie.pointerType!=="keyboard")ke.current={pointerType:Ie.pointerType};if(Ie.pointerType==="mouse"){if(!ve.current)Ie.target.click()}g?.(Ie)},Ee=(Ie)=>{S?.(Ie),Y(),HO(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}=Sp({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}=mr({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(),ag("keyboard");break;case"Enter":if(ke.current={pointerType:"keyboard",key:"Enter"},Te(Ie).tagName!=="A")Te(Ie).click();ag("keyboard");break;default:if(!P)Ie.continuePropagation();D?.(Ie);break}},onKeyUp:H}),{focusableProps:On}=yc({onBlur:ee,onFocus:z,onFocusChange:G},r),Rn=ht(se?.props);delete Rn.id;let tn=np(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,On,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:be,isPressed:Rt,isDisabled:J}}var a3;var $L=N(()=>{Bs();dn();fc();pc();xL();fr();up();Xv();jv();fg();gx();Ho();fT();a3=j(ae(),1)});var SL=N(()=>{$L()});var fo,wL,uQ,dQ,CL,pd;var EL=N(()=>{qr();tT();yL();ux();mp();SL();$g();vg();Ya();fa();ad();ep();fo=j(ae(),1),wL=fo.createContext(null),uQ=fo.createContext(null);dQ=class dQ 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}};CL=fo.createContext(null),pd=qi(yp,function(t,r,a){[t,r]=on(t,r,CL);let i=Ku(CL)?.id,l=fo.useContext(wL),c=lo(r),u=fo.useContext(uQ),{isVirtualized:f}=fo.useContext(xg),{menuItemProps:h,labelProps:g,descriptionProps:b,keyboardShortcutProps:y,...v}=i3({...t,id:i,key:a.key,selectionManager:u,isVirtualized:f},l,c),{hoverProps:S,isHovered:w}=mr({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]:g,label:g,description:b}}],[bL,y],[$p,{isSelected:v.isSelected}]]},E.children))})});function s3(e,t){let{role:r="dialog"}=e,a=da();a=e["aria-label"]?void 0:a;let i=Rp.useRef(!1);Rp.useEffect(()=>{if(t.current&&!Qm(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]),$x();let l=Rp.useRef(!1);return Rp.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 Rp;var TL=N(()=>{Bs();cp();dn();Sx();Ho();Rp=j(ae(),1)});var RL=N(()=>{TL()});var Za,kL,kp,l3;var c3=N(()=>{Qv();qr();_D();RL();Ya();fa();Za=j(ae(),1),kL=Za.createContext(null),kp=Za.createContext(null),l3=Za.forwardRef(function(t,r){let a=t["aria-labelledby"];[t,r]=on(t,r,kL);let{dialogProps:i,titleProps:l}=s3({...t,"aria-labelledby":a},r),c=Za.useContext(kp);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:[[LD,{slots:{[Fi]:{},title:{...l,level:2}}}],[id,{slots:{[Fi]:{},close:{onPress:()=>c?.close()}}}]]},u.children))})});var AL=N(()=>{_v()});function u3(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:g}=yc(e,t),b=VE({...e,value:f}),{isInvalid:y,validationErrors:v,validationDetails:S}=b.displayValidation,{labelProps:w,fieldProps:E,descriptionProps:R,errorMessageProps:D}=QD({...e,isInvalid:y,errorMessage:e.errorMessage||v}),H=ht(e,{labelable:!0}),z={type:c,pattern:e.pattern},[G]=Ex.useState(f);return tP(t,e.defaultValue??G,h),rP(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(Ex.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,...g,...E}),descriptionProps:R,errorMessageProps:D,isInvalid:y,validationErrors:v,validationDetails:S}}var Ex;var ML=N(()=>{Bs();dn();fr();ZD();up();nP();oP();AL();YD();Ex=j(ae(),1)});function d3(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")}),NL.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 g=r.current;if(h.current==null||typeof g.getAnimations!=="function")if(t.isExpanded)g.removeAttribute("hidden"),g.style.setProperty("--disclosure-panel-width","auto"),g.style.setProperty("--disclosure-panel-height","auto");else g.setAttribute("hidden","until-found"),g.style.setProperty("--disclosure-panel-width","0px"),g.style.setProperty("--disclosure-panel-height","0px");else if(t.isExpanded!==h.current)if(t.isExpanded)g.removeAttribute("hidden"),g.style.setProperty("--disclosure-panel-width",g.scrollWidth+"px"),g.style.setProperty("--disclosure-panel-height",g.scrollHeight+"px"),Promise.all(g.getAnimations().map((b)=>b.finished)).then(()=>{g.style.setProperty("--disclosure-panel-width","auto"),g.style.setProperty("--disclosure-panel-height","auto")}).catch(()=>{});else g.style.setProperty("--disclosure-panel-width",g.scrollWidth+"px"),g.style.setProperty("--disclosure-panel-height",g.scrollHeight+"px"),window.getComputedStyle(g).height,g.style.setProperty("--disclosure-panel-width","0px"),g.style.setProperty("--disclosure-panel-height","0px"),Promise.all(g.getAnimations().map((b)=>b.finished)).then(()=>g.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:(g)=>{if(!a&&g.pointerType!=="keyboard")t.toggle()},isDisabled:a,onPressStart(g){if(g.pointerType==="keyboard"&&!a)t.toggle()}},panelProps:{id:l,role:"group","aria-labelledby":i,"aria-hidden":!t.isExpanded,hidden:c?!t.isExpanded:void 0}}}var NL,hd;var OL=N(()=>{bE();Ho();uc();dr();NL=j(Vr(),1),hd=j(ae(),1)});var DL=N(()=>{OL()});function f3(e){let[t,r]=ed(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),a=Tx.useCallback(()=>{r(!0)},[r]),i=Tx.useCallback(()=>{r(!1)},[r]),l=Tx.useCallback(()=>{r(!t)},[r,t]);return{isExpanded:t,setExpanded:r,expand:a,collapse:i,toggle:l}}var Tx;var PL=N(()=>{_v();Tx=j(ae(),1)});var LL=N(()=>{PL()});var gr,_L,IL,BL,zL,p3,h3;var HL=N(()=>{Qv();qr();DL();LL();Ya();fa();mv();pp();PE();gr=j(ae(),1),_L=gr.createContext(null),IL=gr.createContext(null),BL=gr.createContext(null),zL=gr.createContext(null),p3=gr.forwardRef(function(t,r){[t,r]=on(t,r,IL);let a=gr.useContext(_L),{id:i,...l}=t,c=Nn();i||=c;let u=a?a.expandedKeys.has(i):t.isExpanded,f=f3({...t,isExpanded:u,onExpandedChange(R){if(a)a.toggleKey(i);t.onExpandedChange?.(R)}}),h=gr.default.useRef(null),g=t.isDisabled||a?.isDisabled||!1,{buttonProps:b,panelProps:y}=d3({...t,isExpanded:u,isDisabled:g},f,h),{isFocusVisible:v,focusProps:S}=Fo({within:!0}),w=Yt({...t,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:f.isExpanded,isDisabled:g,isFocusVisibleWithin:v,state:f}}),E=ht(l,{global:!0});return gr.default.createElement(Kr,{values:[[id,{slots:{[Fi]:{},trigger:b}}],[zL,{panelProps:y,panelRef:h}],[BL,f]]},gr.default.createElement(Ot.div,{...Le(E,w,S),ref:r,"data-expanded":f.isExpanded||void 0,"data-disabled":g||void 0,"data-focus-visible-within":v||void 0},w.children))}),h3=gr.forwardRef(function(t,r){let{role:a="group"}=t,{panelProps:i,panelRef:l}=gr.useContext(zL),{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 gr.default.createElement(Ot.div,{...Le(h,f,i,u),ref:Ui(r,l),role:a,"data-focus-visible-within":c||void 0},gr.default.createElement(Kr,{values:[[id,null]]},t.children))})});function m3(e,t,r){let{overlayProps:a,underlayProps:i}=b9({...e,isOpen:t.isOpen,onClose:t.close},r);return $9({isDisabled:!t.isOpen}),$x(),UL.useEffect(()=>{if(t.isOpen&&r.current)return f9([r.current],{shouldUseInert:!0})},[t.isOpen,r]),{modalProps:Le(a),underlayProps:i}}var UL;var FL=N(()=>{p9();y9();fr();Sx();S9();UL=j(ae(),1)});var VL=N(()=>{FL()});var jL=N(()=>{hg()});var KL=N(()=>{uc()});function b3(){let e=jr(),[t,r]=Rx.useState(()=>e?{width:0,height:0}:g3());return Rx.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(g3())},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(g3()),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 g3(){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 Rx,po;var qL=N(()=>{dn();pa();uc();ig();Rx=j(ae(),1),po=typeof document<"u"&&window.visualViewport});var GL=N(()=>{qL()});function fQ(e,t){[e,t]=on(e,t,YL);let r=an.useContext(kp),a=r3(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=Tp(l,i.isOpen),f=Tp(c,i.isOpen),h=u||f||e.isExiting||!1,g=jr();if(!i.isOpen&&!h||g)return null;return an.default.createElement(pQ,{...e,state:i,isExiting:h,overlayRef:l,modalRef:c})}function pQ({UNSTABLE_portalContainer:e,...t}){let r=t.modalRef,{state:a}=t,{modalProps:i,underlayProps:l}=m3(t,a,r),c=Ep(t.overlayRef)||t.isEntering||!1,u=Yt({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:c,isExiting:t.isExiting,state:a}}),f=b3(),h=void 0,g=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,g=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":g!==void 0?g+"px":void 0};return an.default.createElement(n3,{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:[[y3,{modalProps:i,modalRef:r,isExiting:t.isExiting,isDismissable:t.isDismissable}],[kp,a]]},u.children)))}function WL(e){let{modalProps:t,modalRef:r,isExiting:a,isDismissable:i}=an.useContext(y3),l=an.useContext(kp),c=an.useMemo(()=>Ui(e.modalRef,r),[e.modalRef,r]),u=lo(c),f=Ep(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(t3,{onDismiss:l.close}),h.children)}var an,YL,y3,v3,kx;var JL=N(()=>{qr();c3();VL();dL();Ya();jL();fa();mv();pL();o3();KL();ep();GL();an=j(ae(),1),YL=an.createContext(null),y3=an.createContext(null),v3=an.forwardRef(function(t,r){if(an.useContext(y3)){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(WL,{...t,modalRef:r},t.children)}let{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,children:h,isEntering:g,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v,...S}=t;return an.default.createElement(kx,{isDismissable:i,isKeyboardDismissDisabled:l,isOpen:c,defaultOpen:u,onOpenChange:f,isEntering:g,isExiting:b,UNSTABLE_portalContainer:y,shouldCloseOnInteractOutside:v},an.default.createElement(WL,{...S,modalRef:r},h))});kx=an.forwardRef(fQ)});function Ap(e,t,r){if(!e)return"";if(typeof t==="string")t=t.replace(/\s+/g,"");let a=x3.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 x3;var Ax=N(()=>{x3=new WeakMap});function $3(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),g=t.collection.getItem(a),{itemProps:b,isPressed:y}=Sp({selectionManager:c,key:a,ref:r,isDisabled:h,shouldSelectOnPressUp:l??g?.props.href!=null,linkBehavior:"selection"}),v=Ap(t,a,"tab"),S=Ap(t,a,"tabpanel"),{tabIndex:w}=b,E=ht(g?.props,{labelable:!0});delete E.id;let R=np(g?.props),{focusableProps:D}=yc({...g?.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 XL=N(()=>{Bs();Ax();fr();up();fc();gx()});function ZL(e,t){let r=t?.isDisabled,[a,i]=QL.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 QL;var e_=N(()=>{Cg();dr();QL=j(ae(),1)});function S3(e,t,r){let a=ZL(r)?void 0:0,i=Ap(t,e.id??t?.selectedKey,"tabpanel"),l=mc({...e,id:i,"aria-labelledby":Ap(t,t?.selectedKey,"tab")});return{tabPanelProps:Le(l,{tabIndex:a,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}var t_=N(()=>{Ax();fr();e_();sg()});class C3{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 n_=()=>{};function w3(e,t,r){let{orientation:a="horizontal",keyboardActivation:i="automatic"}=e,{collection:l,selectionManager:c,disabledKeys:u}=t,{direction:f}=ap(),h=r_.useMemo(()=>new C3(l,f,a,u),[l,u,a,f]),{collectionProps:g}=VP({ref:r,selectionManager:c,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),b=Nn();x3.set(t,b);let y=mc({...e,id:b});return{tabListProps:{...Le(g,y),role:"tablist","aria-orientation":a,tabIndex:void 0}}}var r_;var o_=N(()=>{fr();Ax();n_();Ho();sg();Dv();jP();r_=j(ae(),1)});var a_=N(()=>{XL();t_();o_()});function hQ({props:e,forwardedRef:t}){let r=Ut.useContext(md),{CollectionRoot:a}=Ut.useContext(xg),{orientation:i="horizontal",keyboardActivation:l="automatic"}=Ku(E3),c=lo(t),{tabListProps:u}=w3({...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(yP,null,Ut.default.createElement(a,{collection:r.collection,persistedKeys:eT(r.selectionManager.focusedKey)})))}function mQ(e){let t=Ut.useContext(md),{id:r,tabPanelRef:a,isInitiallySelected:i,isExiting:l,...c}=e,{tabPanelProps:u}=S3(e,t,a),{focusProps:f,isFocused:h,isFocusVisible:g}=Fo(),b=t.selectedKey===e.id,y=Ep(a)&&!i,v=Yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:h,isFocusVisible:g,isInert:Cp(!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":g||void 0,inert:Cp(!b||e.inert),"data-inert":!b?"true":void 0,"data-entering":y||void 0,"data-exiting":l||void 0},Ut.default.createElement(Kr,{values:[[E3,null],[md,null]]},Ut.default.createElement(xg.Provider,{value:ZE},v.children)))}var Ut,E3,md,T3,i_,R3,k3;var s_=N(()=>{qr();tT();ux();vP();a_();n9();vg();$g();sp();Ya();hT();fa();o3();pp();ad();ep();Ut=j(ae(),1),E3=Ut.createContext(null),md=Ut.createContext(null),T3=Ut.forwardRef(function(t,r){return Ut.useContext(md)?Ut.default.createElement(hQ,{props:t,forwardedRef:r}):Ut.default.createElement(JE,t)});i_=class i_ extends Vo{static{this.type="item"}};R3=qi(i_,(e,t,r)=>{let a=Ut.useContext(md),i=lo(t),{tabProps:l,isSelected:c,isDisabled:u,isPressed:f}=$3({key:r.key,...e},a,i),{focusProps:h,isFocused:g,isFocusVisible:b}=Fo(),{hoverProps:y,isHovered:v}=mr({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:g,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":g||void 0,"data-focus-visible":b||void 0,"data-pressed":f||void 0,"data-hovered":v||void 0},Ut.default.createElement($p.Provider,{value:{isSelected:c}},S.children))}),k3=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=Tp(i,l);if(!l&&!t.shouldForceMount&&!f)return null;return Ut.default.createElement(mQ,{...t,tabPanelRef:i,isInitiallySelected:c||!1,isExiting:f})})});var Mp,Mx,gQ=(e)=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,...i}=e;return i},A3;var M3=N(()=>{qr();fa();pp();ad();Mp=j(ae(),1),Mx=Mp.createContext({}),A3=Mp.forwardRef(function(t,r){[t,r]=on(t,r,Mx);let{hoverProps:a,isHovered:i}=mr(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 Mp.default.createElement(Ot.textarea,{...Le(gQ(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 l_=N(()=>{ML()});var ei,c_,Ag;var u_=N(()=>{qr();BE();uD();XD();iP();jE();vE();M3();mp();l_();sp();Ya();ei=j(ae(),1),c_=ei.createContext(null),Ag=Wa(function(t,r){[t,r]=on(t,r,c_);let{validationBehavior:a}=Ku(JD)||{},i=t.validationBehavior??a??"native",l=ei.useRef(null);[t,l]=on(t,l,cD);let[c,u]=gv(!t["aria-label"]&&!t["aria-labelledby"]),[f,h]=ei.useState("input"),{labelProps:g,inputProps:b,descriptionProps:y,errorMessageProps:v,...S}=u3({...RO(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:[[zv,{...g,ref:c}],[ax,{...b,ref:w}],[Mx,{...b,ref:w}],[aP,{role:"presentation",isInvalid:S.isInvalid,isDisabled:t.isDisabled||!1}],[Cc,{slots:{description:y,errorMessage:v}}],[bg,S]]},E.children))})});class Mg{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 f_(()=>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 f_{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 d_,bQ;var p_=N(()=>{d_=j(ae(),1),bQ=j(xp(),1)});var h_=N(()=>{p_()});var m_=()=>{};var ho=N(()=>{Qv();c3();HL();BE();jE();vE();u9();EL();JL();wP();s_();mp();M3();u_();m_();h_()});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(xQ){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=be.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 g(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"),be=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={};xQ.Fragment=w,xQ.jsxDEV=function(k,X,ve,$e){var ke=1e4>be.recentlyCreatedOwnerStacks++;return g(k,X,ve,$e,ke?Error("react-stack-top-frame"):Z,ke?_(a(k)):pe)}})()});var Np,$Q,$n=({label:e,description:t,errorMessage:r,placeholder:a,size:i,rootClassName:l,inputClassName:c,...u})=>Np.jsxDEV(Ag,{...u,className:`flex w-full flex-col gap-3 ${l??""}`,children:[Np.jsxDEV(gc,{className:"text-panel-heading font-medium text-fg",children:e},void 0,!1,void 0,this),Np.jsxDEV($Q,{className:c,placeholder:a,fieldSize:i},void 0,!1,void 0,this),t?Np.jsxDEV(ji,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Np.jsxDEV(sd,{className:"text-label text-danger",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var Ox=N(()=>{ho();Mn();Np=j(Et(),1),$Q=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 Op,SQ,Dx=({label:e,description:t,errorMessage:r,placeholder:a,rows:i,...l})=>Op.jsxDEV(Ag,{...l,className:"flex w-full flex-col gap-2",children:[Op.jsxDEV(gc,{className:"text-small font-medium text-fg",children:e},void 0,!1,void 0,this),Op.jsxDEV(SQ,{placeholder:a,rows:i},void 0,!1,void 0,this),t?Op.jsxDEV(ji,{slot:"description",className:"text-label text-fg-muted",children:t},void 0,!1,void 0,this):null,Op.jsxDEV(sd,{className:"text-label text-danger",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this);var y_=N(()=>{ho();Mn();Op=j(Et(),1),SQ=Ue(A3,{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 O3(e){let t=e.trim();return/^(https?:\/\/|mailto:|tel:|\/|#)/i.test(t)?t:null}var D3="Only http(s), mailto, tel, or relative (/, #) links are allowed.";var P3,CQ;var qs=N(()=>{P3=j(ae(),1),CQ=P3.createContext(!1)});var v_;var x_=N(()=>{Ds();qs();v_=j(ae(),1)});var Gs,wQ,Rwe;var $_=N(()=>{Ds();qs();Gs=j(ae(),1),wQ=j(Vr(),1),Rwe=Gs.createContext(null)});var S_=()=>{};var C_=()=>{};var w_=()=>{};var Iwe,EQ;var L3=N(()=>{ho();Mn();qs();Iwe=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"}),EQ=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 Fwe,Vwe;var E_=N(()=>{ho();Mn();qs();Fwe=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"}),Vwe=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 _3,Ywe;var T_=N(()=>{ho();Ds();Mn();qs();_3=j(ae(),1),Ywe=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 R_=()=>{};var k_=()=>{};var A_=()=>{};var M_=()=>{};var MQ;var N_=N(()=>{Wi();qs();MQ=j(ae(),1)});var I3=()=>{};var O_=N(()=>{Ds();I3();qs()});var Px,Lx,_x;var bd=N(()=>{ho();Mn();Px=Ue(kx,{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"}),Lx=Ue(v3,{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"}),_x=l3});var bEe,yEe;var D_=N(()=>{ho();Mn();bEe=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"}}}),yEe=Ue(rT,{displayName:"DropdownMenuSeparator",baseClass:"my-2 h-px border-0 bg-border"})});var Ix,SEe;var P_=N(()=>{ho();Mn();Ix=j(ae(),1),SEe=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 B3=()=>{};var AEe;var L_=N(()=>{ho();AEe=new Mg({maxVisibleToasts:5})});var DEe,PEe;var __=N(()=>{ho();Mn();DEe=Ue(p3,{displayName:"Disclosure"}),PEe=Ue(h3,{displayName:"DisclosurePanel"})});var I_=()=>{};var zEe,HEe,UEe;var B_=N(()=>{ho();Mn();zEe=Ue(T3,{displayName:"TabList",baseClass:"flex gap-2 border-b border-border"}),HEe=Ue(R3,{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"}),UEe=Ue(k3,{displayName:"TabPanel",baseClass:"py-4 text-small text-fg outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring"})});var z_=N(()=>{Wi()});var H_=()=>{};var OQ,GEe,Bx,zx;var z3=N(()=>{Mn();OQ=Ue("h2",{displayName:"DisplayHeading",baseClass:"text-display-large font-medium text-fg"}),GEe=Ue("h3",{displayName:"PanelHeading",baseClass:"text-panel-heading font-medium text-fg"}),Bx=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"}}),zx=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 U_=N(()=>{B3()});var F_;var V_=N(()=>{Mn();F_=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 nTe;var j_=N(()=>{Mn();nTe=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 aTe;var K_=N(()=>{Mn();aTe=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 q_,lTe,cTe,uTe;var G_=N(()=>{Mn();q_=j(ae(),1),lTe=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]"}),cTe=Ue("aside",{displayName:"AppShell.Sidebar",baseClass:"h-full w-64 shrink-0 overflow-y-auto border-r border-border bg-surface"}),uTe=Ue("main",{displayName:"AppShell.Main",baseClass:"min-w-0 flex-1 bg-surface px-6 pb-6 pt-6"})});var W_,DQ,PQ,LQ,_Q=(e)=>W_.jsxDEV(LQ,{...e},void 0,!1,void 0,this),IQ,BQ,hTe,mTe,Dg;var Y_=N(()=>{ho();Mn();W_=j(Et(),1),DQ=Ue("header",{displayName:"Topbar",baseClass:"flex h-14 w-full items-center gap-5 border-b border-border"}),PQ=Ue("div",{displayName:"Topbar.Brand",baseClass:"flex min-w-0 items-center gap-3 text-compact leading-4 font-medium tracking-tight text-fg"}),LQ=Ue("nav",{displayName:"Topbar.Nav",baseClass:"ml-auto flex min-w-0 items-center gap-2 overflow-x-auto"}),IQ=Ue("div",{displayName:"Topbar.Actions",baseClass:"ml-auto flex items-center gap-4"}),BQ=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"]}),hTe=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"}),mTe=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"}),Dg=Object.assign(DQ,{Brand:PQ,Nav:_Q,NavLink:BQ,Actions:IQ})});var zQ,yTe;var J_=N(()=>{Mn();zQ=j(ae(),1),yTe=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 X_=()=>{};var HQ;var Q_=N(()=>{Wi();z3();HQ=j(ae(),1)});var H3;var U3=N(()=>{H3=j(ae(),1)});var Z_=()=>{};var eI=N(()=>{U3()});var Dp,tI,nI=(e)=>Dp.jsxDEV("svg",{...tI,...e,children:[Dp.jsxDEV("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,void 0,this),Dp.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),rI=(e)=>Dp.jsxDEV("svg",{...tI,...e,children:Dp.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 Hx=N(()=>{Dp=j(Et(),1),tI={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0}});var oI=()=>{};var F3;var V3=N(()=>{Hx();F3=j(ae(),1)});var UQ;var aI=N(()=>{V3();UQ=j(ae(),1)});var iI;var sI=N(()=>{Hx();iI=j(ae(),1)});var lI=()=>{};var cI;var uI=N(()=>{Wi();bd();cI=j(ae(),1)});var dI;var fI=N(()=>{Wi();bd();dI=j(ae(),1)});var FQ;var pI=N(()=>{Wi();bd();FQ=j(ae(),1)});var hI;var mI=N(()=>{Wi();bd();Ox();hI=j(ae(),1)});var VQ;var gI=N(()=>{Wi();bd();Ox();L3();VQ=j(ae(),1)});var l3e,c3e;var bI=N(()=>{Mn();l3e=Ue("div",{displayName:"DeliveryStatusModule",baseClass:"grid gap-3 rounded-md bg-surface-inverted p-4 text-fg-inverted"}),c3e=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();Ox();y_();x_();$_();qs();S_();C_();w_();L3();E_();T_();R_();k_();A_();M_();N_();I3();O_();bd();D_();P_();B3();L_();__();I_();B_();z_();H_();z3();U_();V_();j_();K_();G_();Y_();J_();X_();Q_();U3();Z_();eI();Hx();oI();aI();V3();sI();lI();uI();fI();pI();mI();gI();bI()});function Fx(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 yI(){try{let e=localStorage.getItem(j3);if(e)return JSON.parse(e)}catch{}return{baseUrl:"http://localhost:8787",token:"",tenant:"main"}}function vI(e){localStorage.setItem(j3,JSON.stringify(e))}function xI(){try{localStorage.removeItem(j3)}catch{}}class K3{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&&Fx(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 Pp(`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 Pp(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 Pp(`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 Pp,j3="pramen.cmsEditor";var q3=N(()=>{Pp=class Pp extends Error{code;status;constructor(e,t,r){super(e);this.code=t;this.status=r;this.name="ApiError"}}});function G3(){xI(),location.replace(Pg)}function Rr(){let e=Vn.use($I);if(!e)throw Error("useApp must be used within <AppProvider>");return e}function SI({children:e}){let[t,r]=Vn.useState(yI()),[a,i]=Vn.useState(null),[l,c]=Vn.useState([]),[u,f]=Vn.useState(""),h=Boolean(t.baseUrl&&t.token)&&!Fx(t.token),g=Vn.useMemo(()=>new K3(t,Pg?G3:void 0),[t]),b=Vn.useRef(null),y=Vn.useCallback((w)=>{b.current=w},[]),v=Vn.useCallback(()=>b.current?.()??!0,[]);if(Vn.useEffect(()=>{if(!Pg)return;let w=()=>{if(!t.token||Fx(t.token))G3()};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]),Vn.useEffect(()=>{if(!h)return;g.call("me").then(i).catch(()=>i({})),g.call("listCollections").then(c).catch(()=>c([]))},[g,h]),!h)return Pg?null:mo.jsxDEV(jQ,{cfg:t,onSave:(w)=>{vI(w),r(w)}},void 0,!1,void 0,this);let S={api:g,cfg:t,me:a,isAdmin:(a?.roles??[]).includes("admin"),collections:l,error:u,setError:f,confirmNavigation:v,setNavGuard:y,reconfigure:()=>{if(Pg){G3();return}i(null),f(""),r({...t,token:""})}};return mo.jsxDEV($I,{value:S,children:e},void 0,!1,void 0,this)}function jQ({cfg:e,onSave:t}){let[r,a]=Vn.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 Vn,mo,Pg,$I;var Ji=N(()=>{Yi();q3();Vn=j(ae(),1),mo=j(Et(),1),Pg=typeof window<"u"&&!new URLSearchParams(window.location.search).has("setup")?window.PRAMEN_CMS_EDITOR?.signInUrl:void 0;$I=Vn.createContext(null)});function kr(e){this.content=e}var Y3;var wI=N(()=>{kr.prototype={constructor:kr,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 kr(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 kr(r)},addToStart:function(e,t){return new kr([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var r=this.remove(e).content.slice();return r.push(e,t),new kr(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 kr(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=kr.from(e),!e.size)return this;return new kr(e.content.concat(this.subtract(e).content))},append:function(e){if(e=kr.from(e),!e.size)return this;return new kr(this.subtract(e).content.concat(e.content))},subtract:function(e){var t=this;e=kr.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}};kr.from=function(e){if(e instanceof kr)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new kr(t)};Y3=kr});function PI(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&&II(c.charCodeAt(f-1))&&_I(c.charCodeAt(f)))r--;return r}if(i.content.size||l.content.size){let c=PI(i.content,l.content,r+1);if(c!=null)return c}r+=i.nodeSize}}function LI(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,g=u.text,b=h.length,y=g.length;while(b>0&&y>0&&h[b-1]==g[y-1])b--,y--,r--,a--;if(b&&y&&b<h.length&&II(h.charCodeAt(b-1))&&_I(h.charCodeAt(b)))r++,a++;return{a:r,b:a}}if(c.content.size||u.content.size){let h=LI(c.content,u.content,r-1,a-1);if(h)return h}r-=f,a-=f}}function _I(e){return e>=56320&&e<57344}function II(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 PI(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return LI(this,e,t,r)}findIndex(e){if(e==0)return jx(0,e);if(e==this.size)return jx(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 jx(t+1,i);return jx(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 jx(e,t){return J3.index=e,J3.offset=t,J3}function Gx(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(!Gx(e[a],t[a]))return!1}else{for(let a in e)if(!(a in t)||!Gx(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&&Gx(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=zI(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(BI(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 BI(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(BI(l.content,t-i-1,r-i-1)))}function zI(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=zI(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 KQ(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 HI(e,t,r,0)}function HI(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=HI(e,t,r,a+1);return l.copy(l.content.replaceChild(i,c))}else if(!r.content.size)return vd(l,Wx(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}=qQ(r,e);return vd(l,FI(e,c,u,t,a))}}function UI(e,t){if(!t.type.compatibleContent(e.type))throw new xd("Cannot join "+t.type.name+" onto "+e.type.name)}function X3(e,t,r){let a=e.node(r);return UI(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 _g(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 FI(e,t,r,a,i){let l=e.depth>i&&X3(e,t,i+1),c=a.depth>i&&X3(r,a,i+1),u=[];if(_g(null,e,i,u),l&&c&&t.index(i)==r.index(i))UI(l,c),yd(vd(l,FI(e,t,r,a,i+1)),u);else{if(l)yd(vd(l,Wx(e,t,i+1)),u);if(_g(t,r,i,u),c)yd(vd(c,Wx(r,a,i+1)),u)}return _g(a,null,i,u),new le(u)}function Wx(e,t,r){let a=[];if(_g(null,e,r,a),e.depth>r){let i=X3(e,t,r+1);yd(vd(i,Wx(e,t,r+1)),a)}return _g(t,null,r,a),new le(a)}function qQ(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 Bg{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 Lp(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 Bg(t,r,i)}static resolveCached(e,t){let r=EI.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 EI.set(e,r=new VI);let a=r.elts[r.i]=Bg.resolve(e,t);return r.i=(r.i+1)%GQ,a}}class VI{constructor(){this.elts=[],this.i=0}}class Lp{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&&Gx(this.attrs,t||e.defaultAttrs||WQ)&&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 KQ(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 Bg.resolveCached(this,e)}resolveNoCache(e){return Bg.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 jI(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 jI(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 KI(e,t);if(r.next==null)return $d.empty;let a=qI(r);if(r.next)r.err("Unexpected trailing text");let i=tZ(eZ(a));return nZ(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:g}=l.next[f];if(!(h.isText||h.hasRequiredAttrs())&&a.indexOf(g)==-1){a.push(g);let b=i(g,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 KI{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 qI(e){let t=[];do t.push(YQ(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function YQ(e){let t=[];do t.push(JQ(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function JQ(e){let t=ZQ(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=XQ(e,t);else break;return t}function TI(e){if(/\D/.test(e.next))e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function XQ(e,t){let r=TI(e),a=r;if(e.eat(","))if(e.next!="}")a=TI(e);else a=-1;if(!e.eat("}"))e.err("Unclosed braced range");return{type:"range",min:r,max:a,expr:t}}function QQ(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 ZQ(e){if(e.eat("(")){let t=qI(e);if(!e.eat(")"))e.err("Missing closing paren");return t}else if(!/\W/.test(e.next)){let t=QQ(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 eZ(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 g=r();i(l(c.expr,f),g),f=g}if(c.max==-1)i(l(c.expr,f),f);else for(let h=c.min;h<c.max;h++){let g=r();a(f,g),i(l(c.expr,f),g),f=g}return[a(f)]}else if(c.type=="name")return[a(u,void 0,c.value)];else throw Error("Unknown expr type")}}function GI(e,t){return t-e}function RI(e,t){let r=[];return a(t),r.sort(GI);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 tZ(e){let t=Object.create(null);return r(RI(e,0));function r(a){let i=[];a.forEach((c)=>{e[c].forEach(({term:u,to:f})=>{if(!u)return;let h;for(let g=0;g<i.length;g++)if(i[g][0]==u)h=i[g][1];RI(e,f).forEach((g)=>{if(!h)i.push([u,h=[]]);if(h.indexOf(g)==-1)h.push(g)})})});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(GI);l.next.push({type:i[c][0],next:t[u.join(",")]||r(u)})}return l}}function nZ(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 WI(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 YI(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 JI(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 XI(e,t){let r=Object.create(null);if(t)for(let a in t)r[a]=new QI(e,a,t[a]);return r}class Jx{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=XI(e,r.attrs),this.defaultAttrs=WI(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 YI(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){JI(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 Jx(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 rZ(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 QI{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?rZ(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Hg{constructor(e,t,r,a){this.name=e,this.rank=t,this.schema=r,this.spec=a,this.attrs=XI(e,a.attrs),this.excluded=null;let i=WI(this.attrs);this.instance=i?new Pt(this,i):null}create(e=null){if(!e&&this.instance)return this.instance;return new Pt(this,YI(this.attrs,e))}static compile(e,t){let r=Object.create(null),a=0;return e.forEach((i,l)=>r[i]=new Hg(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){JI(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Ug{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=Y3.from(e.nodes),t.marks=Y3.from(e.marks||{}),this.nodes=Jx.compile(this.spec.nodes,this),this.marks=Hg.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?kI(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==""?[]:kI(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 Jx))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 Yx(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 kI(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 oZ(e){return e.tag!=null}function aZ(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(oZ(a))this.tags.push(a);else if(aZ(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 Z3(this,t,!1);return r.addAll(e,Pt.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Z3(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(lZ(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=MI(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=MI(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 AI(e,t,r){if(t!=null)return(t?zg:0)|(t==="full"?Q3:0);return e&&e.whitespace=="pre"?zg|Q3:r&~Ig}class Lg{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&Ig?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&zg)){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&&!ZI.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Z3{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=AI(null,t.preserveWhitespace,0)|(r?Ig:0);if(a)i=new Lg(a.type,a.attrs,Pt.none,!0,t.topMatch||a.type.contentMatch,l);else if(r)i=new Lg(null,null,Pt.none,!0,null,l);else i=new Lg(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&Q3?"full":this.localPreserveWS||(a.options&zg)>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(eB.hasOwnProperty(l)&&this.parser.normalizeLists)sZ(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(c=this.parser.matchTag(e,this,r));e:if(u?u.ignore:iZ.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(ZI.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 g=u&&u.skip?t:this.readStyles(e,t);if(g)this.addAll(e,g);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):NI(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=AI(e,i,l.options);if(l.options&Ig&&l.content.length==0)c|=Ig;let u=Pt.none;return r=r.filter((f)=>{if(l.type?l.type.allowsMarkType(f.type):NI(f.type,e))return u=f.addToSet(u),!1;return!0}),this.nodes.push(new Lg(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|=zg;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 sZ(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let a=t.nodeType==1?t.nodeName.toLowerCase():null;if(a&&eB.hasOwnProperty(a)&&r)r.appendChild(t),t=r;else if(a=="li")r=t;else if(a)r=null}}function lZ(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function MI(e){let t={};for(let r in e)t[r]=e[r];return t}function NI(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:g}=u.edge(f);if(h==t)return!0;if(l.indexOf(g)<0&&c(g))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=Kx(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 Kx(t).createTextNode(e.text);let{dom:r,contentDOM:a}=qx(Kx(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&&qx(Kx(r),a(e,t),null,e.attrs)}static renderSpec(e,t,r=null,a){if(typeof t=="string")return{dom:e.createTextNode(t)};return qx(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=OI(e.nodes);if(!t.text)t.text=(r)=>r.text;return t}static marksFromSchema(e){return OI(e.marks)}}function OI(e){let t={};for(let r in e){let a=e[r].spec.toDOM;if(a)t[r]=a}return t}function Kx(e){return e.document||window.document}function cZ(e){let t=DI.get(e);if(t===void 0)DI.set(e,t=uZ(e));return t}function uZ(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 qx(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=cZ(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],g=1;if(h&&typeof h=="object"&&h.nodeType==null&&!Array.isArray(h)){g=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=g;b<t.length;b++){let y=t[b];if(y===0){if(b<t.length-1||b>g)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}=qx(e,y,r,a);if(f.appendChild(v),S){if(u)throw RangeError("Multiple content holes");u=S}}}return{dom:f,contentDOM:u}}var J3,xd,GQ=12,EI,WQ,Yx,ZI,iZ,eB,zg=1,Q3=2,Ig=4,DI;var Ws=N(()=>{wI();le.empty=new le([],0);J3={index:0,offset:0};Pt.none=[];xd=class xd extends Error{};Se.empty=new Se(le.empty,0,0);EI=new WeakMap;WQ=Object.create(null);Wr.prototype.text=void 0;Yx=class Yx 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 jI(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 Yx(this.type,this.attrs,this.text,e)}withText(e){if(e==this.text)return this;return new Yx(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);ZI={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},iZ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},eB={ol:!0,ul:!0};DI=new WeakMap});function dZ(e,t){return e+t*oB}function tB(e){return e&rB}function fZ(e){return(e-(e&rB))/oB}class Qx{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&sB)>0}get deletedBefore(){return(this.delInfo&(aB|Xx))>0}get deletedAfter(){return(this.delInfo&(iB|Xx))>0}get deletedAcross(){return(this.delInfo&Xx)>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=tB(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+fZ(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],g=u+f;if(e<=g){let b=!f?t:e==u?-1:e==g?1:t,y=u+a+(b<0?0:h);if(r)return y;let v=e==(t<0?u:g)?null:dZ(c/3,e-u),S=e==u?iB:e==g?aB:Xx;if(t<0?e!=u:e!=g)S|=sB;return new Qx(y,S,v)}a+=h-f}return r?e+a:new Qx(e+a,0,null)}touches(e,t){let r=0,a=tB(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 Ip{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 Ip(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 Ip;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 Qx(e,a,null)}}class br{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=eR[t.stepType];if(!r)throw RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in eR)throw RangeError("Duplicate use of step JSON ID "+e);return eR[e]=t,t.prototype.jsonID=e,t}}class jn{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new jn(e,null)}static fail(e){return new jn(null,e)}static fromReplace(e,t,r,a){try{return jn.ok(e.replace(t,r,a))}catch(i){if(i instanceof xd)return jn.fail(i.message);throw i}}}function oR(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(oR(l.content,t,l));if(l.isInline)l=t(l,r,i);a.push(l)}return le.fromArray(a)}function rR(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 pZ(e,t,r,a){let i=[],l=[],c,u;e.doc.nodesBetween(t,r,(f,h,g)=>{if(!f.isInline)return;let b=f.marks;if(!a.isInSet(b)&&g.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 hZ(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 Hg){let h=c.marks,g;while(g=a.isInSet(h))(f||(f=[])).push(g),h=g.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 g=0;g<f.length;g++){let b=f[g],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 aR(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),g=u+h.nodeSize,b=a.matchType(h.type);if(!b)c.push(new gn(u,g,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,g,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=g}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 mZ(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||!mZ(c,u,f))break;if(u)i=1;if(f<c.childCount)l=1}return null}function gZ(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,g=le.empty,b=0;for(let S=l,w=!1;S>r;S--)if(w||a.index(S)>0)w=!0,g=le.from(a.node(S).copy(g)),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(g.append(y),b,v),g.size-b,!0))}function zp(e,t,r=null,a=e){let i=bZ(e,t),l=i&&yZ(a,t);if(!l)return null;return i.map(nB).concat({type:t,attrs:r}).concat(l.map(nB))}function nB(e){return{type:e,attrs:null}}function bZ(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 yZ(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 vZ(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 xZ(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)&&$Z(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)cB(e,c,u,l);aR(e,e.mapping.slice(l).map(u,1),a,void 0,h===null);let g=e.mapping.slice(l),b=g.map(u,1),y=g.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)lB(e,c,u,l);return!1}})}function lB(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 cB(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 $Z(e,t,r){let a=e.resolve(t),i=a.index();return a.parent.canReplaceWith(i,i+1,r)}function SZ(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,g=r-2;h>l;h--,g--){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[g+1];if(S)v=v.replaceChild(0,S.type.create(S.attrs));let w=a&&a[g]||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 CZ(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 g=a&&a[h];c=le.from(g?g.type.create(g.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 uB(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(a,a+1)}function wZ(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 uB(e,t){return!!(e&&t&&!e.isLeaf&&wZ(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&&uB(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 EZ(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 g=c.whitespace=="pre",b=!!c.contentMatch.matchType(i);if(g&&!b)a=!1;else if(!g&&b)a=!0}let u=e.steps.length;if(a===!1){let g=e.doc.resolve(t+r);cB(e,g.node(),g.before(),u)}if(c.inlineContent)aR(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 g=e.doc.resolve(h);lB(e,g.node(),g.before(),e.steps.length)}return e}function TZ(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 Zx(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),g=!1;if(l==1)g=h.canReplace(f,f,i);else{let b=h.contentMatchAt(f).findWrapping(i.firstChild.type);g=b&&h.canReplaceWith(f,f,b[0])}if(g)return u==0?a.pos:u<0?a.before(c+1):a.after(c+1)}return null}function Kg(e,t,r=t,a=Se.empty){if(t==r&&!a.size)return null;let i=e.resolve(t),l=e.resolve(r);if(dB(i,l,a))return new gn(t,r,a);return new fB(i,l,a).fit()}function dB(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class fB{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=tR(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,g=null;if(t==1&&(l?f.matchType(l.type)||(g=f.fillBefore(le.from(l),!1)):i&&u.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:c,parent:i,inject:g};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=tR(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=tR(e,t);if(a.childCount<=1&&t>0){let i=e.size-t<=t+a.size;this.unplaced=new Se(Fg(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new Se(Fg(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:g,type:b}=this.frontier[t];if(a){for(let S=0;S<a.childCount;S++)h.push(a.child(S));g=g.matchFragment(a)}let y=c.size+e-(l.content.size-l.openEnd);while(f<c.childCount){let S=c.child(f),w=g.matchType(S.type);if(!w)break;if(f++,f>1||u==0||S.content.size)g=w,h.push(pB(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=Vg(this.placed,t,le.from(h)),this.frontier[t].match=g,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(Fg(l.content,e,f),l.openStart,l.openEnd):e==0?Se.empty:new Se(Fg(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||!nR(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=nR(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=nR(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=Vg(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=Vg(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=Vg(this.placed,this.frontier.length,t)}}function Fg(e,t,r){if(t==0)return e.cutByIndex(r,e.childCount);return e.replaceChild(0,e.firstChild.copy(Fg(e.firstChild.content,t-1,r)))}function Vg(e,t,r){if(t==0)return e.append(r);return e.replaceChild(e.childCount-1,e.lastChild.copy(Vg(e.lastChild.content,t-1,r)))}function tR(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function pB(e,t,r){if(t<=0)return e;let a=e.content;if(t>1)a=a.replaceChild(0,pB(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 nR(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&&!RZ(r,l.content,c)?u:null}function RZ(e,t,r){for(let a=r;a<t.childCount;a++)if(!e.allowsMarks(t.child(a).marks))return!0;return!1}function kZ(e){return e.spec.defining||e.spec.definingForContent}function AZ(e,t,r,a){if(!a.size)return e.deleteRange(t,r);let i=e.doc.resolve(t),l=e.doc.resolve(r);if(dB(i,l,a))return e.step(new gn(t,r,a));let c=mB(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=[],g=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=g-1;y>=0;y--){let v=h[y],S=kZ(v.type);if(S&&!v.sameMarkup(i.node(Math.abs(u)-1)))g=y;else if(S||!v.type.isTextblock)break}for(let y=a.openStart;y>=0;y--){let v=(y+g+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(hB(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 hB(e,t,r,a,i){if(t<r){let l=e.firstChild;e=e.replaceChild(0,l.copy(hB(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 MZ(e,t,r,a){if(!a.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let i=TZ(e.doc,t,a.type);if(i!=null)t=r=i}e.replaceRange(t,r,new Se(le.from(a),0,0))}function NZ(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=mB(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 mB(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 qg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ip}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Bp(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=Kg(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 AZ(this,e,t,r),this}replaceRangeWith(e,t,r){return MZ(this,e,t,r),this}deleteRange(e,t){return NZ(this,e,t),this}lift(e,t){return gZ(this,e,t),this}join(e,t=1){return EZ(this,e,t),this}wrap(e,t){return vZ(this,e,t),this}setBlockType(e,t=e,r,a=null){return xZ(this,e,t,r,a),this}setNodeMarkup(e,t,r=null,a){return SZ(this,e,t,r,a),this}setNodeAttribute(e,t,r){return this.step(new _p(e,t,r)),this}setDocAttribute(e,t){return this.step(new jg(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 CZ(this,e,t,r),this}addMark(e,t,r){return pZ(this,e,t,r),this}removeMark(e,t,r){return hZ(this,e,t,r),this}clearIncompatible(e,t,r){return aR(this,e,t,r),this}}var rB=65535,oB,aB=1,iB=2,Xx=4,sB=8,eR,Ec,xa,Tc,Sd,gn,Cn,_p,jg,Bp;var Rc=N(()=>{Ws();oB=Math.pow(2,16);Ko.empty=new Ko([]);eR=Object.create(null);Ec=class Ec extends br{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(oR(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 jn.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))}};br.jsonID("addMark",Ec);xa=class xa extends br{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(oR(t.content,(a)=>a.mark(this.mark.removeFromSet(a.marks)),e),t.openStart,t.openEnd);return jn.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))}};br.jsonID("removeMark",xa);Tc=class Tc extends br{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return jn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return jn.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))}};br.jsonID("addNodeMark",Tc);Sd=class Sd extends br{constructor(e,t){super();this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return jn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return jn.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))}};br.jsonID("removeNodeMark",Sd);gn=class gn extends br{constructor(e,t,r,a=!1){super();this.from=e,this.to=t,this.slice=r,this.structure=a}apply(e){if(this.structure&&rR(e,this.from,this.to))return jn.fail("Structure replace would overwrite content");return jn.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;br.jsonID("replace",gn);Cn=class Cn extends br{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&&(rR(e,this.from,this.gapFrom)||rR(e,this.gapTo,this.to)))return jn.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return jn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);if(!r)return jn.fail("Content does not fit in gap");return jn.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)}};br.jsonID("replaceAround",Cn);_p=class _p extends br{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 jn.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 jn.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 _p(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 _p(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 _p(t.pos,t.attr,t.value)}};br.jsonID("attr",_p);jg=class jg extends br{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 jn.ok(r)}getMap(){return Ko.empty}invert(e){return new jg(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 jg(t.attr,t.value)}};br.jsonID("docAttr",jg);Bp=class extends Error{};Bp=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};Bp.prototype=Object.create(Error.prototype);Bp.prototype.constructor=Bp;Bp.prototype.name="TransformError"});var ti=N(()=>{Rc()});class Fe{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Gg(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)yB(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),yB(e,r,t.isInline?-1:1)}}static findFrom(e,t,r=!1){let a=e.parent.inlineContent?new Me(e):Hp(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?Hp(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):Hp(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 yr(e.node(0))}static atStart(e){return Hp(e,e,0,0,1)||new yr(e)}static atEnd(e){return Hp(e,e,e.content.size,e.childCount,-1)||new yr(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let r=iR[t.type];if(!r)throw RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in iR)throw RangeError("Duplicate use of selection JSON ID "+e);return iR[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Me.between(this.$anchor,this.$head).getBookmark()}}class Gg{constructor(e,t){this.$from=e,this.$to=t}}function bB(e){if(!gB&&!e.parent.inlineContent)gB=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")")}class n1{constructor(e,t){this.anchor=e,this.head=t}map(e){return new n1(e.map(this.anchor),e.map(this.head))}resolve(e){return Me.between(e.resolve(this.anchor),e.resolve(this.head))}}class lR{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new n1(r,r):new lR(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 Hp(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=Hp(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 yB(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,g)=>{if(c==null)c=g}),e.setSelection(Fe.near(e.doc.resolve(c),r))}function $B(e,t){return!t||!e?e:e.bind(t)}class Up{constructor(e,t,r){this.name=e,this.init=$B(t.init,r),this.apply=$B(t.apply,r)}}class t1{constructor(e,t){if(this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=DZ.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 Up(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 g=0;g<this.config.plugins.length;g++)a.push(g<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 SB(this)}static create(e){let t=new t1(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 t1(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 t1(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 CB(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=CB(i,t,{});r[a]=i}return r}class qe{constructor(e){if(this.spec=e,this.props={},e.props)CB(e.props,this,this.props);this.key=e.key?e.key.key:wB("plugin")}getState(e){return e[this.key]}}function wB(e){if(e in sR)return e+"$"+ ++sR[e];return sR[e]=0,e+"$"}class Qe{constructor(e="key"){this.key=wB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}var iR,gB=!1,Me,Pe,yr,OZ,vB=1,e1=2,xB=4,SB,DZ,sR;var Js=N(()=>{Ws();Rc();iR=Object.create(null);Fe.prototype.visible=!0;Me=class Me extends Fe{constructor(e,t=e){bB(e),bB(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 n1(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 lR(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);yr=class yr 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 yr(e)}map(e){return new yr(e)}eq(e){return e instanceof yr}getBookmark(){return OZ}};Fe.jsonID("all",yr);OZ={map(){return this},resolve(e){return new yr(e)}};SB=class SB extends qg{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|vB)&~e1,this.storedMarks=null,this}get selectionSet(){return(this.updated&vB)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=e1,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&e1)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~e1,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|=xB,this}get scrolledIntoView(){return(this.updated&xB)>0}};DZ=[new Up("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Up("selection",{init(e,t){return e.selection||Fe.atStart(t.doc)},apply(e){return e.selection}}),new Up("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,a){return a.selection.$cursor?e.storedMarks:null}}),new Up("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];sR=Object.create(null)});function RB(e,t){let{$cursor:r}=e.selection;if(!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0))return null;return r}function MB(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 g=i.lastChild;if(!g)return!1;i=g}let c=t.nodeAfter,u=c,f=t.pos+1;for(;!u.isTextblock;f++){if(u.type.spec.isolating)return!1;let g=u.firstChild;if(!g)return!1;u=g}let h=Kg(e.doc,l,f,Se.empty);if(!h||h.from!=l||h instanceof gn&&h.slice.size>=f-l)return!1;if(r){let g=e.tr.step(h);g.setSelection(Me.create(g.doc,l)),r(g.scrollIntoView())}return!0}function Fp(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 fR(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 NB(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 mR(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 bR(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 PZ(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=bR(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 g=t.tr;if(t.selection instanceof Me||t.selection instanceof yr)g.deleteSelection();let b=g.mapping.map(a.pos),y=qo(g.doc,b,l.length,l);if(!y)l[0]=u?{type:u}:null,y=qo(g.doc,b,l.length,l);if(!y)return!1;if(g.split(b,l.length,l),!f&&h&&a.node(c).type!=u){let v=g.mapping.map(a.before(c)),S=g.doc.resolve(v);if(u&&a.node(c-1).canReplaceWith(S.index(),S.index()+1,u))g.setNodeMarkup(g.mapping.map(a.before(c)),u)}if(r)r(g.scrollIntoView());return!0}}function IZ(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 _B(e,t,r,a){let{nodeBefore:i,nodeAfter:l}=t,c,u,f=i.type.spec.isolating||l.type.spec.isolating;if(!f&&IZ(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 g=l.type.spec.isolating||a>0&&f?null:Fe.findFrom(t,1),b=g&&g.$from.blockRange(g.$to),y=b&&Ys(b);if(y!=null&&y>=t.depth){if(r)r(e.tr.lift(b,y).scrollIntoView());return!0}if(h&&Fp(l,"start",!0)&&Fp(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 IB(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 BB(e,t=null){return function(r,a){let{$from:i,$to:l}=r.selection,c=i.blockRange(l),u=c&&zp(c,e,t);if(!u)return!1;if(a)a(r.tr.wrap(c,u).scrollIntoView());return!0}}function CR(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 g=r.doc.resolve(h),b=g.index();i=g.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 wR(...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 TB=(e,t)=>{if(e.selection.empty)return!1;if(t)t(e.tr.deleteSelection().scrollIntoView());return!0},uR=(e,t,r)=>{let a=RB(e,r);if(!a)return!1;let i=fR(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(_B(e,i,t,-1))return!0;if(a.parent.content.size==0&&(Fp(l,"end")||Pe.isSelectable(l)))for(let c=a.depth;;c--){let u=Kg(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(Fp(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},kB=(e,t,r)=>{let a=RB(e,r);if(!a)return!1;let i=fR(a);return i?MB(e,i,t):!1},AB=(e,t,r)=>{let a=NB(e,r);if(!a)return!1;let i=mR(a);return i?MB(e,i,t):!1},dR=(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=fR(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},pR=(e,t,r)=>{let a=NB(e,r);if(!a)return!1;let i=mR(a);if(!i)return!1;let l=i.nodeAfter;if(_B(e,i,t,1))return!0;if(a.parent.content.size==0&&(Fp(l,"start")||Pe.isSelectable(l))){let c=Kg(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(Fp(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},hR=(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=mR(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},OB=(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},DB=(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},PB=(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},gR=(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},yR=(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=bR(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},vR=(e,t)=>{let r=e.selection,{$from:a,$to:i}=r;if(r instanceof yr||a.parent.inlineContent||i.parent.inlineContent)return!1;let l=bR(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},xR=(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},LZ,LB=(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},_Z=(e,t)=>{if(t)t(e.tr.setSelection(new yr(e.doc)));return!0},$R,SR,cR,EB,Ac,BZ,_Re;var zB=N(()=>{Rc();Ws();Js();LZ=PZ();$R=IB(-1),SR=IB(1);cR=wR(TB,uR,dR),EB=wR(TB,pR,hR),Ac={Enter:wR(gR,vR,xR,LZ),"Mod-Enter":yR,Backspace:cR,"Mod-Backspace":cR,"Shift-Backspace":cR,Delete:EB,"Mod-Delete":EB,"Mod-a":_Z},BZ={"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":$R,"Ctrl-e":SR};for(let e in Ac)BZ[e]=Ac[e];_Re=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1});var Ar=N(()=>{zB()});var at=N(()=>{Js()});var Sa=N(()=>{Ws()});function HB(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(!zZ(u,c,e,t))return!1;if(a)a(u.scrollIntoView());return!0}}function zZ(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 Lp(f,f,t.depth),t.endIndex<t.parent.childCount)t=new Lp(t.$from,c.resolve(t.$to.end(t.depth)),t.depth);i=!0}let u=zp(l,r,a,t);if(!u)return!1;if(e)HZ(e,t,u,i,r);return!0}function HZ(e,t,r,a,i){let l=le.empty;for(let g=r.length-1;g>=0;g--)l=le.from(r[g].type.create(r[g].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 g=0;g<r.length;g++)if(r[g].type==i)c=g+1;let u=r.length-c,f=t.start+r.length-(a?2:0),h=t.parent;for(let{startIndex:g,endIndex:b}=t,y=!0;g<b;g++,y=!1){if(!y&&qo(e.doc,f,u))e.split(f,u),f+=2*u;f+=h.child(g).nodeSize}return e}function UB(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 UZ(t,r,e,l);else return FZ(t,r,l)}}function UZ(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 Lp(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 FZ(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),g=l.index(-1);if(!h.canReplace(g+(u?0:1),g+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 FB(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,g=le.from(h?e.create():null),b=new Se(le.from(e.create(null,le.from(u.type.create(null,g)))),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 VB=N(()=>{Rc();Ws()});var r1=N(()=>{VB()});function jB(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||eb(e)||jZ.test(e.nodeName)||e.contentEditable=="false")return!1;t=vr(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 KZ(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&&!eb(e))t=vr(e),e=e.parentNode;else return null}}function qZ(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&&!eb(e))t=vr(e)+1,e=e.parentNode;else return null}}function GZ(e,t,r){for(let a=t==0,i=t==wa(e);a||i;){if(e==r)return!0;let l=vr(e);if(e=e.parentNode,!e)return!1;a=a&&l==0,i=i&&l==wa(e)}}function eb(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 WZ(e){let t=e.activeElement;while(t&&t.shadowRoot)t=t.shadowRoot.activeElement;return t}function YZ(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 XZ(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 QZ(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 qB(e,t,r){if(!PR(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=qp(c);continue}let u=c,f=u==l.body,h=f?XZ(l):QZ(u),g=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"))g=-(h.left-t.left+Xs(i,"left"));else if(t.right>h.right-Xs(a,"right"))g=t.right-h.right+Xs(i,"right");if(g||b)if(f)l.defaultView.scrollBy(g,b);else{let{scrollLeft:v,scrollTop:S}=u;if(b)u.scrollTop+=b;if(g)u.scrollLeft+=g;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:qp(c)}}function ZZ(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:Cz(e.dom)}}function Cz(e){let t=[],r=e.ownerDocument;for(let a=e;a;a=qp(a))if(t.push({dom:a,top:a.scrollTop,left:a.scrollLeft}),e==r)break;return t}function eee({refDOM:e,refTop:t,stack:r}){let a=e?e.getBoundingClientRect().top:0;wz(r,a==0?0:a-t)}function wz(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 tee(e){if(e.setActive)return e.setActive();if(Vp)return e.focus(Vp);let t=Cz(e);if(e.focus(Vp==null?{get preventScroll(){return Vp={preventScroll:!0},!0}}:void 0),!Vp)Vp=!1,wz(t,0)}function Ez(e,t){let r,a=200000000,i,l=0,c=t.top,u=t.top,f,h;for(let g=e.firstChild,b=0;g;g=g.nextSibling,b++){let y;if(g.nodeType==1)y=g.getClientRects();else if(g.nodeType==3)y=Qs(g).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=g,a=w,i=w&&r.nodeType==3?{left:S.right<t.left?S.right:S.left,top:t.top}:t,g.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=g,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 nee(r,i);if(!r||a&&r.nodeType==1)return{node:e,offset:l};return Ez(r,i)}function nee(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(UR(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 UR(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ree(e,t){let r=e.parentNode;if(r&&/^li$/i.test(r.nodeName)&&t.left<e.getBoundingClientRect().left)return r;return e}function oee(e,t,r){let{node:a,offset:i}=Ez(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 aee(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 Tz(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(UR(t,h))return Tz(c,t,h)}}if((l=(l+1)%a)==i)break}return e}function iee(e,t){let r=e.dom.ownerDocument,a,i=0,l=YZ(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(!UR(t,h))return null;if(c=Tz(e.dom,t,h),!c)return null}if(Nr){for(let h=c;a&&h;h=qp(h))if(h.draggable)a=void 0}if(c=ree(c,t),a){if(Ea&&a.nodeType==1){if(i=Math.min(i,a.childNodes.length),i<a.childNodes.length){let g=a.childNodes[i],b;if(g.nodeName=="IMG"&&(b=g.getBoundingClientRect()).right<=t.left&&b.bottom>t.top)i++}}let h;if(tb&&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=aee(e,a,i,t)}if(u==null)u=oee(e,c,t);let f=e.docView.nearestDesc(c,!0);return{pos:u,inside:f?f.posAtStart-f.border:-1}}function PR(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(PR(a))return a}return Array.prototype.find.call(r,PR)||e.getBoundingClientRect()}function Rz(e,t,r){let{node:a,offset:i,atom:l}=e.docView.domFromPos(t,r<0?-1:1),c=tb||Ea;if(a.nodeType==3)if(c&&(see.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 g=Mc(Qs(a,i,i+1),-1);if(g.top!=f.top)return Wg(g,g.left<h.left)}}return f}else{let f=i,h=i,g=r<0?1:-1;if(r<0&&!i)h++,g=-1;else if(r>=0&&i==a.nodeValue.length)f--,g=1;else if(r<0)f--;else h++;return Wg(Mc(Qs(a,f,h),g),g<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 ER(f.getBoundingClientRect(),!1)}if(l==null&&i<wa(a)){let f=a.childNodes[i];if(f.nodeType==1)return ER(f.getBoundingClientRect(),!0)}return ER(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 Wg(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 Wg(Mc(h,-1),!0)}return Wg(Mc(a.nodeType==3?Qs(a):a,-r),r>=0)}function Wg(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 ER(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 kz(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 lee(e,t,r){let a=t.selection,i=r=="up"?a.$from:a.$to;return kz(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=Rz(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 g=f[h];if(g.bottom>g.top+1&&(r=="up"?c.top-g.top>(g.bottom-c.top)*2:g.bottom-c.bottom>(c.bottom-g.top)*2))return!1}}return!0})}function uee(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(!cee.test(a.parent.textContent)||!u.modify)return r=="left"||r=="backward"?l:c;return kz(e,t,()=>{let{focusNode:f,focusOffset:h,anchorNode:g,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(g,b),f&&(f!=g||h!=b)&&u.extend)u.extend(f,h)}catch(R){}if(y!=null)u.caretBidiLevel=y;return E})}function dee(e,t,r){if(GB==t&&WB==r)return YB;return GB=t,WB=r,YB=r=="up"||r=="down"?lee(e,t,r):uee(e,t,r)}class Wp{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>vr(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 VR){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 FR&&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?vr(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?vr(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 g=c;g>0;g--){let b=this.children[g-1];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(1)){a=vr(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 g=this.children[h];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(-1)){i=vr(g.dom);break}t+=g.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(),g=!1;if((Ea||Nr)&&e==t){let{node:y,offset:v}=c;if(y.nodeType==3){if(g=!!(v&&y.nodeValue[v-1]==`
|
|
257
|
+
`),g&&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:vr(w)+1};break}let E=S.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let S=y.childNodes[v-1];g=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||g&&Nr)&&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)&&!(g&&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:JB,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:JB;if(t.dirty<r)t.dirty=r}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}function XB(e,t,r,a,i){Dz(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 Nz(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=QB(a),i=!0;a=a.nextSibling}else i=!0,e.insertBefore(u,a);if(c instanceof Pc){let f=a?a.previousSibling:e.lastChild;Nz(c.contentDOM,c.children,r),a=f?f.nextSibling:e.firstChild}}while(a)a=QB(a),i=!0;if(i&&r.trackWrites==e)r.trackWrites=null}function LR(e,t,r){if(e.length==0)return Td;let a=r?Td[0]:new Yg,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 Yg(c.nodeName));for(let u in c){let f=c[u];if(f==null)continue;if(r&&i.length==1)i.push(a=new Yg(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 Oz(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}fee(i,u||Td[0],c)}return i}function fee(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 Dz(e,t,r){return Oz(e,e,Td,LR(t,r,e.nodeType!=1))}function o1(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 QB(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Pz{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=pee(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 g=this.top.children[h];if(g.matchesMark(e[l])&&!this.isLocked(g.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,g,b=this.isLocked(h)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=ni&&o1(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&&(g=this.recreateWrapper(u,e,t,r,a,l))){if(this.destroyBetween(this.index,c),this.top.children[this.index]=g,g.contentDOM)g.dirty=Ed,g.updateChildren(a,l+1),g.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)||!o1(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 FR(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 u1)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text)){if((Nr||xr)&&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 VR(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 pee(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 hee(e,t){return e.type.side-t.type.side}function mee(e,t,r,a){let i=t.locals(e),l=0;if(i.length==0){for(let h=0;h<e.childCount;h++){let g=e.child(h);a(g,i,t.forChild(l,g),h),l+=g.nodeSize}return}let c=0,u=[],f=null;for(let h=0;;){let g,b;while(c<i.length&&i[c].to==l){let E=i[c++];if(E.widget)if(!g)g=E;else(b||(b=[g])).push(E)}if(g)if(b){b.sort(hee);for(let E=0;E<b.length;E++)r(b[E],h,!!f)}else r(g,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 gee(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 bee(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 _R(e,t,r,a,i){let l=[];for(let c=0,u=0;c<e.length;c++){let f=e[c],h=u,g=u+=f.size;if(h>=r||g<=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(g>r)l.push(f.slice(r-h,f.size,a))}}return l}function jR(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(c1(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&&GZ(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 g=a.resolve(f);if(!h){let b=t=="pointer"||e.state.selection.head<u.pos&&!l?1:-1;h=KR(e,g,u,b)}return h}function Lz(e){return e.editable?e.hasFocus():Iz(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function tl(e,t=!1){let r=e.state.selection;if(_z(e,r),!Lz(e))return;let a=e.input.mouseDown;if(!t&&xr&&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)vee(e);else{let{anchor:i,head:l}=r,c,u;if(ZB&&!(r instanceof Me)){if(!r.$from.parent.inlineContent)c=ez(e,r.from);if(!r.empty&&!r.$from.parent.inlineContent)u=ez(e,r.to)}if(e.docView.setSelection(i,l,e,t),ZB){if(c)tz(c);if(u)tz(u)}if(r.visible)e.dom.classList.remove("ProseMirror-hideselection");else if(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document)yee(e)}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}function ez(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(Nr&&i&&i.contentEditable=="false")return TR(i);if((!i||i.contentEditable=="false")&&(!l||l.contentEditable=="false")){if(i)return TR(i);else if(l)return TR(l)}}function TR(e){if(e.contentEditable="true",Nr&&e.draggable)e.draggable=!1,e.wasDraggable=!0;return e}function tz(e){if(e.contentEditable="false",e.wasDraggable)e.draggable=!0,e.wasDraggable=null}function yee(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(!Lz(e)||e.state.selection.visible)e.dom.classList.remove("ProseMirror-hideselection")},20)})}function vee(e){let t=e.domSelection();if(!t)return;let r=e.cursorWrapper.dom,a=r.nodeName=="IMG";if(a)t.collapse(r.parentNode,vr(r)+1);else t.collapse(r,0);if(!a&&!e.state.selection.visible&&go&&Dc<=11)r.disabled=!0,r.disabled=!1}function _z(e,t){if(t instanceof Pe){let r=e.docView.descAt(t.from);if(r!=e.lastSelectedViewDesc){if(nz(e),r)r.selectNode();e.lastSelectedViewDesc=r}}else nz(e)}function nz(e){if(e.lastSelectedViewDesc){if(e.lastSelectedViewDesc.parent)e.lastSelectedViewDesc.deselectNode();e.lastSelectedViewDesc=void 0}}function KR(e,t,r,a){return e.someProp("createSelectionBetween",(i)=>i(e,t,r))||Me.between(t,r,a)}function rz(e){if(e.editable&&!e.hasFocus())return!1;return Iz(e)}function Iz(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 xee(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 IR(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 oz(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=IR(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(tb)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=IR(e.state,t);if(i)return Nc(e,i);return!1}}function a1(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Jg(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function jp(e,t){return t<0?$ee(e):See(e)}function $ee(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<a1(r)&&Jg(r.childNodes[a],-1))c=!0;for(;;)if(a>0)if(r.nodeType!=1)break;else{let u=r.childNodes[a-1];if(Jg(u,-1))i=r,l=--a;else if(u.nodeType==3)r=u,a=r.nodeValue.length;else break}else if(Bz(r))break;else{let u=r.previousSibling;while(u&&Jg(u,-1))i=r.parentNode,l=vr(u),u=u.previousSibling;if(!u){if(r=r.parentNode,r==e.dom)break;a=0}else r=u,a=a1(r)}if(c)BR(e,r,a);else if(i)BR(e,i,l)}function See(e){let t=e.domSelectionRange(),r=t.focusNode,a=t.focusOffset;if(!r)return;let i=a1(r),l,c;for(;;)if(a<i){if(r.nodeType!=1)break;let u=r.childNodes[a];if(Jg(u,1))l=r,c=++a;else break}else if(Bz(r))break;else{let u=r.nextSibling;while(u&&Jg(u,1))l=u.parentNode,c=vr(u)+1,u=u.nextSibling;if(!u){if(r=r.parentNode,r==e.dom)break;a=i=0}else r=u,a=0,i=a1(r)}if(l)BR(e,l,c)}function Bz(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Cee(e,t){while(e&&t==e.childNodes.length&&!eb(e))t=vr(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 wee(e,t){while(e&&!t&&!eb(e))t=vr(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 BR(e,t,r){if(t.nodeType!=3){let l,c;if(c=Cee(t,r))t=c,r=0;else if(l=wee(t,r))t=l,r=l.nodeValue.length}let a=e.domSelection();if(!a)return;if(c1(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 az(e,t){let r=e.state.doc.resolve(t);if(!(xr||Sz)&&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 iz(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=IR(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 yr?Fe.near(c,t):Fe.findFrom(c,t);return u?Nc(e,u):!1}return!1}function sz(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 lz(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function Eee(e){if(!Nr||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;lz(e,a,"true"),setTimeout(()=>lz(e,a,"false"),20)}return!1}function Tee(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 Ree(e,t){let r=t.keyCode,a=Tee(t);if(r==8||Ca&&r==72&&a=="c")return sz(e,-1)||jp(e,-1);else if(r==46&&!t.shiftKey||Ca&&r==68&&a=="c")return sz(e,1)||jp(e,1);else if(r==13||r==27)return!0;else if(r==37||Ca&&r==66&&a=="c"){let i=r==37?az(e,e.state.selection.from)=="ltr"?-1:1:-1;return oz(e,i,a)||jp(e,i)}else if(r==39||Ca&&r==70&&a=="c"){let i=r==39?az(e,e.state.selection.from)=="ltr"?1:-1:1;return oz(e,i,a)||jp(e,i)}else if(r==38||Ca&&r==80&&a=="c")return iz(e,-1,a)||jp(e,-1);else if(r==40||Ca&&r==78&&a=="c")return Eee(e)||iz(e,1,a)||jp(e,1);else if(a==(Ca?"m":"c")&&(r==66||r==73||r==89||r==90))return!0;return!1}function qR(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=jz(),f=u.createElement("div");f.appendChild(c.serializeFragment(a,{document:u}));let h=f.firstChild,g,b=0;while(h&&h.nodeType==1&&(g=Vz[h.nodeName.toLowerCase()])){for(let v=g.length-1;v>=0;v--){let S=u.createElement(g[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 zz(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=Nee(r),tb)Oee(c);let h=c&&c.querySelector("[data-pm-slice]"),g=h&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(h.getAttribute("data-pm-slice")||"");if(g&&g[3])for(let b=+g[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||g),context:i,ruleFromNode(y){if(y.nodeName=="BR"&&!y.nextSibling&&y.parentNode&&!kee.test(y.parentNode.nodeName))return{ignore:!0};return null}});if(g)u=Dee(cz(u,+g[1],+g[2]),g[4]);else if(u=Se.maxOpen(Aee(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=cz(u,b,y)}return e.someProp("transformPasted",(b)=>{u=b(u,e,f)}),u}function Aee(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&&Uz(f,l,u,c[c.length-1],0))c[c.length-1]=h;else{if(c.length)c[c.length-1]=Fz(c[c.length-1],l.length);let g=Hz(u,f);c.push(g),i=i.matchType(g.type),l=f}}),c)return le.from(c)}return e}function Hz(e,t,r=0){for(let a=t.length-1;a>=r;a--)e=t[a].create(null,le.from(e));return e}function Uz(e,t,r,a,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let l=Uz(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(Hz(r,e,i+1))))}}function Fz(e,t){if(t==0)return e;let r=e.content.replaceChild(e.childCount-1,Fz(e.lastChild,t-1)),a=e.contentMatchAt(e.childCount).fillBefore(le.empty,!0);return e.copy(r.append(a))}function zR(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=zR(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 cz(e,t,r){if(t<e.openStart)e=new Se(zR(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd);if(r<e.openEnd)e=new Se(zR(e.content,1,r,e.openEnd,0,0),e.openStart,r);return e}function jz(){return document.implementation.createHTMLDocument("title")}function Mee(e){let t=window.trustedTypes;if(!t)return e;if(!RR)RR=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:(r)=>r});return RR.createHTML(e)}function Nee(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);if(t)e=e.slice(t[0].length);let r=jz(),a=r.body,i=/<([a-z][^>\s]+)/i.exec(e),l;if(l=i&&Vz[i[1].toLowerCase()])e=l.map((c)=>"<"+c+">").join("")+e+l.map((c)=>"</"+c+">").reverse().join("");if(a.innerHTML=Mee(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 g=a.querySelectorAll(h.selectorText);for(let b=0;b<g.length;b++)g[b].style.cssText+=h.style.cssText}}}return a}function Oee(e){let t=e.querySelectorAll(xr?"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 Dee(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 Kz{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 Lee(e){for(let t in Yr){let r=Yr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=(a)=>{if(Iee(e,a)&&!GR(e,a)&&(e.editable||!(a.type in Jr)))r(e,a)},Pee[t]?{passive:!0}:void 0)}if(Nr)e.dom.addEventListener("input",()=>null);HR(e)}function el(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function _ee(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 HR(e){e.someProp("handleDOMEvents",(t)=>{for(let r in t)if(!e.input.eventHandlers[r])e.dom.addEventListener(r,e.input.eventHandlers[r]=(a)=>GR(e,a))})}function GR(e,t){return e.someProp("handleDOMEvents",(r)=>{let a=r[t.type];return a?a(e,t)||t.defaultPrevented:!1})}function Iee(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 Bee(e,t){if(!GR(e,t)&&Yr[t.type]&&(e.editable||!(t.type in Jr)))Yr[t.type](e,t)}function nb(e){return{left:e.clientX,top:e.clientY}}function zee(e,t){let r=t.x-e.clientX,a=t.y-e.clientY;return r*r+a*a<100}function WR(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 rb(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 Hee(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 rb(e,new Pe(r),"pointer"),!0;return!1}function Uee(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 rb(e,Pe.create(e.state.doc,i),"pointer"),!0;else return!1}function Fee(e,t,r,a,i){return WR(e,"handleClickOn",t,r,a)||e.someProp("handleClick",(l)=>l(e,t,a))||(i?Uee(e,r):Hee(e,r))}function Vee(e,t,r,a){return WR(e,"handleDoubleClickOn",t,r,a)||e.someProp("handleDoubleClick",(i)=>i(e,t,a))}function jee(e,t,r,a){return WR(e,"handleTripleClickOn",t,r,a)||e.someProp("handleTripleClick",(i)=>i(e,t,a))||Kee(e,r,a)}function Kee(e,t,r){if(r.button!=0)return!1;let a=qz(e,t,!0),i=e.state.doc;if(!a)return!1;if(rb(e,a,"pointer"),a instanceof Me&&i.eq(e.state.doc))e.input.mouseDown=new Yz(e,a);return!0}function qz(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 YR(e){return i1(e)}class JR{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 Jz(e,t){if(e.composing)return!0;if(Nr&&Math.abs(Date.now()-e.input.compositionEndedAt)<500)return e.input.compositionEndedAt=-200000000,!0;return!1}function Gee(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 Xz(e,t){if(clearTimeout(e.input.composingTimeout),t>-1)e.input.composingTimeout=setTimeout(()=>i1(e),t)}function Qz(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 Wee(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let r=KZ(t.focusNode,t.focusOffset),a=qZ(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 i1(e,t=!1){if(Zs&&e.domObserver.flushingSoon>=0)return;if(e.domObserver.forceFlush(),Qz(e),t||e.docView&&e.docView.dirty){let r=jR(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 Yee(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 Jee(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Xee(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)Qg(e,a.value,null,i,t);else Qg(e,a.textContent,a.innerHTML,i,t)},50)}function Qg(e,t,r,a,i){let l=zz(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=Jee(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 Zz(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 XR{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}function eH(e,t){let r;return e.someProp("dragCopies",(a)=>{r=r||a(t)}),r!=null?!r:!t[Qee]}function Zee(e,t,r){if(!t.dataTransfer)return;let a=e.posAtCoords(nb(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=zz(e,Zz(t.dataTransfer),Xg?null:t.dataTransfer.getData("text/html"),!1,i);let c=!!(r&&eH(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?Zx(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),g=l.openStart==0&&l.openEnd==0&&l.content.childCount==1,b=f.doc;if(g)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(g&&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(KR(e,y,f.doc.resolve(v)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))}function Zg(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 s1{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 Yn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof s1&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Zg(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 Yn(i,l,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof _c&&Zg(this.attrs,e.attrs)&&Zg(this.spec,e.spec)}static is(e){return e.type instanceof _c}destroy(){}}class QR{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 Yn(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 QR&&Zg(this.attrs,e.attrs)&&Zg(this.spec,e.spec)}destroy(){}}class Yn{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new Yn(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 Yn(e,e,new s1(t,r))}static inline(e,t,r,a){return new Yn(e,t,new _c(r,a))}static node(e,t,r,a){return new Yn(e,t,new QR(r,a))}get spec(){return this.type.spec}get inline(){return this.type instanceof _c}get widget(){return this.type instanceof s1}}class Lt{constructor(e,t){this.local=e.length?e:Kp,this.children=t.length?t:Kp}static create(e,t){return t.length?l1(t,e,0,Rd):Mr}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==Mr||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 ete(this.children,l||[],e,t,r,a,i);else return l?new Lt(l.sort(kd),Kp):Mr}add(e,t){if(!t.length)return this;if(this==Mr)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=nH(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,l1(h,c,f+1,Rd));i+=3});let l=tH(i?rH(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==Mr)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,g;h<e.length;h++)if(g=e[h]){if(g.from>c&&g.to<u)e[h]=null,(l||(l=[])).push(g)}if(!l)continue;if(r==this.children)r=this.children.slice();let f=r[i+2].removeInner(l,c+1);if(f!=Mr)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):Mr}forChild(e,t){if(this==Mr)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),Kp);return r?new Oc([c,r]):c}return r||Mr}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 ZR(this.localsInner(e))}localsInner(e){if(this==Mr)return Kp;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==Mr)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?ZR(r?t:t.sort(kd)):Kp}static from(e){switch(e.length){case 0:return Mr;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 ete(e,t,r,a,i,l,c){let u=e.slice();for(let h=0,g=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+g-b)continue;let H=u[R]+g-b;if(v>=H)u[R+1]=y<=H?-2:-1;else if(y>=g&&E)u[R]+=E,u[R+1]+=E}b+=E}),g=r.maps[h].map(g,-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 g=r.map(e[h]+l),b=g-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,g+1,e[h]+l+1,c);if(R!=Mr)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=tte(u,e,t,r,i,l,c),g=l1(h,a,0,c);t=g.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<g.children.length;b+=3){let v=g.children[b];while(y<u.length&&u[y]<v)y+=3;u.splice(y,0,g.children[b],g.children[b+1],g.children[b+2])}}return new Lt(t.sort(kd),u)}function tH(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 Yn(i.from+t,i.to+t,i.type))}return r}function tte(e,t,r,a,i,l,c){function u(f,h){for(let g=0;g<f.local.length;g++){let b=f.local[g].map(a,i,h);if(b)r.push(b);else if(c.onRemove)c.onRemove(f.local[g].spec)}for(let g=0;g<f.children.length;g+=3)u(f.children[g+2],f.children[g]+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 nH(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 rH(e){let t=[];for(let r=0;r<e.length;r++)if(e[r]!=null)t.push(e[r]);return t}function l1(e,t,r,a){let i=[],l=!1;t.forEach((u,f)=>{let h=nH(e,u,f+r);if(h){l=!0;let g=l1(h,u,r+f+1,a);if(g!=Mr)i.push(f,f+u.nodeSize,g)}});let c=tH(l?rH(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):Mr}function kd(e,t){return e.from-t.from||e.to-t.to}function ZR(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),uz(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),uz(t,i,a.copy(l.from,a.to))}break}}}return t}function uz(e,t,r){while(t<e.length&&kd(r,e[t])>0)t++;e.splice(t,0,r)}function kR(e){let t=[];if(e.someProp("decorations",(r)=>{let a=r(e.state);if(a&&a!=Mr)t.push(a)}),e.cursorWrapper)t.push(Lt.create(e.state.doc,[e.cursorWrapper.deco]));return Oc.from(t)}class oH{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 aH{constructor(e,t){if(this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new oH,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(Nr&&e.composing&&r.some((a)=>a.type=="childList"&&a.target.nodeName=="TR"))e.input.badSafariComposition=!0,this.flushSoon();else this.flush()}),rte)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,nte);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(!rz(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=qp(i))t.add(i);for(let i=e.anchorNode;i;i=qp(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)&&rz(e)&&!this.ignoreSelectionChange(r),i=-1,l=-1,c=!1,u=[];if(e.editable)for(let h=0;h<t.length;h++){let g=this.registerMutation(t[h],u);if(g){if(i=i<0?g.from:Math.min(g.from,i),l=l<0?g.to:Math.max(g.to,l),g.typeOver)c=!0}}if(u.some((h)=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||xr&&(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 g=h.nextSibling;while(g&&g.nodeType==1){if(g.contentEditable=="false"){h.parentNode.removeChild(h);break}g=g.firstChild}}}else if(Ea&&u.length){let h=u.filter((g)=>g.nodeName=="BR");if(h.length==2){let[g,b]=h;if(g.parentNode&&g.parentNode.parentNode==b.parentNode)b.remove();else g.remove()}else{let{focusNode:g}=this.currentSelection;for(let b of h){let y=b.parentNode;if(y&&y.nodeName=="LI"&&(!g||ite(e,g)!=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&&c1(r)&&(f=jR(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),ote(e);if(e.input.badSafariComposition)e.input.badSafariComposition=!1,ste(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 g=e.addedNodes[h];if(t.push(g),g.nodeType==3)this.lastChangedTextNode=g}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:g,nextSibling:b}=e.addedNodes[h];if(!g||Array.prototype.indexOf.call(e.addedNodes,g)<0)a=g;if(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)i=b}let l=a&&a.parentNode==e.target?vr(a)+1:0,c=r.localPosFromDOM(e.target,l,-1),u=i&&i.parentNode==e.target?vr(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 ote(e){if(dz.has(e))return;if(dz.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1){if(e.requiresGeckoHackNode=Ea,fz)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."),fz=!0}}function pz(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 ate(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return pz(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?pz(e,r):null}function ite(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 ste(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 lte(e,t,r,a){let{node:i,fromOffset:l,toOffset:c,from:u,to:f}=e.docView.parseRange(t,r),h=e.domSelectionRange(),g,b=h.anchorNode;if(b&&e.dom.contains(b.nodeType==1?b:b.parentNode)){if(g=[{node:b,offset:h.anchorOffset}],!c1(h))g.push({node:h.focusNode,offset:h.focusOffset})}if(xr&&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:g,ruleFromNode:cte(a),context:S});if(g&&g[0].pos!=null){let R=g[0].pos,D=g[1]&&g[1].pos;if(D==null)D=R;w={anchor:R+u,head:D+u}}return{doc:E,sel:w,from:u,to:f}}function dte(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=jR(e,U);if(P&&!e.state.selection.eq(P)){if(xr&&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=lte(e,t,r,i),g=e.state.doc,b=g.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=hte(b.content,h.doc.content,h.from,y,v);if(S)e.input.domChangeCount++;if((Gp&&e.input.lastIOSEnter>Date.now()-225||Zs)&&i.some((U)=>U.nodeType==1&&!ute.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=hz(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=g.resolve(S.start),D=w.sameParent(E)&&w.parent.inlineContent&&R.end()>=S.endA;if((Gp&&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&&pte(g,S.start,S.endA,w,E)&&e.someProp("handleKeyDown",(U)=>U(e,wd(8,"Backspace")))){if(Zs&&xr)e.domObserver.suppressSelectionUpdates();return}if(xr&&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=hz(e,P.doc,h.sel);if(re&&!(xr&&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=g.resolve(S.start).marksAcross(g.resolve(S.endA));if(P)U.ensureMarks(P);e.dispatch(U)}else if(S.endA==S.endB&&(ee=fte(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 hz(e,t,r){if(Math.max(r.anchor,r.head)>t.content.size)return null;return KR(e,t.resolve(r.anchor),t.resolve(r.head))}function fte(e,t){let r=e.firstChild.marks,a=t.firstChild.marks,i=r,l=a,c,u,f;for(let g=0;g<a.length;g++)i=a[g].removeFromSet(i);for(let g=0;g<r.length;g++)l=r[g].removeFromSet(l);if(i.length==1&&l.length==0)u=i[0],c="add",f=(g)=>g.mark(u.addToSet(g.marks));else if(i.length==0&&l.length==1)u=l[0],c="remove",f=(g)=>g.mark(u.removeFromSet(g.marks));else return null;let h=[];for(let g=0;g<t.childCount;g++)h.push(f(t.child(g)));if(le.from(h).eq(e))return{mark:u,type:c}}function pte(e,t,r,a,i){if(r-t<=i.pos-a.pos||AR(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(AR(l,!0,!0));if(!c.parent.isTextblock||c.pos>r||AR(c,!0,!1)<r)return!1;return a.parent.content.cut(a.parentOffset).eq(c.parent.content)}function AR(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 hte(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 g=Math.max(0,l-Math.min(f,h));a-=f+g-l}if(f<l&&c<u){let g=a<=l&&a>=f?l-a:0;l-=g,h=l+(h-f),f=l}else if(h<l){let g=a<=l&&a>=h?l-a:0;l-=g,f=l+(f-h),h=l}return{start:l,endA:f,endB:h}}class d1{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 Kz,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(vz),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=bz(this),gz(this),this.nodeViews=yz(this),this.docView=XB(this.state.doc,mz(this),kR(this),this.dom,this),this.domObserver=new aH(this,(r,a,i,l)=>dte(this,r,a,i,l)),this.domObserver.start(),Lee(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)HR(this);let t=this._props;if(this._props=e,e.plugins)e.plugins.forEach(vz),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)Qz(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=yz(this);if(gte(y,this.nodeViews))this.nodeViews=y,i=!0}if(c||t.handleDOMEvents!=this._props.handleDOMEvents)HR(this);this.editable=bz(this),gz(this);let u=kR(this),f=mz(this),h=a.plugins!=e.plugins&&!a.doc.eq(e.doc)?"reset":e.scrollToSelection>a.scrollToSelection?"to selection":"preserve",g=i||!this.docView.matchesNode(e.doc,f,u);if(g||!e.selection.eq(a.selection))l=!0;let b=h=="preserve"&&l&&this.dom.style.overflowAnchor==null&&ZZ(this);if(l){this.domObserver.stop();let y=g&&(go||xr)&&!this.composing&&!a.selection.empty&&!e.selection.empty&&mte(a.selection,e.selection);if(g){let S=xr?this.trackWrites=this.domSelectionRange().focusNode:null;if(this.composing)this.input.compositionNode=Wee(this);if(i||!this.docView.update(e.doc,f,u,this))this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=XB(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())&&xee(this)&&v.delaySelUpdate()))tl(this,y);else _z(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)eee(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)qB(this,t.getBoundingClientRect(),e)}else qB(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 XR(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)tee(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 iee(this,e)}coordsAtPos(e,t=1){return Rz(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 dee(this,t||this.state,e)}pasteHTML(e,t){return Qg(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Qg(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return qR(this,e)}destroy(){if(!this.docView)return;if(_ee(this),this.destroyPluginViews(),this.mounted)this.docView.update(this.state.doc,[],kR(this),this),this.dom.textContent="";else if(this.dom.parentNode)this.dom.parentNode.removeChild(this.dom);this.docView.destroy(),this.docView=null,VZ()}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Bee(this,e)}domSelectionRange(){let e=this.domSelection();if(!e)return{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0};return Nr&&this.root.nodeType===11&&WZ(this.dom.ownerDocument)==this.dom&&ate(this,e)||e}domSelection(){return this.root.getSelection()}}function mz(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[Yn.node(0,e.state.doc.content.size,t)]}function gz(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:Yn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function bz(e){return!e.someProp("editable",(t)=>t(e.state)===!1)}function mte(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 yz(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 gte(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 vz(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 vr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},qp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},MR=null,Qs=function(e,t,r){let a=MR||(MR=document.createRange());return a.setEnd(e,r==null?e.nodeValue.length:r),a.setStart(e,t||0),a},VZ=function(){MR=null},Ad=function(e,t,r,a){return r&&(jB(e,t,r,a,-1)||jB(e,t,r,a,1))},jZ,c1=function(e){return e.focusNode&&Ad(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)},Qi,KB,Ic,NR,xz,OR,go,Dc,Ea,DR,xr,$z,Nr,Gp,Ca,Sz,Zs,tb,JZ,Vp=null,see,cee,GB=null,WB=null,YB=!1,Ta=0,JB=1,Ed=2,ni=3,FR,Az,Pc,Lc,u1,VR,Mz,Yg=function(e){if(e)this.nodeName=e},Td,ZB,kee,Vz,RR=null,Yr,Jr,Pee,Gz,Wz,Yz,qee,Xg,Qee,Kp,Rd,Mr,nte,rte,dz,fz=!1,cte=(e)=>(t)=>{let r=t.pmViewDesc;if(r)return r.parseRule(e);else if(t.nodeName=="BR"&&t.parentNode){if(Nr&&/^(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||Nr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null},ute;var e4=N(()=>{Js();Ws();Rc();jZ=/^(img|br|input|textarea|hr)$/i;Qi=typeof navigator<"u"?navigator:null,KB=typeof document<"u"?document:null,Ic=Qi&&Qi.userAgent||"",NR=/Edge\/(\d+)/.exec(Ic),xz=/MSIE \d/.exec(Ic),OR=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ic),go=!!(xz||OR||NR),Dc=xz?document.documentMode:OR?+OR[1]:NR?+NR[1]:0,Ea=!go&&/gecko\/(\d+)/i.test(Ic);Ea&&+(/Firefox\/(\d+)/.exec(Ic)||[0,0])[1];DR=!go&&/Chrome\/(\d+)/.exec(Ic),xr=!!DR,$z=DR?+DR[1]:0,Nr=!go&&!!Qi&&/Apple Computer/.test(Qi.vendor),Gp=Nr&&(/Mobile\/\w+/.test(Ic)||!!Qi&&Qi.maxTouchPoints>2),Ca=Gp||(Qi?/Mac/.test(Qi.platform):!1),Sz=Qi?/Win/.test(Qi.platform):!1,Zs=/Android \d/.test(Ic),tb=!!KB&&"webkitFontSmoothing"in KB.documentElement.style,JZ=tb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;see=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;cee=/[\u0590-\u08ac]/;FR=class FR extends Wp{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}};Az=class Az extends Wp{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 Wp{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=_R(i,t,l,r);if(e>0)i=_R(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 Wp{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,g=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:g}=Xi.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));if(!g&&!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=Dz(h,r,t),f)return u=new Mz(e,t,r,a,h,g||null,b,f);else if(t.isText)return new u1(e,t,r,a,h,b);else return new Lc(e,t,r,a,h,g||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)&&o1(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 Pz(this,l&&l.node,e);if(mee(this.node,this.innerDeco,(f,h,g)=>{if(f.spec.marks)u.syncToMarks(f.spec.marks,r,e,h);else if(f.type.side>=0&&!g)u.syncToMarks(h==this.node.childCount?Pt.none:this.node.child(h).marks,r,e,h);u.placeWidget(f,e,a)},(f,h,g,b)=>{u.syncToMarks(f.marks,r,e,b);let y;if(u.findNodeMatch(f,h,g,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,g,y,e));else if(u.updateNextNode(f,h,g,e,b,a));else u.addNode(f,h,g,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(Nz(this.contentDOM,this.children,e),Gp)gee(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=bee(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 Az(this,i,t,a);e.input.compositionNodes.push(l),this.children=_R(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(o1(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;if(this.dom=Oz(this.dom,this.nodeDOM,LR(this.outerDeco,this.node,t),LR(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}};u1=class u1 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 u1(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}};VR=class VR extends Wp{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"}};Mz=class Mz 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)}};Yg.prototype=Object.create(null);Td=[new Yg];ZB=Nr||xr&&$z<63;kee=/^(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;Vz={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={},Pee={touchstart:!0,touchmove:!0};Jr.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,Jz(e))return;if(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),Zs&&xr&&r.keyCode==13)return;if(r.keyCode!=229)e.domObserver.forceFlush();if(Gp&&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))||Ree(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(Jz(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()}};Gz=Ca?"metaKey":"ctrlKey";Yr.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let a=YR(e),i=Date.now(),l="singleClick";if(i-e.input.lastClick.time<500&&zee(r,e.input.lastClick)&&!r[Gz]&&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(nb(r));if(!c)return;if(l=="singleClick")e.input.mouseDown=new Wz(e,c,r,!!a);else if((l=="doubleClick"?Vee:jee)(e,c.pos,c.inside,r))r.preventDefault();else el(e,"pointer")};Wz=class Wz extends JR{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[Gz],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(nb(e));if(this.updateAllowDefault(e),this.allowDefault||!t)el(this.view,"pointer");else if(Fee(this.view,t.pos,t.inside,e,this.selectNode))e.preventDefault();else if(e.button==0&&(this.flushed||Nr&&this.mightDrag&&!this.mightDrag.node.isAtom||xr&&!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))rb(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}};Yz=class Yz extends JR{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(nb(e)),r=t&&qz(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];rb(this.view,Me.create(a,l,c),"pointer")}};Yr.touchstart=(e)=>{e.input.lastTouch=Date.now(),YR(e),el(e,"pointer")};Yr.touchmove=(e)=>{e.input.lastTouch=Date.now(),el(e,"pointer")};Yr.contextmenu=(e)=>YR(e);qee=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)||xr&&Sz&&Gee(e)))e.markCursor=e.state.storedMarks||r.marks(),i1(e,!0),e.markCursor=null;else if(i1(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}Xz(e,qee)};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++,Xz(e,20)}};Xg=go&&Dc<15||Gp&&JZ<604;Yr.copy=Jr.cut=(e,t)=>{let r=t,a=e.state.selection,i=r.type=="cut";if(a.empty)return;let l=Xg?null:r.clipboardData,c=a.content(),{dom:u,text:f}=qR(e,c);if(l)r.preventDefault(),l.clearData(),l.setData("text/html",u.innerHTML),l.setData("text/plain",f);else Yee(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=Xg?null:r.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;if(a&&Qg(e,Zz(a),a.getData("text/html"),i,r))r.preventDefault();else Xee(e,r)};Qee=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(nb(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:g}=qR(e,u);if(!r.dataTransfer.files.length||!xr||$z>120)r.dataTransfer.clearData();if(r.dataTransfer.setData(Xg?"Text":"text/html",f.innerHTML),r.dataTransfer.effectAllowed="copyMove",!Xg)r.dataTransfer.setData("text/plain",h);e.dragging=new XR(g,eH(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{Zee(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];Kp=[],Rd={};Lt.empty=new Lt([],[]);Lt.removeOverlap=ZR;Mr=Lt.empty;nte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rte=go&&Dc<=11;dz=new WeakMap;ute=/^(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;d1.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(()=>{e4()});function iH(e){var t=bte&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||yte&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?f1: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,f1,bte,yte,bn,bn,bn,ob;var sH=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:"'"},f1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},bte=typeof navigator<"u"&&/Mac/.test(navigator.platform),yte=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),f1[bn]=String.fromCharCode(bn);for(ob in nl)if(!f1.hasOwnProperty(ob))f1[ob]=nl[ob]});function $te(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(vte)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 Ste(e){let t=Object.create(null);for(let r in e)t[$te(r)]=e[r];return t}function t4(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 lH(e){return new qe({props:{handleKeyDown:ab(e)}})}function ab(e){let t=Ste(e);return function(r,a){let i=iH(a),l,c=t[t4(i,a)];if(c&&c(r.state,r.dispatch,r))return!0;if(i.length==1&&i!=" "){if(a.shiftKey){let u=t[t4(i,a,!1)];if(u&&u(r.state,r.dispatch,r))return!0}if((a.altKey||a.metaKey||a.ctrlKey)&&!(xte&&a.ctrlKey&&a.altKey)&&(l=nl[a.keyCode])&&l!=i){let u=t[t4(l,a)];if(u&&u(r.state,r.dispatch,r))return!0}}return!1}}var vte,xte;var p1=N(()=>{sH();Js();vte=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),xte=typeof navigator<"u"&&/Win/.test(navigator.platform)});var cH=N(()=>{p1()});function $1(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 c4(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function v1(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(c4(t[i]))return t[i].test(e[i]);return t[i]===e[i]})}function SH(e,t,r={}){return e.find((a)=>a.type===t&&v1(Object.fromEntries(Object.keys(r).map((i)=>[i,a.attrs[i]])),r))}function dH(e,t,r={}){return!!SH(e,t,r)}function u4(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((g)=>g.type===t);if(h)r=h.attrs}if(!SH([...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&&dH([...e.parent.child(l-1).marks],t,r))l-=1,c-=e.parent.child(l).nodeSize;while(u<e.parent.childCount&&dH([...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 C1(e){return e instanceof Me}function rl(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function a4(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 fH(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function x1(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Hte(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}function h1(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 CH(r)}function Yp(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),Yp("",t,r)}if(i){if(r.errorOnInvalidContent){let c=!1,u="",f=new Ug({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(h1(e),r.parseOptions);else va.fromSchema(f).parse(h1(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(h1(e),r.parseOptions).content;return l.parse(h1(e),r.parseOptions)}return Yp("",t,r)}function wH(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,g)=>{if(c===0)c=g}),e.setSelection(Fe.near(e.doc.resolve(c),r))}function EH(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 TH(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function tne(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(x1()||TH())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)=>v1(b.node.attrs,r,{strict:!1}));if(l)return!!h.length;return h.reduce((b,y)=>b+y.to-y.from,0)>=f}function w1(e,t){if(t.nodes[e])return"node";if(t.marks[e])return"mark";return null}function pH(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 i4(e,t,r={},a={}){return Yp(e,t,{slice:!1,parseOptions:r,errorOnInvalidContent:a.errorOnInvalidContent})}function RH(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 d4(e,t){let r=new qg(e);return t.forEach((a)=>{a.steps.forEach((i)=>{r.step(i)})}),r}function kH(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 gne(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 E1(e){return(t)=>gne(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 f4(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,...f4(a())];return t}).flat(10)}function p4(e,t){let r=Xi.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}function AH(e){return typeof e==="function"}function Bt(e,t=void 0,...r){if(AH(e)){if(t)return e.bind(t)(...r);return e(...r)}return e}function bne(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Jp(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 MH(e){let t=[],{nodeExtensions:r,markExtensions:a}=Jp(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 g={name:h.name,options:h.options,storage:h.storage,extensions:i},b=ze(h,"addGlobalAttributes",g);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 g={name:h.name,options:h.options,storage:h.storage},b=ze(h,"addAttributes",g);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 yne(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 hH(e){let t=[],r=yne(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((g)=>!f.includes(g));a[i]=[...f,...h].join(" ")}else if(i==="style"){let u=new Map([...hH(a[i]),...hH(l)]);a[i]=Array.from(u.entries()).map(([f,h])=>`${f}: ${h}`).join("; ")}else a[i]=l}),a},{})}function Xp(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 vne(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 mH(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):vne(r.getAttribute(c.name));if(u===null||u===void 0)return l;return{...l,[c.name]:u}},{});return{...a,...i}}}}function gH(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>{if(t==="attrs"&&bne(r))return!1;return r!==null&&r!==void 0}))}function bH(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 xne(e,t){var r;let a=MH(e),{nodeExtensions:i,markExtensions:l}=Jp(e),c=(r=i.find((h)=>ze(h,"topNode")))==null?void 0:r.name,u=Object.fromEntries(i.map((h)=>{let g=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=gH({...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(g.map(bH))}),S=Bt(ze(h,"parseHTML",b));if(S)v.parseDOM=S.map((R)=>mH(R,g));let w=ze(h,"renderHTML",b);if(w)v.toDOM=(R)=>w({node:R,HTMLAttributes:Xp(R,g)});let E=ze(h,"renderText",b);if(E)v.toText=E;return[h.name,v]})),f=Object.fromEntries(l.map((h)=>{let g=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=gH({...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(g.map(bH))}),S=Bt(ze(h,"parseHTML",b));if(S)v.parseDOM=S.map((E)=>mH(E,g));let w=ze(h,"renderHTML",b);if(w)v.toDOM=(E)=>w({mark:E,HTMLAttributes:Xp(E,g)});return[h.name,v]}));return new Ug({topNode:c,nodes:u,marks:f})}function $ne(e){let t=e.filter((r,a)=>e.indexOf(r)!==a);return Array.from(new Set(t))}function sb(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 NH(e){let t=sb(f4(e)),r=$ne(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 OH(e,t,r){let{from:a,to:i}=t,{blockSeparator:l=`
|
|
261
|
+
|
|
262
|
+
`,textSerializers:c={}}=r||{},u="";return e.nodesBetween(a,i,(f,h,g,b)=>{var y;if(f.isBlock&&h>a)u+=l;let v=c==null?void 0:c[f.type.name];if(v){if(g)u+=v({node:f,pos:h,parent:g,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 h4(e,t){let r={from:0,to:e.content.size};return OH(e,r,t)}function T1(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,r])=>[t,r.spec.toText]))}function Sne(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 m4(e,t){let r=w1(typeof t==="string"?t:t.name,e.schema);if(r==="node")return Sne(e,t);if(r==="mark")return RH(e,t);return{}}function Cne(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 wne(e){let t=Cne(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 lb(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),g=t.slice(l).map(f),b=t.invert().map(h,-1),y=t.invert().map(g);a.push({oldRange:{from:b,to:y},newRange:{from:h,to:g}})})}),wne(a)}function R1(e,t,r){let a=[];if(e===t)r.resolve(e).marks().forEach((i)=>{let l=r.resolve(e),c=u4(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 ib(e,t){return t.nodes[e]||t.marks[e]||null}function y1(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 s4(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)=>v1(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)=>v1(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 Tne(e,t,r={}){if(!t)return Zi(e,null,r)||s4(e,null,r);let a=w1(t,e.schema);if(a==="node")return Zi(e,t,r);if(a==="mark")return s4(e,t,r);return!1}function yH(e,t){if(Array.isArray(t))return t.some((r)=>(typeof r==="string"?r:r.name)===e.name);return t}function n4(e,t){let{nodeExtensions:r}=Jp(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 Qp(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(!Qp(l,{ignoreWhitespace:r,checkChildren:t}))i=!1}),i}return!1}function k1(e){return e instanceof Pe}function Rne(e,t){let r=t.mapping.mapResult(e.position);return{position:new _H(r.pos),mapResult:r}}function kne(e){return new _H(e)}function A1(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),g=Math.max(u.bottom,f.bottom),b=Math.min(u.left,f.left),y=Math.max(u.right,f.right),v=y-b,S=g-h,R={top:h,bottom:g,left:b,right:y,width:v,height:S,x:b,y:h};return{...R,toJSON:()=>R}}function Ane(e,t,r){var a;let{selection:i}=t,l=null;if(C1(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,(g,b,y)=>{if(h)return!1;if(g.isInline){let v=!y||y.type.allowsMarkType(r),S=!!r.isInSet(g.marks)||!g.marks.some((w)=>w.type.excludes(r));h=v&&S}return!h}),h})}function vH(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 xH(e){return!e||e==="1"?null:e}function IH(e,t){return xH(e)===xH(t)}function zne(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 BH(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 Qne(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 zH(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 Zne(e){return typeof e==="number"}function ere(e){return Object.prototype.toString.call(e).slice(8,-1)}function m1(e){if(ere(e)!=="Object")return!1;return e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function g4(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((g)=>g.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,g])=>{var b;let y=parseInt(((b=g.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((g)=>{if(g.match(/^[a-zA-Z][\w-]*$/))t[g]=!0});return t}function b4(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 nre(e){let{nodeName:t,name:r,parseAttributes:a=g4,serializeAttributes:i=b4,defaultAttributes:l={},requiredAttributes:c=[],allowedAttributes:u}=e,f=r||t,h=(g)=>{if(!u)return g;let b={};return u.forEach((y)=>{if(y in g)b[y]=g[y]}),b};return{parseMarkdown:(g,b)=>{let y={...l,...g.attributes};return b.createNode(t,y,[])},markdownTokenizer:{name:t,level:"block",start(g){var b;let y=new RegExp(`^:::${f}(?:\\s|$)`,"m"),v=(b=g.match(y))==null?void 0:b.index;return v!==void 0?v:-1},tokenize(g,b,y){let v=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),S=g.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:(g)=>{let b=h(g.attrs||{}),y=i(b),v=y?` {${y}}`:"";return`:::${f}${v} :::`}}}function rre(e){let{nodeName:t,name:r,getContent:a,parseAttributes:i=g4,serializeAttributes:l=b4,defaultAttributes:c={},content:u="block",allowedAttributes:f}=e,h=r||t,g=(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,be=re[1];if((S=re[2])==null?void 0:S.endsWith(":::"))continue;if(be)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=g(b.attrs||{}),S=l(v),w=S?` {${S}}`:"",E=y.renderChildren(b.content||[],`
|
|
263
|
+
|
|
264
|
+
`);return`:::${h}${w}
|
|
265
|
+
|
|
266
|
+
${E}
|
|
267
|
+
|
|
268
|
+
:::`}}}function ore(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 are(e){return Object.entries(e).filter(([,t])=>t!==void 0&&t!==null).map(([t,r])=>`${t}="${r}"`).join(" ")}function ire(e){let{nodeName:t,name:r,getContent:a,parseAttributes:i=ore,serializeAttributes:l=are,defaultAttributes:c={},selfClosing:u=!1,allowedAttributes:f}=e,h=r||t,g=(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=g(y.attrs||{}),w=l(S),E=w?` ${w}`:"";if(u)return`[${h}${E}]`;return`[${h}${E}]${v}[/${h}]`}}}function M1(e,t,r){var a,i,l,c;let u=e.split(`
|
|
269
|
+
`),f=[],h="",g=0,b=t.baseIndentSize||2;while(g<u.length){let y=u[g],v=y.match(t.itemPattern);if(!v)if(f.length>0)break;else if(y.trim()===""){g+=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];g+=1;while(g<u.length){let G=u[g];if(G.trim()===""){let U=u.slice(g+1).findIndex((J)=>J.trim()!=="");if(U===-1)break;if((((i=(a=u[g+1+U].match(/^(\s*)/))==null?void 0:a[1])==null?void 0:i.length)||0)>w){R.push(G),h=`${h}${G}
|
|
272
|
+
`,g+=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
|
+
`,g+=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 cb(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,g)=>{var b,y;let v=(y=(b=t.renderChild)==null?void 0:b.call(t,h,g+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 HH(e,t){let r={...e};if(m1(e)&&m1(t))Object.keys(t).forEach((a)=>{if(m1(t[a])&&m1(e[a]))r[a]=HH(e[a],t[a]);else r[a]=t[a]});return r}function sre(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),g=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,g,e.type),l.addMark(h,g,v)}}),l.docChanged)t.view.dispatch(l)}function g1(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 g=!1,b=Ene(h)+l;return c.forEach((y)=>{if(g)return;let v=lre(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=$1({state:f.state,transaction:w}),R={from:a-(v[0].length-l.length),to:i},{commands:D,chain:H,can:z}=new S1({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),g=!0}),g}function cre(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:g}=f;if(typeof g==="string")g=g;else g=p4(le.from(g),c.schema);let{from:b}=f,y=b+g.length;g1({editor:t,from:b,to:y,text:g,rules:r,plugin:a})});return i.selectionSet||i.docChanged?null:l}},props:{handleTextInput(i,l,c,u){return g1({editor:t,from:l,to:c,text:u,rules:r,plugin:a})},handleDOMEvents:{compositionend:(i)=>(setTimeout(()=>{let{$cursor:l}=i.state.selection;if(l)g1({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 g1({editor:t,from:c.pos,to:c.pos,text:`
|
|
280
|
+
`,rules:r,plugin:a});return!1}},isInputRules:!0});return a}function dre(e){let{editor:t,state:r,from:a,to:i,rule:l,pasteEvent:c,dropEvent:u}=e,{commands:f,chain:h,can:g}=new S1({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,"");ure(U,l.find,c).forEach((re)=>{if(re.index===void 0)return;let J=G+re.index+1,be=J+re[0].length,ce={from:r.tr.mapping.map(J),to:r.tr.mapping.map(be)},se=l.handler({state:r,range:ce,match:re,commands:f,chain:h,can:g,pasteEvent:c,dropEvent:u});b.push(se)})}),b.every((v)=>v!==null)}function pre(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:g,from:b,to:y,rule:v,pasteEvt:S})=>{let w=g.tr,E=$1({state:g,transaction:w});if(!dre({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((g)=>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)b1=t},v=()=>{if(b1)b1=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=b1;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=p4(le.from(G),v.schema);let{from:ee}=R,U=ee+G.length,P=fre(G);return f({rule:g,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(!Zne(H)||!z||H===z.b)return;return f({rule:g,state:v,from:H,to:z,pasteEvt:c})}}))}function bo(e){return new Zp({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),g=h+c.length;if(R1(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(g<r.to)l.delete(g,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 ZH(e){return new Zp({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]),g=c+h;if(g>u)g=u;else u=g+a[1].length;let b=a[0][a[0].length-1];l.insertText(b,c+a[0].length-1),l.replaceWith(g,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 ub(e){return new Zp({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 Zp({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&&zp(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 g=c.doc.resolve(r.from-1).nodeBefore;if(g&&g.type===e.type&&$a(c.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(a,g)))c.join(r.from-1)},undoable:e.undoable})}function Or(e){return new v4({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 g=f.search(/\S/),b=r.from+f.indexOf(u),y=b+u.length;if(R1(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+g,b);if(h=r.from+g+u.length,c.addMark(r.from+g,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 Cte,l4=(e,t)=>{for(var r in t)Cte(e,r,{get:t[r],enumerable:!0})},S1=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 g=u(...h)(l);if(!i.getMeta("preventDispatch")&&!this.hasCustomState)a.dispatch(i);return g}]))}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)},g={...Object.fromEntries(Object.entries(r).map(([b,y])=>[b,(...S)=>{let w=this.buildProps(f,t),E=y(...S)(w);return c.push(E),g}])),run:h};return g}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:$1({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}},$H,wte=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var r;if(!e.isDestroyed)t.dom.blur(),(r=window==null?void 0:window.getSelection())==null||r.removeAllRanges()}),!0),Ete=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),Tte=()=>({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:g}=t,b=h.resolve(g.map(f)),y=h.resolve(g.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},Rte=(e)=>(t)=>e(t),kte=()=>({state:e,dispatch:t})=>vR(e,t),Ate=(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},Mte=()=>({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},Nte=(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},Ote=(e)=>({tr:t,dispatch:r})=>{let{from:a,to:i}=e;if(r)t.delete(a,i);return!0},Dte=(e)=>{if(!e.content)return!1;return/^text(\*|\+)/.test(e.content)},uH=(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(!Dte(a))return e.pos;return r==="left"?e.start()-1:e.end()+1},Pte=(e,t,r)=>{let a=uH(e,r,"left"),i=uH(t,r,"right");return{from:a,to:i}},Lte=()=>({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:g}=Pte(u,f,e.schema);r.deleteRange(h,g)}),!r.selection.empty)r.setSelection(Me.near(r.doc.resolve(r.selection.from)));r.scrollIntoView(),t(r)}return!0},_te=()=>({commands:e})=>e.keyboardShortcut("Enter"),Ite=()=>({state:e,dispatch:t})=>yR(e,t),Bte=(e,t)=>({tr:r,state:a,dispatch:i})=>{let l=ol(e,a.schema),{doc:c,selection:u}=r,{$from:f,from:h,to:g}=u;if(i){let b=u4(f,l,t);if(b&&b.from<=h&&b.to>=g){let y=Me.create(c,b.from,b.to);r.setSelection(y)}}return!0},zte=(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},Ute=(e=null,t={})=>({editor:r,view:a,tr:i,dispatch:l})=>{t={scrollIntoView:!0,...t};let c=()=>{if(x1()||fH())a.dom.focus();if(Hte()&&!x1()&&!fH())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&&!C1(r.state.selection))return c(),!0;let u=a4(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},Fte=(e,t)=>(r)=>e.every((a,i)=>t(a,{...r,index:i})),Vte=(e,t)=>({tr:r,commands:a})=>a.insertContentAt({from:r.selection.from,to:r.selection.to},e,t),CH=(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)CH(a)}return e},jte=(e)=>!("type"in e),Kte=(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{Yp(t,l.schema,{parseOptions:h,errorOnInvalidContent:!0})}catch(E){f(E)}try{u=Yp(t,l.schema,{parseOptions:h,errorOnInvalidContent:(c=r.errorOnInvalidContent)!=null?c:l.options.enableContentCheck})}catch(E){return f(E),!1}let{from:g,to:b}=typeof e==="number"?{from:e,to:e}:{from:e.from,to:e.to},y=!0,v=!0;if((jte(u)?u:[u]).forEach((E)=>{E.check(),y=y?E.isText&&E.marks.length===0:!1,v=v?E.isBlock:!1}),g===b&&v){let{parent:E}=a.doc.resolve(g);if(E.isTextblock&&!E.type.spec.code&&!E.childCount)g-=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,g,b)}else{w=u;let E=a.doc.resolve(g),R=E.node(),D=E.parentOffset===0,H=R.isText||R.isTextblock,z=R.content.size>0;if(D&&H&&z&&v)g=Math.max(0,g-1);a.replaceWith(g,b,w)}if(r.updateSelection)wH(a,a.steps.length-1,-1);if(r.applyInputRules)a.setMeta("applyInputRules",{from:g,text:w});if(r.applyPasteRules)a.setMeta("applyPasteRules",{from:g,text:w})}return!0},qte=(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=EH(f.parent.contentMatchAt(f.index()));if(!h)return!1;let g=Object.keys(h.spec.attrs||{}),b=l?Object.fromEntries(Object.entries(l).filter(([v])=>g.includes(v))):{},y;if(c){let v=Yp(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)wH(t,t.steps.length-1,-1)}return!0},Gte=()=>({state:e,dispatch:t})=>OB(e,t),Wte=()=>({state:e,dispatch:t})=>DB(e,t),Yte=()=>({state:e,dispatch:t})=>uR(e,t),Jte=()=>({state:e,dispatch:t})=>pR(e,t),Xte=()=>({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}},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})=>kB(e,t),ene=()=>({state:e,dispatch:t})=>AB(e,t),nne=(e)=>({editor:t,view:r,tr:a,dispatch:i})=>{let l=tne(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 g=h.map(a.mapping);if(g&&i)a.maybeStep(g)}),!0},rne=(e,t={})=>({state:r,dispatch:a})=>{let i=wn(e,r.schema);if(!Zi(r,i,t))return!1;return PB(r,a)},one=()=>({state:e,dispatch:t})=>xR(e,t),ane=(e)=>({state:t,dispatch:r})=>{let a=wn(e,t.schema);return UB(a)(t,r)},ine=()=>({state:e,dispatch:t})=>gR(e,t),sne=(e,t)=>({tr:r,state:a,dispatch:i})=>{let l=null,c=null,u=w1(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,(g,b)=>{if(l&&l===g.type){if(f=!0,i)r.setNodeMarkup(b,void 0,pH(g.attrs,t))}if(c&&g.marks.length)g.marks.forEach((y)=>{if(c===y.type){if(f=!0,i)r.addMark(b,b+g.nodeSize,c.create(pH(y.attrs,t)))}})})}),f},lne=()=>({tr:e,dispatch:t})=>{if(t)e.scrollIntoView();return!0},cne=()=>({tr:e,dispatch:t})=>{if(t){let r=new yr(e.doc);e.setSelection(r)}return!0},une=()=>({state:e,dispatch:t})=>dR(e,t),dne=()=>({state:e,dispatch:t})=>hR(e,t),fne=()=>({state:e,dispatch:t})=>LB(e,t),pne=()=>({state:e,dispatch:t})=>SR(e,t),hne=()=>({state:e,dispatch:t})=>$R(e,t),mne=(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=i4(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})},DH=(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]},Ene=(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 g=((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?g:g.slice(0,Math.max(0,a-l))}),r},PH=(e,t)=>{let{$from:r,$to:a,$anchor:i}=e.selection;if(t){let l=E1((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},LH=(e)=>{let{$from:t,$to:r}=e.selection;if(t.parentOffset>0||t.pos!==r.pos)return!1;return!0},_H=class e{constructor(t){this.position=t}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}},Mne=(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=RH(a,f);r.addStoredMark(f.create({...h,...t}))}else u.forEach((h)=>{let g=h.$from.pos,b=h.$to.pos;a.doc.nodesBetween(g,b,(y,v)=>{let S=Math.max(v,g),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 Ane(a,r,f)},Nne=(e,t)=>({tr:r})=>(r.setMeta(e,t),!0),One=(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(CR(l,{...c,...t})(r))return!0;return u.clearNodes()}).command(({state:u})=>CR(l,{...c,...t})(u,a)).run()},Dne=(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},Pne=(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},Lne=(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),g=Me.create(a,f,h);t.setSelection(g)}return!0},_ne=(e)=>({state:t,dispatch:r})=>{let a=wn(e,t.schema);return FB(a)(t,r)},Ine=({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,g=y1(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)vH(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:EH(u.node(-1).contentMatchAt(u.indexAfter(-1))),v=b&&y?[{type:y,attrs:g}]: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:g}]: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)vH(r,i.extensionManager.splittableMarks);t.scrollIntoView()}return S},Bne=(e,t={})=>({tr:r,state:a,dispatch:i,editor:l})=>{var c;let u=wn(e,a.schema),{$from:f,$to:h}=a.selection,g=a.selection.node;if(g&&g.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={...y1(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={...y1(y,b.type.name,b.attrs),...t},w={...y1(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},r4=(e,t)=>{let r=E1((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(!IH(r.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(r.pos),!0},o4=(e,t)=>{let r=E1((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(!IH(r.node.attrs.type,i==null?void 0:i.attrs.type))return!0;return e.join(a),!0},Hne=(e,t,r,a={})=>({editor:i,tr:l,state:c,dispatch:u,chain:f,commands:h,can:g})=>{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=E1((se)=>n4(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&&n4(P.type.name,b)?{node:P,pos:0,depth:0}:null,J=G!=null?G:re,be=!!G&&H.depth>=1&&H.depth-G.depth<=1,ce=!!re;if((be||ce)&&J){if(J.node.type===v){if(ee&&ce)return f().command(({tr:se,dispatch:_})=>{let W=zne(se);if(!W)return!1;if(se.setSelection(W),_)_(se);return!0}).liftListItem(S).run();return h.liftListItem(S)}if(n4(J.node.type.name,b)&&v.validContent(J.node.content))return f().command(()=>(l.setNodeMarkup(J.pos,v),!0)).command(()=>r4(l,v)).command(()=>o4(l,v)).run()}if(!r||!z||!u)return f().command(()=>{if(g().wrapInList(v,a))return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>r4(l,v)).command(()=>o4(l,v)).run();return f().command(()=>{let se=g().wrapInList(v,a),_=z.filter((W)=>y.includes(W.type.name));if(l.ensureMarks(_),se)return!0;return h.clearNodes()}).wrapInList(v,a).command(()=>r4(l,v)).command(()=>o4(l,v)).run()},Une=(e,t={},r={})=>({state:a,commands:i})=>{let{extendEmptyMarkRange:l=!1}=r,c=ol(e,a.schema);if(s4(a,c,t))return i.unsetMark(c,{extendEmptyMarkRange:l});return i.setMark(c,t)},Fne=(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})},Vne=(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)},jne=()=>({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},Kne=(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((g)=>i||!f.includes(g.name));u.forEach((g)=>{for(let b of h)t.removeMark(g.$from.pos,g.$to.pos,b)})}return!0},qne=(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:g,ranges:b}=u;if(!i)return!0;if(g&&c){let{from:y,to:v}=u,S=(l=h.marks().find((E)=>E.type===f))==null?void 0:l.attrs,w=u4(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},Gne=(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},Wne=(e,t={})=>({tr:r,state:a,dispatch:i})=>{let l=null,c=null,u=w1(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 g=h.$from.pos,b=h.$to.pos,y,v,S,w;if(r.selection.empty)a.doc.nodesBetween(g,b,(E,R)=>{if(l&&l===E.type)f=!0,S=Math.max(R,g),w=Math.min(R+E.nodeSize,b),y=R,v=E});else a.doc.nodesBetween(g,b,(E,R)=>{if(R<g&&l&&l===E.type)f=!0,S=Math.max(R,g),w=Math.min(R+E.nodeSize,b),y=R,v=E;if(R>=g&&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,g),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},Yne=(e,t={})=>({state:r,dispatch:a})=>{let i=wn(e,r.schema);return BB(i,t)(r,a)},Jne=(e,t={})=>({state:r,dispatch:a})=>{let i=wn(e,r.schema);return HB(i,t)(r,a)},Xne=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={}}},tre,Zp=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},lre=(e,t)=>{if(c4(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},y4=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:()=>HH(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,v4=class{constructor(e){this.find=e.find,this.handler=e.handler}},ure=(e,t,r)=>{if(c4(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})},b1=null,fre=(e)=>{var t;let r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=r.clipboardData)==null||t.setData("text/html",e),r},N1=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=NH(e),this.schema=xne(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:ib(t.name,this.schema)},a=ze(t,"addCommands",r);if(!a)return e;return{...e,...a()}},{})}get plugins(){let{editor:e}=this;return sb([...this.extensions].reverse()).flatMap((a)=>{let i={name:a.name,options:a.options,storage:this.editor.extensionStorage[a.name],editor:e,type:ib(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=lH(u);l.push(f);let h=ze(a,"addInputRules",i);if(yH(a,e.options.enableInputRules)&&h){let y=h();if(y&&y.length){let v=cre({editor:e,rules:y}),S=Array.isArray(v)?v:[v];l.push(...S)}}let g=ze(a,"addPasteRules",i);if(yH(a,e.options.enablePasteRules)&&g){let y=g();if(y&&y.length){let v=pre({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 MH(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Jp(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,g,b,y)=>{let v=Xp(f,a);return c({node:f,view:h,getPos:g,decorations:b,innerDecorations:y,editor:e,extension:r,HTMLAttributes:v})};return[r.name,u]}))}dispatchTransaction(e){let{editor:t}=this;return sb([...this.extensions].reverse()).reduceRight((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:ib(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 sb([...this.extensions]).reduce((a,i)=>{let l={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:ib(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}=Jp(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 g=Xp(u,a);return l()({mark:u,view:f,inline:h,editor:e,extension:r,HTMLAttributes:g,updateAttributes:(b)=>{sre(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:ib(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),g=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(g)this.editor.on("focus",g);if(b)this.editor.on("blur",b);if(y)this.editor.on("destroy",y)})}},hre,$t,UH,FH,VH,jH,KH,qH,GH,WH,YH,JH,XH,mre=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)}},gre=`.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
|
+
}`,QH,en;var Ye=N(()=>{ti();Ar();at();at();Ar();at();at();at();Sa();Sa();at();ti();Ar();ti();ti();Ar();Ar();Ar();Ar();r1();Ar();at();Ar();Ar();Ar();Ar();Ar();ti();Sa();Sa();Sa();Sa();Sa();at();Ar();at();at();r1();at();ti();Sa();at();ti();at();ti();Ar();r1();at();Bc();cH();at();Sa();at();Sa();at();at();ti();at();at();at();at();at();at();at();ti();at();Cte=Object.defineProperty;$H={};l4($H,{blur:()=>wte,clearContent:()=>Ete,clearNodes:()=>Tte,command:()=>Rte,createParagraphNear:()=>kte,cut:()=>Ate,deleteCurrentNode:()=>Mte,deleteNode:()=>Nte,deleteRange:()=>Ote,deleteSelection:()=>Lte,enter:()=>_te,exitCode:()=>Ite,extendMarkRange:()=>Bte,first:()=>zte,focus:()=>Ute,forEach:()=>Fte,insertContent:()=>Vte,insertContentAt:()=>Kte,insertDefaultBlock:()=>qte,joinBackward:()=>Yte,joinDown:()=>Wte,joinForward:()=>Jte,joinItemBackward:()=>Xte,joinItemForward:()=>Qte,joinTextblockBackward:()=>Zte,joinTextblockForward:()=>ene,joinUp:()=>Gte,keyboardShortcut:()=>nne,lift:()=>rne,liftEmptyBlock:()=>one,liftListItem:()=>ane,newlineInCode:()=>ine,resetAttributes:()=>sne,scrollIntoView:()=>lne,selectAll:()=>cne,selectNodeBackward:()=>une,selectNodeForward:()=>dne,selectParentNode:()=>fne,selectTextblockEnd:()=>pne,selectTextblockStart:()=>hne,setContent:()=>mne,setMark:()=>Mne,setMeta:()=>Nne,setNode:()=>One,setNodeSelection:()=>Dne,setTextDirection:()=>Pne,setTextSelection:()=>Lne,sinkListItem:()=>_ne,splitBlock:()=>Ine,splitListItem:()=>Bne,toggleList:()=>Hne,toggleMark:()=>Une,toggleNode:()=>Fne,toggleWrap:()=>Vne,undoInputRule:()=>jne,unsetAllMarks:()=>Kne,unsetMark:()=>qne,unsetTextDirection:()=>Gne,updateAttributes:()=>Wne,wrapIn:()=>Yne,wrapInList:()=>Jne});tre={};l4(tre,{createAtomBlockMarkdownSpec:()=>nre,createBlockMarkdownSpec:()=>rre,createInlineMarkdownSpec:()=>ire,parseAttributes:()=>g4,parseIndentedBlocks:()=>M1,renderNestedMarkdownContent:()=>cb,serializeAttributes:()=>b4});Xr=class e extends y4{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)}};N1.resolve=NH;N1.sort=sb;N1.flatten=f4;hre={};l4(hre,{ClipboardTextSerializer:()=>UH,Commands:()=>FH,Delete:()=>VH,Drop:()=>jH,Editable:()=>KH,FocusEvents:()=>GH,Keymap:()=>WH,Paste:()=>YH,Tabindex:()=>JH,TextDirection:()=>XH,focusEventsPluginKey:()=>qH});$t=class e extends y4{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)}},UH=$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=T1(r),{blockSeparator:c}=this.options,u={...c!==void 0?{blockSeparator:c}:{},textSerializers:l};return[...i.ranges].sort((h,g)=>h.$from.pos-g.$from.pos).map(({$from:h,$to:g})=>OH(a,{from:h.pos,to:g.pos},u)).join(c!=null?c:`
|
|
351
|
+
|
|
352
|
+
`)}}})]}}),FH=$t.create({name:"commands",addCommands(){return{...$H}}}),VH=$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 g=d4(e.before,[e,...t]);lb(g).forEach((v)=>{if(g.mapping.mapResult(v.oldRange.from).deletedAfter&&g.mapping.mapResult(v.oldRange.to).deletedBefore)g.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:g.mapping.map(w),newTo:g.mapping.map(E),deletedRange:v.oldRange,newRange:v.newRange,partial:!R,editor:this.editor,transaction:e,combinedTransform:g})})});let y=g.mapping;g.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=g.doc.nodeAt(R-1))==null?void 0:w.marks.some((U)=>U.eq(v.mark)):!1,ee=(E=g.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:g})}})};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()}}),jH=$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})}}})]}}),KH=$t.create({name:"editable",addProseMirrorPlugins(){return[new qe({key:new Qe("editable"),props:{editable:()=>this.editor.options.editable}})]}}),qH=new Qe("focusEvents"),GH=$t.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new qe({key:qH,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}}}})]}}),WH=$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:g,$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(!g||!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(x1()||TH())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(!Qp(r.doc))return;let y=r.tr,v=$1({state:r,transaction:y}),{commands:S}=new S1({editor:this.editor,state:v});if(S.clearNodes(),!y.steps.length)return;return y}})]}}),YH=$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})}}})]}}),JH=$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"}}}})]}}),XH=$t.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Jp(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}}}})]}}),QH=class extends Xne{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:Rne,createMappablePosition:kne},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=a4(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=Qne(gre,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=AH(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?[KH,UH.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),FH,GH,WH,JH.configure({value:(a=(r=this.options.coreExtensionOptions)==null?void 0:r.tabindex)==null?void 0:a.value}),jH,YH,VH,XH.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 N1(l,this)}createCommandManager(){this.commandManager=new S1({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=i4(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=i4(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=kc.create({doc:r,schema:this.schema,selection:a4(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 d1(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 g;return(g=this.capturedTransaction)==null?void 0:g.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 m4(this.state,e)}isActive(e,t){let r=typeof e==="string"?e:null,a=typeof e==="string"?t:e;return Tne(this.state,r,a)}getJSON(){return this.state.doc.toJSON()}getHTML(){return p4(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
|
|
353
|
+
|
|
354
|
+
`,textSerializers:r={}}=e||{};return h4(this.state.doc,{blockSeparator:t,textSerializers:{...T1(this.schema),...r}})}get isEmpty(){return Qp(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 mre(t,this,!1,r)}get $doc(){return this.$pos(0)}};en=class e extends y4{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 x4(e,t){return function(a,i,l){return e(a,i,l)&&t(a,i,l)}}function O1(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 xre(e){return e!=null?e[Symbol.toStringTag]:void 0}function eU(e){return bre(e).concat(yre(e))}function Md(e,t){return e===t||!e&&!t&&e!==e&&t!==t}function Ere(e,t){return e.byteLength===t.byteLength&&D1(new Uint8Array(e),new Uint8Array(t))}function Tre(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 Rre(e,t){return e.byteLength===t.byteLength&&D1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function kre(e,t){return Md(e.getTime(),t.getTime())}function Are(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Mre(e,t){return e===t}function rU(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(),g=!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)){g=i[b]=!0;break}b++}if(!g)return!1;f++}return!0}function Ore(e,t,r){let a=nU(e),i=a.length;if(nU(t).length!==i)return!1;while(i-- >0)if(!aU(e,t,r,a[i]))return!1;return!0}function db(e,t,r){let a=eU(e),i=a.length;if(eU(t).length!==i)return!1;let l,c,u;while(i-- >0){if(l=a[i],!aU(e,t,r,l))return!1;if(c=tU(e,l),u=tU(t,l),(c||u)&&(!c||!u||c.configurable!==u.configurable||c.enumerable!==u.enumerable||c.writable!==u.writable))return!1}return!0}function Dre(e,t){return Md(e.valueOf(),t.valueOf())}function Pre(e,t){return e.source===t.source&&e.flags===t.flags}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.values(),c,u;while(c=l.next()){if(c.done)break;let f=t.values(),h=!1,g=0;while(u=f.next()){if(u.done)break;if(!i[g]&&r.equals(c.value,u.value,c.value,u.value,e,t,r)){h=i[g]=!0;break}g++}if(!h)return!1}return!0}function D1(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 Lre(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 aU(e,t,r,a){if((a===wre||a===Cre||a===Sre)&&(e.$$typeof||t.$$typeof))return!0;return $re(t,a)&&r.equals(e[a],t[a],a,a,e,t,r)}function Xre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:a,areErrorsEqual:i,areFunctionsEqual:l,areMapsEqual:c,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:g,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 g(E,R,D);if(z===Map)return c(E,R,D);if(z===Set)return b(E,R,D);let G=Jre.call(E);if(G===Hre)return a(E,R,D);if(G===Kre)return g(E,R,D);if(G===Fre)return c(E,R,D);if(G===qre)return b(E,R,D);if(G===jre)return typeof E.then!=="function"&&typeof R.then!=="function"&&f(E,R,D);if(G===Yre)return v(E,R,D);if(G===Ure)return i(E,R,D);if(G===Ire)return f(E,R,D);if(Wre[G])return y(E,R,D);if(G===_re)return e(E,R,D);if(G===zre)return r(E,R,D);if(G===Bre||G===Vre||G===Gre)return h(E,R,D);if(S){let ee=S[G];if(!ee){let U=xre(E);if(U)ee=S[U]}if(ee)return ee(E,R,D)}return!1}}function Qre({circular:e,createCustomConfig:t,strict:r}){let a={areArrayBuffersEqual:Ere,areArraysEqual:r?db:Tre,areDataViewsEqual:Rre,areDatesEqual:kre,areErrorsEqual:Are,areFunctionsEqual:Mre,areMapsEqual:r?x4(rU,db):rU,areNumbersEqual:Nre,areObjectsEqual:r?db:Ore,arePrimitiveWrappersEqual:Dre,areRegExpsEqual:Pre,areSetsEqual:r?x4(oU,db):oU,areTypedArraysEqual:r?x4(D1,db):D1,areUrlsEqual:Lre,unknownTagComparators:void 0};if(t)a=Object.assign({},a,t(a));if(e){let i=O1(a.areArraysEqual),l=O1(a.areMapsEqual),c=O1(a.areObjectsEqual),u=O1(a.areSetsEqual);a=Object.assign({},a,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:c,areSetsEqual:u})}return a}function Zre(e){return function(t,r,a,i,l,c,u){return e(t,r,u)}}function eoe({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:g}=r();return t(u,f,{cache:h,equals:a,meta:g,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=Qre(e),c=Xre(l),u=r?r(c):Zre(c);return eoe({circular:t,comparator:c,createState:a,equals:u,strict:i})}var bre,yre,vre,$re,Sre="__v",Cre="__o",wre="_owner",tU,nU,Nre,_re="[object ArrayBuffer]",Ire="[object Arguments]",Bre="[object Boolean]",zre="[object DataView]",Hre="[object Date]",Ure="[object Error]",Fre="[object Map]",Vre="[object Number]",jre="[object Object]",Kre="[object RegExp]",qre="[object Set]",Gre="[object String]",Wre,Yre="[object URL]",Jre,iU,Rke,kke,Ake,Mke,Nke,Oke,Dke;var sU=N(()=>{({getOwnPropertyNames:bre,getOwnPropertySymbols:yre}=Object),{hasOwnProperty:vre}=Object.prototype;$re=Object.hasOwn||((e,t)=>vre.call(e,t));({getOwnPropertyDescriptor:tU,keys:nU}=Object);Nre=Md;Wre={"[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},Jre=Object.prototype.toString;iU=zc(),Rke=zc({strict:!0}),kke=zc({circular:!0}),Ake=zc({circular:!0,strict:!0}),Mke=zc({createInternalComparator:()=>Md}),Nke=zc({strict:!0,createInternalComparator:()=>Md}),Oke=zc({circular:!0,createInternalComparator:()=>Md}),Dke=zc({circular:!0,createInternalComparator:()=>Md,strict:!0})});var lU=Bi(function(toe){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=xp(),r=typeof Object.is==="function"?Object.is:e,a=t.useSyncExternalStore,i=al.useRef,l=al.useEffect,c=al.useMemo,u=al.useDebugValue;toe.useSyncExternalStoreWithSelector=function(f,h,g,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=g===void 0?null:g;return[function(){return E(h())},z===null?void 0:function(){return E(z())}]},[h,g,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 ooe(){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]:uU.default.createPortal(l.reactElement,l.element,i)},a()},removeRenderer(i){let l={...t};delete l[i],t=l,a()}}}function S4(e){var t;let[r]=Fc.useState(()=>new loe(e.editor)),a=pU.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:iU);return soe(()=>r.watch(e.editor),[e.editor,r]),Fc.useDebugValue(a),a}function mU(e={},t=[]){let r=Uc.useRef(e);r.current=e;let[a]=Uc.useState(()=>new uoe(r)),i=fU.useSyncExternalStore(a.subscribe,a.getEditor,a.getServerSnapshot);return Uc.useDebugValue(i),Uc.useEffect(a.onRender(t)),S4({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 xU({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 P1.jsx(C4.Provider,{value:i,children:P1.jsx(E4.Provider,{value:a,children:e})})}function $U({...e}){let{editor:t}=voe();return P1.jsx($4,{editor:t,...e})}var fb,Hc,uU,dU,il,Uc,fU,Fc,pU,gU,pb,poe,bU,yU,vU,hoe,moe,goe,boe,w4,yoe,Nd,P1,noe=(...e)=>(t)=>{e.forEach((r)=>{if(typeof r==="function")r(t);else if(r)r.current=t})},roe=({contentComponent:e})=>{let t=dU.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return il.jsx(il.Fragment,{children:Object.values(t)})},aoe,ioe,$4,soe,loe=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}},cU=!0,hU,coe,uoe=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(hU){if(r&&cU)console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches");r=!1}else if(coe&&t===void 0){if(r=!1,cU)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 QH(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)}},C4,Hke,L1=()=>fb.useContext(C4),doe,foe=()=>pb.useContext(doe),Uke,Fke,E4,voe=()=>Nd.useContext(E4),Vke;var _1=N(()=>{Ye();sU();fb=j(ae(),1),Hc=j(ae(),1),uU=j(Vr(),1),dU=j(xp(),1),il=j(io(),1),Uc=j(ae(),1),fU=j(xp(),1),Fc=j(ae(),1),pU=j(lU(),1),gU=j(io(),1),pb=j(ae(),1),poe=j(io(),1),bU=j(ae(),1),yU=j(io(),1),vU=j(ae(),1),hoe=j(ae(),1),moe=j(Vr(),1),goe=j(io(),1),boe=j(io(),1),w4=j(ae(),1),yoe=j(io(),1),Nd=j(ae(),1),P1=j(io(),1);Ye();aoe=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=ooe(),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:noe(t,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&il.jsx(roe,{contentComponent:e.contentComponent})]})}},ioe=Hc.forwardRef((e,t)=>{let r=Hc.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Hc.default.createElement(aoe,{key:r,innerRef:t,...e})}),$4=Hc.default.memo(ioe),soe=typeof window<"u"?Fc.useLayoutEffect:Fc.useEffect;hU=typeof window>"u",coe=hU||Boolean(typeof window<"u"&&window.next);C4=fb.createContext({editor:null}),Hke=C4.Consumer,doe=pb.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Uke=bU.default.forwardRef((e,t)=>{let{onDragStart:r}=foe(),a=e.as||"div";return yU.jsx(a,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})}),Fke=vU.default.createContext({markViewContentRef:()=>{}}),E4=Nd.createContext({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});E4.displayName="TiptapContext";xU.displayName="Tiptap";$U.displayName="Tiptap.Content";Vke=Object.assign(xU,{Content:$U})});function k4(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 A4(e){return e==="x"?"y":"x"}function I1(e){return e==="y"?"height":"width"}function ri(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function B1(e){return A4(ri(e))}function M4(e,t,r){if(r===void 0)r=!1;let a=Aa(e),i=B1(e),l=I1(i),c=i==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(t.reference[l]>t.floating[l])c=mb(c);return[c,mb(c)]}function EU(e){let t=mb(e);return[hb(e),t,hb(t)]}function hb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Coe(e,t,r){switch(e){case"top":case"bottom":if(r)return t?wU:CU;return t?CU:wU;case"left":case"right":return t?$oe:Soe;default:return[]}}function TU(e,t,r,a){let i=Aa(e),l=Coe(ka(e),r==="start",a);if(i){if(l=l.map((c)=>c+"-"+i),t)l=l.concat(l.map(hb))}return l}function mb(e){let t=ka(e);return xoe[t]+e.slice(t.length)}function woe(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 z1(e){return typeof e!=="number"?woe(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 T4,SU,R4,Ra,Go,gb,ts=(e)=>({x:e,y:e}),xoe,CU,wU,$oe,Soe;var H1=N(()=>{T4=["top","right","bottom","left"],SU=["start","end"],R4=T4.reduce((e,t)=>e.concat(t,t+"-"+SU[0],t+"-"+SU[1]),[]),Ra=Math.min,Go=Math.max,gb=Math.round,xoe={left:"right",right:"left",bottom:"top",top:"bottom"};CU=["left","right"],wU=["right","left"],$oe=["top","bottom"],Soe=["bottom","top"]});function RU(e,t,r){let{reference:a,floating:i}=e,l=ri(t),c=B1(t),u=I1(c),f=ka(t),h=l==="y",g=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:g,y:a.y-i.height};break;case"bottom":v={x:g,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 MU(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:g="viewport",elementContext:b="floating",altBoundary:y=!1,padding:v=0}=ns(t,e),S=z1(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:g,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 Toe(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?hb(i)!==i:!1);return!0})}function kU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AU(e){return T4.some((t)=>e[t]>=0)}function _U(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 Roe(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(_U(i)))}async function Aoe(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=koe.has(c)?-1:1,g=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*g,y:y*h}:{x:y*h,y:v*g}}var Eoe=50,NU=async(e,t,r)=>{let{placement:a="bottom",strategy:i="absolute",middleware:l=[],platform:c}=r,u=c.detectOverflow?c:{...c,detectOverflow:MU},f=await(c.isRTL==null?void 0:c.isRTL(t)),h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:b}=RU(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:g,y:b,initialPlacement:a,placement:y,strategy:i,middlewareData:S,rects:h,platform:u,elements:{reference:e,floating:t}});if(g=H!=null?H:g,b=z!=null?z:b,S[R]={...S[R],...G},ee&&v<Eoe){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:g,y:b}=RU(h,y,f))}w=-1}}return{x:g,y:b,placement:y,strategy:i,middlewareData:S}},OU=(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:g=0}=ns(e,t)||{};if(h==null)return{};let b=z1(g),y={x:r,y:a},v=B1(i),S=I1(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),be=Ra(b[D],re),ce=U-w[S]-be,se=U/2-w[S]/2+P,_=k4(J,se,ce),W=!f.arrow&&Aa(i)!=null&&se!==_&&l.reference[S]/2-(se<J?J:be)-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}}}),DU=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:g=!1,alignment:b,allowedPlacements:y=R4,autoAlignment:v=!0,...S}=ns(e,t),w=b!==void 0||y===R4?Toe(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=M4(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 be=Aa(J.placement);return[J.placement,be&&g?J.overflows.slice(0,2).reduce((ce,se)=>ce+se,0):J.overflows[0],J.overflows]}).sort((J,be)=>J[1]-be[1]),re=((i=U.filter((J)=>J[2].slice(0,Aa(J[0])?2:3).every((be)=>be<=0))[0])==null?void 0:i[0])||U[0][0];if(re!==u)return{data:{index:E+1,overflows:G},reset:{placement:re}};return{}}}},PU=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:g=!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?[mb(u)]:EU(u)),ee=S!=="none";if(!y&&ee)G.push(...TU(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(g)re.push(P[R]);if(b){let _=M4(i,c,z);re.push(P[_[0]],P[_[1]])}if(J=[...J,{placement:i,overflows:re}],!re.every((_)=>_<=0)){var be,ce;let _=(((be=l.flip)==null?void 0:be.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{}}}},LU=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=kU(c,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:AU(u)}}}case"escaped":{let c=await a.detectOverflow(t,{...l,altBoundary:!0}),u=kU(c,r.floating);return{data:{escapedOffsets:u,escaped:AU(u)}}}default:return{}}}}},IU=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),g=Array.from(await(l.getClientRects==null?void 0:l.getClientRects(a.reference))||[]);if(!g.length)return{};let b=Roe(g),y=oi(_U(g)),v=z1(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,be=P?ee.left:U.left,ce=P?ee.right:U.right;return oi({x:be,y:re,width:ce-be,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{}}}},koe,BU=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 Aoe(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}}}}},zU=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),g={x:r,y:a},b=await l.detectOverflow(t,h),y=ri(i),v=A4(y),S=g[v],w=g[y],E=(D,H)=>k4(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}}}}}},HU=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),g=Aa(r),b=ri(r)==="y",{width:y,height:v}=a.floating,S,w;if(h==="top"||h==="bottom")S=h,w=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right";else w=h,S=g==="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&&!g)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 UU=N(()=>{H1();H1();koe=new Set(["left","top"])});function F1(){return typeof window<"u"}function Dd(e){if(VU(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=(VU(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function VU(e){if(!F1())return!1;return e instanceof Node||e instanceof yo(e).Node}function ai(e){if(!F1())return!1;return e instanceof Element||e instanceof yo(e).Element}function ll(e){if(!F1())return!1;return e instanceof HTMLElement||e instanceof yo(e).HTMLElement}function FU(e){if(!F1()||typeof ShadowRoot>"u")return!1;return e instanceof ShadowRoot||e instanceof yo(e).ShadowRoot}function bb(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 jU(e){return/^(table|td|th)$/.test(Dd(e))}function yb(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}function V1(e){let t=ai(e)?ii(e):e;return Od(t.transform)||Od(t.translate)||Od(t.scale)||Od(t.rotate)||Od(t.perspective)||!j1()&&(Od(t.backdropFilter)||Od(t.filter))||Moe.test(t.willChange||"")||Noe.test(t.contain||"")}function KU(e){let t=Vc(e);while(ll(t)&&!eh(t)){if(V1(t))return t;else if(yb(t))return null;t=Vc(t)}return null}function j1(){if(N4==null)N4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return N4}function eh(e){return/^(html|body|#document)$/.test(Dd(e))}function ii(e){return yo(e).getComputedStyle(e)}function vb(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||FU(e)&&e.host||sl(e);return FU(t)?t.host:t}function qU(e){let t=Vc(e);if(eh(t))return(e.ownerDocument||e).body;if(ll(t)&&bb(t))return t;return qU(t)}function U1(e,t,r){var a;if(t===void 0)t=[];if(r===void 0)r=!0;let i=qU(e),l=i===((a=e.ownerDocument)==null?void 0:a.body),c=yo(i);if(l){let u=K1(c);return t.concat(c,c.visualViewport||[],bb(i)?i:[],u&&r?U1(u):[])}else return t.concat(i,U1(i,[],r))}function K1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Moe,Noe,Od=(e)=>!!e&&e!=="none",N4;var GU=N(()=>{Moe=/transform|translate|scale|rotate|perspective|filter/,Noe=/paint|layout|strict|content/});function JU(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=gb(r)!==l||gb(a)!==c;if(u)r=l,a=c;return{width:r,height:a,$:u}}function XU(e){return!ai(e)?e.contextElement:e}function th(e){let t=XU(e);if(!ll(t))return ts(1);let r=t.getBoundingClientRect(),{width:a,height:i,$:l}=JU(t),c=(l?gb(r.width):r.width)/a,u=(l?gb(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 QU(e){let t=yo(e);if(!j1()||!t.visualViewport)return Ooe;return{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Doe(e,t,r){if(t===void 0)t=!1;return!!r&&t&&r===yo(e)}function xb(e,t,r,a){if(t===void 0)t=!1;if(r===void 0)r=!1;let i=e.getBoundingClientRect(),l=XU(e),c=ts(1);if(t)if(a){if(ai(a))c=th(a)}else c=th(e);let u=Doe(l,r,a)?QU(l):ts(0),f=(i.left+u.x)/c.x,h=(i.top+u.y)/c.y,g=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=K1(S);while(w&&v!==S){let E=th(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,g*=E.x,b*=E.y,f+=H,h+=z,S=yo(w),w=K1(S)}}return oi({width:g,height:b,x:f,y:h})}function q1(e,t){let r=vb(e).scrollLeft;if(!t)return xb(sl(e)).left+r;return t.left+r}function ZU(e,t){let r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-q1(e,r),i=r.top+t.scrollTop;return{x:a,y:i}}function Poe(e){let{elements:t,rect:r,offsetParent:a,strategy:i}=e,l=i==="fixed",c=sl(a),u=t?yb(t.floating):!1;if(a===c||u&&l)return r;let f={scrollLeft:0,scrollTop:0},h=ts(1),g=ts(0),b=ll(a);if(b||!l){if(Dd(a)!=="body"||bb(c))f=vb(a);if(b){let v=xb(a);h=th(a),g.x=v.x+a.clientLeft,g.y=v.y+a.clientTop}}let y=c&&!b&&!l?ZU(c,f):ts(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-f.scrollLeft*h.x+g.x+y.x,y:r.y*h.y-f.scrollTop*h.y+g.y+y.y}}function Loe(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function _oe(e){let t=vb(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+q1(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 Boe(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,g=0;if(c){let y=!j1()||t==="fixed";if(a){if(!y)h=-c.offsetLeft,g=-c.offsetTop}else if(u=c.width,f=c.height,y)h=c.offsetLeft,g=c.offsetTop}if(q1(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<=Ioe)u-=R}return{width:u,height:f,x:h,y:g}}function zoe(e,t){let r=xb(e,!0,t==="fixed"),a=r.top+e.clientTop,i=r.left+e.clientLeft,l=th(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 WU(e,t,r){let a;if(t==="viewport"||t==="layoutViewport")a=Boe(e,r,t);else if(t==="document")a=_oe(sl(e));else if(ai(t))a=zoe(t,r);else{let i=QU(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oi(a)}function Hoe(e,t){let r=t.get(e);if(r)return r;let a=U1(e,[],!1).filter((u)=>ai(u)&&Dd(u)!=="body"),i=null,l=ii(e).position==="fixed",c=l?Vc(e):e;while(ai(c)&&!eh(c)){let u=ii(c),f=V1(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 Uoe(e){let{element:t,boundary:r,rootBoundary:a,strategy:i}=e,c=[...r==="clippingAncestors"?yb(t)?[]:Hoe(t,this._c):[].concat(r),a],u=WU(t,c[0],i),f=u.top,h=u.right,g=u.bottom,b=u.left;for(let y=1;y<c.length;y++){let v=WU(t,c[y],i);f=Go(v.top,f),h=Ra(v.right,h),g=Ra(v.bottom,g),b=Go(v.left,b)}return{width:h-b,height:g-f,x:b,y:f}}function Foe(e){let{width:t,height:r}=JU(e);return{width:t,height:r}}function Voe(e,t,r){let a=ll(t),i=sl(t),l=r==="fixed",c=xb(e,!0,l,t),u={scrollLeft:0,scrollTop:0},f=ts(0);if(a||!l){if(Dd(t)!=="body"||bb(i))u=vb(t);if(a){let y=xb(t,!0,l,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}}if(!a&&i)f.x=q1(i);let h=i&&!a&&!l?ZU(i,u):ts(0),g=c.left+u.scrollLeft-f.x-h.x,b=c.top+u.scrollTop-f.y-h.y;return{x:g,y:b,width:c.width,height:c.height}}function O4(e){return ii(e).position==="static"}function YU(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 eF(e,t){let r=yo(e);if(yb(e))return r;if(!ll(e)){let i=Vc(e);while(i&&!eh(i)){if(ai(i)&&!O4(i))return i;i=Vc(i)}return r}let a=YU(e,t);while(a&&jU(a)&&O4(a))a=YU(a,t);if(a&&eh(a)&&O4(a)&&!V1(a))return r;return a||KU(e)||r}function Koe(e){return ii(e).direction==="rtl"}var Ooe,Ioe=25,joe=async function(e){let t=this.getOffsetParent||eF,r=this.getDimensions,a=await r(e.floating);return{reference:Voe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}},qoe,G1,W1,Y1,J1,X1,Q1,Z1,e$,t$=(e,t,r)=>{let a=new Map,i=r!=null?r:{},l={...qoe,...i.platform,_c:a};return NU(e,t,{...i,platform:l})};var D4=N(()=>{UU();H1();GU();Ooe=ts(0);qoe={convertOffsetParentRelativeRectToViewportRelativeRect:Poe,getDocumentElement:sl,getClippingRect:Uoe,getOffsetParent:eF,getElementRects:joe,getClientRects:Loe,getDimensions:Foe,getScale:th,isElement:ai,isRTL:Koe},G1=BU,W1=DU,Y1=zU,J1=PU,X1=HU,Q1=LU,Z1=OU,e$=IU});function Goe(e){if(e.type.spec.tableRole!="table")throw RangeError("Not a table node: "+e.type.name);let t=Woe(e),r=e.childCount,a=[],i=0,l=null,c=[];for(let h=0,g=t*r;h<g;h++)a[h]=0;for(let h=0,g=0;h<r;h++){let b=e.child(h);g++;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:g,n:R-H});break}let z=i+H*t;for(let G=0;G<E;G++){if(a[z+G]==0)a[z+G]=g;else(l||(l=[])).push({type:"collision",row:h,pos:g,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,g+=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});g++}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)Yoe(u,c,e);return u}function Woe(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 Yoe(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 g=t[(i+h)%e.width*2];if(g!=null&&(!f.colwidth||f.colwidth[h]!=g))(u||(u=Joe(f)))[h]=g}if(u)e.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:u})}}function Joe(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let r=0;r<e.colspan;r++)t.push(0);return t}function _4(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 Xoe(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 oF(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 Qoe(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=Xoe(t.$head)||Zoe(t.$head);if(r)return r;throw RangeError(`No cell found around position ${t.head}`)}function Zoe(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 tF(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function aF(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function iF(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 nF(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 sF(e){let t=e.selection,r=Qoe(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 tae(e){return function(t,r){if(!oF(t))return!1;if(r){let a=_4(t.schema),i=sF(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 rF(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 I4(e,t){if(t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic)return tae(e);return function(r,a){if(!oF(r))return!1;if(a){let i=_4(r.schema),l=sF(r),c=r.tr,u=rF("row",l,i),f=rF("column",l,i),h=(e==="column"?u:e==="row"?f:!1)?1:0,g=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(g).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 n$(e,t){let r=e.selection;if(!(r instanceof si))return!1;if(t){let a=e.tr,i=_4(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 a$(e,t,r){if(r.eq(e.selection))return!1;if(t)t(e.tr.setSelection(r).scrollIntoView());return!0}function r$(e,t){return(r,a,i)=>{if(!i)return!1;let l=r.selection;if(l instanceof si)return a$(r,a,Fe.near(l.$headCell,t));if(e!="horiz"&&!l.empty)return!1;let c=lF(i,e,t);if(c==null)return!1;if(e=="horiz")return a$(r,a,Fe.near(r.doc.resolve(l.head+t),t));else{let u=r.doc.resolve(c),f=iF(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 a$(r,a,h)}}}function o$(e,t){return(r,a,i)=>{if(!i)return!1;let l=r.selection,c;if(l instanceof si)c=l;else{let f=lF(i,e,t);if(f==null)return!1;c=new si(r.doc.resolve(f))}let u=iF(c.$headCell,e,t);if(!u)return!1;return a$(r,a,new si(c.$anchorCell,u))}}function lF(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 P4,L4,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 P4(e)||L4(e,Goe(e))}},l5e,si,eae=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&&aF(r,a))return new si(r,a);else return Fe.near(a,1)}},c5e,u5e,d5e,f5e,p5e,h5e;var cF=N(()=>{Js();Ws();p1();if(typeof WeakMap<"u"){let e=new WeakMap;P4=(t)=>e.get(t),L4=(t,r)=>(e.set(t,r),r)}else{let e=[],t=10,r=0;P4=(a)=>{for(let i=0;i<e.length;i+=2)if(e[i]==a)return e[i+1]},L4=(a,i)=>{if(r==10)r=0;return e[r++]=a,e[r++]=i}}l5e=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((g)=>g!=r.pos-l);f.unshift(r.pos-l);let h=f.map((g)=>{let b=a.nodeAt(g);if(!b)throw RangeError(`No cell with offset ${g} found`);let y=l+g+1;return new Gg(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(tF(a)&&tF(i)&&aF(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 g=f*r.width+i.left,b=i.left;b<i.right;b++,g++){let y=r.map[g];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=nF(R,0,w);if(E>0)R=nF(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 eae(this.$anchorCell.pos,this.$headCell.pos)}};si.prototype.visible=!1;Fe.jsonID("cell",si);c5e=new Qe("fix-tables");u5e=I4("row",{useDeprecatedLogic:!0}),d5e=I4("column",{useDeprecatedLogic:!0}),f5e=I4("cell",{useDeprecatedLogic:!0});p5e=ab({ArrowLeft:r$("horiz",-1),ArrowRight:r$("horiz",1),ArrowUp:r$("vert",-1),ArrowDown:r$("vert",1),"Shift-ArrowLeft":o$("horiz",-1),"Shift-ArrowRight":o$("horiz",1),"Shift-ArrowUp":o$("vert",-1),"Shift-ArrowDown":o$("vert",1),Backspace:n$,"Mod-Backspace":n$,Delete:n$,"Mod-Delete":n$});h5e=new Qe("tableColumnResizing")});var uF=N(()=>{cF()});function nae(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 rae=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&&C1(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 g;if(this.editor=e,this.element=t,this.view=r,this.pluginKey=a,this.updateDelay=i,this.resizeDelay=l,this.appendTo=u,this.scrollTarget=(g=h==null?void 0:h.scrollTarget)!=null?g: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(J1(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(Y1(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(G1(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(Z1(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(X1(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(W1(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(Q1(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(e$(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=A1(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,g=f?f.pos:u.pos,b=this.view.nodeDOM(h),y=this.view.nodeDOM(g);if(!b||!y)return;let v=b===y?b.getBoundingClientRect():nae(b.getBoundingClientRect(),y.getBoundingClientRect());c={getBoundingClientRect:()=>v,getClientRects:()=>[v]}}return c}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;if(!e)return;t$(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()}},B4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Qe(e.pluginKey):e.pluginKey,view:(t)=>new rae({view:t,...e})}),w5e;var dF=N(()=>{Ye();D4();Ye();at();uF();w5e=$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[B4({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 oae=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:g,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(!g.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=(g,b,y,v)=>{let{composing:S}=g;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:g})=>{var b;if(this.preventHide){this.preventHide=!1;return}if((g==null?void 0:g.relatedTarget)&&((b=this.element.parentNode)==null?void 0:b.contains(g.relatedTarget)))return;if((g==null?void 0:g.relatedTarget)===this.editor.view.dom)return;this.hide()},this.transactionHandler=({transaction:g})=>{let b=g.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 h4(e,{textSerializers:T1(this.editor.schema)})}get middlewares(){let e=[];if(this.floatingUIOptions.flip)e.push(J1(typeof this.floatingUIOptions.flip!=="boolean"?this.floatingUIOptions.flip:void 0));if(this.floatingUIOptions.shift)e.push(Y1(typeof this.floatingUIOptions.shift!=="boolean"?this.floatingUIOptions.shift:void 0));if(this.floatingUIOptions.offset)e.push(G1(typeof this.floatingUIOptions.offset!=="boolean"?this.floatingUIOptions.offset:void 0));if(this.floatingUIOptions.arrow)e.push(Z1(this.floatingUIOptions.arrow));if(this.floatingUIOptions.size)e.push(X1(typeof this.floatingUIOptions.size!=="boolean"?this.floatingUIOptions.size:void 0));if(this.floatingUIOptions.autoPlacement)e.push(W1(typeof this.floatingUIOptions.autoPlacement!=="boolean"?this.floatingUIOptions.autoPlacement:void 0));if(this.floatingUIOptions.hide)e.push(Q1(typeof this.floatingUIOptions.hide!=="boolean"?this.floatingUIOptions.hide:void 0));if(this.floatingUIOptions.inline)e.push(e$(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=A1(this.view,r.from,r.to);t$({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,g;if(((h=f.hide)==null?void 0:h.referenceHidden)||((g=f.hide)==null?void 0:g.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()}},z4=(e)=>new qe({key:typeof e.pluginKey==="string"?new Qe(e.pluginKey):e.pluginKey,view:(t)=>new oae({view:t,...e})}),N5e;var fF=N(()=>{Ye();D4();Ye();at();N5e=$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[z4({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 mF(e,t){return e!=null?e:new Qe(t)}function U4(e,t){return/^on[A-Z]/.test(e)&&typeof t==="function"}function dae(e){if(e.startsWith("aria-")||e.startsWith("data-"))return e;return e}function fae(e){return e.startsWith("aria-")||e.startsWith("data-")||cae.has(e)}function bF(e){if(e.startsWith("--"))return e;return e.replace(/[A-Z]/g,(t)=>`-${t.toLowerCase()}`)}function pae(e){var t;let r=e.endsWith("Capture"),i=(r?e.slice(0,-7):e).slice(2);return{eventName:(t=uae[i])!=null?t:i.toLowerCase(),options:r?{capture:!0}:void 0}}function hae(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 H4(e){return lae.has(e)}function pF(e,t,r){if(t==="tabIndex"){e.tabIndex=Number(r);return}e[t]=r}function mae(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 gae(e,t){if(typeof t!=="number"||t===0||e.startsWith("--")||iae.has(e))return String(t);return`${t}px`}function bae(e,t){if(gF.has(t))return;e.style.removeProperty(bF(t))}function yae(e,t,r){if(gF.has(t))return;e.style.setProperty(bF(t),gae(t,r))}function vae(e,t,r){new Set([...Object.keys(t),...Object.keys(r)]).forEach((i)=>{if(sae.has(i)||!fae(i)||U4(i,t[i])||U4(i,r[i]))return;let l=t[i],c=r[i];if(l===c)return;let u=dae(i);if(c==null||c===!1){if(H4(i))mae(e,i);e.removeAttribute(u);return}if(c===!0){if(H4(i))pF(e,i,!0);e.setAttribute(u,"");return}if(H4(i)){pF(e,i,c);return}e.setAttribute(u,String(c))})}function xae(e,t,r){if(t===r)return;if(r){e.className=r;return}e.removeAttribute("class")}function $ae(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){bae(e,c);return}yae(e,c,f)})}function Sae(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(!U4(i,l))return;let{eventName:c,options:u}=pae(i),f=(h)=>{l(hae(e,h))};e.addEventListener(c,f,u),a.push({eventName:c,listener:f,options:u})}),a}function yF(e,t){let r=Pd.useRef({}),a=Pd.useRef([]);aae(()=>{let i=r.current;return xae(e,i.className,t.className),$ae(e,i.style,t.style),vae(e,i,t),a.current=Sae(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,hF,Pd,Na,xF,aae,gF,iae,sae,lae,cae,uae,vF,z5e;var $F=N(()=>{dF();_1();at();fF();_1();Ma=j(ae(),1),hF=j(Vr(),1),Pd=j(ae(),1),Na=j(ae(),1),xF=j(Vr(),1);aae=typeof window<"u"?Pd.useLayoutEffect:Pd.useEffect,gF=new Set(["left","opacity","position","top","visibility","width"]),iae=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"]),sae=new Set(["children","className","style"]),lae=new Set(["tabIndex"]),cae=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),uae={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};vF=Ma.default.forwardRef(({pluginKey:e,editor:t,updateDelay:r,resizeDelay:a,appendTo:i,shouldShow:l=null,getReferencedVirtualElement:c,options:u,children:f,...h},g)=>{let b=Ma.useRef(document.createElement("div")),y=Ma.useRef(mF(e,"bubbleMenu")).current;if(yF(b.current,h),typeof g==="function")g(b.current);else if(g)g.current=b.current;let{editor:v}=L1(),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=B4({...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]),hF.createPortal(f,b.current)}),z5e=Na.default.forwardRef(({pluginKey:e,editor:t,updateDelay:r,resizeDelay:a,appendTo:i,shouldShow:l=null,options:c,children:u,...f},h)=>{let g=Na.useRef(document.createElement("div")),b=Na.useRef(mF(e,"floatingMenu")).current;if(yF(g.current,f),typeof h==="function")h(g.current);else if(h)h.current=g.current;let{editor:y}=L1(),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=g.current;H.style.visibility="hidden",H.style.position="absolute";let z=z4({...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]),xF.createPortal(u,g.current)})});var nh=(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 SF=()=>{};var F4=N(()=>{SF()});var Cae=(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 g=f.child(h-1);if(g.type!==t||!((r=g.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},wae,CF;var wF=N(()=>{Ye();at();F4();wae=/^\s*>\s$/,CF=en.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return nh("blockquote",{...xt(this.options.HTMLAttributes,e),children:nh("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 g=((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(g.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:()=>Cae(this.editor,this.type)}},addInputRules(){return[es({find:wae,type:this.type})]}})});var Eae,Tae,Rae,kae,EF;var TF=N(()=>{Ye();F4();Eae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Tae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Rae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,kae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,EF=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 nh("strong",{...xt(this.options.HTMLAttributes,e),children:nh("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:Eae,type:this.type}),bo({find:Rae,type:this.type})]},addPasteRules(){return[Or({find:Tae,type:this.type}),Or({find:kae,type:this.type})]}})});var Aae=(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]}},Mae=(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},RF;var kF=N(()=>{Ye();RF=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:Aae,type:this.type})]},addPasteRules(){return[Or({find:Mae,type:this.type})]}})});var V4=4,Nae,Oae,AF;var MF=N(()=>{Ye();at();Nae=/^```([a-z]+)?[\s\n]$/,Oae=/^~~~([a-z]+)?[\s\n]$/,AF=en.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:V4,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:V4,{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:g}=i,v=a.doc.textBetween(h,g,`
|
|
362
|
+
`,`
|
|
363
|
+
`).split(`
|
|
364
|
+
`).map((S)=>u+S).join(`
|
|
365
|
+
`);return f.replaceWith(h,g,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:V4,{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,g=l.start(),b=l.end(),v=a.doc.textBetween(g,b,`
|
|
366
|
+
`,`
|
|
367
|
+
`).split(`
|
|
368
|
+
`),S=0,w=0,E=h-g;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=g;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[ub({find:Nae,type:this.type,getAttributes:(e)=>({language:e[1]})}),ub({find:Oae,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 NF;var OF=N(()=>{Ye();NF=en.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>{if(!e.content)return"";return t.renderChildren(e.content,`
|
|
376
|
+
|
|
377
|
+
`)}})});var DF;var PF=N(()=>{Ye();DF=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:g})=>{if(g&&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 LF;var _F=N(()=>{Ye();LF=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)=>ub({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}})});var IF;var BF=N(()=>{Ye();at();IF=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(!BH(t,t.schema.nodes[this.name]))return!1;let{selection:r}=t,{$to:a}=r,i=e();if(k1(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 g=l.schema.nodes[this.options.nextNodeType]||f.parent.type.contentMatch.defaultType,b=g==null?void 0:g.create();if(b)c.insert(h,b),c.setSelection(Me.create(c.doc,h+1))}c.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ZH({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})});var Dae,Pae,Lae,_ae,zF;var HF=N(()=>{Ye();Dae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Pae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Lae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,_ae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,zF=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:Dae,type:this.type}),bo({find:Lae,type:this.type})]},addPasteRules(){return[Or({find:Pae,type:this.type}),Or({find:_ae,type:this.type})]}})});function Iae(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=Iae(a,r);if(i.indexOf(e)<0)i.push(e)}}function Bae(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 Uae(e=[]){let t={};vo.groups=t;let r=new vo;if(i$==null)i$=VF("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2");if(s$==null)s$=VF("ελ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,"'",E$),ge(r,"{",Sb),ge(r,"}",Cb),ge(r,"[",u$),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,"*",T$),ge(r,"@",Kc),ge(r,"`",k$),ge(r,"^",A$),ge(r,":",_d),ge(r,",",tk),ge(r,"$",M$),ge(r,".",rs),ge(r,"=",N$),ge(r,"!",nk),ge(r,"-",Da),ge(r,"%",wb),ge(r,"|",O$),ge(r,"+",D$),ge(r,"#",P$),ge(r,"?",Eb),ge(r,'"',rk),ge(r,"/",as),ge(r,";",ok),ge(r,"~",Tb),ge(r,"_",L$),ge(r,"\\",R$),ge(r,"・",WF);let a=En(r,dl,Z4,{["numeric"]:!0});En(a,dl,a);let i=En(a,ul,qF,{["asciinumeric"]:!0}),l=En(a,$b,GF,{["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,$b,Y4,{["alpha"]:!0});En(u,ul),En(u,dl,l),En(u,$b,u),En(l,dl,l),En(l,ul),En(l,$b,l);let f=ge(r,q4,ek,{["whitespace"]:!0}),h=ge(r,FF,Q4,{["whitespace"]:!0}),g=En(r,K4,Q4,{["whitespace"]:!0});ge(r,G4,g),ge(h,q4,f),ge(h,G4,g),En(h,K4,g),ge(g,FF),ge(g,q4),En(g,K4,g),ge(g,G4,g);let b=En(r,j4,YF,{["emoji"]:!0});ge(b,"#"),En(b,j4,b),ge(b,zae,b);let y=ge(b,Hae);ge(y,"#"),En(y,j4,b);let v=[[ul,c],[dl,i]],S=[[ul,null],[$b,u],[dl,l]];for(let w=0;w<i$.length;w++)jc(r,i$[w],J4,fl,v);for(let w=0;w<s$.length;w++)jc(r,s$[w],X4,Y4,S);Ld(J4,{tld:!0,ascii:!0},t),Ld(X4,{utld:!0,alpha:!0},t),jc(r,"file",c$,fl,v),jc(r,"mailto",c$,fl,v),jc(r,"http",rh,fl,v),jc(r,"https",rh,fl,v),jc(r,"ftp",rh,fl,v),jc(r,"ftps",rh,fl,v),Ld(c$,{scheme:!0,ascii:!0},t),Ld(rh,{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;UF(r,E,E,D)}return UF(r,"localhost",Rb,{ascii:!0}),r.jd=new vo(_$),{start:r,tokens:Object.assign({groups:t},JF)}}function XF(e,t){let r=Fae(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,g=null,b=-1,y=-1;while(c<a&&(f=u.go(r[c]))){if(u=f,u.accepts())b=0,y=0,g=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:g.t,v:t.slice(l-h,l),s:l-h,e:l})}return i}function Fae(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 VF(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 ak(e,t=null){let r=Object.assign({},kb);if(e)r=Object.assign(r,e instanceof ak?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 jF(e){return e}function QF(e,t){this.t="token",this.v=e,this.tk=t}function I$(e,t){class r extends QF{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 Kae({groups:e}){let t=e.domain.concat([w$,T$,Kc,R$,k$,A$,M$,N$,Da,Z4,wb,O$,D$,P$,as,_$,Tb,L$]),r=[E$,_d,tk,rs,nk,wb,Eb,rk,ok,h$,m$,Sb,Cb,d$,u$,f$,p$,g$,b$,y$,v$,x$,$$,S$,C$],a=[w$,E$,T$,R$,k$,A$,M$,N$,Da,Sb,Cb,wb,O$,D$,P$,Eb,as,_$,Tb,L$],i=Oa(),l=ge(i,Tb);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 g=ge(l,rs);yt(g,a,l),yt(g,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(Vae);yt(y,e.tld,v),yt(y,e.utld,v),ge(h,Rb,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(l$);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(l$);yt(D,e.numeric,H);let z=Oa(l$),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,Eb,z),yt(re,e.domain,z),yt(re,t,z),ge(re,as,z);let J=[[Sb,Cb],[u$,d$],[f$,p$],[h$,m$],[g$,b$],[y$,v$],[x$,$$],[S$,C$]];for(let be=0;be<J.length;be++){let[ce,se]=J[be],_=ge(z,ce);ge(G,ce,_);let W=Oa(l$);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,Rb,R),ge(i,ek,jae),{start:i,tokens:JF}}function qae(e,t,r){let a=r.length,i=0,l=[],c=[];while(i<a){let u=e,f=null,h=null,g=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++,g++}if(y<0){if(i-=g,i<a)c.push(r[i]),i++}else{if(c.length>0)l.push(W4(KF,t,c)),c=[];i-=y,g-=y;let v=b.t,S=r.slice(i-g,i);l.push(W4(v,t,S))}}if(c.length>0)l.push(W4(KF,t,c));return l}function W4(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 ZF(){return vo.groups={},sn.scanner=null,sn.parser=null,sn.tokenQueue=[],sn.pluginQueue=[],sn.customSchemes=[],sn.initialized=!1,sn}function ik(e,t=!1){if(sn.initialized)Gae(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Wae}`);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 Yae(){sn.scanner=Uae(sn.customSchemes);for(let e=0;e<sn.tokenQueue.length;e++)sn.tokenQueue[e][1]({scanner:sn.scanner});sn.parser=Kae(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 B$(e){if(!sn.initialized)Yae();return qae(sn.parser.start,e,XF(sn.scanner.start,e))}function z$(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 ak(r),i=B$(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),UF=(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",Y4="UWORD",qF="ASCIINUMERICAL",GF="ALPHANUMERICAL",Rb="LOCALHOST",J4="TLD",X4="UTLD",c$="SCHEME",rh="SLASH_SCHEME",Z4="NUM",Q4="WS",ek="NL",Sb="OPENBRACE",Cb="CLOSEBRACE",u$="OPENBRACKET",d$="CLOSEBRACKET",f$="OPENPAREN",p$="CLOSEPAREN",h$="OPENANGLEBRACKET",m$="CLOSEANGLEBRACKET",g$="FULLWIDTHLEFTPAREN",b$="FULLWIDTHRIGHTPAREN",y$="LEFTCORNERBRACKET",v$="RIGHTCORNERBRACKET",x$="LEFTWHITECORNERBRACKET",$$="RIGHTWHITECORNERBRACKET",S$="FULLWIDTHLESSTHAN",C$="FULLWIDTHGREATERTHAN",w$="AMPERSAND",E$="APOSTROPHE",T$="ASTERISK",Kc="AT",R$="BACKSLASH",k$="BACKTICK",A$="CARET",_d="COLON",tk="COMMA",M$="DOLLAR",rs="DOT",N$="EQUALS",nk="EXCLAMATION",Da="HYPHEN",wb="PERCENT",O$="PIPE",D$="PLUS",P$="POUND",Eb="QUERY",rk="QUOTE",WF="FULLWIDTHMIDDLEDOT",ok="SEMI",as="SLASH",Tb="TILDE",L$="UNDERSCORE",YF="EMOJI",_$="SYM",JF,ul,$b,j4,dl,K4,FF="\r",q4=`
|
|
383
|
+
`,zae="️",Hae="",G4="",i$=null,s$=null,kb,Vae,KF,jae,l$,Oa=(e)=>new vo(e),Gae,Wae="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",sn;var H$=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(Bae(c.t,a),r);Ld(l,f,a)}else if(r)Ld(l,r,a)}c.t=l}return i.j[e]=c,c}};JF=Object.freeze({__proto__:null,ALPHANUMERICAL:GF,AMPERSAND:w$,APOSTROPHE:E$,ASCIINUMERICAL:qF,ASTERISK:T$,AT:Kc,BACKSLASH:R$,BACKTICK:k$,CARET:A$,CLOSEANGLEBRACKET:m$,CLOSEBRACE:Cb,CLOSEBRACKET:d$,CLOSEPAREN:p$,COLON:_d,COMMA:tk,DOLLAR:M$,DOT:rs,EMOJI:YF,EQUALS:N$,EXCLAMATION:nk,FULLWIDTHGREATERTHAN:C$,FULLWIDTHLEFTPAREN:g$,FULLWIDTHLESSTHAN:S$,FULLWIDTHMIDDLEDOT:WF,FULLWIDTHRIGHTPAREN:b$,HYPHEN:Da,LEFTCORNERBRACKET:y$,LEFTWHITECORNERBRACKET:x$,LOCALHOST:Rb,NL:ek,NUM:Z4,OPENANGLEBRACKET:h$,OPENBRACE:Sb,OPENBRACKET:u$,OPENPAREN:f$,PERCENT:wb,PIPE:O$,PLUS:D$,POUND:P$,QUERY:Eb,QUOTE:rk,RIGHTCORNERBRACKET:v$,RIGHTWHITECORNERBRACKET:$$,SCHEME:c$,SEMI:ok,SLASH:as,SLASH_SCHEME:rh,SYM:_$,TILDE:Tb,TLD:J4,UNDERSCORE:L$,UTLD:X4,UWORD:Y4,WORD:fl,WS:Q4}),ul=/[a-z]/,$b=/\p{L}/u,j4=/\p{Emoji}/u,dl=/\d/,K4=/\s/;kb={defaultProtocol:"http",events:null,format:jF,formatHref:jF,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};ak.prototype={o:kb,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]:kb[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)}};QF.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=kb.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),g=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(g)Object.assign(c,g);return{tagName:i,attributes:c,content:l,eventListeners:b}}};Vae=I$("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),KF=I$("text"),jae=I$("nl"),l$=I$("url",{isLink:!0,toHref(e=kb.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Rb&&e[1].t===_d}});Gae=typeof console<"u"&&console&&console.warn||(()=>{}),sn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};B$.scan=XF});function Zae(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 eie(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=d4(r.doc,[...t]);if(lb(u).forEach(({newRange:h})=>{let g=kH(a.doc,h,(v)=>v.isTextblock),b,y;if(g.length>1)b=g[0],y=a.doc.textBetween(b.pos,b.pos+b.node.nodeSize,void 0," ");else if(g.length){let v=a.doc.textBetween(h.from,h.to," "," ");if(!Xae.test(v))return;b=g[0],y=a.doc.textBetween(b.pos,h.to,void 0," ")}if(b&&y){let v=y.split(Jae).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=B$(S).map((R)=>R.toObject(e.defaultProtocol));if(!Zae(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(R1(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 tie(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=m4(t.state,e.type.name),h=(i=c.href)!=null?i:f.href,g=(l=c.target)!=null?l:f.target;if(h)window.open(h,g),u=!0}return u}}})}function eV(e,t){let r=0;for(let a=t-1;a>=0&&e[a]==="\\";a-=1)r+=1;return r%2===1}function oie(e,t){let r=0,a=0;while(a<t){if(e[a]!=="`"){a+=1;continue}if(r===0&&eV(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 tV(e,t,r){var a,i;let[,l,c]=t;if((t.index?e[t.index-1]:void 0)==="!"||eV(e,(a=t.index)!=null?a:0))return!1;if(oie(e,(i=t.index)!=null?i:0))return!1;return!!l.trim()&&r(c)}function nV(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 aie(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function rV(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 iie(e){let t=bo({find:(r)=>{let a=nie.exec(r);if(!a||!tV(r,a,e.isAllowedHref))return null;return nV(a)},type:e.type,getAttributes:rV});return new Zp({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 sie(e){let t=Or({find:(r)=>{var a,i;let l=[];for(let u of r.matchAll(rie))if(tV(r,u,e.isAllowedHref))l.push(nV(u));let c=((i=(a=e.findPlainUrls)==null?void 0:a.call(e,r))!=null?i:[]).filter((u)=>!l.some((f)=>aie(f,u)));return[...l,...c]},type:e.type,getAttributes:rV});return new v4({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 lie(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((g)=>{f+=g.textContent});let h=z$(f,{defaultProtocol:e.defaultProtocol}).find((g)=>g.isLink&&g.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(Qae,"").match(new RegExp(`^(?:(?:${r.map((a)=>a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var sk="[\x00- -\u2029 ]",Jae,Xae,Qae,nie,rie,oV;var aV=N(()=>{Ye();H$();Ye();at();H$();Ye();at();Ye();at();H$();Jae=new RegExp(sk),Xae=new RegExp(`${sk}$`),Qae=new RegExp(sk,"g");nie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,rie=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;oV=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"){ik(e);return}ik(e.scheme,e.optionalSlashes)})},onDestroy(){ZF()},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[iie({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;z$(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[sie({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[Or({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(eie({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(tie({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste)e.push(lie({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink}));return e}})});function V$(e){let t=e,r="";for(let[a,i]of fV)while(t>=a)r+=i,t-=a;return r}function fk(e){return V$(e).toUpperCase()}function hV(e){let t=e.toLowerCase(),r=0,a=0;while(r<t.length){let i=!1;for(let[l,c]of fV)if(t.startsWith(c,r)){a+=l,r+=c.length,i=!0;break}if(!i)return 0}return a}function gie(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=hV(e);if(t<=0)return!1;return(e===e.toLowerCase()?V$(t):fk(t))===e}function bie(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 F$(e){if(e<=26)return U$[e-1];let t=Math.floor((e-1)/26)-1,r=(e-1)%26;if(t<0)return U$[r];return U$[t]+U$[r]}function j$(e){if(!e||/^\d+$/.test(e))return;if(gie(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 pk(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=j$(e);if(t==="i"||t==="I")return hV(e);if(t==="a"||t==="A"){let a=bie(e);return a>0?a:1}let r=parseInt(e,10);return Number.isNaN(r)?1:r}function yie(e,t){if(e==="numeric")return String(t);switch(e){case"a":return F$(t);case"A":return F$(t).toUpperCase();case"i":return V$(t);case"I":return fk(t);default:return String(t)}}function vie(e){var t;if(e.length===0)return!1;let r=(t=j$(e[0]))!=null?t:"numeric",a=pk(e[0]);if(a<1)return!1;for(let i=0;i<e.length;i++){let l=yie(r,a+i);if(e[i]!==l)return!1}return!0}function xie(e){return{type:j$(e),start:pk(e)}}function $ie(e){let{type:t,start:r}=xie(e),a={};if(t)a.type=t;if(r!==1)a.start=r;return a}function Sie(e,t,r=". "){let a=t+1;if(!e||e==="1")return`${a}${r}`;switch(e){case"a":return`${F$(a)}${r}`;case"A":return`${F$(a).toUpperCase()}${r}`;case"i":return`${V$(a)}${r}`;case"I":return`${fk(a)}${r}`;default:return`${a}${r}`}}function Cie(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 wie(e,t){if(t.tokenizeInline)return t.parseInline(t.tokenizeInline(e));return t.parseInline([{type:"text",raw:e,text:e}])}function Mie(e){return uk.test(e.trimStart())}function Nie(e){let t=e.trimStart();return Ab.bulletItem.test(t)||Mie(t)||Ab.heading.test(t)||Ab.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||Ab.codeFence.test(t)}function Oie(e){return Object.values(Ab).some((t)=>t.test(e))}function Die(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&&Nie(i)){a=!0,r.push(i);return}t.push(i)}),{paragraphLines:t,blockLines:r}}function Pie(e){let t=[],r=0,a=0;while(r<e.length){let i=e[r],l=i.match(uk);if(!l)break;let[,c,u,f,h]=l,g=c.length,b=parseInt(u,10),y=isNaN(b)?j$(u):void 0,v=isNaN(b)?pk(u):b,S=[h],w=r+1,E=[i],R=!1;while(w<e.length){let D=e[w];if(D.match(uk))break;if(D.trim()==="")E.push(D),S.push(""),R=!0,w+=1;else if(D.match(Aie)){let z=D.length-D.trimStart().length,G=g+u.length+1;E.push(D),S.push(D.slice(Math.min(z,G))),w+=1}else{if(R||Oie(D))break;E.push(D),S.push(D),w+=1}}t.push({indent:g,number:v,type:y,content:S.join(`
|
|
384
|
+
`).trim(),contentLines:S,raw:E.join(`
|
|
385
|
+
`)}),a=w,r=w}return[t,a]}function _ie(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(Lie);if(!c)return null;r.push({marker:c[1],content:c[3]})}let a=r.map((l)=>l.marker);if(!vie(a))return null;return{type:"orderedList",attrs:$ie(r[0].marker),content:r.map((l)=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:l.content}]}]}))}}function yV(e,t,r){let a=[],i=0;while(i<e.length){let l=e[i];if(l.indent===t){let{paragraphLines:c,blockLines:u}=Die(l.contentLines),f=c.join(`
|
|
387
|
+
`).trim(),h=[];if(f)h.push({type:"paragraph",raw:f,tokens:r.inlineTokens(f)});let g=u.join(`
|
|
388
|
+
`).trim();if(g){let v=r.blockTokens(g);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=yV(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 Iie(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 uV(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 cie,uie=(e,t)=>{for(var r in t)cie(e,r,{get:t[r],enumerable:!0})},die="listItem",iV="textStyle",sV,dk,fie=(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],g=!1;if(f.forEach((v)=>{if(v.type===h&&v.childCount>1)g=!0}),!g)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}},pie=(e,t,r,a)=>{let i=fie(e,r,a);if(!i)return!1;let{selection:l}=e,{nestedList:c,nestedListPos:u,insertPos:f,items:h}=i,g=e.tr;g.delete(u,u+c.nodeSize);let b=g.mapping.map(f);if(g.insert(b,le.from(h)),g.setSelection(l.map(g.doc,g.mapping)),t)t(g);return!0},hie=(e,t,r)=>pie(e.state,e.view.dispatch,t,r),dV=(e,t)=>$t.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let r=()=>hie(this.editor,e,t);return{Delete:r,"Mod-Delete":r}}}),fV,U$="abcdefghijklmnopqrstuvwxyz",mie="[a-zA-Z]{1,2}",pV,hk,Eie,K$=(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}},mk=(e,t)=>{let r=K$(e,t);if(!r)return!1;let[,a]=DH(t,e,r.$pos.pos+4);return a},mV=(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},lk=(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)&&mV(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(!LH(e.state))return!1;return e.chain().liftListItem(t).run()},gV=(e,t)=>{let r=mk(e,t),a=K$(e,t);if(!a||!r)return!1;if(r>a.depth)return!0;return!1},bV=(e,t)=>{let r=mk(e,t),a=K$(e,t);if(!a||!r)return!1;if(r<a.depth)return!0;return!1},ck=(e,t)=>{if(!Zi(e.state,t))return!1;if(!PH(e.state,t))return!1;let{selection:r}=e.state,{$from:a,$to:i}=r;if(!r.empty&&a.sameParent(i))return!1;if(gV(t,e.state))return e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run();if(bV(t,e.state))return e.chain().joinForward().joinBackward().run();return e.commands.joinItemForward()},Tie=(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},Rie=(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},kie=(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},gk,uk,Aie,Ab,Lie,Bie="listItem",lV="textStyle",cV,bk,zie,q$,G$,HAe;var oh=N(()=>{Ye();Ye();Ye();Sa();Ye();Ye();Ye();Ye();Ye();Ye();Ye();at();Ye();Ye();Ye();cie=Object.defineProperty,sV=/^\s*([-+*])\s$/,dk=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(die,this.editor.getAttributes(iV)).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:sV,type:this.type});if(this.options.keepMarks||this.options.keepAttributes)e=es({find:sV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(iV),editor:this.editor});return[e]}}),fV=[[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"]],pV=String.raw`\d+|[ivxlcdmIVXLCDM]+|${mie}`;hk=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(Cie(e))return{type:"listItem",content:[{type:"paragraph",content:wie(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)=>cb(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,g=f-1+(a.index||0);return Sie(h,g,". ")}return"- "},r),addExtensions(){return[dV(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)}}}),Eie={};uie(Eie,{findListItemPos:()=>K$,getNextListDepth:()=>mk,handleBackspace:()=>lk,handleDelete:()=>ck,hasListBefore:()=>mV,hasListItemAfter:()=>Tie,hasListItemBefore:()=>Rie,listItemHasSubList:()=>kie,nextListIsDeeper:()=>gV,nextListIsHigher:()=>bV});gk=$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(ck(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(ck(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(lk(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(lk(e,r,a))t=!0}),t}}}}),uk=new RegExp(`^(\\s*)(${pV})([.)])\\s+(.*)$`),Aie=/^\s/,Ab={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};Lie=new RegExp(`^(${pV})([.)])\\s+(.+)$`);cV=/^(\d+)\.\s$/;bk=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=uV(r);if(i)return i}let a=e.querySelector("li");if(a){let i=a.getAttribute("style");if(i){let l=uV(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?Iie(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]=Pie(l);if(c.length===0)return;let f=yV(c,c[0].indent,r);if(f.length===0)return;let h=((a=c[0])==null?void 0:a.number)||1,g=(i=c[0])==null?void 0:i.type;return{type:"list",ordered:!0,start:h,typeMarker:g,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(Bie,this.editor.getAttributes(lV)).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=_ie(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:cV,type:this.type,getAttributes:(r)=>({start:+r[1]}),joinPredicate:e});if(this.options.keepMarks||this.options.keepAttributes)t=es({find:cV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:(r)=>({start:+r[1],...this.editor.getAttributes(lV)}),joinPredicate:e,editor:this.editor});return[t]}}),zie=/^\s*(\[([( |x])?\])\s$/,q$=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 cb(e,t,i)},addExtensions(){if(!this.options.nested)return[];return[dV(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 g=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=Xp(b,y),S=new Set(Object.keys(v)),w=this.options.HTMLAttributes;return g.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)}),g=S,!0}}}},addInputRules(){return[es({find:zie,type:this.type,getAttributes:(e)=>({checked:e[e.length-1]==="x"})})]}}),G$=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=M1(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=M1(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()}}}),HAe=$t.create({name:"listKit",addExtensions(){let e=[];if(this.options.bulletList!==!1)e.push(dk.configure(this.options.bulletList));if(this.options.listItem!==!1)e.push(hk.configure(this.options.listItem));if(this.options.listKeymap!==!1)e.push(gk.configure(this.options.listKeymap));if(this.options.orderedList!==!1)e.push(bk.configure(this.options.orderedList));if(this.options.taskItem!==!1)e.push(q$.configure(this.options.taskItem));if(this.options.taskList!==!1)e.push(G$.configure(this.options.taskList));return e}})});var W$=" ",yk=" ",vV;var xV=N(()=>{Ye();vV=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===W$||r[0].text===W$||r[0].raw===yk||r[0].text===yk)&&a.length===1&&a[0].type==="text"&&(a[0].text===W$||a[0].text===yk))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?W$:""}return t.renderChildren(l)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var Hie,Uie,$V;var SV=N(()=>{Ye();Hie=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Uie=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,$V=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:Hie,type:this.type})]},addPasteRules(){return[Or({find:Uie,type:this.type})]}})});var CV;var wV=N(()=>{Ye();CV=en.create({name:"text",group:"inline",parseMarkdown:(e)=>({type:"text",text:e.text||""}),renderMarkdown:(e)=>e.text||""})});var EV;var TV=N(()=>{Ye();EV=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 RV(e={}){return new qe({view(t){return new kV(t,e)}})}class kV{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:g,nodeAfter:b}=e;if(g||b){let y=this.editorView.nodeDOM(this.cursorPos-(g?g.nodeSize:0));if(y){let v=y.getBoundingClientRect(),S=g?v.bottom:v.top;if(g&&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 g=this.editorView.coordsAtPos(this.cursorPos),b=this.width/2*l;r={left:g.left-b,right:g.left+b,top:g.top,bottom:g.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 g=u.getBoundingClientRect(),b=g.width/u.offsetWidth,y=g.height/u.offsetHeight;f=g.left-u.scrollLeft*b,h=g.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=Zx(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 AV=N(()=>{Js();Rc()});var MV=N(()=>{AV()});class vk{constructor(e){this.pos=e}map(e){return new vk(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Tn.valid(t)?new Tn(t):Fe.near(t)}}function NV(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Fie(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||NV(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Vie(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||NV(i.type))return!0;if(i.inlineContent)return!1}}return!0}function OV(){return new qe({props:{decorations:Gie,createSelectionBetween(e,t,r){return t.pos==r.pos&&Tn.valid(r)?new Tn(r):null},handleClick:Kie,handleKeyDown:jie,handleDOMEvents:{beforeinput:qie}}})}function Y$(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 Kie(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 qie(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 Gie(e){if(!(e.selection instanceof Tn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Lt.create(e.doc,[Yn.widget(e.selection.head,t,{key:"gapcursor"})])}var Tn,jie;var DV=N(()=>{p1();Js();Ws();e4();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 vk(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Fie(e)||!Vie(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);jie=ab({ArrowLeft:Y$("horiz",-1),ArrowRight:Y$("horiz",1),ArrowUp:Y$("vert",-1),ArrowDown:Y$("vert",1)})});var PV=N(()=>{DV()});var J$=200,$r=function(){},LV,Wie,xk;var _V=N(()=>{$r.prototype.append=function(t){if(!t.length)return this;return t=$r.from(t),!this.length&&t||t.length<J$&&this.leafAppend(t)||this.length<J$&&t.leafPrepend(this)||this.appendInner(t)};$r.prototype.prepend=function(t){if(!t.length)return this;return $r.from(t).append(this)};$r.prototype.appendInner=function(t){return new Wie(this,t)};$r.prototype.slice=function(t,r){if(t===void 0)t=0;if(r===void 0)r=this.length;if(t>=r)return $r.empty;return this.sliceInner(Math.max(0,t),Math.min(this.length,r))};$r.prototype.get=function(t){if(t<0||t>=this.length)return;return this.getInner(t)};$r.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)};$r.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};$r.from=function(t){if(t instanceof $r)return t;return t&&t.length?new LV(t):$r.empty};LV=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<=J$)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=J$)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}($r);$r.empty=new LV([]);Wie=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}($r),xk=$r});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((g,b)=>{if(!g.step){if(!a)a=this.remapping(r,b+1),i=a.maps.length;i--,h.push(g);return}if(a){h.push(new is(g.map));let y=g.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(g.step);if(g.selection)return c=a?g.selection.map(a.slice(i)):g.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 g=e.steps[h].invert(e.docs[h]),b=new is(e.mapping.maps[h],g,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>Xie)c=Jie(c,f),l-=f;return new li(c.append(i),l)}remapping(e,t){let r=new Ip;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),g=new li(h,c);if(g.emptyItemCount()>Yie)g=g.compress(this.items.length-r.length);return g}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 g=new is(f.invert(),u,h),b,y=a.length-1;if(b=a.length&&a[y].merge(g))a[y]=b;else a.push(g)}}else if(l.map)r--},this.items.length,0),new li(xk.from(a.reverse()),i)}}function Jie(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 Qie(e,t,r,a){let i=r.getMeta(Id),l;if(i)return i.historyState;if(r.getMeta(tse))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,X$(t)),e.undone,IV(r.mapping.maps),e.prevTime,e.prevComposition);else return new hl(e.done,e.undone.addTransform(r,void 0,a,X$(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||!Zie(r,e.prevRanges)),h=c?$k(e.prevRanges,r.mapping):IV(r.mapping.maps);return new hl(e.done.addTransform(r,f?t.selection.getBookmark():void 0,a,X$(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),$k(e.prevRanges,r.mapping),e.prevTime,e.prevComposition);else return new hl(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),$k(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function Zie(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 IV(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 $k(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 ese(e,t,r){let a=X$(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 X$(e){let t=e.plugins;if(BV!=t){Sk=!1,BV=t;for(let r=0;r<t.length;r++)if(t[r].spec.historyPreserveItems){Sk=!0;break}}return Sk}function zV(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 Qie(r,a,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,r){let a=r.inputType,i=a=="historyUndo"?Ck:a=="historyRedo"?wk:null;if(!i||!t.editable)return!1;return r.preventDefault(),i(t.state,t.dispatch)}}}})}function Q$(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=ese(i,r,e);if(l)a(t?l.scrollIntoView():l)}return!0}}var Yie=500,Xie=20,Sk=!1,BV=null,Id,tse,Ck,wk,fMe,pMe;var HV=N(()=>{_V();Rc();Js();li.empty=new li(xk.empty,0);Id=new Qe("history"),tse=new Qe("closeHistory");Ck=Q$(!1,!0),wk=Q$(!0,!0),fMe=Q$(!1,!1),pMe=Q$(!0,!1)});var UV=N(()=>{HV()});function GV(e){let{editor:t,placeholder:r,dataAttribute:a,pos:i,node:l,isEmptyDoc:c,hasAnchor:u,classes:{emptyNode:f,emptyEditor:h}}=e,g=[f];if(c)g.push(h);return Yn.node(i,i+l.nodeSize,{class:g.join(" "),[a]:typeof r==="function"?r({editor:t,node:l,pos:i,hasAnchor:u}):r})}function WV(e,t){return typeof e==="function"?e(t):e}function YV({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,(g,b)=>{let y=u>=b&&u<=b+g.nodeSize,v=!g.isLeaf&&Qp(g);if(!g.type.isTextblock)return t.includeChildren;if((y||!t.showOnlyCurrent)&&v)f.push(GV({editor:e,isEmptyDoc:h,dataAttribute:r,hasAnchor:y,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:WV(t.emptyNodeClass,{editor:e,node:g,pos:b,hasAnchor:y})},node:g,pos:b}));return t.includeChildren}),f}function JV({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 g=a.resolve(c),b=g.depth>0?g.node(1):g.nodeAfter,y=g.depth>0?g.before(1):c;if(b&&b.type.isTextblock&&Qp(b)){let v=c>=y&&c<=y+b.nodeSize;u.push(GV({editor:e,isEmptyDoc:f,dataAttribute:r,hasAnchor:v,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:WV(t.emptyNodeClass,{editor:e,node:b,pos:y,hasAnchor:v})},node:b,pos:y}))}}else u.push(...YV({editor:e,options:t,dataAttribute:r,doc:a,selection:i,from:0,to:a.content.size}));return Lt.create(a,u)}function Mb(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 Nb(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function nse(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 rse(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 ose(e,t){let r=nse(e,t.from,t.to);if(r.push(Nb(e,Mb(e,t.from))),t.to>t.from)r.push(Nb(e,Mb(e,Math.min(t.to,e.content.size+1)-1)));else if(t.from<e.content.size+1)r.push(Nb(e,Mb(e,Math.min(t.from+1,e.content.size))));return r}function ase(e,t,r){let a=[];if(e.docChanged){let i=lb(e);for(let l of i)a.push(...ose(r.doc,l.newRange))}if(e.selectionSet)a.push(Nb(r.doc,Mb(r.doc,e.mapping.map(t.selection.anchor)))),a.push(Nb(r.doc,Mb(r.doc,r.selection.anchor)));return rse(a)}function ise(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 sse({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:g}=ise(f.from,f.to,l),b=u.find(h,g).filter((v)=>v.from>=h&&v.to<=g);if(b.length)u=u.remove(b);let y=YV({editor:r,options:a,dataAttribute:i,doc:l,selection:c,from:h,to:g});if(y.length)u=u.add(l,y)}return u}function lse({editor:e,options:t,dataAttribute:r}){return{init(a,i){let l=JV({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=ase(a,l,c);return sse({decorations:u,ranges:f,editor:e,options:t,dataAttribute:r,doc:c.doc,selection:c.selection})}}}function cse(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function use({editor:e,options:t}){let r=t.dataAttribute?`data-${cse(t.dataAttribute)}`:`data-${qV}`,a=t.showOnlyCurrent&&!t.includeChildren;return new qe({key:FV,...a?{}:{state:lse({editor:e,options:t,dataAttribute:r})},props:{decorations:a?({doc:i,selection:l})=>JV({editor:e,options:t,dataAttribute:r,doc:i,selection:l}):(i)=>{var l;if(t.showOnlyWhenEditable&&!e.isEditable)return Lt.empty;return(l=FV.getState(i))!=null?l:Lt.empty}}})}function Ek(e,t){return!e.selection.empty&&!k1(e.selection)&&t.isEditable}function dse(e,t){return Ek(e,t)&&!t.isFocused&&!t.view.dragging}function fse(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function pse(e){e.focus()}function VV({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var vMe,jV,EMe,KV,qV="placeholder",FV,Tk,HMe,hse="skipTrailingNode",XV,QV;var Z$=N(()=>{Ye();at();Ye();MV();Ye();at();Bc();Ye();PV();at();Ye();at();Bc();Ye();Bc();Bc();Ye();Bc();Ye();at();Bc();Ye();at();Ye();UV();vMe=$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 g=a.tr.deleteRange(0,h);return e=!0,g}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,g=u;if(t.deleteRange(h,g),this.storage.characters({node:t.doc})>a)return!1;return!0}})]}}),jV=$t.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[RV(this.options)]}}),EMe=$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(Yn.node(h,h+f.nodeSize,{class:this.options.className}))}),Lt.create(e,l)}}})]}}),KV=$t.create({name:"gapCursor",addProseMirrorPlugins(){return[OV()]},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}}}),FV=new Qe("tiptap__placeholder");Tk=$t.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:qV,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[use({editor:this.editor,options:this.options})]}});HMe=$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(!dse(r,e))return null;return Lt.create(r.doc,[Yn.inline(r.selection.from,r.selection.to,{class:t.className})])},handleDOMEvents:{blur(r){if(!Ek(r.state,e))return!1;return fse(),!1},focus(r){if(!Ek(r.state,e))return!1;return requestAnimationFrame(()=>{if(!e.isDestroyed&&r.hasFocus())pse(r)}),!1}}}})]}});XV=$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,g=t.getState(c),b=u.content.size,y=h.nodes[r];if(i.some((v)=>v.getMeta(hse)))return;if(!g)return;return f.insert(b,y.create())},state:{init:(i,l)=>{let c=l.tr.doc.lastChild;return!VV({node:c,types:a})},apply:(i,l)=>{if(!i.docChanged)return l;if(i.getMeta("__uniqueIDTransaction"))return l;let c=i.doc.lastChild;return!VV({node:c,types:a})}}})]}}),QV=$t.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Ck(e,t),redo:()=>({state:e,dispatch:t})=>wk(e,t)}},addProseMirrorPlugins(){return[zV(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 mse,ZV;var ej=N(()=>{Ye();wF();TF();kF();MF();OF();PF();_F();BF();HF();aV();oh();xV();SV();wV();TV();Z$();mse=$t.create({name:"starterKit",addExtensions(){var e,t,r,a;let i=[];if(this.options.bold!==!1)i.push(EF.configure(this.options.bold));if(this.options.blockquote!==!1)i.push(CF.configure(this.options.blockquote));if(this.options.bulletList!==!1)i.push(dk.configure(this.options.bulletList));if(this.options.code!==!1)i.push(RF.configure(this.options.code));if(this.options.codeBlock!==!1)i.push(AF.configure(this.options.codeBlock));if(this.options.document!==!1)i.push(NF.configure(this.options.document));if(this.options.dropcursor!==!1)i.push(jV.configure(this.options.dropcursor));if(this.options.gapcursor!==!1)i.push(KV.configure(this.options.gapcursor));if(this.options.hardBreak!==!1)i.push(DF.configure(this.options.hardBreak));if(this.options.heading!==!1)i.push(LF.configure(this.options.heading));if(this.options.undoRedo!==!1)i.push(QV.configure(this.options.undoRedo));if(this.options.horizontalRule!==!1)i.push(IF.configure(this.options.horizontalRule));if(this.options.italic!==!1)i.push(zF.configure(this.options.italic));if(this.options.listItem!==!1)i.push(hk.configure(this.options.listItem));if(this.options.listKeymap!==!1)i.push(gk.configure((e=this.options)==null?void 0:e.listKeymap));if(this.options.link!==!1)i.push(oV.configure((t=this.options)==null?void 0:t.link));if(this.options.orderedList!==!1)i.push(bk.configure(this.options.orderedList));if(this.options.paragraph!==!1)i.push(vV.configure(this.options.paragraph));if(this.options.strike!==!1)i.push($V.configure(this.options.strike));if(this.options.text!==!1)i.push(CV.configure(this.options.text));if(this.options.underline!==!1)i.push(EV.configure((r=this.options)==null?void 0:r.underline));if(this.options.trailingNode!==!1)i.push(XV.configure((a=this.options)==null?void 0:a.trailingNode));return i}}),ZV=mse});var tj;var nj=N(()=>{Z$();Z$();tj=Tk});var gse,bse,yse,rj;var oj=N(()=>{Ye();gse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,bse=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,yse=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")||zH(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:gse,type:this.type})]},addPasteRules(){return[Or({find:bse,type:this.type})]}}),rj=yse});var aj;var ij=N(()=>{oh();oh();aj=G$});var sj;var lj=N(()=>{oh();oh();sj=q$});function Rk(e){let t=e.trim().toLowerCase();if(!t)return[...cj];return cj.filter((r)=>r.title.toLowerCase().includes(t)||r.keywords.some((a)=>a.includes(t)))}function vse(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 kk({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),g=Dt.useRef(r);g.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,be]=Dt.useState(!1);Dt.useEffect(()=>be(!0),[]);let ce=Dt.useId(),se=`${ce}-label`,_=`${ce}-slash`,W=(fe)=>`${_}-option-${fe}`,Y=Dt.useRef(()=>{}),Z=u["aria-label"],pe=Dt.useMemo(()=>Rk(y?.query??""),[y?.query]),V=y?Math.min(y.index,Math.max(pe.length-1,0)):0,k=y!==null&&pe.length>0,X=mU({editable:i,immediatelyRender:!1,extensions:[ZV.configure({heading:{levels:[1,2,3]},link:{openOnClick:!1,autolink:!0}}),rj,aj,sj.configure({nested:!0}),tj.configure({placeholder:()=>g.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(!vse(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=Rk(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 On=ln.slice(1);if(/\s/.test(On)||Rk(On).length===0)return S(null);S({...Rt,query:On,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(),On=6,Rn=8,tn=he.bottom+On;if(tn+ln.height>window.innerHeight-Rn)tn=Math.max(Rn,he.top-On-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=S4({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=O3(D);if(!fe)return G(D3);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(vF,{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:e2,onMouseDown:(fe)=>fe.preventDefault(),onClick:Ze,title:"Apply link",children:"Apply"},void 0,!1,void 0,this),Kt.jsxDEV("button",{type:"button",className:e2,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:[xse.map((fe)=>Kt.jsxDEV("button",{type:"button",className:e2,"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:e2,"data-active":ke?.link??!1,"aria-pressed":ke?.link??!1,onMouseDown:(fe)=>fe.preventDefault(),onClick:Ee,title:"Link",children:Kt.jsxDEV($se,{},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($4,{editor:X},void 0,!1,void 0,this),J&&k&&y?uj.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,uj,Kt,cj,e2="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",xse,$se=()=>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 dj=N(()=>{_1();$F();ej();nj();oj();ij();lj();Ds();Dt=j(ae(),1),uj=j(Vr(),1),Kt=j(Et(),1),cj=[{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()}];xse=[{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 fj=N(()=>{dj()});function ah({label:e,children:t}){return ye.jsxDEV("label",{className:"flex w-full flex-col gap-2",children:[e===void 0?null:ye.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 Sse(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 Cse(e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}function pj(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function wse(e){let[t,r]=Dr.useState(0);Dr.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 Ese({value:e,onChange:t}){let[r,a]=Dr.useState(!1),[i,l]=Dr.useState(""),c=Boolean(e),u=c?new Date(e).getTime():Number.NaN,f=Number.isFinite(u)&&u>Date.now();wse(f?u:null);let h=!c?{text:"Not published",tone:"text-fg-muted"}:f?{text:`Scheduled for ${pj(e)}`,tone:"text-accent-strong"}:{text:`Published ${pj(e)}`,tone:"text-fg"},g=()=>{l(Sse(e)),a((b)=>!b)};return ye.jsxDEV("div",{className:"flex flex-col gap-2",children:[ye.jsxDEV("span",{className:`text-sm ${h.tone}`,children:h.text},void 0,!1,void 0,this),ye.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[!c||f?ye.jsxDEV(Ae,{size:"sm",onPress:()=>{a(!1),t(new Date().toISOString())},children:"Publish now"},void 0,!1,void 0,this):null,ye.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:g,children:f?"Change schedule":c?"Change time":"Schedule…"},void 0,!1,void 0,this),c?ye.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?ye.jsxDEV("input",{className:ih,type:"datetime-local",value:i,autoFocus:!0,onChange:(b)=>{l(b.target.value);let y=b.target.value?Cse(b.target.value):null;if(y)t(y)}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function sh({schema:e,value:t,onChange:r,api:a}){let i=(l,c)=>r({...t,[l]:c});return ye.jsxDEV("div",{className:"flex flex-col gap-4",children:e.map((l)=>ye.jsxDEV(hj,{def:l,value:t[l.name],onChange:(c)=>i(l.name,c),api:a},l.name,!1,void 0,this))},void 0,!1,void 0,this)}function hj({def:e,value:t,onChange:r,api:a,hideLabelAs:i}){let l=i!==void 0?void 0:ye.jsxDEV(ye.Fragment,{children:[e.label??e.name," ",e.required?ye.jsxDEV("span",{className:"text-danger",children:"*"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),c=(u)=>typeof u==="string"?u:u==null?"":JSON.stringify(u);switch(e.type){case"text":case"url":{let u=e.type==="url"?"https://…":"";return i!==void 0?ye.jsxDEV("input",{className:ih,type:"text","aria-label":i,placeholder:u,value:t??"",onChange:(f)=>r(f.target.value)},void 0,!1,void 0,this):ye.jsxDEV($n,{label:l,value:t??"",onChange:r,placeholder:u},void 0,!1,void 0,this)}case"textarea":return i!==void 0?ye.jsxDEV("textarea",{className:`${ih} h-auto min-h-20 py-2.5`,"aria-label":i,value:c(t),onChange:(u)=>r(u.target.value)},void 0,!1,void 0,this):ye.jsxDEV(Dx,{label:l,value:c(t),onChange:r},void 0,!1,void 0,this);case"richtext":return ye.jsxDEV(ah,{label:l,children:ye.jsxDEV(Tse,{value:typeof t==="string"?t:"",onChange:r},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"number":return ye.jsxDEV(ah,{label:l,children:ye.jsxDEV("input",{className:ih,type:"number","aria-label":i,value:t==null?"":String(t),onChange:(u)=>r(u.target.value===""?null:Number(u.target.value))},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"date":case"datetime":return ye.jsxDEV(ah,{label:l,children:ye.jsxDEV("input",{className:ih,type:e.type==="date"?"date":"datetime-local","aria-label":i,value:t??"",onChange:(u)=>r(u.target.value||null)},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"publish":return ye.jsxDEV("div",{className:"flex w-full flex-col gap-2",children:[ye.jsxDEV("span",{className:"text-sm font-medium text-fg",children:l},void 0,!1,void 0,this),ye.jsxDEV(Ese,{value:typeof t==="string"?t:"",onChange:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"boolean":return ye.jsxDEV("label",{className:"flex items-center gap-2",children:[ye.jsxDEV("input",{type:"checkbox",checked:Boolean(t),onChange:(u)=>r(u.target.checked)},void 0,!1,void 0,this),ye.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 ye.jsxDEV(ah,{label:l,children:ye.jsxDEV(kse,{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 ye.jsxDEV(ah,{label:l,children:ye.jsxDEV(Ase,{value:t,onChange:r,api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"group":return ye.jsxDEV(ah,{label:l,children:ye.jsxDEV("div",{className:"rounded-lg border border-border bg-surface-muted p-3.5",children:ye.jsxDEV(sh,{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 ye.jsxDEV(Rse,{def:e,value:t??[],onChange:r,api:a,label:l},void 0,!1,void 0,this);default:return null}}function Tse({value:e,onChange:t}){return ye.jsxDEV(kk,{value:e,onChange:t,minHeight:180,placeholder:"Write, or press '/' for blocks…"},void 0,!1,void 0,this)}function Rse({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]=Dr.useState(null),g=(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)=>ye.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)=>ye.jsxDEV("div",{className:"flex shrink-0 items-center",children:[ye.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),ye.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),ye.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 ye.jsxDEV("div",{className:"flex flex-col gap-2",children:[ye.jsxDEV("span",{className:"text-sm font-medium text-fg",children:i},void 0,!1,void 0,this),l.length===0?ye.jsxDEV("span",{className:"text-sm text-fg-muted",children:"None yet."},void 0,!1,void 0,this):null,ye.jsxDEV("div",{className:`flex flex-col ${u?"gap-1":"gap-2"}`,children:l.map((U,P)=>u?ye.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),ye.jsxDEV("div",{className:"min-w-0 flex-1",children:ye.jsxDEV(hj,{def:c[0],hideLabelAs:`${e.label??e.name} ${P+1}`,value:U[c[0].name],onChange:(re)=>g(P,{...U,[c[0].name]:re}),api:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),ye.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):ye.jsxDEV("div",{className:`rounded-lg border border-border bg-surface-muted transition-colors ${z(P)}`,...D(P),children:[ye.jsxDEV("div",{className:"flex items-center gap-1 border-b border-border px-2 py-1.5",children:[H(P),ye.jsxDEV("span",{className:"text-caption text-fg-subtle",children:P+1},void 0,!1,void 0,this),ye.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),ye.jsxDEV("div",{className:"p-3.5",children:ye.jsxDEV(sh,{schema:c,value:U,onChange:(re)=>g(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),ye.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 kse({def:e,value:t,onChange:r,api:a,ariaLabel:i}){let[l,c]=Dr.useState(null),u=e.optionsFrom;Dr.useEffect(()=>{if(!u)return;let g=!0;return a.call(u).then((b)=>{if(g)c(Array.isArray(b)?b:[])}).catch(()=>{if(g)c([])}),()=>{g=!1}},[u,a]);let f=Boolean(u)&&l===null,h=u?l??[]:(e.options??[]).map((g)=>({value:g,label:g}));return ye.jsxDEV("select",{className:ih,"aria-label":i,value:t??"",onChange:(g)=>r(g.target.value||null),children:[ye.jsxDEV("option",{value:"",children:f?"Načítám…":"—"},void 0,!1,void 0,this),h.map((g)=>ye.jsxDEV("option",{value:g.value,children:g.label},g.value,!1,void 0,this))]},void 0,!0,void 0,this)}function Ase({value:e,onChange:t,api:r}){let[a,i]=Dr.useState(!1),[l,c]=Dr.useState(null);return Dr.useEffect(()=>{if(e)r.call("getMedia",{id:e}).then(c).catch(()=>c(null));else c(null)},[e,r]),ye.jsxDEV("div",{children:[ye.jsxDEV("div",{className:"flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",children:[l?ye.jsxDEV("img",{className:"h-10 w-10 rounded object-cover",src:r.resolve(`/media/${l.file.key}`),alt:""},void 0,!1,void 0,this):ye.jsxDEV("span",{className:"text-fg-subtle",children:"no media"},void 0,!1,void 0,this),ye.jsxDEV("span",{className:"flex-1 truncate text-fg-subtle",children:l?.file.filename??e??""},void 0,!1,void 0,this),ye.jsxDEV(Ae,{variant:"secondary",size:"sm",onPress:()=>i(!0),children:"pick"},void 0,!1,void 0,this),e?ye.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?ye.jsxDEV(Mse,{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 Mse({api:e,onClose:t,onPick:r}){let[a,i]=Dr.useState([]),[l,c]=Dr.useState(!1),[u,f]=Dr.useState(""),h=()=>e.listMedia().then(i).catch((b)=>f(String(b.message??b)));Dr.useEffect(()=>{h()},[]);let g=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 ye.jsxDEV(Px,{isOpen:!0,isDismissable:!0,onOpenChange:(b)=>!b&&t(),children:ye.jsxDEV(Lx,{className:"w-full max-w-[680px] px-9 py-8",children:ye.jsxDEV(_x,{className:"max-h-[86vh] overflow-auto outline-none",children:[ye.jsxDEV(zx,{level:"1",className:"mb-5 font-normal",children:["Choose ",ye.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?ye.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,ye.jsxDEV("label",{className:"mb-4 flex w-full flex-col gap-2",children:[ye.jsxDEV(Bx,{size:"small",weight:"medium",children:"Upload a new file"},void 0,!1,void 0,this),ye.jsxDEV("input",{type:"file",className:"text-small text-fg-muted",disabled:l,onChange:(b)=>b.target.files?.[0]&&g(b.target.files[0])},void 0,!1,void 0,this)]},void 0,!0,void 0,this),ye.jsxDEV("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2.5",children:a.map((b)=>ye.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/")?ye.jsxDEV("img",{className:"block h-[130px] w-full object-cover",src:e.resolve(`/media/${b.file.key}`),alt:""},void 0,!1,void 0,this):ye.jsxDEV("div",{className:"h-[130px] bg-surface-muted"},void 0,!1,void 0,this),ye.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),ye.jsxDEV("div",{className:"mt-3 text-right",children:ye.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 Dr,ye,ih="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 mj=N(()=>{Yi();fj();Dr=j(ae(),1),ye=j(Et(),1)});function Db({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 t2({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 Mk({onClose:e,wide:t,children:r}){return O.jsxDEV(Px,{isOpen:!0,isDismissable:!0,onOpenChange:(a)=>!a&&e(),children:O.jsxDEV(Lx,{className:`w-full px-9 py-8 ${t?"max-w-[680px]":"max-w-[520px]"}`,children:O.jsxDEV(_x,{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 Nk({children:e}){return O.jsxDEV(zx,{level:"1",className:"mb-5 font-normal",children:e},void 0,!1,void 0,this)}function n2({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 $j({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 ch({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 Sj({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(Db,{lead:"Pages",em:t.length===0?"None yet":t.length===1?"1 page total":`${t.length} pages total`,children:O.jsxDEV(t2,{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:lh,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[t.map((f)=>O.jsxDEV("div",{className:`${Bd} 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(Nse,{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 Nse({api:e,onClose:t,onCreated:r,onError:a}){let[i,l]=ue.useState([]),[c,u]=ue.useState(""),[f,h]=ue.useState(""),[g,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:g||xj(f)}),r()}catch(v){a(Tt(v))}};return O.jsxDEV(Mk,{onClose:t,children:[O.jsxDEV(Nk,{children:["Create a ",O.jsxDEV(Ob,{children:"new page"},void 0,!1,void 0,this)," and define the essentials",O.jsxDEV(Ob,{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:g,onChange:b,placeholder:xj(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 gj(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 Cj({api:e,def:t,onOpen:r,onNew:a,onError:i}){let[l,c]=ue.useState([]),[u,f]=ue.useState(0),[h,g]=ue.useState(!1),[b,y]=ue.useState(!0),v=ue.useCallback((w)=>(y(!0),e.call("collectionList",{collection:t.slug,limit:bj,offset:w}).then((E)=>{c((R)=>w===0?E:[...R,...E]),g(E.length===bj),f(w+E.length)}).catch((E)=>i(Tt(E))).finally(()=>y(!1))),[e,t.slug,i]);ue.useEffect(()=>{c([]),f(0),g(!1),v(0)},[v]);let S=(w)=>t.fields.find((E)=>E.name===w)?.label??w;return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Db,{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(t2,{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:lh,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:`${Bd} cursor-pointer hover:bg-surface-muted`,onClick:()=>r(E),children:[O.jsxDEV("span",{className:"flex-1 truncate font-medium",children:gj(w[R??t.titleField])||O.jsxDEV(Ob,{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:gj(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 wj({api:e,def:t,id:r,onSaved:a,onDeleted:i,onBack:l,onError:c}){let u=r===null,[f,h]=ue.useState({}),[g,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:lh,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):g?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(ch,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(sh,{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 Ej({api:e,page:t,blockTypes:r,tab:a,onTab:i,onBack:l,onChange:c,registerGuard:u}){let[f,h]=ue.useState(null),[g,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=(g?.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))}},be=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=(g?.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:`${Bd} 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:(g?.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:Bd,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(ch,{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(Pse,{api:e,page:t,schema:ee,initialFields:g?.page.fields??{},onDirtyChange:R,onError:v},void 0,!1,void 0,this):null,G.map((V)=>{let k=g?.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(yj,{compact:!0,allowed:X,btBySlug:H,onAdd:(ke)=>P(V.name,ke,$e)},void 0,!1,void 0,this),O.jsxDEV(Ose,{api:e,block:ve,blockType:H.get(ve.block_type),isFirst:$e===0,isLast:$e===k.length-1,onMove:(ke)=>Wse(k,V.name,$e,ke,J),onRemove:()=>re(ve),onPatch:be,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(yj,{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:Ak.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(Dse,{api:e,page:t,onSaved:c,onError:v},void 0,!1,void 0,this):null,a==="seo"?O.jsxDEV(Lse,{api:e,page:t,onError:v},void 0,!1,void 0,this):null,a==="workflow"?O.jsxDEV(_se,{api:e,page:t,onChanged:(V)=>{c(V)},onError:v},void 0,!1,void 0,this):null,a==="i18n"?O.jsxDEV(Ise,{api:e,page:t,onError:v},void 0,!1,void 0,this):null,a==="audit"?O.jsxDEV(Bse,{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 Ose({api:e,block:t,blockType:r,isFirst:a,isLast:i,onMove:l,onRemove:c,onPatch:u,onDirtyChange:f,onError:h,dragging:g,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,be=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(be);ce.current=be,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":""} ${g?"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?"…":Gse(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(sh,{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 be(),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 yj({allowed:e,btBySlug:t,onAdd:r,compact:a}){let[i,l]=ue.useState(!1),[c,u]=ue.useState(""),[f,h]=ue.useState(0),g=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)g.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:g,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 Dse({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),[g,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),g?O.jsxDEV(ch,{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(n2,{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 Pse({api:e,page:t,schema:r,initialFields:a,onDirtyChange:i,onError:l}){let[c,u]=ue.useState(a),[f,h]=ue.useState(!1),[g,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(ch,{ok:!0,children:"saved"},void 0,!1,void 0,this):null,O.jsxDEV(sh,{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:g,children:g?"Saving…":"Save"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Lse({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,g,b=!1)=>b?O.jsxDEV(Dx,{label:g,value:a[h],onChange:(y)=>i({...a,[h]:y})},void 0,!1,void 0,this):O.jsxDEV($n,{label:g,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(ch,{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 _se({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 Ise({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:Bd,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 Bse({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:`${Bd} 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 Tj({api:e,onError:t}){let[r,a]=ue.useState([]),[i,l]=ue.useState(0),[c,u]=ue.useState(!1),[f,h]=ue.useState(null),[g,b]=ue.useState(!1),y=ue.useCallback((S)=>{e.listMedia(vj,S).then((w)=>{a((E)=>S===0?w:[...E,...w]),u(w.length===vj),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(Db,{lead:"Media",em:r.length===0?"None yet":r.length===1?"1 file":`${r.length}${c?"+":""} files`,children:O.jsxDEV(t2,{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 ${g?"pointer-events-none opacity-50":""}`,children:[g?"Uploading…":"+ Upload",O.jsxDEV("input",{type:"file",multiple:!0,hidden:!0,disabled:g,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:lh,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:[Aj(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:Mj(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(zse,{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 zse({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 g=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(Mk,{onClose:r,wide:!0,children:[O.jsxDEV(Nk,{children:[O.jsxDEV(Ob,{children:"Media"},void 0,!1,void 0,this)," ",t.file.filename??""]},void 0,!0,void 0,this),Aj(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:g,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:Mj(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(n2,{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:Kse(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:g,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(g),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 Hse(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 Rj({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 g=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(Db,{lead:"Users",em:a.length===0?"None yet":a.length===1?"1 account":`${a.length} accounts`,children:O.jsxDEV(t2,{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:lh,children:O.jsxDEV("div",{className:"flex flex-col gap-2",children:[a.map((v)=>{let S=Hse(v),w=t?.userId===v.username,E=v.active===void 0||v.active===null?!0:Boolean(Number(v.active));return O.jsxDEV("div",{className:`${Bd} 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(Use,{value:S,disabled:u===v.username,onSave:(R)=>g(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(Fse,{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 Use({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,g)=>h===e[g]))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 Fse({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(Mk,{onClose:t,children:[O.jsxDEV(Nk,{children:["Invite an ",O.jsxDEV(Ob,{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 kj({api:e,cfg:t,me:r,onSignOut:a,onError:i}){return O.jsxDEV(O.Fragment,{children:[O.jsxDEV(Db,{lead:"Settings",em:r?.userId??"your account"},void 0,!1,void 0,this),O.jsxDEV("div",{className:`${lh} grid grid-cols-2 gap-5 max-[820px]:grid-cols-1`,children:[O.jsxDEV(Vse,{api:e,me:r,onError:i,onSignOut:a},void 0,!1,void 0,this),O.jsxDEV(jse,{cfg:t,me:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Vse({api:e,me:t,onError:r,onSignOut:a}){let[i,l]=ue.useState(""),[c,u]=ue.useState(""),[f,h]=ue.useState(""),[g,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($j,{children:[O.jsxDEV(ml,{children:"My account"},void 0,!1,void 0,this),g?O.jsxDEV(ch,{ok:!0,children:g},void 0,!1,void 0,this):null,O.jsxDEV(n2,{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 jse({cfg:e,me:t}){return O.jsxDEV($j,{children:[O.jsxDEV(ml,{children:"About"},void 0,!1,void 0,this),O.jsxDEV(n2,{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 Aj(e){return(e.file.contentType??"").startsWith("image/")}function Mj(e){let t=(e.file.contentType??"").split("/")[1];return(e.file.filename?.split(".").pop()??t??"file").slice(0,5).toUpperCase()}function Kse(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 Pp)return e.message;return e instanceof Error?e.message:String(e)}function xj(e){return e.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function qse(e){return e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\s+/g," ").trim()}function Gse(e){let t=Object.values(e).find((a)=>typeof a==="string"&&a.trim());if(typeof t!=="string")return"";let r=qse(t);return r.length>90?r.slice(0,90)+"…":r}function Wse(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,Ak,Bd="flex items-center gap-3 rounded-[14px] border border-transparent bg-surface-card px-[18px] py-3.5",lh="mx-auto max-w-[1200px] px-7 pb-8 pt-2",Ob=({children:e})=>O.jsxDEV("span",{className:"text-fg-subtle",children:e},void 0,!1,void 0,this),bj=50,vj=60;var Gc=N(()=>{Yi();q3();mj();ue=j(ae(),1),O=j(Et(),1),Ak=["settings","seo","workflow","i18n","audit"]});var Nj={};ic(Nj,{default:()=>Yse});var Pb,Yse;var Oj=N(()=>{ua();Yi();Ji();Gc();Pb=j(Et(),1),Yse=ur().params({slug:"string",id:"string"}).route("/collections/:slug/:id").render(function({params:t}){let{api:r,collections:a,setError:i}=Rr(),l=Tr(),c=a.find((f)=>f.slug===t.slug),u=()=>l("collection",{params:{slug:t.slug}});if(!c)return Pb.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Pb.jsxDEV("p",{className:"text-fg-subtle",children:a.length===0?"Loading…":`Unknown collection: ${t.slug}`},void 0,!1,void 0,this),a.length>0?Pb.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 Pb.jsxDEV(wj,{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 Dj={};ic(Dj,{default:()=>Jse});var Lb,Jse;var Pj=N(()=>{ua();Yi();Ji();Gc();Lb=j(Et(),1),Jse=ur().params({slug:"string"}).route("/collections/:slug").render(function({params:t}){let{api:r,collections:a,setError:i}=Rr(),l=Tr(),c=a.find((u)=>u.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(Cj,{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 Lj={};ic(Lj,{default:()=>Xse});var uh,_j,Xse;var Ij=N(()=>{ua();Ji();Gc();uh=j(ae(),1),_j=j(Et(),1),Xse=ur().route("/").render(function(){let{api:t,setError:r,collections:a}=Rr(),i=Tr(),[l,c]=uh.useState([]),[u,f]=uh.useState([]),h=typeof window<"u"&&window.PRAMEN_CMS_EDITOR?.hidePages===!0,g=a[0]?.slug;uh.useEffect(()=>{if(h&&g)i("collection",{params:{slug:g},replace:!0})},[h,g,i]);let b=()=>t.listPages().then(c).catch((y)=>r(Tt(y)));if(uh.useEffect(()=>{if(h)return;b(),t.listBlockTypes().then(f).catch((y)=>r(Tt(y)))},[t,h]),h&&g)return null;return _j.jsxDEV(Sj,{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 Bj={};ic(Bj,{default:()=>Qse});var zj,Qse;var Hj=N(()=>{ua();Ji();Gc();zj=j(Et(),1),Qse=ur().route("/media").render(function(){let{api:t,setError:r}=Rr();return zj.jsxDEV(Tj,{api:t,onError:r},void 0,!1,void 0,this)})});var Uj={};ic(Uj,{default:()=>Zse});var dh,zd,Zse;var Fj=N(()=>{ua();Yi();Ji();Gc();dh=j(ae(),1),zd=j(Et(),1),Zse=ur().params({pageId:"string",tab:"?string"}).route("/pages/:pageId").render(function({params:t}){let{api:r,setError:a,setNavGuard:i}=Rr(),l=Tr(),[c,u]=dh.useState(null),[f,h]=dh.useState([]),[g,b]=dh.useState(!1);dh.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=Ak.includes(t.tab)?t.tab:"settings",v=(S)=>l("page",{params:{pageId:t.pageId,tab:S},replace:!0});if(g)return zd.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[zd.jsxDEV("p",{className:"text-fg-subtle",children:"Page not found."},void 0,!1,void 0,this),zd.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 zd.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:zd.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);return zd.jsxDEV(Ej,{api:r,page:c,blockTypes:f,tab:y,onTab:v,onBack:()=>l("home"),onChange:u,registerGuard:i},void 0,!1,void 0,this)})});var Vj={};ic(Vj,{default:()=>ele});var jj,ele;var Kj=N(()=>{ua();Ji();Gc();jj=j(Et(),1),ele=ur().route("/settings").render(function(){let{api:t,cfg:r,me:a,setError:i,reconfigure:l}=Rr();return jj.jsxDEV(kj,{api:t,cfg:r,me:a,onSignOut:l,onError:i},void 0,!1,void 0,this)})});var qj={};ic(qj,{default:()=>tle});var Hd,tle;var Gj=N(()=>{ua();Yi();Ji();Gc();Hd=j(Et(),1),tle=ur().route("/users").render(function(){let{api:t,me:r,isAdmin:a,setError:i}=Rr(),l=Tr();if(r===null)return Hd.jsxDEV("div",{className:"mx-auto max-w-[1200px] px-7 pt-8",children:Hd.jsxDEV("p",{className:"text-fg-subtle",children:"Loading…"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!a)return Hd.jsxDEV("div",{className:"mx-auto flex max-w-[1200px] items-center gap-2 px-7 pt-8",children:[Hd.jsxDEV("p",{className:"text-fg-subtle",children:"Admins only."},void 0,!1,void 0,this),Hd.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 Hd.jsxDEV(Rj,{api:t,me:r,onError:i},void 0,!1,void 0,this)})});var Wj={};ic(Wj,{default:()=>nle});var Wc,nle;var Yj=N(()=>{ua();Yi();Wc=j(Et(),1),nle=ur().render(function(){let t=Tr();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 aK=j(ae(),1),iK=j(L6(),1);ua();var gl=j(ae(),1);ua();Yi();Ji();var Vx=j(ae(),1),Sn=j(Et(),1),CI="pramen.cms.theme";function W3(){let{isAdmin:e,collections:t,error:r,reconfigure:a,confirmNavigation:i}=Rr(),l=Tr(),{pathname:c}=iv(),u=(w)=>()=>{if(i())w()},[f,h]=Vx.useState(()=>typeof localStorage<"u"?localStorage.getItem(CI)??"light":"light");Vx.useEffect(()=>{document.documentElement.dataset.theme=f==="dark"?"dark":"light",localStorage.setItem(CI,f)},[f]);let g=c.startsWith("/collections/")?c.split("/")[2]:void 0,b=g?`col:${g}`: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(Dg,{className:"sticky top-0 z-10 bg-surface px-7",children:[Sn.jsxDEV(Dg.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(Dg.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(Dg.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(nI,{className:"h-4 w-4"},void 0,!1,void 0,this):Sn.jsxDEV(rI,{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(F_,{variant:"outlined",padding:"none",className:"mx-7 mt-2 border-danger px-4 py-2.5",children:Sn.jsxDEV(Bx,{size:"small",className:"text-danger",children:r},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,Sn.jsxDEV(Yf,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Jj=()=>Promise.resolve().then(() => (Oj(),Nj)).then((e)=>({default:e.default.component})),Xj=()=>Promise.resolve().then(() => (Pj(),Dj)).then((e)=>({default:e.default.component})),Qj=()=>Promise.resolve().then(() => (Ij(),Lj)).then((e)=>({default:e.default.component})),Zj=()=>Promise.resolve().then(() => (Hj(),Bj)).then((e)=>({default:e.default.component})),eK=()=>Promise.resolve().then(() => (Fj(),Uj)).then((e)=>({default:e.default.component})),tK=()=>Promise.resolve().then(() => (Kj(),Vj)).then((e)=>({default:e.default.component})),nK=()=>Promise.resolve().then(() => (Gj(),qj)).then((e)=>({default:e.default.component})),rK=()=>Promise.resolve().then(() => (Yj(),Wj)).then((e)=>({default:e.default.component})),Ok={"collection-item":"/collections/:slug/:id",collection:"/collections/:slug",home:"/",media:"/media",page:"/pages/:pageId",settings:"/settings",users:"/users"},rle=[{path:"/",component:W3,isLayout:!0,children:[{path:"/collection-item",matchPath:"/collections/:slug/:id",component:gl.lazy(Jj),preload:Jj},{path:"/collection",matchPath:"/collections/:slug",component:gl.lazy(Xj),preload:Xj},{path:"/home",matchPath:"/",component:gl.lazy(Qj),preload:Qj},{path:"/media",component:gl.lazy(Zj),preload:Zj},{path:"/page",matchPath:"/pages/:pageId",component:gl.lazy(eK),preload:eK},{path:"/settings",component:gl.lazy(tK),preload:tK},{path:"/users",component:gl.lazy(nK),preload:nK},{path:"/:__notFound+",component:gl.lazy(rK),preload:rK}]}],Dk=jw(rle);Ji();var r2=j(Et(),1),oK=document.getElementById("app");if(oK)iK.createRoot(oK).render(r2.jsxDEV(aK.StrictMode,{children:r2.jsxDEV(SI,{children:r2.jsxDEV(av,{routes:Dk,pageRegistry:Ok},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this));
|