@kdrgny/justjson 1.1.0 → 1.4.0
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/README.md +8 -4
- package/dist/cli.js +1026 -125
- package/dist/editor/assets/index-B7tRIQcy.js +632 -0
- package/dist/editor/assets/index-GwsCiKhf.css +1 -0
- package/dist/editor/assets/public-sans-latin-ext-wght-normal-MQgHevqp.woff2 +0 -0
- package/dist/editor/assets/public-sans-latin-wght-normal-DdeTHZLK.woff2 +0 -0
- package/dist/editor/assets/public-sans-vietnamese-wght-normal-CtlIRbEm.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-400-normal-Rg4St2Dn.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-400-normal-_3DlpgIW.woff +0 -0
- package/dist/editor/assets/space-mono-latin-700-normal-D7A851RN.woff +0 -0
- package/dist/editor/assets/space-mono-latin-700-normal-mWgeinG7.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-ext-400-normal-D4cJI_B-.woff +0 -0
- package/dist/editor/assets/space-mono-latin-ext-400-normal-DTLbW2xa.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-ext-700-normal-B2s3bDs2.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-ext-700-normal-B_E7P90g.woff +0 -0
- package/dist/editor/assets/space-mono-vietnamese-400-normal-B0PMp_xB.woff +0 -0
- package/dist/editor/assets/space-mono-vietnamese-400-normal-BNOj0Qhp.woff2 +0 -0
- package/dist/editor/assets/space-mono-vietnamese-700-normal-D-KrLuLr.woff +0 -0
- package/dist/editor/assets/space-mono-vietnamese-700-normal-DWQgDHuA.woff2 +0 -0
- package/dist/editor/index.html +3 -3
- package/package.json +3 -14
- package/dist/editor/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/editor/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/editor/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/editor/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/editor/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/editor/assets/index-B-aBBk0p.css +0 -1
- package/dist/editor/assets/index-DhyPvr9S.js +0 -574
|
@@ -1,574 +0,0 @@
|
|
|
1
|
-
var R2=t=>{throw TypeError(t)};var O2=(t,e,n)=>e.has(t)||R2("Cannot "+n);var Sn=(t,e,n)=>(O2(t,e,"read from private field"),n?n.call(t):e.get(t)),I2=(t,e,n)=>e.has(t)?R2("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),mm=(t,e,n,r)=>(O2(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function kN(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function X1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gm={exports:{}},iu={},ym={exports:{}},We={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var P2;function wN(){if(P2)return We;P2=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function m(P){return P===null||typeof P!="object"?null:(P=p&&P[p]||P["@@iterator"],typeof P=="function"?P:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,b={};function w(P,B,ne){this.props=P,this.context=B,this.refs=b,this.updater=ne||y}w.prototype.isReactComponent={},w.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,B,"setState")},w.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=w.prototype;function _(P,B,ne){this.props=P,this.context=B,this.refs=b,this.updater=ne||y}var A=_.prototype=new E;A.constructor=_,x(A,w.prototype),A.isPureReactComponent=!0;var M=Array.isArray,N=Object.prototype.hasOwnProperty,D={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function I(P,B,ne){var fe,ue={},he=null,Ae=null;if(B!=null)for(fe in B.ref!==void 0&&(Ae=B.ref),B.key!==void 0&&(he=""+B.key),B)N.call(B,fe)&&!O.hasOwnProperty(fe)&&(ue[fe]=B[fe]);var X=arguments.length-2;if(X===1)ue.children=ne;else if(1<X){for(var ce=Array(X),pe=0;pe<X;pe++)ce[pe]=arguments[pe+2];ue.children=ce}if(P&&P.defaultProps)for(fe in X=P.defaultProps,X)ue[fe]===void 0&&(ue[fe]=X[fe]);return{$$typeof:t,type:P,key:he,ref:Ae,props:ue,_owner:D.current}}function L(P,B){return{$$typeof:t,type:P.type,key:B,ref:P.ref,props:P.props,_owner:P._owner}}function W(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Y(P){var B={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ne){return B[ne]})}var G=/\/+/g;function q(P,B){return typeof P=="object"&&P!==null&&P.key!=null?Y(""+P.key):B.toString(36)}function Z(P,B,ne,fe,ue){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var Ae=!1;if(P===null)Ae=!0;else switch(he){case"string":case"number":Ae=!0;break;case"object":switch(P.$$typeof){case t:case e:Ae=!0}}if(Ae)return Ae=P,ue=ue(Ae),P=fe===""?"."+q(Ae,0):fe,M(ue)?(ne="",P!=null&&(ne=P.replace(G,"$&/")+"/"),Z(ue,B,ne,"",function(pe){return pe})):ue!=null&&(W(ue)&&(ue=L(ue,ne+(!ue.key||Ae&&Ae.key===ue.key?"":(""+ue.key).replace(G,"$&/")+"/")+P)),B.push(ue)),1;if(Ae=0,fe=fe===""?".":fe+":",M(P))for(var X=0;X<P.length;X++){he=P[X];var ce=fe+q(he,X);Ae+=Z(he,B,ne,ce,ue)}else if(ce=m(P),typeof ce=="function")for(P=ce.call(P),X=0;!(he=P.next()).done;)he=he.value,ce=fe+q(he,X++),Ae+=Z(he,B,ne,ce,ue);else if(he==="object")throw B=String(P),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return Ae}function Q(P,B,ne){if(P==null)return P;var fe=[],ue=0;return Z(P,fe,"","",function(he){return B.call(ne,he,ue++)}),fe}function K(P){if(P._status===-1){var B=P._result;B=B(),B.then(function(ne){(P._status===0||P._status===-1)&&(P._status=1,P._result=ne)},function(ne){(P._status===0||P._status===-1)&&(P._status=2,P._result=ne)}),P._status===-1&&(P._status=0,P._result=B)}if(P._status===1)return P._result.default;throw P._result}var J={current:null},U={transition:null},ee={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:U,ReactCurrentOwner:D};function F(){throw Error("act(...) is not supported in production builds of React.")}return We.Children={map:Q,forEach:function(P,B,ne){Q(P,function(){B.apply(this,arguments)},ne)},count:function(P){var B=0;return Q(P,function(){B++}),B},toArray:function(P){return Q(P,function(B){return B})||[]},only:function(P){if(!W(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},We.Component=w,We.Fragment=n,We.Profiler=o,We.PureComponent=_,We.StrictMode=r,We.Suspense=u,We.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,We.act=F,We.cloneElement=function(P,B,ne){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var fe=x({},P.props),ue=P.key,he=P.ref,Ae=P._owner;if(B!=null){if(B.ref!==void 0&&(he=B.ref,Ae=D.current),B.key!==void 0&&(ue=""+B.key),P.type&&P.type.defaultProps)var X=P.type.defaultProps;for(ce in B)N.call(B,ce)&&!O.hasOwnProperty(ce)&&(fe[ce]=B[ce]===void 0&&X!==void 0?X[ce]:B[ce])}var ce=arguments.length-2;if(ce===1)fe.children=ne;else if(1<ce){X=Array(ce);for(var pe=0;pe<ce;pe++)X[pe]=arguments[pe+2];fe.children=X}return{$$typeof:t,type:P.type,key:ue,ref:he,props:fe,_owner:Ae}},We.createContext=function(P){return P={$$typeof:s,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:i,_context:P},P.Consumer=P},We.createElement=I,We.createFactory=function(P){var B=I.bind(null,P);return B.type=P,B},We.createRef=function(){return{current:null}},We.forwardRef=function(P){return{$$typeof:l,render:P}},We.isValidElement=W,We.lazy=function(P){return{$$typeof:h,_payload:{_status:-1,_result:P},_init:K}},We.memo=function(P,B){return{$$typeof:d,type:P,compare:B===void 0?null:B}},We.startTransition=function(P){var B=U.transition;U.transition={};try{P()}finally{U.transition=B}},We.unstable_act=F,We.useCallback=function(P,B){return J.current.useCallback(P,B)},We.useContext=function(P){return J.current.useContext(P)},We.useDebugValue=function(){},We.useDeferredValue=function(P){return J.current.useDeferredValue(P)},We.useEffect=function(P,B){return J.current.useEffect(P,B)},We.useId=function(){return J.current.useId()},We.useImperativeHandle=function(P,B,ne){return J.current.useImperativeHandle(P,B,ne)},We.useInsertionEffect=function(P,B){return J.current.useInsertionEffect(P,B)},We.useLayoutEffect=function(P,B){return J.current.useLayoutEffect(P,B)},We.useMemo=function(P,B){return J.current.useMemo(P,B)},We.useReducer=function(P,B,ne){return J.current.useReducer(P,B,ne)},We.useRef=function(P){return J.current.useRef(P)},We.useState=function(P){return J.current.useState(P)},We.useSyncExternalStore=function(P,B,ne){return J.current.useSyncExternalStore(P,B,ne)},We.useTransition=function(){return J.current.useTransition()},We.version="18.3.1",We}var j2;function fc(){return j2||(j2=1,ym.exports=wN()),ym.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var L2;function CN(){if(L2)return iu;L2=1;var t=fc(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(l,u,d){var h,p={},m=null,y=null;d!==void 0&&(m=""+d),u.key!==void 0&&(m=""+u.key),u.ref!==void 0&&(y=u.ref);for(h in u)r.call(u,h)&&!i.hasOwnProperty(h)&&(p[h]=u[h]);if(l&&l.defaultProps)for(h in u=l.defaultProps,u)p[h]===void 0&&(p[h]=u[h]);return{$$typeof:e,type:l,key:m,ref:y,props:p,_owner:o.current}}return iu.Fragment=n,iu.jsx=s,iu.jsxs=s,iu}var F2;function SN(){return F2||(F2=1,gm.exports=CN()),gm.exports}var v=SN(),S=fc();const te=X1(S),ml=kN({__proto__:null,default:te},[S]);var Fd={},xm={exports:{}},Kn={},vm={exports:{}},bm={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var z2;function EN(){return z2||(z2=1,(function(t){function e(U,ee){var F=U.length;U.push(ee);e:for(;0<F;){var P=F-1>>>1,B=U[P];if(0<o(B,ee))U[P]=ee,U[F]=B,F=P;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var ee=U[0],F=U.pop();if(F!==ee){U[0]=F;e:for(var P=0,B=U.length,ne=B>>>1;P<ne;){var fe=2*(P+1)-1,ue=U[fe],he=fe+1,Ae=U[he];if(0>o(ue,F))he<B&&0>o(Ae,ue)?(U[P]=Ae,U[he]=F,P=he):(U[P]=ue,U[fe]=F,P=fe);else if(he<B&&0>o(Ae,F))U[P]=Ae,U[he]=F,P=he;else break e}}return ee}function o(U,ee){var F=U.sortIndex-ee.sortIndex;return F!==0?F:U.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],d=[],h=1,p=null,m=3,y=!1,x=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(U){for(var ee=n(d);ee!==null;){if(ee.callback===null)r(d);else if(ee.startTime<=U)r(d),ee.sortIndex=ee.expirationTime,e(u,ee);else break;ee=n(d)}}function M(U){if(b=!1,A(U),!x)if(n(u)!==null)x=!0,K(N);else{var ee=n(d);ee!==null&&J(M,ee.startTime-U)}}function N(U,ee){x=!1,b&&(b=!1,E(I),I=-1),y=!0;var F=m;try{for(A(ee),p=n(u);p!==null&&(!(p.expirationTime>ee)||U&&!Y());){var P=p.callback;if(typeof P=="function"){p.callback=null,m=p.priorityLevel;var B=P(p.expirationTime<=ee);ee=t.unstable_now(),typeof B=="function"?p.callback=B:p===n(u)&&r(u),A(ee)}else r(u);p=n(u)}if(p!==null)var ne=!0;else{var fe=n(d);fe!==null&&J(M,fe.startTime-ee),ne=!1}return ne}finally{p=null,m=F,y=!1}}var D=!1,O=null,I=-1,L=5,W=-1;function Y(){return!(t.unstable_now()-W<L)}function G(){if(O!==null){var U=t.unstable_now();W=U;var ee=!0;try{ee=O(!0,U)}finally{ee?q():(D=!1,O=null)}}else D=!1}var q;if(typeof _=="function")q=function(){_(G)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,Q=Z.port2;Z.port1.onmessage=G,q=function(){Q.postMessage(null)}}else q=function(){w(G,0)};function K(U){O=U,D||(D=!0,q())}function J(U,ee){I=w(function(){U(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_continueExecution=function(){x||y||(x=!0,K(N))},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(U){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var F=m;m=ee;try{return U()}finally{m=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var F=m;m=U;try{return ee()}finally{m=F}},t.unstable_scheduleCallback=function(U,ee,F){var P=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?P+F:P):F=P,U){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=F+B,U={id:h++,callback:ee,priorityLevel:U,startTime:F,expirationTime:B,sortIndex:-1},F>P?(U.sortIndex=F,e(d,U),n(u)===null&&U===n(d)&&(b?(E(I),I=-1):b=!0,J(M,F-P))):(U.sortIndex=B,e(u,U),x||y||(x=!0,K(N))),U},t.unstable_shouldYield=Y,t.unstable_wrapCallback=function(U){var ee=m;return function(){var F=m;m=ee;try{return U.apply(this,arguments)}finally{m=F}}}})(bm)),bm}var $2;function _N(){return $2||($2=1,vm.exports=EN()),vm.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var B2;function TN(){if(B2)return Kn;B2=1;var t=fc(),e=_N();function n(a){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(a,c){s(a,c),s(a+"Capture",c)}function s(a,c){for(o[a]=c,a=0;a<c.length;a++)r.add(c[a])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},p={};function m(a){return u.call(p,a)?!0:u.call(h,a)?!1:d.test(a)?p[a]=!0:(h[a]=!0,!1)}function y(a,c,f,g){if(f!==null&&f.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return g?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function x(a,c,f,g){if(c===null||typeof c>"u"||y(a,c,f,g))return!0;if(g)return!1;if(f!==null)switch(f.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function b(a,c,f,g,k,C,T){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=g,this.attributeNamespace=k,this.mustUseProperty=f,this.propertyName=a,this.type=c,this.sanitizeURL=C,this.removeEmptyString=T}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){w[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var c=a[0];w[c]=new b(c,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){w[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){w[a]=new b(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){w[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){w[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){w[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){w[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){w[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function _(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var c=a.replace(E,_);w[c]=new b(c,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(E,_);w[c]=new b(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(E,_);w[c]=new b(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){w[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),w.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){w[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,c,f,g){var k=w.hasOwnProperty(c)?w[c]:null;(k!==null?k.type!==0:g||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(x(c,f,k,g)&&(f=null),g||k===null?m(c)&&(f===null?a.removeAttribute(c):a.setAttribute(c,""+f)):k.mustUseProperty?a[k.propertyName]=f===null?k.type===3?!1:"":f:(c=k.attributeName,g=k.attributeNamespace,f===null?a.removeAttribute(c):(k=k.type,f=k===3||k===4&&f===!0?"":""+f,g?a.setAttributeNS(g,c,f):a.setAttribute(c,f))))}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),D=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),Y=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.offscreen"),U=Symbol.iterator;function ee(a){return a===null||typeof a!="object"?null:(a=U&&a[U]||a["@@iterator"],typeof a=="function"?a:null)}var F=Object.assign,P;function B(a){if(P===void 0)try{throw Error()}catch(f){var c=f.stack.trim().match(/\n( *(at )?)/);P=c&&c[1]||""}return`
|
|
34
|
-
`+P+a}var ne=!1;function fe(a,c){if(!a||ne)return"";ne=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(H){var g=H}Reflect.construct(a,[],c)}else{try{c.call()}catch(H){g=H}a.call(c.prototype)}else{try{throw Error()}catch(H){g=H}a()}}catch(H){if(H&&g&&typeof H.stack=="string"){for(var k=H.stack.split(`
|
|
35
|
-
`),C=g.stack.split(`
|
|
36
|
-
`),T=k.length-1,R=C.length-1;1<=T&&0<=R&&k[T]!==C[R];)R--;for(;1<=T&&0<=R;T--,R--)if(k[T]!==C[R]){if(T!==1||R!==1)do if(T--,R--,0>R||k[T]!==C[R]){var j=`
|
|
37
|
-
`+k[T].replace(" at new "," at ");return a.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",a.displayName)),j}while(1<=T&&0<=R);break}}}finally{ne=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?B(a):""}function ue(a){switch(a.tag){case 5:return B(a.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return a=fe(a.type,!1),a;case 11:return a=fe(a.type.render,!1),a;case 1:return a=fe(a.type,!0),a;default:return""}}function he(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case O:return"Fragment";case D:return"Portal";case L:return"Profiler";case I:return"StrictMode";case q:return"Suspense";case Z:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Y:return(a.displayName||"Context")+".Consumer";case W:return(a._context.displayName||"Context")+".Provider";case G:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Q:return c=a.displayName||null,c!==null?c:he(a.type)||"Memo";case K:c=a._payload,a=a._init;try{return he(a(c))}catch{}}return null}function Ae(a){var c=a.type;switch(a.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=c.render,a=a.displayName||a.name||"",c.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(c);case 8:return c===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function X(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ce(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function pe(a){var c=ce(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,c),g=""+a[c];if(!a.hasOwnProperty(c)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var k=f.get,C=f.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return k.call(this)},set:function(T){g=""+T,C.call(this,T)}}),Object.defineProperty(a,c,{enumerable:f.enumerable}),{getValue:function(){return g},setValue:function(T){g=""+T},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function Le(a){a._valueTracker||(a._valueTracker=pe(a))}function Me(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),g="";return a&&(g=ce(a)?a.checked?"true":"false":a.value),a=g,a!==f?(c.setValue(a),!0):!1}function ze(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Je(a,c){var f=c.checked;return F({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function At(a,c){var f=c.defaultValue==null?"":c.defaultValue,g=c.checked!=null?c.checked:c.defaultChecked;f=X(c.value!=null?c.value:f),a._wrapperState={initialChecked:g,initialValue:f,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function Pt(a,c){c=c.checked,c!=null&&A(a,"checked",c,!1)}function Ht(a,c){Pt(a,c);var f=X(c.value),g=c.type;if(f!=null)g==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}c.hasOwnProperty("value")?Ut(a,c.type,f):c.hasOwnProperty("defaultValue")&&Ut(a,c.type,X(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function Ln(a,c,f){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var g=c.type;if(!(g!=="submit"&&g!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+a._wrapperState.initialValue,f||c===a.value||(a.value=c),a.defaultValue=c}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function Ut(a,c,f){(c!=="number"||ze(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var Qt=Array.isArray;function An(a,c,f,g){if(a=a.options,c){c={};for(var k=0;k<f.length;k++)c["$"+f[k]]=!0;for(f=0;f<a.length;f++)k=c.hasOwnProperty("$"+a[f].value),a[f].selected!==k&&(a[f].selected=k),k&&g&&(a[f].defaultSelected=!0)}else{for(f=""+X(f),c=null,k=0;k<a.length;k++){if(a[k].value===f){a[k].selected=!0,g&&(a[k].defaultSelected=!0);return}c!==null||a[k].disabled||(c=a[k])}c!==null&&(c.selected=!0)}}function ht(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(n(91));return F({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function dr(a,c){var f=c.value;if(f==null){if(f=c.children,c=c.defaultValue,f!=null){if(c!=null)throw Error(n(92));if(Qt(f)){if(1<f.length)throw Error(n(93));f=f[0]}c=f}c==null&&(c=""),f=c}a._wrapperState={initialValue:X(f)}}function hs(a,c){var f=X(c.value),g=X(c.defaultValue);f!=null&&(f=""+f,f!==a.value&&(a.value=f),c.defaultValue==null&&a.defaultValue!==f&&(a.defaultValue=f)),g!=null&&(a.defaultValue=""+g)}function da(a){var c=a.textContent;c===a._wrapperState.initialValue&&c!==""&&c!==null&&(a.value=c)}function _o(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fr(a,c){return a==null||a==="http://www.w3.org/1999/xhtml"?_o(c):a==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Fn,hr=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,f,g,k){MSApp.execUnsafeLocalFunction(function(){return a(c,f,g,k)})}:a})(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(Fn=Fn||document.createElement("div"),Fn.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Fn.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function Mn(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var fn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nr=["Webkit","ms","Moz","O"];Object.keys(fn).forEach(function(a){Nr.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),fn[c]=fn[a]})});function fa(a,c,f){return c==null||typeof c=="boolean"||c===""?"":f||typeof c!="number"||c===0||fn.hasOwnProperty(a)&&fn[a]?(""+c).trim():c+"px"}function ha(a,c){a=a.style;for(var f in c)if(c.hasOwnProperty(f)){var g=f.indexOf("--")===0,k=fa(f,c[f],g);f==="float"&&(f="cssFloat"),g?a.setProperty(f,k):a[f]=k}}var ui=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function To(a,c){if(c){if(ui[a]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(n(137,a));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(n(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(n(61))}if(c.style!=null&&typeof c.style!="object")throw Error(n(62))}}function ps(a,c){if(a.indexOf("-")===-1)return typeof c.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gr=null;function zn(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ms=null,Zr=null,mt=null;function Wt(a){if(a=Ul(a)){if(typeof ms!="function")throw Error(n(280));var c=a.stateNode;c&&(c=Qc(c),ms(a.stateNode,a.type,c))}}function _e(a){Zr?mt?mt.push(a):mt=[a]:Zr=a}function it(){if(Zr){var a=Zr,c=mt;if(mt=Zr=null,Wt(a),c)for(a=0;a<c.length;a++)Wt(c[a])}}function et(a,c){return a(c)}function st(){}var qt=!1;function pt(a,c,f){if(qt)return a(c,f);qt=!0;try{return et(a,c,f)}finally{qt=!1,(Zr!==null||mt!==null)&&(st(),it())}}function Ke(a,c){var f=a.stateNode;if(f===null)return null;var g=Qc(f);if(g===null)return null;f=g[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(a=a.type,g=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!g;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(n(231,c,typeof f));return f}var hn=!1;if(l)try{var dt={};Object.defineProperty(dt,"passive",{get:function(){hn=!0}}),window.addEventListener("test",dt,dt),window.removeEventListener("test",dt,dt)}catch{hn=!1}function Et(a,c,f,g,k,C,T,R,j){var H=Array.prototype.slice.call(arguments,3);try{c.apply(f,H)}catch(ie){this.onError(ie)}}var $n=!1,en=null,Bn=!1,Ao=null,El={onError:function(a){$n=!0,en=a}};function MA(a,c,f,g,k,C,T,R,j){$n=!1,en=null,Et.apply(El,arguments)}function NA(a,c,f,g,k,C,T,R,j){if(MA.apply(this,arguments),$n){if($n){var H=en;$n=!1,en=null}else throw Error(n(198));Bn||(Bn=!0,Ao=H)}}function gs(a){var c=a,f=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,(c.flags&4098)!==0&&(f=c.return),a=c.return;while(a)}return c.tag===3?f:null}function tv(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function nv(a){if(gs(a)!==a)throw Error(n(188))}function DA(a){var c=a.alternate;if(!c){if(c=gs(a),c===null)throw Error(n(188));return c!==a?null:a}for(var f=a,g=c;;){var k=f.return;if(k===null)break;var C=k.alternate;if(C===null){if(g=k.return,g!==null){f=g;continue}break}if(k.child===C.child){for(C=k.child;C;){if(C===f)return nv(k),a;if(C===g)return nv(k),c;C=C.sibling}throw Error(n(188))}if(f.return!==g.return)f=k,g=C;else{for(var T=!1,R=k.child;R;){if(R===f){T=!0,f=k,g=C;break}if(R===g){T=!0,g=k,f=C;break}R=R.sibling}if(!T){for(R=C.child;R;){if(R===f){T=!0,f=C,g=k;break}if(R===g){T=!0,g=C,f=k;break}R=R.sibling}if(!T)throw Error(n(189))}}if(f.alternate!==g)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?a:c}function rv(a){return a=DA(a),a!==null?ov(a):null}function ov(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=ov(a);if(c!==null)return c;a=a.sibling}return null}var iv=e.unstable_scheduleCallback,sv=e.unstable_cancelCallback,RA=e.unstable_shouldYield,OA=e.unstable_requestPaint,Ot=e.unstable_now,IA=e.unstable_getCurrentPriorityLevel,Pp=e.unstable_ImmediatePriority,av=e.unstable_UserBlockingPriority,Oc=e.unstable_NormalPriority,PA=e.unstable_LowPriority,lv=e.unstable_IdlePriority,Ic=null,Jr=null;function jA(a){if(Jr&&typeof Jr.onCommitFiberRoot=="function")try{Jr.onCommitFiberRoot(Ic,a,void 0,(a.current.flags&128)===128)}catch{}}var Dr=Math.clz32?Math.clz32:zA,LA=Math.log,FA=Math.LN2;function zA(a){return a>>>=0,a===0?32:31-(LA(a)/FA|0)|0}var Pc=64,jc=4194304;function _l(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Lc(a,c){var f=a.pendingLanes;if(f===0)return 0;var g=0,k=a.suspendedLanes,C=a.pingedLanes,T=f&268435455;if(T!==0){var R=T&~k;R!==0?g=_l(R):(C&=T,C!==0&&(g=_l(C)))}else T=f&~k,T!==0?g=_l(T):C!==0&&(g=_l(C));if(g===0)return 0;if(c!==0&&c!==g&&(c&k)===0&&(k=g&-g,C=c&-c,k>=C||k===16&&(C&4194240)!==0))return c;if((g&4)!==0&&(g|=f&16),c=a.entangledLanes,c!==0)for(a=a.entanglements,c&=g;0<c;)f=31-Dr(c),k=1<<f,g|=a[f],c&=~k;return g}function $A(a,c){switch(a){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function BA(a,c){for(var f=a.suspendedLanes,g=a.pingedLanes,k=a.expirationTimes,C=a.pendingLanes;0<C;){var T=31-Dr(C),R=1<<T,j=k[T];j===-1?((R&f)===0||(R&g)!==0)&&(k[T]=$A(R,c)):j<=c&&(a.expiredLanes|=R),C&=~R}}function jp(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function uv(){var a=Pc;return Pc<<=1,(Pc&4194240)===0&&(Pc=64),a}function Lp(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function Tl(a,c,f){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-Dr(c),a[c]=f}function VA(a,c){var f=a.pendingLanes&~c;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=c,a.mutableReadLanes&=c,a.entangledLanes&=c,c=a.entanglements;var g=a.eventTimes;for(a=a.expirationTimes;0<f;){var k=31-Dr(f),C=1<<k;c[k]=0,g[k]=-1,a[k]=-1,f&=~C}}function Fp(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var g=31-Dr(f),k=1<<g;k&c|a[g]&c&&(a[g]|=c),f&=~k}}var ut=0;function cv(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var dv,zp,fv,hv,pv,$p=!1,Fc=[],ci=null,di=null,fi=null,Al=new Map,Ml=new Map,hi=[],HA="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function mv(a,c){switch(a){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":Al.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ml.delete(c.pointerId)}}function Nl(a,c,f,g,k,C){return a===null||a.nativeEvent!==C?(a={blockedOn:c,domEventName:f,eventSystemFlags:g,nativeEvent:C,targetContainers:[k]},c!==null&&(c=Ul(c),c!==null&&zp(c)),a):(a.eventSystemFlags|=g,c=a.targetContainers,k!==null&&c.indexOf(k)===-1&&c.push(k),a)}function UA(a,c,f,g,k){switch(c){case"focusin":return ci=Nl(ci,a,c,f,g,k),!0;case"dragenter":return di=Nl(di,a,c,f,g,k),!0;case"mouseover":return fi=Nl(fi,a,c,f,g,k),!0;case"pointerover":var C=k.pointerId;return Al.set(C,Nl(Al.get(C)||null,a,c,f,g,k)),!0;case"gotpointercapture":return C=k.pointerId,Ml.set(C,Nl(Ml.get(C)||null,a,c,f,g,k)),!0}return!1}function gv(a){var c=ys(a.target);if(c!==null){var f=gs(c);if(f!==null){if(c=f.tag,c===13){if(c=tv(f),c!==null){a.blockedOn=c,pv(a.priority,function(){fv(f)});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function zc(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=Vp(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var g=new f.constructor(f.type,f);Gr=g,f.target.dispatchEvent(g),Gr=null}else return c=Ul(f),c!==null&&zp(c),a.blockedOn=f,!1;c.shift()}return!0}function yv(a,c,f){zc(a)&&f.delete(c)}function WA(){$p=!1,ci!==null&&zc(ci)&&(ci=null),di!==null&&zc(di)&&(di=null),fi!==null&&zc(fi)&&(fi=null),Al.forEach(yv),Ml.forEach(yv)}function Dl(a,c){a.blockedOn===c&&(a.blockedOn=null,$p||($p=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,WA)))}function Rl(a){function c(k){return Dl(k,a)}if(0<Fc.length){Dl(Fc[0],a);for(var f=1;f<Fc.length;f++){var g=Fc[f];g.blockedOn===a&&(g.blockedOn=null)}}for(ci!==null&&Dl(ci,a),di!==null&&Dl(di,a),fi!==null&&Dl(fi,a),Al.forEach(c),Ml.forEach(c),f=0;f<hi.length;f++)g=hi[f],g.blockedOn===a&&(g.blockedOn=null);for(;0<hi.length&&(f=hi[0],f.blockedOn===null);)gv(f),f.blockedOn===null&&hi.shift()}var pa=M.ReactCurrentBatchConfig,$c=!0;function qA(a,c,f,g){var k=ut,C=pa.transition;pa.transition=null;try{ut=1,Bp(a,c,f,g)}finally{ut=k,pa.transition=C}}function KA(a,c,f,g){var k=ut,C=pa.transition;pa.transition=null;try{ut=4,Bp(a,c,f,g)}finally{ut=k,pa.transition=C}}function Bp(a,c,f,g){if($c){var k=Vp(a,c,f,g);if(k===null)i0(a,c,g,Bc,f),mv(a,g);else if(UA(k,a,c,f,g))g.stopPropagation();else if(mv(a,g),c&4&&-1<HA.indexOf(a)){for(;k!==null;){var C=Ul(k);if(C!==null&&dv(C),C=Vp(a,c,f,g),C===null&&i0(a,c,g,Bc,f),C===k)break;k=C}k!==null&&g.stopPropagation()}else i0(a,c,g,null,f)}}var Bc=null;function Vp(a,c,f,g){if(Bc=null,a=zn(g),a=ys(a),a!==null)if(c=gs(a),c===null)a=null;else if(f=c.tag,f===13){if(a=tv(c),a!==null)return a;a=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null);return Bc=a,null}function xv(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(IA()){case Pp:return 1;case av:return 4;case Oc:case PA:return 16;case lv:return 536870912;default:return 16}default:return 16}}var pi=null,Hp=null,Vc=null;function vv(){if(Vc)return Vc;var a,c=Hp,f=c.length,g,k="value"in pi?pi.value:pi.textContent,C=k.length;for(a=0;a<f&&c[a]===k[a];a++);var T=f-a;for(g=1;g<=T&&c[f-g]===k[C-g];g++);return Vc=k.slice(a,1<g?1-g:void 0)}function Hc(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function Uc(){return!0}function bv(){return!1}function er(a){function c(f,g,k,C,T){this._reactName=f,this._targetInst=k,this.type=g,this.nativeEvent=C,this.target=T,this.currentTarget=null;for(var R in a)a.hasOwnProperty(R)&&(f=a[R],this[R]=f?f(C):C[R]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?Uc:bv,this.isPropagationStopped=bv,this}return F(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Uc)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),c}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Up=er(ma),Ol=F({},ma,{view:0,detail:0}),GA=er(Ol),Wp,qp,Il,Wc=F({},Ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gp,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Il&&(Il&&a.type==="mousemove"?(Wp=a.screenX-Il.screenX,qp=a.screenY-Il.screenY):qp=Wp=0,Il=a),Wp)},movementY:function(a){return"movementY"in a?a.movementY:qp}}),kv=er(Wc),ZA=F({},Wc,{dataTransfer:0}),JA=er(ZA),YA=F({},Ol,{relatedTarget:0}),Kp=er(YA),XA=F({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),QA=er(XA),eM=F({},ma,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),tM=er(eM),nM=F({},ma,{data:0}),wv=er(nM),rM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oM={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"},iM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sM(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=iM[a])?!!c[a]:!1}function Gp(){return sM}var aM=F({},Ol,{key:function(a){if(a.key){var c=rM[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Hc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?oM[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gp,charCode:function(a){return a.type==="keypress"?Hc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Hc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),lM=er(aM),uM=F({},Wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cv=er(uM),cM=F({},Ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gp}),dM=er(cM),fM=F({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),hM=er(fM),pM=F({},Wc,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),mM=er(pM),gM=[9,13,27,32],Zp=l&&"CompositionEvent"in window,Pl=null;l&&"documentMode"in document&&(Pl=document.documentMode);var yM=l&&"TextEvent"in window&&!Pl,Sv=l&&(!Zp||Pl&&8<Pl&&11>=Pl),Ev=" ",_v=!1;function Tv(a,c){switch(a){case"keyup":return gM.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Av(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ga=!1;function xM(a,c){switch(a){case"compositionend":return Av(c);case"keypress":return c.which!==32?null:(_v=!0,Ev);case"textInput":return a=c.data,a===Ev&&_v?null:a;default:return null}}function vM(a,c){if(ga)return a==="compositionend"||!Zp&&Tv(a,c)?(a=vv(),Vc=Hp=pi=null,ga=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return Sv&&c.locale!=="ko"?null:c.data;default:return null}}var bM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mv(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!bM[a.type]:c==="textarea"}function Nv(a,c,f,g){_e(g),c=Jc(c,"onChange"),0<c.length&&(f=new Up("onChange","change",null,f,g),a.push({event:f,listeners:c}))}var jl=null,Ll=null;function kM(a){Gv(a,0)}function qc(a){var c=ka(a);if(Me(c))return a}function wM(a,c){if(a==="change")return c}var Dv=!1;if(l){var Jp;if(l){var Yp="oninput"in document;if(!Yp){var Rv=document.createElement("div");Rv.setAttribute("oninput","return;"),Yp=typeof Rv.oninput=="function"}Jp=Yp}else Jp=!1;Dv=Jp&&(!document.documentMode||9<document.documentMode)}function Ov(){jl&&(jl.detachEvent("onpropertychange",Iv),Ll=jl=null)}function Iv(a){if(a.propertyName==="value"&&qc(Ll)){var c=[];Nv(c,Ll,a,zn(a)),pt(kM,c)}}function CM(a,c,f){a==="focusin"?(Ov(),jl=c,Ll=f,jl.attachEvent("onpropertychange",Iv)):a==="focusout"&&Ov()}function SM(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return qc(Ll)}function EM(a,c){if(a==="click")return qc(c)}function _M(a,c){if(a==="input"||a==="change")return qc(c)}function TM(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var Rr=typeof Object.is=="function"?Object.is:TM;function Fl(a,c){if(Rr(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var f=Object.keys(a),g=Object.keys(c);if(f.length!==g.length)return!1;for(g=0;g<f.length;g++){var k=f[g];if(!u.call(c,k)||!Rr(a[k],c[k]))return!1}return!0}function Pv(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function jv(a,c){var f=Pv(a);a=0;for(var g;f;){if(f.nodeType===3){if(g=a+f.textContent.length,a<=c&&g>=c)return{node:f,offset:c-a};a=g}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Pv(f)}}function Lv(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?Lv(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function Fv(){for(var a=window,c=ze();c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=ze(a.document)}return c}function Xp(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}function AM(a){var c=Fv(),f=a.focusedElem,g=a.selectionRange;if(c!==f&&f&&f.ownerDocument&&Lv(f.ownerDocument.documentElement,f)){if(g!==null&&Xp(f)){if(c=g.start,a=g.end,a===void 0&&(a=c),"selectionStart"in f)f.selectionStart=c,f.selectionEnd=Math.min(a,f.value.length);else if(a=(c=f.ownerDocument||document)&&c.defaultView||window,a.getSelection){a=a.getSelection();var k=f.textContent.length,C=Math.min(g.start,k);g=g.end===void 0?C:Math.min(g.end,k),!a.extend&&C>g&&(k=g,g=C,C=k),k=jv(f,C);var T=jv(f,g);k&&T&&(a.rangeCount!==1||a.anchorNode!==k.node||a.anchorOffset!==k.offset||a.focusNode!==T.node||a.focusOffset!==T.offset)&&(c=c.createRange(),c.setStart(k.node,k.offset),a.removeAllRanges(),C>g?(a.addRange(c),a.extend(T.node,T.offset)):(c.setEnd(T.node,T.offset),a.addRange(c)))}}for(c=[],a=f;a=a.parentNode;)a.nodeType===1&&c.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<c.length;f++)a=c[f],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var MM=l&&"documentMode"in document&&11>=document.documentMode,ya=null,Qp=null,zl=null,e0=!1;function zv(a,c,f){var g=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;e0||ya==null||ya!==ze(g)||(g=ya,"selectionStart"in g&&Xp(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),zl&&Fl(zl,g)||(zl=g,g=Jc(Qp,"onSelect"),0<g.length&&(c=new Up("onSelect","select",null,c,f),a.push({event:c,listeners:g}),c.target=ya)))}function Kc(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var xa={animationend:Kc("Animation","AnimationEnd"),animationiteration:Kc("Animation","AnimationIteration"),animationstart:Kc("Animation","AnimationStart"),transitionend:Kc("Transition","TransitionEnd")},t0={},$v={};l&&($v=document.createElement("div").style,"AnimationEvent"in window||(delete xa.animationend.animation,delete xa.animationiteration.animation,delete xa.animationstart.animation),"TransitionEvent"in window||delete xa.transitionend.transition);function Gc(a){if(t0[a])return t0[a];if(!xa[a])return a;var c=xa[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in $v)return t0[a]=c[f];return a}var Bv=Gc("animationend"),Vv=Gc("animationiteration"),Hv=Gc("animationstart"),Uv=Gc("transitionend"),Wv=new Map,qv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mi(a,c){Wv.set(a,c),i(c,[a])}for(var n0=0;n0<qv.length;n0++){var r0=qv[n0],NM=r0.toLowerCase(),DM=r0[0].toUpperCase()+r0.slice(1);mi(NM,"on"+DM)}mi(Bv,"onAnimationEnd"),mi(Vv,"onAnimationIteration"),mi(Hv,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(Uv,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $l="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(" "),RM=new Set("cancel close invalid load scroll toggle".split(" ").concat($l));function Kv(a,c,f){var g=a.type||"unknown-event";a.currentTarget=f,NA(g,c,void 0,a),a.currentTarget=null}function Gv(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var g=a[f],k=g.event;g=g.listeners;e:{var C=void 0;if(c)for(var T=g.length-1;0<=T;T--){var R=g[T],j=R.instance,H=R.currentTarget;if(R=R.listener,j!==C&&k.isPropagationStopped())break e;Kv(k,R,H),C=j}else for(T=0;T<g.length;T++){if(R=g[T],j=R.instance,H=R.currentTarget,R=R.listener,j!==C&&k.isPropagationStopped())break e;Kv(k,R,H),C=j}}}if(Bn)throw a=Ao,Bn=!1,Ao=null,a}function vt(a,c){var f=c[d0];f===void 0&&(f=c[d0]=new Set);var g=a+"__bubble";f.has(g)||(Zv(c,a,2,!1),f.add(g))}function o0(a,c,f){var g=0;c&&(g|=4),Zv(f,a,g,c)}var Zc="_reactListening"+Math.random().toString(36).slice(2);function Bl(a){if(!a[Zc]){a[Zc]=!0,r.forEach(function(f){f!=="selectionchange"&&(RM.has(f)||o0(f,!1,a),o0(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[Zc]||(c[Zc]=!0,o0("selectionchange",!1,c))}}function Zv(a,c,f,g){switch(xv(c)){case 1:var k=qA;break;case 4:k=KA;break;default:k=Bp}f=k.bind(null,c,f,a),k=void 0,!hn||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(k=!0),g?k!==void 0?a.addEventListener(c,f,{capture:!0,passive:k}):a.addEventListener(c,f,!0):k!==void 0?a.addEventListener(c,f,{passive:k}):a.addEventListener(c,f,!1)}function i0(a,c,f,g,k){var C=g;if((c&1)===0&&(c&2)===0&&g!==null)e:for(;;){if(g===null)return;var T=g.tag;if(T===3||T===4){var R=g.stateNode.containerInfo;if(R===k||R.nodeType===8&&R.parentNode===k)break;if(T===4)for(T=g.return;T!==null;){var j=T.tag;if((j===3||j===4)&&(j=T.stateNode.containerInfo,j===k||j.nodeType===8&&j.parentNode===k))return;T=T.return}for(;R!==null;){if(T=ys(R),T===null)return;if(j=T.tag,j===5||j===6){g=C=T;continue e}R=R.parentNode}}g=g.return}pt(function(){var H=C,ie=zn(f),se=[];e:{var oe=Wv.get(a);if(oe!==void 0){var me=Up,ke=a;switch(a){case"keypress":if(Hc(f)===0)break e;case"keydown":case"keyup":me=lM;break;case"focusin":ke="focus",me=Kp;break;case"focusout":ke="blur",me=Kp;break;case"beforeblur":case"afterblur":me=Kp;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=kv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=JA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=dM;break;case Bv:case Vv:case Hv:me=QA;break;case Uv:me=hM;break;case"scroll":me=GA;break;case"wheel":me=mM;break;case"copy":case"cut":case"paste":me=tM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Cv}var we=(c&4)!==0,It=!we&&a==="scroll",$=we?oe!==null?oe+"Capture":null:oe;we=[];for(var z=H,V;z!==null;){V=z;var de=V.stateNode;if(V.tag===5&&de!==null&&(V=de,$!==null&&(de=Ke(z,$),de!=null&&we.push(Vl(z,de,V)))),It)break;z=z.return}0<we.length&&(oe=new me(oe,ke,null,f,ie),se.push({event:oe,listeners:we}))}}if((c&7)===0){e:{if(oe=a==="mouseover"||a==="pointerover",me=a==="mouseout"||a==="pointerout",oe&&f!==Gr&&(ke=f.relatedTarget||f.fromElement)&&(ys(ke)||ke[Mo]))break e;if((me||oe)&&(oe=ie.window===ie?ie:(oe=ie.ownerDocument)?oe.defaultView||oe.parentWindow:window,me?(ke=f.relatedTarget||f.toElement,me=H,ke=ke?ys(ke):null,ke!==null&&(It=gs(ke),ke!==It||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(me=null,ke=H),me!==ke)){if(we=kv,de="onMouseLeave",$="onMouseEnter",z="mouse",(a==="pointerout"||a==="pointerover")&&(we=Cv,de="onPointerLeave",$="onPointerEnter",z="pointer"),It=me==null?oe:ka(me),V=ke==null?oe:ka(ke),oe=new we(de,z+"leave",me,f,ie),oe.target=It,oe.relatedTarget=V,de=null,ys(ie)===H&&(we=new we($,z+"enter",ke,f,ie),we.target=V,we.relatedTarget=It,de=we),It=de,me&&ke)t:{for(we=me,$=ke,z=0,V=we;V;V=va(V))z++;for(V=0,de=$;de;de=va(de))V++;for(;0<z-V;)we=va(we),z--;for(;0<V-z;)$=va($),V--;for(;z--;){if(we===$||$!==null&&we===$.alternate)break t;we=va(we),$=va($)}we=null}else we=null;me!==null&&Jv(se,oe,me,we,!1),ke!==null&&It!==null&&Jv(se,It,ke,we,!0)}}e:{if(oe=H?ka(H):window,me=oe.nodeName&&oe.nodeName.toLowerCase(),me==="select"||me==="input"&&oe.type==="file")var Se=wM;else if(Mv(oe))if(Dv)Se=_M;else{Se=SM;var Ie=CM}else(me=oe.nodeName)&&me.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Se=EM);if(Se&&(Se=Se(a,H))){Nv(se,Se,f,ie);break e}Ie&&Ie(a,oe,H),a==="focusout"&&(Ie=oe._wrapperState)&&Ie.controlled&&oe.type==="number"&&Ut(oe,"number",oe.value)}switch(Ie=H?ka(H):window,a){case"focusin":(Mv(Ie)||Ie.contentEditable==="true")&&(ya=Ie,Qp=H,zl=null);break;case"focusout":zl=Qp=ya=null;break;case"mousedown":e0=!0;break;case"contextmenu":case"mouseup":case"dragend":e0=!1,zv(se,f,ie);break;case"selectionchange":if(MM)break;case"keydown":case"keyup":zv(se,f,ie)}var Pe;if(Zp)e:{switch(a){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else ga?Tv(a,f)&&(Fe="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(Fe="onCompositionStart");Fe&&(Sv&&f.locale!=="ko"&&(ga||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&ga&&(Pe=vv()):(pi=ie,Hp="value"in pi?pi.value:pi.textContent,ga=!0)),Ie=Jc(H,Fe),0<Ie.length&&(Fe=new wv(Fe,a,null,f,ie),se.push({event:Fe,listeners:Ie}),Pe?Fe.data=Pe:(Pe=Av(f),Pe!==null&&(Fe.data=Pe)))),(Pe=yM?xM(a,f):vM(a,f))&&(H=Jc(H,"onBeforeInput"),0<H.length&&(ie=new wv("onBeforeInput","beforeinput",null,f,ie),se.push({event:ie,listeners:H}),ie.data=Pe))}Gv(se,c)})}function Vl(a,c,f){return{instance:a,listener:c,currentTarget:f}}function Jc(a,c){for(var f=c+"Capture",g=[];a!==null;){var k=a,C=k.stateNode;k.tag===5&&C!==null&&(k=C,C=Ke(a,f),C!=null&&g.unshift(Vl(a,C,k)),C=Ke(a,c),C!=null&&g.push(Vl(a,C,k))),a=a.return}return g}function va(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function Jv(a,c,f,g,k){for(var C=c._reactName,T=[];f!==null&&f!==g;){var R=f,j=R.alternate,H=R.stateNode;if(j!==null&&j===g)break;R.tag===5&&H!==null&&(R=H,k?(j=Ke(f,C),j!=null&&T.unshift(Vl(f,j,R))):k||(j=Ke(f,C),j!=null&&T.push(Vl(f,j,R)))),f=f.return}T.length!==0&&a.push({event:c,listeners:T})}var OM=/\r\n?/g,IM=/\u0000|\uFFFD/g;function Yv(a){return(typeof a=="string"?a:""+a).replace(OM,`
|
|
38
|
-
`).replace(IM,"")}function Yc(a,c,f){if(c=Yv(c),Yv(a)!==c&&f)throw Error(n(425))}function Xc(){}var s0=null,a0=null;function l0(a,c){return a==="textarea"||a==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var u0=typeof setTimeout=="function"?setTimeout:void 0,PM=typeof clearTimeout=="function"?clearTimeout:void 0,Xv=typeof Promise=="function"?Promise:void 0,jM=typeof queueMicrotask=="function"?queueMicrotask:typeof Xv<"u"?function(a){return Xv.resolve(null).then(a).catch(LM)}:u0;function LM(a){setTimeout(function(){throw a})}function c0(a,c){var f=c,g=0;do{var k=f.nextSibling;if(a.removeChild(f),k&&k.nodeType===8)if(f=k.data,f==="/$"){if(g===0){a.removeChild(k),Rl(c);return}g--}else f!=="$"&&f!=="$?"&&f!=="$!"||g++;f=k}while(f);Rl(c)}function gi(a){for(;a!=null;a=a.nextSibling){var c=a.nodeType;if(c===1||c===3)break;if(c===8){if(c=a.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return a}function Qv(a){a=a.previousSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"){if(c===0)return a;c--}else f==="/$"&&c++}a=a.previousSibling}return null}var ba=Math.random().toString(36).slice(2),Yr="__reactFiber$"+ba,Hl="__reactProps$"+ba,Mo="__reactContainer$"+ba,d0="__reactEvents$"+ba,FM="__reactListeners$"+ba,zM="__reactHandles$"+ba;function ys(a){var c=a[Yr];if(c)return c;for(var f=a.parentNode;f;){if(c=f[Mo]||f[Yr]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=Qv(a);a!==null;){if(f=a[Yr])return f;a=Qv(a)}return c}a=f,f=a.parentNode}return null}function Ul(a){return a=a[Yr]||a[Mo],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function ka(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(n(33))}function Qc(a){return a[Hl]||null}var f0=[],wa=-1;function yi(a){return{current:a}}function bt(a){0>wa||(a.current=f0[wa],f0[wa]=null,wa--)}function gt(a,c){wa++,f0[wa]=a.current,a.current=c}var xi={},bn=yi(xi),Vn=yi(!1),xs=xi;function Ca(a,c){var f=a.type.contextTypes;if(!f)return xi;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===c)return g.__reactInternalMemoizedMaskedChildContext;var k={},C;for(C in f)k[C]=c[C];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=k),k}function Hn(a){return a=a.childContextTypes,a!=null}function ed(){bt(Vn),bt(bn)}function eb(a,c,f){if(bn.current!==xi)throw Error(n(168));gt(bn,c),gt(Vn,f)}function tb(a,c,f){var g=a.stateNode;if(c=c.childContextTypes,typeof g.getChildContext!="function")return f;g=g.getChildContext();for(var k in g)if(!(k in c))throw Error(n(108,Ae(a)||"Unknown",k));return F({},f,g)}function td(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||xi,xs=bn.current,gt(bn,a),gt(Vn,Vn.current),!0}function nb(a,c,f){var g=a.stateNode;if(!g)throw Error(n(169));f?(a=tb(a,c,xs),g.__reactInternalMemoizedMergedChildContext=a,bt(Vn),bt(bn),gt(bn,a)):bt(Vn),gt(Vn,f)}var No=null,nd=!1,h0=!1;function rb(a){No===null?No=[a]:No.push(a)}function $M(a){nd=!0,rb(a)}function vi(){if(!h0&&No!==null){h0=!0;var a=0,c=ut;try{var f=No;for(ut=1;a<f.length;a++){var g=f[a];do g=g(!0);while(g!==null)}No=null,nd=!1}catch(k){throw No!==null&&(No=No.slice(a+1)),iv(Pp,vi),k}finally{ut=c,h0=!1}}return null}var Sa=[],Ea=0,rd=null,od=0,pr=[],mr=0,vs=null,Do=1,Ro="";function bs(a,c){Sa[Ea++]=od,Sa[Ea++]=rd,rd=a,od=c}function ob(a,c,f){pr[mr++]=Do,pr[mr++]=Ro,pr[mr++]=vs,vs=a;var g=Do;a=Ro;var k=32-Dr(g)-1;g&=~(1<<k),f+=1;var C=32-Dr(c)+k;if(30<C){var T=k-k%5;C=(g&(1<<T)-1).toString(32),g>>=T,k-=T,Do=1<<32-Dr(c)+k|f<<k|g,Ro=C+a}else Do=1<<C|f<<k|g,Ro=a}function p0(a){a.return!==null&&(bs(a,1),ob(a,1,0))}function m0(a){for(;a===rd;)rd=Sa[--Ea],Sa[Ea]=null,od=Sa[--Ea],Sa[Ea]=null;for(;a===vs;)vs=pr[--mr],pr[mr]=null,Ro=pr[--mr],pr[mr]=null,Do=pr[--mr],pr[mr]=null}var tr=null,nr=null,St=!1,Or=null;function ib(a,c){var f=vr(5,null,null,0);f.elementType="DELETED",f.stateNode=c,f.return=a,c=a.deletions,c===null?(a.deletions=[f],a.flags|=16):c.push(f)}function sb(a,c){switch(a.tag){case 5:var f=a.type;return c=c.nodeType!==1||f.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(a.stateNode=c,tr=a,nr=gi(c.firstChild),!0):!1;case 6:return c=a.pendingProps===""||c.nodeType!==3?null:c,c!==null?(a.stateNode=c,tr=a,nr=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(f=vs!==null?{id:Do,overflow:Ro}:null,a.memoizedState={dehydrated:c,treeContext:f,retryLane:1073741824},f=vr(18,null,null,0),f.stateNode=c,f.return=a,a.child=f,tr=a,nr=null,!0):!1;default:return!1}}function g0(a){return(a.mode&1)!==0&&(a.flags&128)===0}function y0(a){if(St){var c=nr;if(c){var f=c;if(!sb(a,c)){if(g0(a))throw Error(n(418));c=gi(f.nextSibling);var g=tr;c&&sb(a,c)?ib(g,f):(a.flags=a.flags&-4097|2,St=!1,tr=a)}}else{if(g0(a))throw Error(n(418));a.flags=a.flags&-4097|2,St=!1,tr=a}}}function ab(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;tr=a}function id(a){if(a!==tr)return!1;if(!St)return ab(a),St=!0,!1;var c;if((c=a.tag!==3)&&!(c=a.tag!==5)&&(c=a.type,c=c!=="head"&&c!=="body"&&!l0(a.type,a.memoizedProps)),c&&(c=nr)){if(g0(a))throw lb(),Error(n(418));for(;c;)ib(a,c),c=gi(c.nextSibling)}if(ab(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));e:{for(a=a.nextSibling,c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"){if(c===0){nr=gi(a.nextSibling);break e}c--}else f!=="$"&&f!=="$!"&&f!=="$?"||c++}a=a.nextSibling}nr=null}}else nr=tr?gi(a.stateNode.nextSibling):null;return!0}function lb(){for(var a=nr;a;)a=gi(a.nextSibling)}function _a(){nr=tr=null,St=!1}function x0(a){Or===null?Or=[a]:Or.push(a)}var BM=M.ReactCurrentBatchConfig;function Wl(a,c,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(n(309));var g=f.stateNode}if(!g)throw Error(n(147,a));var k=g,C=""+a;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===C?c.ref:(c=function(T){var R=k.refs;T===null?delete R[C]:R[C]=T},c._stringRef=C,c)}if(typeof a!="string")throw Error(n(284));if(!f._owner)throw Error(n(290,a))}return a}function sd(a,c){throw a=Object.prototype.toString.call(c),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a))}function ub(a){var c=a._init;return c(a._payload)}function cb(a){function c($,z){if(a){var V=$.deletions;V===null?($.deletions=[z],$.flags|=16):V.push(z)}}function f($,z){if(!a)return null;for(;z!==null;)c($,z),z=z.sibling;return null}function g($,z){for($=new Map;z!==null;)z.key!==null?$.set(z.key,z):$.set(z.index,z),z=z.sibling;return $}function k($,z){return $=Ti($,z),$.index=0,$.sibling=null,$}function C($,z,V){return $.index=V,a?(V=$.alternate,V!==null?(V=V.index,V<z?($.flags|=2,z):V):($.flags|=2,z)):($.flags|=1048576,z)}function T($){return a&&$.alternate===null&&($.flags|=2),$}function R($,z,V,de){return z===null||z.tag!==6?(z=um(V,$.mode,de),z.return=$,z):(z=k(z,V),z.return=$,z)}function j($,z,V,de){var Se=V.type;return Se===O?ie($,z,V.props.children,de,V.key):z!==null&&(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===K&&ub(Se)===z.type)?(de=k(z,V.props),de.ref=Wl($,z,V),de.return=$,de):(de=Nd(V.type,V.key,V.props,null,$.mode,de),de.ref=Wl($,z,V),de.return=$,de)}function H($,z,V,de){return z===null||z.tag!==4||z.stateNode.containerInfo!==V.containerInfo||z.stateNode.implementation!==V.implementation?(z=cm(V,$.mode,de),z.return=$,z):(z=k(z,V.children||[]),z.return=$,z)}function ie($,z,V,de,Se){return z===null||z.tag!==7?(z=As(V,$.mode,de,Se),z.return=$,z):(z=k(z,V),z.return=$,z)}function se($,z,V){if(typeof z=="string"&&z!==""||typeof z=="number")return z=um(""+z,$.mode,V),z.return=$,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case N:return V=Nd(z.type,z.key,z.props,null,$.mode,V),V.ref=Wl($,null,z),V.return=$,V;case D:return z=cm(z,$.mode,V),z.return=$,z;case K:var de=z._init;return se($,de(z._payload),V)}if(Qt(z)||ee(z))return z=As(z,$.mode,V,null),z.return=$,z;sd($,z)}return null}function oe($,z,V,de){var Se=z!==null?z.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Se!==null?null:R($,z,""+V,de);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case N:return V.key===Se?j($,z,V,de):null;case D:return V.key===Se?H($,z,V,de):null;case K:return Se=V._init,oe($,z,Se(V._payload),de)}if(Qt(V)||ee(V))return Se!==null?null:ie($,z,V,de,null);sd($,V)}return null}function me($,z,V,de,Se){if(typeof de=="string"&&de!==""||typeof de=="number")return $=$.get(V)||null,R(z,$,""+de,Se);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case N:return $=$.get(de.key===null?V:de.key)||null,j(z,$,de,Se);case D:return $=$.get(de.key===null?V:de.key)||null,H(z,$,de,Se);case K:var Ie=de._init;return me($,z,V,Ie(de._payload),Se)}if(Qt(de)||ee(de))return $=$.get(V)||null,ie(z,$,de,Se,null);sd(z,de)}return null}function ke($,z,V,de){for(var Se=null,Ie=null,Pe=z,Fe=z=0,rn=null;Pe!==null&&Fe<V.length;Fe++){Pe.index>Fe?(rn=Pe,Pe=null):rn=Pe.sibling;var tt=oe($,Pe,V[Fe],de);if(tt===null){Pe===null&&(Pe=rn);break}a&&Pe&&tt.alternate===null&&c($,Pe),z=C(tt,z,Fe),Ie===null?Se=tt:Ie.sibling=tt,Ie=tt,Pe=rn}if(Fe===V.length)return f($,Pe),St&&bs($,Fe),Se;if(Pe===null){for(;Fe<V.length;Fe++)Pe=se($,V[Fe],de),Pe!==null&&(z=C(Pe,z,Fe),Ie===null?Se=Pe:Ie.sibling=Pe,Ie=Pe);return St&&bs($,Fe),Se}for(Pe=g($,Pe);Fe<V.length;Fe++)rn=me(Pe,$,Fe,V[Fe],de),rn!==null&&(a&&rn.alternate!==null&&Pe.delete(rn.key===null?Fe:rn.key),z=C(rn,z,Fe),Ie===null?Se=rn:Ie.sibling=rn,Ie=rn);return a&&Pe.forEach(function(Ai){return c($,Ai)}),St&&bs($,Fe),Se}function we($,z,V,de){var Se=ee(V);if(typeof Se!="function")throw Error(n(150));if(V=Se.call(V),V==null)throw Error(n(151));for(var Ie=Se=null,Pe=z,Fe=z=0,rn=null,tt=V.next();Pe!==null&&!tt.done;Fe++,tt=V.next()){Pe.index>Fe?(rn=Pe,Pe=null):rn=Pe.sibling;var Ai=oe($,Pe,tt.value,de);if(Ai===null){Pe===null&&(Pe=rn);break}a&&Pe&&Ai.alternate===null&&c($,Pe),z=C(Ai,z,Fe),Ie===null?Se=Ai:Ie.sibling=Ai,Ie=Ai,Pe=rn}if(tt.done)return f($,Pe),St&&bs($,Fe),Se;if(Pe===null){for(;!tt.done;Fe++,tt=V.next())tt=se($,tt.value,de),tt!==null&&(z=C(tt,z,Fe),Ie===null?Se=tt:Ie.sibling=tt,Ie=tt);return St&&bs($,Fe),Se}for(Pe=g($,Pe);!tt.done;Fe++,tt=V.next())tt=me(Pe,$,Fe,tt.value,de),tt!==null&&(a&&tt.alternate!==null&&Pe.delete(tt.key===null?Fe:tt.key),z=C(tt,z,Fe),Ie===null?Se=tt:Ie.sibling=tt,Ie=tt);return a&&Pe.forEach(function(bN){return c($,bN)}),St&&bs($,Fe),Se}function It($,z,V,de){if(typeof V=="object"&&V!==null&&V.type===O&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case N:e:{for(var Se=V.key,Ie=z;Ie!==null;){if(Ie.key===Se){if(Se=V.type,Se===O){if(Ie.tag===7){f($,Ie.sibling),z=k(Ie,V.props.children),z.return=$,$=z;break e}}else if(Ie.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===K&&ub(Se)===Ie.type){f($,Ie.sibling),z=k(Ie,V.props),z.ref=Wl($,Ie,V),z.return=$,$=z;break e}f($,Ie);break}else c($,Ie);Ie=Ie.sibling}V.type===O?(z=As(V.props.children,$.mode,de,V.key),z.return=$,$=z):(de=Nd(V.type,V.key,V.props,null,$.mode,de),de.ref=Wl($,z,V),de.return=$,$=de)}return T($);case D:e:{for(Ie=V.key;z!==null;){if(z.key===Ie)if(z.tag===4&&z.stateNode.containerInfo===V.containerInfo&&z.stateNode.implementation===V.implementation){f($,z.sibling),z=k(z,V.children||[]),z.return=$,$=z;break e}else{f($,z);break}else c($,z);z=z.sibling}z=cm(V,$.mode,de),z.return=$,$=z}return T($);case K:return Ie=V._init,It($,z,Ie(V._payload),de)}if(Qt(V))return ke($,z,V,de);if(ee(V))return we($,z,V,de);sd($,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,z!==null&&z.tag===6?(f($,z.sibling),z=k(z,V),z.return=$,$=z):(f($,z),z=um(V,$.mode,de),z.return=$,$=z),T($)):f($,z)}return It}var Ta=cb(!0),db=cb(!1),ad=yi(null),ld=null,Aa=null,v0=null;function b0(){v0=Aa=ld=null}function k0(a){var c=ad.current;bt(ad),a._currentValue=c}function w0(a,c,f){for(;a!==null;){var g=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,g!==null&&(g.childLanes|=c)):g!==null&&(g.childLanes&c)!==c&&(g.childLanes|=c),a===f)break;a=a.return}}function Ma(a,c){ld=a,v0=Aa=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&c)!==0&&(Un=!0),a.firstContext=null)}function gr(a){var c=a._currentValue;if(v0!==a)if(a={context:a,memoizedValue:c,next:null},Aa===null){if(ld===null)throw Error(n(308));Aa=a,ld.dependencies={lanes:0,firstContext:a}}else Aa=Aa.next=a;return c}var ks=null;function C0(a){ks===null?ks=[a]:ks.push(a)}function fb(a,c,f,g){var k=c.interleaved;return k===null?(f.next=f,C0(c)):(f.next=k.next,k.next=f),c.interleaved=f,Oo(a,g)}function Oo(a,c){a.lanes|=c;var f=a.alternate;for(f!==null&&(f.lanes|=c),f=a,a=a.return;a!==null;)a.childLanes|=c,f=a.alternate,f!==null&&(f.childLanes|=c),f=a,a=a.return;return f.tag===3?f.stateNode:null}var bi=!1;function S0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hb(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Io(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function ki(a,c,f){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(Ye&2)!==0){var k=g.pending;return k===null?c.next=c:(c.next=k.next,k.next=c),g.pending=c,Oo(a,f)}return k=g.interleaved,k===null?(c.next=c,C0(g)):(c.next=k.next,k.next=c),g.interleaved=c,Oo(a,f)}function ud(a,c,f){if(c=c.updateQueue,c!==null&&(c=c.shared,(f&4194240)!==0)){var g=c.lanes;g&=a.pendingLanes,f|=g,c.lanes=f,Fp(a,f)}}function pb(a,c){var f=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,f===g)){var k=null,C=null;if(f=f.firstBaseUpdate,f!==null){do{var T={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};C===null?k=C=T:C=C.next=T,f=f.next}while(f!==null);C===null?k=C=c:C=C.next=c}else k=C=c;f={baseState:g.baseState,firstBaseUpdate:k,lastBaseUpdate:C,shared:g.shared,effects:g.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=c}function cd(a,c,f,g){var k=a.updateQueue;bi=!1;var C=k.firstBaseUpdate,T=k.lastBaseUpdate,R=k.shared.pending;if(R!==null){k.shared.pending=null;var j=R,H=j.next;j.next=null,T===null?C=H:T.next=H,T=j;var ie=a.alternate;ie!==null&&(ie=ie.updateQueue,R=ie.lastBaseUpdate,R!==T&&(R===null?ie.firstBaseUpdate=H:R.next=H,ie.lastBaseUpdate=j))}if(C!==null){var se=k.baseState;T=0,ie=H=j=null,R=C;do{var oe=R.lane,me=R.eventTime;if((g&oe)===oe){ie!==null&&(ie=ie.next={eventTime:me,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=a,we=R;switch(oe=c,me=f,we.tag){case 1:if(ke=we.payload,typeof ke=="function"){se=ke.call(me,se,oe);break e}se=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=we.payload,oe=typeof ke=="function"?ke.call(me,se,oe):ke,oe==null)break e;se=F({},se,oe);break e;case 2:bi=!0}}R.callback!==null&&R.lane!==0&&(a.flags|=64,oe=k.effects,oe===null?k.effects=[R]:oe.push(R))}else me={eventTime:me,lane:oe,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ie===null?(H=ie=me,j=se):ie=ie.next=me,T|=oe;if(R=R.next,R===null){if(R=k.shared.pending,R===null)break;oe=R,R=oe.next,oe.next=null,k.lastBaseUpdate=oe,k.shared.pending=null}}while(!0);if(ie===null&&(j=se),k.baseState=j,k.firstBaseUpdate=H,k.lastBaseUpdate=ie,c=k.shared.interleaved,c!==null){k=c;do T|=k.lane,k=k.next;while(k!==c)}else C===null&&(k.shared.lanes=0);Ss|=T,a.lanes=T,a.memoizedState=se}}function mb(a,c,f){if(a=c.effects,c.effects=null,a!==null)for(c=0;c<a.length;c++){var g=a[c],k=g.callback;if(k!==null){if(g.callback=null,g=f,typeof k!="function")throw Error(n(191,k));k.call(g)}}}var ql={},Xr=yi(ql),Kl=yi(ql),Gl=yi(ql);function ws(a){if(a===ql)throw Error(n(174));return a}function E0(a,c){switch(gt(Gl,c),gt(Kl,a),gt(Xr,ql),a=c.nodeType,a){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:fr(null,"");break;default:a=a===8?c.parentNode:c,c=a.namespaceURI||null,a=a.tagName,c=fr(c,a)}bt(Xr),gt(Xr,c)}function Na(){bt(Xr),bt(Kl),bt(Gl)}function gb(a){ws(Gl.current);var c=ws(Xr.current),f=fr(c,a.type);c!==f&&(gt(Kl,a),gt(Xr,f))}function _0(a){Kl.current===a&&(bt(Xr),bt(Kl))}var _t=yi(0);function dd(a){for(var c=a;c!==null;){if(c.tag===13){var f=c.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var T0=[];function A0(){for(var a=0;a<T0.length;a++)T0[a]._workInProgressVersionPrimary=null;T0.length=0}var fd=M.ReactCurrentDispatcher,M0=M.ReactCurrentBatchConfig,Cs=0,Tt=null,Kt=null,tn=null,hd=!1,Zl=!1,Jl=0,VM=0;function kn(){throw Error(n(321))}function N0(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!Rr(a[f],c[f]))return!1;return!0}function D0(a,c,f,g,k,C){if(Cs=C,Tt=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,fd.current=a===null||a.memoizedState===null?qM:KM,a=f(g,k),Zl){C=0;do{if(Zl=!1,Jl=0,25<=C)throw Error(n(301));C+=1,tn=Kt=null,c.updateQueue=null,fd.current=GM,a=f(g,k)}while(Zl)}if(fd.current=gd,c=Kt!==null&&Kt.next!==null,Cs=0,tn=Kt=Tt=null,hd=!1,c)throw Error(n(300));return a}function R0(){var a=Jl!==0;return Jl=0,a}function Qr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Tt.memoizedState=tn=a:tn=tn.next=a,tn}function yr(){if(Kt===null){var a=Tt.alternate;a=a!==null?a.memoizedState:null}else a=Kt.next;var c=tn===null?Tt.memoizedState:tn.next;if(c!==null)tn=c,Kt=a;else{if(a===null)throw Error(n(310));Kt=a,a={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},tn===null?Tt.memoizedState=tn=a:tn=tn.next=a}return tn}function Yl(a,c){return typeof c=="function"?c(a):c}function O0(a){var c=yr(),f=c.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=a;var g=Kt,k=g.baseQueue,C=f.pending;if(C!==null){if(k!==null){var T=k.next;k.next=C.next,C.next=T}g.baseQueue=k=C,f.pending=null}if(k!==null){C=k.next,g=g.baseState;var R=T=null,j=null,H=C;do{var ie=H.lane;if((Cs&ie)===ie)j!==null&&(j=j.next={lane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),g=H.hasEagerState?H.eagerState:a(g,H.action);else{var se={lane:ie,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null};j===null?(R=j=se,T=g):j=j.next=se,Tt.lanes|=ie,Ss|=ie}H=H.next}while(H!==null&&H!==C);j===null?T=g:j.next=R,Rr(g,c.memoizedState)||(Un=!0),c.memoizedState=g,c.baseState=T,c.baseQueue=j,f.lastRenderedState=g}if(a=f.interleaved,a!==null){k=a;do C=k.lane,Tt.lanes|=C,Ss|=C,k=k.next;while(k!==a)}else k===null&&(f.lanes=0);return[c.memoizedState,f.dispatch]}function I0(a){var c=yr(),f=c.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=a;var g=f.dispatch,k=f.pending,C=c.memoizedState;if(k!==null){f.pending=null;var T=k=k.next;do C=a(C,T.action),T=T.next;while(T!==k);Rr(C,c.memoizedState)||(Un=!0),c.memoizedState=C,c.baseQueue===null&&(c.baseState=C),f.lastRenderedState=C}return[C,g]}function yb(){}function xb(a,c){var f=Tt,g=yr(),k=c(),C=!Rr(g.memoizedState,k);if(C&&(g.memoizedState=k,Un=!0),g=g.queue,P0(kb.bind(null,f,g,a),[a]),g.getSnapshot!==c||C||tn!==null&&tn.memoizedState.tag&1){if(f.flags|=2048,Xl(9,bb.bind(null,f,g,k,c),void 0,null),nn===null)throw Error(n(349));(Cs&30)!==0||vb(f,c,k)}return k}function vb(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=Tt.updateQueue,c===null?(c={lastEffect:null,stores:null},Tt.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function bb(a,c,f,g){c.value=f,c.getSnapshot=g,wb(c)&&Cb(a)}function kb(a,c,f){return f(function(){wb(c)&&Cb(a)})}function wb(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!Rr(a,f)}catch{return!0}}function Cb(a){var c=Oo(a,1);c!==null&&Lr(c,a,1,-1)}function Sb(a){var c=Qr();return typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yl,lastRenderedState:a},c.queue=a,a=a.dispatch=WM.bind(null,Tt,a),[c.memoizedState,a]}function Xl(a,c,f,g){return a={tag:a,create:c,destroy:f,deps:g,next:null},c=Tt.updateQueue,c===null?(c={lastEffect:null,stores:null},Tt.updateQueue=c,c.lastEffect=a.next=a):(f=c.lastEffect,f===null?c.lastEffect=a.next=a:(g=f.next,f.next=a,a.next=g,c.lastEffect=a)),a}function Eb(){return yr().memoizedState}function pd(a,c,f,g){var k=Qr();Tt.flags|=a,k.memoizedState=Xl(1|c,f,void 0,g===void 0?null:g)}function md(a,c,f,g){var k=yr();g=g===void 0?null:g;var C=void 0;if(Kt!==null){var T=Kt.memoizedState;if(C=T.destroy,g!==null&&N0(g,T.deps)){k.memoizedState=Xl(c,f,C,g);return}}Tt.flags|=a,k.memoizedState=Xl(1|c,f,C,g)}function _b(a,c){return pd(8390656,8,a,c)}function P0(a,c){return md(2048,8,a,c)}function Tb(a,c){return md(4,2,a,c)}function Ab(a,c){return md(4,4,a,c)}function Mb(a,c){if(typeof c=="function")return a=a(),c(a),function(){c(null)};if(c!=null)return a=a(),c.current=a,function(){c.current=null}}function Nb(a,c,f){return f=f!=null?f.concat([a]):null,md(4,4,Mb.bind(null,c,a),f)}function j0(){}function Db(a,c){var f=yr();c=c===void 0?null:c;var g=f.memoizedState;return g!==null&&c!==null&&N0(c,g[1])?g[0]:(f.memoizedState=[a,c],a)}function Rb(a,c){var f=yr();c=c===void 0?null:c;var g=f.memoizedState;return g!==null&&c!==null&&N0(c,g[1])?g[0]:(a=a(),f.memoizedState=[a,c],a)}function Ob(a,c,f){return(Cs&21)===0?(a.baseState&&(a.baseState=!1,Un=!0),a.memoizedState=f):(Rr(f,c)||(f=uv(),Tt.lanes|=f,Ss|=f,a.baseState=!0),c)}function HM(a,c){var f=ut;ut=f!==0&&4>f?f:4,a(!0);var g=M0.transition;M0.transition={};try{a(!1),c()}finally{ut=f,M0.transition=g}}function Ib(){return yr().memoizedState}function UM(a,c,f){var g=Ei(a);if(f={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null},Pb(a))jb(c,f);else if(f=fb(a,c,f,g),f!==null){var k=Dn();Lr(f,a,g,k),Lb(f,c,g)}}function WM(a,c,f){var g=Ei(a),k={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null};if(Pb(a))jb(c,k);else{var C=a.alternate;if(a.lanes===0&&(C===null||C.lanes===0)&&(C=c.lastRenderedReducer,C!==null))try{var T=c.lastRenderedState,R=C(T,f);if(k.hasEagerState=!0,k.eagerState=R,Rr(R,T)){var j=c.interleaved;j===null?(k.next=k,C0(c)):(k.next=j.next,j.next=k),c.interleaved=k;return}}catch{}finally{}f=fb(a,c,k,g),f!==null&&(k=Dn(),Lr(f,a,g,k),Lb(f,c,g))}}function Pb(a){var c=a.alternate;return a===Tt||c!==null&&c===Tt}function jb(a,c){Zl=hd=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function Lb(a,c,f){if((f&4194240)!==0){var g=c.lanes;g&=a.pendingLanes,f|=g,c.lanes=f,Fp(a,f)}}var gd={readContext:gr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},qM={readContext:gr,useCallback:function(a,c){return Qr().memoizedState=[a,c===void 0?null:c],a},useContext:gr,useEffect:_b,useImperativeHandle:function(a,c,f){return f=f!=null?f.concat([a]):null,pd(4194308,4,Mb.bind(null,c,a),f)},useLayoutEffect:function(a,c){return pd(4194308,4,a,c)},useInsertionEffect:function(a,c){return pd(4,2,a,c)},useMemo:function(a,c){var f=Qr();return c=c===void 0?null:c,a=a(),f.memoizedState=[a,c],a},useReducer:function(a,c,f){var g=Qr();return c=f!==void 0?f(c):c,g.memoizedState=g.baseState=c,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:c},g.queue=a,a=a.dispatch=UM.bind(null,Tt,a),[g.memoizedState,a]},useRef:function(a){var c=Qr();return a={current:a},c.memoizedState=a},useState:Sb,useDebugValue:j0,useDeferredValue:function(a){return Qr().memoizedState=a},useTransition:function(){var a=Sb(!1),c=a[0];return a=HM.bind(null,a[1]),Qr().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,f){var g=Tt,k=Qr();if(St){if(f===void 0)throw Error(n(407));f=f()}else{if(f=c(),nn===null)throw Error(n(349));(Cs&30)!==0||vb(g,c,f)}k.memoizedState=f;var C={value:f,getSnapshot:c};return k.queue=C,_b(kb.bind(null,g,C,a),[a]),g.flags|=2048,Xl(9,bb.bind(null,g,C,f,c),void 0,null),f},useId:function(){var a=Qr(),c=nn.identifierPrefix;if(St){var f=Ro,g=Do;f=(g&~(1<<32-Dr(g)-1)).toString(32)+f,c=":"+c+"R"+f,f=Jl++,0<f&&(c+="H"+f.toString(32)),c+=":"}else f=VM++,c=":"+c+"r"+f.toString(32)+":";return a.memoizedState=c},unstable_isNewReconciler:!1},KM={readContext:gr,useCallback:Db,useContext:gr,useEffect:P0,useImperativeHandle:Nb,useInsertionEffect:Tb,useLayoutEffect:Ab,useMemo:Rb,useReducer:O0,useRef:Eb,useState:function(){return O0(Yl)},useDebugValue:j0,useDeferredValue:function(a){var c=yr();return Ob(c,Kt.memoizedState,a)},useTransition:function(){var a=O0(Yl)[0],c=yr().memoizedState;return[a,c]},useMutableSource:yb,useSyncExternalStore:xb,useId:Ib,unstable_isNewReconciler:!1},GM={readContext:gr,useCallback:Db,useContext:gr,useEffect:P0,useImperativeHandle:Nb,useInsertionEffect:Tb,useLayoutEffect:Ab,useMemo:Rb,useReducer:I0,useRef:Eb,useState:function(){return I0(Yl)},useDebugValue:j0,useDeferredValue:function(a){var c=yr();return Kt===null?c.memoizedState=a:Ob(c,Kt.memoizedState,a)},useTransition:function(){var a=I0(Yl)[0],c=yr().memoizedState;return[a,c]},useMutableSource:yb,useSyncExternalStore:xb,useId:Ib,unstable_isNewReconciler:!1};function Ir(a,c){if(a&&a.defaultProps){c=F({},c),a=a.defaultProps;for(var f in a)c[f]===void 0&&(c[f]=a[f]);return c}return c}function L0(a,c,f,g){c=a.memoizedState,f=f(g,c),f=f==null?c:F({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var yd={isMounted:function(a){return(a=a._reactInternals)?gs(a)===a:!1},enqueueSetState:function(a,c,f){a=a._reactInternals;var g=Dn(),k=Ei(a),C=Io(g,k);C.payload=c,f!=null&&(C.callback=f),c=ki(a,C,k),c!==null&&(Lr(c,a,k,g),ud(c,a,k))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var g=Dn(),k=Ei(a),C=Io(g,k);C.tag=1,C.payload=c,f!=null&&(C.callback=f),c=ki(a,C,k),c!==null&&(Lr(c,a,k,g),ud(c,a,k))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=Dn(),g=Ei(a),k=Io(f,g);k.tag=2,c!=null&&(k.callback=c),c=ki(a,k,g),c!==null&&(Lr(c,a,g,f),ud(c,a,g))}};function Fb(a,c,f,g,k,C,T){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,C,T):c.prototype&&c.prototype.isPureReactComponent?!Fl(f,g)||!Fl(k,C):!0}function zb(a,c,f){var g=!1,k=xi,C=c.contextType;return typeof C=="object"&&C!==null?C=gr(C):(k=Hn(c)?xs:bn.current,g=c.contextTypes,C=(g=g!=null)?Ca(a,k):xi),c=new c(f,C),a.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=yd,a.stateNode=c,c._reactInternals=a,g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=k,a.__reactInternalMemoizedMaskedChildContext=C),c}function $b(a,c,f,g){a=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(f,g),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(f,g),c.state!==a&&yd.enqueueReplaceState(c,c.state,null)}function F0(a,c,f,g){var k=a.stateNode;k.props=f,k.state=a.memoizedState,k.refs={},S0(a);var C=c.contextType;typeof C=="object"&&C!==null?k.context=gr(C):(C=Hn(c)?xs:bn.current,k.context=Ca(a,C)),k.state=a.memoizedState,C=c.getDerivedStateFromProps,typeof C=="function"&&(L0(a,c,C,f),k.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(c=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),c!==k.state&&yd.enqueueReplaceState(k,k.state,null),cd(a,f,k,g),k.state=a.memoizedState),typeof k.componentDidMount=="function"&&(a.flags|=4194308)}function Da(a,c){try{var f="",g=c;do f+=ue(g),g=g.return;while(g);var k=f}catch(C){k=`
|
|
39
|
-
Error generating stack: `+C.message+`
|
|
40
|
-
`+C.stack}return{value:a,source:c,stack:k,digest:null}}function z0(a,c,f){return{value:a,source:null,stack:f??null,digest:c??null}}function $0(a,c){try{console.error(c.value)}catch(f){setTimeout(function(){throw f})}}var ZM=typeof WeakMap=="function"?WeakMap:Map;function Bb(a,c,f){f=Io(-1,f),f.tag=3,f.payload={element:null};var g=c.value;return f.callback=function(){Sd||(Sd=!0,tm=g),$0(a,c)},f}function Vb(a,c,f){f=Io(-1,f),f.tag=3;var g=a.type.getDerivedStateFromError;if(typeof g=="function"){var k=c.value;f.payload=function(){return g(k)},f.callback=function(){$0(a,c)}}var C=a.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(f.callback=function(){$0(a,c),typeof g!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})}),f}function Hb(a,c,f){var g=a.pingCache;if(g===null){g=a.pingCache=new ZM;var k=new Set;g.set(c,k)}else k=g.get(c),k===void 0&&(k=new Set,g.set(c,k));k.has(f)||(k.add(f),a=uN.bind(null,a,c,f),c.then(a,a))}function Ub(a){do{var c;if((c=a.tag===13)&&(c=a.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return a;a=a.return}while(a!==null);return null}function Wb(a,c,f,g,k){return(a.mode&1)===0?(a===c?a.flags|=65536:(a.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(c=Io(-1,1),c.tag=2,ki(f,c,1))),f.lanes|=1),a):(a.flags|=65536,a.lanes=k,a)}var JM=M.ReactCurrentOwner,Un=!1;function Nn(a,c,f,g){c.child=a===null?db(c,null,f,g):Ta(c,a.child,f,g)}function qb(a,c,f,g,k){f=f.render;var C=c.ref;return Ma(c,k),g=D0(a,c,f,g,C,k),f=R0(),a!==null&&!Un?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~k,Po(a,c,k)):(St&&f&&p0(c),c.flags|=1,Nn(a,c,g,k),c.child)}function Kb(a,c,f,g,k){if(a===null){var C=f.type;return typeof C=="function"&&!lm(C)&&C.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(c.tag=15,c.type=C,Gb(a,c,C,g,k)):(a=Nd(f.type,null,g,c,c.mode,k),a.ref=c.ref,a.return=c,c.child=a)}if(C=a.child,(a.lanes&k)===0){var T=C.memoizedProps;if(f=f.compare,f=f!==null?f:Fl,f(T,g)&&a.ref===c.ref)return Po(a,c,k)}return c.flags|=1,a=Ti(C,g),a.ref=c.ref,a.return=c,c.child=a}function Gb(a,c,f,g,k){if(a!==null){var C=a.memoizedProps;if(Fl(C,g)&&a.ref===c.ref)if(Un=!1,c.pendingProps=g=C,(a.lanes&k)!==0)(a.flags&131072)!==0&&(Un=!0);else return c.lanes=a.lanes,Po(a,c,k)}return B0(a,c,f,g,k)}function Zb(a,c,f){var g=c.pendingProps,k=g.children,C=a!==null?a.memoizedState:null;if(g.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},gt(Oa,rr),rr|=f;else{if((f&1073741824)===0)return a=C!==null?C.baseLanes|f:f,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:a,cachePool:null,transitions:null},c.updateQueue=null,gt(Oa,rr),rr|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=C!==null?C.baseLanes:f,gt(Oa,rr),rr|=g}else C!==null?(g=C.baseLanes|f,c.memoizedState=null):g=f,gt(Oa,rr),rr|=g;return Nn(a,c,k,f),c.child}function Jb(a,c){var f=c.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(c.flags|=512,c.flags|=2097152)}function B0(a,c,f,g,k){var C=Hn(f)?xs:bn.current;return C=Ca(c,C),Ma(c,k),f=D0(a,c,f,g,C,k),g=R0(),a!==null&&!Un?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~k,Po(a,c,k)):(St&&g&&p0(c),c.flags|=1,Nn(a,c,f,k),c.child)}function Yb(a,c,f,g,k){if(Hn(f)){var C=!0;td(c)}else C=!1;if(Ma(c,k),c.stateNode===null)vd(a,c),zb(c,f,g),F0(c,f,g,k),g=!0;else if(a===null){var T=c.stateNode,R=c.memoizedProps;T.props=R;var j=T.context,H=f.contextType;typeof H=="object"&&H!==null?H=gr(H):(H=Hn(f)?xs:bn.current,H=Ca(c,H));var ie=f.getDerivedStateFromProps,se=typeof ie=="function"||typeof T.getSnapshotBeforeUpdate=="function";se||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(R!==g||j!==H)&&$b(c,T,g,H),bi=!1;var oe=c.memoizedState;T.state=oe,cd(c,g,T,k),j=c.memoizedState,R!==g||oe!==j||Vn.current||bi?(typeof ie=="function"&&(L0(c,f,ie,g),j=c.memoizedState),(R=bi||Fb(c,f,R,g,oe,j,H))?(se||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(c.flags|=4194308)):(typeof T.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=g,c.memoizedState=j),T.props=g,T.state=j,T.context=H,g=R):(typeof T.componentDidMount=="function"&&(c.flags|=4194308),g=!1)}else{T=c.stateNode,hb(a,c),R=c.memoizedProps,H=c.type===c.elementType?R:Ir(c.type,R),T.props=H,se=c.pendingProps,oe=T.context,j=f.contextType,typeof j=="object"&&j!==null?j=gr(j):(j=Hn(f)?xs:bn.current,j=Ca(c,j));var me=f.getDerivedStateFromProps;(ie=typeof me=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(R!==se||oe!==j)&&$b(c,T,g,j),bi=!1,oe=c.memoizedState,T.state=oe,cd(c,g,T,k);var ke=c.memoizedState;R!==se||oe!==ke||Vn.current||bi?(typeof me=="function"&&(L0(c,f,me,g),ke=c.memoizedState),(H=bi||Fb(c,f,H,g,oe,ke,j)||!1)?(ie||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,ke,j),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,ke,j)),typeof T.componentDidUpdate=="function"&&(c.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof T.componentDidUpdate!="function"||R===a.memoizedProps&&oe===a.memoizedState||(c.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||R===a.memoizedProps&&oe===a.memoizedState||(c.flags|=1024),c.memoizedProps=g,c.memoizedState=ke),T.props=g,T.state=ke,T.context=j,g=H):(typeof T.componentDidUpdate!="function"||R===a.memoizedProps&&oe===a.memoizedState||(c.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||R===a.memoizedProps&&oe===a.memoizedState||(c.flags|=1024),g=!1)}return V0(a,c,f,g,C,k)}function V0(a,c,f,g,k,C){Jb(a,c);var T=(c.flags&128)!==0;if(!g&&!T)return k&&nb(c,f,!1),Po(a,c,C);g=c.stateNode,JM.current=c;var R=T&&typeof f.getDerivedStateFromError!="function"?null:g.render();return c.flags|=1,a!==null&&T?(c.child=Ta(c,a.child,null,C),c.child=Ta(c,null,R,C)):Nn(a,c,R,C),c.memoizedState=g.state,k&&nb(c,f,!0),c.child}function Xb(a){var c=a.stateNode;c.pendingContext?eb(a,c.pendingContext,c.pendingContext!==c.context):c.context&&eb(a,c.context,!1),E0(a,c.containerInfo)}function Qb(a,c,f,g,k){return _a(),x0(k),c.flags|=256,Nn(a,c,f,g),c.child}var H0={dehydrated:null,treeContext:null,retryLane:0};function U0(a){return{baseLanes:a,cachePool:null,transitions:null}}function e2(a,c,f){var g=c.pendingProps,k=_t.current,C=!1,T=(c.flags&128)!==0,R;if((R=T)||(R=a!==null&&a.memoizedState===null?!1:(k&2)!==0),R?(C=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(k|=1),gt(_t,k&1),a===null)return y0(c),a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((c.mode&1)===0?c.lanes=1:a.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(T=g.children,a=g.fallback,C?(g=c.mode,C=c.child,T={mode:"hidden",children:T},(g&1)===0&&C!==null?(C.childLanes=0,C.pendingProps=T):C=Dd(T,g,0,null),a=As(a,g,f,null),C.return=c,a.return=c,C.sibling=a,c.child=C,c.child.memoizedState=U0(f),c.memoizedState=H0,a):W0(c,T));if(k=a.memoizedState,k!==null&&(R=k.dehydrated,R!==null))return YM(a,c,T,g,R,k,f);if(C){C=g.fallback,T=c.mode,k=a.child,R=k.sibling;var j={mode:"hidden",children:g.children};return(T&1)===0&&c.child!==k?(g=c.child,g.childLanes=0,g.pendingProps=j,c.deletions=null):(g=Ti(k,j),g.subtreeFlags=k.subtreeFlags&14680064),R!==null?C=Ti(R,C):(C=As(C,T,f,null),C.flags|=2),C.return=c,g.return=c,g.sibling=C,c.child=g,g=C,C=c.child,T=a.child.memoizedState,T=T===null?U0(f):{baseLanes:T.baseLanes|f,cachePool:null,transitions:T.transitions},C.memoizedState=T,C.childLanes=a.childLanes&~f,c.memoizedState=H0,g}return C=a.child,a=C.sibling,g=Ti(C,{mode:"visible",children:g.children}),(c.mode&1)===0&&(g.lanes=f),g.return=c,g.sibling=null,a!==null&&(f=c.deletions,f===null?(c.deletions=[a],c.flags|=16):f.push(a)),c.child=g,c.memoizedState=null,g}function W0(a,c){return c=Dd({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function xd(a,c,f,g){return g!==null&&x0(g),Ta(c,a.child,null,f),a=W0(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function YM(a,c,f,g,k,C,T){if(f)return c.flags&256?(c.flags&=-257,g=z0(Error(n(422))),xd(a,c,T,g)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(C=g.fallback,k=c.mode,g=Dd({mode:"visible",children:g.children},k,0,null),C=As(C,k,T,null),C.flags|=2,g.return=c,C.return=c,g.sibling=C,c.child=g,(c.mode&1)!==0&&Ta(c,a.child,null,T),c.child.memoizedState=U0(T),c.memoizedState=H0,C);if((c.mode&1)===0)return xd(a,c,T,null);if(k.data==="$!"){if(g=k.nextSibling&&k.nextSibling.dataset,g)var R=g.dgst;return g=R,C=Error(n(419)),g=z0(C,g,void 0),xd(a,c,T,g)}if(R=(T&a.childLanes)!==0,Un||R){if(g=nn,g!==null){switch(T&-T){case 4:k=2;break;case 16:k=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:k=32;break;case 536870912:k=268435456;break;default:k=0}k=(k&(g.suspendedLanes|T))!==0?0:k,k!==0&&k!==C.retryLane&&(C.retryLane=k,Oo(a,k),Lr(g,a,k,-1))}return am(),g=z0(Error(n(421))),xd(a,c,T,g)}return k.data==="$?"?(c.flags|=128,c.child=a.child,c=cN.bind(null,a),k._reactRetry=c,null):(a=C.treeContext,nr=gi(k.nextSibling),tr=c,St=!0,Or=null,a!==null&&(pr[mr++]=Do,pr[mr++]=Ro,pr[mr++]=vs,Do=a.id,Ro=a.overflow,vs=c),c=W0(c,g.children),c.flags|=4096,c)}function t2(a,c,f){a.lanes|=c;var g=a.alternate;g!==null&&(g.lanes|=c),w0(a.return,c,f)}function q0(a,c,f,g,k){var C=a.memoizedState;C===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:k}:(C.isBackwards=c,C.rendering=null,C.renderingStartTime=0,C.last=g,C.tail=f,C.tailMode=k)}function n2(a,c,f){var g=c.pendingProps,k=g.revealOrder,C=g.tail;if(Nn(a,c,g.children,f),g=_t.current,(g&2)!==0)g=g&1|2,c.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&t2(a,f,c);else if(a.tag===19)t2(a,f,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}g&=1}if(gt(_t,g),(c.mode&1)===0)c.memoizedState=null;else switch(k){case"forwards":for(f=c.child,k=null;f!==null;)a=f.alternate,a!==null&&dd(a)===null&&(k=f),f=f.sibling;f=k,f===null?(k=c.child,c.child=null):(k=f.sibling,f.sibling=null),q0(c,!1,k,f,C);break;case"backwards":for(f=null,k=c.child,c.child=null;k!==null;){if(a=k.alternate,a!==null&&dd(a)===null){c.child=k;break}a=k.sibling,k.sibling=f,f=k,k=a}q0(c,!0,f,null,C);break;case"together":q0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function vd(a,c){(c.mode&1)===0&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function Po(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),Ss|=c.lanes,(f&c.childLanes)===0)return null;if(a!==null&&c.child!==a.child)throw Error(n(153));if(c.child!==null){for(a=c.child,f=Ti(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=Ti(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function XM(a,c,f){switch(c.tag){case 3:Xb(c),_a();break;case 5:gb(c);break;case 1:Hn(c.type)&&td(c);break;case 4:E0(c,c.stateNode.containerInfo);break;case 10:var g=c.type._context,k=c.memoizedProps.value;gt(ad,g._currentValue),g._currentValue=k;break;case 13:if(g=c.memoizedState,g!==null)return g.dehydrated!==null?(gt(_t,_t.current&1),c.flags|=128,null):(f&c.child.childLanes)!==0?e2(a,c,f):(gt(_t,_t.current&1),a=Po(a,c,f),a!==null?a.sibling:null);gt(_t,_t.current&1);break;case 19:if(g=(f&c.childLanes)!==0,(a.flags&128)!==0){if(g)return n2(a,c,f);c.flags|=128}if(k=c.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),gt(_t,_t.current),g)break;return null;case 22:case 23:return c.lanes=0,Zb(a,c,f)}return Po(a,c,f)}var r2,K0,o2,i2;r2=function(a,c){for(var f=c.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},K0=function(){},o2=function(a,c,f,g){var k=a.memoizedProps;if(k!==g){a=c.stateNode,ws(Xr.current);var C=null;switch(f){case"input":k=Je(a,k),g=Je(a,g),C=[];break;case"select":k=F({},k,{value:void 0}),g=F({},g,{value:void 0}),C=[];break;case"textarea":k=ht(a,k),g=ht(a,g),C=[];break;default:typeof k.onClick!="function"&&typeof g.onClick=="function"&&(a.onclick=Xc)}To(f,g);var T;f=null;for(H in k)if(!g.hasOwnProperty(H)&&k.hasOwnProperty(H)&&k[H]!=null)if(H==="style"){var R=k[H];for(T in R)R.hasOwnProperty(T)&&(f||(f={}),f[T]="")}else H!=="dangerouslySetInnerHTML"&&H!=="children"&&H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&H!=="autoFocus"&&(o.hasOwnProperty(H)?C||(C=[]):(C=C||[]).push(H,null));for(H in g){var j=g[H];if(R=k!=null?k[H]:void 0,g.hasOwnProperty(H)&&j!==R&&(j!=null||R!=null))if(H==="style")if(R){for(T in R)!R.hasOwnProperty(T)||j&&j.hasOwnProperty(T)||(f||(f={}),f[T]="");for(T in j)j.hasOwnProperty(T)&&R[T]!==j[T]&&(f||(f={}),f[T]=j[T])}else f||(C||(C=[]),C.push(H,f)),f=j;else H==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,R=R?R.__html:void 0,j!=null&&R!==j&&(C=C||[]).push(H,j)):H==="children"?typeof j!="string"&&typeof j!="number"||(C=C||[]).push(H,""+j):H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&(o.hasOwnProperty(H)?(j!=null&&H==="onScroll"&&vt("scroll",a),C||R===j||(C=[])):(C=C||[]).push(H,j))}f&&(C=C||[]).push("style",f);var H=C;(c.updateQueue=H)&&(c.flags|=4)}},i2=function(a,c,f,g){f!==g&&(c.flags|=4)};function Ql(a,c){if(!St)switch(a.tailMode){case"hidden":c=a.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function wn(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,g=0;if(c)for(var k=a.child;k!==null;)f|=k.lanes|k.childLanes,g|=k.subtreeFlags&14680064,g|=k.flags&14680064,k.return=a,k=k.sibling;else for(k=a.child;k!==null;)f|=k.lanes|k.childLanes,g|=k.subtreeFlags,g|=k.flags,k.return=a,k=k.sibling;return a.subtreeFlags|=g,a.childLanes=f,c}function QM(a,c,f){var g=c.pendingProps;switch(m0(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wn(c),null;case 1:return Hn(c.type)&&ed(),wn(c),null;case 3:return g=c.stateNode,Na(),bt(Vn),bt(bn),A0(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(a===null||a.child===null)&&(id(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Or!==null&&(om(Or),Or=null))),K0(a,c),wn(c),null;case 5:_0(c);var k=ws(Gl.current);if(f=c.type,a!==null&&c.stateNode!=null)o2(a,c,f,g,k),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!g){if(c.stateNode===null)throw Error(n(166));return wn(c),null}if(a=ws(Xr.current),id(c)){g=c.stateNode,f=c.type;var C=c.memoizedProps;switch(g[Yr]=c,g[Hl]=C,a=(c.mode&1)!==0,f){case"dialog":vt("cancel",g),vt("close",g);break;case"iframe":case"object":case"embed":vt("load",g);break;case"video":case"audio":for(k=0;k<$l.length;k++)vt($l[k],g);break;case"source":vt("error",g);break;case"img":case"image":case"link":vt("error",g),vt("load",g);break;case"details":vt("toggle",g);break;case"input":At(g,C),vt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!C.multiple},vt("invalid",g);break;case"textarea":dr(g,C),vt("invalid",g)}To(f,C),k=null;for(var T in C)if(C.hasOwnProperty(T)){var R=C[T];T==="children"?typeof R=="string"?g.textContent!==R&&(C.suppressHydrationWarning!==!0&&Yc(g.textContent,R,a),k=["children",R]):typeof R=="number"&&g.textContent!==""+R&&(C.suppressHydrationWarning!==!0&&Yc(g.textContent,R,a),k=["children",""+R]):o.hasOwnProperty(T)&&R!=null&&T==="onScroll"&&vt("scroll",g)}switch(f){case"input":Le(g),Ln(g,C,!0);break;case"textarea":Le(g),da(g);break;case"select":case"option":break;default:typeof C.onClick=="function"&&(g.onclick=Xc)}g=k,c.updateQueue=g,g!==null&&(c.flags|=4)}else{T=k.nodeType===9?k:k.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=_o(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=T.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=T.createElement(f,{is:g.is}):(a=T.createElement(f),f==="select"&&(T=a,g.multiple?T.multiple=!0:g.size&&(T.size=g.size))):a=T.createElementNS(a,f),a[Yr]=c,a[Hl]=g,r2(a,c,!1,!1),c.stateNode=a;e:{switch(T=ps(f,g),f){case"dialog":vt("cancel",a),vt("close",a),k=g;break;case"iframe":case"object":case"embed":vt("load",a),k=g;break;case"video":case"audio":for(k=0;k<$l.length;k++)vt($l[k],a);k=g;break;case"source":vt("error",a),k=g;break;case"img":case"image":case"link":vt("error",a),vt("load",a),k=g;break;case"details":vt("toggle",a),k=g;break;case"input":At(a,g),k=Je(a,g),vt("invalid",a);break;case"option":k=g;break;case"select":a._wrapperState={wasMultiple:!!g.multiple},k=F({},g,{value:void 0}),vt("invalid",a);break;case"textarea":dr(a,g),k=ht(a,g),vt("invalid",a);break;default:k=g}To(f,k),R=k;for(C in R)if(R.hasOwnProperty(C)){var j=R[C];C==="style"?ha(a,j):C==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&hr(a,j)):C==="children"?typeof j=="string"?(f!=="textarea"||j!=="")&&Mn(a,j):typeof j=="number"&&Mn(a,""+j):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(o.hasOwnProperty(C)?j!=null&&C==="onScroll"&&vt("scroll",a):j!=null&&A(a,C,j,T))}switch(f){case"input":Le(a),Ln(a,g,!1);break;case"textarea":Le(a),da(a);break;case"option":g.value!=null&&a.setAttribute("value",""+X(g.value));break;case"select":a.multiple=!!g.multiple,C=g.value,C!=null?An(a,!!g.multiple,C,!1):g.defaultValue!=null&&An(a,!!g.multiple,g.defaultValue,!0);break;default:typeof k.onClick=="function"&&(a.onclick=Xc)}switch(f){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return wn(c),null;case 6:if(a&&c.stateNode!=null)i2(a,c,a.memoizedProps,g);else{if(typeof g!="string"&&c.stateNode===null)throw Error(n(166));if(f=ws(Gl.current),ws(Xr.current),id(c)){if(g=c.stateNode,f=c.memoizedProps,g[Yr]=c,(C=g.nodeValue!==f)&&(a=tr,a!==null))switch(a.tag){case 3:Yc(g.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Yc(g.nodeValue,f,(a.mode&1)!==0)}C&&(c.flags|=4)}else g=(f.nodeType===9?f:f.ownerDocument).createTextNode(g),g[Yr]=c,c.stateNode=g}return wn(c),null;case 13:if(bt(_t),g=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(St&&nr!==null&&(c.mode&1)!==0&&(c.flags&128)===0)lb(),_a(),c.flags|=98560,C=!1;else if(C=id(c),g!==null&&g.dehydrated!==null){if(a===null){if(!C)throw Error(n(318));if(C=c.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[Yr]=c}else _a(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;wn(c),C=!1}else Or!==null&&(om(Or),Or=null),C=!0;if(!C)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=f,c):(g=g!==null,g!==(a!==null&&a.memoizedState!==null)&&g&&(c.child.flags|=8192,(c.mode&1)!==0&&(a===null||(_t.current&1)!==0?Gt===0&&(Gt=3):am())),c.updateQueue!==null&&(c.flags|=4),wn(c),null);case 4:return Na(),K0(a,c),a===null&&Bl(c.stateNode.containerInfo),wn(c),null;case 10:return k0(c.type._context),wn(c),null;case 17:return Hn(c.type)&&ed(),wn(c),null;case 19:if(bt(_t),C=c.memoizedState,C===null)return wn(c),null;if(g=(c.flags&128)!==0,T=C.rendering,T===null)if(g)Ql(C,!1);else{if(Gt!==0||a!==null&&(a.flags&128)!==0)for(a=c.child;a!==null;){if(T=dd(a),T!==null){for(c.flags|=128,Ql(C,!1),g=T.updateQueue,g!==null&&(c.updateQueue=g,c.flags|=4),c.subtreeFlags=0,g=f,f=c.child;f!==null;)C=f,a=g,C.flags&=14680066,T=C.alternate,T===null?(C.childLanes=0,C.lanes=a,C.child=null,C.subtreeFlags=0,C.memoizedProps=null,C.memoizedState=null,C.updateQueue=null,C.dependencies=null,C.stateNode=null):(C.childLanes=T.childLanes,C.lanes=T.lanes,C.child=T.child,C.subtreeFlags=0,C.deletions=null,C.memoizedProps=T.memoizedProps,C.memoizedState=T.memoizedState,C.updateQueue=T.updateQueue,C.type=T.type,a=T.dependencies,C.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return gt(_t,_t.current&1|2),c.child}a=a.sibling}C.tail!==null&&Ot()>Ia&&(c.flags|=128,g=!0,Ql(C,!1),c.lanes=4194304)}else{if(!g)if(a=dd(T),a!==null){if(c.flags|=128,g=!0,f=a.updateQueue,f!==null&&(c.updateQueue=f,c.flags|=4),Ql(C,!0),C.tail===null&&C.tailMode==="hidden"&&!T.alternate&&!St)return wn(c),null}else 2*Ot()-C.renderingStartTime>Ia&&f!==1073741824&&(c.flags|=128,g=!0,Ql(C,!1),c.lanes=4194304);C.isBackwards?(T.sibling=c.child,c.child=T):(f=C.last,f!==null?f.sibling=T:c.child=T,C.last=T)}return C.tail!==null?(c=C.tail,C.rendering=c,C.tail=c.sibling,C.renderingStartTime=Ot(),c.sibling=null,f=_t.current,gt(_t,g?f&1|2:f&1),c):(wn(c),null);case 22:case 23:return sm(),g=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(c.flags|=8192),g&&(c.mode&1)!==0?(rr&1073741824)!==0&&(wn(c),c.subtreeFlags&6&&(c.flags|=8192)):wn(c),null;case 24:return null;case 25:return null}throw Error(n(156,c.tag))}function eN(a,c){switch(m0(c),c.tag){case 1:return Hn(c.type)&&ed(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return Na(),bt(Vn),bt(bn),A0(),a=c.flags,(a&65536)!==0&&(a&128)===0?(c.flags=a&-65537|128,c):null;case 5:return _0(c),null;case 13:if(bt(_t),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(n(340));_a()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return bt(_t),null;case 4:return Na(),null;case 10:return k0(c.type._context),null;case 22:case 23:return sm(),null;case 24:return null;default:return null}}var bd=!1,Cn=!1,tN=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Ra(a,c){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){Mt(a,c,g)}else f.current=null}function G0(a,c,f){try{f()}catch(g){Mt(a,c,g)}}var s2=!1;function nN(a,c){if(s0=$c,a=Fv(),Xp(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var k=g.anchorOffset,C=g.focusNode;g=g.focusOffset;try{f.nodeType,C.nodeType}catch{f=null;break e}var T=0,R=-1,j=-1,H=0,ie=0,se=a,oe=null;t:for(;;){for(var me;se!==f||k!==0&&se.nodeType!==3||(R=T+k),se!==C||g!==0&&se.nodeType!==3||(j=T+g),se.nodeType===3&&(T+=se.nodeValue.length),(me=se.firstChild)!==null;)oe=se,se=me;for(;;){if(se===a)break t;if(oe===f&&++H===k&&(R=T),oe===C&&++ie===g&&(j=T),(me=se.nextSibling)!==null)break;se=oe,oe=se.parentNode}se=me}f=R===-1||j===-1?null:{start:R,end:j}}else f=null}f=f||{start:0,end:0}}else f=null;for(a0={focusedElem:a,selectionRange:f},$c=!1,ve=c;ve!==null;)if(c=ve,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,ve=a;else for(;ve!==null;){c=ve;try{var ke=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var we=ke.memoizedProps,It=ke.memoizedState,$=c.stateNode,z=$.getSnapshotBeforeUpdate(c.elementType===c.type?we:Ir(c.type,we),It);$.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var V=c.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){Mt(c,c.return,de)}if(a=c.sibling,a!==null){a.return=c.return,ve=a;break}ve=c.return}return ke=s2,s2=!1,ke}function eu(a,c,f){var g=c.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var k=g=g.next;do{if((k.tag&a)===a){var C=k.destroy;k.destroy=void 0,C!==void 0&&G0(c,f,C)}k=k.next}while(k!==g)}}function kd(a,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&a)===a){var g=f.create;f.destroy=g()}f=f.next}while(f!==c)}}function Z0(a){var c=a.ref;if(c!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof c=="function"?c(a):c.current=a}}function a2(a){var c=a.alternate;c!==null&&(a.alternate=null,a2(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[Yr],delete c[Hl],delete c[d0],delete c[FM],delete c[zM])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function l2(a){return a.tag===5||a.tag===3||a.tag===4}function u2(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||l2(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function J0(a,c,f){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?f.nodeType===8?f.parentNode.insertBefore(a,c):f.insertBefore(a,c):(f.nodeType===8?(c=f.parentNode,c.insertBefore(a,f)):(c=f,c.appendChild(a)),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=Xc));else if(g!==4&&(a=a.child,a!==null))for(J0(a,c,f),a=a.sibling;a!==null;)J0(a,c,f),a=a.sibling}function Y0(a,c,f){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?f.insertBefore(a,c):f.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(Y0(a,c,f),a=a.sibling;a!==null;)Y0(a,c,f),a=a.sibling}var pn=null,Pr=!1;function wi(a,c,f){for(f=f.child;f!==null;)c2(a,c,f),f=f.sibling}function c2(a,c,f){if(Jr&&typeof Jr.onCommitFiberUnmount=="function")try{Jr.onCommitFiberUnmount(Ic,f)}catch{}switch(f.tag){case 5:Cn||Ra(f,c);case 6:var g=pn,k=Pr;pn=null,wi(a,c,f),pn=g,Pr=k,pn!==null&&(Pr?(a=pn,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):pn.removeChild(f.stateNode));break;case 18:pn!==null&&(Pr?(a=pn,f=f.stateNode,a.nodeType===8?c0(a.parentNode,f):a.nodeType===1&&c0(a,f),Rl(a)):c0(pn,f.stateNode));break;case 4:g=pn,k=Pr,pn=f.stateNode.containerInfo,Pr=!0,wi(a,c,f),pn=g,Pr=k;break;case 0:case 11:case 14:case 15:if(!Cn&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){k=g=g.next;do{var C=k,T=C.destroy;C=C.tag,T!==void 0&&((C&2)!==0||(C&4)!==0)&&G0(f,c,T),k=k.next}while(k!==g)}wi(a,c,f);break;case 1:if(!Cn&&(Ra(f,c),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(R){Mt(f,c,R)}wi(a,c,f);break;case 21:wi(a,c,f);break;case 22:f.mode&1?(Cn=(g=Cn)||f.memoizedState!==null,wi(a,c,f),Cn=g):wi(a,c,f);break;default:wi(a,c,f)}}function d2(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new tN),c.forEach(function(g){var k=dN.bind(null,a,g);f.has(g)||(f.add(g),g.then(k,k))})}}function jr(a,c){var f=c.deletions;if(f!==null)for(var g=0;g<f.length;g++){var k=f[g];try{var C=a,T=c,R=T;e:for(;R!==null;){switch(R.tag){case 5:pn=R.stateNode,Pr=!1;break e;case 3:pn=R.stateNode.containerInfo,Pr=!0;break e;case 4:pn=R.stateNode.containerInfo,Pr=!0;break e}R=R.return}if(pn===null)throw Error(n(160));c2(C,T,k),pn=null,Pr=!1;var j=k.alternate;j!==null&&(j.return=null),k.return=null}catch(H){Mt(k,c,H)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)f2(c,a),c=c.sibling}function f2(a,c){var f=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(jr(c,a),eo(a),g&4){try{eu(3,a,a.return),kd(3,a)}catch(we){Mt(a,a.return,we)}try{eu(5,a,a.return)}catch(we){Mt(a,a.return,we)}}break;case 1:jr(c,a),eo(a),g&512&&f!==null&&Ra(f,f.return);break;case 5:if(jr(c,a),eo(a),g&512&&f!==null&&Ra(f,f.return),a.flags&32){var k=a.stateNode;try{Mn(k,"")}catch(we){Mt(a,a.return,we)}}if(g&4&&(k=a.stateNode,k!=null)){var C=a.memoizedProps,T=f!==null?f.memoizedProps:C,R=a.type,j=a.updateQueue;if(a.updateQueue=null,j!==null)try{R==="input"&&C.type==="radio"&&C.name!=null&&Pt(k,C),ps(R,T);var H=ps(R,C);for(T=0;T<j.length;T+=2){var ie=j[T],se=j[T+1];ie==="style"?ha(k,se):ie==="dangerouslySetInnerHTML"?hr(k,se):ie==="children"?Mn(k,se):A(k,ie,se,H)}switch(R){case"input":Ht(k,C);break;case"textarea":hs(k,C);break;case"select":var oe=k._wrapperState.wasMultiple;k._wrapperState.wasMultiple=!!C.multiple;var me=C.value;me!=null?An(k,!!C.multiple,me,!1):oe!==!!C.multiple&&(C.defaultValue!=null?An(k,!!C.multiple,C.defaultValue,!0):An(k,!!C.multiple,C.multiple?[]:"",!1))}k[Hl]=C}catch(we){Mt(a,a.return,we)}}break;case 6:if(jr(c,a),eo(a),g&4){if(a.stateNode===null)throw Error(n(162));k=a.stateNode,C=a.memoizedProps;try{k.nodeValue=C}catch(we){Mt(a,a.return,we)}}break;case 3:if(jr(c,a),eo(a),g&4&&f!==null&&f.memoizedState.isDehydrated)try{Rl(c.containerInfo)}catch(we){Mt(a,a.return,we)}break;case 4:jr(c,a),eo(a);break;case 13:jr(c,a),eo(a),k=a.child,k.flags&8192&&(C=k.memoizedState!==null,k.stateNode.isHidden=C,!C||k.alternate!==null&&k.alternate.memoizedState!==null||(em=Ot())),g&4&&d2(a);break;case 22:if(ie=f!==null&&f.memoizedState!==null,a.mode&1?(Cn=(H=Cn)||ie,jr(c,a),Cn=H):jr(c,a),eo(a),g&8192){if(H=a.memoizedState!==null,(a.stateNode.isHidden=H)&&!ie&&(a.mode&1)!==0)for(ve=a,ie=a.child;ie!==null;){for(se=ve=ie;ve!==null;){switch(oe=ve,me=oe.child,oe.tag){case 0:case 11:case 14:case 15:eu(4,oe,oe.return);break;case 1:Ra(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){g=oe,f=oe.return;try{c=g,ke.props=c.memoizedProps,ke.state=c.memoizedState,ke.componentWillUnmount()}catch(we){Mt(g,f,we)}}break;case 5:Ra(oe,oe.return);break;case 22:if(oe.memoizedState!==null){m2(se);continue}}me!==null?(me.return=oe,ve=me):m2(se)}ie=ie.sibling}e:for(ie=null,se=a;;){if(se.tag===5){if(ie===null){ie=se;try{k=se.stateNode,H?(C=k.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none"):(R=se.stateNode,j=se.memoizedProps.style,T=j!=null&&j.hasOwnProperty("display")?j.display:null,R.style.display=fa("display",T))}catch(we){Mt(a,a.return,we)}}}else if(se.tag===6){if(ie===null)try{se.stateNode.nodeValue=H?"":se.memoizedProps}catch(we){Mt(a,a.return,we)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===a)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===a)break e;for(;se.sibling===null;){if(se.return===null||se.return===a)break e;ie===se&&(ie=null),se=se.return}ie===se&&(ie=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:jr(c,a),eo(a),g&4&&d2(a);break;case 21:break;default:jr(c,a),eo(a)}}function eo(a){var c=a.flags;if(c&2){try{e:{for(var f=a.return;f!==null;){if(l2(f)){var g=f;break e}f=f.return}throw Error(n(160))}switch(g.tag){case 5:var k=g.stateNode;g.flags&32&&(Mn(k,""),g.flags&=-33);var C=u2(a);Y0(a,C,k);break;case 3:case 4:var T=g.stateNode.containerInfo,R=u2(a);J0(a,R,T);break;default:throw Error(n(161))}}catch(j){Mt(a,a.return,j)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function rN(a,c,f){ve=a,h2(a)}function h2(a,c,f){for(var g=(a.mode&1)!==0;ve!==null;){var k=ve,C=k.child;if(k.tag===22&&g){var T=k.memoizedState!==null||bd;if(!T){var R=k.alternate,j=R!==null&&R.memoizedState!==null||Cn;R=bd;var H=Cn;if(bd=T,(Cn=j)&&!H)for(ve=k;ve!==null;)T=ve,j=T.child,T.tag===22&&T.memoizedState!==null?g2(k):j!==null?(j.return=T,ve=j):g2(k);for(;C!==null;)ve=C,h2(C),C=C.sibling;ve=k,bd=R,Cn=H}p2(a)}else(k.subtreeFlags&8772)!==0&&C!==null?(C.return=k,ve=C):p2(a)}}function p2(a){for(;ve!==null;){var c=ve;if((c.flags&8772)!==0){var f=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:Cn||kd(5,c);break;case 1:var g=c.stateNode;if(c.flags&4&&!Cn)if(f===null)g.componentDidMount();else{var k=c.elementType===c.type?f.memoizedProps:Ir(c.type,f.memoizedProps);g.componentDidUpdate(k,f.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var C=c.updateQueue;C!==null&&mb(c,C,g);break;case 3:var T=c.updateQueue;if(T!==null){if(f=null,c.child!==null)switch(c.child.tag){case 5:f=c.child.stateNode;break;case 1:f=c.child.stateNode}mb(c,T,f)}break;case 5:var R=c.stateNode;if(f===null&&c.flags&4){f=R;var j=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&f.focus();break;case"img":j.src&&(f.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var H=c.alternate;if(H!==null){var ie=H.memoizedState;if(ie!==null){var se=ie.dehydrated;se!==null&&Rl(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Cn||c.flags&512&&Z0(c)}catch(oe){Mt(c,c.return,oe)}}if(c===a){ve=null;break}if(f=c.sibling,f!==null){f.return=c.return,ve=f;break}ve=c.return}}function m2(a){for(;ve!==null;){var c=ve;if(c===a){ve=null;break}var f=c.sibling;if(f!==null){f.return=c.return,ve=f;break}ve=c.return}}function g2(a){for(;ve!==null;){var c=ve;try{switch(c.tag){case 0:case 11:case 15:var f=c.return;try{kd(4,c)}catch(j){Mt(c,f,j)}break;case 1:var g=c.stateNode;if(typeof g.componentDidMount=="function"){var k=c.return;try{g.componentDidMount()}catch(j){Mt(c,k,j)}}var C=c.return;try{Z0(c)}catch(j){Mt(c,C,j)}break;case 5:var T=c.return;try{Z0(c)}catch(j){Mt(c,T,j)}}}catch(j){Mt(c,c.return,j)}if(c===a){ve=null;break}var R=c.sibling;if(R!==null){R.return=c.return,ve=R;break}ve=c.return}}var oN=Math.ceil,wd=M.ReactCurrentDispatcher,X0=M.ReactCurrentOwner,xr=M.ReactCurrentBatchConfig,Ye=0,nn=null,jt=null,mn=0,rr=0,Oa=yi(0),Gt=0,tu=null,Ss=0,Cd=0,Q0=0,nu=null,Wn=null,em=0,Ia=1/0,jo=null,Sd=!1,tm=null,Ci=null,Ed=!1,Si=null,_d=0,ru=0,nm=null,Td=-1,Ad=0;function Dn(){return(Ye&6)!==0?Ot():Td!==-1?Td:Td=Ot()}function Ei(a){return(a.mode&1)===0?1:(Ye&2)!==0&&mn!==0?mn&-mn:BM.transition!==null?(Ad===0&&(Ad=uv()),Ad):(a=ut,a!==0||(a=window.event,a=a===void 0?16:xv(a.type)),a)}function Lr(a,c,f,g){if(50<ru)throw ru=0,nm=null,Error(n(185));Tl(a,f,g),((Ye&2)===0||a!==nn)&&(a===nn&&((Ye&2)===0&&(Cd|=f),Gt===4&&_i(a,mn)),qn(a,g),f===1&&Ye===0&&(c.mode&1)===0&&(Ia=Ot()+500,nd&&vi()))}function qn(a,c){var f=a.callbackNode;BA(a,c);var g=Lc(a,a===nn?mn:0);if(g===0)f!==null&&sv(f),a.callbackNode=null,a.callbackPriority=0;else if(c=g&-g,a.callbackPriority!==c){if(f!=null&&sv(f),c===1)a.tag===0?$M(x2.bind(null,a)):rb(x2.bind(null,a)),jM(function(){(Ye&6)===0&&vi()}),f=null;else{switch(cv(g)){case 1:f=Pp;break;case 4:f=av;break;case 16:f=Oc;break;case 536870912:f=lv;break;default:f=Oc}f=_2(f,y2.bind(null,a))}a.callbackPriority=c,a.callbackNode=f}}function y2(a,c){if(Td=-1,Ad=0,(Ye&6)!==0)throw Error(n(327));var f=a.callbackNode;if(Pa()&&a.callbackNode!==f)return null;var g=Lc(a,a===nn?mn:0);if(g===0)return null;if((g&30)!==0||(g&a.expiredLanes)!==0||c)c=Md(a,g);else{c=g;var k=Ye;Ye|=2;var C=b2();(nn!==a||mn!==c)&&(jo=null,Ia=Ot()+500,_s(a,c));do try{aN();break}catch(R){v2(a,R)}while(!0);b0(),wd.current=C,Ye=k,jt!==null?c=0:(nn=null,mn=0,c=Gt)}if(c!==0){if(c===2&&(k=jp(a),k!==0&&(g=k,c=rm(a,k))),c===1)throw f=tu,_s(a,0),_i(a,g),qn(a,Ot()),f;if(c===6)_i(a,g);else{if(k=a.current.alternate,(g&30)===0&&!iN(k)&&(c=Md(a,g),c===2&&(C=jp(a),C!==0&&(g=C,c=rm(a,C))),c===1))throw f=tu,_s(a,0),_i(a,g),qn(a,Ot()),f;switch(a.finishedWork=k,a.finishedLanes=g,c){case 0:case 1:throw Error(n(345));case 2:Ts(a,Wn,jo);break;case 3:if(_i(a,g),(g&130023424)===g&&(c=em+500-Ot(),10<c)){if(Lc(a,0)!==0)break;if(k=a.suspendedLanes,(k&g)!==g){Dn(),a.pingedLanes|=a.suspendedLanes&k;break}a.timeoutHandle=u0(Ts.bind(null,a,Wn,jo),c);break}Ts(a,Wn,jo);break;case 4:if(_i(a,g),(g&4194240)===g)break;for(c=a.eventTimes,k=-1;0<g;){var T=31-Dr(g);C=1<<T,T=c[T],T>k&&(k=T),g&=~C}if(g=k,g=Ot()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*oN(g/1960))-g,10<g){a.timeoutHandle=u0(Ts.bind(null,a,Wn,jo),g);break}Ts(a,Wn,jo);break;case 5:Ts(a,Wn,jo);break;default:throw Error(n(329))}}}return qn(a,Ot()),a.callbackNode===f?y2.bind(null,a):null}function rm(a,c){var f=nu;return a.current.memoizedState.isDehydrated&&(_s(a,c).flags|=256),a=Md(a,c),a!==2&&(c=Wn,Wn=f,c!==null&&om(c)),a}function om(a){Wn===null?Wn=a:Wn.push.apply(Wn,a)}function iN(a){for(var c=a;;){if(c.flags&16384){var f=c.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var g=0;g<f.length;g++){var k=f[g],C=k.getSnapshot;k=k.value;try{if(!Rr(C(),k))return!1}catch{return!1}}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function _i(a,c){for(c&=~Q0,c&=~Cd,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var f=31-Dr(c),g=1<<f;a[f]=-1,c&=~g}}function x2(a){if((Ye&6)!==0)throw Error(n(327));Pa();var c=Lc(a,0);if((c&1)===0)return qn(a,Ot()),null;var f=Md(a,c);if(a.tag!==0&&f===2){var g=jp(a);g!==0&&(c=g,f=rm(a,g))}if(f===1)throw f=tu,_s(a,0),_i(a,c),qn(a,Ot()),f;if(f===6)throw Error(n(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,Ts(a,Wn,jo),qn(a,Ot()),null}function im(a,c){var f=Ye;Ye|=1;try{return a(c)}finally{Ye=f,Ye===0&&(Ia=Ot()+500,nd&&vi())}}function Es(a){Si!==null&&Si.tag===0&&(Ye&6)===0&&Pa();var c=Ye;Ye|=1;var f=xr.transition,g=ut;try{if(xr.transition=null,ut=1,a)return a()}finally{ut=g,xr.transition=f,Ye=c,(Ye&6)===0&&vi()}}function sm(){rr=Oa.current,bt(Oa)}function _s(a,c){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,PM(f)),jt!==null)for(f=jt.return;f!==null;){var g=f;switch(m0(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&ed();break;case 3:Na(),bt(Vn),bt(bn),A0();break;case 5:_0(g);break;case 4:Na();break;case 13:bt(_t);break;case 19:bt(_t);break;case 10:k0(g.type._context);break;case 22:case 23:sm()}f=f.return}if(nn=a,jt=a=Ti(a.current,null),mn=rr=c,Gt=0,tu=null,Q0=Cd=Ss=0,Wn=nu=null,ks!==null){for(c=0;c<ks.length;c++)if(f=ks[c],g=f.interleaved,g!==null){f.interleaved=null;var k=g.next,C=f.pending;if(C!==null){var T=C.next;C.next=k,g.next=T}f.pending=g}ks=null}return a}function v2(a,c){do{var f=jt;try{if(b0(),fd.current=gd,hd){for(var g=Tt.memoizedState;g!==null;){var k=g.queue;k!==null&&(k.pending=null),g=g.next}hd=!1}if(Cs=0,tn=Kt=Tt=null,Zl=!1,Jl=0,X0.current=null,f===null||f.return===null){Gt=1,tu=c,jt=null;break}e:{var C=a,T=f.return,R=f,j=c;if(c=mn,R.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=j,ie=R,se=ie.tag;if((ie.mode&1)===0&&(se===0||se===11||se===15)){var oe=ie.alternate;oe?(ie.updateQueue=oe.updateQueue,ie.memoizedState=oe.memoizedState,ie.lanes=oe.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var me=Ub(T);if(me!==null){me.flags&=-257,Wb(me,T,R,C,c),me.mode&1&&Hb(C,H,c),c=me,j=H;var ke=c.updateQueue;if(ke===null){var we=new Set;we.add(j),c.updateQueue=we}else ke.add(j);break e}else{if((c&1)===0){Hb(C,H,c),am();break e}j=Error(n(426))}}else if(St&&R.mode&1){var It=Ub(T);if(It!==null){(It.flags&65536)===0&&(It.flags|=256),Wb(It,T,R,C,c),x0(Da(j,R));break e}}C=j=Da(j,R),Gt!==4&&(Gt=2),nu===null?nu=[C]:nu.push(C),C=T;do{switch(C.tag){case 3:C.flags|=65536,c&=-c,C.lanes|=c;var $=Bb(C,j,c);pb(C,$);break e;case 1:R=j;var z=C.type,V=C.stateNode;if((C.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Ci===null||!Ci.has(V)))){C.flags|=65536,c&=-c,C.lanes|=c;var de=Vb(C,R,c);pb(C,de);break e}}C=C.return}while(C!==null)}w2(f)}catch(Se){c=Se,jt===f&&f!==null&&(jt=f=f.return);continue}break}while(!0)}function b2(){var a=wd.current;return wd.current=gd,a===null?gd:a}function am(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),nn===null||(Ss&268435455)===0&&(Cd&268435455)===0||_i(nn,mn)}function Md(a,c){var f=Ye;Ye|=2;var g=b2();(nn!==a||mn!==c)&&(jo=null,_s(a,c));do try{sN();break}catch(k){v2(a,k)}while(!0);if(b0(),Ye=f,wd.current=g,jt!==null)throw Error(n(261));return nn=null,mn=0,Gt}function sN(){for(;jt!==null;)k2(jt)}function aN(){for(;jt!==null&&!RA();)k2(jt)}function k2(a){var c=E2(a.alternate,a,rr);a.memoizedProps=a.pendingProps,c===null?w2(a):jt=c,X0.current=null}function w2(a){var c=a;do{var f=c.alternate;if(a=c.return,(c.flags&32768)===0){if(f=QM(f,c,rr),f!==null){jt=f;return}}else{if(f=eN(f,c),f!==null){f.flags&=32767,jt=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Gt=6,jt=null;return}}if(c=c.sibling,c!==null){jt=c;return}jt=c=a}while(c!==null);Gt===0&&(Gt=5)}function Ts(a,c,f){var g=ut,k=xr.transition;try{xr.transition=null,ut=1,lN(a,c,f,g)}finally{xr.transition=k,ut=g}return null}function lN(a,c,f,g){do Pa();while(Si!==null);if((Ye&6)!==0)throw Error(n(327));f=a.finishedWork;var k=a.finishedLanes;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(n(177));a.callbackNode=null,a.callbackPriority=0;var C=f.lanes|f.childLanes;if(VA(a,C),a===nn&&(jt=nn=null,mn=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||Ed||(Ed=!0,_2(Oc,function(){return Pa(),null})),C=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||C){C=xr.transition,xr.transition=null;var T=ut;ut=1;var R=Ye;Ye|=4,X0.current=null,nN(a,f),f2(f,a),AM(a0),$c=!!s0,a0=s0=null,a.current=f,rN(f),OA(),Ye=R,ut=T,xr.transition=C}else a.current=f;if(Ed&&(Ed=!1,Si=a,_d=k),C=a.pendingLanes,C===0&&(Ci=null),jA(f.stateNode),qn(a,Ot()),c!==null)for(g=a.onRecoverableError,f=0;f<c.length;f++)k=c[f],g(k.value,{componentStack:k.stack,digest:k.digest});if(Sd)throw Sd=!1,a=tm,tm=null,a;return(_d&1)!==0&&a.tag!==0&&Pa(),C=a.pendingLanes,(C&1)!==0?a===nm?ru++:(ru=0,nm=a):ru=0,vi(),null}function Pa(){if(Si!==null){var a=cv(_d),c=xr.transition,f=ut;try{if(xr.transition=null,ut=16>a?16:a,Si===null)var g=!1;else{if(a=Si,Si=null,_d=0,(Ye&6)!==0)throw Error(n(331));var k=Ye;for(Ye|=4,ve=a.current;ve!==null;){var C=ve,T=C.child;if((ve.flags&16)!==0){var R=C.deletions;if(R!==null){for(var j=0;j<R.length;j++){var H=R[j];for(ve=H;ve!==null;){var ie=ve;switch(ie.tag){case 0:case 11:case 15:eu(8,ie,C)}var se=ie.child;if(se!==null)se.return=ie,ve=se;else for(;ve!==null;){ie=ve;var oe=ie.sibling,me=ie.return;if(a2(ie),ie===H){ve=null;break}if(oe!==null){oe.return=me,ve=oe;break}ve=me}}}var ke=C.alternate;if(ke!==null){var we=ke.child;if(we!==null){ke.child=null;do{var It=we.sibling;we.sibling=null,we=It}while(we!==null)}}ve=C}}if((C.subtreeFlags&2064)!==0&&T!==null)T.return=C,ve=T;else e:for(;ve!==null;){if(C=ve,(C.flags&2048)!==0)switch(C.tag){case 0:case 11:case 15:eu(9,C,C.return)}var $=C.sibling;if($!==null){$.return=C.return,ve=$;break e}ve=C.return}}var z=a.current;for(ve=z;ve!==null;){T=ve;var V=T.child;if((T.subtreeFlags&2064)!==0&&V!==null)V.return=T,ve=V;else e:for(T=z;ve!==null;){if(R=ve,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:kd(9,R)}}catch(Se){Mt(R,R.return,Se)}if(R===T){ve=null;break e}var de=R.sibling;if(de!==null){de.return=R.return,ve=de;break e}ve=R.return}}if(Ye=k,vi(),Jr&&typeof Jr.onPostCommitFiberRoot=="function")try{Jr.onPostCommitFiberRoot(Ic,a)}catch{}g=!0}return g}finally{ut=f,xr.transition=c}}return!1}function C2(a,c,f){c=Da(f,c),c=Bb(a,c,1),a=ki(a,c,1),c=Dn(),a!==null&&(Tl(a,1,c),qn(a,c))}function Mt(a,c,f){if(a.tag===3)C2(a,a,f);else for(;c!==null;){if(c.tag===3){C2(c,a,f);break}else if(c.tag===1){var g=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Ci===null||!Ci.has(g))){a=Da(f,a),a=Vb(c,a,1),c=ki(c,a,1),a=Dn(),c!==null&&(Tl(c,1,a),qn(c,a));break}}c=c.return}}function uN(a,c,f){var g=a.pingCache;g!==null&&g.delete(c),c=Dn(),a.pingedLanes|=a.suspendedLanes&f,nn===a&&(mn&f)===f&&(Gt===4||Gt===3&&(mn&130023424)===mn&&500>Ot()-em?_s(a,0):Q0|=f),qn(a,c)}function S2(a,c){c===0&&((a.mode&1)===0?c=1:(c=jc,jc<<=1,(jc&130023424)===0&&(jc=4194304)));var f=Dn();a=Oo(a,c),a!==null&&(Tl(a,c,f),qn(a,f))}function cN(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),S2(a,f)}function dN(a,c){var f=0;switch(a.tag){case 13:var g=a.stateNode,k=a.memoizedState;k!==null&&(f=k.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(c),S2(a,f)}var E2;E2=function(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps||Vn.current)Un=!0;else{if((a.lanes&f)===0&&(c.flags&128)===0)return Un=!1,XM(a,c,f);Un=(a.flags&131072)!==0}else Un=!1,St&&(c.flags&1048576)!==0&&ob(c,od,c.index);switch(c.lanes=0,c.tag){case 2:var g=c.type;vd(a,c),a=c.pendingProps;var k=Ca(c,bn.current);Ma(c,f),k=D0(null,c,g,a,k,f);var C=R0();return c.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Hn(g)?(C=!0,td(c)):C=!1,c.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,S0(c),k.updater=yd,c.stateNode=k,k._reactInternals=c,F0(c,g,a,f),c=V0(null,c,g,!0,C,f)):(c.tag=0,St&&C&&p0(c),Nn(null,c,k,f),c=c.child),c;case 16:g=c.elementType;e:{switch(vd(a,c),a=c.pendingProps,k=g._init,g=k(g._payload),c.type=g,k=c.tag=hN(g),a=Ir(g,a),k){case 0:c=B0(null,c,g,a,f);break e;case 1:c=Yb(null,c,g,a,f);break e;case 11:c=qb(null,c,g,a,f);break e;case 14:c=Kb(null,c,g,Ir(g.type,a),f);break e}throw Error(n(306,g,""))}return c;case 0:return g=c.type,k=c.pendingProps,k=c.elementType===g?k:Ir(g,k),B0(a,c,g,k,f);case 1:return g=c.type,k=c.pendingProps,k=c.elementType===g?k:Ir(g,k),Yb(a,c,g,k,f);case 3:e:{if(Xb(c),a===null)throw Error(n(387));g=c.pendingProps,C=c.memoizedState,k=C.element,hb(a,c),cd(c,g,null,f);var T=c.memoizedState;if(g=T.element,C.isDehydrated)if(C={element:g,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},c.updateQueue.baseState=C,c.memoizedState=C,c.flags&256){k=Da(Error(n(423)),c),c=Qb(a,c,g,f,k);break e}else if(g!==k){k=Da(Error(n(424)),c),c=Qb(a,c,g,f,k);break e}else for(nr=gi(c.stateNode.containerInfo.firstChild),tr=c,St=!0,Or=null,f=db(c,null,g,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(_a(),g===k){c=Po(a,c,f);break e}Nn(a,c,g,f)}c=c.child}return c;case 5:return gb(c),a===null&&y0(c),g=c.type,k=c.pendingProps,C=a!==null?a.memoizedProps:null,T=k.children,l0(g,k)?T=null:C!==null&&l0(g,C)&&(c.flags|=32),Jb(a,c),Nn(a,c,T,f),c.child;case 6:return a===null&&y0(c),null;case 13:return e2(a,c,f);case 4:return E0(c,c.stateNode.containerInfo),g=c.pendingProps,a===null?c.child=Ta(c,null,g,f):Nn(a,c,g,f),c.child;case 11:return g=c.type,k=c.pendingProps,k=c.elementType===g?k:Ir(g,k),qb(a,c,g,k,f);case 7:return Nn(a,c,c.pendingProps,f),c.child;case 8:return Nn(a,c,c.pendingProps.children,f),c.child;case 12:return Nn(a,c,c.pendingProps.children,f),c.child;case 10:e:{if(g=c.type._context,k=c.pendingProps,C=c.memoizedProps,T=k.value,gt(ad,g._currentValue),g._currentValue=T,C!==null)if(Rr(C.value,T)){if(C.children===k.children&&!Vn.current){c=Po(a,c,f);break e}}else for(C=c.child,C!==null&&(C.return=c);C!==null;){var R=C.dependencies;if(R!==null){T=C.child;for(var j=R.firstContext;j!==null;){if(j.context===g){if(C.tag===1){j=Io(-1,f&-f),j.tag=2;var H=C.updateQueue;if(H!==null){H=H.shared;var ie=H.pending;ie===null?j.next=j:(j.next=ie.next,ie.next=j),H.pending=j}}C.lanes|=f,j=C.alternate,j!==null&&(j.lanes|=f),w0(C.return,f,c),R.lanes|=f;break}j=j.next}}else if(C.tag===10)T=C.type===c.type?null:C.child;else if(C.tag===18){if(T=C.return,T===null)throw Error(n(341));T.lanes|=f,R=T.alternate,R!==null&&(R.lanes|=f),w0(T,f,c),T=C.sibling}else T=C.child;if(T!==null)T.return=C;else for(T=C;T!==null;){if(T===c){T=null;break}if(C=T.sibling,C!==null){C.return=T.return,T=C;break}T=T.return}C=T}Nn(a,c,k.children,f),c=c.child}return c;case 9:return k=c.type,g=c.pendingProps.children,Ma(c,f),k=gr(k),g=g(k),c.flags|=1,Nn(a,c,g,f),c.child;case 14:return g=c.type,k=Ir(g,c.pendingProps),k=Ir(g.type,k),Kb(a,c,g,k,f);case 15:return Gb(a,c,c.type,c.pendingProps,f);case 17:return g=c.type,k=c.pendingProps,k=c.elementType===g?k:Ir(g,k),vd(a,c),c.tag=1,Hn(g)?(a=!0,td(c)):a=!1,Ma(c,f),zb(c,g,k),F0(c,g,k,f),V0(null,c,g,!0,a,f);case 19:return n2(a,c,f);case 22:return Zb(a,c,f)}throw Error(n(156,c.tag))};function _2(a,c){return iv(a,c)}function fN(a,c,f,g){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vr(a,c,f,g){return new fN(a,c,f,g)}function lm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function hN(a){if(typeof a=="function")return lm(a)?1:0;if(a!=null){if(a=a.$$typeof,a===G)return 11;if(a===Q)return 14}return 2}function Ti(a,c){var f=a.alternate;return f===null?(f=vr(a.tag,c,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=c,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,c=a.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function Nd(a,c,f,g,k,C){var T=2;if(g=a,typeof a=="function")lm(a)&&(T=1);else if(typeof a=="string")T=5;else e:switch(a){case O:return As(f.children,k,C,c);case I:T=8,k|=8;break;case L:return a=vr(12,f,c,k|2),a.elementType=L,a.lanes=C,a;case q:return a=vr(13,f,c,k),a.elementType=q,a.lanes=C,a;case Z:return a=vr(19,f,c,k),a.elementType=Z,a.lanes=C,a;case J:return Dd(f,k,C,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case W:T=10;break e;case Y:T=9;break e;case G:T=11;break e;case Q:T=14;break e;case K:T=16,g=null;break e}throw Error(n(130,a==null?a:typeof a,""))}return c=vr(T,f,c,k),c.elementType=a,c.type=g,c.lanes=C,c}function As(a,c,f,g){return a=vr(7,a,g,c),a.lanes=f,a}function Dd(a,c,f,g){return a=vr(22,a,g,c),a.elementType=J,a.lanes=f,a.stateNode={isHidden:!1},a}function um(a,c,f){return a=vr(6,a,null,c),a.lanes=f,a}function cm(a,c,f){return c=vr(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function pN(a,c,f,g,k){this.tag=c,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lp(0),this.expirationTimes=Lp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lp(0),this.identifierPrefix=g,this.onRecoverableError=k,this.mutableSourceEagerHydrationData=null}function dm(a,c,f,g,k,C,T,R,j){return a=new pN(a,c,f,R,j),c===1?(c=1,C===!0&&(c|=8)):c=0,C=vr(3,null,null,c),a.current=C,C.stateNode=a,C.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},S0(C),a}function mN(a,c,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:g==null?null:""+g,children:a,containerInfo:c,implementation:f}}function T2(a){if(!a)return xi;a=a._reactInternals;e:{if(gs(a)!==a||a.tag!==1)throw Error(n(170));var c=a;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Hn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(n(171))}if(a.tag===1){var f=a.type;if(Hn(f))return tb(a,f,c)}return c}function A2(a,c,f,g,k,C,T,R,j){return a=dm(f,g,!0,a,k,C,T,R,j),a.context=T2(null),f=a.current,g=Dn(),k=Ei(f),C=Io(g,k),C.callback=c??null,ki(f,C,k),a.current.lanes=k,Tl(a,k,g),qn(a,g),a}function Rd(a,c,f,g){var k=c.current,C=Dn(),T=Ei(k);return f=T2(f),c.context===null?c.context=f:c.pendingContext=f,c=Io(C,T),c.payload={element:a},g=g===void 0?null:g,g!==null&&(c.callback=g),a=ki(k,c,T),a!==null&&(Lr(a,k,T,C),ud(a,k,T)),T}function Od(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function M2(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function fm(a,c){M2(a,c),(a=a.alternate)&&M2(a,c)}function gN(){return null}var N2=typeof reportError=="function"?reportError:function(a){console.error(a)};function hm(a){this._internalRoot=a}Id.prototype.render=hm.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(n(409));Rd(a,c,null,null)},Id.prototype.unmount=hm.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;Es(function(){Rd(null,a,null,null)}),c[Mo]=null}};function Id(a){this._internalRoot=a}Id.prototype.unstable_scheduleHydration=function(a){if(a){var c=hv();a={blockedOn:null,target:a,priority:c};for(var f=0;f<hi.length&&c!==0&&c<hi[f].priority;f++);hi.splice(f,0,a),f===0&&gv(a)}};function pm(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Pd(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function D2(){}function yN(a,c,f,g,k){if(k){if(typeof g=="function"){var C=g;g=function(){var H=Od(T);C.call(H)}}var T=A2(c,g,a,0,null,!1,!1,"",D2);return a._reactRootContainer=T,a[Mo]=T.current,Bl(a.nodeType===8?a.parentNode:a),Es(),T}for(;k=a.lastChild;)a.removeChild(k);if(typeof g=="function"){var R=g;g=function(){var H=Od(j);R.call(H)}}var j=dm(a,0,!1,null,null,!1,!1,"",D2);return a._reactRootContainer=j,a[Mo]=j.current,Bl(a.nodeType===8?a.parentNode:a),Es(function(){Rd(c,j,f,g)}),j}function jd(a,c,f,g,k){var C=f._reactRootContainer;if(C){var T=C;if(typeof k=="function"){var R=k;k=function(){var j=Od(T);R.call(j)}}Rd(c,T,a,k)}else T=yN(f,c,a,k,g);return Od(T)}dv=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var f=_l(c.pendingLanes);f!==0&&(Fp(c,f|1),qn(c,Ot()),(Ye&6)===0&&(Ia=Ot()+500,vi()))}break;case 13:Es(function(){var g=Oo(a,1);if(g!==null){var k=Dn();Lr(g,a,1,k)}}),fm(a,1)}},zp=function(a){if(a.tag===13){var c=Oo(a,134217728);if(c!==null){var f=Dn();Lr(c,a,134217728,f)}fm(a,134217728)}},fv=function(a){if(a.tag===13){var c=Ei(a),f=Oo(a,c);if(f!==null){var g=Dn();Lr(f,a,c,g)}fm(a,c)}},hv=function(){return ut},pv=function(a,c){var f=ut;try{return ut=a,c()}finally{ut=f}},ms=function(a,c,f){switch(c){case"input":if(Ht(a,f),c=f.name,f.type==="radio"&&c!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<f.length;c++){var g=f[c];if(g!==a&&g.form===a.form){var k=Qc(g);if(!k)throw Error(n(90));Me(g),Ht(g,k)}}}break;case"textarea":hs(a,f);break;case"select":c=f.value,c!=null&&An(a,!!f.multiple,c,!1)}},et=im,st=Es;var xN={usingClientEntryPoint:!1,Events:[Ul,ka,Qc,_e,it,im]},ou={findFiberByHostInstance:ys,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vN={bundleType:ou.bundleType,version:ou.version,rendererPackageName:ou.rendererPackageName,rendererConfig:ou.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=rv(a),a===null?null:a.stateNode},findFiberByHostInstance:ou.findFiberByHostInstance||gN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ld.isDisabled&&Ld.supportsFiber)try{Ic=Ld.inject(vN),Jr=Ld}catch{}}return Kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xN,Kn.createPortal=function(a,c){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pm(c))throw Error(n(200));return mN(a,c,null,f)},Kn.createRoot=function(a,c){if(!pm(a))throw Error(n(299));var f=!1,g="",k=N2;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(g=c.identifierPrefix),c.onRecoverableError!==void 0&&(k=c.onRecoverableError)),c=dm(a,1,!1,null,null,f,!1,g,k),a[Mo]=c.current,Bl(a.nodeType===8?a.parentNode:a),new hm(c)},Kn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=rv(c),a=a===null?null:a.stateNode,a},Kn.flushSync=function(a){return Es(a)},Kn.hydrate=function(a,c,f){if(!Pd(c))throw Error(n(200));return jd(null,a,c,!0,f)},Kn.hydrateRoot=function(a,c,f){if(!pm(a))throw Error(n(405));var g=f!=null&&f.hydratedSources||null,k=!1,C="",T=N2;if(f!=null&&(f.unstable_strictMode===!0&&(k=!0),f.identifierPrefix!==void 0&&(C=f.identifierPrefix),f.onRecoverableError!==void 0&&(T=f.onRecoverableError)),c=A2(c,null,a,1,f??null,k,!1,C,T),a[Mo]=c.current,Bl(a),g)for(a=0;a<g.length;a++)f=g[a],k=f._getVersion,k=k(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,k]:c.mutableSourceEagerHydrationData.push(f,k);return new Id(c)},Kn.render=function(a,c,f){if(!Pd(c))throw Error(n(200));return jd(null,a,c,!1,f)},Kn.unmountComponentAtNode=function(a){if(!Pd(a))throw Error(n(40));return a._reactRootContainer?(Es(function(){jd(null,null,a,!1,function(){a._reactRootContainer=null,a[Mo]=null})}),!0):!1},Kn.unstable_batchedUpdates=im,Kn.unstable_renderSubtreeIntoContainer=function(a,c,f,g){if(!Pd(f))throw Error(n(200));if(a==null||a._reactInternals===void 0)throw Error(n(38));return jd(a,c,f,!1,g)},Kn.version="18.3.1-next-f1338f8080-20240426",Kn}var V2;function yS(){if(V2)return xm.exports;V2=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),xm.exports=TN(),xm.exports}var H2;function AN(){if(H2)return Fd;H2=1;var t=yS();return Fd.createRoot=t.createRoot,Fd.hydrateRoot=t.hydrateRoot,Fd}var MN=AN();function xS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=xS(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function vS(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=xS(t))&&(r&&(r+=" "),r+=e);return r}const U2=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,W2=vS,bS=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return W2(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(d=>{const h=n==null?void 0:n[d],p=i==null?void 0:i[d];if(h===null)return null;const m=U2(h)||U2(p);return o[d][m]}),l=n&&Object.entries(n).reduce((d,h)=>{let[p,m]=h;return m===void 0||(d[p]=m),d},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:p,className:m,...y}=h;return Object.entries(y).every(x=>{let[b,w]=x;return Array.isArray(w)?w.includes({...i,...l}[b]):{...i,...l}[b]===w})?[...d,p,m]:d},[]);return W2(t,s,u,n==null?void 0:n.class,n==null?void 0:n.className)};var $r=yS();const kS=X1($r);var NN=Object.defineProperty,Q1=(t,e)=>NN(t,"name",{value:e,configurable:!0});function Ig(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Q1(Ig,"setRef");function wS(...t){return e=>{let n=!1;const r=t.map(o=>{const i=Ig(o,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ig(t[o],null)}}}}Q1(wS,"composeRefs");function rt(...t){return S.useCallback(wS(...t),t)}Q1(rt,"useComposedRefs");var DN=Object.defineProperty,Wr=(t,e)=>DN(t,"name",{value:e,configurable:!0});function yo(t){const e=S.forwardRef((n,r)=>{let{children:o,...i}=n,s=null,l=!1;const u=[];Pg(o)&&typeof zd=="function"&&(o=zd(o._payload)),S.Children.forEach(o,m=>{var y;if(AS(m)){l=!0;const x=m;let b="child"in x.props?x.props.child:x.props.children;Pg(b)&&typeof zd=="function"&&(b=zd(b._payload)),s=RN(x,b),u.push((y=s==null?void 0:s.props)==null?void 0:y.children)}else u.push(m)}),s?s=S.cloneElement(s,void 0,u):!l&&S.Children.count(o)===1&&S.isValidElement(o)&&(s=o);const d=s?TS(s):void 0,h=rt(r,d);if(!s){if(o||o===0)throw new Error(l?PN(t):IN(t));return o}const p=_S(i,s.props??{});return s.type!==S.Fragment&&(p.ref=r?h:d),S.cloneElement(s,p)});return e.displayName=`${t}.Slot`,e}Wr(yo,"createSlot");var CS=yo("Slot"),SS=Symbol.for("radix.slottable");function ES(t){const e=Wr(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=SS,e}Wr(ES,"createSlottable");var RN=Wr((t,e)=>{if("child"in t.props){const n=t.props.child;return S.isValidElement(n)?S.cloneElement(n,void 0,t.props.children(n.props.children)):null}return S.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function _S(t,e){const n={...e};for(const r in e){const o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const u=i(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}Wr(_S,"mergeProps");function TS(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Wr(TS,"getElementRef");function AS(t){return S.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===SS}Wr(AS,"isSlottable");var ON=Symbol.for("react.lazy");function Pg(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===ON&&"_payload"in t&&MS(t._payload)}Wr(Pg,"isLazyComponent");function MS(t){return typeof t=="object"&&t!==null&&"then"in t}Wr(MS,"isPromiseLike");var IN=Wr(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),PN=Wr(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),zd=ml[" use ".trim().toString()],jN=Object.defineProperty,LN=(t,e)=>jN(t,"name",{value:e,configurable:!0}),FN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ot=FN.reduce((t,e)=>{const n=yo(`Primitive.${e}`),r=S.forwardRef((o,i)=>{const{asChild:s,...l}=o,u=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...l,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function ey(t,e){t&&$r.flushSync(()=>t.dispatchEvent(e))}LN(ey,"dispatchDiscreteCustomEvent");var zN=Object.defineProperty,$N=(t,e)=>zN(t,"name",{value:e,configurable:!0}),NS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),BN=S.forwardRef($N(function(e,n){return v.jsx(ot.span,{...e,ref:n,style:{...NS,...e.style}})},"VisuallyHidden")),VN=BN,HN=Object.defineProperty,Sr=(t,e)=>HN(t,"name",{value:e,configurable:!0});function UN(t,e){const n=S.createContext(e);n.displayName=t+"Context";const r=Sr(i=>{const{children:s,...l}=i,u=S.useMemo(()=>l,Object.values(l));return v.jsx(n.Provider,{value:u,children:s})},"Provider");r.displayName=t+"Provider";function o(i,s={}){const{optional:l=!1}=s,u=S.useContext(n);if(u)return u;if(e!==void 0)return e;if(!l)throw new Error(`\`${i}\` must be used within \`${t}\``)}return Sr(o,"useContext"),[r,o]}Sr(UN,"createContext");function ko(t,e=[]){let n=[];function r(i,s){const l=S.createContext(s);l.displayName=i+"Context";const u=n.length;n=[...n,s];const d=Sr(p=>{var E;const{scope:m,children:y,...x}=p,b=((E=m==null?void 0:m[t])==null?void 0:E[u])||l,w=S.useMemo(()=>x,Object.values(x));return v.jsx(b.Provider,{value:w,children:y})},"Provider");d.displayName=i+"Provider";function h(p,m,y={}){var E;const{optional:x=!1}=y,b=((E=m==null?void 0:m[t])==null?void 0:E[u])||l,w=S.useContext(b);if(w)return w;if(s!==void 0)return s;if(!x)throw new Error(`\`${p}\` must be used within \`${i}\``)}return Sr(h,"useContext"),[d,h]}Sr(r,"createContext");const o=Sr(()=>{const i=n.map(s=>S.createContext(s));return Sr(function(l){const u=(l==null?void 0:l[t])||i;return S.useMemo(()=>({[`__scope${t}`]:{...l,[t]:u}}),[l,u])},"useScope")},"createScope");return o.scopeName=t,[r,DS(o,...e)]}Sr(ko,"createContextScope");function DS(...t){const e=t[0];if(t.length===1)return e;const n=Sr(()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return Sr(function(i){const s=r.reduce((l,{useScope:u,scopeName:d})=>{const p=u(i)[`__scope${d}`];return{...l,...p}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}Sr(DS,"composeContextScopes");var WN=Object.defineProperty,ln=(t,e)=>WN(t,"name",{value:e,configurable:!0});function $h(t){const e=t+"CollectionProvider",[n,r]=ko(e),[o,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=ln(b=>{const{scope:w,children:E}=b,_=S.useRef(null),A=S.useRef(new Map).current;return v.jsx(o,{scope:w,itemMap:A,collectionRef:_,children:E})},"CollectionProvider");s.displayName=e;const l=t+"CollectionSlot",u=yo(l),d=S.forwardRef((b,w)=>{const{scope:E,children:_}=b,A=i(l,E),M=rt(w,A.collectionRef);return v.jsx(u,{ref:M,children:_})});d.displayName=l;const h=t+"CollectionItemSlot",p="data-radix-collection-item",m=yo(h),y=S.forwardRef((b,w)=>{const{scope:E,children:_,...A}=b,M=S.useRef(null),N=rt(w,M),D=i(h,E);return S.useEffect(()=>(D.itemMap.set(M,{ref:M,...A}),()=>void D.itemMap.delete(M))),v.jsx(m,{[p]:"",ref:N,children:_})});y.displayName=h;function x(b){const w=i(t+"CollectionConsumer",b);return S.useCallback(()=>{const _=w.collectionRef.current;if(!_)return[];const A=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((D,O)=>A.indexOf(D.ref.current)-A.indexOf(O.ref.current))},[w.collectionRef,w.itemMap])}return ln(x,"useCollection"),[{Provider:s,Slot:d,ItemSlot:y},x,r]}ln($h,"createCollection");var q2=new WeakMap,Lt,or,km=(or=class extends Map{constructor(n){super(n);I2(this,Lt);mm(this,Lt,[...super.keys()]),q2.set(this,!0)}set(n,r){return q2.get(this)&&(this.has(n)?Sn(this,Lt)[Sn(this,Lt).indexOf(n)]=n:Sn(this,Lt).push(n)),super.set(n,r),this}insert(n,r,o){const i=this.has(r),s=Sn(this,Lt).length,l=ty(n);let u=l>=0?l:s+l;const d=u<0||u>=s?-1:u;if(d===this.size||i&&d===this.size-1||d===-1)return this.set(r,o),this;const h=this.size+(i?0:1);l<0&&u++;const p=[...Sn(this,Lt)];let m,y=!1;for(let x=u;x<h;x++)if(u===x){let b=p[x];p[x]===r&&(b=p[x+1]),i&&this.delete(r),m=this.get(b),this.set(r,o)}else{!y&&p[x-1]===r&&(y=!0);const b=p[y?x:x-1],w=m;m=this.get(b),this.delete(b),this.set(b,w)}return this}with(n,r,o){const i=new or(this);return i.insert(n,r,o),i}before(n){const r=Sn(this,Lt).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const i=Sn(this,Lt).indexOf(n);return i===-1?this:this.insert(i,r,o)}after(n){let r=Sn(this,Lt).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,o){const i=Sn(this,Lt).indexOf(n);return i===-1?this:this.insert(i+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return mm(this,Lt,[]),super.clear()}delete(n){const r=super.delete(n);return r&&Sn(this,Lt).splice(Sn(this,Lt).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=xf(Sn(this,Lt),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=xf(Sn(this,Lt),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return Sn(this,Lt).indexOf(n)}keyAt(n){return xf(Sn(this,Lt),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let i=o+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let i=o+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(n,r){let o=0;for(const i of this){if(Reflect.apply(n,r,[i,o,this]))return i;o++}}findIndex(n,r){let o=0;for(const i of this){if(Reflect.apply(n,r,[i,o,this]))return o;o++}return-1}filter(n,r){const o=[];let i=0;for(const s of this)Reflect.apply(n,r,[s,i,this])&&o.push(s),i++;return new or(o)}map(n,r){const o=[];let i=0;for(const s of this)o.push([s[0],Reflect.apply(n,r,[s,i,this])]),i++;return new or(o)}reduce(...n){const[r,o]=n;let i=0,s=o??this.at(0);for(const l of this)i===0&&n.length===1?s=l:s=Reflect.apply(r,this,[s,l,i,this]),i++;return s}reduceRight(...n){const[r,o]=n;let i=o??this.at(-1);for(let s=this.size-1;s>=0;s--){const l=this.at(s);s===this.size-1&&n.length===1?i=l:i=Reflect.apply(r,this,[i,l,s,this])}return i}toSorted(n){const r=[...this.entries()].sort(n);return new or(r)}toReversed(){const n=new or;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),i=this.get(o);n.set(o,i)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new or(r)}slice(n,r){const o=new or;let i=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(i=r-1);for(let s=n;s<=i;s++){const l=this.keyAt(s),u=this.get(l);o.set(l,u)}return o}every(n,r){let o=0;for(const i of this){if(!Reflect.apply(n,r,[i,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const i of this){if(Reflect.apply(n,r,[i,o,this]))return!0;o++}return!1}},Lt=new WeakMap,ln(or,"OrderedDict"),or);function xf(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=RS(t,e);return n===-1?void 0:t[n]}ln(xf,"at");function RS(t,e){const n=t.length,r=ty(e),o=r>=0?r:n+r;return o<0||o>=n?-1:o}ln(RS,"toSafeIndex");function ty(t){return t!==t||t===0?0:Math.trunc(t)}ln(ty,"toSafeInteger");function qN(t){const e=t+"CollectionProvider",[n,r]=ko(e),[o,i]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new km,setItemMap:ln(()=>{},"setItemMap")}),s=ln(({state:A,...M})=>A?v.jsx(u,{...M,state:A}):v.jsx(l,{...M}),"CollectionProvider");s.displayName=e;const l=ln(A=>{const M=w();return v.jsx(u,{...A,state:M})},"CollectionInit");l.displayName=e+"Init";const u=ln(A=>{const{scope:M,children:N,state:D}=A,O=S.useRef(null),[I,L]=S.useState(null),W=rt(O,L),[Y,G]=D;return S.useEffect(()=>{if(!I)return;const q=PS(()=>{});return q.observe(I,{childList:!0,subtree:!0}),()=>{q.disconnect()}},[I]),v.jsx(o,{scope:M,itemMap:Y,setItemMap:G,collectionRef:W,collectionRefObject:O,collectionElement:I,children:N})},"CollectionProviderImpl");u.displayName=e+"Impl";const d=t+"CollectionSlot",h=yo(d),p=S.forwardRef((A,M)=>{const{scope:N,children:D}=A,O=i(d,N),I=rt(M,O.collectionRef);return v.jsx(h,{ref:I,children:D})});p.displayName=d;const m=t+"CollectionItemSlot",y="data-radix-collection-item",x=yo(m),b=S.forwardRef((A,M)=>{const{scope:N,children:D,...O}=A,I=S.useRef(null),[L,W]=S.useState(null),Y=rt(M,I,W),G=i(m,N),{setItemMap:q}=G,Z=S.useRef(O);OS(Z.current,O)||(Z.current=O);const Q=Z.current;return S.useEffect(()=>{const K=Q;return q(J=>L?J.has(L)?J.set(L,{...K,element:L}).toSorted(jg):(J.set(L,{...K,element:L}),J.toSorted(jg)):J),()=>{q(J=>!L||!J.has(L)?J:(J.delete(L),new km(J)))}},[L,Q,q]),v.jsx(x,{[y]:"",ref:Y,children:D})});b.displayName=m;function w(){return S.useState(new km)}ln(w,"useInitCollection");function E(A){const{itemMap:M}=i(t+"CollectionConsumer",A);return M}return ln(E,"useCollection"),[{Provider:s,Slot:p,ItemSlot:b},{createCollectionScope:r,useCollection:E,useInitCollection:w}]}ln(qN,"createCollection");function OS(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||t[o]!==e[o])return!1;return!0}ln(OS,"shallowEqual");function IS(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}ln(IS,"isElementPreceding");function jg(t,e){return!t[1].element||!e[1].element?0:IS(t[1].element,e[1].element)?-1:1}ln(jg,"sortByDocumentPosition");function PS(t){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){t();return}})}ln(PS,"getChildListObserver");var KN=Object.defineProperty,gl=(t,e)=>KN(t,"name",{value:e,configurable:!0}),jS=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ne(t,e,{checkForDefaultPrevented:n=!0}={}){return gl(function(o){if(t==null||t(o),n===!1||!o||!o.defaultPrevented)return e==null?void 0:e(o)},"handleEvent")}gl(Ne,"composeEventHandlers");function GN(t){var e;if(!jS)throw new Error("Cannot access window outside of the DOM");return((e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)??window}gl(GN,"getOwnerWindow");function Lg(t){if(!jS)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}gl(Lg,"getOwnerDocument");function LS(t,e=!1){const{activeElement:n}=Lg(t);if(!(n!=null&&n.nodeName))return null;if(FS(n)&&n.contentDocument)return LS(n.contentDocument.body,e);if(e){const r=n.getAttribute("aria-activedescendant");if(r){const o=Lg(n).getElementById(r);if(o)return o}}return n}gl(LS,"getActiveElement");function FS(t){return t.tagName==="IFRAME"}gl(FS,"isFrame");var Rt=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},ZN=Object.defineProperty,JN=(t,e)=>ZN(t,"name",{value:e,configurable:!0}),K2=ml[" useEffectEvent ".trim().toString()],G2=ml[" useInsertionEffect ".trim().toString()];function zS(t){if(typeof K2=="function")return K2(t);const e=S.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof G2=="function"?G2(()=>{e.current=t}):Rt(()=>{e.current=t}),S.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}JN(zS,"useEffectEvent");var YN=Object.defineProperty,hc=(t,e)=>YN(t,"name",{value:e,configurable:!0}),XN=ml[" useInsertionEffect ".trim().toString()]||Rt;function Ks({prop:t,defaultProp:e,onChange:n=hc(()=>{},"onChange"),caller:r}){const[o,i,s]=$S({defaultProp:e,onChange:n}),l=t!==void 0,u=l?t:o,d=S.useCallback(h=>{var p;if(l){const m=BS(h)?h(t):h;m!==t&&((p=s.current)==null||p.call(s,m))}else i(h)},[l,t,i,s]);return[u,d]}hc(Ks,"useControllableState");function $S({defaultProp:t,onChange:e}){const[n,r]=S.useState(t),o=S.useRef(n),i=S.useRef(e);return XN(()=>{i.current=e},[e]),S.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}hc($S,"useUncontrolledState");function BS(t){return typeof t=="function"}hc(BS,"isFunction");var Z2=Symbol("RADIX:SYNC_STATE");function QN(t,e,n,r){const{prop:o,defaultProp:i,onChange:s,caller:l}=e,u=o!==void 0,d=zS(s),h=[{...n,state:i}];r&&h.push(r);const[p,m]=S.useReducer((w,E)=>{if(E.type===Z2)return{...w,state:E.state};const _=t(w,E);return u&&!Object.is(_.state,w.state)&&d(_.state),_},...h),y=p.state,x=S.useRef(y);S.useEffect(()=>{x.current!==y&&(x.current=y,u||d(y))},[y,x,u]);const b=S.useMemo(()=>o!==void 0?{...p,state:o}:p,[p,o]);return S.useEffect(()=>{u&&!Object.is(o,p.state)&&m({type:Z2,state:o})},[o,p.state,u]),[b,m]}hc(QN,"useControllableStateReducer");var eD=Object.defineProperty,ei=(t,e)=>eD(t,"name",{value:e,configurable:!0});function VS(t,e){return S.useReducer((n,r)=>e[n][r]??n,t)}ei(VS,"useStateMachine");var oi=ei(t=>{const{present:e,children:n}=t,r=HS(e),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),i=US(r.ref,WS(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:i}):null},"Presence");function HS(t){const[e,n]=S.useState(),r=S.useRef(null),o=S.useRef(t),i=S.useRef("none"),s=S.useRef(void 0),l=t?"mounted":"unmounted",[u,d]=VS(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{u==="mounted"?(i.current=s.current??Ba(r.current),s.current=void 0):i.current="none"},[u]),Rt(()=>{const h=r.current,p=o.current;if(p!==t){const y=i.current,x=Ba(h);t?(s.current=x,d("MOUNT")):x==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(p&&y!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),Rt(()=>{if(e){let h;const p=e.ownerDocument.defaultView??window,m=ei(x=>{const w=Ba(r.current).includes(CSS.escape(x.animationName));if(x.target===e&&w&&(d("ANIMATION_END"),!o.current)){const E=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=E)})}},"handleAnimationEnd"),y=ei(x=>{x.target===e&&(i.current=Ba(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",y),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",y),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:S.useCallback(h=>{if(h){const p=getComputedStyle(h);r.current=p,s.current=Ba(p)}else r.current=null;n(h)},[])}}ei(HS,"usePresence");function Fg(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}ei(Fg,"setRef");function US(...t){const e=S.useRef(t);return e.current=t,S.useCallback(n=>{const r=e.current;let o=!1;const i=r.map(s=>{const l=Fg(s,n);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():Fg(r[s],null)}}},[])}ei(US,"useStableComposedRefs");function Ba(t){return(t==null?void 0:t.animationName)||"none"}ei(Ba,"getAnimationName");function WS(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}ei(WS,"getElementRef");var tD=Object.defineProperty,nD=(t,e)=>tD(t,"name",{value:e,configurable:!0}),rD=ml[" useId ".trim().toString()]||(()=>{}),oD=0;function po(t){const[e,n]=S.useState(rD());return Rt(()=>{t||n(r=>r??String(oD++))},[t]),t||(e?`radix-${e}`:"")}nD(po,"useId");var iD=Object.defineProperty,sD=(t,e)=>iD(t,"name",{value:e,configurable:!0}),aD=S.createContext(void 0);function Bh(t){const e=S.useContext(aD);return t||e||"ltr"}sD(Bh,"useDirection");var lD=Object.defineProperty,uD=(t,e)=>lD(t,"name",{value:e,configurable:!0});function Ar(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}uD(Ar,"useCallbackRef");var cD=Object.defineProperty,an=(t,e)=>cD(t,"name",{value:e,configurable:!0}),zg="dismissableLayer.update",dD="dismissableLayer.pointerDownOutside",fD="dismissableLayer.focusOutside",J2,qS=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Vh=S.forwardRef(an(function(e,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...h}=e,p=S.useContext(qS),[m,y]=S.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=S.useState({}),w=rt(n,y),E=Array.from(p.layers),[_]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=_?E.indexOf(_):-1,M=m?E.indexOf(m):-1,N=p.layersWithOutsidePointerEventsDisabled.size>0,D=M>=A,O=S.useRef(!1),I=GS(G=>{s==null||s(G),u==null||u(G),G.defaultPrevented||d==null||d()},{ownerDocument:x,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(G=>{if(!(G instanceof Node))return!1;const q=[...p.branches].some(Z=>Z.contains(G));return D&&!q},[p.branches,D])}),L=ZS(G=>{if(o&&O.current)return;const q=G.target;[...p.branches].some(Q=>Q.contains(q))||(l==null||l(G),u==null||u(G),G.defaultPrevented||d==null||d())},x),W=m?M===E.length-1:!1,Y=Ar(G=>{G.key==="Escape"&&(i==null||i(G),!G.defaultPrevented&&d&&(G.preventDefault(),d()))});return S.useEffect(()=>{if(W)return x.addEventListener("keydown",Y,{capture:!0}),()=>x.removeEventListener("keydown",Y,{capture:!0})},[x,W,Y]),S.useEffect(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(J2=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),$g(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=J2))}},[m,x,r,p]),S.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),$g())},[m,p]),S.useEffect(()=>{const G=an(()=>b({}),"handleUpdate");return document.addEventListener(zg,G),()=>document.removeEventListener(zg,G)},[]),v.jsx(ot.div,{...h,ref:w,style:{pointerEvents:N?D?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function KS(){const t=S.useContext(qS),[e,n]=S.useState(null);return S.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}an(KS,"useDismissableLayerSurface");var hD=an(()=>!0,"IS_TRUE");function GS(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=hD}=e,l=Ar(t),u=S.useRef(!1),d=S.useRef(!1),h=S.useRef(new Map),p=S.useRef(()=>{});return S.useEffect(()=>{function m(){d.current=!1,o.current=!1,h.current.clear()}an(m,"resetOutsideInteraction");function y(){return Array.from(h.current.values()).some(Boolean)}an(y,"isOutsideInteractionIntercepted");function x(A){if(!d.current)return;const M=A.target;M instanceof Node&&[...i].some(D=>D.contains(M))||h.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{d.current&&p.current()},0)}an(x,"handleInteractionCapture");function b(A){d.current&&h.current.set(A.type,!1)}an(b,"handleInteractionBubble");const w=an(A=>{if(A.target&&!u.current){let M=function(){n.removeEventListener("click",p.current);const D=y();m(),D||ny(dD,l,N,{discrete:!0})};if(an(M,"handleAndDispatchPointerDownOutsideEvent"),!s(A.target)){n.removeEventListener("click",p.current),m(),u.current=!1;return}const N={originalEvent:A};d.current=!0,o.current=r&&A.button===0,h.current.clear(),!r||A.button!==0?M():(n.removeEventListener("click",p.current),p.current=M,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();u.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of E)n.addEventListener(A,x,!0),n.addEventListener(A,b);const _=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(_),n.removeEventListener("pointerdown",w),n.removeEventListener("click",p.current);for(const A of E)n.removeEventListener(A,x,!0),n.removeEventListener(A,b)}},[n,l,r,o,i,s]),{onPointerDownCapture:an(()=>u.current=!0,"onPointerDownCapture")}}an(GS,"usePointerDownOutside");function ZS(t,e=globalThis==null?void 0:globalThis.document){const n=Ar(t),r=S.useRef(!1);return S.useEffect(()=>{const o=an(i=>{i.target&&!r.current&&ny(fD,n,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:an(()=>r.current=!0,"onFocusCapture"),onBlurCapture:an(()=>r.current=!1,"onBlurCapture")}}an(ZS,"useFocusOutside");function $g(){const t=new CustomEvent(zg);document.dispatchEvent(t)}an($g,"dispatchUpdate");function ny(t,e,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?ey(o,i):o.dispatchEvent(i)}an(ny,"handleAndDispatchCustomEvent");var pD=Object.defineProperty,Rn=(t,e)=>pD(t,"name",{value:e,configurable:!0}),wm="focusScope.autoFocusOnMount",Cm="focusScope.autoFocusOnUnmount",Y2={bubbles:!1,cancelable:!0},ry=S.forwardRef(Rn(function(e,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=e,[u,d]=S.useState(null),h=Ar(i),p=Ar(s),m=S.useRef(null),y=rt(n,d),x=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(o){let w=function(M){if(x.paused||!u)return;const N=M.target;u.contains(N)?m.current=N:Ho(m.current,{select:!0})},E=function(M){if(x.paused||!u)return;const N=M.relatedTarget;N!==null&&(u.contains(N)||Ho(m.current,{select:!0}))},_=function(M){if(document.activeElement===document.body)for(const D of M)D.removedNodes.length>0&&Ho(u)};Rn(w,"handleFocusIn"),Rn(E,"handleFocusOut"),Rn(_,"handleMutations"),document.addEventListener("focusin",w),document.addEventListener("focusout",E);const A=new MutationObserver(_);return u&&A.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E),A.disconnect()}}},[o,u,x.paused]),S.useEffect(()=>{if(u){X2.add(x);const w=document.activeElement;if(!u.contains(w)){const _=new CustomEvent(wm,Y2);u.addEventListener(wm,h),u.dispatchEvent(_),_.defaultPrevented||(JS(t3(oy(u)),{select:!0}),document.activeElement===w&&Ho(u))}return()=>{u.removeEventListener(wm,h),setTimeout(()=>{const _=new CustomEvent(Cm,Y2);u.addEventListener(Cm,p),u.dispatchEvent(_),_.defaultPrevented||Ho(w??document.body,{select:!0}),u.removeEventListener(Cm,p),X2.remove(x)},0)}}},[u,h,p,x]);const b=S.useCallback(w=>{if(!r&&!o||x.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,_=document.activeElement;if(E&&_){const A=w.currentTarget,[M,N]=YS(A);M&&N?!w.shiftKey&&_===N?(w.preventDefault(),r&&Ho(M,{select:!0})):w.shiftKey&&_===M&&(w.preventDefault(),r&&Ho(N,{select:!0})):_===A&&w.preventDefault()}},[r,o,x.paused]);return v.jsx(ot.div,{tabIndex:-1,...l,ref:y,onKeyDown:b})},"FocusScope"));function JS(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Ho(r,{select:e}),document.activeElement!==n)return}Rn(JS,"focusFirst");function YS(t){const e=oy(t),n=Bg(e,t),r=Bg(e.reverse(),t);return[n,r]}Rn(YS,"getTabbableEdges");function oy(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Rn(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}Rn(oy,"getTabbableCandidates");function Bg(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):XS(r,{upTo:e})))return r}Rn(Bg,"findVisible");function XS(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Rn(XS,"isHidden");function QS(t){return t instanceof HTMLInputElement&&"select"in t}Rn(QS,"isSelectableInput");function Ho(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&QS(t)&&e&&t.select()}}Rn(Ho,"focus");var X2=e3();function e3(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Vg(t,e),t.unshift(e)},remove(e){var n;t=Vg(t,e),(n=t[0])==null||n.resume()}}}Rn(e3,"createFocusScopesStack");function Vg(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}Rn(Vg,"arrayRemove");function t3(t){return t.filter(e=>e.tagName!=="A")}Rn(t3,"removeLinks");var mD=Object.defineProperty,gD=(t,e)=>mD(t,"name",{value:e,configurable:!0}),Hh=S.forwardRef(gD(function(e,n){var u;const{container:r,...o}=e,[i,s]=S.useState(!1);Rt(()=>s(!0),[]);const l=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?$r.createPortal(v.jsx(ot.div,{...o,ref:n}),l):null},"Portal")),yD=Object.defineProperty,iy=(t,e)=>yD(t,"name",{value:e,configurable:!0}),$d=0,to=null;function xD(t){return pc(),t.children}iy(xD,"FocusGuards");function pc(){S.useEffect(()=>{to||(to={start:Hg(),end:Hg()});const{start:t,end:e}=to;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),$d++,()=>{$d===1&&(to==null||to.start.remove(),to==null||to.end.remove(),to=null),$d=Math.max(0,$d-1)}},[])}iy(pc,"useFocusGuards");function Hg(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}iy(Hg,"createFocusGuard");var lo=function(){return lo=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},lo.apply(this,arguments)};function n3(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function vD(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var vf="right-scroll-bar-position",bf="width-before-scroll-bar",bD="with-scroll-bars-hidden",kD="--removed-body-scroll-bar-size";function Sm(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function wD(t,e){var n=S.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}var CD=typeof window<"u"?S.useLayoutEffect:S.useEffect,Q2=new WeakMap;function SD(t,e){var n=wD(null,function(r){return t.forEach(function(o){return Sm(o,r)})});return CD(function(){var r=Q2.get(n);if(r){var o=new Set(r),i=new Set(t),s=n.current;o.forEach(function(l){i.has(l)||Sm(l,null)}),i.forEach(function(l){o.has(l)||Sm(l,s)})}Q2.set(n,t)},[t]),n}function ED(t){return t}function _D(t,e){e===void 0&&(e=ED);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var s=e(i,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(i),s=n}var u=function(){var h=s;s=[],h.forEach(i)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){s.push(h),d()},filter:function(h){return s=s.filter(h),n}}}};return o}function TD(t){t===void 0&&(t={});var e=_D(null);return e.options=lo({async:!0,ssr:!1},t),e}var r3=function(t){var e=t.sideCar,n=n3(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,lo({},n))};r3.isSideCarExport=!0;function AD(t,e){return t.useMedium(e),r3}var o3=TD(),Em=function(){},Uh=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:Em,onWheelCapture:Em,onTouchMoveCapture:Em}),o=r[0],i=r[1],s=t.forwardProps,l=t.children,u=t.className,d=t.removeScrollBar,h=t.enabled,p=t.shards,m=t.sideCar,y=t.noRelative,x=t.noIsolation,b=t.inert,w=t.allowPinchZoom,E=t.as,_=E===void 0?"div":E,A=t.gapMode,M=n3(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=m,D=SD([n,e]),O=lo(lo({},M),o);return S.createElement(S.Fragment,null,h&&S.createElement(N,{sideCar:o3,removeScrollBar:d,shards:p,noRelative:y,noIsolation:x,inert:b,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:A}),s?S.cloneElement(S.Children.only(l),lo(lo({},O),{ref:D})):S.createElement(_,lo({},O,{className:u,ref:D}),l))});Uh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Uh.classNames={fullWidth:bf,zeroRight:vf};var MD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ND(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=MD();return e&&t.setAttribute("nonce",e),t}function DD(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function RD(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var OD=function(){var t=0,e=null;return{add:function(n){t==0&&(e=ND())&&(DD(e,n),RD(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},ID=function(){var t=OD();return function(e,n){S.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},i3=function(){var t=ID(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},PD={left:0,top:0,right:0,gap:0},_m=function(t){return parseInt(t||"",10)||0},jD=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[_m(n),_m(r),_m(o)]},LD=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return PD;var e=jD(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},FD=i3(),qa="data-scroll-locked",zD=function(t,e,n,r){var o=t.left,i=t.top,s=t.right,l=t.gap;return n===void 0&&(n="margin"),`
|
|
41
|
-
.`.concat(bD,` {
|
|
42
|
-
overflow: hidden `).concat(r,`;
|
|
43
|
-
padding-right: `).concat(l,"px ").concat(r,`;
|
|
44
|
-
}
|
|
45
|
-
body[`).concat(qa,`] {
|
|
46
|
-
overflow: hidden `).concat(r,`;
|
|
47
|
-
overscroll-behavior: contain;
|
|
48
|
-
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
49
|
-
padding-left: `.concat(o,`px;
|
|
50
|
-
padding-top: `).concat(i,`px;
|
|
51
|
-
padding-right: `).concat(s,`px;
|
|
52
|
-
margin-left:0;
|
|
53
|
-
margin-top:0;
|
|
54
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
55
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.`).concat(vf,` {
|
|
59
|
-
right: `).concat(l,"px ").concat(r,`;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.`).concat(bf,` {
|
|
63
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.`).concat(vf," .").concat(vf,` {
|
|
67
|
-
right: 0 `).concat(r,`;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.`).concat(bf," .").concat(bf,` {
|
|
71
|
-
margin-right: 0 `).concat(r,`;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
body[`).concat(qa,`] {
|
|
75
|
-
`).concat(kD,": ").concat(l,`px;
|
|
76
|
-
}
|
|
77
|
-
`)},ek=function(){var t=parseInt(document.body.getAttribute(qa)||"0",10);return isFinite(t)?t:0},$D=function(){S.useEffect(function(){return document.body.setAttribute(qa,(ek()+1).toString()),function(){var t=ek()-1;t<=0?document.body.removeAttribute(qa):document.body.setAttribute(qa,t.toString())}},[])},BD=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,o=r===void 0?"margin":r;$D();var i=S.useMemo(function(){return LD(o)},[o]);return S.createElement(FD,{styles:zD(i,!e,o,n?"":"!important")})},Ug=!1;if(typeof window<"u")try{var Bd=Object.defineProperty({},"passive",{get:function(){return Ug=!0,!0}});window.addEventListener("test",Bd,Bd),window.removeEventListener("test",Bd,Bd)}catch{Ug=!1}var ja=Ug?{passive:!1}:!1,VD=function(t){return t.tagName==="TEXTAREA"},s3=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!VD(t)&&n[e]==="visible")},HD=function(t){return s3(t,"overflowY")},UD=function(t){return s3(t,"overflowX")},tk=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=a3(t,r);if(o){var i=l3(t,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},WD=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},qD=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},a3=function(t,e){return t==="v"?HD(e):UD(e)},l3=function(t,e){return t==="v"?WD(e):qD(e)},KD=function(t,e){return t==="h"&&e==="rtl"?-1:1},GD=function(t,e,n,r,o){var i=KD(t,window.getComputedStyle(e).direction),s=i*r,l=n.target,u=e.contains(l),d=!1,h=s>0,p=0,m=0;do{if(!l)break;var y=l3(t,l),x=y[0],b=y[1],w=y[2],E=b-w-i*x;(x||E)&&a3(t,l)&&(p+=E,m+=x);var _=l.parentNode;l=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!u&&l!==document.body||u&&(e.contains(l)||e===l));return(h&&Math.abs(p)<1||!h&&Math.abs(m)<1)&&(d=!0),d},Vd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},nk=function(t){return[t.deltaX,t.deltaY]},rk=function(t){return t&&"current"in t?t.current:t},ZD=function(t,e){return t[0]===e[0]&&t[1]===e[1]},JD=function(t){return`
|
|
78
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
79
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
80
|
-
`)},YD=0,La=[];function XD(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(YD++)[0],i=S.useState(i3)[0],s=S.useRef(t);S.useEffect(function(){s.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var b=vD([t.lockRef.current],(t.shards||[]).map(rk),!0).filter(Boolean);return b.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var l=S.useCallback(function(b,w){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var E=Vd(b),_=n.current,A="deltaX"in b?b.deltaX:_[0]-E[0],M="deltaY"in b?b.deltaY:_[1]-E[1],N,D=b.target,O=Math.abs(A)>Math.abs(M)?"h":"v";if("touches"in b&&O==="h"&&D.type==="range")return!1;var I=window.getSelection(),L=I&&I.anchorNode,W=L?L===D||L.contains(D):!1;if(W)return!1;var Y=tk(O,D);if(!Y)return!0;if(Y?N=O:(N=O==="v"?"h":"v",Y=tk(O,D)),!Y)return!1;if(!r.current&&"changedTouches"in b&&(A||M)&&(r.current=N),!N)return!0;var G=r.current||N;return GD(G,w,b,G==="h"?A:M)},[]),u=S.useCallback(function(b){var w=b;if(!(!La.length||La[La.length-1]!==i)){var E="deltaY"in w?nk(w):Vd(w),_=e.current.filter(function(N){return N.name===w.type&&(N.target===w.target||w.target===N.shadowParent)&&ZD(N.delta,E)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var A=(s.current.shards||[]).map(rk).filter(Boolean).filter(function(N){return N.contains(w.target)}),M=A.length>0?l(w,A[0]):!s.current.noIsolation;M&&w.cancelable&&w.preventDefault()}}},[]),d=S.useCallback(function(b,w,E,_){var A={name:b,delta:w,target:E,should:_,shadowParent:QD(E)};e.current.push(A),setTimeout(function(){e.current=e.current.filter(function(M){return M!==A})},1)},[]),h=S.useCallback(function(b){n.current=Vd(b),r.current=void 0},[]),p=S.useCallback(function(b){d(b.type,nk(b),b.target,l(b,t.lockRef.current))},[]),m=S.useCallback(function(b){d(b.type,Vd(b),b.target,l(b,t.lockRef.current))},[]);S.useEffect(function(){return La.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,ja),document.addEventListener("touchmove",u,ja),document.addEventListener("touchstart",h,ja),function(){La=La.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,ja),document.removeEventListener("touchmove",u,ja),document.removeEventListener("touchstart",h,ja)}},[]);var y=t.removeScrollBar,x=t.inert;return S.createElement(S.Fragment,null,x?S.createElement(i,{styles:JD(o)}):null,y?S.createElement(BD,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function QD(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const e5=AD(o3,XD);var Wh=S.forwardRef(function(t,e){return S.createElement(Uh,lo({},t,{ref:e,sideCar:e5}))});Wh.classNames=Uh.classNames;var t5=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Fa=new WeakMap,Hd=new WeakMap,Ud={},Tm=0,u3=function(t){return t&&(t.host||u3(t.parentNode))},n5=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=u3(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},r5=function(t,e,n,r){var o=n5(e,Array.isArray(t)?t:[t]);Ud[n]||(Ud[n]=new WeakMap);var i=Ud[n],s=[],l=new Set,u=new Set(o),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};o.forEach(d);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))h(m);else try{var y=m.getAttribute(r),x=y!==null&&y!=="false",b=(Fa.get(m)||0)+1,w=(i.get(m)||0)+1;Fa.set(m,b),i.set(m,w),s.push(m),b===1&&x&&Hd.set(m,!0),w===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",m,E)}})};return h(e),l.clear(),Tm++,function(){s.forEach(function(p){var m=Fa.get(p)-1,y=i.get(p)-1;Fa.set(p,m),i.set(p,y),m||(Hd.has(p)||p.removeAttribute(r),Hd.delete(p)),y||p.removeAttribute(n)}),Tm--,Tm||(Fa=new WeakMap,Fa=new WeakMap,Hd=new WeakMap,Ud={})}},sy=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=t5(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),r5(r,o,n,"aria-hidden")):function(){return null}},o5=Object.defineProperty,ur=(t,e)=>o5(t,"name",{value:e,configurable:!0}),ay="Dialog",[c3,KY]=ko(ay),[i5,qr]=c3(ay),s5=ur(t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=t,l=S.useRef(null),u=S.useRef(null),[d,h]=Ks({prop:r,defaultProp:o??!1,onChange:i,caller:ay}),[p,m]=S.useState(0),[y,x]=S.useState(0);return v.jsx(i5,{scope:e,triggerRef:l,contentRef:u,contentId:po(),titleId:po(),descriptionId:po(),titlePresent:p>0,descriptionPresent:y>0,setTitleCount:m,setDescriptionCount:x,open:d,onOpenChange:h,onOpenToggle:S.useCallback(()=>h(b=>!b),[h]),modal:s,children:n})},"Dialog"),a5="DialogTrigger",l5=S.forwardRef(ur(function(e,n){const{__scopeDialog:r,...o}=e,i=qr(a5,r),s=rt(n,i.triggerRef);return v.jsx(ot.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":qh(i.open),...o,ref:s,onClick:Ne(e.onClick,i.onOpenToggle)})},"DialogTrigger")),d3="DialogPortal",[u5,f3]=c3(d3,{forceMount:void 0}),c5=ur(t=>{const{__scopeDialog:e,forceMount:n,children:r,container:o}=t,i=qr(d3,e);return v.jsx(u5,{scope:e,forceMount:n,children:S.Children.map(r,s=>v.jsx(oi,{present:n||i.open,children:v.jsx(Hh,{asChild:!0,container:o,children:s})}))})},"DialogPortal"),Wg="DialogOverlay",d5=S.forwardRef(ur(function(e,n){const r=f3(Wg,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=qr(Wg,e.__scopeDialog);return s.modal?v.jsx(oi,{present:o||s.open,children:v.jsx(h5,{...i,ref:n})}):null},"DialogOverlay")),f5=yo("DialogOverlay.RemoveScroll"),h5=S.forwardRef(ur(function(e,n){const{__scopeDialog:r,...o}=e,i=qr(Wg,r),s=KS(),l=rt(n,s);return v.jsx(Wh,{as:f5,allowPinchZoom:!0,shards:[i.contentRef],children:v.jsx(ot.div,{"data-state":qh(i.open),...o,ref:l,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Lu="DialogContent",p5=S.forwardRef(ur(function(e,n){const r=f3(Lu,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=qr(Lu,e.__scopeDialog);return v.jsx(oi,{present:o||s.open,children:s.modal?v.jsx(m5,{...i,ref:n}):v.jsx(g5,{...i,ref:n})})},"DialogContent")),m5=S.forwardRef(ur(function(e,n){const r=qr(Lu,e.__scopeDialog),o=S.useRef(null),i=rt(n,r.contentRef,o);return S.useEffect(()=>{const s=o.current;if(s)return sy(s)},[]),v.jsx(h3,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Ne(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&s.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),g5=S.forwardRef(ur(function(e,n){const r=qr(Lu,e.__scopeDialog),o=S.useRef(!1),i=S.useRef(!1);return v.jsx(h3,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(o.current||(u=r.triggerRef.current)==null||u.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((h=r.triggerRef.current)==null?void 0:h.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})},"DialogContentNonModal")),h3=S.forwardRef(ur(function(e,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...l}=e,u=qr(Lu,r);return pc(),v.jsx(v.Fragment,{children:v.jsx(ry,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:v.jsx(Vh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionPresent?u.descriptionId:void 0,"aria-labelledby":u.titlePresent?u.titleId:void 0,"data-state":qh(u.open),...l,ref:n,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})},"DialogContentImpl")),y5="DialogTitle",x5=S.forwardRef(ur(function(e,n){const{__scopeDialog:r,...o}=e,i=qr(y5,r),{setTitleCount:s}=i;return Rt(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),v.jsx(ot.h2,{id:i.titleId,...o,ref:n})},"DialogTitle")),v5="DialogDescription",b5=S.forwardRef(ur(function(e,n){const{__scopeDialog:r,...o}=e,i=qr(v5,r),{setDescriptionCount:s}=i;return Rt(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),v.jsx(ot.p,{id:i.descriptionId,...o,ref:n})},"DialogDescription")),k5="DialogClose",ly=S.forwardRef(ur(function(e,n){const{__scopeDialog:r,...o}=e,i=qr(k5,r);return v.jsx(ot.button,{type:"button",...o,ref:n,onClick:Ne(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function qh(t){return t?"open":"closed"}ur(qh,"getState");var w5=Object.defineProperty,C5=(t,e)=>w5(t,"name",{value:e,configurable:!0});function p3(t){const[e,n]=S.useState(void 0);return Rt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const u=i.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,l=d.blockSize}else s=t.offsetWidth,l=t.offsetHeight;n({width:s,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}C5(p3,"useSize");const S5=["top","right","bottom","left"],Xi=Math.min,Go=Math.max,Mf=Math.round,Wd=Math.floor,Zo=t=>({x:t,y:t}),E5={left:"right",right:"left",bottom:"top",top:"bottom"};function m3(t,e,n){return Go(t,Xi(e,n))}function ti(t,e){return typeof t=="function"?t(e):t}function Qi(t){return t.split("-")[0]}function yl(t){return t.split("-")[1]}function uy(t){return t==="x"?"y":"x"}function cy(t){return t==="y"?"height":"width"}function uo(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function dy(t){return uy(uo(t))}function _5(t,e,n){n===void 0&&(n=!1);const r=yl(t),o=dy(t),i=cy(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Nf(s)),[s,Nf(s)]}function T5(t){const e=Nf(t);return[qg(t),e,qg(e)]}function qg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const ok=["left","right"],ik=["right","left"],A5=["top","bottom"],M5=["bottom","top"];function N5(t,e,n){switch(t){case"top":case"bottom":return n?e?ik:ok:e?ok:ik;case"left":case"right":return e?A5:M5;default:return[]}}function D5(t,e,n,r){const o=yl(t);let i=N5(Qi(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(qg)))),i}function Nf(t){const e=Qi(t);return E5[e]+t.slice(e.length)}function R5(t){var e,n,r,o;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(r=t.bottom)!=null?r:0,left:(o=t.left)!=null?o:0}}function g3(t){return typeof t!="number"?R5(t):{top:t,right:t,bottom:t,left:t}}function Df(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function sk(t,e,n){let{reference:r,floating:o}=t;const i=uo(e),s=dy(e),l=cy(s),u=Qi(e),d=i==="y",h=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[l]/2-o[l]/2;let y;switch(u){case"top":y={x:h,y:r.y-o.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-o.width,y:p};break;default:y={x:r.x,y:r.y}}const x=yl(e);return x&&(y[s]+=m*(x==="end"?1:-1)*(n&&d?-1:1)),y}async function O5(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:y=0}=ti(e,t),x=g3(y),w=l[m?p==="floating"?"reference":"floating":p],E=Df(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:d,rootBoundary:h,strategy:u})),_=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),M=await(i.isElement==null?void 0:i.isElement(A))&&await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1},N=Df(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:A,strategy:u}):_);return{top:(E.top-N.top+x.top)/M.y,bottom:(N.bottom-E.bottom+x.bottom)/M.y,left:(E.left-N.left+x.left)/M.x,right:(N.right-E.right+x.right)/M.x}}const I5=50,P5=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:O5},u=await(s.isRTL==null?void 0:s.isRTL(e));let d=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:h,y:p}=sk(d,r,u),m=r,y=0;const x={};for(let b=0;b<i.length;b++){const w=i[b];if(!w)continue;const{name:E,fn:_}=w,{x:A,y:M,data:N,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:x,rects:d,platform:l,elements:{reference:t,floating:e}});h=A??h,p=M??p,x[E]={...x[E],...N},D&&y<I5&&(y++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(d=D.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):D.rects),{x:h,y:p}=sk(d,m,u)),b=-1)}return{x:h,y:p,placement:m,strategy:o,middlewareData:x}},j5=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:u}=e,{element:d,padding:h=0}=ti(t,e)||{};if(d==null)return{};const p=g3(h),m={x:n,y:r},y=dy(o),x=cy(y),b=await s.getDimensions(d),w=y==="y",E=w?"top":"left",_=w?"bottom":"right",A=w?"clientHeight":"clientWidth",M=i.reference[x]+i.reference[y]-m[y]-i.floating[x],N=m[y]-i.reference[y],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=D?D[A]:0;(!O||!await(s.isElement==null?void 0:s.isElement(D)))&&(O=l.floating[A]||i.floating[x]);const I=M/2-N/2,L=O/2-b[x]/2-1,W=Xi(p[E],L),Y=Xi(p[_],L),G=O-b[x]-Y,q=O/2-b[x]/2+I,Z=m3(W,q,G),Q=!u.arrow&&yl(o)!=null&&q!==Z&&i.reference[x]/2-(q<W?W:Y)-b[x]/2<0,K=Q?q<W?q-W:q-G:0;return{[y]:m[y]+K,data:{[y]:Z,centerOffset:q-Z-K,...Q&&{alignmentOffset:K}},reset:Q}}}),L5=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:u,elements:d}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...w}=ti(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Qi(o),_=uo(l),A=Qi(l)===l,M=await(u.isRTL==null?void 0:u.isRTL(d.floating)),N=m||(A||!b?[Nf(l)]:T5(l)),D=x!=="none";!m&&D&&N.push(...D5(l,b,x,M));const O=[l,...N],I=await u.detectOverflow(e,w),L=[];let W=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&L.push(I[E]),p){const Z=_5(o,s,M);L.push(I[Z[0]],I[Z[1]])}if(W=[...W,{placement:o,overflows:L}],!L.every(Z=>Z<=0)){var Y,G;const Z=(((Y=i.flip)==null?void 0:Y.index)||0)+1,Q=O[Z];if(Q&&(!(p==="alignment"?_!==uo(Q):!1)||W.every(U=>uo(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:Z,overflows:W},reset:{placement:Q}};let K=(G=W.filter(J=>J.overflows[0]<=0).sort((J,U)=>J.overflows[1]-U.overflows[1])[0])==null?void 0:G.placement;if(!K)switch(y){case"bestFit":{var q;const J=(q=W.filter(U=>{if(D){const ee=uo(U.placement);return ee===_||ee==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(ee=>ee>0).reduce((ee,F)=>ee+F,0)]).sort((U,ee)=>U[1]-ee[1])[0])==null?void 0:q[0];J&&(K=J);break}case"initialPlacement":K=l;break}if(o!==K)return{reset:{placement:K}}}return{}}}};function ak(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function lk(t){return S5.some(e=>t[e]>=0)}const F5=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:o="referenceHidden",...i}=ti(t,e);switch(o){case"referenceHidden":{const s=await r.detectOverflow(e,{...i,elementContext:"reference"}),l=ak(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:lk(l)}}}case"escaped":{const s=await r.detectOverflow(e,{...i,altBoundary:!0}),l=ak(s,n.floating);return{data:{escapedOffsets:l,escaped:lk(l)}}}default:return{}}}}},y3=new Set(["left","top"]);async function z5(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Qi(n),l=yl(n),u=uo(n)==="y",d=y3.has(s)?-1:1,h=i&&u?-1:1,p=ti(e,t);let{mainAxis:m,crossAxis:y,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),u?{x:y*h,y:m*d}:{x:m*d,y:y*h}}const $5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=e,u=await z5(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},B5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:_=>{let{x:A,y:M}=_;return{x:A,y:M}}},...d}=ti(t,e),h={x:n,y:r},p=await i.detectOverflow(e,d),m=uo(o),y=uy(m);let x=h[y],b=h[m];const w=(_,A)=>m3(A+p[_==="y"?"top":"left"],A,A-p[_==="y"?"bottom":"right"]);s&&(x=w(y,x)),l&&(b=w(m,b));const E=u.fn({...e,[y]:x,[m]:b});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[y]:s,[m]:l}}}}}},V5=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,r;const{x:o,y:i,placement:s,rects:l,middlewareData:u}=e,{offset:d=0,mainAxis:h=!0,crossAxis:p=!0}=ti(t,e),m={x:o,y:i},y=uo(s),x=uy(y);let b=m[x],w=m[y];const E=ti(d,e),_=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(n=E.mainAxis)!=null?n:0,crossAxis:(r=E.crossAxis)!=null?r:0};if(h){const N=x==="y"?"height":"width",D=l.reference[x]-l.floating[N]+_.mainAxis,O=l.reference[x]+l.reference[N]-_.mainAxis;b<D?b=D:b>O&&(b=O)}if(p){var A,M;const N=x==="y"?"width":"height",D=y3.has(Qi(s)),O=l.reference[y]-l.floating[N]+(D&&((A=u.offset)==null?void 0:A[y])||0)+(D?0:_.crossAxis),I=l.reference[y]+l.reference[N]+(D?0:((M=u.offset)==null?void 0:M[y])||0)-(D?_.crossAxis:0);w<O?w=O:w>I&&(w=I)}return{[x]:b,[y]:w}}}},H5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...l}=ti(t,e),u=await o.detectOverflow(e,l),d=Qi(n),h=yl(n),p=uo(n)==="y",{width:m,height:y}=r.floating;let x,b;d==="top"||d==="bottom"?(x=d,b=h===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=d,x=h==="end"?"top":"bottom");const w=y-u.top-u.bottom,E=m-u.left-u.right,_=Xi(y-u[x],w),A=Xi(m-u[b],E),M=e.middlewareData.shift,N=!M;let D=_,O=A;M!=null&&M.enabled.x&&(O=E),M!=null&&M.enabled.y&&(D=w),N&&!h&&(p?O=m-2*Go(u.left,u.right):D=y-2*Go(u.top,u.bottom)),await s({...e,availableWidth:O,availableHeight:D});const I=await o.getDimensions(i.floating);return m!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Kh(){return typeof window<"u"}function xl(t){return x3(t)?(t.nodeName||"").toLowerCase():"#document"}function Jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ii(t){var e;return(e=(x3(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function x3(t){return Kh()?t instanceof Node||t instanceof Jn(t).Node:!1}function xo(t){return Kh()?t instanceof Element||t instanceof Jn(t).Element:!1}function as(t){return Kh()?t instanceof HTMLElement||t instanceof Jn(t).HTMLElement:!1}function uk(t){return!Kh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Jn(t).ShadowRoot}function Gh(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=vo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&o!=="inline"&&o!=="contents"}function U5(t){return/^(table|td|th)$/.test(xl(t))}function Zh(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const W5=/transform|translate|scale|rotate|perspective|filter/,q5=/paint|layout|strict|content/,Ms=t=>!!t&&t!=="none";let Am;function fy(t){const e=xo(t)?vo(t):t;return Ms(e.transform)||Ms(e.translate)||Ms(e.scale)||Ms(e.rotate)||Ms(e.perspective)||!hy()&&(Ms(e.backdropFilter)||Ms(e.filter))||W5.test(e.willChange||"")||q5.test(e.contain||"")}function K5(t){let e=Gs(t);for(;as(e)&&!Fu(e);){if(fy(e))return e;if(Zh(e))return null;e=Gs(e)}return null}function hy(){return Am==null&&(Am=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Am}function Fu(t){return/^(html|body|#document)$/.test(xl(t))}function vo(t){return Jn(t).getComputedStyle(t)}function Jh(t){return xo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Gs(t){if(xl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||uk(t)&&t.host||ii(t);return uk(e)?e.host:e}function v3(t){const e=Gs(t);return Fu(e)?(t.ownerDocument||t).body:as(e)&&Gh(e)?e:v3(e)}function zu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=v3(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=Jn(o);if(i){const l=Kg(s);return e.concat(s,s.visualViewport||[],Gh(o)?o:[],l&&n?zu(l):[])}else return e.concat(o,zu(o,[],n))}function Kg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function b3(t){const e=vo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=as(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,l=Mf(n)!==i||Mf(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function py(t){return xo(t)?t:t.contextElement}function Ka(t){const e=py(t);if(!as(e))return Zo(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=b3(e);let s=(i?Mf(n.width):n.width)/r,l=(i?Mf(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const G5=Zo(0);function k3(t){const e=Jn(t);return!hy()||!e.visualViewport?G5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Z5(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Jn(t)}function Zs(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=py(t);let s=Zo(1);e&&(r?xo(r)&&(s=Ka(r)):s=Ka(t));const l=Z5(i,n,r)?k3(i):Zo(0);let u=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,h=o.width/s.x,p=o.height/s.y;if(i&&r){const m=Jn(i),y=xo(r)?Jn(r):r;let x=m,b=Kg(x);for(;b&&y!==x;){const w=Ka(b),E=b.getBoundingClientRect(),_=vo(b),A=E.left+(b.clientLeft+parseFloat(_.paddingLeft))*w.x,M=E.top+(b.clientTop+parseFloat(_.paddingTop))*w.y;u*=w.x,d*=w.y,h*=w.x,p*=w.y,u+=A,d+=M,x=Jn(b),b=Kg(x)}}return Df({width:h,height:p,x:u,y:d})}function Yh(t,e){const n=Jh(t).scrollLeft;return e?e.left+n:Zs(ii(t)).left+n}function w3(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Yh(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function J5(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",s=ii(r),l=e?Zh(e.floating):!1;if(r===s||l&&i)return n;let u={scrollLeft:0,scrollTop:0},d=Zo(1);const h=Zo(0),p=as(r);if((p||!i)&&((xl(r)!=="body"||Gh(s))&&(u=Jh(r)),p)){const y=Zs(r);d=Ka(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const m=s&&!p&&!i?w3(s,u):Zo(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+m.x,y:n.y*d.y-u.scrollTop*d.y+h.y+m.y}}function Y5(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function X5(t){const e=Jh(t),n=t.ownerDocument.body,r=Go(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Go(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+Yh(t);const s=-e.scrollTop;return vo(n).direction==="rtl"&&(i+=Go(t.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:s}}const Q5=25;function eR(t,e,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=Jn(t),i=ii(t),s=o.visualViewport;let l=i.clientWidth,u=i.clientHeight,d=0,h=0;if(s){const m=!hy()||e==="fixed";r?m||(d=-s.offsetLeft,h=-s.offsetTop):(l=s.width,u=s.height,m&&(d=s.offsetLeft,h=s.offsetTop))}if(Yh(i)<=0){const m=i.ownerDocument,y=m.body,x=getComputedStyle(y),b=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(i.clientWidth-y.clientWidth-b),E=getComputedStyle(i).scrollbarGutter==="stable both-edges"?w/2:w;E<=Q5&&(l-=E)}return{width:l,height:u,x:d,y:h}}function tR(t,e){const n=Zs(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=Ka(t),s=t.clientWidth*i.x,l=t.clientHeight*i.y,u=o*i.x,d=r*i.y;return{width:s,height:l,x:u,y:d}}function ck(t,e,n){let r;if(e==="viewport"||e==="layoutViewport")r=eR(t,n,e);else if(e==="document")r=X5(ii(t));else if(xo(e))r=tR(e,n);else{const o=k3(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Df(r)}function nR(t,e){const n=e.get(t);if(n)return n;let r=zu(t,[],!1).filter(l=>xo(l)&&xl(l)!=="body"),o=null;const i=vo(t).position==="fixed";let s=i?Gs(t):t;for(;xo(s)&&!Fu(s);){const l=vo(s),u=fy(s),d=o?o.position:i?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&l.position==="static")?r=r.filter(p=>p!==s):o=l,s=Gs(s)}return e.set(t,r),r}function rR(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?Zh(e)?[]:nR(e,this._c):[].concat(n),r],l=ck(e,s[0],o);let u=l.top,d=l.right,h=l.bottom,p=l.left;for(let m=1;m<s.length;m++){const y=ck(e,s[m],o);u=Go(y.top,u),d=Xi(y.right,d),h=Xi(y.bottom,h),p=Go(y.left,p)}return{width:d-p,height:h-u,x:p,y:u}}function oR(t){const{width:e,height:n}=b3(t);return{width:e,height:n}}function iR(t,e,n){const r=as(e),o=ii(e),i=n==="fixed",s=Zs(t,!0,i,e);let l={scrollLeft:0,scrollTop:0};const u=Zo(0);if((r||!i)&&((xl(e)!=="body"||Gh(o))&&(l=Jh(e)),r)){const m=Zs(e,!0,i,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}!r&&o&&(u.x=Yh(o));const d=o&&!r&&!i?w3(o,l):Zo(0),h=s.left+l.scrollLeft-u.x-d.x,p=s.top+l.scrollTop-u.y-d.y;return{x:h,y:p,width:s.width,height:s.height}}function Mm(t){return vo(t).position==="static"}function dk(t,e){if(!as(t)||vo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ii(t)===n&&(n=n.ownerDocument.body),n}function C3(t,e){const n=Jn(t);if(Zh(t))return n;if(!as(t)){let o=Gs(t);for(;o&&!Fu(o);){if(xo(o)&&!Mm(o))return o;o=Gs(o)}return n}let r=dk(t,e);for(;r&&U5(r)&&Mm(r);)r=dk(r,e);return r&&Fu(r)&&Mm(r)&&!fy(r)?n:r||K5(t)||n}const sR=async function(t){const e=this.getOffsetParent||C3,n=this.getDimensions,r=await n(t.floating);return{reference:iR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aR(t){return vo(t).direction==="rtl"}const lR={convertOffsetParentRelativeRectToViewportRelativeRect:J5,getDocumentElement:ii,getClippingRect:rR,getOffsetParent:C3,getElementRects:sR,getClientRects:Y5,getDimensions:oR,getScale:Ka,isElement:xo,isRTL:aR};function S3(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function uR(t,e,n){let r=null,o;const i=ii(t);function s(){var h;clearTimeout(o),(h=r)==null||h.disconnect(),r=null}function l(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),s();const m=t.getBoundingClientRect(),{left:y,top:x,width:b,height:w}=m;if(h||e(),!b||!w)return;const E=Wd(x),_=Wd(i.clientWidth-(y+b)),A=Wd(i.clientHeight-(x+w)),M=Wd(y),D={rootMargin:-E+"px "+-_+"px "+-A+"px "+-M+"px",threshold:Go(0,Xi(1,p))||1};let O=!0;function I(L){const W=L[0].intersectionRatio;if(!S3(m,t.getBoundingClientRect()))return l();if(W!==p){if(!O)return l();W?l(!1,W):o=setTimeout(()=>{l(!1,1e-7)},1e3)}O=!1}try{r=new IntersectionObserver(I,{...D,root:i.ownerDocument})}catch{r=new IntersectionObserver(I,D)}r.observe(t)}const u=Jn(t),d=()=>l(n);return u.addEventListener("resize",d),l(!0),()=>{u.removeEventListener("resize",d),s()}}function cR(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=py(t),h=o||i?[...d?zu(d):[],...e?zu(e):[]]:[];h.forEach(E=>{o&&E.addEventListener("scroll",n),i&&E.addEventListener("resize",n)});const p=d&&l?uR(d,n,i):null;let m=-1,y=null;s&&(y=new ResizeObserver(E=>{let[_]=E;_&&_.target===d&&y&&e&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(e)})),n()}),d&&!u&&y.observe(d),e&&y.observe(e));let x,b=u?Zs(t):null;u&&w();function w(){const E=Zs(t);b&&!S3(b,E)&&n(),b=E,x=requestAnimationFrame(w)}return n(),()=>{var E;h.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),p==null||p(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(x)}}const dR=$5,fR=B5,hR=L5,pR=H5,mR=F5,fk=j5,gR=V5,yR=(t,e,n)=>{const r=new Map,o=n??{},i={...lR,...o.platform,_c:r};return P5(t,e,{...o,platform:i})};var xR=typeof document<"u",vR=function(){},kf=xR?S.useLayoutEffect:vR;function Rf(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Rf(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!Rf(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function E3(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hk(t,e){const n=E3(t);return Math.round(e*n)/n}function Nm(t){const e=S.useRef(t);return kf(()=>{e.current=t}),e}function bR(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:u,open:d}=t,[h,p]=S.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,y]=S.useState(r);Rf(m,r)||y(r);const[x,b]=S.useState(null),[w,E]=S.useState(null),_=S.useCallback(U=>{U!==D.current&&(D.current=U,b(U))},[]),A=S.useCallback(U=>{U!==O.current&&(O.current=U,E(U))},[]),M=i||x,N=s||w,D=S.useRef(null),O=S.useRef(null),I=S.useRef(h),L=u!=null,W=Nm(u),Y=Nm(o),G=Nm(d),q=S.useCallback(()=>{if(!D.current||!O.current)return;const U={placement:e,strategy:n,middleware:m};Y.current&&(U.platform=Y.current),yR(D.current,O.current,U).then(ee=>{const F={...ee,isPositioned:G.current!==!1};Z.current&&!Rf(I.current,F)&&(I.current=F,$r.flushSync(()=>{p(F)}))})},[m,e,n,Y,G]);kf(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(U=>({...U,isPositioned:!1})))},[d]);const Z=S.useRef(!1);kf(()=>(Z.current=!0,()=>{Z.current=!1}),[]),kf(()=>{if(M&&(D.current=M),N&&(O.current=N),M&&N){if(W.current)return W.current(M,N,q);q()}},[M,N,q,W,L]);const Q=S.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:A}),[_,A]),K=S.useMemo(()=>({reference:M,floating:N}),[M,N]),J=S.useMemo(()=>{const U={position:n,left:0,top:0};if(!K.floating)return U;const ee=hk(K.floating,h.x),F=hk(K.floating,h.y);return l?{...U,transform:"translate("+ee+"px, "+F+"px)",...E3(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:F}},[n,l,K.floating,h.x,h.y]);return S.useMemo(()=>({...h,update:q,refs:Q,elements:K,floatingStyles:J}),[h,q,Q,K,J])}const kR=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?fk({element:r.current,padding:o}).fn(n):{}:r?fk({element:r,padding:o}).fn(n):{}}}},wR=(t,e)=>{const n=dR(t);return{name:n.name,fn:n.fn,options:[t,e]}},CR=(t,e)=>{const n=fR(t);return{name:n.name,fn:n.fn,options:[t,e]}},SR=(t,e)=>({fn:gR(t).fn,options:[t,e]}),ER=(t,e)=>{const n=hR(t);return{name:n.name,fn:n.fn,options:[t,e]}},_R=(t,e)=>{const n=pR(t);return{name:n.name,fn:n.fn,options:[t,e]}},TR=(t,e)=>{const n=mR(t);return{name:n.name,fn:n.fn,options:[t,e]}},AR=(t,e)=>{const n=kR(t);return{name:n.name,fn:n.fn,options:[t,e]}};var MR=Object.defineProperty,NR=(t,e)=>MR(t,"name",{value:e,configurable:!0}),DR=S.forwardRef(NR(function(e,n){const{children:r,width:o=10,height:i=5,...s}=e;return v.jsx(ot.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:v.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),RR=DR,OR=Object.defineProperty,Jo=(t,e)=>OR(t,"name",{value:e,configurable:!0}),_3="Popper",[T3,vl]=ko(_3),[IR,A3]=T3(_3),PR=Jo(t=>{const{__scopePopper:e,children:n}=t,[r,o]=S.useState(null),[i,s]=S.useState(void 0);return v.jsx(IR,{scope:e,anchor:r,onAnchorChange:o,placementState:i,setPlacementState:s,children:n})},"Popper"),jR="PopperAnchor",LR=S.forwardRef(Jo(function(e,n){const{__scopePopper:r,virtualRef:o,...i}=e,s=A3(jR,r),l=S.useRef(null),u=s.onAnchorChange,d=S.useCallback(b=>{l.current=b,b&&u(b)},[u]),h=rt(n,d),p=S.useRef(null);S.useEffect(()=>{if(!o)return;const b=p.current;p.current=o.current,b!==p.current&&u(p.current)});const m=s.placementState&&Xh(s.placementState),y=m==null?void 0:m[0],x=m==null?void 0:m[1];return o?null:v.jsx(ot.div,{"data-radix-popper-side":y,"data-radix-popper-align":x,...i,ref:h})},"PopperAnchor")),M3="PopperContent",[FR,zR]=T3(M3),$R=S.forwardRef(Jo(function(e,n){var ce,pe,Le,Me,ze,Je,At;const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:y=!1,updatePositionStrategy:x="optimized",onPlaced:b,...w}=e,E=A3(M3,r),[_,A]=S.useState(null),M=rt(n,A),[N,D]=S.useState(null),O=p3(N),I=(O==null?void 0:O.width)??0,L=(O==null?void 0:O.height)??0,W=o+(s!=="center"?"-"+s:""),Y=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},G=Array.isArray(h)?h:[h],q=G.length>0,Z={padding:Y,boundary:G.filter(N3),altBoundary:q},{refs:Q,floatingStyles:K,placement:J,isPositioned:U,middlewareData:ee}=bR({strategy:"fixed",placement:W,whileElementsMounted:Jo((...Pt)=>cR(...Pt,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[wR({mainAxis:i+L,alignmentAxis:l}),d&&CR({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?SR():void 0,...Z}),d&&ER({...Z}),_R({...Z,apply:Jo(({elements:Pt,rects:Ht,availableWidth:Ln,availableHeight:Ut})=>{const{width:Qt,height:An}=Ht.reference,ht=Pt.floating.style;ht.setProperty("--radix-popper-available-width",`${Ln}px`),ht.setProperty("--radix-popper-available-height",`${Ut}px`),ht.setProperty("--radix-popper-anchor-width",`${Qt}px`),ht.setProperty("--radix-popper-anchor-height",`${An}px`)},"apply")}),N&&AR({element:N,padding:u}),UR({arrowWidth:I,arrowHeight:L}),y&&TR({strategy:"referenceHidden",...Z,boundary:q?Z.boundary:void 0})]}),F=E.setPlacementState;Rt(()=>(F(J),()=>{F(void 0)}),[J,F]);const[P,B]=Xh(J),ne=Ar(b);Rt(()=>{U&&(ne==null||ne())},[U,ne]);const fe=(ce=ee.arrow)==null?void 0:ce.x,ue=(pe=ee.arrow)==null?void 0:pe.y,he=((Le=ee.arrow)==null?void 0:Le.centerOffset)!==0,[Ae,X]=S.useState();return Rt(()=>{_&&X(window.getComputedStyle(_).zIndex)},[_]),v.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:U?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[(Me=ee.transformOrigin)==null?void 0:Me.x,(ze=ee.transformOrigin)==null?void 0:ze.y].join(" "),...((Je=ee.hide)==null?void 0:Je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(FR,{scope:r,placedSide:P,placedAlign:B,onArrowChange:D,arrowX:fe,arrowY:ue,shouldHideArrow:he,children:v.jsx(ot.div,{"data-side":P,"data-align":B,...w,ref:M,style:{...w.style,animation:U?(At=w.style)==null?void 0:At.animation:"none"}})})})},"PopperContent")),BR="PopperArrow",VR={top:"bottom",right:"left",bottom:"top",left:"right"},HR=S.forwardRef(Jo(function(e,n){const{__scopePopper:r,...o}=e,i=zR(BR,r),s=VR[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(RR,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function N3(t){return t!==null}Jo(N3,"isNotNull");var UR=Jo(t=>({name:"transformOrigin",options:t,fn(e){var w,E,_;const{placement:n,rects:r,middlewareData:o}=e,s=((w=o.arrow)==null?void 0:w.centerOffset)!==0,l=s?0:t.arrowWidth,u=s?0:t.arrowHeight,[d,h]=Xh(n),p={start:"0%",center:"50%",end:"100%"}[h],m=(((E=o.arrow)==null?void 0:E.x)??0)+l/2,y=(((_=o.arrow)==null?void 0:_.y)??0)+u/2;let x="",b="";return d==="bottom"?(x=s?p:`${m}px`,b=`${-u}px`):d==="top"?(x=s?p:`${m}px`,b=`${r.floating.height+u}px`):d==="right"?(x=`${-u}px`,b=s?p:`${y}px`):d==="left"&&(x=`${r.floating.width+u}px`,b=s?p:`${y}px`),{data:{x,y:b}}}}),"transformOrigin");function Xh(t){const[e,n="center"]=t.split("-");return[e,n]}Jo(Xh,"getSideAndAlignFromPlacement");var my=PR,gy=LR,yy=$R,WR=HR,qR=Object.defineProperty,xy=(t,e)=>qR(t,"name",{value:e,configurable:!0}),Dm=!1;function D3(){const[t,e]=S.useState(Dm);return S.useEffect(()=>{Dm||(Dm=!0,e(!0))},[]),t}xy(D3,"useIsHydrated");var R3=ml[" useSyncExternalStore ".trim().toString()];function O3(){return()=>{}}xy(O3,"subscribe");function I3(){return R3(O3,()=>!0,()=>!1)}xy(I3,"useIsHydratedModern");var KR=typeof R3=="function"?I3:D3,GR=Object.defineProperty,oa=(t,e)=>GR(t,"name",{value:e,configurable:!0}),Rm="rovingFocusGroup.onEntryFocus",ZR={bubbles:!1,cancelable:!0},Qh="RovingFocusGroup",[Gg,P3,JR]=$h(Qh),[YR,j3]=ko(Qh,[JR]),[XR,QR]=YR(Qh),e8=S.forwardRef(oa(function(e,n){return v.jsx(Gg.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Gg.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(t8,{...e,ref:n})})})},"RovingFocusGroup")),t8=S.forwardRef(oa(function(e,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=e,y=S.useRef(null),x=rt(n,y),b=Bh(s),[w,E]=Ks({prop:l,defaultProp:u??null,onChange:d,caller:Qh}),[_,A]=S.useState(!1),M=Ar(h),N=P3(r),D=S.useRef(!1),[O,I]=S.useState(0);return S.useEffect(()=>{const L=y.current;if(L)return L.addEventListener(Rm,M),()=>L.removeEventListener(Rm,M)},[M]),v.jsx(XR,{scope:r,orientation:o,dir:b,loop:i,currentTabStopId:w,onItemFocus:S.useCallback(L=>E(L),[E]),onItemShiftTab:S.useCallback(()=>A(!0),[]),onFocusableItemAdd:S.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:S.useCallback(()=>I(L=>L-1),[]),children:v.jsx(ot.div,{tabIndex:_||O===0?-1:0,"data-orientation":o,...m,ref:x,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{D.current=!0}),onFocus:Ne(e.onFocus,L=>{const W=!D.current;if(L.target===L.currentTarget&&W&&!_){const Y=new CustomEvent(Rm,ZR);if(L.currentTarget.dispatchEvent(Y),!Y.defaultPrevented){const G=N().filter(J=>J.focusable),q=G.find(J=>J.active),Z=G.find(J=>J.id===w),K=[q,Z,...G].filter(Boolean).map(J=>J.ref.current);vy(K,p)}}D.current=!1}),onBlur:Ne(e.onBlur,()=>A(!1))})})},"RovingFocusGroupImpl")),n8="RovingFocusGroupItem",r8=S.forwardRef(oa(function(e,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:l,...u}=e,d=po(),h=s||d,p=QR(n8,r),m=p.currentTabStopId===h,y=P3(r),{onFocusableItemAdd:x,onFocusableItemRemove:b,currentTabStopId:w}=p,E=KR();return Rt(()=>{if(!(!E||!o))return x(),()=>b()},[E,o,x,b]),S.useEffect(()=>{if(!(E||!o))return x(),()=>b()},[E,o,x,b]),v.jsx(Gg.ItemSlot,{scope:r,id:h,focusable:o,active:i,children:v.jsx(ot.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:n,onMouseDown:Ne(e.onMouseDown,_=>{o?p.onItemFocus(h):_.preventDefault()}),onFocus:Ne(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ne(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){p.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const A=F3(_,p.orientation,p.dir);if(A!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let N=y().filter(D=>D.focusable).map(D=>D.ref.current);if(A==="last")N.reverse();else if(A==="prev"||A==="next"){A==="prev"&&N.reverse();const D=N.indexOf(_.currentTarget);N=p.loop?z3(N,D+1):N.slice(D+1)}setTimeout(()=>vy(N))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:w!=null}):l})})},"RovingFocusGroupItem")),o8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function L3(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}oa(L3,"getDirectionAwareKey");function F3(t,e,n){const r=L3(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return o8[r]}oa(F3,"getFocusIntent");function vy(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}oa(vy,"focusFirst");function z3(t,e){return t.map((n,r)=>t[(e+r)%t.length])}oa(z3,"wrapArray");var i8=e8,s8=r8,a8=Object.defineProperty,ct=(t,e)=>a8(t,"name",{value:e,configurable:!0}),l8=["Enter"," "],u8=["ArrowDown","PageUp","Home"],$3=["ArrowUp","PageDown","End"],c8=[...u8,...$3],ep="Menu",[Zg,d8,f8]=$h(ep),[ia,B3]=ko(ep,[f8,vl,j3]),by=vl(),V3=j3(),[h8,mc]=ia(ep),[p8,ky]=ia(ep),m8=ct(t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=t,l=by(e),[u,d]=S.useState(null),h=S.useRef(!1),p=Ar(i),m=Bh(o);return S.useEffect(()=>{const y=ct(()=>{h.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},"handleKeyDown"),x=ct(()=>h.current=!1,"handlePointer");return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),S.useEffect(()=>{if(!n)return;const y=ct(()=>p(!1),"handleBlur");return window.addEventListener("blur",y),()=>window.removeEventListener("blur",y)},[n,p]),v.jsx(my,{...l,children:v.jsx(h8,{scope:e,open:n,onOpenChange:p,content:u,onContentChange:d,children:v.jsx(p8,{scope:e,onClose:S.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:s,children:r})})})},"Menu"),g8=S.forwardRef(ct(function(e,n){const{__scopeMenu:r,...o}=e,i=by(r);return v.jsx(gy,{...i,...o,ref:n})},"MenuAnchor")),H3="MenuPortal",[y8,x8]=ia(H3,{forceMount:void 0}),v8=ct(t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,i=mc(H3,e);return v.jsx(y8,{scope:e,forceMount:n,children:v.jsx(oi,{present:n||i.open,children:v.jsx(Hh,{asChild:!0,container:o,children:r})})})},"MenuPortal"),Wi="MenuContent",[b8,U3]=ia(Wi),k8=S.forwardRef(ct(function(e,n){const r=x8(Wi,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=mc(Wi,e.__scopeMenu),l=ky(Wi,e.__scopeMenu);return v.jsx(Zg.Provider,{scope:e.__scopeMenu,children:v.jsx(oi,{present:o||s.open,children:v.jsx(Zg.Slot,{scope:e.__scopeMenu,children:l.modal?v.jsx(w8,{...i,ref:n}):v.jsx(C8,{...i,ref:n})})})})},"MenuContent")),w8=S.forwardRef(ct(function(e,n){const r=mc(Wi,e.__scopeMenu),o=S.useRef(null),i=rt(n,o);return S.useEffect(()=>{const s=o.current;if(s)return sy(s)},[]),v.jsx(W3,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ne(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),C8=S.forwardRef(ct(function(e,n){const r=mc(Wi,e.__scopeMenu);return v.jsx(W3,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),S8=yo("MenuContent.ScrollLock"),W3=S.forwardRef(ct(function(e,n){const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:y,onDismiss:x,disableOutsideScroll:b,...w}=e,E=mc(Wi,r),_=ky(Wi,r),A=by(r),M=V3(r),N=d8(r),[D,O]=S.useState(null),I=S.useRef(null),L=rt(n,I,E.onContentChange),W=S.useRef(0),Y=S.useRef(""),G=S.useRef(0),q=S.useRef(null),Z=S.useRef("right"),Q=S.useRef(0),K=b?Wh:S.Fragment,J=b?{as:S8,allowPinchZoom:!0}:void 0,U=ct(F=>{var X,ce;const P=Y.current+F,B=N().filter(pe=>!pe.disabled),ne=document.activeElement,fe=(X=B.find(pe=>pe.ref.current===ne))==null?void 0:X.textValue,ue=B.map(pe=>pe.textValue),he=Y3(ue,P,fe),Ae=(ce=B.find(pe=>pe.textValue===he))==null?void 0:ce.ref.current;ct((function pe(Le){Y.current=Le,window.clearTimeout(W.current),Le!==""&&(W.current=window.setTimeout(()=>pe(""),1e3))}),"updateSearch")(P),Ae&&setTimeout(()=>Ae.focus())},"handleTypeaheadSearch");S.useEffect(()=>()=>window.clearTimeout(W.current),[]),pc();const ee=S.useCallback(F=>{var B,ne;return Z.current===((B=q.current)==null?void 0:B.side)&&Q3(F,(ne=q.current)==null?void 0:ne.area)},[]);return v.jsx(b8,{scope:r,searchRef:Y,onItemEnter:S.useCallback(F=>{ee(F)&&F.preventDefault()},[ee]),onItemLeave:S.useCallback(F=>{var P;ee(F)||((P=I.current)==null||P.focus(),O(null))},[ee]),onTriggerLeave:S.useCallback(F=>{ee(F)&&F.preventDefault()},[ee]),pointerGraceTimerRef:G,onPointerGraceIntentChange:S.useCallback(F=>{q.current=F},[]),children:v.jsx(K,{...J,children:v.jsx(ry,{asChild:!0,trapped:i,onMountAutoFocus:Ne(s,F=>{var P;F.preventDefault(),(P=I.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:v.jsx(Vh,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:y,onDismiss:x,children:v.jsx(i8,{asChild:!0,...M,dir:_.dir,orientation:"vertical",loop:o,currentTabStopId:D,onCurrentTabStopIdChange:O,onEntryFocus:Ne(d,F=>{_.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(yy,{role:"menu","aria-orientation":"vertical","data-state":G3(E.open),"data-radix-menu-content":"",dir:_.dir,...A,...w,ref:L,style:{outline:"none",...w.style},onKeyDown:Ne(w.onKeyDown,F=>{const B=F.target.closest("[data-radix-menu-content]")===F.currentTarget,ne=F.ctrlKey||F.altKey||F.metaKey,fe=F.key.length===1;B&&(F.key==="Tab"&&F.preventDefault(),!ne&&fe&&U(F.key));const ue=I.current;if(F.target!==ue||!c8.includes(F.key))return;F.preventDefault();const Ae=N().filter(X=>!X.disabled).map(X=>X.ref.current);$3.includes(F.key)&&Ae.reverse(),Z3(Ae)}),onBlur:Ne(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(W.current),Y.current="")}),onPointerMove:Ne(e.onPointerMove,Of(F=>{const P=F.target,B=Q.current!==F.clientX;if(F.currentTarget.contains(P)&&B){const ne=F.clientX>Q.current?"right":"left";Z.current=ne,Q.current=F.clientX}}))})})})})})})},"MenuContentImpl")),E8=S.forwardRef(ct(function(e,n){const{__scopeMenu:r,...o}=e;return v.jsx(ot.div,{...o,ref:n})},"MenuLabel")),Jg="MenuItem",pk="menu.itemSelect",q3=S.forwardRef(ct(function(e,n){const{disabled:r=!1,onSelect:o,...i}=e,s=S.useRef(null),l=ky(Jg,e.__scopeMenu),u=U3(Jg,e.__scopeMenu),d=rt(n,s),h=S.useRef(!1),p=ct(()=>{const m=s.current;if(!r&&m){const y=new CustomEvent(pk,{bubbles:!0,cancelable:!0});m.addEventListener(pk,x=>o==null?void 0:o(x),{once:!0}),ey(m,y),y.defaultPrevented?h.current=!1:l.onClose()}},"handleSelect");return v.jsx(_8,{...i,ref:d,disabled:r,onClick:Ne(e.onClick,p),onPointerDown:m=>{var y;(y=e.onPointerDown)==null||y.call(e,m),h.current=!0},onPointerUp:Ne(e.onPointerUp,m=>{var y;h.current||(y=m.currentTarget)==null||y.click()}),onKeyDown:Ne(e.onKeyDown,m=>{r||m.target!==m.currentTarget||u.searchRef.current!==""&&m.key===" "||l8.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})},"MenuItem")),_8=S.forwardRef(ct(function(e,n){const{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=e,l=U3(Jg,r),u=V3(r),d=S.useRef(null),h=rt(n,d),[p,m]=S.useState(!1),[y,x]=S.useState("");return S.useEffect(()=>{const b=d.current;b&&x((b.textContent??"").trim())},[s.children]),v.jsx(Zg.ItemSlot,{scope:r,disabled:o,textValue:i??y,children:v.jsx(s8,{asChild:!0,...u,focusable:!o,children:v.jsx(ot.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:h,onPointerMove:Ne(e.onPointerMove,Of(b=>{o?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ne(e.onPointerLeave,Of(b=>l.onItemLeave(b))),onFocus:Ne(e.onFocus,()=>m(!0)),onBlur:Ne(e.onBlur,()=>m(!1))})})})},"MenuItemImpl")),T8=S.forwardRef(ct(function(e,n){const{checked:r=!1,onCheckedChange:o,...i}=e;return v.jsx(M8,{scope:e.__scopeMenu,checked:r,children:v.jsx(q3,{role:"menuitemcheckbox","aria-checked":$u(r)?"mixed":r,...i,ref:n,"data-state":wy(r),onSelect:Ne(i.onSelect,()=>o==null?void 0:o($u(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),A8="MenuRadioGroup",[GY,ZY]=ia(A8,{value:void 0,onValueChange:ct(()=>{},"onValueChange")}),K3="MenuItemIndicator",[M8,N8]=ia(K3,{checked:!1}),D8=S.forwardRef(ct(function(e,n){const{__scopeMenu:r,forceMount:o,...i}=e,s=N8(K3,r);return v.jsx(oi,{present:o||$u(s.checked)||s.checked===!0,children:v.jsx(ot.span,{...i,ref:n,"data-state":wy(s.checked)})})},"MenuItemIndicator")),R8=S.forwardRef(ct(function(e,n){const{__scopeMenu:r,...o}=e;return v.jsx(ot.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),O8="MenuSub",[JY,YY]=ia(O8);function G3(t){return t?"open":"closed"}ct(G3,"getOpenState");function $u(t){return t==="indeterminate"}ct($u,"isIndeterminate");function wy(t){return $u(t)?"indeterminate":t?"checked":"unchecked"}ct(wy,"getCheckedState");function Z3(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}ct(Z3,"focusFirst");function J3(t,e){return t.map((n,r)=>t[(e+r)%t.length])}ct(J3,"wrapArray");function Y3(t,e,n){const o=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=J3(t,Math.max(i,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}ct(Y3,"getNextMatch");function X3(t,e){const{x:n,y:r}=t;let o=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const l=e[i],u=e[s],d=l.x,h=l.y,p=u.x,m=u.y;h>r!=m>r&&n<(p-d)*(r-h)/(m-h)+d&&(o=!o)}return o}ct(X3,"isPointInPolygon");function Q3(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return X3(n,e)}ct(Q3,"isPointerInGraceArea");function Of(t){return e=>e.pointerType==="mouse"?t(e):void 0}ct(Of,"whenMouse");var I8=m8,P8=g8,j8=v8,L8=k8,F8=E8,z8=q3,$8=T8,B8=D8,V8=R8,H8=Object.defineProperty,si=(t,e)=>H8(t,"name",{value:e,configurable:!0}),Cy="DropdownMenu",[U8,XY]=ko(Cy,[B3]),ai=B3(),[W8,eE]=U8(Cy),q8=si(t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=t,u=ai(e),d=S.useRef(null),[h,p]=Ks({prop:o,defaultProp:i??!1,onChange:s,caller:Cy});return v.jsx(W8,{scope:e,triggerId:po(),triggerRef:d,contentId:po(),open:h,onOpenChange:p,onOpenToggle:S.useCallback(()=>p(m=>!m),[p]),modal:l,children:v.jsx(I8,{...u,open:h,onOpenChange:p,dir:r,modal:l,children:n})})},"DropdownMenu"),K8="DropdownMenuTrigger",G8=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=eE(K8,r),l=ai(r),u=rt(n,s.triggerRef);return v.jsx(P8,{asChild:!0,...l,children:v.jsx(ot.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:u,onPointerDown:Ne(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(s.onOpenToggle(),s.open||d.preventDefault())}),onKeyDown:Ne(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&s.onOpenToggle(),d.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})},"DropdownMenuTrigger")),Z8=si(t=>{const{__scopeDropdownMenu:e,...n}=t,r=ai(e);return v.jsx(j8,{...r,...n})},"DropdownMenuPortal"),J8="DropdownMenuContent",Y8=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,...o}=e,i=eE(J8,r),s=ai(r),l=S.useRef(!1);return v.jsx(L8,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:n,onCloseAutoFocus:Ne(e.onCloseAutoFocus,u=>{var d;l.current||(d=i.triggerRef.current)==null||d.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:Ne(e.onInteractOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,p=d.button===2||h;(!i.modal||p)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),X8=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,...o}=e,i=ai(r);return v.jsx(F8,{...i,...o,ref:n})},"DropdownMenuLabel")),Q8=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,...o}=e,i=ai(r);return v.jsx(z8,{...i,...o,ref:n})},"DropdownMenuItem")),eO=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,...o}=e,i=ai(r);return v.jsx($8,{...i,...o,ref:n})},"DropdownMenuCheckboxItem")),tO=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,...o}=e,i=ai(r);return v.jsx(B8,{...i,...o,ref:n})},"DropdownMenuItemIndicator")),nO=S.forwardRef(si(function(e,n){const{__scopeDropdownMenu:r,...o}=e,i=ai(r);return v.jsx(V8,{...i,...o,ref:n})},"DropdownMenuSeparator")),rO=q8,oO=G8,iO=Z8,sO=Y8,aO=X8,lO=Q8,uO=eO,cO=tO,dO=nO,fO=Object.defineProperty,hO=(t,e)=>fO(t,"name",{value:e,configurable:!0}),pO=S.forwardRef(hO(function(e,n){return v.jsx(ot.label,{...e,ref:n,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),mO=pO,gO=Object.defineProperty,yO=(t,e)=>gO(t,"name",{value:e,configurable:!0});function tE(t){const e=S.useRef({value:t,previous:t});return S.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}yO(tE,"usePrevious");var xO=Object.defineProperty,vO=(t,e)=>xO(t,"name",{value:e,configurable:!0});function Yg(t,[e,n]){return Math.min(n,Math.max(e,t))}vO(Yg,"clamp");var bO=Object.defineProperty,Xe=(t,e)=>bO(t,"name",{value:e,configurable:!0}),kO=[" ","Enter","ArrowUp","ArrowDown"],wO=[" ","Enter"],Xa="Select",[tp,np,CO]=$h(Xa),[sa,QY]=ko(Xa,[CO,vl]),Sy=vl(),[SO,ls]=sa(Xa),[EO,_O]=sa(Xa);function nE(t){const{__scopeSelect:e,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:l,onValueChange:u,dir:d,name:h,autoComplete:p,disabled:m,required:y,form:x,internal_do_not_use_render:b}=t,w=Sy(e),[E,_]=S.useState(null),[A,M]=S.useState(null),[N,D]=S.useState(!1),O=Bh(d),[I,L]=Ks({prop:r,defaultProp:o??!1,onChange:i,caller:Xa}),[W,Y]=Ks({prop:s,defaultProp:l,onChange:u,caller:Xa}),G=S.useRef(null),q=S.useRef(W);S.useEffect(()=>{const B=x?E==null?void 0:E.ownerDocument.getElementById(x):E==null?void 0:E.form;if(B instanceof HTMLFormElement){const ne=Xe(()=>Y(q.current),"reset");return B.addEventListener("reset",ne),()=>B.removeEventListener("reset",ne)}},[x,E,Y]);const Z=E?!!x||!!E.closest("form"):!0,[Q,K]=S.useState(new Set),J=po(),U=Array.from(Q).map(B=>B.props.value).join(";"),ee=S.useCallback(B=>{K(ne=>new Set(ne).add(B))},[]),F=S.useCallback(B=>{K(ne=>{const fe=new Set(ne);return fe.delete(B),fe})},[]),P={required:y,trigger:E,onTriggerChange:_,valueNode:A,onValueNodeChange:M,valueNodeHasChildren:N,onValueNodeHasChildrenChange:D,contentId:J,value:W,onValueChange:Y,open:I,onOpenChange:L,dir:O,triggerPointerDownPosRef:G,disabled:m,name:h,autoComplete:p,form:x,nativeOptions:Q,nativeSelectKey:U,isFormControl:Z};return v.jsx(my,{...w,children:v.jsx(SO,{scope:e,...P,children:v.jsx(tp.Provider,{scope:e,children:v.jsx(EO,{scope:e,onNativeOptionAdd:ee,onNativeOptionRemove:F,children:sE(b)?b(P):n})})})})}Xe(nE,"SelectProvider");var TO=Xe(t=>{const{__scopeSelect:e,children:n,...r}=t;return v.jsx(nE,{__scopeSelect:e,...r,internal_do_not_use_render:({isFormControl:o})=>v.jsxs(v.Fragment,{children:[n,o?v.jsx(QO,{__scopeSelect:e}):null]})})},"Select"),AO="SelectTrigger",MO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,disabled:o=!1,...i}=e,s=Sy(r),l=ls(AO,r),u=l.disabled||o,d=rt(n,l.onTriggerChange),h=np(r),p=S.useRef("touch"),[m,y,x]=_y(w=>{const E=h().filter(M=>!M.disabled),_=E.find(M=>M.value===l.value),A=Ty(E,w,_);A!==void 0&&l.onValueChange(A.value)}),b=Xe(w=>{u||(l.onOpenChange(!0),x()),w&&(l.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})},"handleOpen");return v.jsx(gy,{asChild:!0,...s,children:v.jsx(ot.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":gc(l.value)?"":void 0,...i,ref:d,onClick:Ne(i.onClick,w=>{w.currentTarget.focus(),p.current!=="mouse"&&b(w)}),onPointerDown:Ne(i.onPointerDown,w=>{p.current=w.pointerType;const E=w.target;E.hasPointerCapture(w.pointerId)&&E.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(b(w),w.preventDefault())}),onKeyDown:Ne(i.onKeyDown,w=>{const E=m.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&y(w.key),!(E&&w.key===" ")&&kO.includes(w.key)&&(b(),w.preventDefault())})})})},"SelectTrigger")),NO="SelectValue",DO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,className:o,style:i,children:s,placeholder:l="",...u}=e,d=ls(NO,r),{onValueNodeHasChildrenChange:h}=d,p=s!==void 0,m=rt(n,d.onValueNodeChange);Rt(()=>{h(p)},[h,p]);const y=gc(d.value);return v.jsx(ot.span,{...u,asChild:y?!1:u.asChild,ref:m,style:{pointerEvents:"none"},children:v.jsx(S.Fragment,{children:y?l:s},y?"placeholder":"value")})},"SelectValue")),RO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,children:o,...i}=e;return v.jsx(ot.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})},"SelectIcon")),OO="SelectPortal",[IO,PO]=sa(OO,{forceMount:void 0}),jO=Xe(t=>{const{__scopeSelect:e,forceMount:n,...r}=t;return v.jsx(IO,{scope:t.__scopeSelect,forceMount:n,children:v.jsx(Hh,{asChild:!0,...r})})},"SelectPortal"),Js="SelectContent",LO=S.forwardRef(Xe(function(e,n){const r=PO(Js,e.__scopeSelect),{forceMount:o=r.forceMount,...i}=e,s=ls(Js,e.__scopeSelect),[l,u]=S.useState();return Rt(()=>{u(new DocumentFragment)},[]),v.jsx(oi,{present:o||s.open,children:({present:d})=>d?v.jsx($O,{...i,ref:n}):v.jsx(FO,{...i,fragment:l})})},"SelectContent")),FO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,children:o,fragment:i}=e;return i?$r.createPortal(v.jsx(rE,{scope:r,children:v.jsx(tp.Slot,{scope:r,children:v.jsx("div",{ref:n,children:o})})}),i):null},"SelectContentFragment")),Fr=10,[rE,aa]=sa(Js),zO=yo("SelectContent.RemoveScroll"),$O=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r}=e,{position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:y,collisionPadding:x,sticky:b,hideWhenDetached:w,avoidCollisions:E,..._}=e,A=ls(Js,r),[M,N]=S.useState(null),[D,O]=S.useState(null),I=rt(n,N),[L,W]=S.useState(null),[Y,G]=S.useState(null),q=np(r),[Z,Q]=S.useState(!1),K=S.useRef(!1);S.useEffect(()=>{if(M)return sy(M)},[M]),pc();const J=S.useCallback(X=>{const[ce,...pe]=q().map(ze=>ze.ref.current),[Le]=pe.slice(-1),Me=document.activeElement;for(const ze of X)if(ze===Me||(ze==null||ze.scrollIntoView({block:"nearest"}),ze===ce&&D&&(D.scrollTop=0),ze===Le&&D&&(D.scrollTop=D.scrollHeight),ze==null||ze.focus(),document.activeElement!==Me))return},[q,D]),U=S.useCallback(()=>J([L,M]),[J,L,M]);S.useEffect(()=>{Z&&U()},[Z,U]);const{onOpenChange:ee,triggerPointerDownPosRef:F}=A;S.useEffect(()=>{if(M){let X={x:0,y:0};const ce=Xe(Le=>{var Me,ze;X={x:Math.abs(Math.round(Le.pageX)-(((Me=F.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Le.pageY)-(((ze=F.current)==null?void 0:ze.y)??0))}},"handlePointerMove"),pe=Xe(Le=>{X.x<=10&&X.y<=10?Le.preventDefault():Le.composedPath().includes(M)||ee(!1),document.removeEventListener("pointermove",ce),F.current=null},"handlePointerUp");return F.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",pe,{capture:!0})}}},[M,ee,F]),S.useEffect(()=>{const X=Xe(()=>ee(!1),"close");return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[ee]);const[P,B]=_y(X=>{const ce=q().filter(Me=>!Me.disabled),pe=ce.find(Me=>Me.ref.current===document.activeElement),Le=Ty(ce,X,pe);Le&&setTimeout(()=>{var Me;return(Me=Le.ref.current)==null?void 0:Me.focus()})}),ne=S.useCallback((X,ce,pe)=>{const Le=!K.current&&!pe;(A.value!==void 0&&A.value===ce||Le)&&(W(X),Le&&(K.current=!0))},[A.value]),fe=S.useCallback(()=>M==null?void 0:M.focus(),[M]),ue=S.useCallback((X,ce,pe)=>{const Le=!K.current&&!pe;(A.value!==void 0&&A.value===ce||Le)&&G(X)},[A.value]),he=o==="popper"?mk:BO,Ae=he===mk?{side:u,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:y,collisionPadding:x,sticky:b,hideWhenDetached:w,avoidCollisions:E}:{};return v.jsx(rE,{scope:r,content:M,viewport:D,onViewportChange:O,itemRefCallback:ne,selectedItem:L,onItemLeave:fe,itemTextRefCallback:ue,focusSelectedItem:U,selectedItemText:Y,position:o,isPositioned:Z,searchRef:P,children:v.jsx(Wh,{as:zO,allowPinchZoom:!0,children:v.jsx(ry,{asChild:!0,trapped:A.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Ne(i,X=>{var ce;(ce=A.trigger)==null||ce.focus({preventScroll:!0}),X.preventDefault()}),children:v.jsx(Vh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:v.jsx(he,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:X=>X.preventDefault(),..._,...Ae,onPlaced:()=>Q(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Ne(_.onKeyDown,X=>{const ce=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!ce&&X.key.length===1&&B(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let Le=q().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(X.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const Me=X.target,ze=Le.indexOf(Me);Le=Le.slice(ze+1)}setTimeout(()=>J(Le)),X.preventDefault()}})})})})})})},"SelectContentImpl")),BO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,onPlaced:o,...i}=e,s=ls(Js,r),l=aa(Js,r),[u,d]=S.useState(null),[h,p]=S.useState(null),m=rt(n,p),y=np(r),x=S.useRef(!1),b=S.useRef(!0),{viewport:w,selectedItem:E,selectedItemText:_,focusSelectedItem:A}=l,M=S.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&h&&w&&E&&_){const I=s.trigger.getBoundingClientRect(),L=h.getBoundingClientRect(),W=s.valueNode.getBoundingClientRect(),Y=_.getBoundingClientRect();if(s.dir!=="rtl"){const Me=Y.left-L.left,ze=W.left-Me,Je=I.left-ze,At=I.width+Je,Pt=Math.max(At,L.width),Ht=window.innerWidth-Fr,Ln=Yg(ze,[Fr,Math.max(Fr,Ht-Pt)]);u.style.minWidth=At+"px",u.style.left=Ln+"px"}else{const Me=L.right-Y.right,ze=window.innerWidth-W.right-Me,Je=window.innerWidth-I.right-ze,At=I.width+Je,Pt=Math.max(At,L.width),Ht=window.innerWidth-Fr,Ln=Yg(ze,[Fr,Math.max(Fr,Ht-Pt)]);u.style.minWidth=At+"px",u.style.right=Ln+"px"}const G=y(),q=window.innerHeight-Fr*2,Z=w.scrollHeight,Q=window.getComputedStyle(h),K=parseInt(Q.borderTopWidth,10),J=parseInt(Q.paddingTop,10),U=parseInt(Q.borderBottomWidth,10),ee=parseInt(Q.paddingBottom,10),F=K+J+Z+ee+U,P=Math.min(E.offsetHeight*5,F),B=window.getComputedStyle(w),ne=parseInt(B.paddingTop,10),fe=parseInt(B.paddingBottom,10),ue=I.top+I.height/2-Fr,he=q-ue,Ae=E.offsetHeight/2,X=E.offsetTop+Ae,ce=K+J+X,pe=F-ce;if(ce<=ue){const Me=G.length>0&&E===G[G.length-1].ref.current;u.style.bottom="0px";const ze=h.clientHeight-w.offsetTop-w.offsetHeight,Je=Math.max(he,Ae+(Me?fe:0)+ze+U),At=ce+Je;u.style.height=At+"px"}else{const Me=G.length>0&&E===G[0].ref.current;u.style.top="0px";const Je=Math.max(ue,K+w.offsetTop+(Me?ne:0)+Ae)+pe;u.style.height=Je+"px",w.scrollTop=ce-ue+w.offsetTop}u.style.margin=`${Fr}px 0`,u.style.minHeight=P+"px",u.style.maxHeight=q+"px",o==null||o(),requestAnimationFrame(()=>x.current=!0)}},[y,s.trigger,s.valueNode,u,h,w,E,_,s.dir,o]);Rt(()=>M(),[M]);const[N,D]=S.useState();Rt(()=>{h&&D(window.getComputedStyle(h).zIndex)},[h]);const O=S.useCallback(I=>{I&&b.current===!0&&(M(),A==null||A(),b.current=!1)},[M,A]);return v.jsx(VO,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:O,children:v.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:v.jsx(ot.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),mk=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,align:o="start",collisionPadding:i=Fr,...s}=e,l=Sy(r);return v.jsx(yy,{...l,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[VO,Ey]=sa(Js,{}),gk="SelectViewport",HO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,nonce:o,...i}=e,s=aa(gk,r),l=Ey(gk,r),u=rt(n,s.onViewportChange),d=S.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),v.jsx(tp.Slot,{scope:r,children:v.jsx(ot.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ne(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:y}=l;if(y!=null&&y.current&&m){const x=Math.abs(d.current-p.scrollTop);if(x>0){const b=window.innerHeight-Fr*2,w=parseFloat(m.style.minHeight),E=parseFloat(m.style.height),_=Math.max(w,E);if(_<b){const A=_+x,M=Math.min(b,A),N=A-M;m.style.height=M+"px",m.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})},"SelectViewport")),UO="SelectGroup",[eX,tX]=sa(UO),Xg="SelectItem",[WO,oE]=sa(Xg),qO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...l}=e,u=ls(Xg,r),d=aa(Xg,r),h=u.value===o,[p,m]=S.useState(s??""),[y,x]=S.useState(!1),b=Ar(M=>{var N;return(N=d.itemRefCallback)==null?void 0:N.call(d,M,o,i)}),w=rt(n,b),E=po(),_=S.useRef("touch"),A=Xe(()=>{i||(u.onValueChange(o),u.onOpenChange(!1))},"handleSelect");return v.jsx(WO,{scope:r,value:o,disabled:i,textId:E,isSelected:h,onItemTextChange:S.useCallback(M=>{m(N=>N||((M==null?void 0:M.textContent)??"").trim())},[]),children:v.jsx(tp.ItemSlot,{scope:r,value:o,disabled:i,textValue:p,children:v.jsx(ot.div,{role:"option","aria-labelledby":E,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:Ne(l.onFocus,()=>x(!0)),onBlur:Ne(l.onBlur,()=>x(!1)),onClick:Ne(l.onClick,()=>{_.current!=="mouse"&&A()}),onPointerUp:Ne(l.onPointerUp,()=>{_.current==="mouse"&&A()}),onPointerDown:Ne(l.onPointerDown,M=>{_.current=M.pointerType}),onPointerMove:Ne(l.onPointerMove,M=>{var N;_.current=M.pointerType,i?(N=d.onItemLeave)==null||N.call(d):_.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(l.onPointerLeave,M=>{var N;M.currentTarget===document.activeElement&&((N=d.onItemLeave)==null||N.call(d))}),onKeyDown:Ne(l.onKeyDown,M=>{var D;i||M.target!==M.currentTarget||((D=d.searchRef)==null?void 0:D.current)!==""&&M.key===" "||(wO.includes(M.key)&&A(),M.key===" "&&M.preventDefault())})})})})},"SelectItem")),qd="SelectItemText",KO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,className:o,style:i,...s}=e,l=ls(qd,r),u=aa(qd,r),d=oE(qd,r),h=_O(qd,r),[p,m]=S.useState(null),y=Ar(A=>{var M;return(M=u.itemTextRefCallback)==null?void 0:M.call(u,A,d.value,d.disabled)}),x=rt(n,m,d.onItemTextChange,y),b=p==null?void 0:p.textContent,w=S.useMemo(()=>v.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:E,onNativeOptionRemove:_}=h;return Rt(()=>(E(w),()=>_(w)),[E,_,w]),v.jsxs(v.Fragment,{children:[v.jsx(ot.span,{id:d.textId,...s,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!gc(l.value)?$r.createPortal(s.children,l.valueNode):null]})},"SelectItemText")),GO="SelectItemIndicator",ZO=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,...o}=e;return oE(GO,r).isSelected?v.jsx(ot.span,{"aria-hidden":!0,...o,ref:n}):null},"SelectItemIndicator")),yk="SelectScrollUpButton",JO=S.forwardRef(Xe(function(e,n){const r=aa(yk,e.__scopeSelect),o=Ey(yk,e.__scopeSelect),[i,s]=S.useState(!1),l=rt(n,o.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const h=d.scrollTop>0;s(h)};Xe(u,"handleScroll");const d=r.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?v.jsx(iE,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=r;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null},"SelectScrollUpButton")),xk="SelectScrollDownButton",YO=S.forwardRef(Xe(function(e,n){const r=aa(xk,e.__scopeSelect),o=Ey(xk,e.__scopeSelect),[i,s]=S.useState(!1),l=rt(n,o.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;s(p)};Xe(u,"handleScroll");const d=r.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?v.jsx(iE,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=r;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null},"SelectScrollDownButton")),iE=S.forwardRef(Xe(function(e,n){const{__scopeSelect:r,onAutoScroll:o,...i}=e,s=aa("SelectScrollButton",r),l=S.useRef(null),u=np(r),d=S.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return S.useEffect(()=>()=>d(),[d]),Rt(()=>{var p;const h=u().find(m=>m.ref.current===document.activeElement);(p=h==null?void 0:h.ref.current)==null||p.scrollIntoView({block:"nearest"})},[u]),v.jsx(ot.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:Ne(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(o,50))}),onPointerMove:Ne(i.onPointerMove,()=>{var h;(h=s.onItemLeave)==null||h.call(s),l.current===null&&(l.current=window.setInterval(o,50))}),onPointerLeave:Ne(i.onPointerLeave,()=>{d()})})},"SelectScrollButtonImpl")),XO="SelectBubbleInput",QO=S.forwardRef(Xe(function({__scopeSelect:e,...n},r){const o=ls(XO,e),{value:i,onValueChange:s,required:l,disabled:u,name:d,autoComplete:h,form:p}=o,{nativeOptions:m,nativeSelectKey:y}=o,x=S.useRef(null),b=rt(r,x),w=i??"",E=tE(w),_=Array.from(m).some(A=>(A.props.value??"")==="");return S.useEffect(()=>{const A=x.current;if(!A)return;const M=window.HTMLSelectElement.prototype,D=Object.getOwnPropertyDescriptor(M,"value").set;if(E!==w&&D){const O=new Event("change",{bubbles:!0});D.call(A,w),A.dispatchEvent(O)}},[E,w]),v.jsxs(ot.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:d,autoComplete:h,disabled:u,form:p,onChange:A=>s(A.target.value),...n,style:{...NS,...n.style},ref:b,defaultValue:w,children:[gc(i)&&!_?v.jsx("option",{value:""}):null,Array.from(m)]},y)},"SelectBubbleInput"));function sE(t){return typeof t=="function"}Xe(sE,"isFunction");function gc(t){return t===""||t===void 0}Xe(gc,"shouldShowPlaceholder");function _y(t){const e=Ar(t),n=S.useRef(""),r=S.useRef(0),o=S.useCallback(s=>{const l=n.current+s;e(l),Xe((function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}),"updateSearch")(l)},[e]),i=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}Xe(_y,"useTypeaheadSearch");function Ty(t,e,n){const o=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=aE(t,Math.max(i,0));o.length===1&&(s=s.filter(d=>d!==n));const u=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}Xe(Ty,"findNextItem");function aE(t,e){return t.map((n,r)=>t[(e+r)%t.length])}Xe(aE,"wrapArray");var eI=Object.defineProperty,Yt=(t,e)=>eI(t,"name",{value:e,configurable:!0}),[Ay,nX]=ko("Tooltip",[vl]),rp=vl(),tI="TooltipProvider",nI=700,Qg="tooltip.open",[rI,My]=Ay(tI),oI=Yt(t=>{const{__scopeTooltip:e,delayDuration:n=nI,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=t,s=S.useRef(!0),l=S.useRef(!1),u=S.useRef(0);return S.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),v.jsx(rI,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:S.useCallback(()=>{r<=0||(window.clearTimeout(u.current),s.current=!1)},[r]),onClose:S.useCallback(()=>{r<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:l,onPointerInTransitChange:S.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:i})},"TooltipProvider"),e1="Tooltip",[iI,yc]=Ay(e1),sI=Yt(t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=t,u=My(e1,t.__scopeTooltip),d=rp(e),[h,p]=S.useState(null),[m,y]=S.useState(void 0),x=po(),b=S.useRef(0),w=s??u.disableHoverableContent,E=l??u.delayDuration,_=S.useRef(!1),[A,M]=Ks({prop:r,defaultProp:o??!1,onChange:Yt(W=>{W?(u.onOpen(),document.dispatchEvent(new CustomEvent(Qg))):u.onClose(),i==null||i(W)},"onChange"),caller:e1}),N=S.useMemo(()=>A?_.current?"delayed-open":"instant-open":"closed",[A]),D=S.useCallback(()=>{window.clearTimeout(b.current),b.current=0,_.current=!1,M(!0)},[M]),O=S.useCallback(()=>{window.clearTimeout(b.current),b.current=0,M(!1)},[M]),I=S.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{_.current=!0,M(!0),b.current=0},E)},[E,M]);S.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]);const L=m??x;return v.jsx(my,{...d,children:v.jsx(iI,{scope:e,contentId:L,setContentId:y,open:A,stateAttribute:N,trigger:h,onTriggerChange:p,onTriggerEnter:S.useCallback(()=>{u.isOpenDelayedRef.current?I():D()},[u.isOpenDelayedRef,I,D]),onTriggerLeave:S.useCallback(()=>{w?O():(window.clearTimeout(b.current),b.current=0)},[O,w]),onOpen:D,onClose:O,disableHoverableContent:w,children:n})})},"Tooltip"),vk="TooltipTrigger",aI=S.forwardRef(Yt(function(e,n){const{__scopeTooltip:r,...o}=e,i=yc(vk,r),s=My(vk,r),l=rp(r),u=S.useRef(null),d=rt(n,u,i.onTriggerChange),h=S.useRef(!1),p=S.useRef(!1),m=S.useCallback(()=>h.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),v.jsx(gy,{asChild:!0,...l,children:v.jsx(ot.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:d,onPointerMove:Ne(e.onPointerMove,y=>{y.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ne(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:Ne(e.onBlur,i.onClose),onClick:Ne(e.onClick,i.onClose)})})},"TooltipTrigger")),lE="TooltipPortal",[lI,uI]=Ay(lE,{forceMount:void 0}),cI=Yt(t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:o}=t,i=yc(lE,e);return v.jsx(lI,{scope:e,forceMount:n,children:v.jsx(oi,{present:n||i.open,children:v.jsx(Hh,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Bu="TooltipContent",dI=S.forwardRef(Yt(function(e,n){const r=uI(Bu,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=e,l=yc(Bu,e.__scopeTooltip);return v.jsx(oi,{present:o||l.open,children:l.disableHoverableContent?v.jsx(uE,{side:i,...s,ref:n}):v.jsx(fI,{side:i,...s,ref:n})})},"TooltipContent")),fI=S.forwardRef(Yt(function(e,n){const r=yc(Bu,e.__scopeTooltip),o=My(Bu,e.__scopeTooltip),i=S.useRef(null),s=rt(n,i),[l,u]=S.useState(null),{trigger:d,onClose:h}=r,p=i.current,{onPointerInTransitChange:m}=o,y=S.useCallback(()=>{u(null),m(!1)},[m]),x=S.useCallback((b,w)=>{const E=b.currentTarget,_={x:b.clientX,y:b.clientY},A=cE(_,E.getBoundingClientRect()),M=dE(_,A),N=fE(w.getBoundingClientRect()),D=pE([...M,...N]);u(D),m(!0)},[m]);return S.useEffect(()=>()=>y(),[y]),S.useEffect(()=>{if(d&&p){const b=Yt(E=>x(E,p),"handleTriggerLeave"),w=Yt(E=>x(E,d),"handleContentLeave");return d.addEventListener("pointerleave",b),p.addEventListener("pointerleave",w),()=>{d.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",w)}}},[d,p,x,y]),S.useEffect(()=>{if(l){const b=Yt(w=>{const E=w.target,_={x:w.clientX,y:w.clientY},A=(d==null?void 0:d.contains(E))||(p==null?void 0:p.contains(E)),M=!hE(_,l);A?y():M&&(y(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[d,p,l,h,y]),v.jsx(uE,{...e,ref:s})},"TooltipContentHoverable")),hI=ES("TooltipContent"),uE=S.forwardRef(Yt(function(e,n){const{__scopeTooltip:r,children:o,"aria-label":i,id:s,onEscapeKeyDown:l,onPointerDownOutside:u,...d}=e,h=yc(Bu,r),p=rp(r),{onClose:m}=h;S.useEffect(()=>(document.addEventListener(Qg,m),()=>document.removeEventListener(Qg,m)),[m]),S.useEffect(()=>{if(h.trigger){const x=Yt(b=>{b.target instanceof Node&&b.target.contains(h.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[h.trigger,m]);const{setContentId:y}=h;return Rt(()=>(y(s),()=>{y(void 0)}),[s,y]),v.jsx(Vh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:v.jsxs(yy,{"data-state":h.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:h.contentId,...p,...d,ref:n,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(hI,{children:o}),i?v.jsx(VN,{id:h.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl")),pI=S.forwardRef(Yt(function(e,n){const{__scopeTooltip:r,...o}=e,i=rp(r);return v.jsx(WR,{...i,...o,ref:n})},"TooltipArrow"));function cE(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}Yt(cE,"getExitSideFromRect");function dE(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}Yt(dE,"getPaddedExitPoints");function fE(t){const{top:e,right:n,bottom:r,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:r},{x:o,y:r}]}Yt(fE,"getPointsFromRect");function hE(t,e){const{x:n,y:r}=t;let o=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const l=e[i],u=e[s],d=l.x,h=l.y,p=u.x,m=u.y;h>r!=m>r&&n<(p-d)*(r-h)/(m-h)+d&&(o=!o)}return o}Yt(hE,"isPointInPolygon");function pE(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mE(e)}Yt(pE,"getHull");function mE(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const o=t[r];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const o=t[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}Yt(mE,"getHullPresorted");var mI=oI,gI=sI,yI=aI,xI=cI,vI=dI,bI=pI;const kI=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},wI=(t,e)=>({classGroupId:t,validator:e}),gE=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),If="-",bk=[],CI="arbitrary..",SI=t=>{const e=_I(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return EI(s);const l=s.split(If),u=l[0]===""&&l.length>1?1:0;return yE(l,u,e)},getConflictingClassGroupIds:(s,l)=>{if(l){const u=r[s],d=n[s];return u?d?kI(d,u):u:d||bk}return n[s]||bk}}},yE=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],i=n.nextPart.get(o);if(i){const d=yE(t,e+1,i);if(d)return d}const s=n.validators;if(s===null)return;const l=e===0?t.join(If):t.slice(e).join(If),u=s.length;for(let d=0;d<u;d++){const h=s[d];if(h.validator(l))return h.classGroupId}},EI=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?CI+r:void 0})(),_I=t=>{const{theme:e,classGroups:n}=t;return TI(n,e)},TI=(t,e)=>{const n=gE();for(const r in t){const o=t[r];Ny(o,n,r,e)}return n},Ny=(t,e,n,r)=>{const o=t.length;for(let i=0;i<o;i++){const s=t[i];AI(s,e,n,r)}},AI=(t,e,n,r)=>{if(typeof t=="string"){MI(t,e,n);return}if(typeof t=="function"){NI(t,e,n,r);return}DI(t,e,n,r)},MI=(t,e,n)=>{const r=t===""?e:xE(e,t);r.classGroupId=n},NI=(t,e,n,r)=>{if(RI(t)){Ny(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(wI(n,t))},DI=(t,e,n,r)=>{const o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){const[l,u]=o[s];Ny(u,xE(e,l),n,r)}},xE=(t,e)=>{let n=t;const r=e.split(If),o=r.length;for(let i=0;i<o;i++){const s=r[i];let l=n.nextPart.get(s);l||(l=gE(),n.nextPart.set(s,l)),n=l}return n},RI=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,OI=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},t1="!",kk=":",II=[],wk=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),PI=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const i=[];let s=0,l=0,u=0,d;const h=o.length;for(let b=0;b<h;b++){const w=o[b];if(s===0&&l===0){if(w===kk){i.push(o.slice(u,b)),u=b+1;continue}if(w==="/"){d=b;continue}}w==="["?s++:w==="]"?s--:w==="("?l++:w===")"&&l--}const p=i.length===0?o:o.slice(u);let m=p,y=!1;p.endsWith(t1)?(m=p.slice(0,-1),y=!0):p.startsWith(t1)&&(m=p.slice(1),y=!0);const x=d&&d>u?d-u:void 0;return wk(i,y,m,x)};if(e){const o=e+kk,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):wk(II,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},jI=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],l=s[0]==="[",u=e.has(s);l||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},LI=t=>({cache:OI(t.cacheSize),parseClassName:PI(t),sortModifiers:jI(t),postfixLookupClassGroupIds:FI(t),...SI(t)}),FI=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},zI=/\s+/,$I=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=e,l=[],u=t.trim().split(zI);let d="";for(let h=u.length-1;h>=0;h-=1){const p=u[h],{isExternal:m,modifiers:y,hasImportantModifier:x,baseClassName:b,maybePostfixModifierPosition:w}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let E=!!w,_;if(E){const O=b.substring(0,w);_=r(O);const I=_&&s[_]?r(b):void 0;I&&I!==_&&(_=I,E=!1)}else _=r(b);if(!_){if(!E){d=p+(d.length>0?" "+d:d);continue}if(_=r(b),!_){d=p+(d.length>0?" "+d:d);continue}E=!1}const A=y.length===0?"":y.length===1?y[0]:i(y).join(":"),M=x?A+t1:A,N=M+_;if(l.indexOf(N)>-1)continue;l.push(N);const D=o(_,E);for(let O=0;O<D.length;++O){const I=D[O];l.push(M+I)}d=p+(d.length>0?" "+d:d)}return d},BI=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=vE(n))&&(o&&(o+=" "),o+=r);return o},vE=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=vE(t[r]))&&(n&&(n+=" "),n+=e);return n},VI=(t,...e)=>{let n,r,o,i;const s=u=>{const d=e.reduce((h,p)=>p(h),t());return n=LI(d),r=n.cache.get,o=n.cache.set,i=l,l(u)},l=u=>{const d=r(u);if(d)return d;const h=$I(u,n);return o(u,h),h};return i=s,(...u)=>i(BI(...u))},HI=[],Zt=t=>{const e=n=>n[t]||HI;return e.isThemeGetter=!0,e},bE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,WI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qI=/\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$/,KI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mi=t=>UI.test(t),Ue=t=>!!t&&!Number.isNaN(Number(t)),no=t=>!!t&&Number.isInteger(Number(t)),Om=t=>t.endsWith("%")&&Ue(t.slice(0,-1)),Lo=t=>WI.test(t),wE=()=>!0,JI=t=>qI.test(t)&&!KI.test(t),Dy=()=>!1,YI=t=>GI.test(t),XI=t=>ZI.test(t),QI=t=>!xe(t)&&!be(t),eP=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),tP=t=>us(t,EE,Dy),xe=t=>bE.test(t),Ns=t=>us(t,_E,JI),Ck=t=>us(t,uP,Ue),nP=t=>us(t,AE,wE),rP=t=>us(t,TE,Dy),Sk=t=>us(t,CE,Dy),oP=t=>us(t,SE,XI),Kd=t=>us(t,ME,YI),be=t=>kE.test(t),su=t=>la(t,_E),iP=t=>la(t,TE),Ek=t=>la(t,CE),sP=t=>la(t,EE),aP=t=>la(t,SE),Gd=t=>la(t,ME,!0),lP=t=>la(t,AE,!0),us=(t,e,n)=>{const r=bE.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},la=(t,e,n=!1)=>{const r=kE.exec(t);return r?r[1]?e(r[1]):n:!1},CE=t=>t==="position"||t==="percentage",SE=t=>t==="image"||t==="url",EE=t=>t==="length"||t==="size"||t==="bg-size",_E=t=>t==="length",uP=t=>t==="number",TE=t=>t==="family-name",AE=t=>t==="number"||t==="weight",ME=t=>t==="shadow",cP=()=>{const t=Zt("color"),e=Zt("font"),n=Zt("text"),r=Zt("font-weight"),o=Zt("tracking"),i=Zt("leading"),s=Zt("breakpoint"),l=Zt("container"),u=Zt("spacing"),d=Zt("radius"),h=Zt("shadow"),p=Zt("inset-shadow"),m=Zt("text-shadow"),y=Zt("drop-shadow"),x=Zt("blur"),b=Zt("perspective"),w=Zt("aspect"),E=Zt("ease"),_=Zt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...M(),be,xe],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],I=()=>[be,xe,u],L=()=>[Mi,"full","auto",...I()],W=()=>[no,"none","subgrid",be,xe],Y=()=>["auto",{span:["full",no,be,xe]},no,be,xe],G=()=>[no,"auto",be,xe],q=()=>["auto","min","max","fr",be,xe],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...I()],J=()=>[Mi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],U=()=>[Mi,"screen","full","dvw","lvw","svw","min","max","fit",...I()],ee=()=>[Mi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],F=()=>[t,be,xe],P=()=>[...M(),Ek,Sk,{position:[be,xe]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",sP,tP,{size:[be,xe]}],fe=()=>[Om,su,Ns],ue=()=>["","none","full",d,be,xe],he=()=>["",Ue,su,Ns],Ae=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[Ue,Om,Ek,Sk],pe=()=>["","none",x,be,xe],Le=()=>["none",Ue,be,xe],Me=()=>["none",Ue,be,xe],ze=()=>[Ue,be,xe],Je=()=>[Mi,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Lo],breakpoint:[Lo],color:[wE],container:[Lo],"drop-shadow":[Lo],ease:["in","out","in-out"],font:[QI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Lo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Lo],shadow:[Lo],spacing:["px",Ue],text:[Lo],"text-shadow":[Lo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mi,xe,be,w]}],container:["container"],"container-type":[{"@container":["","normal","size",be,xe]}],"container-named":[eP],columns:[{columns:[Ue,xe,be,l]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:N()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[no,"auto",be,xe]}],basis:[{basis:[Mi,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,Mi,"auto","initial","none",xe]}],grow:[{grow:["",Ue,be,xe]}],shrink:[{shrink:["",Ue,be,xe]}],order:[{order:[no,"first","last","none",be,xe]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[l,"screen",...J()]}],"min-w":[{"min-w":[l,"screen","none",...J()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,su,Ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,lP,nP]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Om,xe]}],"font-family":[{font:[iP,rP,e]}],"font-features":[{"font-features":[xe]}],"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:[o,be,xe]}],"line-clamp":[{"line-clamp":[Ue,"none",be,Ck]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",be,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",be,Ns]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Ue,"auto",be,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"tab-size":[{tab:[no,be,xe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,xe]}],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",be,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},no,be,xe],radial:["",be,xe],conic:[no,be,xe]},aP,oP]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,be,xe]}],"outline-w":[{outline:["",Ue,su,Ns]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",h,Gd,Kd]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Gd,Kd]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Ue,Ns]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",m,Gd,Kd]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Ue,be,xe]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[be,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,xe]}],filter:[{filter:["","none",be,xe]}],blur:[{blur:pe()}],brightness:[{brightness:[Ue,be,xe]}],contrast:[{contrast:[Ue,be,xe]}],"drop-shadow":[{"drop-shadow":["","none",y,Gd,Kd]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Ue,be,xe]}],"hue-rotate":[{"hue-rotate":[Ue,be,xe]}],invert:[{invert:["",Ue,be,xe]}],saturate:[{saturate:[Ue,be,xe]}],sepia:[{sepia:["",Ue,be,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",be,xe]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,be,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,be,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,be,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,be,xe]}],"backdrop-invert":[{"backdrop-invert":["",Ue,be,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,be,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,be,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,be,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",be,xe]}],ease:[{ease:["linear","initial",E,be,xe]}],delay:[{delay:[Ue,be,xe]}],animate:[{animate:["none",_,be,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,be,xe]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Me()}],"scale-x":[{"scale-x":Me()}],"scale-y":[{"scale-y":Me()}],"scale-z":[{"scale-z":Me()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[be,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],zoom:[{zoom:[no,be,xe]}],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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",be,xe]}],"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":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",be,xe]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Ue,su,Ns,Ck]}],stroke:[{stroke:["none",...F()]}],"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"]}},dP=VI(cP);function De(...t){return dP(vS(t))}const fP=bS("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Qa({className:t,variant:e="default",asChild:n=!1,...r}){const o=n?CS:"span";return v.jsx(o,{"data-slot":"badge","data-variant":e,className:De(fP({variant:e}),t),...r})}const Ry=bS("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Ge=S.forwardRef(({className:t,variant:e="default",size:n="default",asChild:r=!1,...o},i)=>{const s=r?CS:"button";return v.jsx(s,{ref:i,"data-slot":"button","data-variant":e,"data-size":n,className:De(Ry({variant:e,size:n,className:t})),...o})});Ge.displayName="Button";/**
|
|
81
|
-
* @license lucide-react v1.27.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const NE=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
86
|
-
* @license lucide-react v1.27.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const hP=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
91
|
-
* @license lucide-react v1.27.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const pP=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
96
|
-
* @license lucide-react v1.27.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const _k=t=>{const e=pP(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
|
|
101
|
-
* @license lucide-react v1.27.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/var Im={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
106
|
-
* @license lucide-react v1.27.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const mP=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},gP=S.createContext({}),yP=()=>S.useContext(gP),xP=S.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},u)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:m="currentColor",className:y=""}=yP()??{},x=r??p?Number(n??h)*24/Number(e??d):n??h;return S.createElement("svg",{ref:u,...Im,width:e??d??Im.width,height:e??d??Im.height,stroke:t??m,strokeWidth:x,className:NE("lucide",y,o),...!i&&!mP(l)&&{"aria-hidden":"true"},...l},[...s.map(([b,w])=>S.createElement(b,w)),...Array.isArray(i)?i:[i]])});/**
|
|
111
|
-
* @license lucide-react v1.27.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const Oe=(t,e)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(xP,{ref:i,iconNode:e,className:NE(`lucide-${hP(_k(t))}`,`lucide-${t}`,r),...o}));return n.displayName=_k(t),n};/**
|
|
116
|
-
* @license lucide-react v1.27.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const vP=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],bP=Oe("bold",vP);/**
|
|
121
|
-
* @license lucide-react v1.27.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const kP=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],wP=Oe("book-open",kP);/**
|
|
126
|
-
* @license lucide-react v1.27.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const CP=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],op=Oe("boxes",CP);/**
|
|
131
|
-
* @license lucide-react v1.27.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const SP=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],EP=Oe("braces",SP);/**
|
|
136
|
-
* @license lucide-react v1.27.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const _P=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],TP=Oe("calendar",_P);/**
|
|
141
|
-
* @license lucide-react v1.27.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const AP=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Oy=Oe("check",AP);/**
|
|
146
|
-
* @license lucide-react v1.27.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const MP=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Iy=Oe("chevron-down",MP);/**
|
|
151
|
-
* @license lucide-react v1.27.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const NP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],DE=Oe("chevron-right",NP);/**
|
|
156
|
-
* @license lucide-react v1.27.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const DP=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],RP=Oe("chevrons-down-up",DP);/**
|
|
161
|
-
* @license lucide-react v1.27.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const OP=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],IP=Oe("chevron-up",OP);/**
|
|
166
|
-
* @license lucide-react v1.27.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const PP=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],RE=Oe("chevrons-up-down",PP);/**
|
|
171
|
-
* @license lucide-react v1.27.0 - ISC
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the ISC license.
|
|
174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const jP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],OE=Oe("circle-alert",jP);/**
|
|
176
|
-
* @license lucide-react v1.27.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* This source code is licensed under the ISC license.
|
|
179
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const LP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],FP=Oe("circle-check",LP);/**
|
|
181
|
-
* @license lucide-react v1.27.0 - ISC
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the ISC license.
|
|
184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const zP=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],$P=Oe("code",zP);/**
|
|
186
|
-
* @license lucide-react v1.27.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const BP=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],VP=Oe("download",BP);/**
|
|
191
|
-
* @license lucide-react v1.27.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const HP=[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]],UP=Oe("file-braces-corner",HP);/**
|
|
196
|
-
* @license lucide-react v1.27.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const WP=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],qP=Oe("file-braces",WP);/**
|
|
201
|
-
* @license lucide-react v1.27.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const KP=[["path",{d:"M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z",key:"1ckgky"}],["path",{d:"M20 8v12a2 2 0 0 1-2 2h-4.182",key:"1726p0"}],["path",{d:"m3.305 19.53.923-.382",key:"ao1pio"}],["path",{d:"M4 10.592V4a2 2 0 0 1 2-2h8",key:"1foop0"}],["path",{d:"m4.228 16.852-.924-.383",key:"1fv9zy"}],["path",{d:"m5.852 15.228-.383-.923",key:"1a9hc2"}],["path",{d:"m5.852 20.772-.383.924",key:"1sh9ke"}],["path",{d:"m8.148 15.228.383-.923",key:"4yu6lf"}],["path",{d:"m8.53 21.696-.382-.924",key:"18b0s9"}],["path",{d:"m9.773 16.852.922-.383",key:"ti6xop"}],["path",{d:"m9.773 19.148.922.383",key:"rws47d"}],["circle",{cx:"7",cy:"18",r:"3",key:"lvkj7j"}]],GP=Oe("file-cog",KP);/**
|
|
206
|
-
* @license lucide-react v1.27.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const ZP=[["path",{d:"M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1",key:"likhh7"}],["path",{d:"M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1",key:"17ky3x"}],["path",{d:"M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z",key:"1hyeo0"}]],JP=Oe("file-stack",ZP);/**
|
|
211
|
-
* @license lucide-react v1.27.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const YP=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],IE=Oe("file-text",YP);/**
|
|
216
|
-
* @license lucide-react v1.27.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const XP=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],PE=Oe("folder-git-2",XP);/**
|
|
221
|
-
* @license lucide-react v1.27.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const QP=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Py=Oe("grip-vertical",QP);/**
|
|
226
|
-
* @license lucide-react v1.27.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const e9=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],t9=Oe("hash",e9);/**
|
|
231
|
-
* @license lucide-react v1.27.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const n9=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],r9=Oe("heading-2",n9);/**
|
|
236
|
-
* @license lucide-react v1.27.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const o9=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],i9=Oe("heading-3",o9);/**
|
|
241
|
-
* @license lucide-react v1.27.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const s9=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],jE=Oe("image",s9);/**
|
|
246
|
-
* @license lucide-react v1.27.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const a9=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],l9=Oe("info",a9);/**
|
|
251
|
-
* @license lucide-react v1.27.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const u9=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],c9=Oe("italic",u9);/**
|
|
256
|
-
* @license lucide-react v1.27.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const d9=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],f9=Oe("layout-grid",d9);/**
|
|
261
|
-
* @license lucide-react v1.27.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const h9=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],LE=Oe("link-2",h9);/**
|
|
266
|
-
* @license lucide-react v1.27.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const p9=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],m9=Oe("list-ordered",p9);/**
|
|
271
|
-
* @license lucide-react v1.27.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const g9=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],FE=Oe("list",g9);/**
|
|
276
|
-
* @license lucide-react v1.27.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const y9=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jy=Oe("loader-circle",y9);/**
|
|
281
|
-
* @license lucide-react v1.27.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const x9=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],v9=Oe("newspaper",x9);/**
|
|
286
|
-
* @license lucide-react v1.27.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const b9=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],k9=Oe("octagon-x",b9);/**
|
|
291
|
-
* @license lucide-react v1.27.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const w9=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],C9=Oe("pen-line",w9);/**
|
|
296
|
-
* @license lucide-react v1.27.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const S9=[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],zE=Oe("pencil-ruler",S9);/**
|
|
301
|
-
* @license lucide-react v1.27.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const E9=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ys=Oe("plus",E9);/**
|
|
306
|
-
* @license lucide-react v1.27.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const _9=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],T9=Oe("quote",_9);/**
|
|
311
|
-
* @license lucide-react v1.27.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const A9=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],M9=Oe("redo-2",A9);/**
|
|
316
|
-
* @license lucide-react v1.27.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const N9=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],D9=Oe("rotate-ccw-clock",N9);/**
|
|
321
|
-
* @license lucide-react v1.27.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const R9=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],O9=Oe("rotate-ccw",R9);/**
|
|
326
|
-
* @license lucide-react v1.27.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const I9=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],P9=Oe("rows-3",I9);/**
|
|
331
|
-
* @license lucide-react v1.27.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const j9=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],L9=Oe("search-x",j9);/**
|
|
336
|
-
* @license lucide-react v1.27.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const F9=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],z9=Oe("search",F9);/**
|
|
341
|
-
* @license lucide-react v1.27.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const $9=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],B9=Oe("toggle-left",$9);/**
|
|
346
|
-
* @license lucide-react v1.27.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const V9=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$E=Oe("trash-2",V9);/**
|
|
351
|
-
* @license lucide-react v1.27.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const H9=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ly=Oe("triangle-alert",H9);/**
|
|
356
|
-
* @license lucide-react v1.27.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const U9=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],W9=Oe("type",U9);/**
|
|
361
|
-
* @license lucide-react v1.27.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const q9=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],K9=Oe("undo-2",q9);/**
|
|
366
|
-
* @license lucide-react v1.27.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const G9=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],BE=Oe("upload",G9);/**
|
|
371
|
-
* @license lucide-react v1.27.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const Z9=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],J9=Oe("user",Z9);/**
|
|
376
|
-
* @license lucide-react v1.27.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const Y9=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ip=Oe("x",Y9);function Fy({...t}){return v.jsx(s5,{"data-slot":"dialog",...t})}function X9({...t}){return v.jsx(l5,{"data-slot":"dialog-trigger",...t})}function Q9({...t}){return v.jsx(c5,{"data-slot":"dialog-portal",...t})}function VE({...t}){return v.jsx(ly,{"data-slot":"dialog-close",...t})}function ej({className:t,...e}){return v.jsx(d5,{"data-slot":"dialog-overlay",className:De("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...e})}function zy({className:t,children:e,showCloseButton:n=!0,...r}){return v.jsxs(Q9,{children:[v.jsx(ej,{}),v.jsxs(p5,{"data-slot":"dialog-content",className:De("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...r,children:[e,n&&v.jsx(ly,{"data-slot":"dialog-close",asChild:!0,children:v.jsxs(Ge,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[v.jsx(ip,{}),v.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function $y({className:t,...e}){return v.jsx("div",{"data-slot":"dialog-header",className:De("flex flex-col gap-2",t),...e})}function HE({className:t,showCloseButton:e=!1,children:n,...r}){return v.jsxs("div",{"data-slot":"dialog-footer",className:De("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",t),...r,children:[n,e&&v.jsx(ly,{asChild:!0,children:v.jsx(Ge,{variant:"outline",children:"Close"})})]})}function By({className:t,...e}){return v.jsx(x5,{"data-slot":"dialog-title",className:De("font-heading text-base leading-none font-medium",t),...e})}function Vy({className:t,...e}){return v.jsx(b5,{"data-slot":"dialog-description",className:De("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),...e})}function UE({...t}){return v.jsx(rO,{"data-slot":"dropdown-menu",...t})}function WE({...t}){return v.jsx(oO,{"data-slot":"dropdown-menu-trigger",...t})}function qE({className:t,align:e="start",sideOffset:n=4,...r}){return v.jsx(iO,{children:v.jsx(sO,{"data-slot":"dropdown-menu-content",sideOffset:n,align:e,className:De("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...r})})}function Tk({className:t,inset:e,variant:n="default",...r}){return v.jsx(lO,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":n,className:De("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",t),...r})}function tj({className:t,children:e,checked:n,inset:r,...o}){return v.jsxs(uO,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:De("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:n,...o,children:[v.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:v.jsx(cO,{children:v.jsx(Oy,{})})}),e]})}function KE({className:t,inset:e,...n}){return v.jsx(aO,{"data-slot":"dropdown-menu-label","data-inset":e,className:De("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",t),...n})}function n1({className:t,...e}){return v.jsx(dO,{"data-slot":"dropdown-menu-separator",className:De("-mx-1 my-1 h-px bg-border",t),...e})}function mo({className:t,type:e,...n}){return v.jsx("input",{type:e,"data-slot":"input",className:De("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...n})}function nj({className:t,...e}){return v.jsx(mO,{"data-slot":"label",className:De("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function GE({...t}){return v.jsx(TO,{"data-slot":"select",...t})}function ZE({...t}){return v.jsx(DO,{"data-slot":"select-value",...t})}function JE({className:t,size:e="default",children:n,...r}){return v.jsxs(MO,{"data-slot":"select-trigger","data-size":e,className:De("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[n,v.jsx(RO,{asChild:!0,children:v.jsx(Iy,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function YE({className:t,children:e,position:n="item-aligned",align:r="center",...o}){return v.jsx(jO,{children:v.jsxs(LO,{"data-slot":"select-content","data-align-trigger":n==="item-aligned",className:De("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,align:r,...o,children:[v.jsx(rj,{}),v.jsx(HO,{"data-position":n,className:De("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",n==="popper"&&""),children:e}),v.jsx(oj,{})]})})}function XE({className:t,children:e,...n}){return v.jsxs(qO,{"data-slot":"select-item",className:De("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...n,children:[v.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:v.jsx(ZO,{children:v.jsx(Oy,{className:"pointer-events-none"})})}),v.jsx(KO,{children:e})]})}function rj({className:t,...e}){return v.jsx(JO,{"data-slot":"select-scroll-up-button",className:De("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...e,children:v.jsx(IP,{})})}function oj({className:t,...e}){return v.jsx(YO,{"data-slot":"select-scroll-down-button",className:De("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...e,children:v.jsx(Iy,{})})}var ij=(t,e,n,r,o,i,s,l)=>{let u=document.documentElement,d=["light","dark"];function h(y){(Array.isArray(t)?t:[t]).forEach(x=>{let b=x==="class",w=b&&i?o.map(E=>i[E]||E):o;b?(u.classList.remove(...w),u.classList.add(i&&i[y]?i[y]:y)):u.setAttribute(x,y)}),p(y)}function p(y){l&&d.includes(y)&&(u.style.colorScheme=y)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)h(r);else try{let y=localStorage.getItem(e)||n,x=s&&y==="system"?m():y;h(x)}catch{}},sj=S.createContext(void 0),aj={setTheme:t=>{},themes:[]},lj=()=>{var t;return(t=S.useContext(sj))!=null?t:aj};S.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,themes:l,nonce:u,scriptProps:d})=>{let h=JSON.stringify([n,e,i,t,l,s,r,o]).slice(1,-1);return S.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${ij.toString()})(${h})`}})});function uj(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const cj=t=>{switch(t){case"success":return hj;case"info":return mj;case"warning":return pj;case"error":return gj;default:return null}},dj=Array(12).fill(0),fj=({visible:t,className:e})=>te.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},te.createElement("div",{className:"sonner-spinner"},dj.map((n,r)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),yj=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xj=()=>{const[t,e]=te.useState(document.hidden);return te.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let r1=1;class vj{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:r,...o}=e,i=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:r1++,s=this.toasts.find(u=>u.id===i),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:r}),{...u,...e,id:i,dismissible:l,title:r}):u):this.addToast({title:r,...o,dismissible:l,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let i=r!==void 0,s;const l=o.then(async d=>{if(s=["resolve",d],te.isValidElement(d))i=!1,this.create({id:r,type:"default",message:d});else if(kj(d)&&!d.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,x=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}else if(d instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(d):n.error,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(d):n.success,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:m,...x})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){i=!1;const h=typeof n.error=="function"?await n.error(d):n.error,p=typeof n.description=="function"?await n.description(d):n.description,y=typeof h=="object"&&!te.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),u=()=>new Promise((d,h)=>l.then(()=>s[0]==="reject"?h(s[1]):d(s[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:u}:Object.assign(r,{unwrap:u})},this.custom=(e,n)=>{const r=(n==null?void 0:n.id)||r1++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Gn=new vj,bj=(t,e)=>{const n=(e==null?void 0:e.id)||r1++;return Gn.addToast({title:t,...e,id:n}),n},kj=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",wj=bj,Cj=()=>Gn.toasts,Sj=()=>Gn.getActiveToasts(),zs=Object.assign(wj,{success:Gn.success,info:Gn.info,warning:Gn.warning,error:Gn.error,custom:Gn.custom,message:Gn.message,promise:Gn.promise,dismiss:Gn.dismiss,loading:Gn.loading},{getHistory:Cj,getToasts:Sj});uj("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Zd(t){return t.label!==void 0}const Ej=3,_j="24px",Tj="16px",Ak=4e3,Aj=356,Mj=14,Nj=45,Dj=200;function ro(...t){return t.filter(Boolean).join(" ")}function Rj(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const Oj=t=>{var e,n,r,o,i,s,l,u,d;const{invert:h,toast:p,unstyled:m,interacting:y,setHeights:x,visibleToasts:b,heights:w,index:E,toasts:_,expanded:A,removeToast:M,defaultRichColors:N,closeButton:D,style:O,cancelButtonStyle:I,actionButtonStyle:L,className:W="",descriptionClassName:Y="",duration:G,position:q,gap:Z,expandByDefault:Q,classNames:K,icons:J,closeButtonAriaLabel:U="Close toast"}=t,[ee,F]=te.useState(null),[P,B]=te.useState(null),[ne,fe]=te.useState(!1),[ue,he]=te.useState(!1),[Ae,X]=te.useState(!1),[ce,pe]=te.useState(!1),[Le,Me]=te.useState(!1),[ze,Je]=te.useState(0),[At,Pt]=te.useState(0),Ht=te.useRef(p.duration||G||Ak),Ln=te.useRef(null),Ut=te.useRef(null),Qt=E===0,An=E+1<=b,ht=p.type,dr=p.dismissible!==!1,hs=p.className||"",da=p.descriptionClassName||"",_o=te.useMemo(()=>w.findIndex(_e=>_e.toastId===p.id)||0,[w,p.id]),fr=te.useMemo(()=>{var _e;return(_e=p.closeButton)!=null?_e:D},[p.closeButton,D]),Fn=te.useMemo(()=>p.duration||G||Ak,[p.duration,G]),hr=te.useRef(0),Mn=te.useRef(0),fn=te.useRef(0),Nr=te.useRef(null),[fa,ha]=q.split("-"),ui=te.useMemo(()=>w.reduce((_e,it,et)=>et>=_o?_e:_e+it.height,0),[w,_o]),To=xj(),ps=p.invert||h,Gr=ht==="loading";Mn.current=te.useMemo(()=>_o*Z+ui,[_o,ui]),te.useEffect(()=>{Ht.current=Fn},[Fn]),te.useEffect(()=>{fe(!0)},[]),te.useEffect(()=>{const _e=Ut.current;if(_e){const it=_e.getBoundingClientRect().height;return Pt(it),x(et=>[{toastId:p.id,height:it,position:p.position},...et]),()=>x(et=>et.filter(st=>st.toastId!==p.id))}},[x,p.id]),te.useLayoutEffect(()=>{if(!ne)return;const _e=Ut.current,it=_e.style.height;_e.style.height="auto";const et=_e.getBoundingClientRect().height;_e.style.height=it,Pt(et),x(st=>st.find(pt=>pt.toastId===p.id)?st.map(pt=>pt.toastId===p.id?{...pt,height:et}:pt):[{toastId:p.id,height:et,position:p.position},...st])},[ne,p.title,p.description,x,p.id,p.jsx,p.action,p.cancel]);const zn=te.useCallback(()=>{he(!0),Je(Mn.current),x(_e=>_e.filter(it=>it.toastId!==p.id)),setTimeout(()=>{M(p)},Dj)},[p,M,x,Mn]);te.useEffect(()=>{if(p.promise&&ht==="loading"||p.duration===1/0||p.type==="loading")return;let _e;return A||y||To?(()=>{if(fn.current<hr.current){const st=new Date().getTime()-hr.current;Ht.current=Ht.current-st}fn.current=new Date().getTime()})():(()=>{Ht.current!==1/0&&(hr.current=new Date().getTime(),_e=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),zn()},Ht.current))})(),()=>clearTimeout(_e)},[A,y,p,ht,To,zn]),te.useEffect(()=>{p.delete&&(zn(),p.onDismiss==null||p.onDismiss.call(p,p))},[zn,p.delete]);function ms(){var _e;if(J!=null&&J.loading){var it;return te.createElement("div",{className:ro(K==null?void 0:K.loader,p==null||(it=p.classNames)==null?void 0:it.loader,"sonner-loader"),"data-visible":ht==="loading"},J.loading)}return te.createElement(fj,{className:ro(K==null?void 0:K.loader,p==null||(_e=p.classNames)==null?void 0:_e.loader),visible:ht==="loading"})}const Zr=p.icon||(J==null?void 0:J[ht])||cj(ht);var mt,Wt;return te.createElement("li",{tabIndex:0,ref:Ut,className:ro(W,hs,K==null?void 0:K.toast,p==null||(e=p.classNames)==null?void 0:e.toast,K==null?void 0:K.default,K==null?void 0:K[ht],p==null||(n=p.classNames)==null?void 0:n[ht]),"data-sonner-toast":"","data-rich-colors":(mt=p.richColors)!=null?mt:N,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":ne,"data-promise":!!p.promise,"data-swiped":Le,"data-removed":ue,"data-visible":An,"data-y-position":fa,"data-x-position":ha,"data-index":E,"data-front":Qt,"data-swiping":Ae,"data-dismissible":dr,"data-type":ht,"data-invert":ps,"data-swipe-out":ce,"data-swipe-direction":P,"data-expanded":!!(A||Q&&ne),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":_.length-E,"--offset":`${ue?ze:Mn.current}px`,"--initial-height":Q?"auto":`${At}px`,...O,...p.style},onDragEnd:()=>{X(!1),F(null),Nr.current=null},onPointerDown:_e=>{_e.button!==2&&(Gr||!dr||(Ln.current=new Date,Je(Mn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(X(!0),Nr.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,it,et;if(ce||!dr)return;Nr.current=null;const st=Number(((_e=Ut.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qt=Number(((it=Ut.current)==null?void 0:it.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pt=new Date().getTime()-((et=Ln.current)==null?void 0:et.getTime()),Ke=ee==="x"?st:qt,hn=Math.abs(Ke)/pt;if(Math.abs(Ke)>=Nj||hn>.11){Je(Mn.current),p.onDismiss==null||p.onDismiss.call(p,p),B(ee==="x"?st>0?"right":"left":qt>0?"down":"up"),zn(),pe(!0);return}else{var dt,Et;(dt=Ut.current)==null||dt.style.setProperty("--swipe-amount-x","0px"),(Et=Ut.current)==null||Et.style.setProperty("--swipe-amount-y","0px")}Me(!1),X(!1),F(null)},onPointerMove:_e=>{var it,et,st;if(!Nr.current||!dr||((it=window.getSelection())==null?void 0:it.toString().length)>0)return;const pt=_e.clientY-Nr.current.y,Ke=_e.clientX-Nr.current.x;var hn;const dt=(hn=t.swipeDirections)!=null?hn:Rj(q);!ee&&(Math.abs(Ke)>1||Math.abs(pt)>1)&&F(Math.abs(Ke)>Math.abs(pt)?"x":"y");let Et={x:0,y:0};const $n=en=>1/(1.5+Math.abs(en)/20);if(ee==="y"){if(dt.includes("top")||dt.includes("bottom"))if(dt.includes("top")&&pt<0||dt.includes("bottom")&&pt>0)Et.y=pt;else{const en=pt*$n(pt);Et.y=Math.abs(en)<Math.abs(pt)?en:pt}}else if(ee==="x"&&(dt.includes("left")||dt.includes("right")))if(dt.includes("left")&&Ke<0||dt.includes("right")&&Ke>0)Et.x=Ke;else{const en=Ke*$n(Ke);Et.x=Math.abs(en)<Math.abs(Ke)?en:Ke}(Math.abs(Et.x)>0||Math.abs(Et.y)>0)&&Me(!0),(et=Ut.current)==null||et.style.setProperty("--swipe-amount-x",`${Et.x}px`),(st=Ut.current)==null||st.style.setProperty("--swipe-amount-y",`${Et.y}px`)}},fr&&!p.jsx&&ht!=="loading"?te.createElement("button",{"aria-label":U,"data-disabled":Gr,"data-close-button":!0,onClick:Gr||!dr?()=>{}:()=>{zn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ro(K==null?void 0:K.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Wt=J==null?void 0:J.close)!=null?Wt:yj):null,(ht||p.icon||p.promise)&&p.icon!==null&&((J==null?void 0:J[ht])!==null||p.icon)?te.createElement("div",{"data-icon":"",className:ro(K==null?void 0:K.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ms():null,p.type!=="loading"?Zr:null):null,te.createElement("div",{"data-content":"",className:ro(K==null?void 0:K.content,p==null||(i=p.classNames)==null?void 0:i.content)},te.createElement("div",{"data-title":"",className:ro(K==null?void 0:K.title,p==null||(s=p.classNames)==null?void 0:s.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?te.createElement("div",{"data-description":"",className:ro(Y,da,K==null?void 0:K.description,p==null||(l=p.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),te.isValidElement(p.cancel)?p.cancel:p.cancel&&Zd(p.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||I,onClick:_e=>{Zd(p.cancel)&&dr&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,_e),zn())},className:ro(K==null?void 0:K.cancelButton,p==null||(u=p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,te.isValidElement(p.action)?p.action:p.action&&Zd(p.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||L,onClick:_e=>{Zd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,_e),!_e.defaultPrevented&&zn())},className:ro(K==null?void 0:K.actionButton,p==null||(d=p.classNames)==null?void 0:d.actionButton)},p.action.label):null)};function Mk(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function Ij(t,e){const n={};return[t,e].forEach((r,o)=>{const i=o===1,s=i?"--mobile-offset":"--offset",l=i?Tj:_j;function u(d){["top","right","bottom","left"].forEach(h=>{n[`${s}-${h}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=l:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):u(l)}),n}const Pj=te.forwardRef(function(e,n){const{id:r,invert:o,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:h,mobileOffset:p,theme:m="light",richColors:y,duration:x,style:b,visibleToasts:w=Ej,toastOptions:E,dir:_=Mk(),gap:A=Mj,icons:M,containerAriaLabel:N="Notifications"}=e,[D,O]=te.useState([]),I=te.useMemo(()=>r?D.filter(ne=>ne.toasterId===r):D.filter(ne=>!ne.toasterId),[D,r]),L=te.useMemo(()=>Array.from(new Set([i].concat(I.filter(ne=>ne.position).map(ne=>ne.position)))),[I,i]),[W,Y]=te.useState([]),[G,q]=te.useState(!1),[Z,Q]=te.useState(!1),[K,J]=te.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=te.useRef(null),ee=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=te.useRef(null),P=te.useRef(!1),B=te.useCallback(ne=>{O(fe=>{var ue;return(ue=fe.find(he=>he.id===ne.id))!=null&&ue.delete||Gn.dismiss(ne.id),fe.filter(({id:he})=>he!==ne.id)})},[]);return te.useEffect(()=>Gn.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{O(fe=>fe.map(ue=>ue.id===ne.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{kS.flushSync(()=>{O(fe=>{const ue=fe.findIndex(he=>he.id===ne.id);return ue!==-1?[...fe.slice(0,ue),{...fe[ue],...ne},...fe.slice(ue+1)]:[ne,...fe]})})})}),[D]),te.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:fe})=>{J(fe?"dark":"light")})}catch{ne.addListener(({matches:ue})=>{try{J(ue?"dark":"light")}catch(he){console.error(he)}})}},[m]),te.useEffect(()=>{D.length<=1&&q(!1)},[D]),te.useEffect(()=>{const ne=fe=>{var ue;if(s.every(X=>fe[X]||fe.code===X)){var Ae;q(!0),(Ae=U.current)==null||Ae.focus()}fe.code==="Escape"&&(document.activeElement===U.current||(ue=U.current)!=null&&ue.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[s]),te.useEffect(()=>{if(U.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,P.current=!1)}},[U.current]),te.createElement("section",{ref:n,"aria-label":`${N} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((ne,fe)=>{var ue;const[he,Ae]=ne.split("-");return I.length?te.createElement("ol",{key:ne,dir:_==="auto"?Mk():_,tabIndex:-1,ref:U,className:d,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":he,"data-x-position":Ae,style:{"--front-toast-height":`${((ue=W[0])==null?void 0:ue.height)||0}px`,"--width":`${Aj}px`,"--gap":`${A}px`,...b,...Ij(h,p)},onBlur:X=>{P.current&&!X.currentTarget.contains(X.relatedTarget)&&(P.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||P.current||(P.current=!0,F.current=X.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Z||q(!1)},onDragEnd:()=>q(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||Q(!0)},onPointerUp:()=>Q(!1)},I.filter(X=>!X.position&&fe===0||X.position===ne).map((X,ce)=>{var pe,Le;return te.createElement(Oj,{key:X.id,icons:M,index:ce,toast:X,defaultRichColors:y,duration:(pe=E==null?void 0:E.duration)!=null?pe:x,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:o,visibleToasts:w,closeButton:(Le=E==null?void 0:E.closeButton)!=null?Le:u,interacting:Z,position:ne,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:B,toasts:I.filter(Me=>Me.position==X.position),heights:W.filter(Me=>Me.position==X.position),setHeights:Y,expandByDefault:l,gap:A,expanded:G,swipeDirections:e.swipeDirections})})):null}))}),jj=({...t})=>{const{theme:e="system"}=lj();return v.jsx(Pj,{theme:e,className:"toaster group",icons:{success:v.jsx(FP,{className:"size-4"}),info:v.jsx(l9,{className:"size-4"}),warning:v.jsx(Ly,{className:"size-4"}),error:v.jsx(k9,{className:"size-4"}),loading:v.jsx(jy,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...t})};function Lj({className:t,...e}){return v.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:v.jsx("table",{"data-slot":"table",className:De("w-full caption-bottom text-sm",t),...e})})}function Fj({className:t,...e}){return v.jsx("thead",{"data-slot":"table-header",className:De("[&_tr]:border-b",t),...e})}function zj({className:t,...e}){return v.jsx("tbody",{"data-slot":"table-body",className:De("[&_tr:last-child]:border-0",t),...e})}function Pm({className:t,...e}){return v.jsx("tr",{"data-slot":"table-row",className:De("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),...e})}function Jd({className:t,...e}){return v.jsx("th",{"data-slot":"table-head",className:De("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",t),...e})}function Ni({className:t,...e}){return v.jsx("td",{"data-slot":"table-cell",className:De("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",t),...e})}function $j({delayDuration:t=0,...e}){return v.jsx(mI,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function Hy({...t}){return v.jsx(gI,{"data-slot":"tooltip",...t})}function Uy({...t}){return v.jsx(yI,{"data-slot":"tooltip-trigger",...t})}function Wy({className:t,sideOffset:e=0,children:n,...r}){return v.jsx(xI,{children:v.jsxs(vI,{"data-slot":"tooltip-content",sideOffset:e,className:De("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...r,children:[n,v.jsx(bI,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}var nt;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},t.getValidEnumValues=o=>{const i=t.objectKeys(o).filter(l=>typeof o[o[l]]!="number"),s={};for(const l of i)s[l]=o[l];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(const s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(nt||(nt={}));var Nk;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Nk||(Nk={}));const Ce=nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Oi=t=>{switch(typeof t){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(t)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(t)?Ce.array:t===null?Ce.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ce.promise:typeof Map<"u"&&t instanceof Map?Ce.map:typeof Set<"u"&&t instanceof Set?Ce.set:typeof Date<"u"&&t instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ae=nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ni extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let l=r,u=0;for(;u<s.path.length;){const d=s.path[u];u===s.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(n(s))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return o(this),r}static assert(e){if(!(e instanceof ni))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const o of this.issues)if(o.path.length>0){const i=o.path[0];n[i]=n[i]||[],n[i].push(e(o))}else r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ni.create=t=>new ni(t);const o1=(t,e)=>{let n;switch(t.code){case ae.invalid_type:t.received===Ce.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,nt.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${nt.joinValues(t.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${nt.joinValues(t.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${nt.joinValues(t.options)}, received '${t.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:nt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ae.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ae.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=e.defaultError,nt.assertNever(t)}return{message:n}};let Bj=o1;function Vj(){return Bj}const Hj=t=>{const{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let l="";const u=r.filter(d=>!!d).slice().reverse();for(const d of u)l=d(s,{data:e,defaultError:l}).message;return{...o,path:i,message:l}};function ge(t,e){const n=Vj(),r=Hj({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===o1?void 0:o1].filter(o=>!!o)});t.common.issues.push(r)}class ar{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const o of n){if(o.status==="aborted")return $e;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return ar.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return $e;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}}const $e=Object.freeze({status:"aborted"}),fu=t=>({status:"dirty",value:t}),Mr=t=>({status:"valid",value:t}),Dk=t=>t.status==="aborted",Rk=t=>t.status==="dirty",el=t=>t.status==="valid",Pf=t=>typeof Promise<"u"&&t instanceof Promise;var Ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ee||(Ee={}));class es{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ok=(t,e)=>{if(el(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ni(t.common.issues);return this._error=n,this._error}}};function qe(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,l)=>{const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??r??l.defaultError}:s.code!=="invalid_type"?{message:l.defaultError}:{message:u??n??l.defaultError}},description:o}}class Qe{get description(){return this._def.description}_getType(e){return Oi(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Oi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ar,ctx:{common:e.parent.common,data:e.data,parsedType:Oi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Pf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oi(e)},o=this._parseSync({data:e,path:r.path,parent:r});return Ok(r,o)}"~validate"(e){var r,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oi(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return el(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>el(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Oi(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Pf(o)?o:Promise.resolve(o));return Ok(r,i)}refine(e,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=e(o),l=()=>i.addIssue({code:ae.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new nl({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return qi.create(this,this._def)}nullable(){return rl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return go.create(this)}promise(){return zf.create(this,this._def)}or(e){return Lf.create([this,e],this._def)}and(e){return Ff.create(this,e,this._def)}transform(e){return new nl({...qe(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new l1({...qe(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new fL({typeName:Be.ZodBranded,type:this,...qe(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new u1({...qe(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return qy.create(this,e)}readonly(){return c1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Uj=/^c[^\s-]{8,}$/i,Wj=/^[0-9a-z]+$/,qj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Kj=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Gj=/^[a-z0-9_-]{21}$/i,Zj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Jj=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Yj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jm;const Qj=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,eL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,tL=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,nL=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oL=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,QE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",iL=new RegExp(`^${QE}$`);function e_(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function sL(t){return new RegExp(`^${e_(t)}$`)}function aL(t){let e=`${QE}T${e_(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function lL(t,e){return!!((e==="v4"||!e)&&Qj.test(t)||(e==="v6"||!e)&&tL.test(t))}function uL(t,e){if(!Zj.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function cL(t,e){return!!((e==="v4"||!e)&&eL.test(t)||(e==="v6"||!e)&&nL.test(t))}class Bi extends Qe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ce.string){const i=this._getOrReturnCtx(e);return ge(i,{code:ae.invalid_type,expected:Ce.string,received:i.parsedType}),$e}const r=new ar;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,l=e.data.length<i.value;(s||l)&&(o=this._getOrReturnCtx(e,o),s?ge(o,{code:ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&ge(o,{code:ae.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Yj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"email",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")jm||(jm=new RegExp(Xj,"u")),jm.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"emoji",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Kj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"uuid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Gj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"nanoid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Uj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"cuid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Wj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"cuid2",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")qj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"ulid",code:ae.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ge(o,{validation:"url",code:ae.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"regex",code:ae.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?aL(i).test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?iL.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?sL(i).test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Jj.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"duration",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lL(e.data,i.version)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"ip",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?uL(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"jwt",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?cL(e.data,i.version)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"cidr",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?rL.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"base64",code:ae.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?oL.test(e.data)||(o=this._getOrReturnCtx(e,o),ge(o,{validation:"base64url",code:ae.invalid_string,message:i.message}),r.dirty()):nt.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:ae.invalid_string,...Ee.errToObj(r)})}_addCheck(e){return new Bi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ee.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ee.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ee.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Ee.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ee.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Ee.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...Ee.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...Ee.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Ee.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Ee.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...Ee.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Ee.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Ee.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Ee.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Ee.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Ee.errToObj(n)})}nonempty(e){return this.min(1,Ee.errToObj(e))}trim(){return new Bi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Bi.create=t=>new Bi({checks:[],typeName:Be.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...qe(t)});function dL(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}class Vu extends Qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ce.number){const i=this._getOrReturnCtx(e);return ge(i,{code:ae.invalid_type,expected:Ce.number,received:i.parsedType}),$e}let r;const o=new ar;for(const i of this._def.checks)i.kind==="int"?nt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?dL(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.not_finite,message:i.message}),o.dirty()):nt.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Ee.toString(n))}setLimit(e,n,r,o){return new Vu({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(e){return new Vu({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Ee.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&nt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Vu.create=t=>new Vu({checks:[],typeName:Be.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...qe(t)});class Hu extends Qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ce.bigint)return this._getInvalidInput(e);let r;const o=new ar;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ge(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):nt.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return ge(n,{code:ae.invalid_type,expected:Ce.bigint,received:n.parsedType}),$e}gte(e,n){return this.setLimit("min",e,!0,Ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Ee.toString(n))}setLimit(e,n,r,o){return new Hu({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(e){return new Hu({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Ee.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Hu.create=t=>new Hu({checks:[],typeName:Be.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...qe(t)});class i1 extends Qe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ce.boolean){const r=this._getOrReturnCtx(e);return ge(r,{code:ae.invalid_type,expected:Ce.boolean,received:r.parsedType}),$e}return Mr(e.data)}}i1.create=t=>new i1({typeName:Be.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...qe(t)});class jf extends Qe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ce.date){const i=this._getOrReturnCtx(e);return ge(i,{code:ae.invalid_type,expected:Ce.date,received:i.parsedType}),$e}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return ge(i,{code:ae.invalid_date}),$e}const r=new ar;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),ge(o,{code:ae.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):nt.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new jf({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Ee.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Ee.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}jf.create=t=>new jf({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Be.ZodDate,...qe(t)});class Ik extends Qe{_parse(e){if(this._getType(e)!==Ce.symbol){const r=this._getOrReturnCtx(e);return ge(r,{code:ae.invalid_type,expected:Ce.symbol,received:r.parsedType}),$e}return Mr(e.data)}}Ik.create=t=>new Ik({typeName:Be.ZodSymbol,...qe(t)});class Pk extends Qe{_parse(e){if(this._getType(e)!==Ce.undefined){const r=this._getOrReturnCtx(e);return ge(r,{code:ae.invalid_type,expected:Ce.undefined,received:r.parsedType}),$e}return Mr(e.data)}}Pk.create=t=>new Pk({typeName:Be.ZodUndefined,...qe(t)});class jk extends Qe{_parse(e){if(this._getType(e)!==Ce.null){const r=this._getOrReturnCtx(e);return ge(r,{code:ae.invalid_type,expected:Ce.null,received:r.parsedType}),$e}return Mr(e.data)}}jk.create=t=>new jk({typeName:Be.ZodNull,...qe(t)});class Lk extends Qe{constructor(){super(...arguments),this._any=!0}_parse(e){return Mr(e.data)}}Lk.create=t=>new Lk({typeName:Be.ZodAny,...qe(t)});class Fk extends Qe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Mr(e.data)}}Fk.create=t=>new Fk({typeName:Be.ZodUnknown,...qe(t)});class ts extends Qe{_parse(e){const n=this._getOrReturnCtx(e);return ge(n,{code:ae.invalid_type,expected:Ce.never,received:n.parsedType}),$e}}ts.create=t=>new ts({typeName:Be.ZodNever,...qe(t)});class zk extends Qe{_parse(e){if(this._getType(e)!==Ce.undefined){const r=this._getOrReturnCtx(e);return ge(r,{code:ae.invalid_type,expected:Ce.void,received:r.parsedType}),$e}return Mr(e.data)}}zk.create=t=>new zk({typeName:Be.ZodVoid,...qe(t)});class go extends Qe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==Ce.array)return ge(n,{code:ae.invalid_type,expected:Ce.array,received:n.parsedType}),$e;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,l=n.data.length<o.exactLength.value;(s||l)&&(ge(n,{code:s?ae.too_big:ae.too_small,minimum:l?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ge(n,{code:ae.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ge(n,{code:ae.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,l)=>o.type._parseAsync(new es(n,s,n.path,l)))).then(s=>ar.mergeArray(r,s));const i=[...n.data].map((s,l)=>o.type._parseSync(new es(n,s,n.path,l)));return ar.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new go({...this._def,minLength:{value:e,message:Ee.toString(n)}})}max(e,n){return new go({...this._def,maxLength:{value:e,message:Ee.toString(n)}})}length(e,n){return new go({...this._def,exactLength:{value:e,message:Ee.toString(n)}})}nonempty(e){return this.min(1,e)}}go.create=(t,e)=>new go({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...qe(e)});function Va(t){if(t instanceof Ft){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=qi.create(Va(r))}return new Ft({...t._def,shape:()=>e})}else return t instanceof go?new go({...t._def,type:Va(t.element)}):t instanceof qi?qi.create(Va(t.unwrap())):t instanceof rl?rl.create(Va(t.unwrap())):t instanceof Xs?Xs.create(t.items.map(e=>Va(e))):t}class Ft extends Qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=nt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Ce.object){const d=this._getOrReturnCtx(e);return ge(d,{code:ae.invalid_type,expected:Ce.object,received:d.parsedType}),$e}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),l=[];if(!(this._def.catchall instanceof ts&&this._def.unknownKeys==="strip"))for(const d in o.data)s.includes(d)||l.push(d);const u=[];for(const d of s){const h=i[d],p=o.data[d];u.push({key:{status:"valid",value:d},value:h._parse(new es(o,p,o.path,d)),alwaysSet:d in o.data})}if(this._def.catchall instanceof ts){const d=this._def.unknownKeys;if(d==="passthrough")for(const h of l)u.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(d==="strict")l.length>0&&(ge(o,{code:ae.unrecognized_keys,keys:l}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const h of l){const p=o.data[h];u.push({key:{status:"valid",value:h},value:d._parse(new es(o,p,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const d=[];for(const h of u){const p=await h.key,m=await h.value;d.push({key:p,value:m,alwaysSet:h.alwaysSet})}return d}).then(d=>ar.mergeObjectSync(r,d)):ar.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(e){return Ee.errToObj,new Ft({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s;const o=((s=(i=this._def).errorMap)==null?void 0:s.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Ee.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new Ft({...this._def,unknownKeys:"strip"})}passthrough(){return new Ft({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ft({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ft({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Be.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ft({...this._def,catchall:e})}pick(e){const n={};for(const r of nt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Ft({...this._def,shape:()=>n})}omit(e){const n={};for(const r of nt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Ft({...this._def,shape:()=>n})}deepPartial(){return Va(this)}partial(e){const n={};for(const r of nt.objectKeys(this.shape)){const o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}return new Ft({...this._def,shape:()=>n})}required(e){const n={};for(const r of nt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof qi;)i=i._def.innerType;n[r]=i}return new Ft({...this._def,shape:()=>n})}keyof(){return t_(nt.objectKeys(this.shape))}}Ft.create=(t,e)=>new Ft({shape:()=>t,unknownKeys:"strip",catchall:ts.create(),typeName:Be.ZodObject,...qe(e)});Ft.strictCreate=(t,e)=>new Ft({shape:()=>t,unknownKeys:"strict",catchall:ts.create(),typeName:Be.ZodObject,...qe(e)});Ft.lazycreate=(t,e)=>new Ft({shape:t,unknownKeys:"strip",catchall:ts.create(),typeName:Be.ZodObject,...qe(e)});class Lf extends Qe{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const s=i.map(l=>new ni(l.ctx.common.issues));return ge(n,{code:ae.invalid_union,unionErrors:s}),$e}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const u of r){const d={...n,common:{...n.common,issues:[]},parent:null},h=u._parseSync({data:n.data,path:n.path,parent:d});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:d}),d.common.issues.length&&s.push(d.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const l=s.map(u=>new ni(u));return ge(n,{code:ae.invalid_union,unionErrors:l}),$e}}get options(){return this._def.options}}Lf.create=(t,e)=>new Lf({options:t,typeName:Be.ZodUnion,...qe(e)});function s1(t,e){const n=Oi(t),r=Oi(e);if(t===e)return{valid:!0,data:t};if(n===Ce.object&&r===Ce.object){const o=nt.objectKeys(e),i=nt.objectKeys(t).filter(l=>o.indexOf(l)!==-1),s={...t,...e};for(const l of i){const u=s1(t[l],e[l]);if(!u.valid)return{valid:!1};s[l]=u.data}return{valid:!0,data:s}}else if(n===Ce.array&&r===Ce.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let i=0;i<t.length;i++){const s=t[i],l=e[i],u=s1(s,l);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return n===Ce.date&&r===Ce.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ff extends Qe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(Dk(i)||Dk(s))return $e;const l=s1(i.value,s.value);return l.valid?((Rk(i)||Rk(s))&&n.dirty(),{status:n.value,value:l.data}):(ge(r,{code:ae.invalid_intersection_types}),$e)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ff.create=(t,e,n)=>new Ff({left:t,right:e,typeName:Be.ZodIntersection,...qe(n)});class Xs extends Qe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ce.array)return ge(r,{code:ae.invalid_type,expected:Ce.array,received:r.parsedType}),$e;if(r.data.length<this._def.items.length)return ge(r,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$e;!this._def.rest&&r.data.length>this._def.items.length&&(ge(r,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new es(r,s,r.path,l)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>ar.mergeArray(n,s)):ar.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Xs({...this._def,rest:e})}}Xs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xs({items:t,typeName:Be.ZodTuple,rest:null,...qe(e)})};class $k extends Qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ce.map)return ge(r,{code:ae.invalid_type,expected:Ce.map,received:r.parsedType}),$e;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([l,u],d)=>({key:o._parse(new es(r,l,r.path,[d,"key"])),value:i._parse(new es(r,u,r.path,[d,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of s){const d=await u.key,h=await u.value;if(d.status==="aborted"||h.status==="aborted")return $e;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),l.set(d.value,h.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const u of s){const d=u.key,h=u.value;if(d.status==="aborted"||h.status==="aborted")return $e;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),l.set(d.value,h.value)}return{status:n.value,value:l}}}}$k.create=(t,e,n)=>new $k({valueType:e,keyType:t,typeName:Be.ZodMap,...qe(n)});class Uu extends Qe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ce.set)return ge(r,{code:ae.invalid_type,expected:Ce.set,received:r.parsedType}),$e;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ge(r,{code:ae.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ge(r,{code:ae.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(u){const d=new Set;for(const h of u){if(h.status==="aborted")return $e;h.status==="dirty"&&n.dirty(),d.add(h.value)}return{status:n.value,value:d}}const l=[...r.data.values()].map((u,d)=>i._parse(new es(r,u,r.path,d)));return r.common.async?Promise.all(l).then(u=>s(u)):s(l)}min(e,n){return new Uu({...this._def,minSize:{value:e,message:Ee.toString(n)}})}max(e,n){return new Uu({...this._def,maxSize:{value:e,message:Ee.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Uu.create=(t,e)=>new Uu({valueType:t,minSize:null,maxSize:null,typeName:Be.ZodSet,...qe(e)});class Bk extends Qe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Bk.create=(t,e)=>new Bk({getter:t,typeName:Be.ZodLazy,...qe(e)});class a1 extends Qe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ge(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),$e}return{status:"valid",value:e.data}}get value(){return this._def.value}}a1.create=(t,e)=>new a1({value:t,typeName:Be.ZodLiteral,...qe(e)});function t_(t,e){return new tl({values:t,typeName:Be.ZodEnum,...qe(e)})}class tl extends Qe{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return ge(n,{expected:nt.joinValues(r),received:n.parsedType,code:ae.invalid_type}),$e}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return ge(n,{received:n.data,code:ae.invalid_enum_value,options:r}),$e}return Mr(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return tl.create(e,{...this._def,...n})}exclude(e,n=this._def){return tl.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}tl.create=t_;class Vk extends Qe{_parse(e){const n=nt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const o=nt.objectValues(n);return ge(r,{expected:nt.joinValues(o),received:r.parsedType,code:ae.invalid_type}),$e}if(this._cache||(this._cache=new Set(nt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=nt.objectValues(n);return ge(r,{received:r.data,code:ae.invalid_enum_value,options:o}),$e}return Mr(e.data)}get enum(){return this._def.values}}Vk.create=(t,e)=>new Vk({values:t,typeName:Be.ZodNativeEnum,...qe(e)});class zf extends Qe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Ce.promise&&n.common.async===!1)return ge(n,{code:ae.invalid_type,expected:Ce.promise,received:n.parsedType}),$e;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Mr(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zf.create=(t,e)=>new zf({type:t,typeName:Be.ZodPromise,...qe(e)});class nl extends Qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{ge(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async l=>{if(n.value==="aborted")return $e;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?$e:u.status==="dirty"||n.value==="dirty"?fu(u.value):u});{if(n.value==="aborted")return $e;const l=this._def.schema._parseSync({data:s,path:r.path,parent:r});return l.status==="aborted"?$e:l.status==="dirty"||n.value==="dirty"?fu(l.value):l}}if(o.type==="refinement"){const s=l=>{const u=o.refinement(l,i);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?$e:(l.status==="dirty"&&n.dirty(),s(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?$e:(l.status==="dirty"&&n.dirty(),s(l.value).then(()=>({status:n.value,value:l.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!el(s))return $e;const l=o.transform(s.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>el(s)?Promise.resolve(o.transform(s.value,i)).then(l=>({status:n.value,value:l})):$e);nt.assertNever(o)}}nl.create=(t,e,n)=>new nl({schema:t,typeName:Be.ZodEffects,effect:e,...qe(n)});nl.createWithPreprocess=(t,e,n)=>new nl({schema:e,effect:{type:"preprocess",transform:t},typeName:Be.ZodEffects,...qe(n)});class qi extends Qe{_parse(e){return this._getType(e)===Ce.undefined?Mr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}qi.create=(t,e)=>new qi({innerType:t,typeName:Be.ZodOptional,...qe(e)});class rl extends Qe{_parse(e){return this._getType(e)===Ce.null?Mr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rl.create=(t,e)=>new rl({innerType:t,typeName:Be.ZodNullable,...qe(e)});class l1 extends Qe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}l1.create=(t,e)=>new l1({innerType:t,typeName:Be.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...qe(e)});class u1 extends Qe{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Pf(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ni(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ni(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}u1.create=(t,e)=>new u1({innerType:t,typeName:Be.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...qe(e)});class Hk extends Qe{_parse(e){if(this._getType(e)!==Ce.nan){const r=this._getOrReturnCtx(e);return ge(r,{code:ae.invalid_type,expected:Ce.nan,received:r.parsedType}),$e}return{status:"valid",value:e.data}}}Hk.create=t=>new Hk({typeName:Be.ZodNaN,...qe(t)});class fL extends Qe{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class qy extends Qe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?$e:i.status==="dirty"?(n.dirty(),fu(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?$e:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new qy({in:e,out:n,typeName:Be.ZodPipeline})}}class c1 extends Qe{_parse(e){const n=this._def.innerType._parse(e),r=o=>(el(o)&&(o.value=Object.freeze(o.value)),o);return Pf(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}c1.create=(t,e)=>new c1({innerType:t,typeName:Be.ZodReadonly,...qe(e)});var Be;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Be||(Be={}));const co=Bi.create,hL=i1.create;ts.create;const Wu=go.create,sp=Ft.create;Lf.create;Ff.create;Xs.create;const pL=a1.create,mL=tl.create;zf.create;qi.create;rl.create;var gL=["text","richtext","number","boolean","date","select","relation","image"],n_=sp({key:co().min(1),label:co().optional(),type:mL(gL),required:hL().optional(),options:Wu(co()).optional(),to:co().optional()}).superRefine((t,e)=>{t.type==="select"&&(!t.options||t.options.length===0)&&e.addIssue({code:ae.custom,message:"select alanı options gerektirir"}),t.type==="relation"&&!t.to&&e.addIssue({code:ae.custom,message:'relation alanı "to" gerektirir'})}),yL=sp({name:co().min(1),label:co().optional(),path:co().min(1),fields:Wu(n_)}),xL=sp({name:co().min(1),label:co().optional(),path:co().min(1),fields:Wu(n_)});sp({version:pL(1),collections:Wu(yL),singletons:Wu(xL)}).superRefine((t,e)=>{const n=new Set,r=new Set,o=new Set(t.collections.map(s=>s.name)),i=[...t.collections,...t.singletons];for(const s of i){n.has(s.name)&&e.addIssue({code:ae.custom,message:`tekrar eden ad: ${s.name}`}),n.add(s.name),(s.path.includes("..")||s.path.startsWith("/")||s.path.includes("\\"))&&e.addIssue({code:ae.custom,message:`güvensiz path: ${s.path}`}),r.has(s.path)&&e.addIssue({code:ae.custom,message:`tekrar eden path: ${s.path}`}),r.add(s.path);const l=new Set;for(const u of s.fields)l.has(u.key)&&e.addIssue({code:ae.custom,message:`tekrar eden field key: ${u.key}`}),l.add(u.key),u.type==="relation"&&u.to&&!o.has(u.to)&&e.addIssue({code:ae.custom,message:`relation hedefi yok: ${u.to}`})}});var vL={ç:"c",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"c",Ğ:"g",İ:"i",Ö:"o",Ş:"s",Ü:"u",I:"i"};function Ky(t){return t.replace(/[çğıöşüÇĞİÖŞÜI]/g,r=>vL[r]??r).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"icerik"}function bL(t){return t==null||t===""}function kL(t,e){var n;switch(t.type){case"text":case"richtext":case"date":case"image":return typeof e=="string"?null:"metin bekleniyor";case"relation":return!Array.isArray(e)||e.some(r=>typeof r!="string")?"slug dizisi bekleniyor":null;case"number":return typeof e=="number"?null:"sayı bekleniyor";case"boolean":return typeof e=="boolean"?null:"boolean bekleniyor";case"select":return typeof e!="string"?"metin bekleniyor":(n=t.options)!=null&&n.includes(e)?null:"seçenek dışı değer"}}function r_(t,e){const n=[],r=new Set(t.map(o=>o.key));for(const o of t){const i=e[o.key];if(bL(i)){o.required&&n.push({key:o.key,level:"warning",message:"zorunlu alan boş"});continue}const s=kL(o,i);s&&n.push({key:o.key,level:"error",message:s})}for(const o of Object.keys(e))r.has(o)||n.push({key:o,level:"warning",message:"anahtar şemada yok"});return{ok:n.every(o=>o.level!=="error"),issues:n}}var Lm={exports:{}},Fm={};/**
|
|
381
|
-
* @license React
|
|
382
|
-
* use-sync-external-store-shim.production.js
|
|
383
|
-
*
|
|
384
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
385
|
-
*
|
|
386
|
-
* This source code is licensed under the MIT license found in the
|
|
387
|
-
* LICENSE file in the root directory of this source tree.
|
|
388
|
-
*/var Uk;function wL(){if(Uk)return Fm;Uk=1;var t=fc();function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function l(p,m){var y=m(),x=r({inst:{value:y,getSnapshot:m}}),b=x[0].inst,w=x[1];return i(function(){b.value=y,b.getSnapshot=m,u(b)&&w({inst:b})},[p,y,m]),o(function(){return u(b)&&w({inst:b}),p(function(){u(b)&&w({inst:b})})},[p]),s(y),y}function u(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}catch{return!0}}function d(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return Fm.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,Fm}var Wk;function o_(){return Wk||(Wk=1,Lm.exports=wL()),Lm.exports}var i_=o_();function gn(t){this.content=t}gn.prototype={constructor:gn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new gn(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new gn(n)},addToStart:function(t,e){return new gn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new gn(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new gn(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=gn.from(t),t.size?new gn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=gn.from(t),t.size?new gn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=gn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};gn.from=function(t){if(t instanceof gn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new gn(e)};function s_(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){let s=o.text,l=i.text,u=0;for(;s[u]==l[u];u++)n++;return u&&u<s.length&&u<l.length&&u_(s.charCodeAt(u-1))&&l_(s.charCodeAt(u))&&n--,n}if(o.content.size||i.content.size){let s=s_(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function a_(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),u=s.nodeSize;if(s==l){n-=u,r-=u;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let d=s.text,h=l.text,p=d.length,m=h.length;for(;p>0&&m>0&&d[p-1]==h[m-1];)p--,m--,n--,r--;return p&&m&&p<d.length&&u_(d.charCodeAt(p-1))&&l_(d.charCodeAt(p))&&(n++,r++),{a:n,b:r}}if(s.content.size||l.content.size){let d=a_(s.content,l.content,n-1,r-1);if(d)return d}n-=u,r-=u}}function l_(t){return t>=56320&&t<57344}function u_(t){return t>=55296&&t<56320}class re{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,l=0;l<n;s++){let u=this.content[s],d=l+u.nodeSize;if(d>e&&r(u,o+l,i||null,s)!==!1&&u.content.size){let h=l+1;u.nodesBetween(Math.max(0,e-h),Math.min(u.content.size,n-h),r,o+h)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,u)=>{let d=l.isText?l.text.slice(Math.max(e,u)-u,n-u):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=d},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new re(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let l=this.content[i],u=s+l.nodeSize;u>e&&((s<e||u>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=u}return new re(r,o)}cutByIndex(e,n){return e==n?re.empty:e==0&&n==this.content.length?this:new re(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new re(o,i)}addToStart(e){return new re([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new re(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return s_(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return a_(this,e,n,r)}findIndex(e){if(e==0)return Yd(0,e);if(e==this.size)return Yd(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Yd(n+1,i):Yd(n,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,n){if(!n)return re.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return re.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return re.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new re(n||e,r)}static from(e){if(!e)return re.empty;if(e instanceof re)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new re([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}re.empty=new re([],0);const zm={index:0,offset:0};function Yd(t,e){return zm.index=t,zm.offset=e,zm}function $f(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!$f(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!$f(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let lt=class d1{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&$f(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return d1.none;if(e instanceof d1)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};lt.none=[];class qu extends Error{}class ye{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=d_(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ye(c_(this.content,e+this.openStart,n+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()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ye.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ye(re.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ye(e,r,o)}}ye.empty=new ye(re.empty,0,0);function c_(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(c_(i.content,e-o-1,n-o-1)))}function d_(t,e,n,r,o,i){let{index:s,offset:l}=t.findIndex(e),u=t.maybeChild(s);if(l==e||u.isText)return i&&r<=0&&o<=0&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let d=d_(u.content,e-l-1,n,s==0?r-1:0,s==t.childCount-1?o-1:0,u);return d&&t.replaceChild(s,u.copy(d))}function CL(t,e,n){if(n.openStart>t.depth)throw new qu("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new qu("Inconsistent open depths");return f_(t,e,n,0)}function f_(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=f_(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return Bs(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=SL(n,t);return Bs(i,p_(t,s,l,e,r))}else return Bs(i,Bf(t,e,r))}function h_(t,e){if(!e.type.compatibleContent(t.type))throw new qu("Cannot join "+e.type.name+" onto "+t.type.name)}function f1(t,e,n){let r=t.node(n);return h_(r,e.node(n)),r}function $s(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function vu(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&($s(t.nodeAfter,r),i++));for(let l=i;l<s;l++)$s(o.child(l),r);e&&e.depth==n&&e.textOffset&&$s(e.nodeBefore,r)}function Bs(t,e){if(!t.type.validContent(e))throw new qu("Invalid content for node "+t.type.name);return t.copy(e)}function p_(t,e,n,r,o){let i=t.depth>o&&f1(t,e,o+1),s=r.depth>o&&f1(n,r,o+1),l=[];return vu(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(h_(i,s),$s(Bs(i,p_(t,e,n,r,o+1)),l)):(i&&$s(Bs(i,Bf(t,e,o+1)),l),vu(e,n,o,l),s&&$s(Bs(s,Bf(n,r,o+1)),l)),vu(r,null,o,l),new re(l)}function Bf(t,e,n){let r=[];if(vu(null,t,n,r),t.depth>n){let o=f1(t,e,n+1);$s(Bs(o,Bf(t,e,n+1)),r)}return vu(e,null,n,r),new re(r)}function SL(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(re.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Ku{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e: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 new 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 new 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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return lt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new Vf(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:u}=s.content.findIndex(i),d=i-u;if(r.push(s,l,o+u),!d||(s=s.child(l),s.isText))break;i=d-1,o+=u+1}return new Ku(n,r,i)}static resolveCached(e,n){let r=qk.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else qk.set(e,r=new EL);let o=r.elts[r.i]=Ku.resolve(e,n);return r.i=(r.i+1)%_L,o}}class EL{constructor(){this.elts=[],this.i=0}}const _L=12,qk=new WeakMap;class Vf{constructor(e,n,r){this.$from=e,this.$to=n,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)}}const TL=Object.create(null);let Ki=class h1{constructor(e,n,r,o=lt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||re.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,n,r,o=0){this.content.nodesBetween(e,n,r,o,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,n,r,o){return this.content.textBetween(e,n,r,o)}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,n,r){return this.type==e&&$f(this.attrs,n||e.defaultAttrs||TL)&<.sameSet(this.marks,r||lt.none)}copy(e=null){return e==this.content?this:new h1(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new h1(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ye.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),l=o.start(s),d=o.node(s).content.cut(o.pos-l,i.pos-l);return new ye(d,o.depth-s,i.depth-s)}replace(e,n,r){return CL(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return Ku.resolveCached(this,e)}resolveNoCache(e){return Ku.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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;return this.content.size&&(e+="("+this.content.toStringInner()+")"),m_(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=re.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let u=o;u<i;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=lt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!lt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=re.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Ki.prototype.text=void 0;class Hf extends Ki{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):m_(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Hf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Hf(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function m_(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Qs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new AL(e,n);if(r.next==null)return Qs.empty;let o=g_(r);r.next&&r.err("Unexpected trailing text");let i=PL(IL(o));return jL(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,l){let u=s.matchFragment(e,r);if(u&&(!n||u.validEnd))return re.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:h,next:p}=s.next[d];if(!(h.isText||h.hasRequiredAttrs())&&o.indexOf(p)==-1){o.push(p);let m=i(p,l.concat(h));if(m)return m}}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 n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:u}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!o.type||u.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
389
|
-
`)}}Qs.empty=new Qs(!0);class AL{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),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 new SyntaxError(e+" (in content expression '"+this.string+"')")}}function g_(t){let e=[];do e.push(ML(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ML(t){let e=[];do e.push(NL(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function NL(t){let e=OL(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=DL(t,e);else break;return e}function Kk(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function DL(t,e){let n=Kk(t),r=n;return t.eat(",")&&(t.next!="}"?r=Kk(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function RL(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function OL(t){if(t.eat("(")){let e=g_(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=RL(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function IL(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,u){let d={term:u,to:l};return e[s].push(d),d}function o(s,l){s.forEach(u=>u.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((u,d)=>u.concat(i(d,l)),[]);if(s.type=="seq")for(let u=0;;u++){let d=i(s.exprs[u],l);if(u==s.exprs.length-1)return d;o(d,l=n())}else if(s.type=="star"){let u=n();return r(l,u),o(i(s.expr,u),u),[r(u)]}else if(s.type=="plus"){let u=n();return o(i(s.expr,l),u),o(i(s.expr,u),u),[r(u)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let u=l;for(let d=0;d<s.min;d++){let h=n();o(i(s.expr,u),h),u=h}if(s.max==-1)o(i(s.expr,u),u);else for(let d=s.min;d<s.max;d++){let h=n();r(u,h),o(i(s.expr,u),h),u=h}return[r(u)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function y_(t,e){return e-t}function Gk(t,e){let n=[];return r(e),n.sort(y_);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:u}=i[s];!l&&n.indexOf(u)==-1&&r(u)}}}function PL(t){let e=Object.create(null);return n(Gk(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:u})=>{if(!l)return;let d;for(let h=0;h<o.length;h++)o[h][0]==l&&(d=o[h][1]);Gk(t,u).forEach(h=>{d||o.push([l,d=[]]),d.indexOf(h)==-1&&d.push(h)})})});let i=e[r.join(",")]=new Qs(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(y_);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function jL(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:u,next:d}=o.next[l];s.push(u.name),i&&!(u.isText||u.hasRequiredAttrs())&&(i=!1),r.indexOf(d)==-1&&r.push(d)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function x_(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function v_(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function b_(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${r}`);for(let o in t)t[o].validate&&t[o].validate(e[o])}function k_(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new FL(t,r,e[r]);return n}let Zk=class w_{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=k_(e,r.attrs),this.defaultAttrs=x_(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==Qs.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){return!e&&this.defaultAttrs?this.defaultAttrs:v_(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ki(this,this.computeAttrs(e),re.from(n),lt.setFrom(r))}createChecked(e=null,n,r){return n=re.from(n),this.checkContent(n),new Ki(this,this.computeAttrs(e),n,lt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=re.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(re.empty,!0);return i?new Ki(this,e,n.append(i),lt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.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 new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){b_(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 n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:lt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new w_(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function LL(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class FL{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?LL(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ap{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=k_(e,o.attrs),this.excluded=null;let i=x_(this.attrs);this.instance=i?new lt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new lt(this,v_(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new ap(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){b_(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Gy{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=gn.from(e.nodes),n.marks=gn.from(e.marks||{}),this.nodes=Zk.compile(this.spec.nodes,this),this.marks=ap.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Qs.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?Jk(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:Jk(this,s.split(" "))}this.nodeFromJSON=o=>Ki.fromJSON(this,o),this.markFromJSON=o=>lt.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Zk){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Hf(r,r.defaultAttrs,e,lt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Jk(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let l in t.marks){let u=t.marks[l];(o=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=u)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function zL(t){return t.tag!=null}function $L(t){return t.style!=null}class Yo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(zL(o))this.tags.push(o);else if($L(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Xk(this,n,!1);return r.addAll(e,lt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Xk(this,n,!0);return r.addAll(e,lt.none,n.from,n.to),ye.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(HL(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let u=s.getAttrs(n);if(u===!1)continue;s.attrs=u||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let l=n[s];if((l.priority==null?50:l.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=Qk(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=Qk(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Yo(e,Yo.schemaRules(e)))}}const C_={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},BL={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},S_={ol:!0,ul:!0},Gu=1,p1=2,bu=4;function Yk(t,e,n){return e!=null?(e?Gu:0)|(e==="full"?p1:0):t&&t.whitespace=="pre"?Gu|p1:n&~bu}class Xd{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=lt.none,this.match=i||(s&bu?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(re.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Gu)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=re.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(re.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!C_.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Xk{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=Yk(null,n.preserveWhitespace,0)|(r?bu:0);o?i=new Xd(o.type,o.attrs,lt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new Xd(null,null,lt.none,!0,null,s):i=new Xd(e.schema.topNodeType,null,lt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&p1?"full":this.localPreserveWS||(o.options&Gu)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
390
|
-
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let u=0;u<l.length;u++)u&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[u]&&this.insertNode(s.text(l[u]),n,!/\S/.test(l[u]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],u=e.previousSibling;(!l||u&&u.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;S_.hasOwnProperty(s)&&this.parser.normalizeLists&&VL(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(u?u.ignore:BL.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!u||u.skip||u.closeParent){u&&u.closeParent?this.open=Math.max(0,this.open-1):u&&u.skip.nodeType&&(e=u.skip);let d,h=this.needsBlock;if(C_.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),d=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let p=u&&u.skip?n:this.readStyles(e,n);p&&this.addAll(e,p),d&&this.sync(i),this.needsBlock=h}else{let d=this.readStyles(e,n);d&&this.addElementByRule(e,u,d,u.consuming===!1?l:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
391
|
-
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let u=this.parser.matchStyle(i,s,this,l);if(!u)break;if(u.ignore)return null;if(u.clearMark?n=n.filter(d=>!u.clearMark(d)):n=n.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)l=u;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let u=this.enter(s,n.attrs||null,r,n.preserveWhitespace);u&&(i=!0,r=u)}else{let u=this.parser.schema.marks[n.mark];r=r.concat(u.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(u=>this.insertNode(u,r,!1));else{let u=e;typeof n.contentElement=="string"?u=e.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(e):n.contentElement&&(u=n.contentElement),this.findAround(e,u,!0),this.addAll(u,r),this.findAround(e,u,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let u=this.nodes[s],d=u.findWrapping(e);if(d&&(!o||o.length>d.length+l)&&(o=d,i=u,!d.length))break;if(u.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=lt.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):ew(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=Yk(e,i,s.options);s.options&bu&&s.content.length==0&&(l|=bu);let u=lt.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):ew(d.type,e))?(u=d.addToSet(u),!1):!0),this.nodes.push(new Xd(e,n,u,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].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 n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Gu)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,u)=>{for(;l>=0;l--){let d=n[l];if(d==""){if(l==n.length-1||l==0)continue;for(;u>=i;u--)if(s(l-1,u))return!0;return!1}else{let h=u>0||u==0&&o?this.nodes[u].type:r&&u>=i?r.node(u-i).type:null;if(!h||h.name!=d&&!h.isInGroup(d))return!1;u--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function VL(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&S_.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function HL(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Qk(t){let e={};for(let n in t)e[n]=t[n];return e}function ew(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let u=0;u<l.edgeCount;u++){let{type:d,next:h}=l.edge(u);if(d==e||i.indexOf(h)<0&&s(h))return!0}};if(s(o.contentMatch))return!0}}class ua{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Qd(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,u=0;for(;l<i.length&&u<s.marks.length;){let d=s.marks[u];if(!this.marks[d.type.name]){u++;continue}if(!d.eq(i[l][0])||d.type.spec.spanning===!1)break;l++,u++}for(;l<i.length;)o=i.pop()[1];for(;u<s.marks.length;){let d=s.marks[u++],h=this.serializeMark(d,s.isInline,n);h&&(i.push([d,o]),o.appendChild(h.dom),o=h.contentDOM||h.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){if(e.isText)return Qd(n).createTextNode(e.text);let{dom:r,contentDOM:o}=wf(Qd(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&wf(Qd(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return typeof n=="string"?{dom:e.createTextNode(n)}:wf(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ua(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=tw(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return tw(e.marks)}}function tw(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Qd(t){return t.document||window.document}const nw=new WeakMap;function UL(t){let e=nw.get(t);return e===void 0&&nw.set(t,e=WL(t)),e}function WL(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function wf(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=UL(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,u=n?t.createElementNS(n,o):t.createElement(o),d=e[1],h=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){h=2;for(let p in d)if(d[p]!=null){let m=p.indexOf(" ");m>0?u.setAttributeNS(p.slice(0,m),p.slice(m+1),d[p]):p=="style"&&u.style?u.style.cssText=d[p]:u.setAttribute(p,d[p])}}for(let p=h;p<e.length;p++){let m=e[p];if(m===0){if(p<e.length-1||p>h)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else if(typeof m=="string")u.appendChild(t.createTextNode(m));else{let{dom:y,contentDOM:x}=wf(t,m,n,r);if(u.appendChild(y),x){if(l)throw new RangeError("Multiple content holes");l=x}}}return{dom:u,contentDOM:l}}const E_=65535,__=Math.pow(2,16);function qL(t,e){return t+e*__}function rw(t){return t&E_}function KL(t){return(t-(t&E_))/__}const T_=1,A_=2,Cf=4,M_=8;class m1{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&M_)>0}get deletedBefore(){return(this.delInfo&(T_|Cf))>0}get deletedAfter(){return(this.delInfo&(A_|Cf))>0}get deletedAcross(){return(this.delInfo&Cf)>0}}class ir{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ir.empty)return ir.empty}recover(e){let n=0,r=rw(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+KL(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?o:0);if(u>e)break;let d=this.ranges[l+i],h=this.ranges[l+s],p=u+d;if(e<=p){let m=d?e==u?-1:e==p?1:n:n,y=u+o+(m<0?0:h);if(r)return y;let x=e==(n<0?u:p)?null:qL(l/3,e-u),b=e==u?A_:e==p?T_:Cf;return(n<0?e!=u:e!=p)&&(b|=M_),new m1(y,b,x)}o+=h-d}return r?e+o:new m1(e+o,0,null)}touches(e,n){let r=0,o=rw(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?r:0);if(u>e)break;let d=this.ranges[l+i],h=u+d;if(e<=h&&l==o*3)return!0;r+=this.ranges[l+s]-d}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],l=s-(this.inverted?i:0),u=s+(this.inverted?0:i),d=this.ranges[o+n],h=this.ranges[o+r];e(l,l+d,u,u+h),i+=h-d}}invert(){return new ir(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ir.empty:new ir(e<0?[0,-e,0]:[0,0,e])}}ir.empty=new ir([]);class Zu{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Zu(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new Zu;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],l=s.mapResult(e,n);if(l.recover!=null){let u=this.getMirror(i);if(u!=null&&u>i&&u<this.to){i=u,e=this._maps[u].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new m1(e,o,null)}}const $m=Object.create(null);class Tn{getMap(){return ir.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=$m[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in $m)throw new RangeError("Duplicate use of step JSON ID "+e);return $m[e]=n,n.prototype.jsonID=e,n}}class $t{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new $t(e,null)}static fail(e){return new $t(null,e)}static fromReplace(e,n,r,o){try{return $t.ok(e.replace(n,r,o))}catch(i){if(i instanceof qu)return $t.fail(i.message);throw i}}}function Zy(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Zy(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return re.fromArray(r)}class Vi extends Tn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new ye(Zy(n.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return $t.fromReplace(e,this.from,this.to,i)}invert(){return new Br(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Vi(n.pos,r.pos,this.mark)}merge(e){return e instanceof Vi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Vi(n.from,n.to,e.markFromJSON(n.mark))}}Tn.jsonID("addMark",Vi);class Br extends Tn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ye(Zy(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return $t.fromReplace(e,this.from,this.to,r)}invert(){return new Vi(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Br(n.pos,r.pos,this.mark)}merge(e){return e instanceof Br&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Br(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Br(n.from,n.to,e.markFromJSON(n.mark))}}Tn.jsonID("removeMark",Br);class Hi extends Tn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return $t.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return $t.fromReplace(e,this.pos,this.pos+1,new ye(re.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new Hi(this.pos,n.marks[o]);return new Hi(this.pos,this.mark)}}return new ea(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Hi(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Hi(n.pos,e.markFromJSON(n.mark))}}Tn.jsonID("addNodeMark",Hi);class ea extends Tn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return $t.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return $t.fromReplace(e,this.pos,this.pos+1,new ye(re.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Hi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ea(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ea(n.pos,e.markFromJSON(n.mark))}}Tn.jsonID("removeNodeMark",ea);class zt extends Tn{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&g1(e,this.from,this.to)?$t.fail("Structure replace would overwrite content"):$t.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ir([this.from,this.to-this.from,this.slice.size])}invert(e){return new zt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&zt.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new zt(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof zt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?ye.empty:new ye(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new zt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?ye.empty:new ye(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new zt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new zt(n.from,n.to,ye.fromJSON(e,n.slice),!!n.structure)}}zt.MAP_BIAS=1;Tn.jsonID("replace",zt);class cn extends Tn{constructor(e,n,r,o,i,s,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(g1(e,this.from,this.gapFrom)||g1(e,this.gapTo,this.to)))return $t.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return $t.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?$t.fromReplace(e,this.from,this.to,r):$t.fail("Content does not fit in gap")}getMap(){return new ir([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new cn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new cn(n.pos,r.pos,o,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};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new cn(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(e,n.slice),n.insert,!!n.structure)}}Tn.jsonID("replaceAround",cn);function g1(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function GL(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(u,d,h)=>{if(!u.isInline)return;let p=u.marks;if(!r.isInSet(p)&&h.type.allowsMarkType(r.type)){let m=Math.max(d,e),y=Math.min(d+u.nodeSize,n),x=r.addToSet(p);for(let b=0;b<p.length;b++)p[b].isInSet(x)||(s&&s.to==m&&s.mark.eq(p[b])?s.to=y:o.push(s=new Br(m,y,p[b])));l&&l.to==m?l.to=y:i.push(l=new Vi(m,y,r))}}),o.forEach(u=>t.step(u)),i.forEach(u=>t.step(u))}function ZL(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let u=null;if(r instanceof ap){let d=s.marks,h;for(;h=r.isInSet(d);)(u||(u=[])).push(h),d=h.removeFromSet(d)}else r?r.isInSet(s.marks)&&(u=[r]):u=s.marks;if(u&&u.length){let d=Math.min(l+s.nodeSize,n);for(let h=0;h<u.length;h++){let p=u[h],m;for(let y=0;y<o.length;y++){let x=o[y];x.step==i-1&&p.eq(o[y].style)&&(m=x)}m?(m.to=d,m.step=i):o.push({style:p,from:Math.max(l,e),to:d,step:i})}}}),o.forEach(s=>t.step(new Br(s.from,s.to,s.style)))}function Jy(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],l=e+1;for(let u=0;u<i.childCount;u++){let d=i.child(u),h=l+d.nodeSize,p=r.matchType(d.type);if(!p)s.push(new zt(l,h,ye.empty));else{r=p;for(let m=0;m<d.marks.length;m++)n.allowsMarkType(d.marks[m].type)||t.step(new Br(l,h,d.marks[m]));if(o&&d.isText&&n.whitespace!="pre"){let m,y=/\r?\n|\r/g,x;for(;m=y.exec(d.text);)x||(x=new ye(re.from(n.schema.text(" ",n.allowedMarks(d.marks))),0,0)),s.push(new zt(l+m.index,l+m.index+m[0].length,x))}}l=h}if(!r.validEnd){let u=r.fillBefore(re.empty,!0);t.replace(l,l,new ye(u,0,0))}for(let u=s.length-1;u>=0;u--)t.step(s[u])}function JL(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function bl(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),l=t.$from.index(r)+o,u=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(l,u,n))return r;if(r==0||s.type.spec.isolating||!JL(s,l,u))break;l&&(o=1),u<s.childCount&&(i=1)}return null}function YL(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),u=s,d=l,h=re.empty,p=0;for(let x=i,b=!1;x>n;x--)b||r.index(x)>0?(b=!0,h=re.from(r.node(x).copy(h)),p++):u--;let m=re.empty,y=0;for(let x=i,b=!1;x>n;x--)b||o.after(x+1)<o.end(x)?(b=!0,m=re.from(o.node(x).copy(m)),y++):d++;t.step(new cn(u,d,s,l,new ye(h.append(m),p,y),h.size-p,!0))}function Yy(t,e,n=null,r=t){let o=XL(t,e),i=o&&QL(r,e);return i?o.map(ow).concat({type:e,attrs:n}).concat(i.map(ow)):null}function ow(t){return{type:t,attrs:null}}function XL(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function QL(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let u=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;u&&d<o;d++)u=u.matchType(n.child(d).type);return!u||!u.validEnd?null:s}function e7(t,e,n){let r=re.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=re.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new cn(o,i,o,i,new ye(r,0,0),n.length,!0))}function t7(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{let u=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,u)&&n7(t.doc,t.mapping.slice(i).map(l),r)){let d=null;if(r.schema.linebreakReplacement){let y=r.whitespace=="pre",x=!!r.contentMatch.matchType(r.schema.linebreakReplacement);y&&!x?d=!1:!y&&x&&(d=!0)}d===!1&&D_(t,s,l,i),Jy(t,t.mapping.slice(i).map(l,1),r,void 0,d===null);let h=t.mapping.slice(i),p=h.map(l,1),m=h.map(l+s.nodeSize,1);return t.step(new cn(p,m,p+1,m-1,new ye(re.from(r.create(u,null,s.marks)),0,0),1,!0)),d===!0&&N_(t,s,l,i),!1}})}function N_(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let u=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(u,u+1,e.type.schema.linebreakReplacement.create())}}})}function D_(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
392
|
-
`))}})}function n7(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function r7(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new cn(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ye(re.from(s),0,0),1,!0))}function Xo(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let d=o.depth-1,h=n-2;d>i;d--,h--){let p=o.node(d),m=o.index(d);if(p.type.spec.isolating)return!1;let y=p.content.cutByIndex(m,p.childCount),x=r&&r[h+1];x&&(y=y.replaceChild(0,x.type.create(x.attrs)));let b=r&&r[h]||p;if(!p.canReplace(m+1,p.childCount)||!b.type.validContent(y))return!1}let l=o.indexAfter(i),u=r&&r[0];return o.node(i).canReplaceWith(l,l,u?u.type:o.node(i+1).type)}function o7(t,e,n=1,r){let o=t.doc.resolve(e),i=re.empty,s=re.empty;for(let l=o.depth,u=o.depth-n,d=n-1;l>u;l--,d--){i=re.from(o.node(l).copy(i));let h=r&&r[d];s=re.from(h?h.type.create(h.attrs,s):o.node(l).copy(s))}t.step(new zt(e,e,new ye(i.append(s),n,n),!0))}function cs(t,e){let n=t.resolve(e),r=n.index();return R_(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function i7(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function R_(t,e){return!!(t&&e&&!t.isLeaf&&i7(t,e))}function lp(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&R_(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function s7(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let h=s.whitespace=="pre",p=!!s.contentMatch.matchType(o);h&&!p?r=!1:!h&&p&&(r=!0)}let l=t.steps.length;if(r===!1){let h=t.doc.resolve(e+n);D_(t,h.node(),h.before(),l)}s.inlineContent&&Jy(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let u=t.mapping.slice(l),d=u.map(e-n);if(t.step(new zt(d,u.map(e+n,-1),ye.empty,!0)),r===!0){let h=t.doc.resolve(d);N_(t,h.node(),h.before(),t.steps.length)}return t}function a7(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function O_(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(l>0?1:0),d=r.node(s),h=!1;if(i==1)h=d.canReplace(u,u,o);else{let p=d.contentMatchAt(u).findWrapping(o.firstChild.type);h=p&&d.canReplaceWith(u,u,p[0])}if(h)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function up(t,e,n=e,r=ye.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return I_(o,i,r)?new zt(e,n,r):new l7(o,i,r).fit()}function I_(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class l7{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=re.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=re.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let u=new ye(i,s,l);return e>-1?new cn(r.pos,e,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new zt(r.pos,o.pos,u):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Bm(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:u,match:d}=this.frontier[l],h,p=null;if(n==1&&(s?d.matchType(s.type)||(p=d.fillBefore(re.from(s),!1)):i&&u.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:p};if(n==2&&s&&(h=d.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:h};if(i&&d.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Bm(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ye(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Bm(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ye(hu(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(hu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let b=0;b<i.length;b++)this.openFrontierNode(i[b]);let s=this.unplaced,l=r?r.content:s.content,u=s.openStart-e,d=0,h=[],{match:p,type:m}=this.frontier[n];if(o){for(let b=0;b<o.childCount;b++)h.push(o.child(b));p=p.matchFragment(o)}let y=l.size+e-(s.content.size-s.openEnd);for(;d<l.childCount;){let b=l.child(d),w=p.matchType(b.type);if(!w)break;d++,(d>1||u==0||b.content.size)&&(p=w,h.push(P_(b.mark(m.allowedMarks(b.marks)),d==1?u:0,d==l.childCount?y:-1)))}let x=d==l.childCount;x||(y=-1),this.placed=pu(this.placed,n,re.from(h)),this.frontier[n].match=p,x&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,w=l;b<y;b++){let E=w.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),w=E.content}this.unplaced=x?e==0?ye.empty:new ye(hu(s.content,e-1,1),e-1,y<0?s.openEnd:e-1):new ye(hu(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Vm(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=Vm(e,n,o,r,i);if(s){for(let l=n-1;l>=0;l--){let{match:u,type:d}=this.frontier[l],h=Vm(e,l,d,u,!0);if(!h||h.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=pu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=pu(this.placed,this.depth,re.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(re.empty,!0);n.childCount&&(this.placed=pu(this.placed,this.frontier.length,n))}}function hu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(hu(t.firstChild.content,e-1,n)))}function pu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(pu(t.lastChild.content,e-1,n)))}function Bm(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function P_(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,P_(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(re.empty,!0)))),t.copy(r)}function Vm(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!u7(n,i.content,s)?l:null}function u7(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function c7(t){return t.spec.defining||t.spec.definingForContent}function d7(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(I_(o,i,r))return t.step(new zt(e,n,r));let s=L_(o,i);s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let m=o.depth,y=o.pos-1;m>0;m--,y--){let x=o.node(m).type.spec;if(x.defining||x.definingAsContext||x.isolating)break;s.indexOf(m)>-1?l=m:o.before(m)==y&&s.splice(1,0,-m)}let u=s.indexOf(l),d=[],h=r.openStart;for(let m=r.content,y=0;;y++){let x=m.firstChild;if(d.push(x),y==r.openStart)break;m=x.content}for(let m=h-1;m>=0;m--){let y=d[m],x=c7(y.type);if(x&&!y.sameMarkup(o.node(Math.abs(l)-1)))h=m;else if(x||!y.type.isTextblock)break}for(let m=r.openStart;m>=0;m--){let y=(m+h+1)%(r.openStart+1),x=d[y];if(x)for(let b=0;b<s.length;b++){let w=s[(b+u)%s.length],E=!0;w<0&&(E=!1,w=-w);let _=o.node(w-1),A=o.index(w-1);if(_.canReplaceWith(A,A,x.type,x.marks))return t.replace(o.before(w),E?i.after(w):n,new ye(j_(r.content,0,r.openStart,y),y,r.openEnd))}}let p=t.steps.length;for(let m=s.length-1;m>=0&&(t.replace(e,n,r),!(t.steps.length>p));m--){let y=s[m];y<0||(e=o.before(y),n=i.after(y))}}function j_(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(j_(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(re.empty,!0))}return t}function f7(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=a7(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ye(re.from(r),0,0))}function h7(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n);if(r.parent.isTextblock&&o.parent.isTextblock&&r.start()!=o.start()&&r.parentOffset==0&&o.parentOffset==0){let s=r.sharedDepth(n),l=!1;for(let u=r.depth;u>s;u--)r.node(u).type.spec.isolating&&(l=!0);for(let u=o.depth;u>s;u--)o.node(u).type.spec.isolating&&(l=!0);if(!l){for(let u=r.depth;u>0&&e==r.start(u);u--)e=r.before(u);for(let u=o.depth;u>0&&n==o.start(u);u--)n=o.before(u);r=t.doc.resolve(e),o=t.doc.resolve(n)}}let i=L_(r,o);for(let s=0;s<i.length;s++){let l=i[s],u=s==i.length-1;if(u&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),o.end(l));if(l>0&&(u||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function L_(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class Ga extends Tn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return $t.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return $t.fromReplace(e,this.pos,this.pos+1,new ye(re.from(o),0,n.isLeaf?0:1))}getMap(){return ir.empty}invert(e){return new Ga(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ga(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ga(n.pos,n.attr,n.value)}}Tn.jsonID("attr",Ga);class Ju extends Tn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return $t.ok(r)}getMap(){return ir.empty}invert(e){return new Ju(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ju(n.attr,n.value)}}Tn.jsonID("docAttr",Ju);let ol=class extends Error{};ol=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};ol.prototype=Object.create(Error.prototype);ol.prototype.constructor=ol;ol.prototype.name="TransformError";class F_{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Zu}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new ol(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((i,s,l,u)=>{e=Math.min(e,l),n=Math.max(n,u)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ye.empty){let o=up(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ye(re.from(r),0,0))}delete(e,n){return this.replace(e,n,ye.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return d7(this,e,n,r),this}replaceRangeWith(e,n,r){return f7(this,e,n,r),this}deleteRange(e,n){return h7(this,e,n),this}lift(e,n){return YL(this,e,n),this}join(e,n=1){return s7(this,e,n),this}wrap(e,n){return e7(this,e,n),this}setBlockType(e,n=e,r,o=null){return t7(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return r7(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Ga(e,n,r)),this}setDocAttribute(e,n){return this.step(new Ju(e,n)),this}addNodeMark(e,n){return this.step(new Hi(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof lt)n.isInSet(r.marks)&&this.step(new ea(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new ea(e,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(e,n=1,r){return o7(this,e,n,r),this}addMark(e,n,r){return GL(this,e,n,r),this}removeMark(e,n,r){return ZL(this,e,n,r),this}clearIncompatible(e,n,r){return Jy(this,e,n,r),this}}const Hm=Object.create(null);class Ve{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new p7(e.min(n),e.max(n))]}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 n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=ye.empty){let r=n.content.lastChild,o=null;for(let l=0;l<n.openEnd;l++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:u,$to:d}=s[l],h=e.mapping.slice(i);e.replaceRange(h.map(u.pos),h.map(d.pos),l?ye.empty:n),l==0&&aw(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],u=e.mapping.slice(r),d=u.map(s.pos),h=u.map(l.pos);i?e.deleteRange(d,h):(e.replaceRangeWith(d,h,n),aw(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new je(e):Ha(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?Ha(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Ha(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new sr(e.node(0))}static atStart(e){return Ha(e,e,0,0,1)||new sr(e)}static atEnd(e){return Ha(e,e,e.content.size,e.childCount,-1)||new sr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Hm[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Hm)throw new RangeError("Duplicate use of selection JSON ID "+e);return Hm[e]=n,n.prototype.jsonID=e,n}getBookmark(){return je.between(this.$anchor,this.$head).getBookmark()}}Ve.prototype.visible=!0;class p7{constructor(e,n){this.$from=e,this.$to=n}}let iw=!1;function sw(t){!iw&&!t.parent.inlineContent&&(iw=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class je extends Ve{constructor(e,n=e){sw(e),sw(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ve.near(r);let o=e.resolve(n.map(this.anchor));return new je(o.parent.inlineContent?o:r,r)}replace(e,n=ye.empty){if(super.replace(e,n),n==ye.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof je&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new cp(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new je(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ve.findFrom(n,r,!0)||Ve.findFrom(n,-r,!0);if(i)n=i.$head;else return Ve.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Ve.findFrom(e,-r,!0)||Ve.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new je(e,n)}}Ve.jsonID("text",je);class cp{constructor(e,n){this.anchor=e,this.head=n}map(e){return new cp(e.map(this.anchor),e.map(this.head))}resolve(e){return je.between(e.resolve(this.anchor),e.resolve(this.head))}}class Re extends Ve{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?Ve.near(i):new Re(i)}content(){return new ye(re.from(this.node),0,0)}eq(e){return e instanceof Re&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Xy(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Re(e.resolve(n.anchor))}static create(e,n){return new Re(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Re.prototype.visible=!1;Ve.jsonID("node",Re);class Xy{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new cp(r,r):new Xy(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Re.isSelectable(r)?new Re(n):Ve.near(n)}}class sr extends Ve{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=ye.empty){if(n==ye.empty){e.delete(0,e.doc.content.size);let r=Ve.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new sr(e)}map(e){return new sr(e)}eq(e){return e instanceof sr}getBookmark(){return m7}}Ve.jsonID("all",sr);const m7={map(){return this},resolve(t){return new sr(t)}};function Ha(t,e,n,r,o,i=!1){if(e.inlineContent)return je.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Re.isSelectable(l))return Re.create(t,n-(o<0?l.nodeSize:0))}else{let u=Ha(t,l,n+o,o<0?l.childCount:0,o,i);if(u)return u}n+=l.nodeSize*o}return null}function aw(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof zt||o instanceof cn))return;let i=t.mapping.maps[r],s;i.forEach((l,u,d,h)=>{s==null&&(s=h)}),t.setSelection(Ve.near(t.doc.resolve(s),n))}const lw=1,ef=2,uw=4;class g7 extends F_{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(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|lw)&~ef,this.storedMarks=null,this}get selectionSet(){return(this.updated&lw)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ef,this}ensureMarks(e){return lt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),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&ef)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~ef,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||lt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(Ve.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,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|=uw,this}get scrolledIntoView(){return(this.updated&uw)>0}}function cw(t,e){return!e||!t?t:t.bind(e)}class mu{constructor(e,n,r){this.name=e,this.init=cw(n.init,r),this.apply=cw(n.apply,r)}}const y7=[new mu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new mu("selection",{init(t,e){return t.selection||Ve.atStart(e.doc)},apply(t){return t.selection}}),new mu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new mu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Um{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=y7.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new mu(r.key,r.spec.state,r))})}}class Os{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,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let u=o?o[s].n:0,d=o?o[s].state:this,h=u<n.length&&l.spec.appendTransaction.call(l,u?n.slice(u):n,d,r);if(h&&r.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!o){o=[];for(let p=0;p<this.config.plugins.length;p++)o.push(p<s?{state:r,n:n.length}:{state:this,n:0})}n.push(h),r=r.applyInner(h),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Os(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new g7(this)}static create(e){let n=new Um(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Os(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Um(this.schema,e.plugins),r=n.fields,o=new Os(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Um(e.schema,e.plugins),i=new Os(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ki.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Ve.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let u=r[l],d=u.spec.state;if(u.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=d.fromJSON.call(u,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function z_(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=z_(o,e,{})),n[r]=o}return n}class wt{constructor(e){this.spec=e,this.props={},e.props&&z_(e.props,this,this.props),this.key=e.key?e.key.key:$_("plugin")}getState(e){return e[this.key]}}const Wm=Object.create(null);function $_(t){return t in Wm?t+"$"+ ++Wm[t]:(Wm[t]=0,t+"$")}class Vt{constructor(e="key"){this.key=$_(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const B_=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function V_(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const H_=(t,e,n)=>{let r=V_(t,n);if(!r)return!1;let o=Qy(r);if(!o){let s=r.blockRange(),l=s&&bl(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(X_(t,o,e,-1))return!0;if(r.parent.content.size==0&&(il(i,"end")||Re.isSelectable(i)))for(let s=r.depth;;s--){let l=up(t.doc,r.before(s),r.after(s),ye.empty);if(l&&l.slice.size<l.to-l.from){if(e){let u=t.tr.step(l);u.setSelection(il(i,"end")?Ve.findFrom(u.doc.resolve(u.mapping.map(o.pos,-1)),-1):Re.create(u.doc,o.pos-i.nodeSize)),e(u.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},x7=(t,e,n)=>{let r=V_(t,n);if(!r)return!1;let o=Qy(r);return o?U_(t,o,e):!1},v7=(t,e,n)=>{let r=q_(t,n);if(!r)return!1;let o=ex(r);return o?U_(t,o,e):!1};function U_(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let h=o.lastChild;if(!h)return!1;o=h}let s=e.nodeAfter,l=s,u=e.pos+1;for(;!l.isTextblock;u++){if(l.type.spec.isolating)return!1;let h=l.firstChild;if(!h)return!1;l=h}let d=up(t.doc,i,u,ye.empty);if(!d||d.from!=i||d instanceof zt&&d.slice.size>=u-i)return!1;if(n){let h=t.tr.step(d);h.setSelection(je.create(h.doc,i)),n(h.scrollIntoView())}return!0}function il(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const W_=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Qy(r)}let s=i&&i.nodeBefore;return!s||!Re.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Re.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Qy(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function q_(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const K_=(t,e,n)=>{let r=q_(t,n);if(!r)return!1;let o=ex(r);if(!o)return!1;let i=o.nodeAfter;if(X_(t,o,e,1))return!0;if(r.parent.content.size==0&&(il(i,"start")||Re.isSelectable(i))){let s=up(t.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(il(i,"start")?Ve.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):Re.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},G_=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=ex(r)}let s=i&&i.nodeAfter;return!s||!Re.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Re.create(t.doc,i.pos)).scrollIntoView()),!0)};function ex(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const b7=(t,e)=>{let n=t.selection,r=n instanceof Re,o;if(r){if(n.node.isTextblock||!cs(t.doc,n.from))return!1;o=n.from}else if(o=lp(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(Re.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},k7=(t,e)=>{let n=t.selection,r;if(n instanceof Re){if(n.node.isTextblock||!cs(t.doc,n.to))return!1;r=n.to}else if(r=lp(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},w7=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&bl(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},Z_=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
393
|
-
`).scrollIntoView()),!0)};function tx(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const C7=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=tx(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),u=t.tr.replaceWith(l,l,s.createAndFill());u.setSelection(Ve.near(u.doc.resolve(l),1)),e(u.scrollIntoView())}return!0},J_=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof sr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=tx(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(je.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Y_=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Xo(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&bl(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function S7(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Re&&e.selection.node.isBlock)return!r.parentOffset||!Xo(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,u=!1,d=!1;for(let y=r.depth;;y--)if(r.node(y).isBlock){u=r.end(y)==r.pos+(r.depth-y),d=r.start(y)==r.pos-(r.depth-y),l=tx(r.node(y-1).contentMatchAt(r.indexAfter(y-1))),i.unshift(u&&l?{type:l}:null),s=y;break}else{if(y==1)return!1;i.unshift(null)}let h=e.tr;(e.selection instanceof je||e.selection instanceof sr)&&h.deleteSelection();let p=h.mapping.map(r.pos),m=Xo(h.doc,p,i.length,i);if(m||(i[0]=l?{type:l}:null,m=Xo(h.doc,p,i.length,i)),!m)return!1;if(h.split(p,i.length,i),!u&&d&&r.node(s).type!=l){let y=h.mapping.map(r.before(s)),x=h.doc.resolve(y);l&&r.node(s-1).canReplaceWith(x.index(),x.index()+1,l)&&h.setNodeMarkup(h.mapping.map(r.before(s)),l)}return n&&n(h.scrollIntoView()),!0}}const E7=S7(),_7=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(Re.create(t.doc,o))),!0)};function T7(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||cs(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function X_(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,u=o.type.spec.isolating||i.type.spec.isolating;if(!u&&T7(t,e,n))return!0;let d=!u&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let y=e.pos+i.nodeSize,x=re.empty;for(let E=s.length-1;E>=0;E--)x=re.from(s[E].create(null,x));x=re.from(o.copy(x));let b=t.tr.step(new cn(e.pos-1,y,e.pos,y,new ye(x,1,0),s.length,!0)),w=b.doc.resolve(y+2*s.length);w.nodeAfter&&w.nodeAfter.type==o.type&&cs(b.doc,w.pos)&&b.join(w.pos),n(b.scrollIntoView())}return!0}let h=i.type.spec.isolating||r>0&&u?null:Ve.findFrom(e,1),p=h&&h.$from.blockRange(h.$to),m=p&&bl(p);if(m!=null&&m>=e.depth)return n&&n(t.tr.lift(p,m).scrollIntoView()),!0;if(d&&il(i,"start",!0)&&il(o,"end")){let y=o,x=[];for(;x.push(y),!y.isTextblock;)y=y.lastChild;let b=i,w=1;for(;!b.isTextblock;b=b.firstChild)w++;if(y.canReplace(y.childCount,y.childCount,b.content)){if(n){let E=re.empty;for(let A=x.length-1;A>=0;A--)E=re.from(x[A].copy(E));let _=t.tr.step(new cn(e.pos-x.length,e.pos+i.nodeSize,e.pos+w,e.pos+i.nodeSize-w,new ye(E,x.length,0),0,!0));n(_.scrollIntoView())}return!0}}return!1}function Q_(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(je.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const A7=Q_(-1),M7=Q_(1);function N7(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Yy(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function dw(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(u,d)=>{if(o)return!1;if(!(!u.isTextblock||u.hasMarkup(t,e)))if(u.type==t)o=!0;else{let h=n.doc.resolve(d),p=h.index();o=h.parent.canReplaceWith(p,p+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:u}}=n.selection.ranges[s];i.setBlockType(l,u,t,e)}r(i.scrollIntoView())}return!0}}function nx(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}nx(B_,H_,W_);nx(B_,K_,G_);nx(Z_,J_,Y_,E7);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function D7(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let l=r?n.tr:null;return R7(l,s,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function R7(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let u=s.resolve(e.start-2);i=new Vf(u,u,e.depth),e.endIndex<e.parent.childCount&&(e=new Vf(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let l=Yy(i,n,r,e);return l?(t&&O7(t,e,l,o,n),!0):!1}function O7(t,e,n,r,o){let i=re.empty;for(let h=n.length-1;h>=0;h--)i=re.from(n[h].type.create(n[h].attrs,i));t.step(new cn(e.start-(r?2:0),e.end,e.start,e.end,new ye(i,0,0),n.length,!0));let s=0;for(let h=0;h<n.length;h++)n[h].type==o&&(s=h+1);let l=n.length-s,u=e.start+n.length-(r?2:0),d=e.parent;for(let h=e.startIndex,p=e.endIndex,m=!0;h<p;h++,m=!1)!m&&Xo(t.doc,u,l)&&(t.split(u,l),u+=2*l),u+=d.child(h).nodeSize;return t}function I7(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?P7(e,n,t,i):j7(e,n,i):!0:!1}}function P7(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new cn(i-1,s,i,s,new ye(re.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Vf(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=bl(r);if(l==null)return!1;o.lift(r,l);let u=o.doc.resolve(o.mapping.map(i,-1)-1);return cs(o.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&o.join(u.pos),e(o.scrollIntoView()),!0}function j7(t,e,n){let r=t.tr,o=n.parent;for(let y=n.end,x=n.endIndex-1,b=n.startIndex;x>b;x--)y-=o.child(x).nodeSize,r.delete(y-1,y+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,u=n.endIndex==o.childCount,d=i.node(-1),h=i.index(-1);if(!d.canReplace(h+(l?0:1),h+1,s.content.append(u?re.empty:re.from(o))))return!1;let p=i.pos,m=p+s.nodeSize;return r.step(new cn(p-(l?1:0),m+(u?1:0),p+1,m-1,new ye((l?re.empty:re.from(o.copy(re.empty))).append(u?re.empty:re.from(o.copy(re.empty))),l?0:1,u?0:1),l?0:1)),e(r.scrollIntoView()),!0}function L7(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,d=>d.childCount>0&&d.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,u=l.child(s-1);if(u.type!=t)return!1;if(n){let d=u.lastChild&&u.lastChild.type==l.type,h=re.from(d?t.create():null),p=new ye(re.from(t.create(null,re.from(l.type.create(null,h)))),d?3:1,0),m=i.start,y=i.end;n(e.tr.step(new cn(m-(d?3:1),y,m,y,p,1,!0)).scrollIntoView())}return!0}}const yn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},sl=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let y1=null;const Uo=function(t,e,n){let r=y1||(y1=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},F7=function(){y1=null},ta=function(t,e,n,r){return n&&(fw(t,e,n,r,-1)||fw(t,e,n,r,1))},z7=/^(img|br|input|textarea|hr)$/i;function fw(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Er(t))){let s=t.parentNode;if(!s||s.nodeType!=1||xc(t)||z7.test(t.nodeName)||t.contentEditable=="false")return!1;e=yn(t)+(o<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=o;else return!1;else t=s,e=o<0?Er(t):0}else return!1}}function Er(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function $7(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Er(t)}else if(t.parentNode&&!xc(t))e=yn(t),t=t.parentNode;else return null}}function B7(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!xc(t))e=yn(t)+1,t=t.parentNode;else return null}}function V7(t,e,n){for(let r=e==0,o=e==Er(t);r||o;){if(t==n)return!0;let i=yn(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==Er(t)}}function xc(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const dp=function(t){return t.focusNode&&ta(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Rs(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function H7(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function U7(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Er(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Er(r.startContainer),r.startOffset)}}}const bo=typeof navigator<"u"?navigator:null,hw=typeof document<"u"?document:null,ds=bo&&bo.userAgent||"",x1=/Edge\/(\d+)/.exec(ds),e4=/MSIE \d/.exec(ds),v1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ds),Yn=!!(e4||v1||x1),Gi=e4?document.documentMode:v1?+v1[1]:x1?+x1[1]:0,_r=!Yn&&/gecko\/(\d+)/i.test(ds);_r&&+(/Firefox\/(\d+)/.exec(ds)||[0,0])[1];const b1=!Yn&&/Chrome\/(\d+)/.exec(ds),vn=!!b1,t4=b1?+b1[1]:0,_n=!Yn&&!!bo&&/Apple Computer/.test(bo.vendor),al=_n&&(/Mobile\/\w+/.test(ds)||!!bo&&bo.maxTouchPoints>2),wr=al||(bo?/Mac/.test(bo.platform):!1),n4=bo?/Win/.test(bo.platform):!1,qo=/Android \d/.test(ds),vc=!!hw&&"webkitFontSmoothing"in hw.documentElement.style,W7=vc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function q7(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Fo(t,e){return typeof t=="number"?t:t[e]}function K7(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function pw(t,e,n){if(!k1(e)&&e.left==0)return;let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=sl(s);continue}let l=s,u=l==i.body,d=u?q7(i):K7(l),h=0,p=0;if(e.top<d.top+Fo(r,"top")?p=-(d.top-e.top+Fo(o,"top")):e.bottom>d.bottom-Fo(r,"bottom")&&(p=e.bottom-e.top>d.bottom-d.top?e.top+Fo(o,"top")-d.top:e.bottom-d.bottom+Fo(o,"bottom")),e.left<d.left+Fo(r,"left")?h=-(d.left-e.left+Fo(o,"left")):e.right>d.right-Fo(r,"right")&&(h=e.right-d.right+Fo(o,"right")),h||p)if(u)i.defaultView.scrollBy(h,p);else{let y=l.scrollLeft,x=l.scrollTop;p&&(l.scrollTop+=p),h&&(l.scrollLeft+=h);let b=l.scrollLeft-y,w=l.scrollTop-x;e={left:e.left-b,top:e.top-w,right:e.right-b,bottom:e.bottom-w}}let m=u?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(m))break;s=m=="absolute"?s.offsetParent:sl(s)}}function G7(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=t.root.elementFromPoint(i,s);if(!l||l==t.dom||!t.dom.contains(l))continue;let u=l.getBoundingClientRect();if(u.top>=n-20){r=l,o=u.top;break}}return{refDOM:r,refTop:o,stack:r4(t.dom)}}function r4(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=sl(r));return e}function Z7({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;o4(n,r==0?0:r-e)}function o4(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let za=null;function J7(t){if(t.setActive)return t.setActive();if(za)return t.focus(za);let e=r4(t);t.focus(za==null?{get preventScroll(){return za={preventScroll:!0},!0}}:void 0),za||(za=!1,o4(e,0))}function i4(t,e){let n,r=2e8,o,i=0,s=e.top,l=e.top,u,d;for(let h=t.firstChild,p=0;h;h=h.nextSibling,p++){let m;if(h.nodeType==1)m=h.getClientRects();else if(h.nodeType==3)m=Uo(h).getClientRects();else continue;for(let y=0;y<m.length;y++){let x=m[y];if(x.top<=s&&x.bottom>=l){s=Math.max(x.bottom,s),l=Math.min(x.top,l);let b=x.left>e.left?x.left-e.left:x.right<e.left?e.left-x.right:0;if(b<r){n=h,r=b,o=b&&n.nodeType==3?{left:x.right<e.left?x.right:x.left,top:e.top}:e,h.nodeType==1&&b&&(i=p+(e.left>=(x.left+x.right)/2?1:0));continue}}else x.top>e.top&&!u&&x.left<=e.left&&x.right>=e.left&&(u=h,d={left:Math.max(x.left,Math.min(x.right,e.left)),top:x.top});!n&&(e.left>=x.right&&e.top>=x.top||e.left>=x.left&&e.top>=x.bottom)&&(i=p+1)}}return!n&&u&&(n=u,o=d,r=0),n&&n.nodeType==3?Y7(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:i4(n,o)}function Y7(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=Ri(r,1);if(s.top!=s.bottom&&rx(e,s)){o={node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function rx(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function X7(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Q7(t,e,n){let{node:r,offset:o}=i4(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function eF(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0),u;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((u=l.dom.getBoundingClientRect()).width||u.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&u.left>r.left||u.top>r.top?o=l.posBefore:(!s&&u.right<r.left||u.bottom<r.top)&&(o=l.posAfter),s=!0),!l.contentDOM&&o<0&&!l.node.isText))return(l.node.isBlock?r.top<(u.top+u.bottom)/2:r.left<(u.left+u.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function s4(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let l=s.getClientRects();for(let u=0;u<l.length;u++){let d=l[u];if(rx(e,d))return s4(s,e,d)}}if((i=(i+1)%r)==o)break}return t}function tF(t,e){let n=t.dom.ownerDocument,r,o=0,i=U7(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=t.dom.getBoundingClientRect();if(!rx(e,d)||(s=s4(t.dom,e,d),!s))return null}if(_n)for(let d=s;r&&d;d=sl(d))d.draggable&&(r=void 0);if(s=X7(s,e),r){if(_r&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let h=r.childNodes[o],p;h.nodeName=="IMG"&&(p=h.getBoundingClientRect()).right<=e.left&&p.bottom>e.top&&o++}let d;vc&&o&&r.nodeType==1&&(d=r.childNodes[o-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=eF(t,r,o,e))}l==null&&(l=Q7(t,s,e));let u=t.docView.nearestDesc(s,!0);return{pos:l,inside:u?u.posAtStart-u.border:-1}}function k1(t){return t.top<t.bottom||t.left<t.right}function Ri(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(k1(r))return r}return Array.prototype.find.call(n,k1)||t.getBoundingClientRect()}const nF=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function a4(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=vc||_r;if(r.nodeType==3)if(s&&(nF.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let u=Ri(Uo(r,o,o),n);if(_r&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let d=Ri(Uo(r,o-1,o-1),-1);if(d.top==u.top){let h=Ri(Uo(r,o,o+1),-1);if(h.top!=u.top)return au(h,h.left<d.left)}}return u}else{let u=o,d=o,h=n<0?1:-1;return n<0&&!o?(d++,h=-1):n>=0&&o==r.nodeValue.length?(u--,h=1):n<0?u--:d++,au(Ri(Uo(r,u,d),h),h<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Er(r))){let u=r.childNodes[o-1];if(u.nodeType==1)return qm(u.getBoundingClientRect(),!1)}if(i==null&&o<Er(r)){let u=r.childNodes[o];if(u.nodeType==1)return qm(u.getBoundingClientRect(),!0)}return qm(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==Er(r))){let u=r.childNodes[o-1],d=u.nodeType==3?Uo(u,Er(u)-(s?0:1)):u.nodeType==1&&(u.nodeName!="BR"||!u.nextSibling)?u:null;if(d)return au(Ri(d,1),!1)}if(i==null&&o<Er(r)){let u=r.childNodes[o];for(;u.pmViewDesc&&u.pmViewDesc.ignoreForCoords;)u=u.nextSibling;let d=u?u.nodeType==3?Uo(u,0,s?0:1):u.nodeType==1?u:null:null;if(d)return au(Ri(d,-1),!0)}return au(Ri(r.nodeType==3?Uo(r):r,-n),n>=0)}function au(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function qm(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function l4(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function rF(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return l4(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=a4(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let u;if(l.nodeType==1)u=l.getClientRects();else if(l.nodeType==3)u=Uo(l,0,l.nodeValue.length).getClientRects();else continue;for(let d=0;d<u.length;d++){let h=u[d];if(h.bottom>h.top+1&&(n=="up"?s.top-h.top>(h.bottom-s.top)*2:h.bottom-s.bottom>(s.bottom-h.top)*2))return!1}}return!0})}const oF=/[\u0590-\u08ac]/;function iF(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return l?!oF.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:l4(t,e,()=>{let{focusNode:u,focusOffset:d,anchorNode:h,anchorOffset:p}=t.domSelectionRange(),m=l.caretBidiLevel;l.modify("move",n,"character");let y=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:x,focusOffset:b}=t.domSelectionRange(),w=x&&!y.contains(x.nodeType==1?x:x.parentNode)||u==x&&d==b;try{l.collapse(h,p),u&&(u!=h||d!=p)&&l.extend&&l.extend(u,d)}catch{}return m!=null&&(l.caretBidiLevel=m),w}):r.pos==r.start()||r.pos==r.end()}let mw=null,gw=null,yw=!1;function sF(t,e,n){return mw==e&&gw==n?yw:(mw=e,gw=n,yw=n=="up"||n=="down"?rF(t,e,n):iF(t,e,n))}const Tr=0,xw=1,Is=2,Vr=3;class bc{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Tr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){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 n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.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,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>yn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let l=o.children[s];if(l.size){o=l;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],l=i+s.size;if(l>e||s instanceof c4){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof u4&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?yn(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?yn(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,l=0;;l++){let u=this.children[l],d=s+u.size;if(o==-1&&e<=d){let h=s+u.border;if(e>=h&&n<=d-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(e,n,h);e=s;for(let p=l;p>0;p--){let m=this.children[p-1];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(1)){o=yn(m.dom)+1;break}e-=m.size}o==-1&&(o=0)}if(o>-1&&(d>n||l==this.children.length-1)){n=d;for(let h=l+1;h<this.children.length;h++){let p=this.children[h];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){i=yn(p.dom);break}n+=p.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let y=0,x=0;y<this.children.length;y++){let b=this.children[y],w=x+b.size;if(i>x&&s<w)return b.setSelection(e-x-b.border,n-x-b.border,r,o);x=w}let l=this.domFromPos(e,e?-1:1),u=n==e?l:this.domFromPos(n,n?-1:1),d=r.root.getSelection(),h=r.domSelectionRange(),p=!1;if((_r||_n)&&e==n){let{node:y,offset:x}=l;if(y.nodeType==3){if(p=!!(x&&y.nodeValue[x-1]==`
|
|
394
|
-
`),p&&x==y.nodeValue.length)for(let b=y,w;b;b=b.parentNode){if(w=b.nextSibling){w.nodeName=="BR"&&(l=u={node:w.parentNode,offset:yn(w)+1});break}let E=b.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let b=y.childNodes[x-1];p=b&&(b.nodeName=="BR"||b.contentEditable=="false")}}if(_r&&h.focusNode&&h.focusNode!=u.node&&h.focusNode.nodeType==1){let y=h.focusNode.childNodes[h.focusOffset];y&&y.contentEditable=="false"&&(o=!0)}if(!(o||p&&_n)&&ta(l.node,l.offset,h.anchorNode,h.anchorOffset)&&ta(u.node,u.offset,h.focusNode,h.focusOffset))return;let m=!1;if((d.extend||e==n)&&!(p&&_r)){d.collapse(l.node,l.offset);try{e!=n&&d.extend(u.node,u.offset),m=!0}catch{}}if(!m){if(e>n){let x=l;l=u,u=x}let y=document.createRange();y.setEnd(u.node,u.offset),y.setStart(l.node,l.offset),d.removeAllRanges(),d.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,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,u=s-i.border;if(e>=l&&n<=u){this.dirty=e==r||n==s?Is:xw,e==l&&n==u&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Vr:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Is:Vr}r=s}this.dirty=Is}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Is:xw;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class u4 extends bc{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Tr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(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}}class aF extends bc{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Zi extends bc{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=ua.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Zi(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Vr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Vr&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Tr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Tr}}slice(e,n,r){let o=Zi.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=C1(i,n,s,r)),e>0&&(i=C1(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ji extends bc{constructor(e,n,r,o,i,s,l){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],u,d=l&&l(n,i,()=>{if(!u)return s;if(u.parent)return u.parent.posBeforeChild(u)},r,o),h=d&&d.dom,p=d&&d.contentDOM;if(n.isText){if(!h)h=document.createTextNode(n.text);else if(h.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else h||({dom:h,contentDOM:p}=ua.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!p&&!n.isText&&h.nodeName!="BR"&&(h.hasAttribute("contenteditable")||(h.contentEditable="false"),n.type.spec.draggable&&(h.draggable=!0));let m=h;return h=h4(h,r,n),d?u=new lF(e,n,r,o,h,p||null,m,d):n.isText?new fp(e,n,r,o,h,m):new Ji(e,n,r,o,h,p||null,m)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let o=this.children[r];if(this.dom.contains(o.dom.parentNode)){n.contentElement=o.dom.parentNode;break}}if(!n.contentElement){let r=e&&e.find(o=>o.nodeType==1&&e.indexOf(o.parentNode)<0&&this.dom.contains(o));r?n.contentElement=r:n.getContent=()=>re.empty}}return n}matchesNode(e,n,r){return this.dirty==Tr&&e.eq(this.node)&&Uf(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,u=new cF(this,s&&s.node,e);hF(this.node,this.innerDeco,(d,h,p)=>{d.spec.marks?u.syncToMarks(d.spec.marks,r,e,h):d.type.side>=0&&!p&&u.syncToMarks(h==this.node.childCount?lt.none:this.node.child(h).marks,r,e,h),u.placeWidget(d,e,o)},(d,h,p,m)=>{u.syncToMarks(d.marks,r,e,m);let y;u.findNodeMatch(d,h,p,m)||l&&e.state.selection.from>o&&e.state.selection.to<o+d.nodeSize&&(y=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(d,h,p,y,e)||u.updateNextNode(d,h,p,e,m,o)||u.addNode(d,h,p,e,o),o+=d.nodeSize}),u.syncToMarks([],r,e,0),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||this.dirty==Is)&&(s&&this.protectLocalComposition(e,s),d4(this.contentDOM,this.children,e),al&&pF(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof je)||r<n||o>n+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 s=i.nodeValue,l=mF(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new aF(this,i,n,o);e.input.compositionNodes.push(s),this.children=C1(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==Vr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Tr}updateOuterDeco(e){if(Uf(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=f4(this.dom,this.nodeDOM,w1(this.outerDeco,this.node,n),w1(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function vw(t,e,n,r,o){h4(r,e,t);let i=new Ji(void 0,t,e,n,r,r,r);return i.contentDOM&&i.updateChildren(o,0),i}class fp extends Ji{constructor(e,n,r,o,i,s){super(e,n,r,o,i,null,s)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Vr||this.dirty!=Tr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Tr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=Tr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new fp(this.parent,o,this.outerDeco,this.innerDeco,i,i)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Vr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class c4 extends bc{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Tr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class lF extends Ji{constructor(e,n,r,o,i,s,l,u){super(e,n,r,o,i,s,l),this.spec=u}update(e,n,r,o){if(this.dirty==Vr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){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)}}function d4(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],l=s.dom;if(l.parentNode==t){for(;l!=r;)r=bw(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(l,r);if(s instanceof Zi){let u=r?r.previousSibling:t.lastChild;d4(s.contentDOM,s.children,n),r=u?u.nextSibling:t.firstChild}}for(;r;)r=bw(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const ku=function(t){t&&(this.nodeName=t)};ku.prototype=Object.create(null);const Ps=[new ku];function w1(t,e,n){if(t.length==0)return Ps;let r=n?Ps[0]:new ku,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new ku(s.nodeName));for(let l in s){let u=s[l];u!=null&&(n&&o.length==1&&o.push(r=new ku(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+u:l=="style"?r.style=(r.style?r.style+";":"")+u:l!="nodeName"&&(r[l]=u))}}}return o}function f4(t,e,n,r){if(n==Ps&&r==Ps)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],l=n[i];if(i){let u;l&&l.nodeName==s.nodeName&&o!=t&&(u=o.parentNode)&&u.nodeName.toLowerCase()==s.nodeName||(u=document.createElement(s.nodeName),u.pmIsDeco=!0,u.appendChild(o),l=Ps[0]),o=u}uF(o,l||Ps[0],s)}return o}function uF(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function h4(t,e,n){return f4(t,t,Ps,w1(e,n,t.nodeType!=1))}function Uf(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function bw(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class cF{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=dF(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,o){let i=0,s=this.stack.length>>1,l=Math.min(s,e.length);for(;i<l&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=Tr,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let u=-1,d=this.top.children.length;o<this.preMatch.index&&(d=Math.min(this.index+3,d));for(let h=this.index;h<d;h++){let p=this.top.children[h];if(p.matchesMark(e[s])&&!this.isLocked(p.dom)){u=h;break}}if(u<0&&this.index<this.top.children.length){let h=this.top.children[this.index];h instanceof Zi&&h.dirty!=Vr&&h.mark.type==e[s].type&&h.spec.update&&!this.isLocked(h.dom)&&h.spec.update(e[s])&&(h.mark=e[s],u=this.index,this.changed=!0)}if(u>-1)u>this.index&&(this.changed=!0,this.destroyBetween(this.index,u)),this.top=this.top.children[this.index];else{let h=Zi.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,h),this.top=h,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,u=Math.min(this.top.children.length,l+5);l<u;l++){let d=this.top.children[l];if(d.matchesNode(e,n,r)&&!this.preMatch.matched.has(d)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==Vr&&s.dom==s.contentDOM&&(s.dirty=Is),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let l=this.index;l<this.top.children.length;l++){let u=this.top.children[l];if(u instanceof Ji){let d=this.preMatch.matched.get(u);if(d!=null&&d!=i)return!1;let h=u.dom,p,m=this.isLocked(h)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=Vr&&Uf(n,u.outerDeco));if(!m&&u.update(e,n,r,o))return this.destroyBetween(this.index,l),u.dom!=h&&(this.changed=!0),this.index++,!0;if(!m&&(p=this.recreateWrapper(u,e,n,r,o,s)))return this.destroyBetween(this.index,l),this.top.children[this.index]=p,p.contentDOM&&(p.dirty=Is,p.updateChildren(o,s+1),p.dirty=Tr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Uf(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let l=Ji.create(this.top,n,r,o,i,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let u of l.children)u.parent=l}return e.destroy(),l}addNode(e,n,r,o,i){let s=Ji.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new u4(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Zi;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof fp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_n||vn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new c4(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function dF(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let l;for(;;)if(r){let d=n.children[r-1];if(d instanceof Zi)n=d,r=d.children.length;else{l=d,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let u=l.node;if(u){if(u!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function fF(t,e){return t.type.side-e.type.side}function hF(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let d=0;d<t.childCount;d++){let h=t.child(d);r(h,o,e.forChild(i,h),d),i+=h.nodeSize}return}let s=0,l=[],u=null;for(let d=0;;){let h,p;for(;s<o.length&&o[s].to==i;){let w=o[s++];w.widget&&(h?(p||(p=[h])).push(w):h=w)}if(h)if(p){p.sort(fF);for(let w=0;w<p.length;w++)n(p[w],d,!!u)}else n(h,d,!!u);let m,y;if(u)y=-1,m=u,u=null;else if(d<t.childCount)y=d,m=t.child(d++);else break;for(let w=0;w<l.length;w++)l[w].to<=i&&l.splice(w--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let x=i+m.nodeSize;if(m.isText){let w=x;s<o.length&&o[s].from<w&&(w=o[s].from);for(let E=0;E<l.length;E++)l[E].to<w&&(w=l[E].to);w<x&&(u=m.cut(w-i),m=m.cut(0,w-i),x=w,y=-1)}else for(;s<o.length&&o[s].to<x;)s++;let b=m.isInline&&!m.isLeaf?l.filter(w=>!w.inline):l.slice();r(m,b,e.forChild(i,m),y),i=x}}function pF(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function mF(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let u=s.text;for(;o<t.childCount;){let d=t.child(o++);if(i+=d.nodeSize,!d.isText)break;u+=d.text}if(i>=n){if(i>=r&&u.slice(r-e.length-l,r-l)==e)return r-e.length;let d=l<r?u.lastIndexOf(e,r-l-1):-1;if(d>=0&&d+e.length+l>=n)return l+d;if(n==r&&u.length>=r+e.length-l&&u.slice(r-l,r-l+e.length)==e)return r}}return-1}function C1(t,e,n,r,o){let i=[];for(let s=0,l=0;s<t.length;s++){let u=t[s],d=l,h=l+=u.size;d>=n||h<=e?i.push(u):(d<e&&i.push(u.slice(0,e-d,r)),o&&(i.push(o),o=void 0),h>n&&i.push(u.slice(n-d,u.size,r)))}return i}function ox(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),u,d;if(dp(n)){for(u=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&Re.isSelectable(p)&&o.parent&&!(p.isInline&&V7(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;d=new Re(s==m?l:r.resolve(m))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let p=s,m=s;for(let y=0;y<n.rangeCount;y++){let x=n.getRangeAt(y);p=Math.min(p,t.docView.posFromDOM(x.startContainer,x.startOffset,1)),m=Math.max(m,t.docView.posFromDOM(x.endContainer,x.endOffset,-1))}if(p<0)return null;[u,s]=m==t.state.selection.anchor?[m,p]:[p,m],l=r.resolve(s)}else u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null}let h=r.resolve(u);if(!d){let p=e=="pointer"||t.state.selection.head<l.pos&&!i?1:-1;d=ix(t,h,l,p)}return d}function p4(t){return t.editable?t.hasFocus():g4(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Qo(t,e=!1){let n=t.state.selection;if(m4(t,n),!p4(t))return;let r=t.input.mouseDown;if(!e&&vn&&r){let o=t.domSelectionRange(),i=t.domObserver.currentSelection;if(o.anchorNode&&i.anchorNode&&ta(o.anchorNode,o.anchorOffset,i.anchorNode,i.anchorOffset)&&r.delaySelUpdate()){t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)yF(t);else{let{anchor:o,head:i}=n,s,l;kw&&!(n instanceof je)&&(n.$from.parent.inlineContent||(s=ww(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(l=ww(t,n.to))),t.docView.setSelection(o,i,t,e),kw&&(s&&Cw(s),l&&Cw(l)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&gF(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}const kw=_n||vn&&t4<63;function ww(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(_n&&o&&o.contentEditable=="false")return Km(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Km(o);if(i)return Km(i)}}function Km(t){return t.contentEditable="true",_n&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Cw(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function gF(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!p4(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function yF(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,yn(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Yn&&Gi<=11&&(n.disabled=!0,n.disabled=!1)}function m4(t,e){if(e instanceof Re){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Sw(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Sw(t)}function Sw(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ix(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||je.between(e,n,r)}function Ew(t){return t.editable&&!t.hasFocus()?!1:g4(t)}function g4(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function xF(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ta(e.node,e.offset,n.anchorNode,n.anchorOffset)}function S1(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Ve.findFrom(i,e)}function Ii(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function _w(t,e,n){let r=t.state.selection;if(r instanceof je)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return Ii(t,new je(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=S1(t.state,e);return o&&o instanceof Re?Ii(t,o):!1}else if(!(wr&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?Re.isSelectable(i)?Ii(t,new Re(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):vc?Ii(t,new je(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Re&&r.node.isInline)return Ii(t,new je(e>0?r.$to:r.$from));{let o=S1(t.state,e);return o?Ii(t,o):!1}}}function Wf(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function wu(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $a(t,e){return e<0?vF(t):bF(t)}function vF(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(_r&&n.nodeType==1&&r<Wf(n)&&wu(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(wu(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(y4(n))break;{let l=n.previousSibling;for(;l&&wu(l,-1);)o=n.parentNode,i=yn(l),l=l.previousSibling;if(l)n=l,r=Wf(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?E1(t,n,r):o&&E1(t,o,i)}function bF(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Wf(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let l=n.childNodes[r];if(wu(l,1))i=n,s=++r;else break}else{if(y4(n))break;{let l=n.nextSibling;for(;l&&wu(l,1);)i=l.parentNode,s=yn(l)+1,l=l.nextSibling;if(l)n=l,r=0,o=Wf(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&E1(t,i,s)}function y4(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function kF(t,e){for(;t&&e==t.childNodes.length&&!xc(t);)e=yn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function wF(t,e){for(;t&&!e&&!xc(t);)e=yn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function E1(t,e,n){if(e.nodeType!=3){let i,s;(s=kF(e,n))?(e=s,n=0):(i=wF(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(dp(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&Qo(t)},50)}function Tw(t,e){let n=t.state.doc.resolve(e);if(!(vn||n4)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Aw(t,e,n){let r=t.state.selection;if(r instanceof je&&!r.empty||n.indexOf("s")>-1||wr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=S1(t.state,e);if(s&&s instanceof Re)return Ii(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof sr?Ve.near(s,e):Ve.findFrom(s,e);return l?Ii(t,l):!1}return!1}function Mw(t,e){if(!(t.state.selection instanceof je))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function Nw(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function CF(t){if(!_n||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Nw(t,r,"true"),setTimeout(()=>Nw(t,r,"false"),20)}return!1}function SF(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function EF(t,e){let n=e.keyCode,r=SF(e);if(n==8||wr&&n==72&&r=="c")return Mw(t,-1)||$a(t,-1);if(n==46&&!e.shiftKey||wr&&n==68&&r=="c")return Mw(t,1)||$a(t,1);if(n==13||n==27)return!0;if(n==37||wr&&n==66&&r=="c"){let o=n==37?Tw(t,t.state.selection.from)=="ltr"?-1:1:-1;return _w(t,o,r)||$a(t,o)}else if(n==39||wr&&n==70&&r=="c"){let o=n==39?Tw(t,t.state.selection.from)=="ltr"?1:-1:1;return _w(t,o,r)||$a(t,o)}else{if(n==38||wr&&n==80&&r=="c")return Aw(t,-1,r)||$a(t,-1);if(n==40||wr&&n==78&&r=="c")return CF(t)||Aw(t,1,r)||$a(t,1);if(r==(wr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function sx(t,e){t.someProp("transformCopied",y=>{e=y(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let y=r.firstChild;n.push(y.type.name,y.attrs!=y.type.defaultAttrs?y.attrs:null),r=y.content}let s=t.someProp("clipboardSerializer")||ua.fromSchema(t.state.schema),l=C4(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));let d=u.firstChild,h,p=0;for(;d&&d.nodeType==1&&(h=w4[d.nodeName.toLowerCase()]);){for(let y=h.length-1;y>=0;y--){let x=l.createElement(h[y]);for(;u.firstChild;)x.appendChild(u.firstChild);u.appendChild(x),p++}d=u.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let m=t.someProp("clipboardTextSerializer",y=>y(e,t))||e.content.textBetween(0,e.content.size,`
|
|
395
|
-
|
|
396
|
-
`);return{dom:u,text:m,slice:e}}function x4(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let u=!!e&&(r||i||!n);if(u){if(t.someProp("transformPastedText",m=>{e=m(e,i||r,t)}),i)return l=new ye(re.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
397
|
-
`))),0,0),t.someProp("transformPasted",m=>{l=m(l,t,!0)}),l;let p=t.someProp("clipboardTextParser",m=>m(e,o,r,t));if(p)l=p;else{let m=o.marks(),{schema:y}=t.state,x=ua.fromSchema(y);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let w=s.appendChild(document.createElement("p"));b&&w.appendChild(x.serializeNode(y.text(b,m)))})}}else t.someProp("transformPastedHTML",p=>{n=p(n,t)}),s=MF(n),vc&&NF(s);let d=s&&s.querySelector("[data-pm-slice]"),h=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let p=+h[3];p>0;p--){let m=s.firstChild;for(;m&&m.nodeType!=1;)m=m.nextSibling;if(!m)break;s=m}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Yo.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(u||h),context:o,ruleFromNode(m){return m.nodeName=="BR"&&!m.nextSibling&&m.parentNode&&!_F.test(m.parentNode.nodeName)?{ignore:!0}:null}})),h)l=DF(Dw(l,+h[1],+h[2]),h[4]);else if(l=ye.maxOpen(TF(l.content,o),!0),l.openStart||l.openEnd){let p=0,m=0;for(let y=l.content.firstChild;p<l.openStart&&!y.type.spec.isolating;p++,y=y.firstChild);for(let y=l.content.lastChild;m<l.openEnd&&!y.type.spec.isolating;m++,y=y.lastChild);l=Dw(l,p,m)}return t.someProp("transformPasted",p=>{l=p(l,t,u)}),l}const _F=/^(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;function TF(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let u=o.findWrapping(l.type),d;if(!u)return s=null;if(d=s.length&&i.length&&b4(u,i,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=k4(s[s.length-1],i.length));let h=v4(l,u);s.push(h),o=o.matchType(h.type),i=u}}),s)return re.from(s)}return t}function v4(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,re.from(t));return t}function b4(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=b4(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(re.from(v4(n,t,o+1))))}}function k4(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,k4(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(re.empty,!0);return t.copy(n.append(r))}function _1(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=_1(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(re.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function Dw(t,e,n){return e<t.openStart&&(t=new ye(_1(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new ye(_1(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const w4={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function C4(){return document.implementation.createHTMLDocument("title")}let Gm=null;function AF(t){let e=window.trustedTypes;return e?(Gm||(Gm=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Gm.createHTML(t)):t}function MF(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=C4(),r=n.body,o=/<([a-z][^>\s]+)/i.exec(t),i;if((i=o&&w4[o[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),r.innerHTML=AF(t),i)for(let s=0;s<i.length;s++)r=r.querySelector(i[s])||r;for(let s=0;s<n.styleSheets.length;s++){let l=n.styleSheets[s];for(let u=0;u<l.rules.length;u++){let d=l.rules[u];if(d instanceof CSSStyleRule){let h=r.querySelectorAll(d.selectorText);for(let p=0;p<h.length;p++)h[p].style.cssText+=d.style.cssText}}}return r}function NF(t){let e=t.querySelectorAll(vn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function DF(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let u=n.nodes[r[l]];if(!u||u.hasRequiredAttrs())break;o=re.from(u.create(r[l+1],o)),i++,s++}return new ye(o,i,s)}const In={},Pn={},RF={touchstart:!0,touchmove:!0};class OF{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=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function IF(t){for(let e in In){let n=In[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{jF(t,r)&&!ax(t,r)&&(t.editable||!(r.type in Pn))&&n(t,r)},RF[e]?{passive:!0}:void 0)}_n&&t.dom.addEventListener("input",()=>null),T1(t)}function Ko(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function PF(t){t.input.mouseDown&&t.input.mouseDown.done(),t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function T1(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>ax(t,r))})}function ax(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function jF(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function LF(t,e){!ax(t,e)&&In[e.type]&&(t.editable||!(e.type in Pn))&&In[e.type](t,e)}Pn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!T4(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(qo&&vn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),al&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Rs(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||EF(t,n)?n.preventDefault():Ko(t,"key")};Pn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Pn.keypress=(t,e)=>{let n=e;if(T4(t)||!n.charCode||n.ctrlKey&&!n.altKey||wr&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof je)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o,i))&&t.dispatch(i()),n.preventDefault()}};function kc(t){return{left:t.clientX,top:t.clientY}}function FF(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function lx(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function wc(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function zF(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Re.isSelectable(r)?(wc(t,new Re(n)),!0):!1}function $F(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Re&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Re.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(wc(t,Re.create(t.state.doc,o)),!0):!1}function BF(t,e,n,r,o){return lx(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?$F(t,n):zF(t,n))}function VF(t,e,n,r){return lx(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function HF(t,e,n,r){return lx(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||UF(t,n,r)}function UF(t,e,n){if(n.button!=0)return!1;let r=S4(t,e,!0),o=t.state.doc;return r?(wc(t,r),r instanceof je&&o.eq(t.state.doc)&&(t.input.mouseDown=new qF(t,r)),!0):!1}function S4(t,e,n){let r=t.state.doc;if(e==-1)return r.inlineContent?je.create(r,0,r.content.size):null;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)return je.create(r,l+1,l+1+s.content.size);if(n&&Re.isSelectable(s))return Re.create(r,l)}return null}function ux(t){return qf(t)}const E4=wr?"metaKey":"ctrlKey";In.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=ux(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&FF(n,t.input.lastClick)&&!n[E4]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let s=t.posAtCoords(kc(n));s&&(i=="singleClick"?t.input.mouseDown=new WF(t,s,n,!!r):(i=="doubleClick"?VF:HF)(t,s.pos,s.inside,n)?n.preventDefault():Ko(t,"pointer"))};class _4{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){e.buttons==0&&this.done()}done(){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}}class WF extends _4{constructor(e,n,r,o){super(e),this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[E4],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let h=e.state.doc.resolve(n.pos);i=h.parent,s=h.depth?h.before():0}const l=o?null:r.target,u=l?e.docView.nearestDesc(l,!0):null;this.target=u&&u.nodeDOM.nodeType==1?u.nodeDOM:null;let{selection:d}=e.state;r.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||d instanceof Re&&d.from<=s&&d.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&_r&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Ko(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||Qo(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(kc(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ko(this.view,"pointer"):BF(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_n&&this.mightDrag&&!this.mightDrag.node.isAtom||vn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(wc(this.view,Ve.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ko(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ko(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class qF extends _4{constructor(e,n){super(e),this.startSelection=n,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(),Ko(this.view,"pointer");let n=this.view.posAtCoords(kc(e)),r=n&&S4(this.view,n.inside,!1);if(!r)return;let{doc:o}=this.view.state,i=this.startSelection,[s,l]=r.from<i.from?[i.to,r.from]:[i.from,r.to];wc(this.view,je.create(o,s,l))}}In.touchstart=t=>{t.input.lastTouch=Date.now(),ux(t),Ko(t,"pointer")};In.touchmove=t=>{t.input.lastTouch=Date.now(),Ko(t,"pointer")};In.contextmenu=t=>ux(t);function T4(t,e){return t.composing?!0:_n&&Math.abs(Date.now()-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const KF=qo?5e3:-1;Pn.compositionstart=Pn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof je&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||vn&&n4&&GF(t)))t.markCursor=t.state.storedMarks||n.marks(),qf(t,!0),t.markCursor=null;else if(qf(t,!e.selection.empty),_r&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=t.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}A4(t,KF)};function GF(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Pn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now(),t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,A4(t,20))};function A4(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>qf(t),e))}function M4(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function ZF(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=$7(e.focusNode,e.focusOffset),r=B7(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function qf(t,e=!1){if(!(qo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),M4(t),e||t.docView&&t.docView.dirty){let n=ox(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function JF(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Yu=Yn&&Gi<15||al&&W7<604;In.copy=Pn.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=Yu?null:n.clipboardData,s=r.content(),{dom:l,text:u}=sx(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",u)):JF(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function YF(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function XF(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Xu(t,r.value,null,o,e):Xu(t,r.textContent,r.innerHTML,o,e)},50)}function Xu(t,e,n,r,o){let i=x4(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",u=>u(t,o,i||ye.empty)))return!0;if(!i)return!1;let s=YF(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function N4(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Pn.paste=(t,e)=>{let n=e;if(t.composing&&!qo)return;let r=Yu?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Xu(t,N4(r),r.getData("text/html"),o,n)?n.preventDefault():XF(t,n)};class D4{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const QF=wr?"altKey":"ctrlKey";function R4(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[QF]}In.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(kc(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Re?o.to-1:o.to))){if(r&&r.mightDrag)s=Re.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let p=t.docView.nearestDesc(n.target,!0);p&&p.node.type.spec.draggable&&p!=t.docView&&(s=Re.create(t.state.doc,p.posBefore))}}let l=(s||t.state.selection).content(),{dom:u,text:d,slice:h}=sx(t,l);(!n.dataTransfer.files.length||!vn||t4>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Yu?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",Yu||n.dataTransfer.setData("text/plain",d),t.dragging=new D4(h,R4(t,n),s)};In.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Pn.dragover=Pn.dragenter=(t,e)=>e.preventDefault();Pn.drop=(t,e)=>{try{ez(t,e,t.dragging)}finally{t.dragging=null}};function ez(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(kc(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",y=>{i=y(i,t,!1)}):i=x4(t,N4(e.dataTransfer),Yu?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&R4(t,e));if(t.someProp("handleDrop",y=>y(t,e,i||ye.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let l=i?O_(t.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let u=t.state.tr;if(s){let{node:y}=n;y?y.replace(u):u.deleteSelection()}let d=u.mapping.map(l),h=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,p=u.doc;if(h?u.replaceRangeWith(d,d,i.content.firstChild):u.replaceRange(d,d,i),u.doc.eq(p))return;let m=u.doc.resolve(d);if(h&&Re.isSelectable(i.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new Re(m));else{let y=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((x,b,w,E)=>y=E),u.setSelection(ix(t,m,u.doc.resolve(y)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))}In.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Qo(t)},20))};In.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};In.beforeinput=(t,e)=>{if(qo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Rs(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Pn)In[t]=Pn[t];function Qu(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Kf{constructor(e,n){this.toDOM=e,this.spec=n||Vs,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new On(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Kf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Qu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Yi{constructor(e,n){this.attrs=e,this.spec=n||Vs}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new On(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Yi&&Qu(this.attrs,e.attrs)&&Qu(this.spec,e.spec)}static is(e){return e.type instanceof Yi}destroy(){}}class cx{constructor(e,n){this.attrs=e,this.spec=n||Vs}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new On(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof cx&&Qu(this.attrs,e.attrs)&&Qu(this.spec,e.spec)}destroy(){}}class On{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new On(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new On(e,e,new Kf(n,r))}static inline(e,n,r,o){return new On(e,n,new Yi(r,o))}static node(e,n,r,o){return new On(e,n,new cx(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Yi}get widget(){return this.type instanceof Kf}}const Ua=[],Vs={};class yt{constructor(e,n){this.local=e.length?e:Ua,this.children=n.length?n:Ua}static create(e,n){return n.length?Gf(n,e,0,Vs):En}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=n&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==En||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Vs)}mapInner(e,n,r,o,i){let s;for(let l=0;l<this.local.length;l++){let u=this.local[l].map(e,r,o);u&&u.type.valid(n,u)?(s||(s=[])).push(u):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?tz(this.children,s||[],e,n,r,o,i):s?new yt(s.sort(Hs),Ua):En}add(e,n){return n.length?this==En?yt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((l,u)=>{let d=u+r,h;if(h=I4(n,l,d)){for(o||(o=this.children.slice());i<o.length&&o[i]<u;)i+=3;o[i]==u?o[i+2]=o[i+2].addInner(l,h,d+1):o.splice(i,0,u,u+l.nodeSize,Gf(h,l,d+1,Vs)),i+=3}});let s=O4(i?P4(n):n,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new yt(s.length?this.local.concat(s).sort(Hs):this.local,o||this.children)}remove(e){return e.length==0||this==En?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,l=r[i]+n,u=r[i+1]+n;for(let h=0,p;h<e.length;h++)(p=e[h])&&p.from>l&&p.to<u&&(e[h]=null,(s||(s=[])).push(p));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[i+2].removeInner(s,l+1);d!=En?r[i+2]=d:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let l=0;l<o.length;l++)o[l].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new yt(o,r):En}forChild(e,n){if(this==En)return this;if(n.isLeaf)return yt.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;l<this.local.length;l++){let u=this.local[l];if(u.from<s&&u.to>i&&u.type instanceof Yi){let d=Math.max(i,u.from)-i,h=Math.min(s,u.to)-i;d<h&&(o||(o=[])).push(u.copy(d,h))}}if(o){let l=new yt(o.sort(Hs),Ua);return r?new $i([l,r]):l}return r||En}eq(e){if(this==e)return!0;if(!(e instanceof yt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return dx(this.localsInner(e))}localsInner(e){if(this==En)return Ua;if(e.inlineContent||!this.local.some(Yi.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Yi||n.push(this.local[r]);return n}forEachSet(e){e(this)}}yt.empty=new yt([],[]);yt.removeOverlap=dx;const En=yt.empty;class $i{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,Vs));return $i.from(r)}forChild(e,n){if(n.isLeaf)return yt.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=En&&(i instanceof $i?r=r.concat(i.members):r.push(i))}return $i.from(r)}eq(e){if(!(e instanceof $i)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?dx(r?n:n.sort(Hs)):Ua}static from(e){switch(e.length){case 0:return En;case 1:return e[0];default:return new $i(e.every(n=>n instanceof yt)?e:e.reduce((n,r)=>n.concat(r instanceof yt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function tz(t,e,n,r,o,i,s){let l=t.slice();for(let d=0,h=i;d<n.maps.length;d++){let p=0;n.maps[d].forEach((m,y,x,b)=>{let w=b-x-(y-m);for(let E=0;E<l.length;E+=3){let _=l[E+1];if(_<0||m>_+h-p)continue;let A=l[E]+h-p;y>=A?l[E+1]=m<=A?-2:-1:m>=h&&w&&(l[E]+=w,l[E+1]+=w)}p+=w}),h=n.maps[d].map(h,-1)}let u=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){u=!0,l[d+1]=-1;continue}let h=n.map(t[d]+i),p=h-o;if(p<0||p>=r.content.size){u=!0;continue}let m=n.map(t[d+1]+i,-1),y=m-o,{index:x,offset:b}=r.content.findIndex(p),w=r.maybeChild(x);if(w&&b==p&&b+w.nodeSize==y){let E=l[d+2].mapInner(n,w,h+1,t[d]+i+1,s);E!=En?(l[d]=p,l[d+1]=y,l[d+2]=E):(l[d+1]=-2,u=!0)}else u=!0}if(u){let d=nz(l,t,e,n,o,i,s),h=Gf(d,r,0,s);e=h.local;for(let p=0;p<l.length;p+=3)l[p+1]<0&&(l.splice(p,3),p-=3);for(let p=0,m=0;p<h.children.length;p+=3){let y=h.children[p];for(;m<l.length&&l[m]<y;)m+=3;l.splice(m,0,h.children[p],h.children[p+1],h.children[p+2])}}return new yt(e.sort(Hs),l)}function O4(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new On(o.from+e,o.to+e,o.type))}return n}function nz(t,e,n,r,o,i,s){function l(u,d){for(let h=0;h<u.local.length;h++){let p=u.local[h].map(r,o,d);p?n.push(p):s.onRemove&&s.onRemove(u.local[h].spec)}for(let h=0;h<u.children.length;h+=3)l(u.children[h+2],u.children[h]+d+1)}for(let u=0;u<t.length;u+=3)t[u+1]==-1&&l(t[u+2],e[u]+i+1);return n}function I4(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function P4(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Gf(t,e,n,r){let o=[],i=!1;e.forEach((l,u)=>{let d=I4(t,l,u+n);if(d){i=!0;let h=Gf(d,l,n+u+1,r);h!=En&&o.push(u,u+l.nodeSize,h)}});let s=O4(i?P4(t):t,-n).sort(Hs);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new yt(s,o):En}function Hs(t,e){return t.from-e.from||t.to-e.to}function dx(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),Rw(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Rw(e,o,r.copy(i.from,r.to)));break}}}return e}function Rw(t,e,n){for(;e<t.length&&Hs(n,t[e])>0;)e++;t.splice(e,0,n)}function Zm(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=En&&e.push(r)}),t.cursorWrapper&&e.push(yt.create(t.state.doc,[t.cursorWrapper.deco])),$i.from(e)}const rz={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},oz=Yn&&Gi<=11;class iz{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 sz{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new iz,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Yn&&Gi<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():_n&&e.composing&&r.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),oz&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,rz)),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 n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}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(Ew(this.view)){if(this.suppressingSelectionUpdates)return Qo(this.view);if(Yn&&Gi<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ta(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 n=new Set,r;for(let i=e.focusNode;i;i=sl(i))n.add(i);for(let i=e.anchorNode;i;i=sl(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.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 n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Ew(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,u=[];if(e.editable)for(let h=0;h<n.length;h++){let p=this.registerMutation(n[h],u);p&&(i=i<0?p.from:Math.min(p.from,i),s=s<0?p.to:Math.max(p.to,s),p.typeOver&&(l=!0))}if(u.some(h=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||vn&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&n.some(h=>h.type=="childList"&&h.removedNodes.length))){for(let h of u)if(h.nodeName=="BR"&&h.parentNode){let p=h.nextSibling;for(;p&&p.nodeType==1;){if(p.contentEditable=="false"){h.parentNode.removeChild(h);break}p=p.firstChild}}}else if(_r&&u.length){let h=u.filter(p=>p.nodeName=="BR");if(h.length==2){let[p,m]=h;p.parentNode&&p.parentNode.parentNode==m.parentNode?m.remove():p.remove()}else{let{focusNode:p}=this.currentSelection;for(let m of h){let y=m.parentNode;y&&y.nodeName=="LI"&&(!p||uz(e,p)!=y)&&m.remove()}}}let d=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&dp(r)&&(d=ox(e))&&d.eq(Ve.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Qo(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),az(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,cz(e,u)),this.handleDOMChange(i,s,l,u),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Qo(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.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"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let p=e.addedNodes[h];n.push(p),p.nodeType==3&&(this.lastChangedTextNode=p)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Yn&&Gi<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:p,nextSibling:m}=e.addedNodes[h];(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(o=p),(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m)}let s=o&&o.parentNode==e.target?yn(o)+1:0,l=r.localPosFromDOM(e.target,s,-1),u=i&&i.parentNode==e.target?yn(i):e.target.childNodes.length,d=r.localPosFromDOM(e.target,u,1);return{from:l,to:d}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Ow=new WeakMap,Iw=!1;function az(t){if(!Ow.has(t)&&(Ow.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=_r,Iw)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."),Iw=!0}}function Pw(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return ta(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function lz(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Pw(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Pw(t,n):null}function uz(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function cz(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=i.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let l=s;for(;;){let u=l.firstChild;if(!u||u.nodeType!=1||u.contentEditable=="false"||/^(BR|IMG)$/.test(u.nodeName))break;l=u}l.insertBefore(i,l.firstChild),r==i&&t.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}function dz(t,e,n,r){let{node:o,fromOffset:i,toOffset:s,from:l,to:u}=t.docView.parseRange(e,n),d=t.domSelectionRange(),h,p=d.anchorNode;if(p&&t.dom.contains(p.nodeType==1?p:p.parentNode)&&(h=[{node:p,offset:d.anchorOffset}],dp(d)||h.push({node:d.focusNode,offset:d.focusOffset})),vn&&t.input.lastKeyCode===8)for(let E=s;E>i;E--){let _=o.childNodes[E-1],A=_.pmViewDesc;if(_.nodeName=="BR"&&!A){s=E;break}if(!A||A.size)break}let m=t.state.doc,y=t.someProp("domParser")||Yo.fromSchema(t.state.schema),x=m.resolve(l),b=null,w=y.parse(o,{topNode:x.parent,topMatch:x.parent.contentMatchAt(x.index()),topOpen:!0,from:i,to:s,preserveWhitespace:x.parent.type.whitespace=="pre"?"full":!0,findPositions:h,ruleFromNode:fz(r),context:x});if(h&&h[0].pos!=null){let E=h[0].pos,_=h[1]&&h[1].pos;_==null&&(_=E),b={anchor:E+l,head:_+l}}return{doc:w,sel:b,from:l,to:u}}const fz=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if(e.nodeName=="BR"&&e.parentNode){if(_n&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||_n&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},hz=/^(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;function pz(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let O=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=ox(t,O);if(I&&!t.state.selection.eq(I)){if(vn&&qo&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",W=>W(t,Rs(13,"Enter"))))return;let L=t.state.tr.setSelection(I);O=="pointer"?L.setMeta("pointer",!0):O=="key"&&L.scrollIntoView(),i&&L.setMeta("composition",i),t.dispatch(L)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let u=t.state.selection,d=dz(t,e,n,o),h=t.state.doc,p=h.slice(d.from,d.to),m,y;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(m=t.state.selection.to,y="end"):(m=t.state.selection.from,y="start"),t.input.lastKeyCode=null;let x=yz(p.content,d.doc.content,d.from,m,y);if(x&&t.input.domChangeCount++,(al&&t.input.lastIOSEnter>Date.now()-225||qo)&&o.some(O=>O.nodeType==1&&!hz.test(O.nodeName))&&(!x||x.endA>=x.endB)&&t.someProp("handleKeyDown",O=>O(t,Rs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!x)if(r&&u instanceof je&&!u.empty&&u.$head.sameParent(u.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))x={start:u.from,endA:u.to,endB:u.to};else{if(d.sel){let O=jw(t,t.state.doc,d.sel);if(O&&!O.eq(t.state.selection)){let I=t.state.tr.setSelection(O);i&&I.setMeta("composition",i),t.dispatch(I)}}return}t.state.selection.from<t.state.selection.to&&x.start==x.endB&&t.state.selection instanceof je&&(x.start>t.state.selection.from&&x.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?x.start=t.state.selection.from:x.endA<t.state.selection.to&&x.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(x.endB+=t.state.selection.to-x.endA,x.endA=t.state.selection.to)),Yn&&Gi<=11&&x.endB==x.start+1&&x.endA==x.start&&x.start>d.from&&d.doc.textBetween(x.start-d.from-1,x.start-d.from+1)==" "&&(x.start--,x.endA--,x.endB--);let b=d.doc.resolveNoCache(x.start-d.from),w=d.doc.resolveNoCache(x.endB-d.from),E=h.resolve(x.start),_=b.sameParent(w)&&b.parent.inlineContent&&E.end()>=x.endA;if((al&&t.input.lastIOSEnter>Date.now()-225&&(!_||o.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!_&&b.pos<d.doc.content.size&&(!b.sameParent(w)||!b.parent.inlineContent)&&b.pos<w.pos&&!/\S/.test(d.doc.textBetween(b.pos,w.pos,"","")))&&t.someProp("handleKeyDown",O=>O(t,Rs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>x.start&&gz(h,x.start,x.endA,b,w)&&t.someProp("handleKeyDown",O=>O(t,Rs(8,"Backspace")))){qo&&vn&&t.domObserver.suppressSelectionUpdates();return}vn&&x.endB==x.start&&(t.input.lastChromeDelete=Date.now()),qo&&!_&&b.start()!=w.start()&&w.parentOffset==0&&b.depth==w.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==x.endA&&(x.endB-=2,w=d.doc.resolveNoCache(x.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(O){return O(t,Rs(13,"Enter"))})},20));let A=x.start,M=x.endA,N=O=>{let I=O||t.state.tr.replace(A,M,d.doc.slice(x.start-d.from,x.endB-d.from));if(d.sel){let L=jw(t,I.doc,d.sel);L&&!(vn&&t.composing&&L.empty&&(x.start!=x.endB||t.input.lastChromeDelete<Date.now()-100)&&(L.head==A||L.head==I.mapping.map(M)-1)||Yn&&L.empty&&L.head==A)&&I.setSelection(L)}return i&&I.setMeta("composition",i),I.scrollIntoView()},D;if(_)if(b.pos==w.pos){Yn&&Gi<=11&&b.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Qo(t),20));let O=N(t.state.tr.delete(A,M)),I=h.resolve(x.start).marksAcross(h.resolve(x.endA));I&&O.ensureMarks(I),t.dispatch(O)}else if(x.endA==x.endB&&(D=mz(b.parent.content.cut(b.parentOffset,w.parentOffset),E.parent.content.cut(E.parentOffset,x.endA-E.start())))){let O=N(t.state.tr);D.type=="add"?O.addMark(A,M,D.mark):O.removeMark(A,M,D.mark),t.dispatch(O)}else if(b.parent.child(b.index()).isText&&b.index()==w.index()-(w.textOffset?0:1)){let O=b.parent.textBetween(b.parentOffset,w.parentOffset),I=()=>N(t.state.tr.insertText(O,A,M));t.someProp("handleTextInput",L=>L(t,A,M,O,I))||t.dispatch(I())}else t.dispatch(N());else t.dispatch(N())}function jw(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ix(t,e.resolve(n.anchor),e.resolve(n.head))}function mz(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,u;for(let h=0;h<r.length;h++)o=r[h].removeFromSet(o);for(let h=0;h<n.length;h++)i=n[h].removeFromSet(i);if(o.length==1&&i.length==0)l=o[0],s="add",u=h=>h.mark(l.addToSet(h.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",u=h=>h.mark(l.removeFromSet(h.marks));else return null;let d=[];for(let h=0;h<e.childCount;h++)d.push(u(e.child(h)));if(re.from(d).eq(t))return{mark:l,type:s}}function gz(t,e,n,r,o){if(n-e<=o.pos-r.pos||Jm(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&n==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(Jm(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Jm(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Jm(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function yz(t,e,n,r,o){let i=t.findDiffStart(e,n),s=n+t.size,l=n+e.size;if(i==null)return null;let{a:u,b:d}=t.findDiffEnd(e,s,l);if(o=="end"){let h=Math.max(0,i-Math.min(u,d));r-=u+h-i}if(u<i&&s<l){let h=r<=i&&r>=u?i-r:0;i-=h,d=i+(d-u),u=i}else if(d<i){let h=r<=i&&r>=d?i-r:0;i-=h,u=i+(u-d),d=i}return{start:i,endA:u,endB:d}}class j4{constructor(e,n){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 OF,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Bw),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=zw(this),Fw(this),this.nodeViews=$w(this),this.docView=vw(this.state.doc,Lw(this),Zm(this),this.dom,this),this.domObserver=new sz(this,(r,o,i,s)=>pz(this,r,o,i,s)),this.domObserver.start(),IF(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 n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&T1(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Bw),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(M4(this),s=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let y=$w(this);vz(y,this.nodeViews)&&(this.nodeViews=y,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&T1(this),this.editable=zw(this),Fw(this);let u=Zm(this),d=Lw(this),h=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(e.doc,d,u);(p||!e.selection.eq(o.selection))&&(s=!0);let m=h=="preserve"&&s&&this.dom.style.overflowAnchor==null&&G7(this);if(s){this.domObserver.stop();let y=p&&(Yn||vn)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&xz(o.selection,e.selection);if(p){let b=vn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=ZF(this)),(i||!this.docView.update(e.doc,d,u,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=vw(e.doc,d,u,this.dom,this)),b&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(y=!0)}let x=this.input.mouseDown;y||!(x&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&xF(this)&&x.delaySelUpdate())?Qo(this,y):(m4(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),h=="reset"?this.dom.scrollTop=0:h=="to selection"?this.scrollToSelection():m&&Z7(m)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Re){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&pw(this,n.getBoundingClientRect(),e)}else pw(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)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 n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new D4(e.slice,e.move,o<0?void 0:Re.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(o=n?n(l):l))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let l=i[s].props[e];if(l!=null&&(o=n?n(l):l))return o}}hasFocus(){if(Yn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;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(){this.domObserver.stop(),this.editable&&J7(this.dom),Qo(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return tF(this,e)}coordsAtPos(e,n=1){return a4(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return sF(this,n||this.state,e)}pasteHTML(e,n){return Xu(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Xu(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return sx(this,e)}destroy(){this.docView&&(PF(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Zm(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,F7())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return LF(this,e)}domSelectionRange(){let e=this.domSelection();return e?_n&&this.root.nodeType===11&&H7(this.dom.ownerDocument)==this.dom&&lz(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}j4.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Lw(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[On.node(0,t.state.doc.content.size,e)]}function Fw(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:On.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function zw(t){return!t.someProp("editable",e=>e(t.state)===!1)}function xz(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function $w(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function vz(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function Bw(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ns={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:"'"},Zf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},bz=typeof navigator<"u"&&/Mac/.test(navigator.platform),kz=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var xn=0;xn<10;xn++)ns[48+xn]=ns[96+xn]=String(xn);for(var xn=1;xn<=24;xn++)ns[xn+111]="F"+xn;for(var xn=65;xn<=90;xn++)ns[xn]=String.fromCharCode(xn+32),Zf[xn]=String.fromCharCode(xn);for(var Ym in ns)Zf.hasOwnProperty(Ym)||(Zf[Ym]=ns[Ym]);function wz(t){var e=bz&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||kz&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Zf:ns)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const Cz=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Sz=typeof navigator<"u"&&/Win/.test(navigator.platform);function Ez(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l<e.length-1;l++){let u=e[l];if(/^(cmd|meta|m)$/i.test(u))s=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))i=!0;else if(/^mod$/i.test(u))Cz?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function _z(t){let e=Object.create(null);for(let n in t)e[Ez(n)]=t[n];return e}function Xm(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function Tz(t){return new wt({props:{handleKeyDown:L4(t)}})}function L4(t){let e=_z(t);return function(n,r){let o=wz(r),i,s=e[Xm(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Xm(o,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(Sz&&r.ctrlKey&&r.altKey)&&(i=ns[r.keyCode])&&i!=o){let l=e[Xm(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}var Az=Object.defineProperty,fx=(t,e)=>{for(var n in e)Az(t,n,{get:e[n],enumerable:!0})};function hp(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var pp=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...d)=>{const h=l(...d)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!t,u=t||o.tr,d=()=>(!l&&e&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),s.every(p=>p===!0)),h={...Object.fromEntries(Object.entries(n).map(([p,m])=>[p,(...x)=>{const b=this.buildProps(u,e),w=m(...x)(b);return s.push(w),h}])),run:d};return h}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map(([l,u])=>[l,(...d)=>u(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:hp({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...d)=>u(...d)(s)]))}};return s}},F4={};fx(F4,{blur:()=>Mz,clearContent:()=>Nz,clearNodes:()=>Dz,command:()=>Rz,createParagraphNear:()=>Oz,cut:()=>Iz,deleteCurrentNode:()=>Pz,deleteNode:()=>jz,deleteRange:()=>Lz,deleteSelection:()=>$z,enter:()=>Bz,exitCode:()=>Vz,extendMarkRange:()=>Hz,first:()=>Uz,focus:()=>qz,forEach:()=>Kz,insertContent:()=>Gz,insertContentAt:()=>Jz,insertDefaultBlock:()=>Yz,joinBackward:()=>e$,joinDown:()=>Qz,joinForward:()=>t$,joinItemBackward:()=>n$,joinItemForward:()=>r$,joinTextblockBackward:()=>o$,joinTextblockForward:()=>i$,joinUp:()=>Xz,keyboardShortcut:()=>a$,lift:()=>l$,liftEmptyBlock:()=>u$,liftListItem:()=>c$,newlineInCode:()=>d$,resetAttributes:()=>f$,scrollIntoView:()=>h$,selectAll:()=>p$,selectNodeBackward:()=>m$,selectNodeForward:()=>g$,selectParentNode:()=>y$,selectTextblockEnd:()=>x$,selectTextblockStart:()=>v$,setContent:()=>b$,setMark:()=>$$,setMeta:()=>B$,setNode:()=>V$,setNodeSelection:()=>H$,setTextDirection:()=>U$,setTextSelection:()=>W$,sinkListItem:()=>q$,splitBlock:()=>K$,splitListItem:()=>G$,toggleList:()=>J$,toggleMark:()=>Y$,toggleNode:()=>X$,toggleWrap:()=>Q$,undoInputRule:()=>eB,unsetAllMarks:()=>tB,unsetMark:()=>nB,unsetTextDirection:()=>rB,updateAttributes:()=>oB,wrapIn:()=>iB,wrapInList:()=>sB});var Mz=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),Nz=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),Dz=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(l,u)=>{if(l.type.isText)return;const{doc:d,mapping:h}=e,p=d.resolve(h.map(u)),m=d.resolve(h.map(u+l.nodeSize)),y=p.blockRange(m);if(!y)return;const x=bl(y);if(l.type.isTextblock){const{defaultType:b}=p.parent.contentMatchAt(p.index());e.setNodeMarkup(y.start,b)}(x||x===0)&&e.lift(y,x)})}),!0},Rz=t=>e=>t(e),Oz=()=>({state:t,dispatch:e})=>J_(t,e),Iz=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new je(r.doc.resolve(Math.max(s-1,0)))),!0},Pz=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const l=o.before(i),u=o.after(i);t.delete(l,u).scrollIntoView()}return!0}return!1};function Bt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var jz=t=>({tr:e,state:n,dispatch:r})=>{const o=Bt(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const u=i.before(s),d=i.after(s);e.delete(u,d).scrollIntoView()}return!0}return!1},Lz=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},Fz=t=>t.content?/^text(\*|\+)/.test(t.content):!1,Vw=(t,e,n)=>{if(!t.parent.isInline||n==="left"&&t.pos>t.start()||n==="right"&&t.pos<t.end())return t.pos;const r=e.nodes[t.parent.type.name].spec;return Fz(r)?n==="left"?t.start()-1:t.end()+1:t.pos},zz=(t,e,n)=>{const r=Vw(t,n,"left"),o=Vw(e,n,"right");return{from:r,to:o}},$z=()=>({state:t,dispatch:e})=>{if(t.selection.empty)return!1;if(e){const n=t.tr,{ranges:r}=t.selection,o=n.steps.length;r.forEach(i=>{const s=n.mapping.slice(o),l=n.doc.resolve(s.map(i.$from.pos)),u=n.doc.resolve(s.map(i.$to.pos)),{from:d,to:h}=zz(l,u,t.schema);n.deleteRange(d,h)}),n.selection.empty||n.setSelection(je.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),e(n)}return!0},Bz=()=>({commands:t})=>t.keyboardShortcut("Enter"),Vz=()=>({state:t,dispatch:e})=>C7(t,e);function hx(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Jf(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:hx(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function z4(t,e,n={}){return t.find(r=>r.type===e&&Jf(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function Hw(t,e,n={}){return!!z4(t,e,n)}function px(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(d=>d.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(d=>d.type===e))return;if(!n){const d=r.node.marks.find(h=>h.type===e);d&&(n=d.attrs)}if(!z4([...r.node.marks],e,n))return;let i=r.index,s=t.start()+r.offset,l=i+1,u=s+r.node.nodeSize;for(;i>0&&Hw([...t.parent.child(i-1).marks],e,n);)i-=1,s-=t.parent.child(i).nodeSize;for(;l<t.parent.childCount&&Hw([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:s,to:u}}function li(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var Hz=(t,e)=>({tr:n,state:r,dispatch:o})=>{const i=li(t,r.schema),{doc:s,selection:l}=n,{$from:u,from:d,to:h}=l;if(o){const p=px(u,i,e);if(p&&p.from<=d&&p.to>=h){const m=je.create(s,p.from,p.to);n.setSelection(m)}}return!0},Uz=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function $4(t){return t instanceof je}function js(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function A1(t,e=null){if(!e)return null;const n=Ve.atStart(t),r=Ve.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?je.create(t,js(0,o,i),js(t.content.size,o,i)):je.create(t,js(e,o,i),js(e,o,i))}function Uw(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function Yf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Wz(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var qz=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(Yf()||Uw())&&r.dom.focus(),Wz()&&!Yf()&&!Uw()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!$4(n.state.selection))return s(),!0;const l=A1(o.doc,t)||n.state.selection,u=n.state.selection.eq(l);return i&&(u||o.setSelection(l),u&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},Kz=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),Gz=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),B4=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&B4(r)}return t};function tf(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return B4(n)}function ll(t,e,n){if(t instanceof Ki||t instanceof re)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return re.fromArray(t.map(l=>e.nodeFromJSON(l)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),ll("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="";const u=new Gy({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:d=>(s=!0,l=typeof d=="string"?d:d.outerHTML,null)}]}})});if(n.slice?Yo.fromSchema(u).parseSlice(tf(t),n.parseOptions):Yo.fromSchema(u).parse(tf(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=Yo.fromSchema(e);return n.slice?i.parseSlice(tf(t),n.parseOptions).content:i.parse(tf(t),n.parseOptions)}return ll("",e,n)}function V4(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof zt||o instanceof cn))return;const i=t.mapping.maps[r];let s=0;i.forEach((l,u,d,h)=>{s===0&&(s=h)}),t.setSelection(Ve.near(t.doc.resolve(s),n))}var Zz=t=>!("type"in t),Jz=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const u=w=>{i.emit("contentError",{editor:i,error:w,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{ll(e,i.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(w){u(w)}try{l=ll(e,i.schema,{parseOptions:d,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(w){return u(w),!1}let{from:h,to:p}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},m=!0,y=!0;if((Zz(l)?l:[l]).forEach(w=>{w.check(),m=m?w.isText&&w.marks.length===0:!1,y=y?w.isBlock:!1}),h===p&&y){const{parent:w}=r.doc.resolve(h);w.isTextblock&&!w.type.spec.code&&!w.childCount&&(h-=1,p+=1)}let b;if(m){if(Array.isArray(e))b=e.map(w=>w.text||"").join("");else if(e instanceof re){let w="";e.forEach(E=>{E.text&&(w+=E.text)}),b=w}else typeof e=="object"&&e&&e.text?b=e.text:b=e;r.insertText(b,h,p)}else{b=l;const w=r.doc.resolve(h),E=w.node(),_=w.parentOffset===0,A=E.isText||E.isTextblock,M=E.content.size>0;_&&A&&M&&y&&(h=Math.max(0,h-1)),r.replaceWith(h,p,b)}n.updateSelection&&V4(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:h,text:b}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:h,text:b})}return!0};function H4(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Yz=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{pos:o,attrs:i,content:s,updateSelection:l=!0}=t;let u;typeof o=="number"?u=e.doc.resolve(o):o?u=o:u=e.selection.$from;const d=H4(u.parent.contentMatchAt(u.index()));if(!d)return!1;const h=Object.keys(d.spec.attrs||{}),p=i?Object.fromEntries(Object.entries(i).filter(([y])=>h.includes(y))):{};let m;if(s){const y=ll(s,r.schema);m=d.createAndFill(p,y)}else m=d.createAndFill(p);return m?(n&&(e.insert(u.pos,m),l&&V4(e,e.steps.length-1,-1)),!0):!1},Xz=()=>({state:t,dispatch:e})=>b7(t,e),Qz=()=>({state:t,dispatch:e})=>k7(t,e),e$=()=>({state:t,dispatch:e})=>H_(t,e),t$=()=>({state:t,dispatch:e})=>K_(t,e),n$=()=>({state:t,dispatch:e,tr:n})=>{try{const r=lp(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},r$=()=>({state:t,dispatch:e,tr:n})=>{try{const r=lp(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},o$=()=>({state:t,dispatch:e})=>x7(t,e),i$=()=>({state:t,dispatch:e})=>v7(t,e);function U4(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function s$(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l<e.length-1;l+=1){const u=e[l];if(/^(cmd|meta|m)$/i.test(u))s=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))i=!0;else if(/^mod$/i.test(u))Yf()||U4()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${u}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var a$=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=s$(t).split(/-(?!$)/),s=i.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),u=e.captureTransaction(()=>{n.someProp("handleKeyDown",d=>d(n,l))});return u==null||u.steps.forEach(d=>{const h=d.map(r.mapping);h&&o&&r.maybeStep(h)}),!0};function rs(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?Bt(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(p,m)=>{if(p.isText)return;const y=Math.max(r,m),x=Math.min(o,m+p.nodeSize);l.push({node:p,from:y,to:x})});const u=o-r,d=l.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Jf(p.node.attrs,n,{strict:!1}));return i?!!d.length:d.reduce((p,m)=>p+m.to-m.from,0)>=u}var l$=(t,e={})=>({state:n,dispatch:r})=>{const o=Bt(t,n.schema);return rs(n,o,e)?w7(n,r):!1},u$=()=>({state:t,dispatch:e})=>Y_(t,e),c$=t=>({state:e,dispatch:n})=>{const r=Bt(t,e.schema);return I7(r)(e,n)},d$=()=>({state:t,dispatch:e})=>Z_(t,e);function mp(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Ww(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}var f$=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=mp(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=Bt(t,r.schema)),l==="mark"&&(s=li(t,r.schema));let u=!1;return n.selection.ranges.forEach(d=>{r.doc.nodesBetween(d.$from.pos,d.$to.pos,(h,p)=>{i&&i===h.type&&(u=!0,o&&n.setNodeMarkup(p,void 0,Ww(h.attrs,e))),s&&h.marks.length&&h.marks.forEach(m=>{s===m.type&&(u=!0,o&&n.addMark(p,p+h.nodeSize,s.create(Ww(m.attrs,e))))})})}),u},h$=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),p$=()=>({tr:t,dispatch:e})=>{if(e){const n=new sr(t.doc);t.setSelection(n)}return!0},m$=()=>({state:t,dispatch:e})=>W_(t,e),g$=()=>({state:t,dispatch:e})=>G_(t,e),y$=()=>({state:t,dispatch:e})=>_7(t,e),x$=()=>({state:t,dispatch:e})=>M7(t,e),v$=()=>({state:t,dispatch:e})=>A7(t,e);function M1(t,e,n={},r={}){return ll(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var b$=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{const{doc:u}=i;if(r.preserveWhitespace!=="full"){const d=M1(t,o.schema,r,{errorOnInvalidContent:e??o.options.enableContentCheck});return s&&i.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:u.content.size},t,{parseOptions:r,errorOnInvalidContent:e??o.options.enableContentCheck})};function W4(t,e){const n=li(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,u=>{s.push(...u.marks)});const l=s.find(u=>u.type.name===n.name);return l?{...l.attrs}:{}}function q4(t,e){const n=new F_(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function k$(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function w$(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function gp(t){return e=>w$(e.$from,t)}function Te(t,e,n){return t.config[e]===void 0&&t.parent?Te(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Te(t.parent,e,n):null}):t.config[e]}function mx(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=Te(e,"addExtensions",n);return r?[e,...mx(r())]:e}).flat(10)}function Cc(t,e){const n=ua.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function K4(t){return typeof t=="function"}function at(t,e=void 0,...n){return K4(t)?e?t.bind(e)(...n):t(...n):t}function C$(t={}){return Object.keys(t).length===0&&t.constructor===Object}function ul(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function G4(t){const e=[],{nodeExtensions:n,markExtensions:r}=ul(t),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(d=>d.name!=="text").map(d=>d.name),l=r.map(d=>d.name),u=[...s,...l];return t.forEach(d=>{const h={name:d.name,options:d.options,storage:d.storage,extensions:o},p=Te(d,"addGlobalAttributes",h);if(!p)return;p().forEach(y=>{let x;Array.isArray(y.types)?x=y.types:y.types==="*"?x=u:y.types==="nodes"?x=s:y.types==="marks"?x=l:x=[],x.forEach(b=>{Object.entries(y.attributes).forEach(([w,E])=>{e.push({type:b,name:w,attribute:{...i,...E}})})})})}),o.forEach(d=>{const h={name:d.name,options:d.options,storage:d.storage},p=Te(d,"addAttributes",h);if(!p)return;const m=p();Object.entries(m).forEach(([y,x])=>{const b={...i,...x};typeof(b==null?void 0:b.default)=="function"&&(b.default=b.default()),b!=null&&b.isRequired&&(b==null?void 0:b.default)===void 0&&delete b.default,e.push({type:d.name,name:y,attribute:b})})}),e}function S$(t){const e=[];let n="",r=!1,o=!1,i=0;const s=t.length;for(let l=0;l<s;l+=1){const u=t[l];if(u==="'"&&!o){r=!r,n+=u;continue}if(u==='"'&&!r){o=!o,n+=u;continue}if(!r&&!o){if(u==="("){i+=1,n+=u;continue}if(u===")"&&i>0){i-=1,n+=u;continue}if(u===";"&&i===0){e.push(n),n="";continue}}n+=u}return n&&e.push(n),e}function qw(t){const e=[],n=S$(t||""),r=n.length;for(let o=0;o<r;o+=1){const i=n[o],s=i.indexOf(":");if(s===-1)continue;const l=i.slice(0,s).trim(),u=i.slice(s+1).trim();l&&u&&e.push([l,u])}return e}function Xt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const l=i?String(i).split(" "):[],u=r[o]?r[o].split(" "):[],d=l.filter(h=>!u.includes(h));r[o]=[...u,...d].join(" ")}else if(o==="style"){const l=new Map([...qw(r[o]),...qw(i)]);r[o]=Array.from(l.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[o]=i}),r},{})}function ec(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Xt(n,r),{})}function E$(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function Kw(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(n):E$(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function Gw(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&C$(n)?!1:n!=null))}function Zw(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function _$(t,e){var n;const r=G4(t),{nodeExtensions:o,markExtensions:i}=ul(t),s=(n=o.find(d=>Te(d,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(d=>{const h=r.filter(E=>E.type===d.name),p={name:d.name,options:d.options,storage:d.storage,editor:e},m=t.reduce((E,_)=>{const A=Te(_,"extendNodeSchema",p);return{...E,...A?A(d):{}}},{}),y=Gw({...m,content:at(Te(d,"content",p)),marks:at(Te(d,"marks",p)),group:at(Te(d,"group",p)),inline:at(Te(d,"inline",p)),atom:at(Te(d,"atom",p)),selectable:at(Te(d,"selectable",p)),draggable:at(Te(d,"draggable",p)),code:at(Te(d,"code",p)),whitespace:at(Te(d,"whitespace",p)),linebreakReplacement:at(Te(d,"linebreakReplacement",p)),defining:at(Te(d,"defining",p)),isolating:at(Te(d,"isolating",p)),attrs:Object.fromEntries(h.map(Zw))}),x=at(Te(d,"parseHTML",p));x&&(y.parseDOM=x.map(E=>Kw(E,h)));const b=Te(d,"renderHTML",p);b&&(y.toDOM=E=>b({node:E,HTMLAttributes:ec(E,h)}));const w=Te(d,"renderText",p);return w&&(y.toText=w),[d.name,y]})),u=Object.fromEntries(i.map(d=>{const h=r.filter(w=>w.type===d.name),p={name:d.name,options:d.options,storage:d.storage,editor:e},m=t.reduce((w,E)=>{const _=Te(E,"extendMarkSchema",p);return{...w,..._?_(d):{}}},{}),y=Gw({...m,inclusive:at(Te(d,"inclusive",p)),excludes:at(Te(d,"excludes",p)),group:at(Te(d,"group",p)),spanning:at(Te(d,"spanning",p)),code:at(Te(d,"code",p)),attrs:Object.fromEntries(h.map(Zw))}),x=at(Te(d,"parseHTML",p));x&&(y.parseDOM=x.map(w=>Kw(w,h)));const b=Te(d,"renderHTML",p);return b&&(y.toDOM=w=>b({mark:w,HTMLAttributes:ec(w,h)})),[d.name,y]}));return new Gy({topNode:s,nodes:l,marks:u})}function T$(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Cu(t){return t.sort((n,r)=>{const o=Te(n,"priority")||100,i=Te(r,"priority")||100;return o>i?-1:o<i?1:0})}function Z4(t){const e=Cu(mx(t)),n=T$(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function J4(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
398
|
-
|
|
399
|
-
`,textSerializers:s={}}=n||{};let l="";return t.nodesBetween(r,o,(u,d,h,p)=>{var m;u.isBlock&&d>r&&(l+=i);const y=s==null?void 0:s[u.type.name];if(y)return h&&(l+=y({node:u,pos:d,parent:h,index:p,range:e})),!1;u.isText&&(l+=(m=u==null?void 0:u.text)==null?void 0:m.slice(Math.max(r,d)-d,o-d))}),l}function A$(t,e){const n={from:0,to:t.content.size};return J4(t,n,e)}function Y4(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function M$(t,e){const n=Bt(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});const s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function X4(t,e){const n=mp(typeof e=="string"?e:e.name,t.schema);return n==="node"?M$(t,e):n==="mark"?W4(t,e):{}}function N$(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function D$(t){const e=N$(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function gx(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((l,u)=>{s.push({from:l,to:u})});else{const{from:l,to:u}=n[i];if(l===void 0||u===void 0)return;s.push({from:l,to:u})}s.forEach(({from:l,to:u})=>{const d=e.slice(i).map(l,-1),h=e.slice(i).map(u),p=e.invert().map(d,-1),m=e.invert().map(h);r.push({oldRange:{from:p,to:m},newRange:{from:d,to:h}})})}),D$(r)}function yx(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=px(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var R$=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let i=r,s=null;for(;i>0&&s===null;){const l=o.node(i);(l==null?void 0:l.type.name)===e?s=l:i-=1}return[s,i]};function lu(t,e){return e.nodes[t]||e.marks[t]||null}function Sf(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var O$=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var u,d;const h=((d=(u=o.type.spec).toText)==null?void 0:d.call(u,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?h:h.slice(0,Math.max(0,r-i))}),n};function N1(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?li(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Jf(p.attrs,n,{strict:!1}));let s=0;const l=[];if(o.forEach(({$from:p,$to:m})=>{const y=p.pos,x=m.pos;t.doc.nodesBetween(y,x,(b,w)=>{if(i&&b.inlineContent&&!b.type.allowsMarkType(i))return!1;if(!b.isText&&!b.marks.length)return;const E=Math.max(y,w),_=Math.min(x,w+b.nodeSize),A=_-E;s+=A,l.push(...b.marks.map(M=>({mark:M,from:E,to:_})))})}),s===0)return!1;const u=l.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Jf(p.mark.attrs,n,{strict:!1})).reduce((p,m)=>p+m.to-m.from,0),d=l.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,m)=>p+m.to-m.from,0);return(u>0?u+d:u)>=s}function I$(t,e,n={}){if(!e)return rs(t,null,n)||N1(t,null,n);const r=mp(e,t.schema);return r==="node"?rs(t,e,n):r==="mark"?N1(t,e,n):!1}var P$=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const i=gp(l=>l.type.name===e)(t.selection);if(!i)return!1;const s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},j$=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Jw(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Qm(t,e){const{nodeExtensions:n}=ul(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=at(Te(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Sc(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(Sc(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function Q4(t){return t instanceof Re}var e6=class t6{constructor(e){this.position=e}static fromJSON(e){return new t6(e.position)}toJSON(){return{position:this.position}}};function L$(t,e){const n=e.mapping.mapResult(t.position);return{position:new e6(n.pos),mapResult:n}}function F$(t){return new e6(t)}function z$(t,e,n){var r;const{selection:o}=e;let i=null;if($4(o)&&(i=o.$cursor),i){const l=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(d=>d.type.excludes(n)))}const{ranges:s}=o;return s.some(({$from:l,$to:u})=>{let d=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,u.pos,(h,p,m)=>{if(d)return!1;if(h.isInline){const y=!m||m.type.allowsMarkType(n),x=!!n.isInSet(h.marks)||!h.marks.some(b=>b.type.excludes(n));d=y&&x}return!d}),d})}var $$=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:l}=i,u=li(t,r.schema);if(o)if(s){const d=W4(r,u);n.addStoredMark(u.create({...d,...e}))}else l.forEach(d=>{const h=d.$from.pos,p=d.$to.pos;r.doc.nodesBetween(h,p,(m,y)=>{const x=Math.max(y,h),b=Math.min(y+m.nodeSize,p);m.marks.find(E=>E.type===u)?m.marks.forEach(E=>{u===E.type&&n.addMark(x,b,u.create({...E.attrs,...e}))}):n.addMark(x,b,u.create(e))})});return z$(r,n,u)},B$=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),V$=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=Bt(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>dw(i,{...s,...e})(n)?!0:l.clearNodes()).command(({state:l})=>dw(i,{...s,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},H$=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=js(t,0,r.content.size),i=Re.create(r,o);e.setSelection(i)}return!0},U$=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=r;let s,l;return typeof e=="number"?(s=e,l=e):e&&"from"in e&&"to"in e?(s=e.from,l=e.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(u,d)=>{u.isText||n.setNodeMarkup(d,void 0,{...u.attrs,dir:t})}),!0},W$=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=je.atStart(r).from,l=je.atEnd(r).to,u=js(o,s,l),d=js(i,s,l),h=je.create(r,u,d);e.setSelection(h)}return!0},q$=t=>({state:e,dispatch:n})=>{const r=Bt(t,e.schema);return L7(r)(e,n)};function Yw(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}var K$=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:l,$to:u}=i,d=o.extensionManager.attributes,h=Sf(d,l.node().type.name,l.node().attrs);if(i instanceof Re&&i.node.isBlock)return!l.parentOffset||!Xo(s,l.pos)?!1:(r&&(t&&Yw(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const p=u.parentOffset===u.parent.content.size,m=l.depth===0?void 0:H4(l.node(-1).contentMatchAt(l.indexAfter(-1)));let y=p&&m?[{type:m,attrs:h}]:void 0,x=Xo(e.doc,e.mapping.map(l.pos),1,y);if(!y&&!x&&Xo(e.doc,e.mapping.map(l.pos),1,m?[{type:m}]:void 0)&&(x=!0,y=m?[{type:m,attrs:h}]:void 0),r){if(x&&(i instanceof je&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,y),m&&!p&&!l.parentOffset&&l.parent.type!==m)){const b=e.mapping.map(l.before()),w=e.doc.resolve(b);l.node(-1).canReplaceWith(w.index(),w.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&Yw(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return x},G$=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const l=Bt(t,r.schema),{$from:u,$to:d}=r.selection,h=r.selection.node;if(h&&h.isBlock||u.depth<2||!u.sameParent(d))return!1;const p=u.node(-1);if(p.type!==l)return!1;const m=i.extensionManager.attributes;if(u.parent.content.size===0&&u.node(-1).childCount===u.indexAfter(-1)){if(u.depth===2||u.node(-3).type!==l||u.index(-2)!==u.node(-2).childCount-1)return!1;if(o){let E=re.empty;const _=u.index(-1)?1:u.index(-2)?2:3;for(let I=u.depth-_;I>=u.depth-3;I-=1)E=re.from(u.node(I).copy(E));const A=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,M={...Sf(m,u.node().type.name,u.node().attrs),...e},N=((s=l.contentMatch.defaultType)==null?void 0:s.createAndFill(M))||void 0;E=E.append(re.from(l.createAndFill(null,N)||void 0));const D=u.before(u.depth-(_-1));n.replace(D,u.after(-A),new ye(E,4-_,0));let O=-1;n.doc.nodesBetween(D,n.doc.content.size,(I,L)=>{if(O>-1)return!1;I.isTextblock&&I.content.size===0&&(O=L+1)}),O>-1&&n.setSelection(je.near(n.doc.resolve(O))),n.scrollIntoView()}return!0}const y=d.pos===u.end()?p.contentMatchAt(0).defaultType:null,x={...Sf(m,p.type.name,p.attrs),...e},b={...Sf(m,u.node().type.name,u.node().attrs),...e};n.delete(u.pos,d.pos);const w=y?[{type:l,attrs:x},{type:y,attrs:b}]:[{type:l,attrs:x}];if(!Xo(n.doc,u.pos,2))return!1;if(o){const{selection:E,storedMarks:_}=r,{splittableMarks:A}=i.extensionManager,M=_||E.$to.parentOffset&&E.$from.marks();if(n.split(u.pos,2,w).scrollIntoView(),!M||!o)return!0;const N=M.filter(D=>A.includes(D.type.name));n.ensureMarks(N)}return!0};function Xw(t){return!t||t==="1"?null:t}function n6(t,e){return Xw(t)===Xw(e)}var eg=(t,e)=>{const n=gp(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return!(n.node.type===(o==null?void 0:o.type)&&cs(t.doc,n.pos))||!n6(n.node.attrs.type,o==null?void 0:o.attrs.type)||t.join(n.pos),!0},tg=(t,e)=>{const n=gp(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return!(n.node.type===(o==null?void 0:o.type)&&cs(t.doc,r))||!n6(n.node.attrs.type,o==null?void 0:o.attrs.type)||t.join(r),!0};function Z$(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),o=e.resolve(n.nodeSize-1);return je.between(r,o)}var J$=(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:u,commands:d,can:h})=>{const{extensions:p,splittableMarks:m}=o.extensionManager,y=Bt(t,s.schema),x=Bt(e,s.schema),{selection:b,storedMarks:w}=s,{$from:E,$to:_}=b,A=E.blockRange(_),M=w||b.$to.parentOffset&&b.$from.marks();if(!A)return!1;const N=gp(q=>Qm(q.type.name,p))(b),D=b.from===0&&b.to===s.doc.content.size,O=s.doc.content.content,I=O.length===1?O[0]:null,L=D&&I&&Qm(I.type.name,p)?{node:I,pos:0}:null,W=N??L,Y=!!N&&A.depth>=1&&A.depth-N.depth<=1,G=!!L;if((Y||G)&&W){if(W.node.type===y)return D&&G?u().command(({tr:q,dispatch:Z})=>{const Q=Z$(q);return Q?(q.setSelection(Q),Z&&Z(q),!0):!1}).liftListItem(x).run():d.liftListItem(x);if(Qm(W.node.type.name,p)&&y.validContent(W.node.content))return u().command(()=>(i.setNodeMarkup(W.pos,y),!0)).command(()=>eg(i,y)).command(()=>tg(i,y)).run()}return!n||!M||!l?u().command(()=>h().wrapInList(y,r)?!0:d.clearNodes()).wrapInList(y,r).command(()=>eg(i,y)).command(()=>tg(i,y)).run():u().command(()=>{const q=h().wrapInList(y,r),Z=M.filter(Q=>m.includes(Q.type.name));return i.ensureMarks(Z),q?!0:d.clearNodes()}).wrapInList(y,r).command(()=>eg(i,y)).command(()=>tg(i,y)).run()},Y$=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=li(t,r.schema);return N1(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},X$=(t,e,n={})=>({state:r,commands:o})=>{const i=Bt(t,r.schema),s=Bt(e,r.schema),l=rs(r,i,n);let u;return r.selection.$anchor.sameParent(r.selection.$head)&&(u=r.selection.$anchor.parent.attrs),l?o.setNode(s,u):o.setNode(i,{...u,...n})},Q$=(t,e={})=>({state:n,commands:r})=>{const o=Bt(t,n.schema);return rs(n,o,e)?r.lift(o):r.wrapIn(o,e)},eB=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,l=i.transform;for(let u=l.steps.length-1;u>=0;u-=1)s.step(l.steps[u].invert(l.docs[u]));if(i.text){const u=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,u))}else s.delete(i.from,i.to)}return!0}}return!1},tB=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{ignoreClearable:o=!1}=t,{selection:i}=e,{empty:s,ranges:l}=i;if(s)return!0;const{nonClearableMarks:u}=r.extensionManager;if(n){const d=Object.values(r.schema.marks).filter(h=>o||!u.includes(h.name));l.forEach(h=>{for(const p of d)e.removeMark(h.$from.pos,h.$to.pos,p)})}return!0},nB=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=n,u=li(t,r.schema),{$from:d,empty:h,ranges:p}=l;if(!o)return!0;if(h&&s){let{from:m,to:y}=l;const x=(i=d.marks().find(w=>w.type===u))==null?void 0:i.attrs,b=px(d,u,x);b&&(m=b.from,y=b.to),n.removeMark(m,y,u)}else p.forEach(m=>{n.removeMark(m.$from.pos,m.$to.pos,u)});return n.removeStoredMark(u),!0},rB=t=>({tr:e,state:n,dispatch:r})=>{const{selection:o}=n;let i,s;return typeof t=="number"?(i=t,s=t):t&&"from"in t&&"to"in t?(i=t.from,s=t.to):(i=o.from,s=o.to),r&&e.doc.nodesBetween(i,s,(l,u)=>{if(l.isText)return;const d={...l.attrs};delete d.dir,e.setNodeMarkup(u,void 0,d)}),!0},oB=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=mp(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=Bt(t,r.schema)),l==="mark"&&(s=li(t,r.schema));let u=!1;return n.selection.ranges.forEach(d=>{const h=d.$from.pos,p=d.$to.pos;let m,y,x,b;n.selection.empty?r.doc.nodesBetween(h,p,(w,E)=>{i&&i===w.type&&(u=!0,x=Math.max(E,h),b=Math.min(E+w.nodeSize,p),m=E,y=w)}):r.doc.nodesBetween(h,p,(w,E)=>{E<h&&i&&i===w.type&&(u=!0,x=Math.max(E,h),b=Math.min(E+w.nodeSize,p),m=E,y=w),E>=h&&E<=p&&(i&&i===w.type&&(u=!0,o&&n.setNodeMarkup(E,void 0,{...w.attrs,...e})),s&&w.marks.length&&w.marks.forEach(_=>{if(s===_.type&&(u=!0,o)){const A=Math.max(E,h),M=Math.min(E+w.nodeSize,p);n.addMark(A,M,s.create({..._.attrs,...e}))}}))}),y&&(m!==void 0&&o&&n.setNodeMarkup(m,void 0,{...y.attrs,...e}),s&&y.marks.length&&y.marks.forEach(w=>{s===w.type&&o&&n.addMark(x,b,s.create({...w.attrs,...e}))}))}),u},iB=(t,e={})=>({state:n,dispatch:r})=>{const o=Bt(t,n.schema);return N7(o,e)(n,r)},sB=(t,e={})=>({state:n,dispatch:r})=>{const o=Bt(t,n.schema);return D7(o,e)(n,r)},aB=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}};function lB(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Re){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let o=r.depth;for(;o>=0;){const i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(e))return!0;o-=1}return!1}function uB(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}function cB(t){return typeof t=="number"}function dB(t){return Object.prototype.toString.call(t).slice(8,-1)}function nf(t){return dB(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}var fB={};fx(fB,{createAtomBlockMarkdownSpec:()=>hB,createBlockMarkdownSpec:()=>pB,createInlineMarkdownSpec:()=>yB,parseAttributes:()=>xx,parseIndentedBlocks:()=>D1,renderNestedMarkdownContent:()=>bx,serializeAttributes:()=>vx});function xx(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,d=>(n.push(d),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([\w-]+)/g);if(o){const d=o.map(h=>h.trim().slice(1));e.class=d.join(" ")}const i=r.match(/(?:^|\s)#([\w-]+)/);i&&(e.id=i[1]);const s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,d,h])=>{var p;const m=parseInt(((p=h.match(/__QUOTED_(\d+)__/))==null?void 0:p[1])||"0",10),y=n[m];y&&(e[d]=y.slice(1,-1))});const u=r.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return u&&u.split(/\s+/).filter(Boolean).forEach(h=>{h.match(/^[a-zA-Z][\w-]*$/)&&(e[h]=!0)}),e}function vx(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function hB(t){const{nodeName:e,name:n,parseAttributes:r=xx,serializeAttributes:o=vx,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=t,u=n||e,d=h=>{if(!l)return h;const p={};return l.forEach(m=>{m in h&&(p[m]=h[m])}),p};return{parseMarkdown:(h,p)=>{const m={...i,...h.attributes};return p.createNode(e,m,[])},markdownTokenizer:{name:e,level:"block",start(h){var p;const m=new RegExp(`^:::${u}(?:\\s|$)`,"m"),y=(p=h.match(m))==null?void 0:p.index;return y!==void 0?y:-1},tokenize(h,p,m){const y=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),x=h.match(y);if(!x)return;const b=x[1]||"",w=r(b);if(!s.find(_=>!(_ in w)))return{type:e,raw:x[0],attributes:w}}},renderMarkdown:h=>{const p=d(h.attrs||{}),m=o(p),y=m?` {${m}}`:"";return`:::${u}${y} :::`}}}function pB(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=xx,serializeAttributes:i=vx,defaultAttributes:s={},content:l="block",allowedAttributes:u}=t,d=n||e,h=p=>{if(!u)return p;const m={};return u.forEach(y=>{y in p&&(m[y]=p[y])}),m};return{parseMarkdown:(p,m)=>{let y;if(r){const b=r(p);y=typeof b=="string"?[{type:"text",text:b}]:b}else l==="block"?y=m.parseChildren(p.tokens||[]):y=m.parseInline(p.tokens||[]);const x={...s,...p.attributes};return m.createNode(e,x,y)},markdownTokenizer:{name:e,level:"block",start(p){var m;const y=new RegExp(`^:::${d}`,"m"),x=(m=p.match(y))==null?void 0:m.index;return x!==void 0?x:-1},tokenize(p,m,y){var x;const b=new RegExp(`^:::${d}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),w=p.match(b);if(!w)return;const[E,_=""]=w,A=o(_);let M=1;const N=E.length;let D="";const O=/^:::([\w-]*)(\s.*)?/gm,I=p.slice(N);for(O.lastIndex=0;;){const L=O.exec(I);if(L===null)break;const W=L.index,Y=L[1];if(!((x=L[2])!=null&&x.endsWith(":::"))){if(Y)M+=1;else if(M-=1,M===0){const G=I.slice(0,W);D=G.trim();const q=p.slice(0,N+W+L[0].length);let Z=[];if(D)if(l==="block")for(Z=y.blockTokens(G),Z.forEach(Q=>{Q.text&&(!Q.tokens||Q.tokens.length===0)&&(Q.tokens=y.inlineTokens(Q.text))});Z.length>0;){const Q=Z[Z.length-1];if(Q.type==="paragraph"&&(!Q.text||Q.text.trim()===""))Z.pop();else break}else Z=y.inlineTokens(D);return{type:e,raw:q,attributes:A,content:D,tokens:Z}}}}}},renderMarkdown:(p,m)=>{const y=h(p.attrs||{}),x=i(y),b=x?` {${x}}`:"",w=m.renderChildren(p.content||[],`
|
|
400
|
-
|
|
401
|
-
`);return`:::${d}${b}
|
|
402
|
-
|
|
403
|
-
${w}
|
|
404
|
-
|
|
405
|
-
:::`}}}function mB(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,o,i,s]=r;e[o]=i||s,r=n.exec(t)}return e}function gB(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function yB(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=mB,serializeAttributes:i=gB,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:u}=t,d=n||e,h=m=>{if(!u)return m;const y={};return u.forEach(x=>{const b=typeof x=="string"?x:x.name,w=typeof x=="string"?void 0:x.skipIfDefault;if(b in m){const E=m[b];if(w!==void 0&&E===w)return;y[b]=E}}),y},p=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(m,y)=>{const x={...s,...m.attributes};if(l)return y.createNode(e,x);const b=r?r(m):m.content||"";return b?y.createNode(e,x,[y.createTextNode(b)]):y.createNode(e,x,[])},markdownTokenizer:{name:e,level:"inline",start(m){const y=l?new RegExp(`\\[${p}\\s*[^\\]]*\\]`):new RegExp(`\\[${p}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${p}\\]`),x=m.match(y),b=x==null?void 0:x.index;return b!==void 0?b:-1},tokenize(m,y,x){const b=l?new RegExp(`^\\[${p}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${p}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${p}\\]`),w=m.match(b);if(!w)return;let E="",_="";if(l){const[,M]=w;_=M}else{const[,M,N]=w;_=M,E=N||""}const A=o(_.trim());return{type:e,raw:w[0],content:E.trim(),attributes:A}}},renderMarkdown:m=>{let y="";r?y=r(m):m.content&&m.content.length>0&&(y=m.content.filter(E=>E.type==="text").map(E=>E.text).join(""));const x=h(m.attrs||{}),b=i(x),w=b?` ${b}`:"";return l?`[${d}${w}]`:`[${d}${w}]${y}[/${d}]`}}}function D1(t,e,n){var r,o,i,s;const l=t.split(`
|
|
406
|
-
`),u=[];let d="",h=0;const p=e.baseIndentSize||2;for(;h<l.length;){const m=l[h],y=m.match(e.itemPattern);if(!y){if(u.length>0)break;if(m.trim()===""){h+=1,d=`${d}${m}
|
|
407
|
-
`;continue}else return}const x=e.extractItemData(y),{indentLevel:b,mainContent:w}=x;d=`${d}${m}
|
|
408
|
-
`;const E=[w];for(h+=1;h<l.length;){const N=l[h];if(N.trim()===""){const O=l.slice(h+1).findIndex(W=>W.trim()!=="");if(O===-1)break;if((((o=(r=l[h+1+O].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>b){E.push(N),d=`${d}${N}
|
|
409
|
-
`,h+=1;continue}else break}if((((s=(i=N.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>b)E.push(N),d=`${d}${N}
|
|
410
|
-
`,h+=1;else break}let _;const A=E.slice(1);if(A.length>0){const N=A.map(D=>D.slice(b+p)).join(`
|
|
411
|
-
`);N.trim()&&(e.customNestedParser?_=e.customNestedParser(N):_=n.blockTokens(N))}const M=e.createToken(x,_);u.push(M)}if(u.length!==0)return{items:u,raw:d}}function bx(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const o=typeof n=="function"?n(r):n,[i,...s]=t.content,l=e.renderChildren([i]);let u=`${o}${l}`;return s&&s.length>0&&s.forEach((d,h)=>{var p,m;const y=(m=(p=e.renderChild)==null?void 0:p.call(e,d,h+1))!=null?m:e.renderChildren([d]);if(y!=null){const x=y.split(`
|
|
412
|
-
`).map(b=>b?e.indent(b):e.indent("")).join(`
|
|
413
|
-
`);u+=d.type==="paragraph"?`
|
|
414
|
-
|
|
415
|
-
${x}`:`
|
|
416
|
-
${x}`}}),u}function r6(t,e){const n={...t};return nf(t)&&nf(e)&&Object.keys(e).forEach(r=>{nf(e[r])&&nf(t[r])?n[r]=r6(t[r],e[r]):n[r]=e[r]}),n}function xB(t,e,n={}){const{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,u)=>{const d=i.mapping.map(u),h=i.mapping.map(u)+l.nodeSize;let p=null;if(l.marks.forEach(y=>{if(y!==s)return!1;p=y}),!p)return;let m=!1;if(Object.keys(n).forEach(y=>{n[y]!==p.attrs[y]&&(m=!0)}),m){const y=t.type.create({...t.attrs,...n});i.removeMark(d,h,t.type),i.addMark(d,h,y)}}),i.docChanged&&e.view.dispatch(i)}var Ec=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},vB=(t,e)=>{if(hx(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function rf(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=t,{view:u}=n;if(u.composing)return!1;const d=u.state.doc.resolve(r);if(d.parent.type.spec.code||(e=d.nodeBefore||d.nodeAfter)!=null&&e.marks.find(m=>m.type.spec.code))return!1;let h=!1;const p=O$(d)+i;return s.forEach(m=>{if(h)return;const y=vB(p,m.find);if(!y)return;const x=y[0].length-i.length;if(x>0){const D=d.parentOffset-x;if(D<0||d.parent.textBetween(D,d.parentOffset)!==y[0].slice(0,x))return}const b=u.state.tr,w=hp({state:u.state,transaction:b}),E={from:r-(y[0].length-i.length),to:o},{commands:_,chain:A,can:M}=new pp({editor:n,state:w});m.handler({state:w,range:E,match:y,commands:_,chain:A,can:M})===null||!b.steps.length||(m.undoable&&b.setMeta(l,{transform:b,from:r,to:o,text:i}),u.dispatch(b),h=!0)}),h}function bB(t){const{editor:e,rules:n}=t,r=new wt({state:{init(){return null},apply(o,i,s){const l=o.getMeta(r);if(l)return l;const u=o.getMeta("applyInputRules");return!!u&&setTimeout(()=>{let{text:h}=u;typeof h=="string"?h=h:h=Cc(re.from(h),s.schema);const{from:p}=u,m=p+h.length;rf({editor:e,from:p,to:m,text:h,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return rf({editor:e,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&rf({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?rf({editor:e,from:s.pos,to:s.pos,text:`
|
|
417
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var kx=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...at(Te(this,"addOptions",{name:this.name}))}}get storage(){return{...at(Te(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>r6(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},cr=class o6 extends kx{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new o6(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(d=>(d==null?void 0:d.type.name)===n.name))return!1;const u=s.find(d=>(d==null?void 0:d.type.name)===n.name);return u&&r.removeStoredMark(u),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},i6=class{constructor(t){this.find=t.find,this.handler=t.handler}},kB=(t,e,n)=>{if(hx(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function wB(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:u,chain:d,can:h}=new pp({editor:e,state:n}),p=[];return n.doc.nodesBetween(r,o,(y,x)=>{var b,w,E,_,A;if((w=(b=y.type)==null?void 0:b.spec)!=null&&w.code||!(y.isText||y.isTextblock||y.isInline))return;const M=(A=(_=(E=y.content)==null?void 0:E.size)!=null?_:y.nodeSize)!=null?A:0,N=Math.max(r,x),D=Math.min(o,x+M);if(N>=D)return;const O=y.isText?y.text||"":y.textBetween(N-x,D-x,void 0,"");kB(O,i.find,s).forEach(L=>{if(L.index===void 0)return;const W=N+L.index+1,Y=W+L[0].length,G={from:n.tr.mapping.map(W),to:n.tr.mapping.map(Y)},q=i.handler({state:n,range:G,match:L,commands:u,chain:d,can:h,pasteEvent:s,dropEvent:l});p.push(q)})}),p.every(y=>y!==null)}var of=null,CB=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function SB(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const u=({state:h,from:p,to:m,rule:y,pasteEvt:x})=>{const b=h.tr,w=hp({state:h,transaction:b});if(!(!wB({editor:e,state:w,from:Math.max(p-1,0),to:m.b-1,rule:y,pasteEvent:x,dropEvent:l})||!b.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return n.map(h=>new wt({view(p){const m=x=>{var b;r=(b=p.dom.parentElement)!=null&&b.contains(x.target)?p.dom.parentElement:null,r&&(of=e)},y=()=>{of&&(of=null)};return window.addEventListener("dragstart",m),window.addEventListener("dragend",y),{destroy(){window.removeEventListener("dragstart",m),window.removeEventListener("dragend",y)}}},props:{handleDOMEvents:{drop:(p,m)=>{if(i=r===p.dom.parentElement,l=m,!i){const y=of;y!=null&&y.isEditable&&setTimeout(()=>{const x=y.state.selection;x&&y.commands.deleteRange({from:x.from,to:x.to})},10)}return!1},paste:(p,m)=>{var y;const x=(y=m.clipboardData)==null?void 0:y.getData("text/html");return s=m,o=!!(x!=null&&x.includes("data-pm-slice")),!1}}},appendTransaction:(p,m,y)=>{const x=p[0],b=x.getMeta("uiEvent")==="paste"&&!o,w=x.getMeta("uiEvent")==="drop"&&!i,E=x.getMeta("applyPasteRules"),_=!!E;if(!b&&!w&&!_)return;if(_){let{text:N}=E;typeof N=="string"?N=N:N=Cc(re.from(N),y.schema);const{from:D}=E,O=D+N.length,I=CB(N);return u({rule:h,state:y,from:D,to:{b:O},pasteEvt:I})}const A=m.doc.content.findDiffStart(y.doc.content),M=m.doc.content.findDiffEnd(y.doc.content);if(!(!cB(A)||!M||A===M.b))return u({rule:h,state:y,from:A,to:M,pasteEvt:s})}}))}var yp=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Z4(t),this.schema=_$(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:lu(e.name,this.schema)},r=Te(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Cu([...this.extensions].reverse()).flatMap(r=>{const o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:lu(r.name,this.schema)},i=[],s=Te(r,"addKeyboardShortcuts",o);let l={};if(r.type==="mark"&&Te(r,"exitable",o)&&(l.ArrowRight=()=>cr.handleExit({editor:t,mark:r})),s){const m=Object.fromEntries(Object.entries(s()).map(([y,x])=>[y,()=>x({editor:t})]));l={...l,...m}}const u=Tz(l);i.push(u);const d=Te(r,"addInputRules",o);if(Jw(r,t.options.enableInputRules)&&d){const m=d();if(m&&m.length){const y=bB({editor:t,rules:m}),x=Array.isArray(y)?y:[y];i.push(...x)}}const h=Te(r,"addPasteRules",o);if(Jw(r,t.options.enablePasteRules)&&h){const m=h();if(m&&m.length){const y=SB({editor:t,rules:m});i.push(...y)}}const p=Te(r,"addProseMirrorPlugins",o);if(p){const m=p();i.push(...m)}return i})}get attributes(){return G4(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=ul(this.extensions);return Object.fromEntries(e.filter(n=>!!Te(n,"addNodeView")).map(n=>{const r=this.attributes.filter(u=>u.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Bt(n.name,this.schema)},i=Te(n,"addNodeView",o);if(!i)return[];const s=i();if(!s)return[];const l=(u,d,h,p,m)=>{const y=ec(u,r);return s({node:u,view:d,getPos:h,decorations:p,innerDecorations:m,editor:t,extension:n,HTMLAttributes:y})};return[n.name,l]}))}dispatchTransaction(t){const{editor:e}=this;return Cu([...this.extensions].reverse()).reduceRight((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:lu(o.name,this.schema)},s=Te(o,"dispatchTransaction",i);return s?l=>{s.call(i,{transaction:l,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Cu([...this.extensions]).reduce((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:lu(o.name,this.schema)},s=Te(o,"transformPastedHTML",i);return s?(l,u)=>{const d=r(l,u);return s.call(i,d)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=ul(this.extensions);return Object.fromEntries(e.filter(n=>!!Te(n,"addMarkView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:li(n.name,this.schema)},i=Te(n,"addMarkView",o);if(!i)return[];const s=(l,u,d)=>{const h=ec(l,r);return i()({mark:l,view:u,inline:d,editor:t,extension:n,HTMLAttributes:h,updateAttributes:p=>{xB(l,t,p)}})};return[n.name,s]}))}destroy(){this.extensions.forEach(t=>{let e=t;for(;e.parent;){const n=e.parent;n.child===e&&(n.child=null),e=n}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n,r;const o={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:lu(e.name,this.schema)};e.type==="mark"&&(((n=at(Te(e,"keepOnSplit",o)))==null||n)&&this.splittableMarks.push(e.name),(r=at(Te(e,"clearable",o)))==null||r||this.nonClearableMarks.push(e.name));const i=Te(e,"onBeforeCreate",o),s=Te(e,"onCreate",o),l=Te(e,"onUpdate",o),u=Te(e,"onSelectionUpdate",o),d=Te(e,"onTransaction",o),h=Te(e,"onFocus",o),p=Te(e,"onBlur",o),m=Te(e,"onDestroy",o);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),l&&this.editor.on("update",l),u&&this.editor.on("selectionUpdate",u),d&&this.editor.on("transaction",d),h&&this.editor.on("focus",h),p&&this.editor.on("blur",p),m&&this.editor.on("destroy",m)})}};yp.resolve=Z4;yp.sort=Cu;yp.flatten=mx;var s6={};fx(s6,{ClipboardTextSerializer:()=>l6,Commands:()=>u6,Delete:()=>c6,Drop:()=>d6,Editable:()=>f6,FocusEvents:()=>p6,Keymap:()=>m6,Paste:()=>g6,Tabindex:()=>y6,TextDirection:()=>x6,focusEventsPluginKey:()=>h6});var Ct=class a6 extends kx{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new a6(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},l6=Ct.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new wt({key:new Vt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,i=Y4(n),{blockSeparator:s}=this.options,l={...s!==void 0?{blockSeparator:s}:{},textSerializers:i};return[...o.ranges].sort((d,h)=>d.$from.pos-h.$from.pos).map(({$from:d,$to:h})=>J4(r,{from:d.pos,to:h.pos},l)).join(s??`
|
|
418
|
-
|
|
419
|
-
`)}}})]}}),u6=Ct.create({name:"commands",addCommands(){return{...F4}}}),c6=Ct.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,o;const i=()=>{var s,l,u,d;if((d=(u=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:u.call(l,t))!=null?d:t.getMeta("y-sync$"))return;const h=q4(t.before,[t,...e]);gx(h).forEach(y=>{h.mapping.mapResult(y.oldRange.from).deletedAfter&&h.mapping.mapResult(y.oldRange.to).deletedBefore&&h.before.nodesBetween(y.oldRange.from,y.oldRange.to,(x,b)=>{const w=b+x.nodeSize-2,E=y.oldRange.from<=b&&w<=y.oldRange.to;this.editor.emit("delete",{type:"node",node:x,from:b,to:w,newFrom:h.mapping.map(b),newTo:h.mapping.map(w),deletedRange:y.oldRange,newRange:y.newRange,partial:!E,editor:this.editor,transaction:t,combinedTransform:h})})});const m=h.mapping;h.steps.forEach((y,x)=>{var b,w;if(y instanceof Br){const E=m.slice(x).map(y.from,-1),_=m.slice(x).map(y.to),A=m.invert().map(E,-1),M=m.invert().map(_),N=E>0?(b=h.doc.nodeAt(E-1))==null?void 0:b.marks.some(O=>O.eq(y.mark)):!1,D=(w=h.doc.nodeAt(_))==null?void 0:w.marks.some(O=>O.eq(y.mark));this.editor.emit("delete",{type:"mark",mark:y.mark,from:y.from,to:y.to,deletedRange:{from:A,to:M},newRange:{from:E,to:_},partial:!!(D||N),editor:this.editor,transaction:t,combinedTransform:h})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),d6=Ct.create({name:"drop",addProseMirrorPlugins(){return[new wt({key:new Vt("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),f6=Ct.create({name:"editable",addProseMirrorPlugins(){return[new wt({key:new Vt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),h6=new Vt("focusEvents"),p6=Ct.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new wt({key:h6,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),m6=Ct.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:u,doc:d}=l,{empty:h,$anchor:p}=u,{pos:m,parent:y}=p,x=p.parent.isTextblock&&m>0?l.doc.resolve(m-1):p,b=x.parent.type.spec.isolating,w=p.pos-p.parentOffset,E=b&&x.parent.childCount===1?w===p.pos:Ve.atStart(d).from===m;return!h||!y.type.isTextblock||y.textContent.length||!E||E&&p.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Yf()||U4()?i:o},addProseMirrorPlugins(){return[new wt({key:new Vt("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(b=>b.getMeta("composition")))return;const r=t.some(b=>b.docChanged)&&!e.doc.eq(n.doc),o=t.some(b=>b.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:l}=e.selection,u=Ve.atStart(e.doc).from,d=Ve.atEnd(e.doc).to;if(i||!(s===u&&l===d)||!Sc(n.doc))return;const m=n.tr,y=hp({state:n,transaction:m}),{commands:x}=new pp({editor:this.editor,state:y});if(x.clearNodes(),!!m.steps.length)return m}})]}}),g6=Ct.create({name:"paste",addProseMirrorPlugins(){return[new wt({key:new Vt("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),y6=Ct.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new wt({key:new Vt("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!=null?t:"0"}}}})]}}),x6=Ct.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=ul(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new wt({key:new Vt("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),EB=class gu{constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}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 e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=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}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new gu(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new gu(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new gu(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=n.isInline,l=this.pos+r+(i?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;const u=this.resolvedPos.doc.resolve(l);if(!o&&!s&&u.depth<=this.depth)return;const d=new gu(u,this.editor,o,o||s?n:null);o&&(d.actualDepth=this.depth+1),e.push(d)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let l=0;l<s.length;l+=1){const u=s[l];if(i[u]!==n[u])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(u=>n[u]===s.node.attrs[u])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},_B=`.ProseMirror {
|
|
420
|
-
position: relative;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.ProseMirror {
|
|
424
|
-
word-wrap: break-word;
|
|
425
|
-
white-space: pre-wrap;
|
|
426
|
-
white-space: break-spaces;
|
|
427
|
-
-webkit-font-variant-ligatures: none;
|
|
428
|
-
font-variant-ligatures: none;
|
|
429
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.ProseMirror [contenteditable="false"] {
|
|
433
|
-
white-space: normal;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
437
|
-
white-space: pre-wrap;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.ProseMirror pre {
|
|
441
|
-
white-space: pre-wrap;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
img.ProseMirror-separator {
|
|
445
|
-
display: inline !important;
|
|
446
|
-
border: none !important;
|
|
447
|
-
margin: 0 !important;
|
|
448
|
-
width: 0 !important;
|
|
449
|
-
height: 0 !important;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.ProseMirror-gapcursor {
|
|
453
|
-
display: none;
|
|
454
|
-
pointer-events: none;
|
|
455
|
-
position: absolute;
|
|
456
|
-
margin: 0;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.ProseMirror-gapcursor:after {
|
|
460
|
-
content: "";
|
|
461
|
-
display: block;
|
|
462
|
-
position: absolute;
|
|
463
|
-
top: -2px;
|
|
464
|
-
width: 20px;
|
|
465
|
-
border-top: 1px solid black;
|
|
466
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
@keyframes ProseMirror-cursor-blink {
|
|
470
|
-
to {
|
|
471
|
-
visibility: hidden;
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.ProseMirror-hideselection *::selection {
|
|
476
|
-
background: transparent;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
480
|
-
background: transparent;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.ProseMirror-hideselection * {
|
|
484
|
-
caret-color: transparent;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
488
|
-
display: block;
|
|
489
|
-
}`,TB=class extends aB{constructor(t={}){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:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:L$,createMappablePosition:F$},this.setOptions(t),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:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);const e=this.createDoc();if(!this.editorState){const n=A1(e,this.options.autofocus);this.editorState=Os.create({doc:e,schema:this.schema,selection:n||void 0})}this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(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){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}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(){this.options.injectCSS&&typeof document<"u"&&(this.css=uB(_B,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=K4(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(o=>{const i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e,n,r;const i=[...this.options.enableCoreExtensions?[f6,l6.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),u6,p6,m6,y6.configure({value:(r=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:r.value}),d6,g6,c6,x6.configure({direction:this.options.textDirection})].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new yp(i,this)}createCommandManager(){this.commandManager=new pp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=M1(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;const n=M1(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Os.create({doc:n,schema:this.schema,selection:A1(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),o=n?this.extensionManager.dispatchTransaction(r):r,i=e.transformPastedHTML,s=this.extensionManager.transformPastedHTML(i);this.editorView=new j4(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:o,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();const u=this.view.dom;u.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(d=>{var h;return(h=this.capturedTransaction)==null?void 0:h.step(d)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),o=n.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!o)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const s=n.findLast(d=>d.getMeta("focus")||d.getMeta("blur")),l=s==null?void 0:s.getMeta("focus"),u=s==null?void 0:s.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),u&&this.emit("blur",{editor:this,event:u.event,transaction:s}),!(t.getMeta("preventUpdate")||!n.some(d=>d.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return X4(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return I$(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Cc(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
|
|
490
|
-
|
|
491
|
-
`,textSerializers:n={}}=t||{};return A$(this.state.doc,{blockSeparator:e,textSerializers:{...Y4(this.schema),...n}})}get isEmpty(){return Sc(this.state.doc)}destroy(){this.destroyed||(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 t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new EB(e,this,!1,n)}get $doc(){return this.$pos(0)}};function na(t){return new Ec({find:t.find,handler:({state:e,range:n,match:r})=>{const o=at(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],l=r[0];if(s){const u=l.search(/\S/),d=n.from+l.indexOf(s),h=d+s.length;if(yx(n.from,n.to,e.doc).filter(y=>y.mark.type.excluded.find(b=>b===t.type&&b!==y.mark.type)).filter(y=>y.to>d).length)return null;h<n.to&&i.delete(h,n.to),d>n.from&&i.delete(n.from+u,d);const m=n.from+u+s.length;i.addMark(n.from+u,m,t.type.create(o||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function AB(t){return new Ec({find:t.find,handler:({state:e,range:n,match:r})=>{const o=at(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let l=n.to;const u=t.type.create(o);if(r[1]){const d=r[0].lastIndexOf(r[1]);let h=s+d;h>l?h=l:l=h+r[1].length;const p=r[0][r[0].length-1];i.insertText(p,s+r[0].length-1),i.replaceWith(h,l,u)}else if(r[0]){const d=t.type.isInline?s:s-1;i.insert(d,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function R1(t){return new Ec({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=at(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function cl(t){return new Ec({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=at(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),u=s.doc.resolve(n.from).blockRange(),d=u&&Yy(u,t.type,i);if(!d)return null;if(s.wrap(u,d),t.keepMarks&&t.editor){const{selection:p,storedMarks:m}=e,{splittableMarks:y}=t.editor.extensionManager,x=m||p.$to.parentOffset&&p.$from.marks();if(x){const b=x.filter(w=>y.includes(w.type.name));s.ensureMarks(b)}}if(t.keepAttributes){const p=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(p,i).run()}const h=s.doc.resolve(n.from-1).nodeBefore;h&&h.type===t.type&&cs(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,h))&&s.join(n.from-1)},undoable:t.undoable})}var ft=class v6 extends kx{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new v6(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function is(t){return new i6({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=at(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,l=r[r.length-1],u=r[0];let d=n.to;if(l){const h=u.search(/\S/),p=n.from+u.indexOf(l),m=p+l.length;if(yx(n.from,n.to,e.doc).filter(b=>b.mark.type.excluded.find(E=>E===t.type&&E!==b.mark.type)).filter(b=>b.to>p).length)return null;m<n.to&&s.delete(m,n.to),p>n.from&&s.delete(n.from+h,p),d=n.from+h+l.length,s.addMark(n.from+h,d,t.type.create(i||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||s.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:MB,getOwnPropertySymbols:NB}=Object,{hasOwnProperty:DB}=Object.prototype;function ng(t,e){return function(r,o,i){return t(r,o,i)&&e(r,o,i)}}function sf(t){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,o);const{cache:i}=o,s=i.get(n),l=i.get(r);if(s&&l)return s===r&&l===n;i.set(n,r),i.set(r,n);const u=t(n,r,o);return i.delete(n),i.delete(r),u}}function RB(t){return t!=null?t[Symbol.toStringTag]:void 0}function Qw(t){return MB(t).concat(NB(t))}const OB=Object.hasOwn||((t,e)=>DB.call(t,e));function ca(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const IB="__v",PB="__o",jB="_owner",{getOwnPropertyDescriptor:eC,keys:tC}=Object;function LB(t,e){return t.byteLength===e.byteLength&&Xf(new Uint8Array(t),new Uint8Array(e))}function FB(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function zB(t,e){return t.byteLength===e.byteLength&&Xf(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function $B(t,e){return ca(t.getTime(),e.getTime())}function BB(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function VB(t,e){return t===e}function nC(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const o=new Array(r),i=t.entries();let s,l,u=0;for(;(s=i.next())&&!s.done;){const d=e.entries();let h=!1,p=0;for(;(l=d.next())&&!l.done;){if(o[p]){p++;continue}const m=s.value,y=l.value;if(n.equals(m[0],y[0],u,p,t,e,n)&&n.equals(m[1],y[1],m[0],y[0],t,e,n)){h=o[p]=!0;break}p++}if(!h)return!1;u++}return!0}const HB=ca;function UB(t,e,n){const r=tC(t);let o=r.length;if(tC(e).length!==o)return!1;for(;o-- >0;)if(!b6(t,e,n,r[o]))return!1;return!0}function uu(t,e,n){const r=Qw(t);let o=r.length;if(Qw(e).length!==o)return!1;let i,s,l;for(;o-- >0;)if(i=r[o],!b6(t,e,n,i)||(s=eC(t,i),l=eC(e,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function WB(t,e){return ca(t.valueOf(),e.valueOf())}function qB(t,e){return t.source===e.source&&t.flags===e.flags}function rC(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const o=new Array(r),i=t.values();let s,l;for(;(s=i.next())&&!s.done;){const u=e.values();let d=!1,h=0;for(;(l=u.next())&&!l.done;){if(!o[h]&&n.equals(s.value,l.value,s.value,l.value,t,e,n)){d=o[h]=!0;break}h++}if(!d)return!1}return!0}function Xf(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function KB(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function b6(t,e,n,r){return(r===jB||r===PB||r===IB)&&(t.$$typeof||e.$$typeof)?!0:OB(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const GB="[object ArrayBuffer]",ZB="[object Arguments]",JB="[object Boolean]",YB="[object DataView]",XB="[object Date]",QB="[object Error]",eV="[object Map]",tV="[object Number]",nV="[object Object]",rV="[object RegExp]",oV="[object Set]",iV="[object String]",sV={"[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},aV="[object URL]",lV=Object.prototype.toString;function uV({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:d,areRegExpsEqual:h,areSetsEqual:p,areTypedArraysEqual:m,areUrlsEqual:y,unknownTagComparators:x}){return function(w,E,_){if(w===E)return!0;if(w==null||E==null)return!1;const A=typeof w;if(A!==typeof E)return!1;if(A!=="object")return A==="number"?l(w,E,_):A==="function"?i(w,E,_):!1;const M=w.constructor;if(M!==E.constructor)return!1;if(M===Object)return u(w,E,_);if(Array.isArray(w))return e(w,E,_);if(M===Date)return r(w,E,_);if(M===RegExp)return h(w,E,_);if(M===Map)return s(w,E,_);if(M===Set)return p(w,E,_);const N=lV.call(w);if(N===XB)return r(w,E,_);if(N===rV)return h(w,E,_);if(N===eV)return s(w,E,_);if(N===oV)return p(w,E,_);if(N===nV)return typeof w.then!="function"&&typeof E.then!="function"&&u(w,E,_);if(N===aV)return y(w,E,_);if(N===QB)return o(w,E,_);if(N===ZB)return u(w,E,_);if(sV[N])return m(w,E,_);if(N===GB)return t(w,E,_);if(N===YB)return n(w,E,_);if(N===JB||N===tV||N===iV)return d(w,E,_);if(x){let D=x[N];if(!D){const O=RB(w);O&&(D=x[O])}if(D)return D(w,E,_)}return!1}}function cV({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:LB,areArraysEqual:n?uu:FB,areDataViewsEqual:zB,areDatesEqual:$B,areErrorsEqual:BB,areFunctionsEqual:VB,areMapsEqual:n?ng(nC,uu):nC,areNumbersEqual:HB,areObjectsEqual:n?uu:UB,arePrimitiveWrappersEqual:WB,areRegExpsEqual:qB,areSetsEqual:n?ng(rC,uu):rC,areTypedArraysEqual:n?ng(Xf,uu):Xf,areUrlsEqual:KB,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const o=sf(r.areArraysEqual),i=sf(r.areMapsEqual),s=sf(r.areObjectsEqual),l=sf(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return r}function dV(t){return function(e,n,r,o,i,s,l){return t(e,n,l)}}function fV({circular:t,comparator:e,createState:n,equals:r,strict:o}){if(n)return function(l,u){const{cache:d=t?new WeakMap:void 0,meta:h}=n();return e(l,u,{cache:d,equals:r,meta:h,strict:o})};if(t)return function(l,u){return e(l,u,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};const i={cache:void 0,equals:r,meta:void 0,strict:o};return function(l,u){return e(l,u,i)}}const hV=fs();fs({strict:!0});fs({circular:!0});fs({circular:!0,strict:!0});fs({createInternalComparator:()=>ca});fs({strict:!0,createInternalComparator:()=>ca});fs({circular:!0,createInternalComparator:()=>ca});fs({circular:!0,createInternalComparator:()=>ca,strict:!0});function fs(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:o=!1}=t,i=cV(t),s=uV(i),l=n?n(s):dV(s);return fV({circular:e,comparator:s,createState:r,equals:l,strict:o})}var rg={exports:{}},og={};/**
|
|
492
|
-
* @license React
|
|
493
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
494
|
-
*
|
|
495
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
496
|
-
*
|
|
497
|
-
* This source code is licensed under the MIT license found in the
|
|
498
|
-
* LICENSE file in the root directory of this source tree.
|
|
499
|
-
*/var oC;function pV(){if(oC)return og;oC=1;var t=fc(),e=o_();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,l=t.useMemo,u=t.useDebugValue;return og.useSyncExternalStoreWithSelector=function(d,h,p,m,y){var x=i(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=l(function(){function E(D){if(!_){if(_=!0,A=D,D=m(D),y!==void 0&&b.hasValue){var O=b.value;if(y(O,D))return M=O}return M=D}if(O=M,r(A,D))return O;var I=m(D);return y!==void 0&&y(O,I)?(A=D,O):(A=D,M=I)}var _=!1,A,M,N=p===void 0?null:p;return[function(){return E(h())},N===null?void 0:function(){return E(N())}]},[h,p,m,y]);var w=o(d,x[0],x[1]);return s(function(){b.hasValue=!0,b.value=w},[w]),u(w),w},og}var iC;function mV(){return iC||(iC=1,rg.exports=pV()),rg.exports}var gV=mV(),yV=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},xV=({contentComponent:t})=>{const e=i_.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return v.jsx(v.Fragment,{children:Object.values(e)})};function vV(){const t=new Set;let e={},n=!1;const r=()=>{n||!t.size||(n=!0,queueMicrotask(()=>{n=!1,t.forEach(o=>o())}))};return{subscribe(o){return t.add(o),()=>{t.delete(o)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(o,i){e={...e,[o]:kS.createPortal(i.reactElement,i.element,o)},r()},removeRenderer(o){const i={...e};delete i[o],e=i,r()}}}var bV=class extends te.Component{constructor(t){super(t),this.editorContentRef=te.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=vV(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:yV(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&v.jsx(xV,{contentComponent:t.contentComponent})]})}},kV=S.forwardRef((t,e)=>{const n=te.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return te.createElement(bV,{key:n,innerRef:e,...t})}),k6=te.memo(kV),wV=typeof window<"u"?S.useLayoutEffect:S.useEffect,CV=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,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(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let e;const n=o=>{(o==null?void 0:o.transaction)!==void 0&&o.transaction===e||(e=o==null?void 0:o.transaction,this.transactionNumber+=1,this.subscribers.forEach(i=>i()))},r=this.editor;return r.on("transaction",n),r.on("update",n),()=>{r.off("transaction",n),r.off("update",n)}}}};function SV(t){var e;const[n]=S.useState(()=>new CV(t.editor)),r=gV.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:hV);return wV(()=>n.watch(t.editor),[t.editor,n]),S.useDebugValue(r),r}var EV=!1,w6=typeof window>"u",_V=w6||!!(typeof window<"u"&&window.next),TV=class C6{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,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(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){const e=this.options.current.immediatelyRender;let n=e??!0;return w6?(n&&EV&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):_V&&e===void 0&&(n=!1),n?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)},onMount:(...r)=>{var o,i;return(i=(o=this.options.current).onMount)==null?void 0:i.call(o,...r)},onUnmount:(...r)=>{var o,i;return(i=(o=this.options.current).onUnmount)==null?void 0:i.call(o,...r)}};return new TB(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?C6.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function AV(t={},e=[]){const n=S.useRef(t);n.current=t;const[r]=S.useState(()=>new TV(n)),o=i_.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return S.useDebugValue(o),S.useEffect(r.onRender(e)),SV({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),o}var S6=S.createContext({editor:null});S6.Consumer;var MV=S.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),NV=()=>S.useContext(MV);te.forwardRef((t,e)=>{const{onDragStart:n}=NV(),r=t.as||"div";return v.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});te.createContext({markViewContentRef:()=>{}});var wx=S.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});wx.displayName="TiptapContext";var DV=()=>S.useContext(wx);function E6({children:t,...e}){const n="editor"in e?e.editor:e.instance;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const r=S.useMemo(()=>({editor:n}),[n]),o=S.useMemo(()=>({editor:n}),[n]);return v.jsx(S6.Provider,{value:o,children:v.jsx(wx.Provider,{value:r,children:t})})}E6.displayName="Tiptap";function _6({...t}){const{editor:e}=DV();return v.jsx(k6,{editor:e,...t})}_6.displayName="Tiptap.Content";Object.assign(E6,{Content:_6});var Qf=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},RV=(t,e)=>{var n;const{state:r,view:o}=t,{selection:i}=r;if(!i.empty)return!1;const{$from:s}=i;if(s.parentOffset!==0)return!1;const l=s.depth-1;if(l<0)return!1;const u=s.node(l),d=s.index(l);if(d===0)return!1;if(u.type===e)return t.commands.lift(e.name);const h=u.child(d-1);if(h.type!==e||!((n=h.lastChild)!=null&&n.isTextblock))return!1;const p=s.before(),y=p-1-1,{tr:x}=r;return x.delete(p,s.after()).insert(y,s.parent.content),x.setSelection(je.create(x.doc,y)),o.dispatch(x.scrollIntoView()),!0},OV=/^\s*>\s$/,IV=ft.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Qf("blockquote",{...Xt(this.options.HTMLAttributes,t),children:Qf("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((o,i)=>{var s,l;const h=((l=(s=e.renderChild)==null?void 0:s.call(e,o,i))!=null?l:e.renderChildren([o])).split(`
|
|
500
|
-
`).map(p=>p.trim()===""?n:`${n} ${p}`);r.push(h.join(`
|
|
501
|
-
`))}),r.join(`
|
|
502
|
-
${n}
|
|
503
|
-
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>RV(this.editor,this.type)}},addInputRules(){return[cl({find:OV,type:this.type})]}}),PV=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,jV=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,LV=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,FV=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,zV=cr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Qf("strong",{...Xt(this.options.HTMLAttributes,t),children:Qf("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[na({find:PV,type:this.type}),na({find:LV,type:this.type})]},addPasteRules(){return[is({find:jV,type:this.type}),is({find:FV,type:this.type})]}}),$V=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},BV=t=>{const e=/`([^`]+)`(?!`)/g,n=[];let r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},VV=cr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Xt(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[na({find:$V,type:this.type})]},addPasteRules(){return[is({find:BV,type:this.type})]}}),ig=4,HV=/^```([a-z]+)?[\s\n]$/,UV=/^~~~([a-z]+)?[\s\n]$/,WV=ft.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:ig,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Xt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const o=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
|
|
504
|
-
`):r=`\`\`\`${o}
|
|
505
|
-
|
|
506
|
-
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:ig,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;const l=" ".repeat(n);return s?t.commands.insertContent(l):t.commands.command(({tr:u})=>{const{from:d,to:h}=o,y=r.doc.textBetween(d,h,`
|
|
507
|
-
`,`
|
|
508
|
-
`).split(`
|
|
509
|
-
`).map(x=>l+x).join(`
|
|
510
|
-
`);return u.replaceWith(d,h,r.schema.text(y)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:ig,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?t.commands.command(({tr:l})=>{var u;const{pos:d}=i,h=i.start(),p=i.end(),y=r.doc.textBetween(h,p,`
|
|
511
|
-
`,`
|
|
512
|
-
`).split(`
|
|
513
|
-
`);let x=0,b=0;const w=d-h;for(let D=0;D<y.length;D+=1){if(b+y[D].length>=w){x=D;break}b+=y[D].length+1}const _=((u=y[x].match(/^ */))==null?void 0:u[0])||"",A=Math.min(_.length,n);if(A===0)return!0;let M=h;for(let D=0;D<x;D+=1)M+=y[D].length+1;return l.delete(M,M+A),d-M<=A&&l.setSelection(je.create(l.doc,M)),!0}):t.commands.command(({tr:l})=>{const{from:u,to:d}=o,m=r.doc.textBetween(u,d,`
|
|
514
|
-
`,`
|
|
515
|
-
`).split(`
|
|
516
|
-
`).map(y=>{var x;const b=((x=y.match(/^ */))==null?void 0:x[0])||"",w=Math.min(b.length,n);return y.slice(w)}).join(`
|
|
517
|
-
`);return l.replaceWith(u,d,r.schema.text(m)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
|
|
518
|
-
|
|
519
|
-
`);return!i||!s?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type||r.parentOffset!==0)return!1;const i=r.before();return i>0?!1:t.commands.insertDefaultBlock({pos:i})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:d})=>(d.setSelection(Ve.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[R1({find:HV,type:this.type,getAttributes:t=>({language:t[1]})}),R1({find:UV,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new wt({key:new Vt("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:s,schema:l}=t.state,u=l.text(n.replace(/\r\n?/g,`
|
|
520
|
-
`));return s.replaceSelectionWith(this.type.create({language:i},u)),s.selection.$from.parent.type!==this.type&&s.setSelection(je.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),qV=ft.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
521
|
-
|
|
522
|
-
`):""}),KV=ft.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Xt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
523
|
-
`},renderMarkdown:()=>`
|
|
524
|
-
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,u=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:h})=>{if(h&&u&&s){const p=u.filter(m=>l.includes(m.type.name));d.ensureMarks(p)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),GV=ft.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(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Xt(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>R1({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),ZV=ft.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Xt(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!lB(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,o=t();return Q4(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){const{$to:u}=s.selection,d=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(je.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(Re.create(s.doc,u.pos)):s.setSelection(je.create(s.doc,u.pos));else{const h=i.schema.nodes[this.options.nextNodeType]||u.parent.type.contentMatch.defaultType,p=h==null?void 0:h.create();p&&(s.insert(d,p),s.setSelection(je.create(s.doc,d+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[AB({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),JV=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,YV=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,XV=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,QV=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,eH=cr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Xt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[na({find:JV,type:this.type}),na({find:XV,type:this.type})]},addPasteRules(){return[is({find:YV,type:this.type}),is({find:QV,type:this.type})]}});const tH="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",nH="ελ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",O1="numeric",I1="ascii",P1="alpha",Su="asciinumeric",yu="alphanumeric",j1="domain",T6="emoji",rH="scheme",oH="slashscheme",sg="whitespace";function iH(t,e){return t in e||(e[t]=[]),e[t]}function Ls(t,e,n){e[O1]&&(e[Su]=!0,e[yu]=!0),e[I1]&&(e[Su]=!0,e[P1]=!0),e[Su]&&(e[yu]=!0),e[P1]&&(e[yu]=!0),e[yu]&&(e[j1]=!0),e[T6]&&(e[j1]=!0);for(const r in e){const o=iH(r,n);o.indexOf(t)<0&&o.push(t)}}function sH(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Zn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Zn.groups={};Zn.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||Zn.groups;let o;return e&&e.j?o=e:(o=new Zn(e),n&&r&&Ls(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||Zn.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,l=o.go(t);if(l?(s=new Zn,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new Zn,i){if(r)if(s.t&&typeof s.t=="string"){const u=Object.assign(sH(s.t,r),n);Ls(i,u,r)}else n&&Ls(i,n,r);s.t=i}return o.j[t]=s,s}};const He=(t,e,n,r,o)=>t.ta(e,n,r,o),Nt=(t,e,n,r,o)=>t.tr(e,n,r,o),sC=(t,e,n,r,o)=>t.ts(e,n,r,o),le=(t,e,n,r,o)=>t.tt(e,n,r,o),Vo="WORD",L1="UWORD",A6="ASCIINUMERICAL",M6="ALPHANUMERICAL",tc="LOCALHOST",F1="TLD",z1="UTLD",Ef="SCHEME",Wa="SLASH_SCHEME",Cx="NUM",$1="WS",Sx="NL",Eu="OPENBRACE",_u="CLOSEBRACE",eh="OPENBRACKET",th="CLOSEBRACKET",nh="OPENPAREN",rh="CLOSEPAREN",oh="OPENANGLEBRACKET",ih="CLOSEANGLEBRACKET",sh="FULLWIDTHLEFTPAREN",ah="FULLWIDTHRIGHTPAREN",lh="LEFTCORNERBRACKET",uh="RIGHTCORNERBRACKET",ch="LEFTWHITECORNERBRACKET",dh="RIGHTWHITECORNERBRACKET",fh="FULLWIDTHLESSTHAN",hh="FULLWIDTHGREATERTHAN",ph="AMPERSAND",mh="APOSTROPHE",gh="ASTERISK",Pi="AT",yh="BACKSLASH",xh="BACKTICK",vh="CARET",Fs="COLON",Ex="COMMA",bh="DOLLAR",io="DOT",kh="EQUALS",_x="EXCLAMATION",kr="HYPHEN",Tu="PERCENT",wh="PIPE",Ch="PLUS",Sh="POUND",Au="QUERY",Tx="QUOTE",N6="FULLWIDTHMIDDLEDOT",Ax="SEMI",so="SLASH",Mu="TILDE",Eh="UNDERSCORE",D6="EMOJI",_h="SYM";var R6=Object.freeze({__proto__:null,ALPHANUMERICAL:M6,AMPERSAND:ph,APOSTROPHE:mh,ASCIINUMERICAL:A6,ASTERISK:gh,AT:Pi,BACKSLASH:yh,BACKTICK:xh,CARET:vh,CLOSEANGLEBRACKET:ih,CLOSEBRACE:_u,CLOSEBRACKET:th,CLOSEPAREN:rh,COLON:Fs,COMMA:Ex,DOLLAR:bh,DOT:io,EMOJI:D6,EQUALS:kh,EXCLAMATION:_x,FULLWIDTHGREATERTHAN:hh,FULLWIDTHLEFTPAREN:sh,FULLWIDTHLESSTHAN:fh,FULLWIDTHMIDDLEDOT:N6,FULLWIDTHRIGHTPAREN:ah,HYPHEN:kr,LEFTCORNERBRACKET:lh,LEFTWHITECORNERBRACKET:ch,LOCALHOST:tc,NL:Sx,NUM:Cx,OPENANGLEBRACKET:oh,OPENBRACE:Eu,OPENBRACKET:eh,OPENPAREN:nh,PERCENT:Tu,PIPE:wh,PLUS:Ch,POUND:Sh,QUERY:Au,QUOTE:Tx,RIGHTCORNERBRACKET:uh,RIGHTWHITECORNERBRACKET:dh,SCHEME:Ef,SEMI:Ax,SLASH:so,SLASH_SCHEME:Wa,SYM:_h,TILDE:Mu,TLD:F1,UNDERSCORE:Eh,UTLD:z1,UWORD:L1,WORD:Vo,WS:$1});const zo=/[a-z]/,cu=new RegExp("\\p{L}","u"),ag=new RegExp("\\p{Emoji}","u"),$o=/\d/,lg=/\s/,aC="\r",ug=`
|
|
525
|
-
`,aH="️",lH="",cg="";let af=null,lf=null;function uH(t=[]){const e={};Zn.groups=e;const n=new Zn;af==null&&(af=lC(tH)),lf==null&&(lf=lC(nH)),le(n,"'",mh),le(n,"{",Eu),le(n,"}",_u),le(n,"[",eh),le(n,"]",th),le(n,"(",nh),le(n,")",rh),le(n,"<",oh),le(n,">",ih),le(n,"(",sh),le(n,")",ah),le(n,"「",lh),le(n,"」",uh),le(n,"『",ch),le(n,"』",dh),le(n,"<",fh),le(n,">",hh),le(n,"&",ph),le(n,"*",gh),le(n,"@",Pi),le(n,"`",xh),le(n,"^",vh),le(n,":",Fs),le(n,",",Ex),le(n,"$",bh),le(n,".",io),le(n,"=",kh),le(n,"!",_x),le(n,"-",kr),le(n,"%",Tu),le(n,"|",wh),le(n,"+",Ch),le(n,"#",Sh),le(n,"?",Au),le(n,'"',Tx),le(n,"/",so),le(n,";",Ax),le(n,"~",Mu),le(n,"_",Eh),le(n,"\\",yh),le(n,"・",N6);const r=Nt(n,$o,Cx,{[O1]:!0});Nt(r,$o,r);const o=Nt(r,zo,A6,{[Su]:!0}),i=Nt(r,cu,M6,{[yu]:!0}),s=Nt(n,zo,Vo,{[I1]:!0});Nt(s,$o,o),Nt(s,zo,s),Nt(o,$o,o),Nt(o,zo,o);const l=Nt(n,cu,L1,{[P1]:!0});Nt(l,zo),Nt(l,$o,i),Nt(l,cu,l),Nt(i,$o,i),Nt(i,zo),Nt(i,cu,i);const u=le(n,ug,Sx,{[sg]:!0}),d=le(n,aC,$1,{[sg]:!0}),h=Nt(n,lg,$1,{[sg]:!0});le(n,cg,h),le(d,ug,u),le(d,cg,h),Nt(d,lg,h),le(h,aC),le(h,ug),Nt(h,lg,h),le(h,cg,h);const p=Nt(n,ag,D6,{[T6]:!0});le(p,"#"),Nt(p,ag,p),le(p,aH,p);const m=le(p,lH);le(m,"#"),Nt(m,ag,p);const y=[[zo,s],[$o,o]],x=[[zo,null],[cu,l],[$o,i]];for(let b=0;b<af.length;b++)Di(n,af[b],F1,Vo,y);for(let b=0;b<lf.length;b++)Di(n,lf[b],z1,L1,x);Ls(F1,{tld:!0,ascii:!0},e),Ls(z1,{utld:!0,alpha:!0},e),Di(n,"file",Ef,Vo,y),Di(n,"mailto",Ef,Vo,y),Di(n,"http",Wa,Vo,y),Di(n,"https",Wa,Vo,y),Di(n,"ftp",Wa,Vo,y),Di(n,"ftps",Wa,Vo,y),Ls(Ef,{scheme:!0,ascii:!0},e),Ls(Wa,{slashscheme:!0,ascii:!0},e),t=t.sort((b,w)=>b[0]>w[0]?1:-1);for(let b=0;b<t.length;b++){const w=t[b][0],_=t[b][1]?{[rH]:!0}:{[oH]:!0};w.indexOf("-")>=0?_[j1]=!0:zo.test(w)?$o.test(w)?_[Su]=!0:_[I1]=!0:_[O1]=!0,sC(n,w,w,_)}return sC(n,"localhost",tc,{ascii:!0}),n.jd=new Zn(_h),{start:n,tokens:Object.assign({groups:e},R6)}}function O6(t,e){const n=cH(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s<r;){let l=t,u=null,d=0,h=null,p=-1,m=-1;for(;s<r&&(u=l.go(n[s]));)l=u,l.accepts()?(p=0,m=0,h=l):p>=0&&(p+=n[s].length,m++),d+=n[s].length,i+=n[s].length,s++;i-=p,s-=m,d-=p,o.push({t:h.t,v:e.slice(i-d,i),s:i-d,e:i})}return o}function cH(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Di(t,e,n,r,o){let i;const s=e.length;for(let l=0;l<s-1;l++){const u=e[l];t.j[u]?i=t.j[u]:(i=new Zn(r),i.jr=o.slice(),t.j[u]=i),t=i}return i=new Zn(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function lC(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}const nc={defaultProtocol:"http",events:null,format:uC,formatHref:uC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Mx(t,e=null){let n=Object.assign({},nc);t&&(n=Object.assign(n,t instanceof Mx?t.o:t));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Mx.prototype={o:nc,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:nc[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function uC(t){return t}function I6(t,e){this.t="token",this.v=t,this.tk=e}I6.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=nc.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),u=t.get("target",n,e),d=t.get("rel",n,e),h=t.getObj("attributes",n,e),p=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),u&&(s.target=u),d&&(s.rel=d),h&&Object.assign(s,h),{tagName:o,attributes:s,content:i,eventListeners:p}}};function xp(t,e){class n extends I6{constructor(o,i){super(o,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const dH=xp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),cC=xp("text"),fH=xp("nl"),uf=xp("url",{isLink:!0,toHref(t=nc.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==tc&&t[1].t===Fs}}),br=t=>new Zn(t);function hH({groups:t}){const e=t.domain.concat([ph,gh,Pi,yh,xh,vh,bh,kh,kr,Cx,Tu,wh,Ch,Sh,so,_h,Mu,Eh]),n=[mh,Fs,Ex,io,_x,Tu,Au,Tx,Ax,oh,ih,Eu,_u,th,eh,nh,rh,sh,ah,lh,uh,ch,dh,fh,hh],r=[ph,mh,gh,yh,xh,vh,bh,kh,kr,Eu,_u,Tu,wh,Ch,Sh,Au,so,_h,Mu,Eh],o=br(),i=le(o,Mu);He(i,r,i),He(i,t.domain,i);const s=br(),l=br(),u=br();He(o,t.domain,s),He(o,t.scheme,l),He(o,t.slashscheme,u),He(s,r,i),He(s,t.domain,s);const d=le(s,Pi);le(i,Pi,d),le(l,Pi,d),le(u,Pi,d);const h=le(i,io);He(h,r,i),He(h,t.domain,i);const p=br();He(d,t.domain,p),He(p,t.domain,p);const m=le(p,io);He(m,t.domain,p);const y=br(dH);He(m,t.tld,y),He(m,t.utld,y),le(d,tc,y);const x=le(p,kr);le(x,kr,x),He(x,t.domain,p),He(y,t.domain,p),le(y,io,m),le(y,kr,x);const b=le(s,kr),w=le(s,io);le(b,kr,b),He(b,t.domain,s),He(w,r,i),He(w,t.domain,s);const E=br(uf);He(w,t.tld,E),He(w,t.utld,E),He(E,t.domain,s),He(E,r,i),le(E,io,w),le(E,kr,b),le(E,Pi,d);const _=le(E,Fs),A=br(uf);He(_,t.numeric,A);const M=br(uf),N=br();He(M,e,M),He(M,n,N),He(N,e,M),He(N,n,N),le(E,so,M),le(A,so,M);const D=le(l,Fs),O=le(u,Fs),I=le(O,so),L=le(I,so);He(l,t.domain,s),le(l,io,w),le(l,kr,b),He(u,t.domain,s),le(u,io,w),le(u,kr,b),He(D,t.domain,M),le(D,so,M),le(D,Au,M),He(L,t.domain,M),He(L,e,M),le(L,so,M);const W=[[Eu,_u],[eh,th],[nh,rh],[oh,ih],[sh,ah],[lh,uh],[ch,dh],[fh,hh]];for(let Y=0;Y<W.length;Y++){const[G,q]=W[Y],Z=le(M,G);le(N,G,Z);const Q=br(uf);He(Z,e,Q);const K=br();He(Z,n,K),le(Z,q,M),He(Q,e,Q),He(Q,n,K),He(K,e,Q),He(K,n,K),le(Q,q,M),le(K,q,M)}return le(o,tc,E),le(o,Sx,fH),{start:o,tokens:R6}}function pH(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let l=t,u=null,d=null,h=0,p=null,m=-1;for(;o<r&&!(u=l.go(n[o].t));)s.push(n[o++]);for(;o<r&&(d=u||l.go(n[o].t));)u=null,l=d,l.accepts()?(m=0,p=l):m>=0&&m++,o++,h++;if(m<0)o-=h,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(dg(cC,e,s)),s=[]),o-=m,h-=m;const y=p.t,x=n.slice(o-h,o);i.push(dg(y,e,x))}}return s.length>0&&i.push(dg(cC,e,s)),i}function dg(t,e,n){const r=n[0].s,o=n[n.length-1].e,i=e.slice(r,o);return new t(i,n)}const mH=typeof console<"u"&&console&&console.warn||(()=>{}),gH="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",kt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function yH(){return Zn.groups={},kt.scanner=null,kt.parser=null,kt.tokenQueue=[],kt.pluginQueue=[],kt.customSchemes=[],kt.initialized=!1,kt}function dC(t,e=!1){if(kt.initialized&&mH(`linkifyjs: already initialized - will not register custom scheme "${t}" ${gH}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
526
|
-
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
527
|
-
2. Cannot start or end with "-"
|
|
528
|
-
3. "-" cannot repeat`);kt.customSchemes.push([t,e])}function xH(){kt.scanner=uH(kt.customSchemes);for(let t=0;t<kt.tokenQueue.length;t++)kt.tokenQueue[t][1]({scanner:kt.scanner});kt.parser=hH(kt.scanner.tokens);for(let t=0;t<kt.pluginQueue.length;t++)kt.pluginQueue[t][1]({scanner:kt.scanner,parser:kt.parser});return kt.initialized=!0,kt}function Nx(t){return kt.initialized||xH(),pH(kt.parser.start,t,O6(kt.scanner.start,t))}Nx.scan=O6;function P6(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Mx(n),o=Nx(t),i=[];for(let s=0;s<o.length;s++){const l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var Dx="[\0- -\u2029 ]",vH=new RegExp(Dx),bH=new RegExp(`${Dx}$`),kH=new RegExp(Dx,"g");function wH(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function CH(t){return new wt({key:new Vt("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(d=>d.docChanged)&&!n.doc.eq(r.doc),i=e.some(d=>d.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,l=q4(n.doc,[...e]);if(gx(l).forEach(({newRange:d})=>{const h=k$(r.doc,d,y=>y.isTextblock);let p,m;if(h.length>1)p=h[0],m=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ");else if(h.length){const y=r.doc.textBetween(d.from,d.to," "," ");if(!bH.test(y))return;p=h[0],m=r.doc.textBetween(p.pos,d.to,void 0," ")}if(p&&m){const y=m.split(vH).filter(Boolean);if(y.length<=0)return!1;const x=y[y.length-1],b=p.pos+m.lastIndexOf(x);if(!x)return!1;const w=Nx(x).map(E=>E.toObject(t.defaultProtocol));if(!wH(w))return!1;w.filter(E=>E.isLink).map(E=>({...E,from:b+E.start+1,to:b+E.end+1})).filter(E=>r.schema.marks.code?!r.doc.rangeHasMark(E.from,E.to,r.schema.marks.code):!0).filter(E=>t.validate(E.value)).filter(E=>t.shouldAutoLink(E.value)).forEach(E=>{yx(E.from,E.to,r.doc).some(_=>_.mark.type===t.type)||s.addMark(E.from,E.to,t.type.create({href:E.href}))})}}),!!s.steps.length)return s}})}function SH(t){return new wt({key:new Vt("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{const u=r.target;if(!u)return!1;const d=t.editor.view.dom;s=u.closest("a"),s&&!d.contains(s)&&(s=null)}if(!s)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const u=X4(e.state,t.type.name),d=(o=s.href)!=null?o:u.href,h=(i=s.target)!=null?i:u.target;d&&(window.open(d,h),l=!0)}return l}}})}var EH=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,_H=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function j6(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function TH(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&j6(t,r)){r+=1;continue}let o=0;for(;r<e&&t[r]==="`";)o+=1,r+=1;n===0?n=o:o===n&&(n=0)}return n>0}function L6(t,e,n){var r,o;const[,i,s]=e;return(e.index?t[e.index-1]:void 0)==="!"||j6(t,(r=e.index)!=null?r:0)||TH(t,(o=e.index)!=null?o:0)?!1:!!i.trim()&&n(s)}function F6(t){var e,n;const[r,o,i,,s,l,u]=t,d=(e=s??l)!=null?e:u;return{index:(n=t.index)!=null?n:0,text:r,replaceWith:o,data:{href:i,title:d||null,markdown:!0}}}function AH(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function z6(t){var e,n,r;return{href:(e=t.data)==null?void 0:e.href,title:(r=(n=t.data)==null?void 0:n.title)!=null?r:null}}function MH(t){const e=na({find:n=>{const r=EH.exec(n);return!r||!L6(n,r,t.isAllowedHref)?null:F6(r)},type:t.type,getAttributes:z6});return new Ec({find:e.find,handler:n=>{const r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function NH(t){const e=is({find:n=>{var r,o;const i=[];for(const l of n.matchAll(_H))L6(n,l,t.isAllowedHref)&&i.push(F6(l));const s=((o=(r=t.findPlainUrls)==null?void 0:r.call(t,n))!=null?o:[]).filter(l=>!i.some(u=>AH(u,l)));return[...i,...s]},type:t.type,getAttributes:z6});return new i6({find:e.find,handler:n=>{var r;const o=e.handler(n);return o!==null&&n.state.tr.steps.length&&((r=n.match.data)!=null&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),o}})}function DH(t){return new wt({key:new Vt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let u="";r.content.forEach(h=>{u+=h.textContent});const d=P6(u,{defaultProtocol:t.defaultProtocol}).find(h=>h.isLink&&h.value===u);return!u||!d||o!==void 0&&!o(d.value)?!1:t.editor.commands.setMark(t.type,{href:d.href})}}})}function Bo(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(kH,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var RH=cr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){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(t=>{if(typeof t=="string"){dC(t);return}dC(t.scheme,t.optionalSlashes)})},onDestroy(){yH()},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:(t,e)=>!!Bo(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const o=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){var t,e,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(t=this.options.HTMLAttributes.target)!=null?t:null},rel:{default:(e=this.options.HTMLAttributes.rel)!=null?e:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Bo(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Bo(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Xt(this.options.HTMLAttributes,t),0]:["a",Xt(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,o,i;const s=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",l=(i=(o=t.attrs)==null?void 0:o.title)!=null?i:"",u=e.renderChildren(t);return l?`[${u}](${s} "${l}")`:`[${u}](${s})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Bo(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Bo(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[MH({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:e=>!!Bo(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){const t=e=>{const n=[];if(e){const{protocols:r,defaultProtocol:o}=this.options;P6(e).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:l=>!!Bo(l,r),protocols:r,defaultProtocol:o})).forEach(s=>{this.options.shouldAutoLink(s.value)&&n.push({text:s.value,data:{href:s.href},index:s.start})})}return n};return this.options.markdownLinks?[NH({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:n=>!!Bo(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[is({find:t,type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(CH({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Bo(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(SH({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(DH({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),OH=Object.defineProperty,IH=(t,e)=>{for(var n in e)OH(t,n,{get:e[n],enumerable:!0})},PH="listItem",fC="textStyle",hC=/^\s*([-+*])\s$/,$6=ft.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:t}){return["ul",Xt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
529
|
-
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(PH,this.editor.getAttributes(fC)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=cl({find:hC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=cl({find:hC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(fC),editor:this.editor})),[t]}}),jH=(t,e,n)=>{const{selection:r}=t;if(!r.empty)return null;const{$from:o}=r;if(!o.parent.isTextblock||o.parentOffset!==o.parent.content.size)return null;let i=-1;for(let y=o.depth;y>0;y-=1)if(o.node(y).type.name===e){i=y;break}if(i<0)return null;const s=o.node(i),l=o.index(i);if(l+1>=s.childCount)return null;const u=s.child(l+1);if(!n.includes(u.type.name))return null;const d=t.schema.nodes[e];let h=!1;if(u.forEach(y=>{y.type===d&&y.childCount>1&&(h=!0)}),!h)return null;const p=t.doc.resolve(o.after()).nodeAfter;if(!p||!n.includes(p.type.name))return null;const m=[];return p.forEach(y=>{m.push(y)}),m.length===0?null:{listItemDepth:i,nestedList:p,nestedListPos:o.after(),insertPos:o.after(i),items:m}},LH=(t,e,n,r)=>{const o=jH(t,n,r);if(!o)return!1;const{selection:i}=t,{nestedList:s,nestedListPos:l,insertPos:u,items:d}=o,h=t.tr;h.delete(l,l+s.nodeSize);const p=h.mapping.map(u);return h.insert(p,re.from(d)),h.setSelection(i.map(h.doc,h.mapping)),e&&e(h),!0},FH=(t,e,n)=>LH(t.state,t.view.dispatch,e,n),B6=(t,e)=>Ct.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>FH(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),V6=[[1e3,"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"]],cf="abcdefghijklmnopqrstuvwxyz",zH="[a-zA-Z]{1,2}",H6=String.raw`\d+|[ivxlcdmIVXLCDM]+|${zH}`;function vp(t){let e=t,n="";for(const[r,o]of V6)for(;e>=r;)n+=o,e-=r;return n}function Rx(t){return vp(t).toUpperCase()}function U6(t){const e=t.toLowerCase();let n=0,r=0;for(;n<e.length;){let o=!1;for(const[i,s]of V6)if(e.startsWith(s,n)){r+=i,n+=s.length,o=!0;break}if(!o)return 0}return r}function $H(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;const e=U6(t);return e<=0?!1:(t===t.toLowerCase()?vp(e):Rx(e))===t}function BH(t){const e=t.toLowerCase();if(e.length===1)return e.charCodeAt(0)-97+1;if(e.length===2){const n=e.charCodeAt(0)-97,r=e.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function Th(t){if(t<=26)return cf[t-1];const e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?cf[n]:cf[e]+cf[n]}function bp(t){if(!(!t||/^\d+$/.test(t))){if($H(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function Ox(t){if(/^\d+$/.test(t))return parseInt(t,10);const e=bp(t);if(e==="i"||e==="I")return U6(t);if(e==="a"||e==="A"){const r=BH(t);return r>0?r:1}const n=parseInt(t,10);return Number.isNaN(n)?1:n}function VH(t,e){if(t==="numeric")return String(e);switch(t){case"a":return Th(e);case"A":return Th(e).toUpperCase();case"i":return vp(e);case"I":return Rx(e);default:return String(e)}}function HH(t){var e;if(t.length===0)return!1;const n=(e=bp(t[0]))!=null?e:"numeric",r=Ox(t[0]);if(r<1)return!1;for(let o=0;o<t.length;o++){const i=VH(n,r+o);if(t[o]!==i)return!1}return!0}function UH(t){return{type:bp(t),start:Ox(t)}}function WH(t){const{type:e,start:n}=UH(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function qH(t,e,n=". "){const r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${Th(r)}${n}`;case"A":return`${Th(r).toUpperCase()}${n}`;case"i":return`${vp(r)}${n}`;case"I":return`${Rx(r)}${n}`;default:return`${r}${n}`}}function KH(t){var e,n;const r=(e=t.tokens)==null?void 0:e[0];return!!(t.text&&((n=t.tokens)==null?void 0:n.length)===1&&(r==null?void 0:r.type)==="list"&&r.ordered&&r.raw===t.text)}function GH(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var W6=ft.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Xt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let o=[];if(t.tokens&&t.tokens.length>0){if(KH(t))return{type:"listItem",content:[{type:"paragraph",content:GH(t.text||"",e)}]};if(t.tokens.some(s=>s.type==="paragraph"))o=r(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(o=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const u=t.tokens.slice(1),d=r(u);o.push(...d)}}else o=r(t.tokens)}}return o.length===0&&(o=[{type:"paragraph",content:[]}]),{type:"listItem",content:o}},renderMarkdown:(t,e,n)=>bx(t,e,r=>{var o,i,s,l;if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){const u=((i=(o=r.meta)==null?void 0:o.parentAttrs)==null?void 0:i.start)||1,d=(l=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:l.type,h=u-1+(r.index||0);return qH(d,h,". ")}return"- "},n),addExtensions(){return[B6(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)}}}),ZH={};IH(ZH,{findListItemPos:()=>kp,getNextListDepth:()=>Ix,handleBackspace:()=>B1,handleDelete:()=>V1,hasListBefore:()=>q6,hasListItemAfter:()=>JH,hasListItemBefore:()=>YH,listItemHasSubList:()=>XH,nextListIsDeeper:()=>K6,nextListIsHigher:()=>G6});var kp=(t,e)=>{const{$from:n}=e.selection,r=Bt(t,e.schema);let o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:e.doc.resolve(s),depth:l}},Ix=(t,e)=>{const n=kp(t,e);if(!n)return!1;const[,r]=R$(e,t,n.$pos.pos+4);return r},q6=(t,e,n)=>{const{$anchor:r}=t.selection,o=Math.max(0,r.pos-2),i=t.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},B1=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!rs(t.state,e)&&q6(t.state,e,n)){const{$anchor:r}=t.state.selection,o=t.state.doc.resolve(r.before()-1),i=[];o.node().descendants((u,d)=>{u.type.name===e&&i.push({node:u,pos:d})});const s=i.at(-1);if(!s)return!1;const l=t.state.doc.resolve(o.start()+s.pos+1);return t.chain().cut({from:r.start()-1,to:r.end()+1},l.end()).joinForward().run()}return!rs(t.state,e)||!j$(t.state)?!1:t.chain().liftListItem(e).run()},K6=(t,e)=>{const n=Ix(t,e),r=kp(t,e);return!r||!n?!1:n>r.depth},G6=(t,e)=>{const n=Ix(t,e),r=kp(t,e);return!r||!n?!1:n<r.depth},V1=(t,e)=>{if(!rs(t.state,e)||!P$(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:K6(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():G6(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},JH=(t,e)=>{var n;const{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==t)},YH=(t,e)=>{var n;const{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==t)},XH=(t,e,n)=>{if(!n)return!1;const r=Bt(t,e.schema);let o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},Z6=Ct.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&V1(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&V1(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&B1(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&B1(t,n,r)&&(e=!0)}),e}}}}),H1=new RegExp(`^(\\s*)(${H6})([.)])\\s+(.*)$`),QH=/^\s/,xu={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function eU(t){return H1.test(t.trimStart())}function tU(t){const e=t.trimStart();return xu.bulletItem.test(e)||eU(e)||xu.heading.test(e)||xu.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||xu.codeFence.test(e)}function nU(t){return Object.values(xu).some(e=>e.test(t))}function rU(t){const e=[],n=[];let r=!1;return t.forEach(o=>{if(r){n.push(o);return}if(o.trim()===""){r=!0,n.push(o);return}if(e.length>0&&tU(o)){r=!0,n.push(o);return}e.push(o)}),{paragraphLines:e,blockLines:n}}function oU(t){const e=[];let n=0,r=0;for(;n<t.length;){const o=t[n],i=o.match(H1);if(!i)break;const[,s,l,u,d]=i,h=s.length,p=parseInt(l,10),m=isNaN(p)?bp(l):void 0,y=isNaN(p)?Ox(l):p,x=[d];let b=n+1;const w=[o];let E=!1;for(;b<t.length;){const _=t[b];if(_.match(H1))break;if(_.trim()==="")w.push(_),x.push(""),E=!0,b+=1;else if(_.match(QH)){const M=_.length-_.trimStart().length,N=h+l.length+1;w.push(_),x.push(_.slice(Math.min(M,N))),b+=1}else{if(E||nU(_))break;w.push(_),x.push(_),b+=1}}e.push({indent:h,number:y,type:m,content:x.join(`
|
|
530
|
-
`).trim(),contentLines:x,raw:w.join(`
|
|
531
|
-
`)}),r=b,n=b}return[e,r]}var iU=new RegExp(`^(${H6})([.)])\\s+(.+)$`);function sU(t){const e=t.split(`
|
|
532
|
-
`).filter(i=>i.trim().length>0);if(e.length===0)return null;const n=[];for(const i of e){const s=i.trim().match(iU);if(!s)return null;n.push({marker:s[1],content:s[3]})}const r=n.map(i=>i.marker);return HH(r)?{type:"orderedList",attrs:WH(n[0].marker),content:n.map(i=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:i.content}]}]}))}:null}function J6(t,e,n){const r=[];let o=0;for(;o<t.length;){const i=t[o];if(i.indent===e){const{paragraphLines:s,blockLines:l}=rU(i.contentLines),u=s.join(`
|
|
533
|
-
`).trim(),d=[];u&&d.push({type:"paragraph",raw:u,tokens:n.inlineTokens(u)});const h=l.join(`
|
|
534
|
-
`).trim();if(h){const y=n.blockTokens(h);d.push(...y)}let p=o+1;const m=[];for(;p<t.length&&t[p].indent>e;)m.push(t[p]),p+=1;if(m.length>0){const y=Math.min(...m.map(b=>b.indent)),x=J6(m,y,n);d.push({type:"list",ordered:!0,start:m[0].number,typeMarker:m[0].type,items:x,raw:m.map(b=>b.raw).join(`
|
|
535
|
-
`)})}r.push({type:"list_item",raw:i.raw,tokens:d}),o=p}else o+=1}return r}function aU(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){const i=e.parseChildren([o]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var lU="listItem",pC="textStyle",mC=/^(\d+)\.\s$/;function gC(t){const e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[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 Y6=ft.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>{const e=t.getAttribute("type");if(e)return e;const n=t.getAttribute("style");if(n){const o=gC(n);if(o)return o}const r=t.querySelector("li");if(r){const o=r.getAttribute("style");if(o){const i=gC(o);if(i)return i}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,type:n,...r}=t,o=Xt(this.options.HTMLAttributes,r);return e!==1&&(o.start=e),n&&n!=="1"&&(o.type=n),["ol",o,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.typeMarker,o=t.items?aU(t.items,e):[],i={};return n!==1&&(i.start=n),r&&(i.type=r),Object.keys(i).length>0?{type:"orderedList",attrs:i,content:o}:{type:"orderedList",content:o}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
536
|
-
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,o;const i=t.split(`
|
|
537
|
-
`),[s,l]=oU(i);if(s.length===0)return;const u=J6(s,s[0].indent,n);if(u.length===0)return;const d=((r=s[0])==null?void 0:r.number)||1,h=(o=s[0])==null?void 0:o.type;return{type:"list",ordered:!0,start:d,typeMarker:h,items:u,raw:i.slice(0,l).join(`
|
|
538
|
-
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(lU,this.editor.getAttributes(pC)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new wt({props:{handlePaste:(t,e)=>{var n,r;const o=(n=e.clipboardData)==null?void 0:n.getData("text/html");if(o!=null&&o.trim())return!1;const i=(r=e.clipboardData)==null?void 0:r.getData("text/plain");if(!i)return!1;const s=sU(i);if(!s)return!1;try{const l=t.state.schema.nodeFromJSON(s),u=t.state.tr.replaceSelectionWith(l);return t.dispatch(u),!0}catch{return!1}}}})]},addInputRules(){const t=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1];let e=cl({find:mC,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=cl({find:mC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(pC)}),joinPredicate:t,editor:this.editor})),[e]}}),uU=/^\s*(\[([( |x])?\])\s$/,cU=ft.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:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Xt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const o=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return bx(t,e,o)},addExtensions(){return this.options.nested?[B6(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),u=document.createElement("div"),d=p=>{var m,y;l.ariaLabel=((y=(m=this.options.a11y)==null?void 0:m.checkboxLabel)==null?void 0:y.call(m,p,l.checked))||`Task item checkbox for ${p.textContent||"empty task item"}`};d(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",p=>p.preventDefault()),l.addEventListener("change",p=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:m}=p.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:y})=>{const x=n();if(typeof x!="number")return!1;const b=y.doc.nodeAt(x);return y.setNodeMarkup(x,void 0,{...b==null?void 0:b.attrs,checked:m}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,m)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([p,m])=>{o.setAttribute(p,m)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,s),o.append(i,u),Object.entries(e).forEach(([p,m])=>{o.setAttribute(p,m)});let h=new Set(Object.keys(e));return{dom:o,contentDOM:u,update:p=>{if(p.type!==this.type)return!1;o.dataset.checked=p.attrs.checked,l.checked=p.attrs.checked,d(p);const m=r.extensionManager.attributes,y=ec(p,m),x=new Set(Object.keys(y)),b=this.options.HTMLAttributes;return h.forEach(w=>{x.has(w)||(w in b?o.setAttribute(w,b[w]):o.removeAttribute(w))}),Object.entries(y).forEach(([w,E])=>{E==null?w in b?o.setAttribute(w,b[w]):o.removeAttribute(w):o.setAttribute(w,E)}),h=x,!0}}}},addInputRules(){return[cl({find:uU,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),dU=ft.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:t}){return["ul",Xt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
539
|
-
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const s=D1(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,u)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:u}),customNestedParser:r},n);if(s){const l={type:"taskList",raw:s.raw,items:s.items},u=i.slice(s.raw.length);return u.trim()?[l,...n.blockTokens(u)]:[l]}return n.blockTokens(i)},o=D1(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Ct.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push($6.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(W6.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Z6.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Y6.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(cU.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(dU.configure(this.options.taskList)),t}});var df=" ",fg=" ",fU=ft.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Xt(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===df||n[0].text===df||n[0].raw===fg||n[0].text===fg)&&r.length===1&&r[0].type==="text"&&(r[0].text===df||r[0].text===fg)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,o;if(!t)return"";const i=Array.isArray(t.content)?t.content:[];if(i.length===0){const s=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((o=n==null?void 0:n.previousNode)==null?void 0:o.type)==="paragraph"&&s.length===0?df:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),hU=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,pU=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,mU=cr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Xt(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[na({find:hU,type:this.type})]},addPasteRules(){return[is({find:pU,type:this.type})]}}),gU=ft.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),yU=cr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Xt(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!o)return;const i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function xU(t={}){return new wt({view(e){return new vU(e,t)}})}class vU{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){if(this.cursorPos!=null&&n.doc!=e.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let p=e.nodeBefore,m=e.nodeAfter;if(p||m){let y=this.editorView.nodeDOM(this.cursorPos-(p?p.nodeSize:0));if(y){let x=y.getBoundingClientRect(),b=p?x.bottom:x.top;p&&m&&(b=(b+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let w=this.width/2*l;r={left:x.left,right:x.right,top:b-w,bottom:b+w}}}}if(!r){let p=this.editorView.coordsAtPos(this.cursorPos),m=this.width/2*s;r={left:p.left-m,right:p.left+m,top:p.top,bottom:p.bottom}}let u=this.editorView.dom.offsetParent;this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),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",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let d,h;if(!u||u==document.body&&getComputedStyle(u).position=="static")d=-pageXOffset,h=-pageYOffset;else{let p=u.getBoundingClientRect(),m=p.width/u.offsetWidth,y=p.height/u.offsetHeight;d=p.left-u.scrollLeft*m,h=p.top-u.scrollTop*y}this.element.style.left=(r.left-d)/s+"px",this.element.style.top=(r.top-h)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(!n||i)return null;let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=O_(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}return s}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let n=this.computeTarget(e);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Dt extends Ve{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Dt.valid(r)?new Dt(r):Ve.near(r)}content(){return ye.empty}eq(e){return e instanceof Dt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Dt(e.resolve(n.pos))}getBookmark(){return new Px(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!bU(e)||!kU(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Dt.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)<l.childCount:e.index(s)>0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let u=e.doc.resolve(o);if(Dt.valid(u))return u}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Re.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(Dt.valid(l))return l}return null}}}Dt.prototype.visible=!1;Dt.findFrom=Dt.findGapCursorFrom;Ve.jsonID("gapcursor",Dt);class Px{constructor(e){this.pos=e}map(e){return new Px(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Dt.valid(n)?new Dt(n):Ve.near(n)}}function X6(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function bU(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||X6(o.type))return!0;if(o.inlineContent)return!1}}return!0}function kU(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||X6(o.type))return!0;if(o.inlineContent)return!1}}return!0}function wU(){return new wt({props:{decorations:_U,createSelectionBetween(t,e,n){return e.pos==n.pos&&Dt.valid(n)?new Dt(n):null},handleClick:SU,handleKeyDown:CU,handleDOMEvents:{beforeinput:EU}}})}const CU=L4({ArrowLeft:ff("horiz",-1),ArrowRight:ff("horiz",1),ArrowUp:ff("vert",-1),ArrowDown:ff("vert",1)});function ff(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,u=s.empty;if(s instanceof je){if(!i.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let d=Dt.findGapCursorFrom(l,e,u);return d?(o&&o(r.tr.setSelection(new Dt(d))),!0):!1}}function SU(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Dt.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Re.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Dt(r))),!0)}function EU(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Dt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=re.empty;for(let s=r.length-1;s>=0;s--)o=re.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new ye(o,0,0));return i.setSelection(je.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function _U(t){if(!(t.selection instanceof Dt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",yt.create(t.doc,[On.widget(t.selection.head,e,{key:"gapcursor"})])}var Ah=200,dn=function(){};dn.prototype.append=function(e){return e.length?(e=dn.from(e),!this.length&&e||e.length<Ah&&this.leafAppend(e)||this.length<Ah&&e.leafPrepend(this)||this.appendInner(e)):this};dn.prototype.prepend=function(e){return e.length?dn.from(e).append(this):this};dn.prototype.appendInner=function(e){return new TU(this,e)};dn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?dn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};dn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};dn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};dn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};dn.from=function(e){return e instanceof dn?e:e&&e.length?new Q6(e):dn.empty};var Q6=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var u=i;u<s;u++)if(o(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,l){for(var u=i-1;u>=s;u--)if(o(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Ah)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Ah)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(dn);dn.empty=new Q6([]);var TU=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(i,l),s)===!1||i>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(o,l),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(dn);const AU=500;class zr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,u,d=[],h=[];return this.items.forEach((p,m)=>{if(!p.step){o||(o=this.remapping(r,m+1),i=o.maps.length),i--,h.push(p);return}if(o){h.push(new ao(p.map));let y=p.step.map(o.slice(i)),x;y&&s.maybeStep(y).doc&&(x=s.mapping.maps[s.mapping.maps.length-1],d.push(new ao(x,void 0,void 0,d.length+h.length))),i--,x&&o.appendMap(x,i)}else s.maybeStep(p.step);if(p.selection)return l=o?p.selection.map(o.slice(i)):p.selection,u=new zr(this.items.slice(0,r).append(h.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,u=!o&&l.length?l.get(l.length-1):null;for(let h=0;h<e.steps.length;h++){let p=e.steps[h].invert(e.docs[h]),m=new ao(e.mapping.maps[h],p,n),y;(y=u&&u.merge(m))&&(m=y,h?i.pop():l=l.slice(0,l.length-1)),i.push(m),n&&(s++,n=void 0),o||(u=m)}let d=s-r.depth;return d>NU&&(l=MU(l,d),s-=d),new zr(l.append(i),s)}remapping(e,n){let r=new Zu;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new zr(this.items.append(e.map(n=>new ao(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},o);let u=n;this.items.forEach(m=>{let y=i.getMirror(--u);if(y==null)return;s=Math.min(s,y);let x=i.maps[y];if(m.step){let b=e.steps[y].invert(e.docs[y]),w=m.selection&&m.selection.map(i.slice(u+1,y));w&&l++,r.push(new ao(x,b,w))}else r.push(new ao(x))},o);let d=[];for(let m=n;m<s;m++)d.push(new ao(i.maps[m]));let h=this.items.slice(0,o).append(d).append(r),p=new zr(h,l);return p.emptyItemCount()>AU&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let u=s.step.map(n.slice(r)),d=u&&u.getMap();if(r--,d&&n.appendMap(d,r),u){let h=s.selection&&s.selection.map(n.slice(r));h&&i++;let p=new ao(d.invert(),u,h),m,y=o.length-1;(m=o.length&&o[y].merge(p))?o[y]=m:o.push(p)}}else s.map&&r--},this.items.length,0),new zr(dn.from(o.reverse()),i)}}zr.empty=new zr(dn.empty,0);function MU(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class ao{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new ao(n.getMap().invert(),n,this.selection)}}}class ji{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const NU=20;function DU(t,e,n,r){let o=n.getMeta(Us),i;if(o)return o.historyState;n.getMeta(IU)&&(t=new ji(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Us))return s.getMeta(Us).redo?new ji(t.done.addTransform(n,void 0,r,_f(e)),t.undone,yC(n.mapping.maps),t.prevTime,t.prevComposition):new ji(t.done,t.undone.addTransform(n,void 0,r,_f(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!RU(n,t.prevRanges)),d=s?hg(t.prevRanges,n.mapping):yC(n.mapping.maps);return new ji(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,_f(e)),zr.empty,d,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ji(t.done.rebased(n,i),t.undone.rebased(n,i),hg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ji(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),hg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function RU(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function yC(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function hg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function OU(t,e,n){let r=_f(e),o=Us.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),l=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),u=new ji(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(s).setMeta(Us,{redo:n,historyState:u})}let pg=!1,xC=null;function _f(t){let e=t.plugins;if(xC!=e){pg=!1,xC=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){pg=!0;break}}return pg}const Us=new Vt("history"),IU=new Vt("closeHistory");function PU(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new wt({key:Us,state:{init(){return new ji(zr.empty,zr.empty,null,0,-1)},apply(e,n,r){return DU(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?tT:r=="historyRedo"?nT:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function eT(t,e){return(n,r)=>{let o=Us.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=OU(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const tT=eT(!1,!0),nT=eT(!0,!0);Ct.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new wt({key:new Vt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit,i=this.options.autoTrim;if(o==null||o===0||i===!1){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>o){const l=s-o,u=0,d=l;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const h=r.tr.deleteRange(u,d);return t=!0,h}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=i-r,d=l-u,h=l;return e.deleteRange(d,h),!(this.storage.characters({node:e.doc})>r)}})]}});var jU=Ct.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[xU(this.options)]}});Ct.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new wt({key:new Vt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,i=[];if(!n||!r)return yt.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((u,d)=>{if(u.isText)return;if(!(o>=d&&o<=d+u.nodeSize-1))return!1;s+=1});let l=0;return t.descendants((u,d)=>{if(u.isText||!(o>=d&&o<=d+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(On.node(d,d+u.nodeSize,{class:this.options.className}))}),yt.create(t,i)}}})]}});var LU=Ct.create({name:"gapCursor",addProseMirrorPlugins(){return[wU()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=at(Te(t,"allowGapCursor",n)))!=null?e:null}}}),rT="placeholder",vC=new Vt("tiptap__placeholder");function oT(t){const{editor:e,placeholder:n,dataAttribute:r,pos:o,node:i,isEmptyDoc:s,hasAnchor:l,classes:{emptyNode:u,emptyEditor:d}}=t,h=[u];return s&&h.push(d),On.node(o,o+i.nodeSize,{class:h.join(" "),[r]:typeof n=="function"?n({editor:e,node:i,pos:o,hasAnchor:l}):n})}function iT(t,e){return typeof t=="function"?t(e):t}function sT({editor:t,options:e,dataAttribute:n,doc:r,selection:o,from:i,to:s}){const{anchor:l}=o,u=[],d=t.isEmpty;return r.nodesBetween(i,s,(h,p)=>{const m=l>=p&&l<=p+h.nodeSize,y=!h.isLeaf&&Sc(h);return h.type.isTextblock&&(m||!e.showOnlyCurrent)&&y&&u.push(oT({editor:t,isEmptyDoc:d,dataAttribute:n,hasAnchor:m,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:iT(e.emptyNodeClass,{editor:t,node:h,pos:p,hasAnchor:m})},node:h,pos:p})),e.includeChildren}),u}function aT({editor:t,options:e,dataAttribute:n,doc:r,selection:o}){if(!(t.isEditable||!e.showOnlyWhenEditable))return null;const{anchor:s}=o,l=[],u=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){const h=r.resolve(s),p=h.depth>0?h.node(1):h.nodeAfter,m=h.depth>0?h.before(1):s;if(p&&p.type.isTextblock&&Sc(p)){const y=s>=m&&s<=m+p.nodeSize;l.push(oT({editor:t,isEmptyDoc:u,dataAttribute:n,hasAnchor:y,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:iT(e.emptyNodeClass,{editor:t,node:p,pos:m,hasAnchor:y})},node:p,pos:m}))}}else l.push(...sT({editor:t,options:e,dataAttribute:n,doc:r,selection:o,from:0,to:r.content.size}));return yt.create(r,l)}function Nu(t,e){var n;const r=t.resolve(e);if(r.depth===0){const s=(n=r.nodeAfter)!=null?n:r.nodeBefore;if(!s)return{from:e,to:e};const l=r.nodeAfter?e:e-s.nodeSize;return{from:l,to:l+s.nodeSize}}const o=r.before(1),i=r.node(1);return{from:o,to:o+i.nodeSize}}function Du(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function FU(t,e,n){const r=[];return t.forEach((o,i)=>{const s=i,l=s+o.nodeSize,u=s+1,d=l+1;u<n&&d>e&&r.push({from:s,to:l})}),r}function zU(t){if(t.length===0)return[];const e=[...t].sort((r,o)=>r.from-o.from),n=[{...e[0]}];for(let r=1;r<e.length;r+=1){const o=n[n.length-1],i=e[r];i.from<=o.to?o.to=Math.max(o.to,i.to):n.push({...i})}return n}function $U(t,e){const n=FU(t,e.from,e.to);return n.push(Du(t,Nu(t,e.from))),e.to>e.from?n.push(Du(t,Nu(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(Du(t,Nu(t,Math.min(e.from+1,t.content.size)))),n}function BU(t,e,n){const r=[];if(t.docChanged){const o=gx(t);for(const i of o)r.push(...$U(n.doc,i.newRange))}return t.selectionSet&&(r.push(Du(n.doc,Nu(n.doc,t.mapping.map(e.selection.anchor)))),r.push(Du(n.doc,Nu(n.doc,n.selection.anchor)))),zU(r)}function VU(t,e,n){const r=Math.max(0,Math.min(t,n.content.size)),o=Math.max(r,Math.min(e,n.content.size));return{from:r,to:o}}function HU({decorations:t,ranges:e,editor:n,options:r,dataAttribute:o,doc:i,selection:s}){let l=t;for(const u of e){const{from:d,to:h}=VU(u.from,u.to,i),p=l.find(d,h).filter(y=>y.from>=d&&y.to<=h);p.length&&(l=l.remove(p));const m=sT({editor:n,options:r,dataAttribute:o,doc:i,selection:s,from:d,to:h});m.length&&(l=l.add(i,m))}return l}function UU({editor:t,options:e,dataAttribute:n}){return{init(r,o){const i=aT({editor:t,options:e,dataAttribute:n,doc:o.doc,selection:o.selection});return i??yt.empty},apply(r,o,i,s){if(!r.docChanged&&!r.selectionSet)return o;const l=o.map(r.mapping,r.doc),u=BU(r,i,s);return HU({decorations:l,ranges:u,editor:t,options:e,dataAttribute:n,doc:s.doc,selection:s.selection})}}}function WU(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function qU({editor:t,options:e}){const n=e.dataAttribute?`data-${WU(e.dataAttribute)}`:`data-${rT}`,r=e.showOnlyCurrent&&!e.includeChildren;return new wt({key:vC,...r?{}:{state:UU({editor:t,options:e,dataAttribute:n})},props:{decorations:r?({doc:o,selection:i})=>aT({editor:t,options:e,dataAttribute:n,doc:o,selection:i}):o=>{var i;return e.showOnlyWhenEditable&&!t.isEditable?yt.empty:(i=vC.getState(o))!=null?i:yt.empty}}})}Ct.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:rT,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[qU({editor:this.editor,options:this.options})]}});function U1(t,e){return!t.selection.empty&&!Q4(t.selection)&&e.isEditable}function KU(t,e){return U1(t,e)&&!e.isFocused&&!e.view.dragging}function GU(){var t;(t=window.getSelection())==null||t.removeAllRanges()}function ZU(t){t.focus()}Ct.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new wt({key:new Vt("selection"),props:{decorations(n){return KU(n,t)?yt.create(n.doc,[On.inline(n.selection.from,n.selection.to,{class:e.className})]):null},handleDOMEvents:{blur(n){return U1(n.state,t)&&GU(),!1},focus(n){return U1(n.state,t)&&requestAnimationFrame(()=>{!t.isDestroyed&&n.hasFocus()&&ZU(n)}),!1}}}})]}});var JU="skipTrailingNode";function bC({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var YU=Ct.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Vt(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new wt({key:e,appendTransaction:(o,i,s)=>{const{doc:l,tr:u,schema:d}=s,h=e.getState(s),p=l.content.size,m=d.nodes[n];if(!o.some(y=>y.getMeta(JU))&&h)return u.insert(p,m.create())},state:{init:(o,i)=>{const s=i.tr.doc.lastChild;return!bC({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;const s=o.doc.lastChild;return!bC({node:s,types:r})}}})]}}),XU=Ct.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>tT(t,e),redo:()=>({state:t,dispatch:e})=>nT(t,e)}},addProseMirrorPlugins(){return[PU(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()}}}),QU=Ct.create({name:"starterKit",addExtensions(){var t,e,n,r;const o=[];return this.options.bold!==!1&&o.push(zV.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(IV.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push($6.configure(this.options.bulletList)),this.options.code!==!1&&o.push(VV.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(WV.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(qV.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(jU.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(LU.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(KV.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(GV.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(XU.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(ZV.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(eH.configure(this.options.italic)),this.options.listItem!==!1&&o.push(W6.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(Z6.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&o.push(RH.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&o.push(Y6.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(fU.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(mU.configure(this.options.strike)),this.options.text!==!1&&o.push(gU.configure(this.options.text)),this.options.underline!==!1&&o.push(yU.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(YU.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),eW=QU;const kC={};function tW(t){let e=kC[t];if(e)return e;e=kC[t]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);e.push(r)}for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return e}function dl(t,e){typeof e!="string"&&(e=dl.defaultChars);const n=tW(e);return t.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const l=parseInt(r.slice(i+1,i+3),16);if(l<128){o+=n[l];continue}if((l&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const d=l<<6&1984|u&63;d<128?o+="��":o+=String.fromCharCode(d),i+=3;continue}}if((l&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),d=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(d&192)===128){const h=l<<12&61440|u<<6&4032|d&63;h<2048||h>=55296&&h<=57343?o+="���":o+=String.fromCharCode(h),i+=6;continue}}if((l&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),d=parseInt(r.slice(i+7,i+9),16),h=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(d&192)===128&&(h&192)===128){let p=l<<18&1835008|u<<12&258048|d<<6&4032|h&63;p<65536||p>1114111?o+="����":(p-=65536,o+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),i+=9;continue}}o+="�"}return o})}dl.defaultChars=";/?:@&=+$,#";dl.componentChars="";const wC={};function nW(t){let e=wC[t];if(e)return e;e=wC[t]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<t.length;n++)e[t.charCodeAt(n)]=t[n];return e}function _c(t,e,n){typeof e!="string"&&(n=e,e=_c.defaultChars),typeof n>"u"&&(n=!0);const r=nW(e);let o="";for(let i=0,s=t.length;i<s;i++){const l=t.charCodeAt(i);if(n&&l===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(t.slice(i+1,i+3))){o+=t.slice(i,i+3),i+=2;continue}if(l<128){o+=r[l];continue}if(l>=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1<s){const u=t.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(t[i]+t[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(t[i])}return o}_c.defaultChars=";/?:@&=+$,-_.!~*'()#";_c.componentChars="-_.!~*'()";function jx(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function Mh(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const rW=/^([a-z0-9.+-]+:)/i,oW=/:[0-9]*$/,iW=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,sW=["<",">",'"',"`"," ","\r",`
|
|
540
|
-
`," "],aW=["{","}","|","\\","^","`"].concat(sW),lW=["'"].concat(aW),CC=["%","/","?",";","#"].concat(lW),SC=["/","?","#"],uW=255,EC=/^[+a-z0-9A-Z_-]{0,63}$/,cW=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_C={javascript:!0,"javascript:":!0},TC={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Lx(t,e){if(t&&t instanceof Mh)return t;const n=new Mh;return n.parse(t,e),n}Mh.prototype.parse=function(t,e){let n,r,o,i=t;if(i=i.trim(),!e&&t.split("#").length===1){const d=iW.exec(i);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let s=rW.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(e||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&_C[s])&&(i=i.substr(2),this.slashes=!0)),!_C[s]&&(o||s&&!TC[s])){let d=-1;for(let x=0;x<SC.length;x++)r=i.indexOf(SC[x]),r!==-1&&(d===-1||r<d)&&(d=r);let h,p;d===-1?p=i.lastIndexOf("@"):p=i.lastIndexOf("@",d),p!==-1&&(h=i.slice(0,p),i=i.slice(p+1),this.auth=h),d=-1;for(let x=0;x<CC.length;x++)r=i.indexOf(CC[x]),r!==-1&&(d===-1||r<d)&&(d=r);d===-1&&(d=i.length),i[d-1]===":"&&d--;const m=i.slice(0,d);i=i.slice(d),this.parseHost(m),this.hostname=this.hostname||"";const y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y){const x=this.hostname.split(/\./);for(let b=0,w=x.length;b<w;b++){const E=x[b];if(E&&!E.match(EC)){let _="";for(let A=0,M=E.length;A<M;A++)E.charCodeAt(A)>127?_+="x":_+=E[A];if(!_.match(EC)){const A=x.slice(0,b),M=x.slice(b+1),N=E.match(cW);N&&(A.push(N[1]),M.unshift(N[2])),M.length&&(i=M.join(".")+i),this.hostname=A.join(".");break}}}}this.hostname.length>uW&&(this.hostname=""),y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),TC[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Mh.prototype.parseHost=function(t){let e=oW.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const dW=Object.freeze(Object.defineProperty({__proto__:null,decode:dl,encode:_c,format:jx,parse:Lx},Symbol.toStringTag,{value:"Module"})),lT=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uT=/[\0-\x1F\x7F-\x9F]/,fW=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Fx=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,cT=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,dT=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,hW=Object.freeze(Object.defineProperty({__proto__:null,Any:lT,Cc:uT,Cf:fW,P:Fx,S:cT,Z:dT},Symbol.toStringTag,{value:"Module"})),pW=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),mW=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var mg;const gW=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),yW=(mg=String.fromCodePoint)!==null&&mg!==void 0?mg:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function xW(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=gW.get(t))!==null&&e!==void 0?e:t}var un;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(un||(un={}));const vW=32;var Ui;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Ui||(Ui={}));function W1(t){return t>=un.ZERO&&t<=un.NINE}function bW(t){return t>=un.UPPER_A&&t<=un.UPPER_F||t>=un.LOWER_A&&t<=un.LOWER_F}function kW(t){return t>=un.UPPER_A&&t<=un.UPPER_Z||t>=un.LOWER_A&&t<=un.LOWER_Z||W1(t)}function wW(t){return t===un.EQUALS||kW(t)}var on;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(on||(on={}));var Wo;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Wo||(Wo={}));class CW{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=on.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Wo.Strict}startEntity(e){this.decodeMode=e,this.state=on.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case on.EntityStart:return e.charCodeAt(n)===un.NUM?(this.state=on.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=on.NamedEntity,this.stateNamedEntity(e,n));case on.NumericStart:return this.stateNumericStart(e,n);case on.NumericDecimal:return this.stateNumericDecimal(e,n);case on.NumericHex:return this.stateNumericHex(e,n);case on.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|vW)===un.LOWER_X?(this.state=on.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=on.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(e.substr(n,i),o),this.consumed+=i}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const o=e.charCodeAt(n);if(W1(o)||bW(o))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const o=e.charCodeAt(n);if(W1(o))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===un.SEMI)this.consumed+=1;else if(this.decodeMode===Wo.Strict)return 0;return this.emitCodePoint(xW(this.result),this.consumed),this.errors&&(e!==un.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&Ui.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const s=e.charCodeAt(n);if(this.treeIndex=SW(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Wo.Attribute&&(i===0||wW(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&Ui.VALUE_LENGTH)>>14,i!==0){if(s===un.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Wo.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,o=(r[n]&Ui.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[e]&~Ui.VALUE_LENGTH:o[e+1],r),n===3&&this.emitCodePoint(o[e+2],r),r}end(){var e;switch(this.state){case on.NamedEntity:return this.result!==0&&(this.decodeMode!==Wo.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case on.NumericDecimal:return this.emitNumericEntity(0,2);case on.NumericHex:return this.emitNumericEntity(0,3);case on.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case on.EntityStart:return 0}}}function fT(t){let e="";const n=new CW(t,r=>e+=yW(r));return function(o,i){let s=0,l=0;for(;(l=o.indexOf("&",l))>=0;){e+=o.slice(s,l),n.startEntity(i);const d=n.write(o,l+1);if(d<0){s=l+n.end();break}s=l+d,l=d===0?s+1:s}const u=e+o.slice(s);return e="",u}}function SW(t,e,n,r){const o=(e&Ui.BRANCH_LENGTH)>>7,i=e&Ui.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:t[n+u]-1}let s=n,l=s+o-1;for(;s<=l;){const u=s+l>>>1,d=t[u];if(d<r)s=u+1;else if(d>r)l=u-1;else return t[u+o]}return-1}const hT=fT(pW);fT(mW);function EW(t,e=Wo.Legacy){return hT(t,e)}function _W(t){return hT(t,Wo.Strict)}function TW(t){return Object.prototype.toString.call(t)}function zx(t){return TW(t)==="[object String]"}const AW=Object.prototype.hasOwnProperty;function MW(t,e){return AW.call(t,e)}function wp(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){t[r]=n[r]})}}),t}function pT(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function $x(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function rc(t){if(t>65535){t-=65536;const e=55296+(t>>10),n=56320+(t&1023);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const mT=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,NW=/&([a-z#][a-z0-9]{1,31});/gi,DW=new RegExp(mT.source+"|"+NW.source,"gi"),RW=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function OW(t,e){if(e.charCodeAt(0)===35&&RW.test(e)){const r=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return $x(r)?rc(r):t}const n=EW(t);return n!==t?n:t}function IW(t){return t.indexOf("\\")<0?t:t.replace(mT,"$1")}function fl(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(DW,function(e,n,r){return n||OW(e,r)})}const PW=/[&<>"]/,jW=/[&<>"]/g,LW={"&":"&","<":"<",">":">",'"':"""};function FW(t){return LW[t]}function ss(t){return PW.test(t)?t.replace(jW,FW):t}const zW=/[.?*+^$[\]\\(){}|-]/g;function $W(t){return t.replace(zW,"\\$&")}function xt(t){switch(t){case 9:case 32:return!0}return!1}function oc(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function gT(t){return Fx.test(t)||cT.test(t)}function ic(t){return gT(rc(t))}function sc(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Cp(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}function AC(t){return t===32||t===9||t===10||t===13}function Sp(t){let e=0;for(;e<t.length&&AC(t.charCodeAt(e));e++);let n=t.length-1;for(;n>=e&&AC(t.charCodeAt(n));n--);return t.slice(e,n+1)}const BW={mdurl:dW,ucmicro:hW},VW=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:pT,asciiTrim:Sp,assign:wp,escapeHtml:ss,escapeRE:$W,fromCodePoint:rc,has:MW,isMdAsciiPunct:sc,isPunctChar:gT,isPunctCharCode:ic,isSpace:xt,isString:zx,isValidEntityCode:$x,isWhiteSpace:oc,lib:BW,normalizeReference:Cp,unescapeAll:fl,unescapeMd:IW},Symbol.toStringTag,{value:"Module"}));function HW(t,e,n){let r,o,i,s;const l=t.posMax,u=t.pos;for(t.pos=e+1,r=1;t.pos<l;){if(i=t.src.charCodeAt(t.pos),i===93&&(r--,r===0)){o=!0;break}if(s=t.pos,t.md.inline.skipToken(t),i===91){if(s===t.pos-1)r++;else if(n)return t.pos=u,-1}}let d=-1;return o&&(d=t.pos),t.pos=u,d}function UW(t,e,n){let r,o=e;const i={ok:!1,pos:0,str:""};if(t.charCodeAt(o)===60){for(o++;o<n;){if(r=t.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=fl(t.slice(e+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=t.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(t.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return e===o||s!==0||(i.str=fl(t.slice(e,o)),i.pos=o,i.ok=!0),i}function WW(t,e,n,r){let o,i=e;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let l=t.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return s;e++,i++,l===40&&(l=41),s.marker=l}for(;i<n;){if(o=t.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=fl(t.slice(e,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=fl(t.slice(e,i)),s}const qW=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:UW,parseLinkLabel:HW,parseLinkTitle:WW},Symbol.toStringTag,{value:"Module"})),wo={};wo.code_inline=function(t,e,n,r,o){const i=t[e];return"<code"+o.renderAttrs(i)+">"+ss(i.content)+"</code>"};wo.code_block=function(t,e,n,r,o){const i=t[e];return"<pre"+o.renderAttrs(i)+"><code>"+ss(t[e].content)+`</code></pre>
|
|
541
|
-
`};wo.fence=function(t,e,n,r,o){const i=t[e],s=i.info?fl(i.info).trim():"";let l="",u="";if(s){const h=s.split(/(\s+)/g);l=h[0],u=h.slice(2).join("")}let d;if(n.highlight?d=n.highlight(i.content,l,u)||ss(i.content):d=ss(i.content),d.indexOf("<pre")===0)return d+`
|
|
542
|
-
`;if(s){const h=i.attrIndex("class"),p=i.attrs?i.attrs.slice():[];h<0?p.push(["class",n.langPrefix+l]):(p[h]=p[h].slice(),p[h][1]+=" "+n.langPrefix+l);const m={attrs:p};return`<pre><code${o.renderAttrs(m)}>${d}</code></pre>
|
|
543
|
-
`}return`<pre><code${o.renderAttrs(i)}>${d}</code></pre>
|
|
544
|
-
`};wo.image=function(t,e,n,r,o){const i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)};wo.hardbreak=function(t,e,n){return n.xhtmlOut?`<br />
|
|
545
|
-
`:`<br>
|
|
546
|
-
`};wo.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`<br />
|
|
547
|
-
`:`<br>
|
|
548
|
-
`:`
|
|
549
|
-
`};wo.text=function(t,e){return ss(t[e].content)};wo.html_block=function(t,e){return t[e].content};wo.html_inline=function(t,e){return t[e].content};function kl(){this.rules=wp({},wo)}kl.prototype.renderAttrs=function(e){let n,r,o;if(!e.attrs)return"";for(o="",n=0,r=e.attrs.length;n<r;n++)o+=" "+ss(e.attrs[n][0])+'="'+ss(e.attrs[n][1])+'"';return o};kl.prototype.renderToken=function(e,n,r){const o=e[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&e[n-1].hidden&&(i+=`
|
|
550
|
-
`),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<e.length)){const l=e[n+1];(l.type==="inline"||l.hidden||l.nesting===-1&&l.tag===o.tag)&&(s=!1)}return i+=s?`>
|
|
551
|
-
`:">",i};kl.prototype.renderInline=function(t,e,n){let r="";const o=this.rules;for(let i=0,s=t.length;i<s;i++){const l=t[i].type;typeof o[l]<"u"?r+=o[l](t,i,e,n,this):r+=this.renderToken(t,i,e)}return r};kl.prototype.renderInlineAsText=function(t,e,n){let r="";for(let o=0,i=t.length;o<i;o++)switch(t[o].type){case"text":r+=t[o].content;break;case"image":r+=this.renderInlineAsText(t[o].children,e,n);break;case"html_inline":case"html_block":r+=t[o].content;break;case"softbreak":case"hardbreak":r+=`
|
|
552
|
-
`;break}return r};kl.prototype.render=function(t,e,n){let r="";const o=this.rules;for(let i=0,s=t.length;i<s;i++){const l=t[i].type;l==="inline"?r+=this.renderInline(t[i].children,e,n):typeof o[l]<"u"?r+=o[l](t,i,e,n,this):r+=this.renderToken(t,i,e,n)}return r};function Xn(){this.__rules__=[],this.__cache__=null}Xn.prototype.__find__=function(t){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};Xn.prototype.__compile__=function(){const t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||t.__cache__[n].push(r.fn))})})};Xn.prototype.at=function(t,e,n){const r=this.__find__(t),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=o.alt||[],this.__cache__=null};Xn.prototype.before=function(t,e,n,r){const o=this.__find__(t),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Xn.prototype.after=function(t,e,n,r){const o=this.__find__(t),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};Xn.prototype.push=function(t,e,n){const r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null};Xn.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(r){const o=this.__find__(r);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};Xn.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};Xn.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(r){const o=this.__find__(r);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};Xn.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};function Kr(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Kr.prototype.attrIndex=function(e){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===e)return r;return-1};Kr.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};Kr.prototype.attrSet=function(e,n){const r=this.attrIndex(e),o=[e,n];r<0?this.attrPush(o):this.attrs[r]=o};Kr.prototype.attrGet=function(e){const n=this.attrIndex(e);let r=null;return n>=0&&(r=this.attrs[n][1]),r};Kr.prototype.attrJoin=function(e,n){const r=this.attrIndex(e);r<0?this.attrPush([e,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function yT(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}yT.prototype.Token=Kr;const KW=/\r\n?|\n/g,GW=/\0/g;function ZW(t){let e;e=t.src.replace(KW,`
|
|
553
|
-
`),e=e.replace(GW,"�"),t.src=e}function JW(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function YW(t){const e=t.tokens;for(let n=0,r=e.length;n<r;n++){const o=e[n];o.type==="inline"&&t.md.inline.parse(o.content,t.md,t.env,o.children)}}function XW(t){return/^<a[>\s]/i.test(t)}function QW(t){return/^<\/a\s*>/i.test(t)}function eq(t){const e=t.tokens;if(t.md.options.linkify)for(let n=0,r=e.length;n<r;n++){if(e[n].type!=="inline"||!t.md.linkify.pretest(e[n].content))continue;let o=e[n].children,i=0;for(let s=o.length-1;s>=0;s--){const l=o[s];if(l.type==="link_close"){for(s--;o[s].level!==l.level&&o[s].type!=="link_open";)s--;continue}if(l.type==="html_inline"&&(XW(l.content)&&i>0&&i--,QW(l.content)&&i++),!(i>0)&&l.type==="text"&&t.md.linkify.test(l.content)){const u=l.content;let d=t.md.linkify.match(u);const h=[];let p=l.level,m=0;d.length>0&&d[0].index===0&&s>0&&o[s-1].type==="text_special"&&(d=d.slice(1));for(let y=0;y<d.length;y++){const x=d[y].url,b=t.md.normalizeLink(x);if(!t.md.validateLink(b))continue;let w=d[y].text;d[y].schema?d[y].schema==="mailto:"&&!/^mailto:/i.test(w)?w=t.md.normalizeLinkText("mailto:"+w).replace(/^mailto:/,""):w=t.md.normalizeLinkText(w):w=t.md.normalizeLinkText("http://"+w).replace(/^http:\/\//,"");const E=d[y].index;if(E>m){const N=new t.Token("text","",0);N.content=u.slice(m,E),N.level=p,h.push(N)}const _=new t.Token("link_open","a",1);_.attrs=[["href",b]],_.level=p++,_.markup="linkify",_.info="auto",h.push(_);const A=new t.Token("text","",0);A.content=w,A.level=p,h.push(A);const M=new t.Token("link_close","a",-1);M.level=--p,M.markup="linkify",M.info="auto",h.push(M),m=d[y].lastIndex}if(m<u.length){const y=new t.Token("text","",0);y.content=u.slice(m),y.level=p,h.push(y)}e[n].children=o=pT(o,s,h)}}}}const xT=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,tq=/\((c|tm|r)\)/i,nq=/\((c|tm|r)\)/ig,rq={c:"©",r:"®",tm:"™"};function oq(t,e){return rq[e.toLowerCase()]}function iq(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];r.type==="text"&&!e&&(r.content=r.content.replace(nq,oq)),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function sq(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];r.type==="text"&&!e&&xT.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function aq(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(tq.test(t.tokens[e].content)&&iq(t.tokens[e].children),xT.test(t.tokens[e].content)&&sq(t.tokens[e].children))}const lq=/['"]/,MC=/['"]/g,NC="’";function hf(t,e,n,r){t[e]||(t[e]=[]),t[e].push({pos:n,ch:r})}function uq(t,e){let n="",r=0;e.sort((o,i)=>o.pos-i.pos);for(let o=0;o<e.length;o++){const i=e[o];n+=t.slice(r,i.pos)+i.ch,r=i.pos+1}return n+t.slice(r)}function cq(t,e){let n;const r=[],o={};for(let i=0;i<t.length;i++){const s=t[i],l=t[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=l);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let d=0;const h=u.length;e:for(;d<h;){MC.lastIndex=d;const p=MC.exec(u);if(!p)break;let m=!0,y=!0;d=p.index+1;const x=p[0]==="'";let b=32;if(p.index-1>=0)b=u.charCodeAt(p.index-1);else for(n=i-1;n>=0&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n--)if(t[n].content){b=t[n].content.charCodeAt(t[n].content.length-1);break}let w=32;if(d<h)w=u.charCodeAt(d);else for(n=i+1;n<t.length&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n++)if(t[n].content){w=t[n].content.charCodeAt(0);break}const E=sc(b)||ic(b),_=sc(w)||ic(w),A=oc(b),M=oc(w);if(M?m=!1:_&&(A||E||(m=!1)),A?y=!1:E&&(M||_||(y=!1)),w===34&&p[0]==='"'&&b>=48&&b<=57&&(y=m=!1),m&&y&&(m=E,y=_),!m&&!y){x&&hf(o,i,p.index,NC);continue}if(y)for(n=r.length-1;n>=0;n--){let N=r[n];if(r[n].level<l)break;if(N.single===x&&r[n].level===l){N=r[n];let D,O;x?(D=e.md.options.quotes[2],O=e.md.options.quotes[3]):(D=e.md.options.quotes[0],O=e.md.options.quotes[1]),hf(o,i,p.index,O),hf(o,N.token,N.pos,D),r.length=n;continue e}}m?r.push({token:i,pos:p.index,single:x,level:l}):y&&x&&hf(o,i,p.index,NC)}}Object.keys(o).forEach(function(i){t[i].content=uq(t[i].content,o[i])})}function dq(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)t.tokens[e].type!=="inline"||!lq.test(t.tokens[e].content)||cq(t.tokens[e].children,t)}function fq(t){let e,n;const r=t.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,l=s.length;for(e=0;e<l;e++)s[e].type==="text_special"&&(s[e].type="text");for(e=n=0;e<l;e++)s[e].type==="text"&&e+1<l&&s[e+1].type==="text"?s[e+1].content=s[e].content+s[e+1].content:(e!==n&&(s[n]=s[e]),n++);e!==n&&(s.length=n)}}const gg=[["normalize",ZW],["block",JW],["inline",YW],["linkify",eq],["replacements",aq],["smartquotes",dq],["text_join",fq]];function Bx(){this.ruler=new Xn;for(let t=0;t<gg.length;t++)this.ruler.push(gg[t][0],gg[t][1])}Bx.prototype.process=function(t){const e=this.ruler.getRules("");for(let n=0,r=e.length;n<r;n++)e[n](t)};Bx.prototype.State=yT;function Co(t,e,n,r){this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,l=0,u=0,d=o.length,h=!1;s<d;s++){const p=o.charCodeAt(s);if(!h)if(xt(p)){l++,p===9?u+=4-u%4:u++;continue}else h=!0;(p===10||s===d-1)&&(p!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(l),this.sCount.push(u),this.bsCount.push(0),h=!1,l=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Co.prototype.push=function(t,e,n){const r=new Kr(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};Co.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Co.prototype.skipEmptyLines=function(e){for(let n=this.lineMax;e<n&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};Co.prototype.skipSpaces=function(e){for(let n=this.src.length;e<n;e++){const r=this.src.charCodeAt(e);if(!xt(r))break}return e};Co.prototype.skipSpacesBack=function(e,n){if(e<=n)return e;for(;e>n;)if(!xt(this.src.charCodeAt(--e)))return e+1;return e};Co.prototype.skipChars=function(e,n){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===n;e++);return e};Co.prototype.skipCharsBack=function(e,n,r){if(e<=r)return e;for(;e>r;)if(n!==this.src.charCodeAt(--e))return e+1;return e};Co.prototype.getLines=function(e,n,r,o){if(e>=n)return"";const i=new Array(n-e);for(let s=0,l=e;l<n;l++,s++){let u=0;const d=this.bMarks[l];let h=d,p;for(l+1<n||o?p=this.eMarks[l]+1:p=this.eMarks[l];h<p&&u<r;){const m=this.src.charCodeAt(h);if(xt(m))m===9?u+=4-(u+this.bsCount[l])%4:u++;else if(h-d<this.tShift[l])u++;else break;h++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(h,p):i[s]=this.src.slice(h,p)}return i.join("")};Co.prototype.Token=Kr;const hq=65536;function yg(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function DC(t){const e=[],n=t.length;let r=0,o=t.charCodeAt(r),i=!1,s=0,l="";for(;r<n;)o===124&&(i?(l+=t.substring(s,r-1),s=r):(e.push(l+t.substring(s,r)),l="",s=r+1)),i=o===92,r++,o=t.charCodeAt(r);return e.push(l+t.substring(s)),e}function pq(t,e,n,r){if(e+2>n)return!1;let o=e+1;if(t.sCount[o]<t.blkIndent||t.sCount[o]-t.blkIndent>=4)return!1;let i=t.bMarks[o]+t.tShift[o];if(i>=t.eMarks[o])return!1;const s=t.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=t.eMarks[o])return!1;const l=t.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!xt(l)||s===45&&xt(l))return!1;for(;i<t.eMarks[o];){const M=t.src.charCodeAt(i);if(M!==124&&M!==45&&M!==58&&!xt(M))return!1;i++}let u=yg(t,e+1),d=u.split("|");const h=[];for(let M=0;M<d.length;M++){const N=d[M].trim();if(!N){if(M===0||M===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(N))return!1;N.charCodeAt(N.length-1)===58?h.push(N.charCodeAt(0)===58?"center":"right"):N.charCodeAt(0)===58?h.push("left"):h.push("")}if(u=yg(t,e).trim(),u.indexOf("|")===-1||t.sCount[e]-t.blkIndent>=4)return!1;d=DC(u),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();const p=d.length;if(p===0||p!==h.length)return!1;if(r)return!0;const m=t.parentType;t.parentType="table";const y=t.md.block.ruler.getRules("blockquote"),x=t.push("table_open","table",1),b=[e,0];x.map=b;const w=t.push("thead_open","thead",1);w.map=[e,e+1];const E=t.push("tr_open","tr",1);E.map=[e,e+1];for(let M=0;M<d.length;M++){const N=t.push("th_open","th",1);h[M]&&(N.attrs=[["style","text-align:"+h[M]]]);const D=t.push("inline","",0);D.content=d[M].trim(),D.children=[],t.push("th_close","th",-1)}t.push("tr_close","tr",-1),t.push("thead_close","thead",-1);let _,A=0;for(o=e+2;o<n&&!(t.sCount[o]<t.blkIndent);o++){let M=!1;for(let D=0,O=y.length;D<O;D++)if(y[D](t,o,n,!0)){M=!0;break}if(M||(u=yg(t,o).trim(),!u)||t.sCount[o]-t.blkIndent>=4||(d=DC(u),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),A+=p-d.length,A>hq))break;if(o===e+2){const D=t.push("tbody_open","tbody",1);D.map=_=[e+2,0]}const N=t.push("tr_open","tr",1);N.map=[o,o+1];for(let D=0;D<p;D++){const O=t.push("td_open","td",1);h[D]&&(O.attrs=[["style","text-align:"+h[D]]]);const I=t.push("inline","",0);I.content=d[D]?d[D].trim():"",I.children=[],t.push("td_close","td",-1)}t.push("tr_close","tr",-1)}return _&&(t.push("tbody_close","tbody",-1),_[1]=o),t.push("table_close","table",-1),b[1]=o,t.parentType=m,t.line=o,!0}function mq(t,e,n){if(t.sCount[e]-t.blkIndent<4)return!1;let r=e+1,o=r;for(;r<n;){if(t.isEmpty(r)){r++;continue}if(t.sCount[r]-t.blkIndent>=4){r++,o=r;continue}break}t.line=o;const i=t.push("code_block","code",0);return i.content=t.getLines(e,o,4+t.blkIndent,!1)+`
|
|
554
|
-
`,i.map=[e,t.line],!0}function gq(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||o+3>i)return!1;const s=t.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let l=o;o=t.skipChars(o,s);let u=o-l;if(u<3)return!1;const d=t.src.slice(l,o),h=t.src.slice(o,i);if(s===96&&h.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let p=e,m=!1;for(;p++,!(p>=n||(o=l=t.bMarks[p]+t.tShift[p],i=t.eMarks[p],o<i&&t.sCount[p]<t.blkIndent));)if(t.src.charCodeAt(o)===s&&!(t.sCount[p]-t.blkIndent>=4)&&(o=t.skipChars(o,s),!(o-l<u)&&(o=t.skipSpaces(o),!(o<i)))){m=!0;break}u=t.sCount[e],t.line=p+(m?1:0);const y=t.push("fence","code",0);return y.info=h,y.content=t.getLines(e+1,p,u,!0),y.markup=d,y.map=[e,t.line],!0}function yq(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];const s=t.lineMax;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(o)!==62)return!1;if(r)return!0;const l=[],u=[],d=[],h=[],p=t.md.block.ruler.getRules("blockquote"),m=t.parentType;t.parentType="blockquote";let y=!1,x;for(x=e;x<n;x++){const A=t.sCount[x]<t.blkIndent;if(o=t.bMarks[x]+t.tShift[x],i=t.eMarks[x],o>=i)break;if(t.src.charCodeAt(o++)===62&&!A){let N=t.sCount[x]+1,D,O;t.src.charCodeAt(o)===32?(o++,N++,O=!1,D=!0):t.src.charCodeAt(o)===9?(D=!0,(t.bsCount[x]+N)%4===3?(o++,N++,O=!1):O=!0):D=!1;let I=N;for(l.push(t.bMarks[x]),t.bMarks[x]=o;o<i;){const L=t.src.charCodeAt(o);if(xt(L))L===9?I+=4-(I+t.bsCount[x]+(O?1:0))%4:I++;else break;o++}y=o>=i,u.push(t.bsCount[x]),t.bsCount[x]=t.sCount[x]+1+(D?1:0),d.push(t.sCount[x]),t.sCount[x]=I-N,h.push(t.tShift[x]),t.tShift[x]=o-t.bMarks[x];continue}if(y)break;let M=!1;for(let N=0,D=p.length;N<D;N++)if(p[N](t,x,n,!0)){M=!0;break}if(M){t.lineMax=x,t.blkIndent!==0&&(l.push(t.bMarks[x]),u.push(t.bsCount[x]),h.push(t.tShift[x]),d.push(t.sCount[x]),t.sCount[x]-=t.blkIndent);break}l.push(t.bMarks[x]),u.push(t.bsCount[x]),h.push(t.tShift[x]),d.push(t.sCount[x]),t.sCount[x]=-1}const b=t.blkIndent;t.blkIndent=0;const w=t.push("blockquote_open","blockquote",1);w.markup=">";const E=[e,0];w.map=E,t.md.block.tokenize(t,e,x);const _=t.push("blockquote_close","blockquote",-1);_.markup=">",t.lineMax=s,t.parentType=m,E[1]=t.line;for(let A=0;A<h.length;A++)t.bMarks[A+e]=l[A],t.tShift[A+e]=h[A],t.sCount[A+e]=d[A],t.bsCount[A+e]=u[A];return t.blkIndent=b,!0}function xq(t,e,n,r){const o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let i=t.bMarks[e]+t.tShift[e];const s=t.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let l=1;for(;i<o;){const d=t.src.charCodeAt(i++);if(d!==s&&!xt(d))return!1;d===s&&l++}if(l<3)return!1;if(r)return!0;t.line=e+1;const u=t.push("hr","hr",0);return u.map=[e,t.line],u.markup=Array(l+1).join(String.fromCharCode(s)),!0}function RC(t,e){const n=t.eMarks[e];let r=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=t.src.charCodeAt(r);if(!xt(i))return-1}return r}function OC(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];let o=n;if(o+1>=r)return-1;let i=t.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=t.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=t.src.charCodeAt(o),!xt(i))?-1:o}function vq(t,e){const n=t.level+2;for(let r=e+2,o=t.tokens.length-2;r<o;r++)t.tokens[r].level===n&&t.tokens[r].type==="paragraph_open"&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}function bq(t,e,n,r){let o,i,s,l,u=e,d=!0;if(t.sCount[u]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[u]-t.listIndent>=4&&t.sCount[u]<t.blkIndent)return!1;let h=!1;r&&t.parentType==="paragraph"&&t.sCount[u]>=t.blkIndent&&(h=!0);let p,m,y;if((y=OC(t,u))>=0){if(p=!0,s=t.bMarks[u]+t.tShift[u],m=Number(t.src.slice(s,y-1)),h&&m!==1)return!1}else if((y=RC(t,u))>=0)p=!1;else return!1;if(h&&t.skipSpaces(y)>=t.eMarks[u])return!1;if(r)return!0;const x=t.src.charCodeAt(y-1),b=t.tokens.length;p?(l=t.push("ordered_list_open","ol",1),m!==1&&(l.attrs=[["start",m]])):l=t.push("bullet_list_open","ul",1);const w=[u,0];l.map=w,l.markup=String.fromCharCode(x);let E=!1;const _=t.md.block.ruler.getRules("list"),A=t.parentType;for(t.parentType="list";u<n;){i=y,o=t.eMarks[u];const M=t.sCount[u]+y-(t.bMarks[u]+t.tShift[u]);let N=M;for(;i<o;){const Q=t.src.charCodeAt(i);if(Q===9)N+=4-(N+t.bsCount[u])%4;else if(Q===32)N++;else break;i++}const D=i;let O;D>=o?O=1:O=N-M,O>4&&(O=1);const I=M+O;l=t.push("list_item_open","li",1),l.markup=String.fromCharCode(x);const L=[u,0];l.map=L,p&&(l.info=t.src.slice(s,y-1));const W=t.tight,Y=t.tShift[u],G=t.sCount[u],q=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=I,t.tight=!0,t.tShift[u]=D-t.bMarks[u],t.sCount[u]=N,D>=o&&t.isEmpty(u+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,u,n,!0),(!t.tight||E)&&(d=!1),E=t.line-u>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=q,t.tShift[u]=Y,t.sCount[u]=G,t.tight=W,l=t.push("list_item_close","li",-1),l.markup=String.fromCharCode(x),u=t.line,L[1]=u,u>=n||t.sCount[u]<t.blkIndent||t.sCount[u]-t.blkIndent>=4)break;let Z=!1;for(let Q=0,K=_.length;Q<K;Q++)if(_[Q](t,u,n,!0)){Z=!0;break}if(Z)break;if(p){if(y=OC(t,u),y<0)break;s=t.bMarks[u]+t.tShift[u]}else if(y=RC(t,u),y<0)break;if(x!==t.src.charCodeAt(y-1))break}return p?l=t.push("ordered_list_close","ol",-1):l=t.push("bullet_list_close","ul",-1),l.markup=String.fromCharCode(x),w[1]=u,t.line=u,t.parentType=A,d&&vq(t,b),!0}function kq(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e],s=e+1;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(o)!==91)return!1;function l(_){const A=t.lineMax;if(_>=A||t.isEmpty(_))return null;let M=!1;if(t.sCount[_]-t.blkIndent>3&&(M=!0),t.sCount[_]<0&&(M=!0),!M){const O=t.md.block.ruler.getRules("reference"),I=t.parentType;t.parentType="reference";let L=!1;for(let W=0,Y=O.length;W<Y;W++)if(O[W](t,_,A,!0)){L=!0;break}if(t.parentType=I,L)return null}const N=t.bMarks[_]+t.tShift[_],D=t.eMarks[_];return t.src.slice(N,D+1)}let u=t.src.slice(o,i+1);i=u.length;let d=-1;for(o=1;o<i;o++){const _=u.charCodeAt(o);if(_===91)return!1;if(_===93){d=o;break}else if(_===10){const A=l(s);A!==null&&(u+=A,i=u.length,s++)}else if(_===92&&(o++,o<i&&u.charCodeAt(o)===10)){const A=l(s);A!==null&&(u+=A,i=u.length,s++)}}if(d<0||u.charCodeAt(d+1)!==58)return!1;for(o=d+2;o<i;o++){const _=u.charCodeAt(o);if(_===10){const A=l(s);A!==null&&(u+=A,i=u.length,s++)}else if(!xt(_))break}const h=t.md.helpers.parseLinkDestination(u,o,i);if(!h.ok)return!1;const p=t.md.normalizeLink(h.str);if(!t.md.validateLink(p))return!1;o=h.pos;const m=o,y=s,x=o;for(;o<i;o++){const _=u.charCodeAt(o);if(_===10){const A=l(s);A!==null&&(u+=A,i=u.length,s++)}else if(!xt(_))break}let b=t.md.helpers.parseLinkTitle(u,o,i);for(;b.can_continue;){const _=l(s);if(_===null)break;u+=_,o=i,i=u.length,s++,b=t.md.helpers.parseLinkTitle(u,o,i,b)}let w;for(o<i&&x!==o&&b.ok?(w=b.str,o=b.pos):(w="",o=m,s=y);o<i;){const _=u.charCodeAt(o);if(!xt(_))break;o++}if(o<i&&u.charCodeAt(o)!==10&&w)for(w="",o=m,s=y;o<i;){const _=u.charCodeAt(o);if(!xt(_))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const E=Cp(u.slice(1,d));return E?(r||(typeof t.env.references>"u"&&(t.env.references={}),typeof t.env.references[E]>"u"&&(t.env.references[E]={title:w,href:p}),t.line=s),!0):!1}const wq=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Cq="[a-zA-Z_:][a-zA-Z0-9:._-]*",Sq="[^\"'=<>`\\x00-\\x20]+",Eq="'[^']*'",_q='"[^"]*"',Tq="(?:"+Sq+"|"+Eq+"|"+_q+")",Aq="(?:\\s+"+Cq+"(?:\\s*=\\s*"+Tq+")?)",vT="<[A-Za-z][A-Za-z0-9\\-]*"+Aq+"*\\s*\\/?>",bT="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Mq="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Nq="<[?][\\s\\S]*?[?]>",Dq="<![A-Za-z][^>]*>",Rq="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Oq=new RegExp("^(?:"+vT+"|"+bT+"|"+Mq+"|"+Nq+"|"+Dq+"|"+Rq+")"),Iq=new RegExp("^(?:"+vT+"|"+bT+")"),Ds=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+wq.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Iq.source+"\\s*$"),/^$/,!1]];function Pq(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(o)!==60)return!1;let s=t.src.slice(o,i),l=0;for(;l<Ds.length&&!Ds[l][0].test(s);l++);if(l===Ds.length)return!1;if(r)return Ds[l][2];let u=e+1;const d=Ds[l][1].test("");if(!Ds[l][1].test(s)){for(;u<n&&!(t.sCount[u]<t.blkIndent&&(d||!t.isEmpty(u)));u++)if(o=t.bMarks[u]+t.tShift[u],i=t.eMarks[u],s=t.src.slice(o,i),Ds[l][1].test(s)){s.length!==0&&u++;break}}t.line=u;const h=t.push("html_block","",0);return h.map=[e,u],h.content=t.getLines(e,u,t.blkIndent,!0),!0}function jq(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let s=t.src.charCodeAt(o);if(s!==35||o>=i)return!1;let l=1;for(s=t.src.charCodeAt(++o);s===35&&o<i&&l<=6;)l++,s=t.src.charCodeAt(++o);if(l>6||o<i&&!xt(s))return!1;if(r)return!0;i=t.skipSpacesBack(i,o);const u=t.skipCharsBack(i,35,o);u>o&&xt(t.src.charCodeAt(u-1))&&(i=u),t.line=e+1;const d=t.push("heading_open","h"+String(l),1);d.markup="########".slice(0,l),d.map=[e,t.line];const h=t.push("inline","",0);h.content=Sp(t.src.slice(o,i)),h.map=[e,t.line],h.children=[];const p=t.push("heading_close","h"+String(l),-1);return p.markup="########".slice(0,l),!0}function Lq(t,e,n){const r=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const o=t.parentType;t.parentType="paragraph";let i=0,s,l=e+1;for(;l<n&&!t.isEmpty(l);l++){if(t.sCount[l]-t.blkIndent>3)continue;if(t.sCount[l]>=t.blkIndent){let y=t.bMarks[l]+t.tShift[l];const x=t.eMarks[l];if(y<x&&(s=t.src.charCodeAt(y),(s===45||s===61)&&(y=t.skipChars(y,s),y=t.skipSpaces(y),y>=x))){i=s===61?1:2;break}}if(t.sCount[l]<0)continue;let m=!1;for(let y=0,x=r.length;y<x;y++)if(r[y](t,l,n,!0)){m=!0;break}if(m)break}if(!i)return t.parentType=o,!1;const u=Sp(t.getLines(e,l,t.blkIndent,!1));t.line=l+1;const d=t.push("heading_open","h"+String(i),1);d.markup=String.fromCharCode(s),d.map=[e,t.line];const h=t.push("inline","",0);h.content=u,h.map=[e,t.line-1],h.children=[];const p=t.push("heading_close","h"+String(i),-1);return p.markup=String.fromCharCode(s),t.parentType=o,!0}function Fq(t,e,n){const r=t.md.block.ruler.getRules("paragraph"),o=t.parentType;let i=e+1;for(t.parentType="paragraph";i<n&&!t.isEmpty(i);i++){if(t.sCount[i]-t.blkIndent>3||t.sCount[i]<0)continue;let d=!1;for(let h=0,p=r.length;h<p;h++)if(r[h](t,i,n,!0)){d=!0;break}if(d)break}const s=Sp(t.getLines(e,i,t.blkIndent,!1));t.line=i;const l=t.push("paragraph_open","p",1);l.map=[e,t.line];const u=t.push("inline","",0);return u.content=s,u.map=[e,t.line],u.children=[],t.push("paragraph_close","p",-1),t.parentType=o,!0}const pf=[["table",pq,["paragraph","reference"]],["code",mq],["fence",gq,["paragraph","reference","blockquote","list"]],["blockquote",yq,["paragraph","reference","blockquote","list"]],["hr",xq,["paragraph","reference","blockquote","list"]],["list",bq,["paragraph","reference","blockquote"]],["reference",kq],["html_block",Pq,["paragraph","reference","blockquote"]],["heading",jq,["paragraph","reference","blockquote"]],["lheading",Lq],["paragraph",Fq]];function Ep(){this.ruler=new Xn;for(let t=0;t<pf.length;t++)this.ruler.push(pf[t][0],pf[t][1],{alt:(pf[t][2]||[]).slice()})}Ep.prototype.tokenize=function(t,e,n){const r=this.ruler.getRules(""),o=r.length,i=t.md.options.maxNesting;let s=e,l=!1;for(;s<n&&(t.line=s=t.skipEmptyLines(s),!(s>=n||t.sCount[s]<t.blkIndent));){if(t.level>=i){t.line=n;break}const u=t.line;let d=!1;for(let h=0;h<o;h++)if(d=r[h](t,s,n,!1),d){if(u>=t.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),s=t.line,s<n&&t.isEmpty(s)&&(l=!0,s++,t.line=s)}};Ep.prototype.parse=function(t,e,n,r){if(!t)return;const o=new this.State(t,e,n,r);this.tokenize(o,o.line,o.lineMax)};Ep.prototype.State=Co;function Tc(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Tc.prototype.pushPending=function(){const t=new Kr("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};Tc.prototype.push=function(t,e,n){this.pending&&this.pushPending();const r=new Kr(t,e,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Tc.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t);let o;if(t===0)o=32;else if(t===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(t-1),(o&64512)===56320){const w=this.src.charCodeAt(t-2);o=(w&64512)===55296?65536+(w-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=t;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-t;let l=i<n?this.src.charCodeAt(i):32;if((l&64512)===55296){const w=this.src.charCodeAt(i+1);l=(w&64512)===56320?65536+(l-55296<<10)+(w-56320):65533}else(l&64512)===56320&&(l=65533);const u=sc(o)||ic(o),d=sc(l)||ic(l),h=oc(o),p=oc(l),m=!p&&(!d||h||u),y=!h&&(!u||p||d);return{can_open:m&&(e||!y||u),can_close:y&&(e||!m||d),length:s}};Tc.prototype.Token=Kr;function zq(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function $q(t,e){let n=t.pos;for(;n<t.posMax&&!zq(t.src.charCodeAt(n));)n++;return n===t.pos?!1:(e||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}const Bq=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Vq(t,e){if(!t.md.options.linkify||t.linkLevel>0)return!1;const n=t.pos,r=t.posMax;if(n+3>r||t.src.charCodeAt(n)!==58||t.src.charCodeAt(n+1)!==47||t.src.charCodeAt(n+2)!==47)return!1;const o=t.pending.match(Bq);if(!o)return!1;const i=o[1],s=t.md.linkify.matchAtStart(t.src.slice(n-i.length));if(!s)return!1;let l=s.url;if(l.length<=i.length)return!1;let u=l.length;for(;u>0&&l.charCodeAt(u-1)===42;)u--;u!==l.length&&(l=l.slice(0,u));const d=t.md.normalizeLink(l);if(!t.md.validateLink(d))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const h=t.push("link_open","a",1);h.attrs=[["href",d]],h.markup="linkify",h.info="auto";const p=t.push("text","",0);p.content=t.md.normalizeLinkText(l);const m=t.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return t.pos+=l.length-i.length,!0}function Hq(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==10)return!1;const r=t.pending.length-1,o=t.posMax;if(!e)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&t.pending.charCodeAt(i-1)===32;)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n<o&&xt(t.src.charCodeAt(n));)n++;return t.pos=n,!0}const Vx=[];for(let t=0;t<256;t++)Vx.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){Vx[t.charCodeAt(0)]=1});function Uq(t,e){let n=t.pos;const r=t.posMax;if(t.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=t.src.charCodeAt(n);if(o===10){for(e||t.push("hardbreak","br",0),n++;n<r&&(o=t.src.charCodeAt(n),!!xt(o));)n++;return t.pos=n,!0}if(o===32){if(!e){const l=t.push("text_special","",0);l.content="\\",l.markup="\\",l.info="escape"}return t.pos=n,!0}let i=t.src[n];if(o>=55296&&o<=56319&&n+1<r){const l=t.src.charCodeAt(n+1);l>=56320&&l<=57343&&(i+=t.src[n+1],n++)}const s="\\"+i;if(!e){const l=t.push("text_special","",0);o<256&&Vx[o]!==0?l.content=i:l.content=s,l.markup=s,l.info="escape"}return t.pos=n+1,!0}function Wq(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=t.posMax;for(;n<i&&t.src.charCodeAt(n)===96;)n++;const s=t.src.slice(o,n),l=s.length;if(t.backticksScanned&&(t.backticks[l]||0)<=o)return e||(t.pending+=s),t.pos+=l,!0;let u=n,d;for(;(d=t.src.indexOf("`",u))!==-1;){for(u=d+1;u<i&&t.src.charCodeAt(u)===96;)u++;const h=u-d;if(h===l){if(!e){const p=t.push("code_inline","code",0);p.markup=s,p.content=t.src.slice(n,d).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return t.pos=u,!0}t.backticks[h]=d}return t.backticksScanned=!0,e||(t.pending+=s),t.pos+=l,!0}function qq(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e||r!==126)return!1;const o=t.scanDelims(t.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let l;i%2&&(l=t.push("text","",0),l.content=s,i--);for(let u=0;u<i;u+=2)l=t.push("text","",0),l.content=s+s,t.delimiters.push({marker:r,length:0,token:t.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return t.pos+=o.length,!0}function IC(t,e){let n;const r=[],o=e.length;for(let i=0;i<o;i++){const s=e[i];if(s.marker!==126||s.end===-1)continue;const l=e[s.end];n=t.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=t.tokens[l.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",t.tokens[l.token-1].type==="text"&&t.tokens[l.token-1].content==="~"&&r.push(l.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<t.tokens.length&&t.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=t.tokens[s],t.tokens[s]=t.tokens[i],t.tokens[i]=n)}}function Kq(t){const e=t.tokens_meta,n=t.tokens_meta.length;IC(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&IC(t,e[r].delimiters)}const kT={tokenize:qq,postProcess:Kq};function Gq(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e||r!==95&&r!==42)return!1;const o=t.scanDelims(t.pos,r===42);for(let i=0;i<o.length;i++){const s=t.push("text","",0);s.content=String.fromCharCode(r),t.delimiters.push({marker:r,length:o.length,token:t.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return t.pos+=o.length,!0}function PC(t,e){const n=e.length;for(let r=n-1;r>=0;r--){const o=e[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=e[o.end],s=r>0&&e[r-1].end===o.end+1&&e[r-1].marker===o.marker&&e[r-1].token===o.token-1&&e[o.end+1].token===i.token+1,l=String.fromCharCode(o.marker),u=t.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?l+l:l,u.content="";const d=t.tokens[i.token];d.type=s?"strong_close":"em_close",d.tag=s?"strong":"em",d.nesting=-1,d.markup=s?l+l:l,d.content="",s&&(t.tokens[e[r-1].token].content="",t.tokens[e[o.end+1].token].content="",r--)}}function Zq(t){const e=t.tokens_meta,n=t.tokens_meta.length;PC(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&PC(t,e[r].delimiters)}const wT={tokenize:Gq,postProcess:Zq};function Jq(t,e){let n,r,o,i,s="",l="",u=t.pos,d=!0;if(t.src.charCodeAt(t.pos)!==91)return!1;const h=t.pos,p=t.posMax,m=t.pos+1,y=t.md.helpers.parseLinkLabel(t,t.pos,!0);if(y<0)return!1;let x=y+1;if(x<p&&t.src.charCodeAt(x)===40){for(d=!1,x++;x<p&&(n=t.src.charCodeAt(x),!(!xt(n)&&n!==10));x++);if(x>=p)return!1;if(u=x,o=t.md.helpers.parseLinkDestination(t.src,x,t.posMax),o.ok){for(s=t.md.normalizeLink(o.str),t.md.validateLink(s)?x=o.pos:s="",u=x;x<p&&(n=t.src.charCodeAt(x),!(!xt(n)&&n!==10));x++);if(o=t.md.helpers.parseLinkTitle(t.src,x,t.posMax),x<p&&u!==x&&o.ok)for(l=o.str,x=o.pos;x<p&&(n=t.src.charCodeAt(x),!(!xt(n)&&n!==10));x++);}(x>=p||t.src.charCodeAt(x)!==41)&&(d=!0),x++}if(d){if(typeof t.env.references>"u")return!1;if(x<p&&t.src.charCodeAt(x)===91?(u=x+1,x=t.md.helpers.parseLinkLabel(t,x),x>=0?r=t.src.slice(u,x++):x=y+1):x=y+1,r||(r=t.src.slice(m,y)),i=t.env.references[Cp(r)],!i)return t.pos=h,!1;s=i.href,l=i.title}if(!e){t.pos=m,t.posMax=y;const b=t.push("link_open","a",1),w=[["href",s]];b.attrs=w,l&&w.push(["title",l]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=x,t.posMax=p,!0}function Yq(t,e){let n,r,o,i,s,l,u,d,h="";const p=t.pos,m=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;const y=t.pos+2,x=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(x<0)return!1;if(i=x+1,i<m&&t.src.charCodeAt(i)===40){for(i++;i<m&&(n=t.src.charCodeAt(i),!(!xt(n)&&n!==10));i++);if(i>=m)return!1;for(d=i,l=t.md.helpers.parseLinkDestination(t.src,i,t.posMax),l.ok&&(h=t.md.normalizeLink(l.str),t.md.validateLink(h)?i=l.pos:h=""),d=i;i<m&&(n=t.src.charCodeAt(i),!(!xt(n)&&n!==10));i++);if(l=t.md.helpers.parseLinkTitle(t.src,i,t.posMax),i<m&&d!==i&&l.ok)for(u=l.str,i=l.pos;i<m&&(n=t.src.charCodeAt(i),!(!xt(n)&&n!==10));i++);else u="";if(i>=m||t.src.charCodeAt(i)!==41)return t.pos=p,!1;i++}else{if(typeof t.env.references>"u")return!1;if(i<m&&t.src.charCodeAt(i)===91?(d=i+1,i=t.md.helpers.parseLinkLabel(t,i),i>=0?o=t.src.slice(d,i++):i=x+1):i=x+1,o||(o=t.src.slice(y,x)),s=t.env.references[Cp(o)],!s)return t.pos=p,!1;h=s.href,u=s.title}if(!e){r=t.src.slice(y,x);const b=[];t.md.inline.parse(r,t.md,t.env,b);const w=t.push("image","img",0),E=[["src",h],["alt",""]];w.attrs=E,w.children=b,w.content=r,u&&E.push(["title",u])}return t.pos=i,t.posMax=m,!0}const Xq=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Qq=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function eK(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==60)return!1;const r=t.pos,o=t.posMax;for(;;){if(++n>=o)return!1;const s=t.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=t.src.slice(r+1,n);if(Qq.test(i)){const s=t.md.normalizeLink(i);if(!t.md.validateLink(s))return!1;if(!e){const l=t.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";const u=t.push("text","",0);u.content=t.md.normalizeLinkText(i);const d=t.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return t.pos+=i.length+2,!0}if(Xq.test(i)){const s=t.md.normalizeLink("mailto:"+i);if(!t.md.validateLink(s))return!1;if(!e){const l=t.push("link_open","a",1);l.attrs=[["href",s]],l.markup="autolink",l.info="auto";const u=t.push("text","",0);u.content=t.md.normalizeLinkText(i);const d=t.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return t.pos+=i.length+2,!0}return!1}function tK(t){return/^<a[>\s]/i.test(t)}function nK(t){return/^<\/a\s*>/i.test(t)}function rK(t){const e=t|32;return e>=97&&e<=122}function oK(t,e){if(!t.md.options.html)return!1;const n=t.posMax,r=t.pos;if(t.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=t.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!rK(o))return!1;const i=t.src.slice(r).match(Oq);if(!i)return!1;if(!e){const s=t.push("html_inline","",0);s.content=i[0],tK(s.content)&&t.linkLevel++,nK(s.content)&&t.linkLevel--}return t.pos+=i[0].length,!0}const iK=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,sK=/^&([a-z][a-z0-9]{1,31});/i;function aK(t,e){const n=t.pos,r=t.posMax;if(t.src.charCodeAt(n)!==38||n+1>=r)return!1;if(t.src.charCodeAt(n+1)===35){const i=t.src.slice(n).match(iK);if(i){if(!e){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),l=t.push("text_special","",0);l.content=$x(s)?rc(s):rc(65533),l.markup=i[0],l.info="entity"}return t.pos+=i[0].length,!0}}else{const i=t.src.slice(n).match(sK);if(i){const s=_W(i[0]);if(s!==i[0]){if(!e){const l=t.push("text_special","",0);l.content=s,l.markup=i[0],l.info="entity"}return t.pos+=i[0].length,!0}}}return!1}function jC(t){const e={},n=t.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const l=t[s];if(i.push(0),(t[r].marker!==l.marker||o!==l.token-1)&&(r=s),o=l.token,l.length=l.length||0,!l.close)continue;e.hasOwnProperty(l.marker)||(e[l.marker]=[-1,-1,-1,-1,-1,-1]);const u=e[l.marker][(l.open?3:0)+l.length%3];let d=r-i[r]-1,h=d;for(;d>u;d-=i[d]+1){const p=t[d];if(p.marker===l.marker&&p.open&&p.end<0){let m=!1;if((p.close||l.open)&&(p.length+l.length)%3===0&&(p.length%3!==0||l.length%3!==0)&&(m=!0),!m){const y=d>0&&!t[d-1].open?i[d-1]+1:0;i[s]=s-d+y,i[d]=y,l.open=!1,p.end=s,p.close=!1,h=-1,o=-2;break}}}h!==-1&&(e[l.marker][(l.open?3:0)+(l.length||0)%3]=h)}}function lK(t){const e=t.tokens_meta,n=t.tokens_meta.length;jC(t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&jC(e[r].delimiters)}function uK(t){let e,n,r=0;const o=t.tokens,i=t.tokens.length;for(e=n=0;e<i;e++)o[e].nesting<0&&r--,o[e].level=r,o[e].nesting>0&&r++,o[e].type==="text"&&e+1<i&&o[e+1].type==="text"?o[e+1].content=o[e].content+o[e+1].content:(e!==n&&(o[n]=o[e]),n++);e!==n&&(o.length=n)}const xg=[["text",$q],["linkify",Vq],["newline",Hq],["escape",Uq],["backticks",Wq],["strikethrough",kT.tokenize],["emphasis",wT.tokenize],["link",Jq],["image",Yq],["autolink",eK],["html_inline",oK],["entity",aK]],vg=[["balance_pairs",lK],["strikethrough",kT.postProcess],["emphasis",wT.postProcess],["fragments_join",uK]];function Ac(){this.ruler=new Xn;for(let t=0;t<xg.length;t++)this.ruler.push(xg[t][0],xg[t][1]);this.ruler2=new Xn;for(let t=0;t<vg.length;t++)this.ruler2.push(vg[t][0],vg[t][1])}Ac.prototype.skipToken=function(t){const e=t.pos,n=this.ruler.getRules(""),r=n.length,o=t.md.options.maxNesting,i=t.cache;if(typeof i[e]<"u"){t.pos=i[e];return}let s=!1;if(t.level<o){for(let l=0;l<r;l++)if(t.level++,s=n[l](t,!0),t.level--,s){if(e>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;s||t.pos++,i[e]=t.pos};Ac.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,r=t.posMax,o=t.md.options.maxNesting;for(;t.pos<r;){const i=t.pos;let s=!1;if(t.level<o){for(let l=0;l<n;l++)if(s=e[l](t,!1),s){if(i>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(t.pos>=r)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Ac.prototype.parse=function(t,e,n,r){const o=new this.State(t,e,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let l=0;l<s;l++)i[l](o)};Ac.prototype.State=Tc;function cK(t){const e={};t=t||{},e.src_Any=lT.source,e.src_Cc=uT.source,e.src_Z=dT.source,e.src_P=Fx.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const n="[><|]";return e.src_pseudo_letter=`(?:(?!${n}|${e.src_ZPCc})${e.src_Any})`,e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth=`(?:(?:(?!${e.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator=`(?=$|${n}|${e.src_ZPCc})(?!${t["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${e.src_ZPCc}))`,e.src_path=`(?:[/?#](?:(?!${e.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${e.src_ZCc}|\\]).)*\\]|\\((?:(?!${e.src_ZCc}|[)]).)*\\)|\\{(?:(?!${e.src_ZCc}|[}]).)*\\}|\\"(?:(?!${e.src_ZCc}|["]).)+\\"|\\'(?:(?!${e.src_ZCc}|[']).)+\\'|\\'(?=${e.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${e.src_ZCc}|[.]|$)|`+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${e.src_ZCc}|$)|;(?!${e.src_ZCc}|$)|\\!+(?!${e.src_ZCc}|[!]|$)|\\?(?!${e.src_ZCc}|[?]|$))+|\\/)?`,e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+`|${e.src_pseudo_letter}{1,63})`,e.src_domain="(?:"+e.src_xn+`|(?:${e.src_pseudo_letter})|(?:${e.src_pseudo_letter}(?:-|${e.src_pseudo_letter}){0,61}${e.src_pseudo_letter}))`,e.src_host=`(?:(?:(?:(?:${e.src_domain})\\.)*${e.src_domain}))`,e.tpl_host_fuzzy="(?:"+e.src_ip4+`|(?:(?:(?:${e.src_domain})\\.)+(?:%TLDS%)))`,e.tpl_host_no_ip_fuzzy=`(?:(?:(?:${e.src_domain})\\.)+(?:%TLDS%))`,e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${e.src_ZPCc}|>|$))`,e.tpl_email_fuzzy=`(^|${n}|"|\\(|${e.src_ZCc})(${e.src_email_name}@${e.tpl_host_fuzzy_strict})`,e.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${e.src_ZPCc}))((?![$+<=>^\`||])${e.tpl_host_port_fuzzy_strict}${e.src_path})`,e.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${e.src_ZPCc}))((?![$+<=>^\`||])${e.tpl_host_port_no_ip_fuzzy_strict}${e.src_path})`,e}function q1(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){t[r]=n[r]})}),t}function _p(t){return Object.prototype.toString.call(t)}function dK(t){return _p(t)==="[object String]"}function fK(t){return _p(t)==="[object Object]"}function hK(t){return _p(t)==="[object RegExp]"}function LC(t){return _p(t)==="[object Function]"}function pK(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const CT={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function mK(t){return Object.keys(t||{}).reduce(function(e,n){return e||CT.hasOwnProperty(n)},!1)}const gK={"http:":{validate:function(t,e,n){const r=t.slice(e);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){const r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){const r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},yK="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",xK="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function vK(t){return function(e,n){const r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}function FC(){return function(t,e){e.normalize(t)}}function Nh(t){const e=t.re=cK(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push(yK),n.push(e.src_xn),e.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.email_fuzzy_global=RegExp(r(e.tpl_email_fuzzy),"ig"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_fuzzy_global=RegExp(r(e.tpl_link_fuzzy),"ig"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.link_no_ip_fuzzy_global=RegExp(r(e.tpl_link_no_ip_fuzzy),"ig"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const o=[];t.__compiled__={};function i(l,u){throw new Error(`(LinkifyIt) Invalid schema "${l}": ${u}`)}Object.keys(t.__schemas__).forEach(function(l){const u=t.__schemas__[l];if(u===null)return;const d={validate:null,link:null};if(t.__compiled__[l]=d,fK(u)){hK(u.validate)?d.validate=vK(u.validate):LC(u.validate)?d.validate=u.validate:i(l,u),LC(u.normalize)?d.normalize=u.normalize:u.normalize?i(l,u):d.normalize=FC();return}if(dK(u)){o.push(l);return}i(l,u)}),o.forEach(function(l){t.__compiled__[t.__schemas__[l]]&&(t.__compiled__[l].validate=t.__compiled__[t.__schemas__[l]].validate,t.__compiled__[l].normalize=t.__compiled__[t.__schemas__[l]].normalize)}),t.__compiled__[""]={validate:null,normalize:FC()};const s=Object.keys(t.__compiled__).filter(function(l){return l.length>0&&t.__compiled__[l]}).map(pK).join("|");t.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${e.src_ZPCc}))(${s})`,"i"),t.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${e.src_ZPCc}))(${s})`,"ig"),t.re.schema_at_start=RegExp(`^${t.re.schema_search.source}`,"i"),t.re.pretest=RegExp(`(${t.re.schema_test.source})|(${t.re.host_fuzzy_test.source})|@`,"i")}function ST(t,e,n,r){const o=t.slice(n,r);this.schema=e.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function lr(t,e){if(!(this instanceof lr))return new lr(t,e);e||mK(t)&&(e=t,t={}),this.__opts__=q1({},CT,e),this.__schemas__=q1({},gK,t),this.__compiled__={},this.__tlds__=xK,this.__tlds_replaced__=!1,this.re={},Nh(this)}lr.prototype.add=function(e,n){return this.__schemas__[e]=n,Nh(this),this};lr.prototype.set=function(e){return this.__opts__=q1(this.__opts__,e),this};lr.prototype.test=function(e){if(!e.length)return!1;let n,r;if(this.re.schema_test.test(e)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(e))!==null;)if(this.testSchemaAt(e,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&e.match(this.re.email_fuzzy)!==null)};lr.prototype.pretest=function(e){return this.re.pretest.test(e)};lr.prototype.testSchemaAt=function(e,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(e,r,this):0};lr.prototype.match=function(e){const n=[],r=[],o=[],i=[];let s,l,u;function d(m,y){return m?y?m.index!==y.index?m.index<y.index?m:y:m.lastIndex>=y.lastIndex?m:y:m:y}if(!e.length)return null;if(this.re.schema_test.test(e))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(e))!==null;)l=this.testSchemaAt(e,s[2],u.lastIndex),l&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+l});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(e))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(e))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const h=[0,0,0];let p=0;for(;;){const m=[r[h[0]],i[h[1]],o[h[2]]],y=d(d(m[0],m[1]),m[2]);if(!y)break;if(y===m[0]?h[0]++:y===m[1]?h[1]++:h[2]++,y.index<p)continue;const x=new ST(e,y.schema,y.index,y.lastIndex);this.__compiled__[x.schema].normalize(x,this),n.push(x),p=y.lastIndex}return n.length?n:null};lr.prototype.matchAtStart=function(e){if(!e.length)return null;const n=this.re.schema_at_start.exec(e);if(!n)return null;const r=this.testSchemaAt(e,n[2],n[0].length);if(!r)return null;const o=new ST(e,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};lr.prototype.tlds=function(e,n){return e=Array.isArray(e)?e:[e],n?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Nh(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Nh(this),this)};lr.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)};lr.prototype.onCompile=function(){};const Za=2147483647,fo=36,Hx=1,ac=26,bK=38,kK=700,ET=72,_T=128,TT="-",wK=/^xn--/,CK=/[^\0-\x7F]/,SK=/[\x2E\u3002\uFF0E\uFF61]/g,EK={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},bg=fo-Hx,ho=Math.floor,kg=String.fromCharCode;function Li(t){throw new RangeError(EK[t])}function _K(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}function AT(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(SK,".");const o=t.split("."),i=_K(o,e).join(".");return r+i}function MT(t){const e=[];let n=0;const r=t.length;for(;n<r;){const o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=t.charCodeAt(n++);(i&64512)==56320?e.push(((o&1023)<<10)+(i&1023)+65536):(e.push(o),n--)}else e.push(o)}return e}const TK=t=>String.fromCodePoint(...t),AK=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:fo},zC=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},NT=function(t,e,n){let r=0;for(t=n?ho(t/kK):t>>1,t+=ho(t/e);t>bg*ac>>1;r+=fo)t=ho(t/bg);return ho(r+(bg+1)*t/(t+bK))},DT=function(t){const e=[],n=t.length;let r=0,o=_T,i=ET,s=t.lastIndexOf(TT);s<0&&(s=0);for(let l=0;l<s;++l)t.charCodeAt(l)>=128&&Li("not-basic"),e.push(t.charCodeAt(l));for(let l=s>0?s+1:0;l<n;){const u=r;for(let h=1,p=fo;;p+=fo){l>=n&&Li("invalid-input");const m=AK(t.charCodeAt(l++));m>=fo&&Li("invalid-input"),m>ho((Za-r)/h)&&Li("overflow"),r+=m*h;const y=p<=i?Hx:p>=i+ac?ac:p-i;if(m<y)break;const x=fo-y;h>ho(Za/x)&&Li("overflow"),h*=x}const d=e.length+1;i=NT(r-u,d,u==0),ho(r/d)>Za-o&&Li("overflow"),o+=ho(r/d),r%=d,e.splice(r++,0,o)}return String.fromCodePoint(...e)},RT=function(t){const e=[];t=MT(t);const n=t.length;let r=_T,o=0,i=ET;for(const u of t)u<128&&e.push(kg(u));const s=e.length;let l=s;for(s&&e.push(TT);l<n;){let u=Za;for(const h of t)h>=r&&h<u&&(u=h);const d=l+1;u-r>ho((Za-o)/d)&&Li("overflow"),o+=(u-r)*d,r=u;for(const h of t)if(h<r&&++o>Za&&Li("overflow"),h===r){let p=o;for(let m=fo;;m+=fo){const y=m<=i?Hx:m>=i+ac?ac:m-i;if(p<y)break;const x=p-y,b=fo-y;e.push(kg(zC(y+x%b,0))),p=ho(x/b)}e.push(kg(zC(p,0))),i=NT(o,d,l===s),o=0,++l}++o,++r}return e.join("")},MK=function(t){return AT(t,function(e){return wK.test(e)?DT(e.slice(4).toLowerCase()):e})},NK=function(t){return AT(t,function(e){return CK.test(e)?"xn--"+RT(e):e})},OT={version:"2.3.1",ucs2:{decode:MT,encode:TK},decode:DT,encode:RT,toASCII:NK,toUnicode:MK},DK={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},RK={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},OK={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},IK={default:DK,zero:RK,commonmark:OK},PK=/^(vbscript|javascript|file|data):/,jK=/^data:image\/(gif|png|jpeg|webp);/;function LK(t){const e=t.trim().toLowerCase();return PK.test(e)?jK.test(e):!0}const IT=["http:","https:","mailto:"];function FK(t){const e=Lx(t,!0);if(e.hostname&&(!e.protocol||IT.indexOf(e.protocol)>=0))try{e.hostname=OT.toASCII(e.hostname)}catch{}return _c(jx(e))}function zK(t){const e=Lx(t,!0);if(e.hostname&&(!e.protocol||IT.indexOf(e.protocol)>=0))try{e.hostname=OT.toUnicode(e.hostname)}catch{}return dl(jx(e),dl.defaultChars+"%")}function Qn(t,e){if(!(this instanceof Qn))return new Qn(t,e);e||zx(t)||(e=t||{},t="default"),this.inline=new Ac,this.block=new Ep,this.core=new Bx,this.renderer=new kl,this.linkify=new lr,this.validateLink=LK,this.normalizeLink=FK,this.normalizeLinkText=zK,this.utils=VW,this.helpers=wp({},qW),this.options={},this.configure(t),e&&this.set(e)}Qn.prototype.set=function(t){return wp(this.options,t),this};Qn.prototype.configure=function(t){const e=this;if(zx(t)){const n=t;if(t=IK[n],!t)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this};Qn.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));const r=t.filter(function(o){return n.indexOf(o)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Qn.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));const r=t.filter(function(o){return n.indexOf(o)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Qn.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};Qn.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens};Qn.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};Qn.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens};Qn.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const $K=new Gy({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(t){return["h"+t.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>({params:t.getAttribute("data-params")||""})}],toDOM(t){return["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")}}}],toDOM(t){return["ol",{start:t.attrs.order==1?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>({tight:t.hasAttribute("data-tight")})}],toDOM(t){return["ul",{"data-tight":t.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(t){return{src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")}}}],toDOM(t){return["img",t.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:t=>t.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(t){return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM(t){return["a",t.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function BK(t,e){if(t.isText&&e.isText&<.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}class VK{constructor(e,n){this.schema=e,this.tokenHandlers=n,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:lt.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(e,n.marks),s;o&&(s=BK(o,i))?r[r.length-1]=s:r.push(i)}openMark(e){let n=this.top();n.marks=e.addToSet(n.marks)}closeMark(e){let n=this.top();n.marks=e.removeFromSet(n.marks)}parseTokens(e){for(let n=0;n<e.length;n++){let r=e[n],o=this.tokenHandlers[r.type];if(!o)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");o(this,r,e,n)}}addNode(e,n,r){let o=this.top(),i=e.createAndFill(n,r,o?o.marks:[]);return i?(this.push(i),i):null}openNode(e,n){this.stack.push({type:e,attrs:n,content:[],marks:lt.none})}closeNode(){let e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}}function du(t,e,n,r){return t.getAttrs?t.getAttrs(e,n,r):t.attrs instanceof Function?t.attrs(e):t.attrs}function wg(t,e){return t.noCloseToken||e=="code_inline"||e=="code_block"||e=="fence"}function $C(t){return t[t.length-1]==`
|
|
555
|
-
`?t.slice(0,t.length-1):t}function Cg(){}function HK(t,e){let n=Object.create(null);for(let r in e){let o=e[r];if(o.block){let i=t.nodeType(o.block);wg(o,r)?n[r]=(s,l,u,d)=>{s.openNode(i,du(o,l,u,d)),s.addText($C(l.content)),s.closeNode()}:(n[r+"_open"]=(s,l,u,d)=>s.openNode(i,du(o,l,u,d)),n[r+"_close"]=s=>s.closeNode())}else if(o.node){let i=t.nodeType(o.node);n[r]=(s,l,u,d)=>s.addNode(i,du(o,l,u,d))}else if(o.mark){let i=t.marks[o.mark];wg(o,r)?n[r]=(s,l,u,d)=>{s.openMark(i.create(du(o,l,u,d))),s.addText($C(l.content)),s.closeMark(i)}:(n[r+"_open"]=(s,l,u,d)=>s.openMark(i.create(du(o,l,u,d))),n[r+"_close"]=s=>s.closeMark(i))}else if(o.ignore)wg(o,r)?n[r]=Cg:(n[r+"_open"]=Cg,n[r+"_close"]=Cg);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))}return n.text=(r,o)=>r.addText(o.content),n.inline=(r,o)=>r.parseTokens(o.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}let UK=class{constructor(e,n,r){this.schema=e,this.tokenizer=n,this.tokens=r,this.tokenHandlers=HK(e,r)}parse(e,n={}){let r=new VK(this.schema,this.tokenHandlers),o;r.parseTokens(this.tokenizer.parse(e,n));do o=r.closeNode();while(r.stack.length);return o||this.schema.topNodeType.createAndFill()}};function BC(t,e){for(;++e<t.length;)if(t[e].type!="list_item_open")return t[e].hidden;return!1}new UK($K,Qn("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(t,e,n)=>({tight:BC(e,n)})},ordered_list:{block:"ordered_list",getAttrs:(t,e,n)=>({order:+t.attrGet("start")||1,tight:BC(e,n)})},heading:{block:"heading",getAttrs:t=>({level:+t.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:t=>({params:t.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:t=>({src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:t=>({href:t.attrGet("href"),title:t.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const WK={open:"",close:"",mixable:!0};let qK=class{constructor(e,n,r={}){this.nodes=e,this.marks=n,this.options=r}serialize(e,n={}){n=Object.assign({},this.options,n);let r=new PT(this.nodes,this.marks,n);return r.renderContent(e),r.out}};const So=new qK({blockquote(t,e){t.wrapBlock("> ",null,e,()=>t.renderContent(e))},code_block(t,e){const n=e.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";t.write(r+(e.attrs.params||"")+`
|
|
556
|
-
`),t.text(e.textContent,!1),t.write(`
|
|
557
|
-
`),t.write(r),t.closeBlock(e)},heading(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e,!1),t.closeBlock(e)},horizontal_rule(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list(t,e){t.renderList(e," ",()=>(e.attrs.bullet||"*")+" ")},ordered_list(t,e){var n;let r=(n=e.attrs.order)!==null&&n!==void 0?n:1,o=String(r+e.childCount-1).length,i=t.repeat(" ",o+2);t.renderList(e,i,s=>{let l=String(r+s);return t.repeat(" ",o-l.length)+l+". "})},list_item(t,e){t.renderContent(e)},paragraph(t,e){t.renderInline(e),t.closeBlock(e)},image(t,e){t.write("]/g,"\\$&")+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(t,e,n,r){for(let o=r+1;o<n.childCount;o++)if(n.child(o).type!=e.type){t.write(`\\
|
|
558
|
-
`);return}},text(t,e){t.text(e.text,!t.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(t,e,n,r){return t.inAutolink=KK(e,n,r),t.inAutolink?"<":"["},close(t,e,n,r){let{inAutolink:o}=t;return t.inAutolink=void 0,o?">":"]("+e.attrs.href.replace(/[\(\)"]/g,"\\$&")+(e.attrs.title?` "${e.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(t,e,n,r){return VC(n.child(r),-1)},close(t,e,n,r){return VC(n.child(r-1),1)},escape:!1}});function VC(t,e){let n=/`+/g,r,o=0;if(t.isText)for(;r=n.exec(t.text);)o=Math.max(o,r[0].length);let i=o>0&&e>0?" `":"`";for(let s=0;s<o;s++)i+="`";return o>0&&e<0&&(i+=" "),i}function KK(t,e,n){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;let r=e.child(n);return!r.isText||r.text!=t.attrs.href||r.marks[r.marks.length-1]!=t?!1:n==e.childCount-1||!t.isInSet(e.child(n+1).marks)}let PT=class{constructor(e,n,r){this.nodes=e,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+=`
|
|
559
|
-
`),e>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let o=1;o<e;o++)this.out+=n+`
|
|
560
|
-
`}this.closed=null}}getMark(e){let n=this.marks[e];if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${e}\` not supported by Markdown renderer`);n=WK}return n}wrapBlock(e,n,r,o){let i=this.delim;this.write(n??e),this.delim+=e,o(),this.delim=i,this.closeBlock(r)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
|
|
561
|
-
`)}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,n=!0){let r=e.split(`
|
|
562
|
-
`);for(let o=0;o<r.length;o++)this.write(),!n&&r[o][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(r[o],this.atBlockStart):r[o],o!=r.length-1&&(this.out+=`
|
|
563
|
-
`)}render(e,n,r){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+e.type.name+"` not supported by Markdown renderer");e.type.isLeaf||(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}}renderContent(e){e.forEach((n,r,o)=>this.render(n,e,o))}renderInline(e,n=!0){this.atBlockStart=n;let r=[],o="",i=(s,l,u)=>{let d=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(d=d.filter(b=>{if(u+1==e.childCount)return!1;let w=e.child(u+1);return b.isInSet(w.marks)&&(!w.isText||/\S/.test(w.text))}));let h=o;if(o="",s&&s.isText&&d.some(b=>{let w=this.getMark(b.type.name);return w&&w.expelEnclosingWhitespace&&!b.isInSet(r)})){let[b,w,E]=/^(\s*)(.*)$/m.exec(s.text);w&&(h+=w,s=E?s.withText(E):null,s||(d=r))}if(s&&s.isText&&d.some(b=>{let w=this.getMark(b.type.name);return w&&w.expelEnclosingWhitespace&&!this.isMarkAhead(e,u+1,b)})){let[b,w,E]=/^(.*?)(\s*)$/m.exec(s.text);E&&(o=E,s=w?s.withText(w):null,s||(d=r))}let p=d.length?d[d.length-1]:null,m=p&&this.getMark(p.type.name).escape===!1,y=d.length-(m?1:0);e:for(let b=0;b<y;b++){let w=d[b];if(!this.getMark(w.type.name).mixable)break;for(let E=0;E<r.length;E++){let _=r[E];if(!this.getMark(_.type.name).mixable)break;if(w.eq(_)){b>E?d=d.slice(0,E).concat(w).concat(d.slice(E,b)).concat(d.slice(b+1,y)):E>b&&(d=d.slice(0,b).concat(d.slice(b+1,E)).concat(w).concat(d.slice(E,y)));continue e}}}let x=0;for(;x<Math.min(r.length,y)&&d[x].eq(r[x]);)++x;for(;x<r.length;)this.text(this.markString(r.pop(),!1,e,u),!1);if(h&&this.text(h),s){for(;r.length<y;){let b=d[r.length];r.push(b),this.text(this.markString(b,!0,e,u),!1),this.atBlockStart=!1}m&&s.isText?this.text(this.markString(p,!0,e,u)+s.text+this.markString(p,!1,e,u+1),!1):this.render(s,e,u),this.atBlockStart=!1}s!=null&&s.isText&&s.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,n,r){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let o=typeof e.attrs.tight<"u"?e.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,e.forEach((s,l,u)=>{u&&o&&this.flushClose(1),this.wrapBlock(n,r(u),e,()=>this.render(s,e,u))}),this.inTightList=i}esc(e,n=!1){return e=e.replace(/[`*\\~\[\]_]/g,(r,o)=>r=="_"&&o>0&&o+1<e.length&&e[o-1].match(/\w/)&&e[o+1].match(/\w/)?r:"\\"+r),n&&(e=e.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let n=e.indexOf('"')==-1?'""':e.indexOf("'")==-1?"''":"()";return n[0]+e+n[1]}repeat(e,n){let r="";for(let o=0;o<n;o++)r+=e;return r}markString(e,n,r,o){let i=this.getMark(e.type.name),s=n?i.open:i.close;return typeof s=="string"?s:s(this,e,r,o)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(e,n,r){for(;;n++){if(n>=e.childCount)return!1;let o=e.child(n);if(o.type.name!=this.options.hardBreakNodeName)return r.isInSet(o.marks);n++}}};var Sg,HC;function GK(){if(HC)return Sg;HC=1;var t=!0,e=!1,n=!1;Sg=function(b,w){w&&(t=!w.enabled,e=!!w.label,n=!!w.labelAfter),b.core.ruler.after("inline","github-task-lists",function(E){for(var _=E.tokens,A=2;A<_.length;A++)i(_,A)&&(s(_[A],E.Token),r(_[A-2],"class","task-list-item"+(t?"":" enabled")),r(_[o(_,A-2)],"class","contains-task-list"))})};function r(b,w,E){var _=b.attrIndex(w),A=[w,E];_<0?b.attrPush(A):b.attrs[_]=A}function o(b,w){for(var E=b[w].level-1,_=w-1;_>=0;_--)if(b[_].level===E)return _;return-1}function i(b,w){return p(b[w])&&m(b[w-1])&&y(b[w-2])&&x(b[w])}function s(b,w){if(b.children.unshift(l(b,w)),b.children[1].content=b.children[1].content.slice(3),b.content=b.content.slice(3),e)if(n){b.children.pop();var E="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);b.children[0].content=b.children[0].content.slice(0,-1)+' id="'+E+'">',b.children.push(h(b.content,E,w))}else b.children.unshift(u(w)),b.children.push(d(w))}function l(b,w){var E=new w("html_inline","",0),_=t?' disabled="" ':"";return b.content.indexOf("[ ] ")===0?E.content='<input class="task-list-item-checkbox"'+_+'type="checkbox">':(b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0)&&(E.content='<input class="task-list-item-checkbox" checked=""'+_+'type="checkbox">'),E}function u(b){var w=new b("html_inline","",0);return w.content="<label>",w}function d(b){var w=new b("html_inline","",0);return w.content="</label>",w}function h(b,w,E){var _=new E("html_inline","",0);return _.content='<label class="task-list-item-label" for="'+w+'">'+b+"</label>",_.attrs=[{for:w}],_}function p(b){return b.type==="inline"}function m(b){return b.type==="paragraph_open"}function y(b){return b.type==="list_item_open"}function x(b){return b.content.indexOf("[ ] ")===0||b.content.indexOf("[x] ")===0||b.content.indexOf("[X] ")===0}return Sg}var ZK=GK();const JK=X1(ZK);var YK=Object.defineProperty,XK=(t,e,n)=>e in t?YK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dh=(t,e,n)=>(XK(t,typeof e!="symbol"?e+"":e,n),n);const QK=Ct.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:t=>t.getAttribute("data-tight")==="true"||!t.querySelector("p"),renderHTML:t=>({class:t.tight?this.options.tightClass:null,"data-tight":t.tight?"true":null})}}}]},addCommands(){var t=this;return{toggleTight:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;function i(s){if(!r.isActive(s))return!1;const l=r.getAttributes(s);return o.updateAttributes(s,{tight:e??!(l!=null&&l.tight)})}return t.options.listTypes.some(s=>i(s))}}}}}),UC=Qn();function jT(t,e){return UC.inline.State.prototype.scanDelims.call({src:t,posMax:t.length}),new UC.inline.State(t,null,null,[]).scanDelims(e,!0)}function LT(t,e,n,r){let o=t.substring(0,n)+t.substring(n+e.length);return o=o.substring(0,n+r)+e+o.substring(n+r),o}function eG(t,e,n,r){let o=n,i=t;for(;o<r&&!jT(i,o).can_open;)i=LT(i,e,o,1),o++;return{text:i,from:o,to:r}}function tG(t,e,n,r){let o=r,i=t;for(;o>n&&!jT(i,o).can_close;)i=LT(i,e,o,-1),o--;return{text:i,from:n,to:o}}function nG(t,e,n,r){let o={text:t,from:n,to:r};return o=eG(o.text,e,o.from,o.to),o=tG(o.text,e,o.from,o.to),o.to-o.from<e.length+1&&(o.text=o.text.substring(0,o.from)+o.text.substring(o.to+e.length)),o.text}class rG extends PT{constructor(e,n,r){super(e,n,r??{}),Dh(this,"inTable",!1),this.inlines=[]}render(e,n,r){super.render(e,n,r);const o=this.inlines[this.inlines.length-1];if(o!=null&&o.start&&o!==null&&o!==void 0&&o.end){const{delimiter:i,start:s,end:l}=this.normalizeInline(o);this.out=nG(this.out,i,s,l),this.inlines.pop()}}markString(e,n,r,o){const i=this.marks[e.type.name];if(i.expelEnclosingWhitespace)if(n)this.inlines.push({start:this.out.length,delimiter:i.open});else{const s=this.inlines.pop();this.inlines.push({...s,end:this.out.length})}return super.markString(e,n,r,o)}normalizeInline(e){let{start:n,end:r}=e;for(;this.out.charAt(n).match(/\s/);)n++;return{...e,start:n}}}const FT=cr.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(t,e){var n,r;return this.editor.storage.markdown.options.html?(n=(r=WC(e))===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:"":(console.warn(`Tiptap Markdown: "${e.type.name}" mark is only available in html mode`),"")},close(t,e){var n,r;return this.editor.storage.markdown.options.html&&(n=(r=WC(e))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function WC(t){const e=t.type.schema,n=e.text(" ",[t]),o=Cc(re.from(n),e).match(/^(<.*?>) (<\/.*?>)$/);return o?[o[1],o[2]]:null}function Ux(t){const e=`<body>${t}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function oG(t){return t==null?void 0:t.replace(/</g,"<").replace(/>/g,">")}function iG(t){const e=t.parentElement,n=e.cloneNode();for(;e.firstChild&&e.firstChild!==t;)n.appendChild(e.firstChild);n.childNodes.length>0&&e.parentElement.insertBefore(n,e),e.parentElement.insertBefore(t,e),e.childNodes.length===0&&e.remove()}function sG(t){const e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}const Tp=ft.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(t,e,n){this.editor.storage.markdown.options.html?t.write(aG(e,n)):(console.warn(`Tiptap Markdown: "${e.type.name}" node is only available in html mode`),t.write(`[${e.type.name}]`)),e.isBlock&&t.closeBlock(e)},parse:{}}}}});function aG(t,e){const n=t.type.schema,r=Cc(re.from(t),n);return t.isBlock&&(e instanceof re||e.type.name===n.topNodeType.name)?lG(r):r}function lG(t){const n=Ux(t).firstElementChild;return n.innerHTML=n.innerHTML.trim()?`
|
|
564
|
-
${n.innerHTML}
|
|
565
|
-
`:`
|
|
566
|
-
`,n.outerHTML}const uG=ft.create({name:"blockquote"}),cG=uG.extend({addStorage(){return{markdown:{serialize:So.nodes.blockquote,parse:{}}}}}),dG=ft.create({name:"bulletList"}),zT=dG.extend({addStorage(){return{markdown:{serialize(t,e){return t.renderList(e," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),fG=ft.create({name:"codeBlock"}),hG=fG.extend({addStorage(){return{markdown:{serialize(t,e){t.write("```"+(e.attrs.language||"")+`
|
|
567
|
-
`),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},parse:{setup(t){var e;t.set({langPrefix:(e=this.options.languageClassPrefix)!==null&&e!==void 0?e:"language-"})},updateDOM(t){t.innerHTML=t.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}}}}),pG=ft.create({name:"hardBreak"}),$T=pG.extend({addStorage(){return{markdown:{serialize(t,e,n,r){for(let o=r+1;o<n.childCount;o++)if(n.child(o).type!=e.type){t.write(t.inTable?Tp.storage.markdown.serialize.call(this,t,e,n):`\\
|
|
568
|
-
`);return}},parse:{}}}}}),mG=ft.create({name:"heading"}),gG=mG.extend({addStorage(){return{markdown:{serialize:So.nodes.heading,parse:{}}}}}),yG=ft.create({name:"horizontalRule"}),xG=yG.extend({addStorage(){return{markdown:{serialize:So.nodes.horizontal_rule,parse:{}}}}}),vG=ft.create({name:"image"}),bG=vG.extend({addStorage(){return{markdown:{serialize:So.nodes.image,parse:{}}}}}),kG=ft.create({name:"listItem"}),wG=kG.extend({addStorage(){return{markdown:{serialize:So.nodes.list_item,parse:{}}}}}),CG=ft.create({name:"orderedList"});function SG(t,e,n){let r=0;for(;n-r>0&&e.child(n-r-1).type.name===t.type.name;r++);return r}const EG=CG.extend({addStorage(){return{markdown:{serialize(t,e,n,r){const o=e.attrs.start||1,i=String(o+e.childCount-1).length,s=t.repeat(" ",i+2),u=SG(e,n,r)%2?") ":". ";t.renderList(e,s,d=>{const h=String(o+d);return t.repeat(" ",i-h.length)+h+u})},parse:{}}}}}),_G=ft.create({name:"paragraph"}),TG=_G.extend({addStorage(){return{markdown:{serialize:So.nodes.paragraph,parse:{}}}}});function Eg(t){var e,n;return(e=t==null||(n=t.content)===null||n===void 0?void 0:n.content)!==null&&e!==void 0?e:[]}const AG=ft.create({name:"table"}),MG=AG.extend({addStorage(){return{markdown:{serialize(t,e,n){if(!NG(e)){Tp.storage.markdown.serialize.call(this,t,e,n);return}t.inTable=!0,e.forEach((r,o,i)=>{if(t.write("| "),r.forEach((s,l,u)=>{u&&t.write(" | ");const d=s.firstChild;d.textContent.trim()&&t.renderInline(d)}),t.write(" |"),t.ensureNewLine(),!i){const s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");t.write(`| ${s} |`),t.ensureNewLine()}}),t.closeBlock(e),t.inTable=!1},parse:{}}}}});function qC(t){return t.attrs.colspan>1||t.attrs.rowspan>1}function NG(t){const e=Eg(t),n=e[0],r=e.slice(1);return!(Eg(n).some(o=>o.type.name!=="tableHeader"||qC(o)||o.childCount>1)||r.some(o=>Eg(o).some(i=>i.type.name==="tableHeader"||qC(i)||i.childCount>1)))}const DG=ft.create({name:"taskItem"}),RG=DG.extend({addStorage(){return{markdown:{serialize(t,e){const n=e.attrs.checked?"[x]":"[ ]";t.write(`${n} `),t.renderContent(e)},parse:{updateDOM(t){[...t.querySelectorAll(".task-list-item")].forEach(e=>{const n=e.querySelector("input");e.setAttribute("data-type","taskItem"),n&&(e.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),OG=ft.create({name:"taskList"}),IG=OG.extend({addStorage(){return{markdown:{serialize:zT.storage.markdown.serialize,parse:{setup(t){t.use(JK)},updateDOM(t){[...t.querySelectorAll(".contains-task-list")].forEach(e=>{e.setAttribute("data-type","taskList")})}}}}}}),PG=ft.create({name:"text"}),jG=PG.extend({addStorage(){return{markdown:{serialize(t,e){t.text(oG(e.text))},parse:{}}}}}),LG=cr.create({name:"bold"}),FG=LG.extend({addStorage(){return{markdown:{serialize:So.marks.strong,parse:{}}}}}),zG=cr.create({name:"code"}),$G=zG.extend({addStorage(){return{markdown:{serialize:So.marks.code,parse:{}}}}}),BG=cr.create({name:"italic"}),VG=BG.extend({addStorage(){return{markdown:{serialize:So.marks.em,parse:{}}}}}),HG=cr.create({name:"link"}),UG=HG.extend({addStorage(){return{markdown:{serialize:So.marks.link,parse:{}}}}}),WG=cr.create({name:"strike"}),qG=WG.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),KG=[cG,zT,hG,$T,gG,xG,Tp,bG,wG,EG,TG,MG,RG,IG,jG,FG,$G,FT,VG,UG,qG];function Rh(t){var e,n;const r=(e=t.storage)===null||e===void 0?void 0:e.markdown,o=(n=KG.find(i=>i.name===t.name))===null||n===void 0?void 0:n.storage.markdown;return r||o?{...o,...r}:null}class GG{constructor(e){Dh(this,"editor",null),this.editor=e}serialize(e){const n=new rG(this.nodes,this.marks,{hardBreakNodeName:$T.name});return n.renderContent(e),n.out}get nodes(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(Tp)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&e!==void 0?e:[])}}get marks(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(FT)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&e!==void 0?e:[])}}serializeNode(e){var n;return(n=Rh(e))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:e.options})}serializeMark(e){var n;const r=(n=Rh(e))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:e.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:e.options}):r.close}:null}}class ZG{constructor(e,n){Dh(this,"editor",null),Dh(this,"md",null);let{html:r,linkify:o,breaks:i}=n;this.editor=e,this.md=this.withPatchedRenderer(Qn({html:r,linkify:o,breaks:i}))}parse(e){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string"){this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=Rh(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},this.md)});const r=this.md.render(e),o=Ux(r);return this.editor.extensionManager.extensions.forEach(i=>{var s;return(s=Rh(i))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:i.options},o)}),this.normalizeDOM(o,{inline:n,content:e}),o.innerHTML}return e}normalizeDOM(e,n){let{inline:r,content:o}=n;return this.normalizeBlocks(e),e.querySelectorAll("*").forEach(i=>{var s;((s=i.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!i.closest("pre")&&(i.nextSibling.textContent=i.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(e,o),e}normalizeBlocks(e){const r=Object.values(this.editor.schema.nodes).filter(o=>o.isBlock).map(o=>{var i;return(i=o.spec.parseDOM)===null||i===void 0?void 0:i.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...e.querySelectorAll(r)].forEach(o=>{o.parentElement.matches("p")&&iG(o)})}normalizeInline(e,n){var r;if((r=e.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var o,i,s,l;const u=e.firstElementChild,{nextElementSibling:d}=u,h=(o=(i=n.match(/^\s+/))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:"",p=d?"":(s=(l=n.match(/\s+$/))===null||l===void 0?void 0:l[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){u.innerHTML=`${u.innerHTML}${p}`;return}sG(u),e.innerHTML=`${h}${e.innerHTML}${p}`}}withPatchedRenderer(e){const n=r=>function(){const o=r(...arguments);return o===`
|
|
569
|
-
`?o:o[o.length-1]===`
|
|
570
|
-
`?o.slice(0,-1):o};return e.renderer.rules.hardbreak=n(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=n(e.renderer.rules.softbreak),e.renderer.rules.fence=n(e.renderer.rules.fence),e.renderer.rules.code_block=n(e.renderer.rules.code_block),e.renderer.renderToken=n(e.renderer.renderToken.bind(e.renderer)),e}}const JG=Ct.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new wt({key:new Vt("markdownClipboard"),props:{clipboardTextParser:(t,e,n)=>{if(n||!this.options.transformPastedText)return null;const r=this.editor.storage.markdown.parser.parse(t,{inline:!0});return Yo.fromSchema(this.editor.schema).parseSlice(Ux(r),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:t=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(t.content):null}})]}}),YG=Ct.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){const t=s6.Commands.config.addCommands();return{setContent:(e,n)=>r=>t.setContent(r.editor.storage.markdown.parser.parse(e),n)(r),insertContentAt:(e,n,r)=>o=>t.insertContentAt(e,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new ZG(this.editor,this.options),serializer:new GG(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[QK.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),JG.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function XG({value:t,onChange:e}){const n=AV({extensions:[eW,YG],content:t||"",onUpdate:({editor:r})=>{const o=r.storage;e(o.markdown.getMarkdown())},editorProps:{attributes:{class:"tiptap min-h-40 px-4 py-3 text-sm text-slate-800 outline-none"}}});return n?v.jsxs("div",{className:"overflow-hidden rounded-lg border border-slate-200 bg-white shadow-sm focus-within:border-indigo-400 focus-within:ring-2 focus-within:ring-indigo-100",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 border-b border-slate-100 bg-slate-50/60 px-2 py-1.5",children:[v.jsx(oo,{editor:n,on:"bold",cmd:r=>r.toggleBold(),title:"Kalın",children:v.jsx(bP,{className:"h-4 w-4"})}),v.jsx(oo,{editor:n,on:"italic",cmd:r=>r.toggleItalic(),title:"İtalik",children:v.jsx(c9,{className:"h-4 w-4"})}),v.jsx(_g,{}),v.jsx(oo,{editor:n,on:"heading",attrs:{level:2},cmd:r=>r.toggleHeading({level:2}),title:"Başlık 2",children:v.jsx(r9,{className:"h-4 w-4"})}),v.jsx(oo,{editor:n,on:"heading",attrs:{level:3},cmd:r=>r.toggleHeading({level:3}),title:"Başlık 3",children:v.jsx(i9,{className:"h-4 w-4"})}),v.jsx(_g,{}),v.jsx(oo,{editor:n,on:"bulletList",cmd:r=>r.toggleBulletList(),title:"Madde listesi",children:v.jsx(FE,{className:"h-4 w-4"})}),v.jsx(oo,{editor:n,on:"orderedList",cmd:r=>r.toggleOrderedList(),title:"Sıralı liste",children:v.jsx(m9,{className:"h-4 w-4"})}),v.jsx(oo,{editor:n,on:"blockquote",cmd:r=>r.toggleBlockquote(),title:"Alıntı",children:v.jsx(T9,{className:"h-4 w-4"})}),v.jsx(oo,{editor:n,on:"codeBlock",cmd:r=>r.toggleCodeBlock(),title:"Kod",children:v.jsx($P,{className:"h-4 w-4"})}),v.jsx(_g,{}),v.jsx(oo,{editor:n,cmd:r=>r.undo(),title:"Geri al",children:v.jsx(K9,{className:"h-4 w-4"})}),v.jsx(oo,{editor:n,cmd:r=>r.redo(),title:"Yinele",children:v.jsx(M9,{className:"h-4 w-4"})})]}),v.jsx(k6,{editor:n})]}):null}function oo({editor:t,on:e,attrs:n,cmd:r,title:o,children:i}){const s=e?t.isActive(e,n):!1;return v.jsx("button",{type:"button",title:o,onClick:()=>r(t.chain().focus()).run(),className:`flex h-8 w-8 items-center justify-center rounded-md transition ${s?"bg-indigo-100 text-indigo-700":"text-slate-500 hover:bg-slate-200/60"}`,children:i})}function _g(){return v.jsx("span",{className:"mx-1 h-5 w-px bg-slate-200"})}function QG(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return S.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const Ap=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wl(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Wx(t){return"nodeType"in t}function jn(t){var e,n;return t?wl(t)?t:Wx(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function qx(t){const{Document:e}=jn(t);return t instanceof e}function Mc(t){return wl(t)?!1:t instanceof jn(t).HTMLElement}function BT(t){return t instanceof jn(t).SVGElement}function Cl(t){return t?wl(t)?t.document:Wx(t)?qx(t)?t:Mc(t)||BT(t)?t.ownerDocument:document:document:document}const Hr=Ap?S.useLayoutEffect:S.useEffect;function Mp(t){const e=S.useRef(t);return Hr(()=>{e.current=t}),S.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function eZ(){const t=S.useRef(null),e=S.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=S.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function lc(t,e){e===void 0&&(e=[t]);const n=S.useRef(t);return Hr(()=>{n.current!==t&&(n.current=t)},e),n}function Nc(t,e){const n=S.useRef();return S.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Oh(t){const e=Mp(t),n=S.useRef(null),r=S.useCallback(o=>{o!==n.current&&(e==null||e(o,n.current)),n.current=o},[]);return[n,r]}function Ih(t){const e=S.useRef();return S.useEffect(()=>{e.current=t},[t]),e.current}let Tg={};function Dc(t,e){return S.useMemo(()=>{if(e)return e;const n=Tg[t]==null?0:Tg[t]+1;return Tg[t]=n,t+"-"+n},[t,e])}function VT(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const l=Object.entries(s);for(const[u,d]of l){const h=i[u];h!=null&&(i[u]=h+t*d)}return i},{...e})}}const Ja=VT(1),uc=VT(-1);function tZ(t){return"clientX"in t&&"clientY"in t}function Np(t){if(!t)return!1;const{KeyboardEvent:e}=jn(t.target);return e&&t instanceof e}function nZ(t){if(!t)return!1;const{TouchEvent:e}=jn(t.target);return e&&t instanceof e}function Ph(t){if(nZ(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return tZ(t)?{x:t.clientX,y:t.clientY}:null}const ri=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[ri.Translate.toString(t),ri.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),KC="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rZ(t){return t.matches(KC)?t:t.querySelector(KC)}const oZ={display:"none"};function iZ(t){let{id:e,value:n}=t;return te.createElement("div",{id:e,style:oZ},n)}function sZ(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return te.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function aZ(){const[t,e]=S.useState("");return{announce:S.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const HT=S.createContext(null);function lZ(t){const e=S.useContext(HT);S.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function uZ(){const[t]=S.useState(()=>new Set),e=S.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[S.useCallback(r=>{let{type:o,event:i}=r;t.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,i)})},[t]),e]}const cZ={draggable:`
|
|
571
|
-
To pick up a draggable item, press the space bar.
|
|
572
|
-
While dragging, use the arrow keys to move the item.
|
|
573
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
574
|
-
`},dZ={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function fZ(t){let{announcements:e=dZ,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=cZ}=t;const{announce:i,announcement:s}=aZ(),l=Dc("DndLiveRegion"),[u,d]=S.useState(!1);if(S.useEffect(()=>{d(!0)},[]),lZ(S.useMemo(()=>({onDragStart(p){let{active:m}=p;i(e.onDragStart({active:m}))},onDragMove(p){let{active:m,over:y}=p;e.onDragMove&&i(e.onDragMove({active:m,over:y}))},onDragOver(p){let{active:m,over:y}=p;i(e.onDragOver({active:m,over:y}))},onDragEnd(p){let{active:m,over:y}=p;i(e.onDragEnd({active:m,over:y}))},onDragCancel(p){let{active:m,over:y}=p;i(e.onDragCancel({active:m,over:y}))}}),[i,e])),!u)return null;const h=te.createElement(te.Fragment,null,te.createElement(iZ,{id:r,value:o.draggable}),te.createElement(sZ,{id:l,announcement:s}));return n?$r.createPortal(h,n):h}var Jt;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Jt||(Jt={}));function jh(){}function GC(t,e){return S.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function hZ(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return S.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const Ur=Object.freeze({x:0,y:0});function UT(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function pZ(t,e){const n=Ph(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function WT(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function mZ(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function ZC(t){let{left:e,top:n,height:r,width:o}=t;return[{x:e,y:n},{x:e+o,y:n},{x:e,y:n+r},{x:e+o,y:n+r}]}function qT(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function JC(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const gZ=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=JC(e,e.left,e.top),i=[];for(const s of r){const{id:l}=s,u=n.get(l);if(u){const d=UT(JC(u),o);i.push({id:l,data:{droppableContainer:s,value:d}})}}return i.sort(WT)},yZ=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=ZC(e),i=[];for(const s of r){const{id:l}=s,u=n.get(l);if(u){const d=ZC(u),h=o.reduce((m,y,x)=>m+UT(d[x],y),0),p=Number((h/4).toFixed(4));i.push({id:l,data:{droppableContainer:s,value:p}})}}return i.sort(WT)};function xZ(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),o=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),s=o-r,l=i-n;if(r<o&&n<i){const u=e.width*e.height,d=t.width*t.height,h=s*l,p=h/(u+d-h);return Number(p.toFixed(4))}return 0}const vZ=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const u=xZ(l,e);u>0&&o.push({id:s,data:{droppableContainer:i,value:u}})}}return o.sort(mZ)};function bZ(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function KT(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Ur}function kZ(t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,l)=>({...s,top:s.top+t*l.y,bottom:s.bottom+t*l.y,left:s.left+t*l.x,right:s.right+t*l.x}),{...n})}}const wZ=kZ(1);function GT(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function CZ(t,e,n){const r=GT(e);if(!r)return t;const{scaleX:o,scaleY:i,x:s,y:l}=r,u=t.left-s-(1-o)*parseFloat(n),d=t.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),h=o?t.width/o:t.width,p=i?t.height/i:t.height;return{width:h,height:p,top:d,right:u+h,bottom:d+p,left:u}}const SZ={ignoreTransform:!1};function Sl(t,e){e===void 0&&(e=SZ);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:d,transformOrigin:h}=jn(t).getComputedStyle(t);d&&(n=CZ(n,d,h))}const{top:r,left:o,width:i,height:s,bottom:l,right:u}=n;return{top:r,left:o,width:i,height:s,bottom:l,right:u}}function YC(t){return Sl(t,{ignoreTransform:!0})}function EZ(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function _Z(t,e){return e===void 0&&(e=jn(t).getComputedStyle(t)),e.position==="fixed"}function TZ(t,e){e===void 0&&(e=jn(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=e[o];return typeof i=="string"?n.test(i):!1})}function Dp(t,e){const n=[];function r(o){if(e!=null&&n.length>=e||!o)return n;if(qx(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Mc(o)||BT(o)||n.includes(o))return n;const i=jn(t).getComputedStyle(o);return o!==t&&TZ(o,i)&&n.push(o),_Z(o,i)?n:r(o.parentNode)}return t?r(t):n}function ZT(t){const[e]=Dp(t,1);return e??null}function Ag(t){return!Ap||!t?null:wl(t)?t:Wx(t)?qx(t)||t===Cl(t).scrollingElement?window:Mc(t)?t:null:null}function JT(t){return wl(t)?t.scrollX:t.scrollLeft}function YT(t){return wl(t)?t.scrollY:t.scrollTop}function K1(t){return{x:JT(t),y:YT(t)}}var sn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(sn||(sn={}));function XT(t){return!Ap||!t?!1:t===document.scrollingElement}function QT(t){const e={x:0,y:0},n=XT(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},o=t.scrollTop<=e.y,i=t.scrollLeft<=e.x,s=t.scrollTop>=r.y,l=t.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:l,maxScroll:r,minScroll:e}}const AZ={x:.2,y:.2};function MZ(t,e,n,r,o){let{top:i,left:s,right:l,bottom:u}=n;r===void 0&&(r=10),o===void 0&&(o=AZ);const{isTop:d,isBottom:h,isLeft:p,isRight:m}=QT(t),y={x:0,y:0},x={x:0,y:0},b={height:e.height*o.y,width:e.width*o.x};return!d&&i<=e.top+b.height?(y.y=sn.Backward,x.y=r*Math.abs((e.top+b.height-i)/b.height)):!h&&u>=e.bottom-b.height&&(y.y=sn.Forward,x.y=r*Math.abs((e.bottom-b.height-u)/b.height)),!m&&l>=e.right-b.width?(y.x=sn.Forward,x.x=r*Math.abs((e.right-b.width-l)/b.width)):!p&&s<=e.left+b.width&&(y.x=sn.Backward,x.x=r*Math.abs((e.left+b.width-s)/b.width)),{direction:y,speed:x}}function NZ(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:e,left:n,right:r,bottom:o}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:o,width:t.clientWidth,height:t.clientHeight}}function eA(t){return t.reduce((e,n)=>Ja(e,K1(n)),Ur)}function DZ(t){return t.reduce((e,n)=>e+JT(n),0)}function RZ(t){return t.reduce((e,n)=>e+YT(n),0)}function tA(t,e){if(e===void 0&&(e=Sl),!t)return;const{top:n,left:r,bottom:o,right:i}=e(t);ZT(t)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const OZ=[["x",["left","right"],DZ],["y",["top","bottom"],RZ]];class Kx{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Dp(n),o=eA(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,s,l]of OZ)for(const u of s)Object.defineProperty(this,u,{get:()=>{const d=l(r),h=o[i]-d;return this.rect[u]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ru{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var o;(o=this.target)==null||o.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function IZ(t){const{EventTarget:e}=jn(t);return t instanceof e?t:Cl(t)}function Mg(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var Cr;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Cr||(Cr={}));function XC(t){t.preventDefault()}function PZ(t){t.stopPropagation()}var Ze;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Ze||(Ze={}));const nA={start:[Ze.Space,Ze.Enter],cancel:[Ze.Esc],end:[Ze.Space,Ze.Enter,Ze.Tab]},jZ=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case Ze.Right:return{...n,x:n.x+25};case Ze.Left:return{...n,x:n.x-25};case Ze.Down:return{...n,y:n.y+25};case Ze.Up:return{...n,y:n.y-25}}};class Gx{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Ru(Cl(n)),this.windowListeners=new Ru(jn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Cr.Resize,this.handleCancel),this.windowListeners.add(Cr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Cr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&tA(r),n(Ur)}handleKeyDown(e){if(Np(e)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=nA,coordinateGetter:s=jZ,scrollBehavior:l="smooth"}=o,{code:u}=e;if(i.end.includes(u)){this.handleEnd(e);return}if(i.cancel.includes(u)){this.handleCancel(e);return}const{collisionRect:d}=r.current,h=d?{x:d.left,y:d.top}:Ur;this.referenceCoordinates||(this.referenceCoordinates=h);const p=s(e,{active:n,context:r.current,currentCoordinates:h});if(p){const m=uc(p,h),y={x:0,y:0},{scrollableAncestors:x}=r.current;for(const b of x){const w=e.code,{isTop:E,isRight:_,isLeft:A,isBottom:M,maxScroll:N,minScroll:D}=QT(b),O=NZ(b),I={x:Math.min(w===Ze.Right?O.right-O.width/2:O.right,Math.max(w===Ze.Right?O.left:O.left+O.width/2,p.x)),y:Math.min(w===Ze.Down?O.bottom-O.height/2:O.bottom,Math.max(w===Ze.Down?O.top:O.top+O.height/2,p.y))},L=w===Ze.Right&&!_||w===Ze.Left&&!A,W=w===Ze.Down&&!M||w===Ze.Up&&!E;if(L&&I.x!==p.x){const Y=b.scrollLeft+m.x,G=w===Ze.Right&&Y<=N.x||w===Ze.Left&&Y>=D.x;if(G&&!m.y){b.scrollTo({left:Y,behavior:l});return}G?y.x=b.scrollLeft-Y:y.x=w===Ze.Right?b.scrollLeft-N.x:b.scrollLeft-D.x,y.x&&b.scrollBy({left:-y.x,behavior:l});break}else if(W&&I.y!==p.y){const Y=b.scrollTop+m.y,G=w===Ze.Down&&Y<=N.y||w===Ze.Up&&Y>=D.y;if(G&&!m.x){b.scrollTo({top:Y,behavior:l});return}G?y.y=b.scrollTop-Y:y.y=w===Ze.Down?b.scrollTop-N.y:b.scrollTop-D.y,y.y&&b.scrollBy({top:-y.y,behavior:l});break}}this.handleMove(e,Ja(uc(p,this.referenceCoordinates),y))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Gx.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=nA,onActivation:o}=e,{active:i}=n;const{code:s}=t.nativeEvent;if(r.start.includes(s)){const l=i.activatorNode.current;return l&&t.target!==l?!1:(t.preventDefault(),o==null||o({event:t.nativeEvent}),!0)}return!1}}];function QC(t){return!!(t&&"distance"in t)}function eS(t){return!!(t&&"delay"in t)}class Zx{constructor(e,n,r){var o;r===void 0&&(r=IZ(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:s}=i;this.props=e,this.events=n,this.document=Cl(s),this.documentListeners=new Ru(this.document),this.listeners=new Ru(r),this.windowListeners=new Ru(jn(s)),this.initialCoordinates=(o=Ph(i))!=null?o:Ur,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Cr.Resize,this.handleCancel),this.windowListeners.add(Cr.DragStart,XC),this.windowListeners.add(Cr.VisibilityChange,this.handleCancel),this.windowListeners.add(Cr.ContextMenu,XC),this.documentListeners.add(Cr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(eS(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(QC(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:o}=this.props;o(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Cr.Click,PZ,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Cr.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:l}}=i;if(!o)return;const u=(n=Ph(e))!=null?n:Ur,d=uc(o,u);if(!r&&l){if(QC(l)){if(l.tolerance!=null&&Mg(d,l.tolerance))return this.handleCancel();if(Mg(d,l.distance))return this.handleStart()}if(eS(l)&&Mg(d,l.tolerance))return this.handleCancel();this.handlePending(l,d);return}e.cancelable&&e.preventDefault(),s(u)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===Ze.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const LZ={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Jx extends Zx{constructor(e){const{event:n}=e,r=Cl(n.target);super(e,LZ,r)}}Jx.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const FZ={move:{name:"mousemove"},end:{name:"mouseup"}};var G1;(function(t){t[t.RightClick=2]="RightClick"})(G1||(G1={}));class zZ extends Zx{constructor(e){super(e,FZ,Cl(e.event.target))}}zZ.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===G1.RightClick?!1:(r==null||r({event:n}),!0)}}];const Ng={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class $Z extends Zx{constructor(e){super(e,Ng)}static setup(){return window.addEventListener(Ng.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ng.move.name,e)};function e(){}}}$Z.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Ou;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Ou||(Ou={}));var Lh;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Lh||(Lh={}));function BZ(t){let{acceleration:e,activator:n=Ou.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:l=Lh.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:h,delta:p,threshold:m}=t;const y=HZ({delta:p,disabled:!i}),[x,b]=eZ(),w=S.useRef({x:0,y:0}),E=S.useRef({x:0,y:0}),_=S.useMemo(()=>{switch(n){case Ou.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Ou.DraggableRect:return o}},[n,o,u]),A=S.useRef(null),M=S.useCallback(()=>{const D=A.current;if(!D)return;const O=w.current.x*E.current.x,I=w.current.y*E.current.y;D.scrollBy(O,I)},[]),N=S.useMemo(()=>l===Lh.TreeOrder?[...d].reverse():d,[l,d]);S.useEffect(()=>{if(!i||!d.length||!_){b();return}for(const D of N){if((r==null?void 0:r(D))===!1)continue;const O=d.indexOf(D),I=h[O];if(!I)continue;const{direction:L,speed:W}=MZ(D,I,_,e,m);for(const Y of["x","y"])y[Y][L[Y]]||(W[Y]=0,L[Y]=0);if(W.x>0||W.y>0){b(),A.current=D,x(M,s),w.current=W,E.current=L;return}}w.current={x:0,y:0},E.current={x:0,y:0},b()},[e,M,r,b,i,s,JSON.stringify(_),JSON.stringify(y),x,d,N,h,JSON.stringify(m)])}const VZ={x:{[sn.Backward]:!1,[sn.Forward]:!1},y:{[sn.Backward]:!1,[sn.Forward]:!1}};function HZ(t){let{delta:e,disabled:n}=t;const r=Ih(e);return Nc(o=>{if(n||!r||!o)return VZ;const i={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[sn.Backward]:o.x[sn.Backward]||i.x===-1,[sn.Forward]:o.x[sn.Forward]||i.x===1},y:{[sn.Backward]:o.y[sn.Backward]||i.y===-1,[sn.Forward]:o.y[sn.Forward]||i.y===1}}},[n,e,r])}function UZ(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return Nc(o=>{var i;return e==null?null:(i=r??o)!=null?i:null},[r,e])}function WZ(t,e){return S.useMemo(()=>t.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:e(s.handler,r)}));return[...n,...i]},[]),[t,e])}var cc;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(cc||(cc={}));var Z1;(function(t){t.Optimized="optimized"})(Z1||(Z1={}));const tS=new Map;function qZ(t,e){let{dragging:n,dependencies:r,config:o}=e;const[i,s]=S.useState(null),{frequency:l,measure:u,strategy:d}=o,h=S.useRef(t),p=w(),m=lc(p),y=S.useCallback(function(E){E===void 0&&(E=[]),!m.current&&s(_=>_===null?E:_.concat(E.filter(A=>!_.includes(A))))},[m]),x=S.useRef(null),b=Nc(E=>{if(p&&!n)return tS;if(!E||E===tS||h.current!==t||i!=null){const _=new Map;for(let A of t){if(!A)continue;if(i&&i.length>0&&!i.includes(A.id)&&A.rect.current){_.set(A.id,A.rect.current);continue}const M=A.node.current,N=M?new Kx(u(M),M):null;A.rect.current=N,N&&_.set(A.id,N)}return _}return E},[t,i,n,p,u]);return S.useEffect(()=>{h.current=t},[t]),S.useEffect(()=>{p||y()},[n,p]),S.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),S.useEffect(()=>{p||typeof l!="number"||x.current!==null||(x.current=setTimeout(()=>{y(),x.current=null},l))},[l,p,y,...r]),{droppableRects:b,measureDroppableContainers:y,measuringScheduled:i!=null};function w(){switch(d){case cc.Always:return!1;case cc.BeforeDragging:return n;default:return!n}}}function Yx(t,e){return Nc(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function KZ(t,e){return Yx(t,e)}function GZ(t){let{callback:e,disabled:n}=t;const r=Mp(e),o=S.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return S.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Rp(t){let{callback:e,disabled:n}=t;const r=Mp(e),o=S.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return S.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function ZZ(t){return new Kx(Sl(t),t)}function nS(t,e,n){e===void 0&&(e=ZZ);const[r,o]=S.useState(null);function i(){o(u=>{if(!t)return null;if(t.isConnected===!1){var d;return(d=u??n)!=null?d:null}const h=e(t);return JSON.stringify(u)===JSON.stringify(h)?u:h})}const s=GZ({callback(u){if(t)for(const d of u){const{type:h,target:p}=d;if(h==="childList"&&p instanceof HTMLElement&&p.contains(t)){i();break}}}}),l=Rp({callback:i});return Hr(()=>{i(),t?(l==null||l.observe(t),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[t]),r}function JZ(t){const e=Yx(t);return KT(t,e)}const rS=[];function YZ(t){const e=S.useRef(t),n=Nc(r=>t?r&&r!==rS&&t&&e.current&&t.parentNode===e.current.parentNode?r:Dp(t):rS,[t]);return S.useEffect(()=>{e.current=t},[t]),n}function XZ(t){const[e,n]=S.useState(null),r=S.useRef(t),o=S.useCallback(i=>{const s=Ag(i.target);s&&n(l=>l?(l.set(s,K1(s)),new Map(l)):null)},[]);return S.useEffect(()=>{const i=r.current;if(t!==i){s(i);const l=t.map(u=>{const d=Ag(u);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,K1(d)]):null}).filter(u=>u!=null);n(l.length?new Map(l):null),r.current=t}return()=>{s(t),s(i)};function s(l){l.forEach(u=>{const d=Ag(u);d==null||d.removeEventListener("scroll",o)})}},[o,t]),S.useMemo(()=>t.length?e?Array.from(e.values()).reduce((i,s)=>Ja(i,s),Ur):eA(t):Ur,[t,e])}function oS(t,e){e===void 0&&(e=[]);const n=S.useRef(null);return S.useEffect(()=>{n.current=null},e),S.useEffect(()=>{const r=t!==Ur;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?uc(t,n.current):Ur}function QZ(t){S.useEffect(()=>{if(!Ap)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function eJ(t,e){return S.useMemo(()=>t.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,e)},n},{}),[t,e])}function rA(t){return S.useMemo(()=>t?EZ(t):null,[t])}const iS=[];function tJ(t,e){e===void 0&&(e=Sl);const[n]=t,r=rA(n?jn(n):null),[o,i]=S.useState(iS);function s(){i(()=>t.length?t.map(u=>XT(u)?r:new Kx(e(u),u)):iS)}const l=Rp({callback:s});return Hr(()=>{l==null||l.disconnect(),s(),t.forEach(u=>l==null?void 0:l.observe(u))},[t]),o}function oA(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Mc(e)?e:t}function nJ(t){let{measure:e}=t;const[n,r]=S.useState(null),o=S.useCallback(d=>{for(const{target:h}of d)if(Mc(h)){r(p=>{const m=e(h);return p?{...p,width:m.width,height:m.height}:m});break}},[e]),i=Rp({callback:o}),s=S.useCallback(d=>{const h=oA(d);i==null||i.disconnect(),h&&(i==null||i.observe(h)),r(h?e(h):null)},[e,i]),[l,u]=Oh(s);return S.useMemo(()=>({nodeRef:l,rect:n,setRef:u}),[n,l,u])}const rJ=[{sensor:Jx,options:{}},{sensor:Gx,options:{}}],oJ={current:{}},Tf={draggable:{measure:YC},droppable:{measure:YC,strategy:cc.WhileDragging,frequency:Z1.Optimized},dragOverlay:{measure:Sl}};class Iu extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const iJ={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Iu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:jh},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Tf,measureDroppableContainers:jh,windowRect:null,measuringScheduled:!1},iA={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:jh,draggableNodes:new Map,over:null,measureDroppableContainers:jh},Rc=S.createContext(iA),sA=S.createContext(iJ);function sJ(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Iu}}}function aJ(t,e){switch(e.type){case Jt.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Jt.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case Jt.DragEnd:case Jt.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Jt.RegisterDroppable:{const{element:n}=e,{id:r}=n,o=new Iu(t.droppable.containers);return o.set(r,n),{...t,droppable:{...t.droppable,containers:o}}}case Jt.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=e,i=t.droppable.containers.get(n);if(!i||r!==i.key)return t;const s=new Iu(t.droppable.containers);return s.set(n,{...i,disabled:o}),{...t,droppable:{...t.droppable,containers:s}}}case Jt.UnregisterDroppable:{const{id:n,key:r}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const i=new Iu(t.droppable.containers);return i.delete(n),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function lJ(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:o}=S.useContext(Rc),i=Ih(r),s=Ih(n==null?void 0:n.id);return S.useEffect(()=>{if(!e&&!r&&i&&s!=null){if(!Np(i)||document.activeElement===i.target)return;const l=o.get(s);if(!l)return;const{activatorNode:u,node:d}=l;if(!u.current&&!d.current)return;requestAnimationFrame(()=>{for(const h of[u.current,d.current]){if(!h)continue;const p=rZ(h);if(p){p.focus();break}}})}},[r,e,o,s,i]),null}function aA(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((o,i)=>i({transform:o,...r}),n):n}function uJ(t){return S.useMemo(()=>({draggable:{...Tf.draggable,...t==null?void 0:t.draggable},droppable:{...Tf.droppable,...t==null?void 0:t.droppable},dragOverlay:{...Tf.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function cJ(t){let{activeNode:e,measure:n,initialRect:r,config:o=!0}=t;const i=S.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;Hr(()=>{if(!s&&!l||!e){i.current=!1;return}if(i.current||!r)return;const d=e==null?void 0:e.node.current;if(!d||d.isConnected===!1)return;const h=n(d),p=KT(h,r);if(s||(p.x=0),l||(p.y=0),i.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const m=ZT(d);m&&m.scrollBy({top:p.y,left:p.x})}},[e,s,l,r,n])}const Op=S.createContext({...Ur,scaleX:1,scaleY:1});var Fi;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Fi||(Fi={}));const dJ=S.memo(function(e){var n,r,o,i;let{id:s,accessibility:l,autoScroll:u=!0,children:d,sensors:h=rJ,collisionDetection:p=vZ,measuring:m,modifiers:y,...x}=e;const b=S.useReducer(aJ,void 0,sJ),[w,E]=b,[_,A]=uZ(),[M,N]=S.useState(Fi.Uninitialized),D=M===Fi.Initialized,{draggable:{active:O,nodes:I,translate:L},droppable:{containers:W}}=w,Y=O!=null?I.get(O):null,G=S.useRef({initial:null,translated:null}),q=S.useMemo(()=>{var mt;return O!=null?{id:O,data:(mt=Y==null?void 0:Y.data)!=null?mt:oJ,rect:G}:null},[O,Y]),Z=S.useRef(null),[Q,K]=S.useState(null),[J,U]=S.useState(null),ee=lc(x,Object.values(x)),F=Dc("DndDescribedBy",s),P=S.useMemo(()=>W.getEnabled(),[W]),B=uJ(m),{droppableRects:ne,measureDroppableContainers:fe,measuringScheduled:ue}=qZ(P,{dragging:D,dependencies:[L.x,L.y],config:B.droppable}),he=UZ(I,O),Ae=S.useMemo(()=>J?Ph(J):null,[J]),X=Zr(),ce=KZ(he,B.draggable.measure);cJ({activeNode:O!=null?I.get(O):null,config:X.layoutShiftCompensation,initialRect:ce,measure:B.draggable.measure});const pe=nS(he,B.draggable.measure,ce),Le=nS(he?he.parentElement:null),Me=S.useRef({activatorEvent:null,active:null,activeNode:he,collisionRect:null,collisions:null,droppableRects:ne,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=W.getNodeFor((n=Me.current.over)==null?void 0:n.id),Je=nJ({measure:B.dragOverlay.measure}),At=(r=Je.nodeRef.current)!=null?r:he,Pt=D?(o=Je.rect)!=null?o:pe:null,Ht=!!(Je.nodeRef.current&&Je.rect),Ln=JZ(Ht?null:pe),Ut=rA(At?jn(At):null),Qt=YZ(D?ze??he:null),An=tJ(Qt),ht=aA(y,{transform:{x:L.x-Ln.x,y:L.y-Ln.y,scaleX:1,scaleY:1},activatorEvent:J,active:q,activeNodeRect:pe,containerNodeRect:Le,draggingNodeRect:Pt,over:Me.current.over,overlayNodeRect:Je.rect,scrollableAncestors:Qt,scrollableAncestorRects:An,windowRect:Ut}),dr=Ae?Ja(Ae,L):null,hs=XZ(Qt),da=oS(hs),_o=oS(hs,[pe]),fr=Ja(ht,da),Fn=Pt?wZ(Pt,ht):null,hr=q&&Fn?p({active:q,collisionRect:Fn,droppableRects:ne,droppableContainers:P,pointerCoordinates:dr}):null,Mn=qT(hr,"id"),[fn,Nr]=S.useState(null),fa=Ht?ht:Ja(ht,_o),ha=bZ(fa,(i=fn==null?void 0:fn.rect)!=null?i:null,pe),ui=S.useRef(null),To=S.useCallback((mt,Wt)=>{let{sensor:_e,options:it}=Wt;if(Z.current==null)return;const et=I.get(Z.current);if(!et)return;const st=mt.nativeEvent,qt=new _e({active:Z.current,activeNode:et,event:st,options:it,context:Me,onAbort(Ke){if(!I.get(Ke))return;const{onDragAbort:dt}=ee.current,Et={id:Ke};dt==null||dt(Et),_({type:"onDragAbort",event:Et})},onPending(Ke,hn,dt,Et){if(!I.get(Ke))return;const{onDragPending:en}=ee.current,Bn={id:Ke,constraint:hn,initialCoordinates:dt,offset:Et};en==null||en(Bn),_({type:"onDragPending",event:Bn})},onStart(Ke){const hn=Z.current;if(hn==null)return;const dt=I.get(hn);if(!dt)return;const{onDragStart:Et}=ee.current,$n={activatorEvent:st,active:{id:hn,data:dt.data,rect:G}};$r.unstable_batchedUpdates(()=>{Et==null||Et($n),N(Fi.Initializing),E({type:Jt.DragStart,initialCoordinates:Ke,active:hn}),_({type:"onDragStart",event:$n}),K(ui.current),U(st)})},onMove(Ke){E({type:Jt.DragMove,coordinates:Ke})},onEnd:pt(Jt.DragEnd),onCancel:pt(Jt.DragCancel)});ui.current=qt;function pt(Ke){return async function(){const{active:dt,collisions:Et,over:$n,scrollAdjustedTranslate:en}=Me.current;let Bn=null;if(dt&&en){const{cancelDrop:Ao}=ee.current;Bn={activatorEvent:st,active:dt,collisions:Et,delta:en,over:$n},Ke===Jt.DragEnd&&typeof Ao=="function"&&await Promise.resolve(Ao(Bn))&&(Ke=Jt.DragCancel)}Z.current=null,$r.unstable_batchedUpdates(()=>{E({type:Ke}),N(Fi.Uninitialized),Nr(null),K(null),U(null),ui.current=null;const Ao=Ke===Jt.DragEnd?"onDragEnd":"onDragCancel";if(Bn){const El=ee.current[Ao];El==null||El(Bn),_({type:Ao,event:Bn})}})}}},[I]),ps=S.useCallback((mt,Wt)=>(_e,it)=>{const et=_e.nativeEvent,st=I.get(it);if(Z.current!==null||!st||et.dndKit||et.defaultPrevented)return;const qt={active:st};mt(_e,Wt.options,qt)===!0&&(et.dndKit={capturedBy:Wt.sensor},Z.current=it,To(_e,Wt))},[I,To]),Gr=WZ(h,ps);QZ(h),Hr(()=>{pe&&M===Fi.Initializing&&N(Fi.Initialized)},[pe,M]),S.useEffect(()=>{const{onDragMove:mt}=ee.current,{active:Wt,activatorEvent:_e,collisions:it,over:et}=Me.current;if(!Wt||!_e)return;const st={active:Wt,activatorEvent:_e,collisions:it,delta:{x:fr.x,y:fr.y},over:et};$r.unstable_batchedUpdates(()=>{mt==null||mt(st),_({type:"onDragMove",event:st})})},[fr.x,fr.y]),S.useEffect(()=>{const{active:mt,activatorEvent:Wt,collisions:_e,droppableContainers:it,scrollAdjustedTranslate:et}=Me.current;if(!mt||Z.current==null||!Wt||!et)return;const{onDragOver:st}=ee.current,qt=it.get(Mn),pt=qt&&qt.rect.current?{id:qt.id,rect:qt.rect.current,data:qt.data,disabled:qt.disabled}:null,Ke={active:mt,activatorEvent:Wt,collisions:_e,delta:{x:et.x,y:et.y},over:pt};$r.unstable_batchedUpdates(()=>{Nr(pt),st==null||st(Ke),_({type:"onDragOver",event:Ke})})},[Mn]),Hr(()=>{Me.current={activatorEvent:J,active:q,activeNode:he,collisionRect:Fn,collisions:hr,droppableRects:ne,draggableNodes:I,draggingNode:At,draggingNodeRect:Pt,droppableContainers:W,over:fn,scrollableAncestors:Qt,scrollAdjustedTranslate:fr},G.current={initial:Pt,translated:Fn}},[q,he,hr,Fn,I,At,Pt,ne,W,fn,Qt,fr]),BZ({...X,delta:L,draggingRect:Fn,pointerCoordinates:dr,scrollableAncestors:Qt,scrollableAncestorRects:An});const zn=S.useMemo(()=>({active:q,activeNode:he,activeNodeRect:pe,activatorEvent:J,collisions:hr,containerNodeRect:Le,dragOverlay:Je,draggableNodes:I,droppableContainers:W,droppableRects:ne,over:fn,measureDroppableContainers:fe,scrollableAncestors:Qt,scrollableAncestorRects:An,measuringConfiguration:B,measuringScheduled:ue,windowRect:Ut}),[q,he,pe,J,hr,Le,Je,I,W,ne,fn,fe,Qt,An,B,ue,Ut]),ms=S.useMemo(()=>({activatorEvent:J,activators:Gr,active:q,activeNodeRect:pe,ariaDescribedById:{draggable:F},dispatch:E,draggableNodes:I,over:fn,measureDroppableContainers:fe}),[J,Gr,q,pe,E,F,I,fn,fe]);return te.createElement(HT.Provider,{value:A},te.createElement(Rc.Provider,{value:ms},te.createElement(sA.Provider,{value:zn},te.createElement(Op.Provider,{value:ha},d)),te.createElement(lJ,{disabled:(l==null?void 0:l.restoreFocus)===!1})),te.createElement(fZ,{...l,hiddenTextDescribedById:F}));function Zr(){const mt=(Q==null?void 0:Q.autoScrollEnabled)===!1,Wt=typeof u=="object"?u.enabled===!1:u===!1,_e=D&&!mt&&!Wt;return typeof u=="object"?{...u,enabled:_e}:{enabled:_e}}}),fJ=S.createContext(null),sS="button",hJ="Draggable";function pJ(t){let{id:e,data:n,disabled:r=!1,attributes:o}=t;const i=Dc(hJ),{activators:s,activatorEvent:l,active:u,activeNodeRect:d,ariaDescribedById:h,draggableNodes:p,over:m}=S.useContext(Rc),{role:y=sS,roleDescription:x="draggable",tabIndex:b=0}=o??{},w=(u==null?void 0:u.id)===e,E=S.useContext(w?Op:fJ),[_,A]=Oh(),[M,N]=Oh(),D=eJ(s,e),O=lc(n);Hr(()=>(p.set(e,{id:e,key:i,node:_,activatorNode:M,data:O}),()=>{const L=p.get(e);L&&L.key===i&&p.delete(e)}),[p,e]);const I=S.useMemo(()=>({role:y,tabIndex:b,"aria-disabled":r,"aria-pressed":w&&y===sS?!0:void 0,"aria-roledescription":x,"aria-describedby":h.draggable}),[r,y,b,w,x,h.draggable]);return{active:u,activatorEvent:l,activeNodeRect:d,attributes:I,isDragging:w,listeners:r?void 0:D,node:_,over:m,setNodeRef:A,setActivatorNodeRef:N,transform:E}}function lA(){return S.useContext(sA)}const mJ="Droppable",gJ={timeout:25};function yJ(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:o}=t;const i=Dc(mJ),{active:s,dispatch:l,over:u,measureDroppableContainers:d}=S.useContext(Rc),h=S.useRef({disabled:n}),p=S.useRef(!1),m=S.useRef(null),y=S.useRef(null),{disabled:x,updateMeasurementsFor:b,timeout:w}={...gJ,...o},E=lc(b??r),_=S.useCallback(()=>{if(!p.current){p.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{d(Array.isArray(E.current)?E.current:[E.current]),y.current=null},w)},[w]),A=Rp({callback:_,disabled:x||!s}),M=S.useCallback((I,L)=>{A&&(L&&(A.unobserve(L),p.current=!1),I&&A.observe(I))},[A]),[N,D]=Oh(M),O=lc(e);return S.useEffect(()=>{!A||!N.current||(A.disconnect(),p.current=!1,A.observe(N.current))},[N,A]),S.useEffect(()=>(l({type:Jt.RegisterDroppable,element:{id:r,key:i,disabled:n,node:N,rect:m,data:O}}),()=>l({type:Jt.UnregisterDroppable,key:i,id:r})),[r]),S.useEffect(()=>{n!==h.current.disabled&&(l({type:Jt.SetDroppableDisabled,id:r,key:i,disabled:n}),h.current.disabled=n)},[r,i,n,l]),{active:s,rect:m,isOver:(u==null?void 0:u.id)===r,node:N,over:u,setNodeRef:D}}function xJ(t){let{animation:e,children:n}=t;const[r,o]=S.useState(null),[i,s]=S.useState(null),l=Ih(n);return!n&&!r&&l&&o(l),Hr(()=>{if(!i)return;const u=r==null?void 0:r.key,d=r==null?void 0:r.props.id;if(u==null||d==null){o(null);return}Promise.resolve(e(d,i)).then(()=>{o(null)})},[e,r,i]),te.createElement(te.Fragment,null,n,r?S.cloneElement(r,{ref:s}):null)}const vJ={x:0,y:0,scaleX:1,scaleY:1};function bJ(t){let{children:e}=t;return te.createElement(Rc.Provider,{value:iA},te.createElement(Op.Provider,{value:vJ},e))}const kJ={position:"fixed",touchAction:"none"},wJ=t=>Np(t)?"transform 250ms ease":void 0,CJ=S.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:l,style:u,transform:d,transition:h=wJ}=t;if(!l)return null;const p=o?d:{...d,scaleX:1,scaleY:1},m={...kJ,width:l.width,height:l.height,top:l.top,left:l.left,transform:ri.Transform.toString(p),transformOrigin:o&&r?pZ(r,l):void 0,transition:typeof h=="function"?h(r):h,...u};return te.createElement(n,{className:s,style:m,ref:e},i)}),SJ=t=>e=>{let{active:n,dragOverlay:r}=e;const o={},{styles:i,className:s}=t;if(i!=null&&i.active)for(const[l,u]of Object.entries(i.active))u!==void 0&&(o[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,u));if(i!=null&&i.dragOverlay)for(const[l,u]of Object.entries(i.dragOverlay))u!==void 0&&r.node.style.setProperty(l,u);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[u,d]of Object.entries(o))n.node.style.setProperty(u,d);s!=null&&s.active&&n.node.classList.remove(s.active)}},EJ=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:ri.Transform.toString(e)},{transform:ri.Transform.toString(n)}]},_J={duration:250,easing:"ease",keyframes:EJ,sideEffects:SJ({styles:{active:{opacity:"0"}}})};function TJ(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=t;return Mp((i,s)=>{if(e===null)return;const l=n.get(i);if(!l)return;const u=l.node.current;if(!u)return;const d=oA(s);if(!d)return;const{transform:h}=jn(s).getComputedStyle(s),p=GT(h);if(!p)return;const m=typeof e=="function"?e:AJ(e);return tA(u,o.draggable.measure),m({active:{id:i,data:l.data,node:u,rect:o.draggable.measure(u)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(d)},droppableContainers:r,measuringConfiguration:o,transform:p})})}function AJ(t){const{duration:e,easing:n,sideEffects:r,keyframes:o}={..._J,...t};return i=>{let{active:s,dragOverlay:l,transform:u,...d}=i;if(!e)return;const h={x:l.rect.left-s.rect.left,y:l.rect.top-s.rect.top},p={scaleX:u.scaleX!==1?s.rect.width*u.scaleX/l.rect.width:1,scaleY:u.scaleY!==1?s.rect.height*u.scaleY/l.rect.height:1},m={x:u.x-h.x,y:u.y-h.y,...p},y=o({...d,active:s,dragOverlay:l,transform:{initial:u,final:m}}),[x]=y,b=y[y.length-1];if(JSON.stringify(x)===JSON.stringify(b))return;const w=r==null?void 0:r({active:s,dragOverlay:l,...d}),E=l.node.animate(y,{duration:e,easing:n,fill:"forwards"});return new Promise(_=>{E.onfinish=()=>{w==null||w(),_()}})}}let aS=0;function MJ(t){return S.useMemo(()=>{if(t!=null)return aS++,aS},[t])}const NJ=te.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:l="div",className:u,zIndex:d=999}=t;const{activatorEvent:h,active:p,activeNodeRect:m,containerNodeRect:y,draggableNodes:x,droppableContainers:b,dragOverlay:w,over:E,measuringConfiguration:_,scrollableAncestors:A,scrollableAncestorRects:M,windowRect:N}=lA(),D=S.useContext(Op),O=MJ(p==null?void 0:p.id),I=aA(s,{activatorEvent:h,active:p,activeNodeRect:m,containerNodeRect:y,draggingNodeRect:w.rect,over:E,overlayNodeRect:w.rect,scrollableAncestors:A,scrollableAncestorRects:M,transform:D,windowRect:N}),L=Yx(m),W=TJ({config:r,draggableNodes:x,droppableContainers:b,measuringConfiguration:_}),Y=L?w.setRef:void 0;return te.createElement(bJ,null,te.createElement(xJ,{animation:W},p&&O?te.createElement(CJ,{key:O,id:p.id,ref:Y,as:l,activatorEvent:h,adjustScale:e,className:u,transition:i,rect:L,style:{zIndex:d,...o},transform:I},n):null))});function DJ(t,e,n){const r={...t};return e.top+t.y<=n.top?r.y=n.top-e.top:e.bottom+t.y>=n.top+n.height&&(r.y=n.top+n.height-e.bottom),e.left+t.x<=n.left?r.x=n.left-e.left:e.right+t.x>=n.left+n.width&&(r.x=n.left+n.width-e.right),r}const RJ=t=>{let{containerNodeRect:e,draggingNodeRect:n,transform:r}=t;return!n||!e?r:DJ(r,n,e)},OJ=t=>{let{transform:e}=t;return{...e,x:0}};function zi(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function IJ(t,e){return t.reduce((n,r,o)=>{const i=e.get(r);return i&&(n[o]=i),n},Array(t.length))}function mf(t){return t!==null&&t>=0}function PJ(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function jJ(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const uA=t=>{let{rects:e,activeIndex:n,overIndex:r,index:o}=t;const i=zi(e,r,n),s=e[o],l=i[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},gf={scaleX:1,scaleY:1},LJ=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=t;const l=(e=i[n])!=null?e:r;if(!l)return null;if(o===n){const d=i[s];return d?{x:0,y:n<s?d.top+d.height-(l.top+l.height):d.top-l.top,...gf}:null}const u=FJ(i,o,n);return o>n&&o<=s?{x:0,y:-l.height-u,...gf}:o<n&&o>=s?{x:0,y:l.height+u,...gf}:{x:0,y:0,...gf}};function FJ(t,e,n){const r=t[e],o=t[e-1],i=t[e+1];return r?n<e?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const cA="Sortable",dA=te.createContext({activeIndex:-1,containerId:cA,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:uA,disabled:{draggable:!1,droppable:!1}});function zJ(t){let{children:e,id:n,items:r,strategy:o=uA,disabled:i=!1}=t;const{active:s,dragOverlay:l,droppableRects:u,over:d,measureDroppableContainers:h}=lA(),p=Dc(cA,n),m=l.rect!==null,y=S.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),x=s!=null,b=s?y.indexOf(s.id):-1,w=d?y.indexOf(d.id):-1,E=S.useRef(y),_=!PJ(y,E.current),A=w!==-1&&b===-1||_,M=jJ(i);Hr(()=>{_&&x&&h(y)},[_,y,x,h]),S.useEffect(()=>{E.current=y},[y]);const N=S.useMemo(()=>({activeIndex:b,containerId:p,disabled:M,disableTransforms:A,items:y,overIndex:w,useDragOverlay:m,sortedRects:IJ(y,u),strategy:o}),[b,p,M.draggable,M.droppable,A,y,w,u,m,o]);return te.createElement(dA.Provider,{value:N},e)}const $J=t=>{let{id:e,items:n,activeIndex:r,overIndex:o}=t;return zi(n,r,o).indexOf(e)},BJ=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:l,previousContainerId:u,transition:d}=t;return!d||!r||l!==i&&o===s?!1:n?!0:s!==o&&e===u},VJ={duration:200,easing:"ease"},fA="transform",HJ=ri.Transition.toString({property:fA,duration:0,easing:"linear"}),UJ={roleDescription:"sortable"};function WJ(t){let{disabled:e,index:n,node:r,rect:o}=t;const[i,s]=S.useState(null),l=S.useRef(n);return Hr(()=>{if(!e&&n!==l.current&&r.current){const u=o.current;if(u){const d=Sl(r.current,{ignoreTransform:!0}),h={x:u.left-d.left,y:u.top-d.top,scaleX:u.width/d.width,scaleY:u.height/d.height};(h.x||h.y)&&s(h)}}n!==l.current&&(l.current=n)},[e,n,r,o]),S.useEffect(()=>{i&&s(null)},[i]),i}function hA(t){let{animateLayoutChanges:e=BJ,attributes:n,disabled:r,data:o,getNewIndex:i=$J,id:s,strategy:l,resizeObserverConfig:u,transition:d=VJ}=t;const{items:h,containerId:p,activeIndex:m,disabled:y,disableTransforms:x,sortedRects:b,overIndex:w,useDragOverlay:E,strategy:_}=S.useContext(dA),A=qJ(r,y),M=h.indexOf(s),N=S.useMemo(()=>({sortable:{containerId:p,index:M,items:h},...o}),[p,o,M,h]),D=S.useMemo(()=>h.slice(h.indexOf(s)),[h,s]),{rect:O,node:I,isOver:L,setNodeRef:W}=yJ({id:s,data:N,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...u}}),{active:Y,activatorEvent:G,activeNodeRect:q,attributes:Z,setNodeRef:Q,listeners:K,isDragging:J,over:U,setActivatorNodeRef:ee,transform:F}=pJ({id:s,data:N,attributes:{...UJ,...n},disabled:A.draggable}),P=QG(W,Q),B=!!Y,ne=B&&!x&&mf(m)&&mf(w),fe=!E&&J,ue=fe&&ne?F:null,Ae=ne?ue??(l??_)({rects:b,activeNodeRect:q,activeIndex:m,overIndex:w,index:M}):null,X=mf(m)&&mf(w)?i({id:s,items:h,activeIndex:m,overIndex:w}):M,ce=Y==null?void 0:Y.id,pe=S.useRef({activeId:ce,items:h,newIndex:X,containerId:p}),Le=h!==pe.current.items,Me=e({active:Y,containerId:p,isDragging:J,isSorting:B,id:s,index:M,items:h,newIndex:pe.current.newIndex,previousItems:pe.current.items,previousContainerId:pe.current.containerId,transition:d,wasDragging:pe.current.activeId!=null}),ze=WJ({disabled:!Me,index:M,node:I,rect:O});return S.useEffect(()=>{B&&pe.current.newIndex!==X&&(pe.current.newIndex=X),p!==pe.current.containerId&&(pe.current.containerId=p),h!==pe.current.items&&(pe.current.items=h)},[B,X,p,h]),S.useEffect(()=>{if(ce===pe.current.activeId)return;if(ce!=null&&pe.current.activeId==null){pe.current.activeId=ce;return}const At=setTimeout(()=>{pe.current.activeId=ce},50);return()=>clearTimeout(At)},[ce]),{active:Y,activeIndex:m,attributes:Z,data:N,rect:O,index:M,newIndex:X,items:h,isOver:L,isSorting:B,isDragging:J,listeners:K,node:I,overIndex:w,over:U,setNodeRef:P,setActivatorNodeRef:ee,setDroppableNodeRef:W,setDraggableNodeRef:Q,transform:ze??Ae,transition:Je()};function Je(){if(ze||Le&&pe.current.newIndex===M)return HJ;if(!(fe&&!Np(G)||!d)&&(B||Me))return ri.Transition.toString({...d,property:fA})}}function qJ(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(r=t==null?void 0:t.droppable)!=null?r:e.droppable}}function Fh(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const KJ=[Ze.Down,Ze.Right,Ze.Up,Ze.Left],GJ=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:l}}=e;if(KJ.includes(t.code)){if(t.preventDefault(),!n||!r)return;const u=[];i.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const m=o.get(p.id);if(m)switch(t.code){case Ze.Down:r.top<m.top&&u.push(p);break;case Ze.Up:r.top>m.top&&u.push(p);break;case Ze.Left:r.left>m.left&&u.push(p);break;case Ze.Right:r.left<m.left&&u.push(p);break}});const d=yZ({collisionRect:r,droppableRects:o,droppableContainers:u});let h=qT(d,"id");if(h===(s==null?void 0:s.id)&&d.length>1&&(h=d[1].id),h!=null){const p=i.get(n.id),m=i.get(h),y=m?o.get(m.id):null,x=m==null?void 0:m.node.current;if(x&&y&&p&&m){const w=Dp(x).some((D,O)=>l[O]!==D),E=pA(p,m),_=ZJ(p,m),A=w||!E?{x:0,y:0}:{x:_?r.width-y.width:0,y:_?r.height-y.height:0},M={x:y.left,y:y.top};return A.x&&A.y?M:uc(M,A)}}}};function pA(t,e){return!Fh(t)||!Fh(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function ZJ(t,e){return!Fh(t)||!Fh(e)||!pA(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const Xx=S.forwardRef(({label:t,className:e,...n},r)=>v.jsx(Ge,{ref:r,type:"button",variant:"ghost",size:"icon-xs","aria-label":t,title:t,className:De("cursor-grab touch-none text-muted-foreground/50 hover:bg-transparent hover:text-foreground active:cursor-grabbing",e),...n,children:v.jsx(Py,{})}));Xx.displayName="DragHandle";function mA({ids:t,onReorder:e,renderOverlay:n,children:r}){const[o,i]=S.useState(null),s=hZ(GC(Jx,{activationConstraint:{distance:4}}),GC(Gx,{coordinateGetter:GJ})),l=d=>t.indexOf(String(d))+1,u={onDragStart:()=>"Öğe kaldırıldı. Ok tuşlarıyla taşı, boşluk tuşuyla bırak.",onDragOver:({over:d})=>d?`${l(d.id)}. sıraya taşınıyor.`:"Öğe listenin dışında.",onDragEnd:({over:d})=>d?`${l(d.id)}. sıraya bırakıldı.`:"Öğe eski yerine döndü.",onDragCancel:()=>"Taşıma iptal edildi."};return v.jsxs(dJ,{accessibility:{announcements:u},sensors:s,collisionDetection:gZ,modifiers:[OJ,RJ],onDragStart:({active:d})=>i(String(d.id)),onDragCancel:()=>i(null),onDragEnd:({active:d,over:h})=>{if(i(null),!h||d.id===h.id)return;const p=t.indexOf(String(d.id)),m=t.indexOf(String(h.id));p<0||m<0||e(p,m)},children:[v.jsx(zJ,{items:t,strategy:LJ,children:r}),v.jsx(NJ,{children:o?n(o):null})]})}function hl({className:t,size:e="default",...n}){return v.jsx("div",{"data-slot":"card","data-size":e,className:De("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",t),...n})}function dc({className:t,...e}){return v.jsx("div",{"data-slot":"card-header",className:De("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",t),...e})}function J1({className:t,...e}){return v.jsx("div",{"data-slot":"card-title",className:De("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",t),...e})}function Y1({className:t,...e}){return v.jsx("div",{"data-slot":"card-description",className:De("text-sm text-muted-foreground",t),...e})}function pl({className:t,...e}){return v.jsx("div",{"data-slot":"card-content",className:De("px-(--card-spacing)",t),...e})}function zh({className:t,...e}){return v.jsx("div",{"data-slot":"card-footer",className:De("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",t),...e})}async function Eo(t){if(!t.ok)throw new Error(`İstek başarısız: ${t.status}`);return t}async function JJ(){return(await Eo(await fetch("/api/_project"))).json()}async function lS(){return(await Eo(await fetch("/api/_schema"))).json()}async function YJ(){return(await(await Eo(await fetch("/api/_templates"))).json()).items}async function XJ(t){const e=await fetch("/api/_init",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({template:t})});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Template uygulanamadı: ${e.status}`)}}async function QJ(t){const e=await fetch("/api/_import",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({raw:t})});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`İçe aktarılamadı: ${e.status}`)}}const eY="/api/_export";function tY(){const t=document.createElement("a");t.href=eY,t.download="justjson-export.zip",document.body.appendChild(t),t.click(),t.remove()}async function gA(t){const e=await fetch("/api/_schema",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Şema kaydedilemedi: ${e.status}`)}}async function yA(t){return(await(await Eo(await fetch(`/api/${encodeURIComponent(t)}`))).json()).items}async function nY(t){return(await yA(t)).map(e=>e.slug)}async function uS(t,e){const n=await fetch(`/api/${encodeURIComponent(t)}/${encodeURIComponent(e)}`);return n.status===404?null:(await Eo(n),n.json())}async function rY(t,e,n){return(await(await Eo(await fetch(`/api/${encodeURIComponent(t)}/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}))).json()).slug}async function oY(t,e){await Eo(await fetch(`/api/${encodeURIComponent(t)}/${encodeURIComponent(e)}`,{method:"DELETE"}))}async function iY(t,e){return(await(await Eo(await fetch("/api/_media",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dataBase64:t,filename:e})}))).json()).path}async function sY(t){return(await Eo(await fetch(`/api/_singleton/${encodeURIComponent(t)}`))).json()}async function aY(t,e){await Eo(await fetch(`/api/_singleton/${encodeURIComponent(t)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}))}const xA=[{type:"text",label:"Metin",desc:"Tek satır metin",icon:W9},{type:"richtext",label:"Zengin metin",desc:"Markdown içerik",icon:IE},{type:"number",label:"Sayı",desc:"Sayısal değer",icon:t9},{type:"boolean",label:"Evet / Hayır",desc:"Doğru veya yanlış",icon:B9},{type:"date",label:"Tarih",desc:"Takvim tarihi",icon:TP},{type:"select",label:"Seçim",desc:"Sabit seçenekler listesi",icon:FE},{type:"relation",label:"İlişki",desc:"Başka koleksiyona bağla",icon:LE},{type:"image",label:"Görsel",desc:"Resim URL veya yolu",icon:jE}],Qx=Object.fromEntries(xA.map(t=>[t.type,t]));let cS=0;function ra(t){return cS+=1,`${t}${cS}`}function Dg(t){return JSON.parse(JSON.stringify(t))}function lY(t){const e=(n,r)=>n.map(o=>({id:ra(r),fields:o.fields.map(()=>ra("f"))}));return{collections:e(t.collections,"c"),singletons:e(t.singletons,"s")}}function uY(t){const e=n=>n.map(r=>({id:r.id,fields:[...r.fields]}));return{collections:e(t.collections),singletons:e(t.singletons)}}function cY(t,e){const n=(r,o,i)=>r.map((s,l)=>{const u=o[l];return{id:(u==null?void 0:u.id)??ra(i),fields:s.fields.map((d,h)=>(u==null?void 0:u.fields[h])??ra("f"))}});return{collections:n(t.collections,e.collections,"c"),singletons:n(t.singletons,e.singletons,"s")}}function ev(t,e){let n=1;for(;e.includes(`${t}${n}`);)n+=1;return`${t}${n}`}function Rg(t,e){const n=ev("koleksiyon",t.collections.map(r=>r.name));t.collections.push({name:n,label:"Yeni koleksiyon",path:n,fields:[]}),e.collections.push({id:ra("c"),fields:[]})}function Og(t,e){const n=ev("tekil",t.singletons.map(r=>r.name));t.singletons.push({name:n,label:"Yeni tekil",path:`${n}.json`,fields:[]}),e.singletons.push({id:ra("s"),fields:[]})}function dY({schema:t,onSaved:e,onBrowseTemplates:n,initialAdd:r}){const[o,i]=S.useState(()=>{const L=Dg(t),W=lY(L);return r==="collection"?Rg(L,W):r==="singleton"&&Og(L,W),{schema:L,ids:W}}),[s,l]=S.useState(()=>{const L=[...o.ids.collections,...o.ids.singletons];return L.length<=5?{}:Object.fromEntries(L.map(W=>[W.id,!0]))}),[u,d]=S.useState(!1),[h,p]=S.useState(null),[m,y]=S.useState(null),x=o.schema,b=o.ids,w=x.collections.map(L=>L.name),E=L=>i(W=>{const Y=Dg(W.schema);return L(Y),{schema:Y,ids:W.ids}}),_=L=>i(W=>{const Y=Dg(W.schema),G=uY(W.ids);return L(Y,G),{schema:Y,ids:cY(Y,G)}}),A=(L,W)=>l(Y=>({...Y,[L]:W})),M=(L,W)=>l(Y=>{const G={...Y};for(const q of L)G[q.id]=W;return G}),N=x.collections.length===0&&x.singletons.length===0,D=L=>{m&&(_((W,Y)=>{var Q;const G=m.kind==="collection"?W.collections:W.singletons,q=m.kind==="collection"?Y.collections:Y.singletons,Z=G[m.ci];if(Z)if(m.fi===null){const K=ev("alan",Z.fields.map(J=>J.key));Z.fields.push({key:K,label:"",type:L}),(Q=q[m.ci])==null||Q.fields.push(ra("f"))}else{const K=Z.fields[m.fi];if(!K)return;K.type=L,L!=="select"&&(K.options=void 0),L!=="relation"&&(K.to=void 0)}}),y(null))},O=async()=>{p(null),d(!0);try{await gA(x),e()}catch(L){p(L.message)}finally{d(!1)}},I=L=>{const W=L==="collection"?x.collections:x.singletons,Y=L==="collection"?b.collections:b.singletons;return v.jsx(mA,{ids:Y.map(G=>G.id),onReorder:(G,q)=>_((Z,Q)=>{L==="collection"?(Z.collections=zi(Z.collections,G,q),Q.collections=zi(Q.collections,G,q)):(Z.singletons=zi(Z.singletons,G,q),Q.singletons=zi(Q.singletons,G,q))}),renderOverlay:G=>{const q=Y.findIndex(Q=>Q.id===G),Z=W[q];return Z?v.jsx(mY,{container:Z}):null},children:W.map((G,q)=>{const Z=Y[q];return Z?v.jsx(hY,{id:Z.id,container:G,kind:L,collectionNames:w,fieldIds:Z.fields,collapsed:s[Z.id]??!1,onToggleCollapse:()=>A(Z.id,!s[Z.id]),onChange:Q=>E(K=>{const U=(L==="collection"?K.collections:K.singletons)[q];U&&Q(U)}),onRemove:()=>_((Q,K)=>{L==="collection"?(Q.collections.splice(q,1),K.collections.splice(q,1)):(Q.singletons.splice(q,1),K.singletons.splice(q,1))}),onRemoveField:Q=>_((K,J)=>{var F,P;const U=L==="collection"?K.collections:K.singletons,ee=L==="collection"?J.collections:J.singletons;(F=U[q])==null||F.fields.splice(Q,1),(P=ee[q])==null||P.fields.splice(Q,1)}),onReorderFields:(Q,K)=>_((J,U)=>{const ee=L==="collection"?J.collections:J.singletons,F=L==="collection"?U.collections:U.singletons,P=ee[q],B=F[q];!P||!B||(P.fields=zi(P.fields,Q,K),B.fields=zi(B.fields,Q,K))}),onAddField:()=>y({kind:L,ci:q,fi:null}),onChangeType:Q=>y({kind:L,ci:q,fi:Q})},Z.id):null})})};return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx("header",{className:"sticky top-0 z-10 shrink-0 border-b bg-card px-8 py-4",children:v.jsxs("div",{className:"mx-auto flex w-full max-w-4xl items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"font-heading text-lg font-semibold text-foreground",children:"Şema"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Koleksiyonlarını ve alanlarını tasarla."})]}),v.jsxs(Ge,{type:"button",onClick:O,disabled:u,children:[v.jsx(Oy,{}),u?"Kaydediliyor…":"Şemayı kaydet"]})]})}),v.jsx("div",{className:"flex-1 overflow-y-auto px-8 py-6",children:v.jsxs("div",{className:"mx-auto w-full max-w-4xl",children:[h&&v.jsx("p",{className:"mb-5 rounded-lg border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:h}),N?v.jsx(fY,{onAddCollection:()=>_(Rg),onAddSingleton:()=>_(Og),onBrowseTemplates:n}):v.jsxs("div",{className:"space-y-10",children:[v.jsx(dS,{title:"Koleksiyonlar",hint:"Çok kayıtlı içerik (yazılar, ürünler…)",onAdd:()=>_(Rg),allCollapsed:b.collections.length>0&&b.collections.every(L=>s[L.id]),onToggleAll:b.collections.length>1?L=>M(b.collections,L):void 0,children:I("collection")}),v.jsx(dS,{title:"Tekil",hint:"Tek kayıt (site ayarları, profil…)",onAdd:()=>_(Og),allCollapsed:b.singletons.length>0&&b.singletons.every(L=>s[L.id]),onToggleAll:b.singletons.length>1?L=>M(b.singletons,L):void 0,children:I("singleton")})]})]})}),v.jsx(vY,{open:m!==null,onPick:D,onClose:()=>y(null)})]})}function dS({title:t,hint:e,onAdd:n,allCollapsed:r,onToggleAll:o,children:i}){return v.jsxs("section",{children:[v.jsxs("div",{className:"mb-3 flex items-end justify-between gap-3",children:[v.jsxs("div",{children:[v.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:t}),v.jsx("p",{className:"text-xs text-muted-foreground/70",children:e})]}),v.jsxs("div",{className:"flex items-center gap-1.5",children:[o&&v.jsxs(Ge,{type:"button",variant:"ghost",size:"sm",onClick:()=>o(!r),className:"text-muted-foreground",children:[r?v.jsx(RE,{}):v.jsx(RP,{}),r?"Tümünü genişlet":"Tümünü daralt"]}),v.jsxs(Ge,{type:"button",variant:"outline",size:"sm",onClick:n,children:[v.jsx(Ys,{})," Ekle"]})]})]}),v.jsx("div",{className:"space-y-3",children:i})]})}function fY({onAddCollection:t,onAddSingleton:e,onBrowseTemplates:n}){return v.jsx(hl,{className:"mx-auto max-w-md",children:v.jsxs(pl,{className:"flex flex-col items-center px-8 py-10 text-center",children:[v.jsx("div",{className:"mb-4 flex size-14 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:v.jsx(op,{className:"size-7"})}),v.jsx("h2",{className:"font-heading text-lg font-semibold text-foreground",children:"Şeman boş"}),v.jsx("p",{className:"mt-1.5 text-sm text-muted-foreground",children:"Koleksiyon, içeriğinin bir tipini tanımlar — yazılar, ürünler, projeler. İlkini ekleyerek başla."}),v.jsxs(Ge,{type:"button",size:"lg",onClick:t,className:"mt-6",children:[v.jsx(Ys,{})," Koleksiyon ekle"]}),v.jsxs("div",{className:"mt-3 flex items-center gap-3 text-sm",children:[v.jsx(Ge,{type:"button",variant:"link",onClick:e,className:"h-auto p-0 text-muted-foreground hover:text-foreground",children:"Tekil kayıt ekle"}),n&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-border",children:"·"}),v.jsx(Ge,{type:"button",variant:"link",onClick:n,className:"h-auto p-0",children:"veya bir template’den başla"})]})]})]})})}function hY({id:t,...e}){const{attributes:n,listeners:r,setNodeRef:o,setActivatorNodeRef:i,transform:s,transition:l,isDragging:u}=hA({id:t});return v.jsx("div",{ref:o,style:{transform:ri.Translate.toString(s),transition:l},className:De(u&&"opacity-40"),children:v.jsx(pY,{...e,dragHandle:v.jsx(Xx,{ref:i,label:"Sürükleyerek sırala",...n,...r})})})}function pY({container:t,kind:e,collectionNames:n,fieldIds:r,collapsed:o,onToggleCollapse:i,onChange:s,onRemove:l,onRemoveField:u,onReorderFields:d,onAddField:h,onChangeType:p,dragHandle:m}){const y=b=>{const w=Ky(b);s(E=>{E.name=w,E.path=e==="collection"?w:`${w}.json`})},x=t.fields.length;return v.jsxs(hl,{className:"gap-0 overflow-hidden py-0 shadow-sm",children:[v.jsxs(dc,{className:De("relative grid grid-cols-[1.5rem_1.75rem_minmax(0,1fr)_auto_1.75rem] items-center gap-2 bg-muted/40 px-4 py-3",!o&&"border-b"),children:[v.jsx("button",{type:"button","aria-hidden":"true",tabIndex:-1,onClick:i,className:"absolute inset-0 cursor-pointer"}),v.jsx("div",{className:"relative opacity-0 transition group-focus-within/card:opacity-100 group-hover/card:opacity-100 focus-within:opacity-100",children:m}),v.jsx(Ge,{type:"button",variant:"ghost",size:"icon-sm",onClick:i,"aria-expanded":!o,"aria-label":o?"Genişlet":"Daralt",className:"relative text-muted-foreground",children:v.jsx(Iy,{className:De("transition-transform",o&&"-rotate-90")})}),v.jsx(mo,{className:"relative h-8 border-transparent bg-transparent font-medium shadow-none focus-visible:border-input focus-visible:bg-background",value:t.label??"",placeholder:e==="collection"?"Koleksiyon adı":"Tekil ad",onChange:b=>s(w=>{w.label=b.target.value})}),v.jsxs("div",{className:"relative flex items-center gap-2",children:[o&&v.jsxs("span",{className:"whitespace-nowrap rounded-full bg-foreground/5 px-2 py-0.5 text-xs text-muted-foreground",children:[x," alan"]}),v.jsx(mo,{className:"h-8 w-40 border-transparent bg-transparent font-mono text-xs text-primary hover:border-input focus-visible:bg-background",value:t.name,placeholder:"api-adi",onChange:b=>y(b.target.value)})]}),v.jsx(vA,{label:"Sil",danger:!0,onClick:l,className:"relative",children:v.jsx($E,{})})]}),!o&&v.jsxs(v.Fragment,{children:[v.jsxs(pl,{className:"px-0",children:[x===0&&v.jsx("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Henüz alan yok. Aşağıdan ilk alanı ekle."}),v.jsx(mA,{ids:r,onReorder:d,renderOverlay:b=>{const w=r.indexOf(b),E=t.fields[w];return E?v.jsx(xY,{field:E}):null},children:v.jsx("div",{className:"divide-y divide-border/60",children:t.fields.map((b,w)=>{const E=r[w];return E?v.jsx(gY,{id:E,field:b,collectionNames:n,onChange:_=>s(A=>_(A.fields[w])),onRemove:()=>u(w),onChangeType:()=>p(w)},E):null})})})]}),v.jsxs(Ge,{type:"button",variant:"ghost",onClick:h,className:"h-11 w-full justify-center gap-1.5 rounded-none border-t text-primary hover:bg-primary/5 hover:text-primary",children:[v.jsx(Ys,{})," Alan ekle"]})]})]})}function mY({container:t}){return v.jsxs("div",{className:"flex scale-[1.01] items-center gap-2 rounded-xl bg-card px-4 py-3 shadow-lg ring-2 ring-primary/40",children:[v.jsx(Py,{className:"size-4 shrink-0 text-muted-foreground"}),v.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.label||t.name}),v.jsx("span",{className:"truncate font-mono text-xs text-primary",children:t.name}),v.jsxs("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:[t.fields.length," alan"]})]})}function gY({id:t,...e}){const{attributes:n,listeners:r,setNodeRef:o,setActivatorNodeRef:i,transform:s,transition:l,isDragging:u}=hA({id:t});return v.jsx(yY,{...e,rowRef:o,style:{transform:ri.Translate.toString(s),transition:l},dragging:u,dragHandle:v.jsx(Xx,{ref:i,label:"Sürükleyerek sırala",...n,...r})})}function yY({field:t,collectionNames:e,onChange:n,onRemove:r,onChangeType:o,rowRef:i,style:s,dragging:l,dragHandle:u}){const d=Qx[t.type],h=d.icon,p="opacity-0 transition group-focus-within/row:opacity-100 group-hover/row:opacity-100 focus-within:opacity-100";return v.jsxs("div",{ref:i,style:s,className:De("group/row grid grid-cols-[1.5rem_2rem_minmax(0,1fr)_7rem_4.5rem_1.75rem] items-center gap-2 bg-card px-4 py-2.5 md:grid-cols-[1.5rem_2rem_minmax(0,1fr)_10rem_4.5rem_1.75rem]",l&&"opacity-40"),children:[v.jsx("div",{className:p,children:u}),v.jsxs(Hy,{children:[v.jsx(Uy,{asChild:!0,children:v.jsx(Ge,{type:"button",variant:"ghost",size:"icon",onClick:o,"aria-label":"Tipi değiştir",className:"bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary",children:v.jsx(h,{})})}),v.jsxs(Wy,{children:[d.label," · tipi değiştir"]})]}),v.jsx(mo,{className:"h-8 border-transparent bg-transparent font-medium shadow-none focus-visible:border-input focus-visible:bg-background",value:t.label??"",placeholder:"Alan adı",onChange:m=>n(y=>{y.label=m.target.value})}),v.jsx(mo,{className:"h-8 border-transparent bg-transparent font-mono text-xs text-muted-foreground hover:border-input focus-visible:bg-background focus-visible:text-foreground",value:t.key,placeholder:"anahtar",onChange:m=>n(y=>{y.key=Ky(m.target.value)})}),v.jsx(Ge,{type:"button",size:"xs",variant:t.required?"default":"ghost","aria-pressed":t.required??!1,title:t.required?"Zorunlu alan":"Zorunlu yap",onClick:()=>n(m=>{m.required=!m.required}),className:De("w-full rounded-full",!t.required&&`border-dashed border-border text-muted-foreground ${p}`),children:"Zorunlu"}),v.jsx(vA,{label:"Sil",danger:!0,onClick:r,className:p,children:v.jsx(ip,{})}),t.type==="select"&&v.jsx(mo,{className:"col-start-3 col-end-[-1] row-start-2 mt-1",value:(t.options??[]).join(", "),placeholder:"seçenekler (virgülle ayır)",onChange:m=>n(y=>{y.options=m.target.value.split(",").map(x=>x.trim()).filter(Boolean)})}),t.type==="relation"&&v.jsx("div",{className:"col-start-3 col-end-[-1] row-start-2 mt-1",children:v.jsxs(GE,{value:t.to||void 0,onValueChange:m=>n(y=>{y.to=m}),children:[v.jsx(JE,{className:"w-full",children:v.jsx(ZE,{placeholder:"hedef koleksiyon seç…"})}),v.jsx(YE,{children:e.map(m=>v.jsx(XE,{value:m,children:m},m))})]})})]})}function xY({field:t}){const e=Qx[t.type],n=e.icon;return v.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-card px-4 py-2.5 shadow-lg ring-2 ring-primary/40",children:[v.jsx(Py,{className:"size-4 shrink-0 text-muted-foreground"}),v.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:v.jsx(n,{className:"size-4"})}),v.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.label||e.label}),v.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:t.key})]})}function vY({open:t,onPick:e,onClose:n}){return v.jsx(Fy,{open:t,onOpenChange:r=>{r||n()},children:v.jsxs(zy,{className:"sm:max-w-lg",children:[v.jsxs($y,{children:[v.jsx(By,{children:"Alan tipi seç"}),v.jsx(Vy,{children:"Bu alanın hangi türde veri tutacağını belirle."})]}),v.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:xA.map(({type:r,label:o,desc:i,icon:s})=>v.jsxs("button",{type:"button",onClick:()=>e(r),className:"flex items-start gap-3 rounded-xl border p-3 text-left outline-none transition-colors hover:border-primary hover:bg-primary/5 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",children:[v.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:v.jsx(s,{className:"size-4"})}),v.jsxs("span",{children:[v.jsx("span",{className:"block text-sm font-medium text-foreground",children:o}),v.jsx("span",{className:"block text-xs text-muted-foreground",children:i})]})]},r))})]})})}function vA({children:t,label:e,danger:n,onClick:r,className:o}){return v.jsxs(Hy,{children:[v.jsx(Uy,{asChild:!0,children:v.jsx(Ge,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":e,className:De("text-muted-foreground",n&&"hover:bg-destructive/10 hover:text-destructive",o),children:t})}),v.jsx(Wy,{children:e})]})}function bY({className:t,...e}){return v.jsx("textarea",{"data-slot":"textarea",className:De("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...e})}const kY={blog:v9,cv:J9,portfolio:f9,docs:wP,changelog:D9};function wY(t){const e=[];return t.collections.length&&e.push(`${t.collections.length} koleksiyon`),t.singletons.length&&e.push(`${t.singletons.length} tekil`),e.join(" · ")}function CY(){return v.jsxs(hl,{className:"h-full",children:[v.jsxs(dc,{children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"size-10 shrink-0 animate-pulse rounded-lg bg-muted"}),v.jsx("div",{className:"h-4 w-28 animate-pulse rounded bg-muted"})]}),v.jsx("div",{className:"mt-2 h-3 w-full animate-pulse rounded bg-muted"}),v.jsx("div",{className:"mt-1.5 h-3 w-2/3 animate-pulse rounded bg-muted"})]}),v.jsxs(pl,{className:"flex-1 space-y-1.5",children:[v.jsx("div",{className:"h-8 animate-pulse rounded-md bg-muted"}),v.jsx("div",{className:"h-8 animate-pulse rounded-md bg-muted"})]}),v.jsx(zh,{children:v.jsx("div",{className:"h-9 w-full animate-pulse rounded-lg bg-muted"})})]})}function SY({onApplied:t,disabled:e}){const[n,r]=S.useState(!1),[o,i]=S.useState(""),[s,l]=S.useState(null),[u,d]=S.useState(!1),h=async m=>{var x;const y=(x=m.target.files)==null?void 0:x[0];if(m.target.value="",!!y){l(null);try{i(await y.text())}catch{l("Dosya okunamadı.")}}},p=async()=>{let m;try{m=JSON.parse(o)}catch{l("Geçersiz JSON");return}const y=m&&typeof m=="object"&&"schema"in m?m.schema:m;l(null),d(!0);try{await QJ(y),r(!1),t()}catch(x){l(x.message),d(!1)}};return v.jsxs(Fy,{open:n,onOpenChange:m=>{r(m),!m&&!u&&(i(""),l(null))},children:[v.jsxs(hl,{className:"h-full border border-dashed border-border bg-transparent ring-0 transition-colors hover:border-foreground/25 data-[busy=true]:opacity-60","data-busy":e,children:[v.jsxs(dc,{children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:v.jsx(qP,{className:"size-5"})}),v.jsx(J1,{className:"text-base",children:"İçe aktar — kendi JSON'un"})]}),v.jsx(Y1,{className:"mt-2 leading-relaxed",children:"Elindeki JSON'u getir; JustJSON yapıyı çıkarıp projeni kurar."})]}),v.jsx(pl,{className:"flex-1",children:v.jsxs("div",{className:"flex h-full items-center rounded-md border border-dashed border-border/70 px-3 py-4 text-sm text-muted-foreground",children:["İçerik JSON'un ya da hazır bir"," ",v.jsx("code",{className:"mx-1 font-mono text-xs text-foreground",children:"_schema.json"})," — yapı otomatik çıkarılır."]})}),v.jsx(zh,{children:v.jsx(X9,{asChild:!0,children:v.jsx(Ge,{variant:"outline",className:"h-9 w-full",disabled:e,children:"Kendi JSON'unu içe aktar"})})})]}),v.jsxs(zy,{className:"sm:max-w-lg",children:[v.jsxs($y,{children:[v.jsx(By,{children:"Kendi JSON'unu içe aktar"}),v.jsxs(Vy,{children:["İçerik JSON'unu (ör. bir JustFields dışa aktarımı) ya da hazır bir"," ",v.jsx("code",{className:"font-mono text-xs",children:"_schema.json"}),"'u yapıştır/seç — JustJSON koleksiyon ve tekil yapısını otomatik çıkarır."]})]}),v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("span",{className:"text-sm font-medium text-foreground",children:"JSON"}),v.jsxs("label",{className:De(Ry({variant:"outline",size:"sm"}),"cursor-pointer",u&&"pointer-events-none opacity-50"),children:[v.jsx(BE,{}),"Dosya seç",v.jsx("input",{type:"file",accept:".json,application/json",className:"sr-only",disabled:u,onChange:h})]})]}),v.jsx(bY,{value:o,onChange:m=>{i(m.target.value),s&&l(null)},disabled:u,spellCheck:!1,rows:10,placeholder:'{ "collections": { ... }, "singletons": { ... } }',className:"max-h-72 resize-y font-mono text-xs leading-relaxed"}),s&&v.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2.5 text-sm text-destructive",children:[v.jsx(OE,{className:"mt-0.5 size-4 shrink-0"}),v.jsx("span",{className:"break-words",children:s})]})]}),v.jsxs(HE,{children:[v.jsx(VE,{asChild:!0,children:v.jsx(Ge,{variant:"ghost",disabled:u,children:"Vazgeç"})}),v.jsx(Ge,{disabled:u||!o.trim(),onClick:p,children:u?v.jsxs(v.Fragment,{children:[v.jsx(jy,{className:"animate-spin"}),"İçe aktarılıyor…"]}):"İçe aktar"})]})]})]})}function EY({onApplied:t,onScratch:e}){const[n,r]=S.useState(null),[o,i]=S.useState(null),[s,l]=S.useState(null);S.useEffect(()=>{YJ().then(r).catch(()=>i("Şablon listesi yüklenemedi."))},[]);const u=async h=>{i(null),l(h);try{await XJ(h),t()}catch(p){i(p.message),l(null)}},d=s!==null;return v.jsx("div",{className:"h-full overflow-y-auto bg-muted/30",children:v.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-12 sm:px-8",children:[v.jsxs("header",{className:"mb-9 max-w-2xl",children:[v.jsxs("div",{className:"mb-5 inline-flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[v.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground",children:v.jsx(EP,{className:"size-3.5"})}),"JustJSON"]}),v.jsx("h1",{className:"font-heading text-2xl font-semibold tracking-tight text-foreground sm:text-3xl",children:"Bir şablon seç"}),v.jsx("p",{className:"mt-2 text-base leading-relaxed text-muted-foreground",children:"İçeriğini görsel olarak düzenle; her şey klasöründe düz JSON olarak kalır — sunucu yok, hesap yok."}),v.jsx("p",{className:"mt-1.5 text-sm text-muted-foreground",children:"Seçtiğin şablon, içerik dosyalarını ve şemanı senin için oluşturur — hepsini sonra değiştirebilirsin."})]}),o&&v.jsxs("div",{className:"mb-6 flex items-start gap-2.5 rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:[v.jsx(OE,{className:"mt-0.5 size-4 shrink-0"}),v.jsx("span",{children:o})]}),v.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[n===null&&!o&&[0,1,2,3,4].map(h=>v.jsx(CY,{},h)),n==null?void 0:n.map(h=>{const p=kY[h.id]??JP,m=s===h.id;return v.jsxs(hl,{className:"h-full transition-shadow hover:shadow-md data-[busy=true]:opacity-60","data-busy":d&&!m,children:[v.jsxs(dc,{children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-accent text-accent-foreground",children:v.jsx(p,{className:"size-5"})}),v.jsx(J1,{className:"text-base",children:h.title})]}),v.jsx(Y1,{className:"mt-2 leading-relaxed",children:h.description})]}),v.jsxs(pl,{className:"flex-1",children:[v.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Oluşturulacak yapı"}),v.jsx("span",{className:"text-xs text-muted-foreground/80",children:wY(h)})]}),v.jsxs("div",{className:"space-y-1.5",children:[h.collections.map(y=>v.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted/60 px-2.5 py-1.5",children:[v.jsx(P9,{className:"size-3.5 shrink-0 text-muted-foreground"}),v.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:y.label}),v.jsxs(Qa,{variant:"secondary",className:"ml-auto shrink-0 font-normal",children:[y.fields," alan"]})]},y.label)),h.singletons.map(y=>v.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted/60 px-2.5 py-1.5",children:[v.jsx(IE,{className:"size-3.5 shrink-0 text-muted-foreground"}),v.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:y.label}),v.jsx(Qa,{variant:"outline",className:"ml-auto shrink-0 font-normal",children:"tekil"})]},y.label))]})]}),v.jsx(zh,{children:v.jsx(Ge,{className:"h-9 w-full",disabled:d,onClick:()=>u(h.id),children:m?v.jsxs(v.Fragment,{children:[v.jsx(jy,{className:"animate-spin"}),"Uygulanıyor…"]}):"Bu şablonu kullan"})})]},h.id)}),v.jsxs(hl,{className:"h-full border border-dashed border-border bg-transparent ring-0 transition-colors hover:border-foreground/25 data-[busy=true]:opacity-60","data-busy":d,children:[v.jsxs(dc,{children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:v.jsx(C9,{className:"size-5"})}),v.jsx(J1,{className:"text-base",children:"Sıfırdan başla"})]}),v.jsx(Y1,{className:"mt-2 leading-relaxed",children:"Boş bir şemayla başla, koleksiyonlarını ve alanlarını kendin tanımla."})]}),v.jsx(pl,{className:"flex-1",children:v.jsx("div",{className:"flex h-full items-center rounded-md border border-dashed border-border/70 px-3 py-4 text-sm text-muted-foreground",children:"Henüz içerik yok — yapıyı baştan sen kurarsın."})}),v.jsx(zh,{children:v.jsx(Ge,{variant:"outline",className:"h-9 w-full",disabled:d,onClick:e,children:"Boş projeyle devam et"})})]}),v.jsx(SY,{onApplied:t,disabled:d})]})]})})}function Ws({children:t}){return v.jsx("div",{className:"flex h-full min-h-0 flex-col",children:t})}function qs({title:t,badge:e,subtitle:n,actions:r,toolbar:o}){return v.jsxs("header",{className:"sticky top-0 z-20 shrink-0 border-b bg-card px-8 pt-4 pb-3.5",children:[v.jsxs("div",{className:"flex items-start justify-between gap-6",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[v.jsx("h1",{className:"truncate text-lg font-semibold leading-tight tracking-tight text-foreground",children:t}),e]}),n&&v.jsx("div",{className:"mt-1.5 flex min-w-0 items-center gap-2 text-xs text-muted-foreground",children:n})]}),r&&v.jsx("div",{className:"flex shrink-0 items-center gap-2",children:r})]}),o&&v.jsx("div",{className:"mt-3.5",children:o})]})}function _Y({children:t}){return v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t})}function TY({children:t}){return v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-8 py-6",children:t})}function AY({className:t,children:e}){return v.jsx("div",{className:De("overflow-hidden rounded-xl border bg-card shadow-sm",t),children:e})}function Af({children:t}){return v.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 rounded-md border bg-muted/60 px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:[v.jsx(UP,{className:"h-3 w-3 shrink-0 text-muted-foreground/70"}),v.jsx("span",{className:"truncate",children:t})]})}function fS({icon:t,title:e,hint:n,action:r}){return v.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center px-6 py-16 text-center",children:[v.jsx("div",{className:"mb-3 flex h-12 w-12 items-center justify-center rounded-xl bg-muted text-muted-foreground",children:t}),v.jsx("p",{className:"text-sm font-medium text-foreground",children:e}),n&&v.jsx("p",{className:"mt-1 max-w-xs text-sm text-muted-foreground",children:n}),r&&v.jsx("div",{className:"mt-5",children:r})]})}const bA=["a","b","c","d","e"];function Pu({className:t}){return v.jsx("div",{className:De("animate-pulse rounded-md bg-muted",t)})}function MY(){return v.jsxs($j,{delayDuration:300,children:[v.jsx(NY,{}),v.jsx(jj,{position:"bottom-right"})]})}function NY(){const[t,e]=S.useState(null),[n,r]=S.useState(null),[o,i]=S.useState(null),[s,l]=S.useState(null),[u,d]=S.useState(!1),[h,p]=S.useState(0),[m,y]=S.useState(null),x=S.useCallback(async()=>{const A=await lS();return e(A),A},[]),b=S.useCallback(A=>{A&&(y(A),p(M=>M+1)),l({kind:"schema"})},[]);if(S.useEffect(()=>{lS().then(A=>{e(A),A.collections.length===0&&A.singletons.length===0&&d(!0)}).catch(()=>i("Şema yüklenemedi. `justjson serve` çalışıyor mu?"))},[]),S.useEffect(()=>{JJ().then(r).catch(()=>{})},[]),o)return v.jsx(ju,{children:o});if(!t)return v.jsx(ju,{children:"Yükleniyor…"});if(u)return v.jsx(EY,{onApplied:async()=>{const A=await x();d(!1),l(A.collections[0]?{kind:"collection",name:A.collections[0].name}:{kind:"schema"})},onScratch:()=>{d(!1),l({kind:"schema"})}});const w=t.collections.length===0&&t.singletons.length===0,E=()=>{tY(),zs.success("Dışa aktarma indiriliyor")},_=async()=>{await gA({version:1,collections:[],singletons:[]}),await x(),l(null),d(!0),zs.success("Şema sıfırlandı")};return v.jsxs("div",{className:"flex h-full bg-background",children:[v.jsx(OY,{project:n,schema:t,selection:s,onSelect:l,onOpenSchema:b,onExport:E,onReset:_}),v.jsxs("main",{className:"flex min-w-0 flex-1 flex-col overflow-hidden bg-muted/30",children:[v.jsx(RY,{project:n,crumbs:DY(t,s,l)}),v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:v.jsx(jY,{schema:t,selection:s,onSelect:l,onReload:x,onOpenSchema:b,addSeq:h,addKind:m,onBrowseTemplates:w?()=>d(!0):void 0})})]})]})}function DY(t,e,n){if(!e)return[];if(e.kind==="schema")return[{label:"Şema"}];if(e.kind==="collection"){const o=t.collections.find(i=>i.name===e.name);return[{label:(o==null?void 0:o.label)??e.name}]}if(e.kind==="entry"||e.kind==="newEntry"){const o=t.collections.find(i=>i.name===e.collection);return[{label:(o==null?void 0:o.label)??e.collection,onClick:()=>n({kind:"collection",name:e.collection})},e.kind==="entry"?{label:e.slug}:{label:"Yeni kayıt"}]}const r=t.singletons.find(o=>o.name===e.name);return[{label:(r==null?void 0:r.label)??e.name,tag:"tekil"}]}function RY({project:t,crumbs:e}){return v.jsxs("header",{className:"flex h-12 shrink-0 items-center gap-1 overflow-x-auto border-b bg-card px-8 text-xs",children:[v.jsxs("span",{title:t==null?void 0:t.path,className:"inline-flex shrink-0 items-center gap-1.5 text-muted-foreground",children:[v.jsx(PE,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),(t==null?void 0:t.name)??"…"]}),e.map(n=>v.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1",children:[v.jsx(DE,{className:"h-3.5 w-3.5 text-muted-foreground/40"}),n.onClick?v.jsx("button",{type:"button",onClick:n.onClick,className:"rounded text-muted-foreground transition-colors hover:text-primary",children:n.label}):v.jsx("span",{className:"font-medium text-foreground/80",children:n.label}),n.tag&&v.jsx(Qa,{variant:"secondary",className:"ml-0.5 font-normal",children:n.tag})]},n.label))]})}function ju({children:t}){return v.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:t})}function OY({project:t,schema:e,selection:n,onSelect:r,onOpenSchema:o,onExport:i,onReset:s}){const l=u=>n?n.kind==="collection"?n.name===u:n.kind==="entry"||n.kind==="newEntry"?n.collection===u:!1:!1;return v.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r bg-card",children:[v.jsx("div",{className:"flex h-12 shrink-0 items-center border-b px-5",children:v.jsxs("div",{className:"text-[15px] font-bold tracking-tight text-foreground",children:["Just",v.jsx("span",{className:"text-primary",children:"JSON"})]})}),t&&v.jsx("div",{className:"px-3 pt-3",children:v.jsx(IY,{project:t,onExport:i,onReset:s})}),v.jsxs("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 pt-3 pb-4",children:[v.jsx(PY,{active:(n==null?void 0:n.kind)==="schema",onClick:()=>o()}),v.jsx(hS,{label:"Koleksiyonlar",onAdd:()=>o("collection"),children:e.collections.length===0?v.jsx(pS,{onClick:()=>o("collection"),children:"Koleksiyon ekle"}):e.collections.map(u=>v.jsx(mS,{icon:v.jsx(op,{className:"h-4 w-4"}),active:l(u.name),onClick:()=>r({kind:"collection",name:u.name}),children:u.label??u.name},u.name))}),v.jsx(hS,{label:"Tekil",onAdd:()=>o("singleton"),children:e.singletons.length===0?v.jsx(pS,{onClick:()=>o("singleton"),children:"Tekil ekle"}):e.singletons.map(u=>v.jsx(mS,{icon:v.jsx(GP,{className:"h-4 w-4"}),active:(n==null?void 0:n.kind)==="singleton"&&n.name===u.name,onClick:()=>r({kind:"singleton",name:u.name}),children:u.label??u.name},u.name))})]})]})}function IY({project:t,onExport:e,onReset:n}){const[r,o]=S.useState(!1),[i,s]=S.useState(!1),l=async()=>{s(!0);try{await n(),o(!1)}finally{s(!1)}};return v.jsxs(v.Fragment,{children:[v.jsxs(UE,{children:[v.jsx(WE,{asChild:!0,children:v.jsxs("button",{type:"button",title:t.path,className:"flex w-full max-w-full items-center gap-1.5 rounded-lg border bg-muted/50 px-2.5 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[v.jsx(PE,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),v.jsx("span",{className:"truncate",children:t.name}),v.jsx(RE,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground/60"})]})}),v.jsxs(qE,{align:"start",className:"w-56",children:[v.jsx(KE,{className:"truncate",children:t.name}),v.jsx(n1,{}),v.jsxs(Tk,{onSelect:e,children:[v.jsx(VP,{}),"Dışa aktar (.zip)"]}),v.jsx(n1,{}),v.jsxs(Tk,{variant:"destructive",onSelect:()=>o(!0),children:[v.jsx(O9,{}),"Baştan başla (sıfırla)"]})]})]}),v.jsx(Fy,{open:r,onOpenChange:o,children:v.jsxs(zy,{children:[v.jsxs($y,{children:[v.jsx(By,{children:"Şemayı sıfırla?"}),v.jsx(Vy,{children:"İçerik dosyaların diskte kalır ama şema temizlenir, baştan şablon/JSON seçebilirsin."})]}),v.jsxs(HE,{children:[v.jsx(VE,{asChild:!0,children:v.jsx(Ge,{variant:"outline",children:"Vazgeç"})}),v.jsx(Ge,{variant:"destructive",onClick:l,disabled:i,children:i?"Sıfırlanıyor…":"Sıfırla"})]})]})})]})}function PY({active:t,onClick:e}){return v.jsxs("button",{type:"button",onClick:e,className:De("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left transition-colors",t?"bg-accent text-primary":"text-muted-foreground hover:bg-accent/60"),children:[v.jsx(zE,{className:"h-4 w-4 shrink-0"}),v.jsxs("span",{className:"min-w-0",children:[v.jsx("span",{className:"block text-sm font-medium leading-tight",children:"Şema"}),v.jsx("span",{className:De("block text-xs leading-tight",t?"text-primary/70":"text-muted-foreground/70"),children:"İçerik yapısı"})]})]})}function hS({label:t,onAdd:e,children:n}){return v.jsxs("div",{className:"pt-4",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 pb-1",children:[v.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground/80",children:t}),v.jsxs(Hy,{children:[v.jsx(Uy,{asChild:!0,children:v.jsxs(Ge,{variant:"ghost",size:"icon-xs",onClick:e,className:"text-muted-foreground hover:text-primary",children:[v.jsx(Ys,{}),v.jsxs("span",{className:"sr-only",children:[t," ekle"]})]})}),v.jsxs(Wy,{children:[t," ekle"]})]})]}),v.jsx("div",{className:"space-y-0.5",children:n})]})}function pS({onClick:t,children:e}){return v.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-muted-foreground/70 transition-colors hover:bg-accent/60 hover:text-primary",children:[v.jsx(Ys,{className:"h-4 w-4"})," ",e]})}function mS({children:t,icon:e,active:n,onClick:r}){return v.jsxs("button",{type:"button",onClick:r,className:De("flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm transition-colors",n?"bg-accent font-medium text-primary":"text-muted-foreground hover:bg-accent/60 hover:text-foreground"),children:[e&&v.jsx("span",{className:n?"text-primary":"text-muted-foreground/70",children:e}),v.jsx("span",{className:"truncate",children:t})]})}function jY({schema:t,selection:e,onSelect:n,onReload:r,onOpenSchema:o,addSeq:i,addKind:s,onBrowseTemplates:l}){if(!e)return v.jsx(LY,{icon:v.jsx(op,{className:"h-6 w-6"}),title:"Soldan başla",hint:"Bir koleksiyon ya da tekil kayıt seçerek düzenlemeye başla. Yapıyı değiştirmek istersen Şema'ya git.",action:v.jsxs(Ge,{onClick:()=>o(),children:[v.jsx(zE,{})," Şemayı aç"]})});if(e.kind==="schema")return v.jsx(dY,{schema:t,initialAdd:s??void 0,onSaved:()=>void r(),onBrowseTemplates:l},i);if(e.kind==="collection"){const d=t.collections.find(h=>h.name===e.name);return d?v.jsx(zY,{collection:d,onOpen:h=>n({kind:"entry",collection:d.name,slug:h}),onNew:()=>n({kind:"newEntry",collection:d.name})}):v.jsx(ju,{children:"Bu koleksiyon bulunamadı."})}if(e.kind==="entry"||e.kind==="newEntry"){const d=t.collections.find(p=>p.name===e.collection);if(!d)return v.jsx(ju,{children:"Bu koleksiyon bulunamadı."});const h=e.kind==="entry"?e.slug:null;return v.jsx($Y,{collection:d,slug:h,onSaved:p=>n({kind:"entry",collection:d.name,slug:p}),onDeleted:()=>n({kind:"collection",name:d.name})},`${d.name}/${h??"new"}`)}const u=t.singletons.find(d=>d.name===e.name);return u?v.jsx(BY,{singleton:u},u.name):v.jsx(ju,{children:"Bu tekil kayıt bulunamadı."})}function LY({icon:t,title:e,hint:n,action:r}){return v.jsxs("div",{className:"flex h-full flex-col items-center justify-center px-6 text-center",children:[t&&v.jsx("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl border bg-card text-muted-foreground shadow-sm",children:t}),v.jsx("p",{className:"text-base font-semibold text-foreground",children:e}),n&&v.jsx("p",{className:"mt-1.5 max-w-sm text-sm text-muted-foreground",children:n}),r&&v.jsx("div",{className:"mt-5",children:r})]})}function Ip({children:t}){return v.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t})}function Ya({children:t}){return v.jsx(_Y,{children:v.jsx("div",{className:"mx-auto max-w-3xl space-y-5 px-8 py-6",children:t})})}function kA(){return v.jsx(Ip,{children:v.jsx("div",{className:"space-y-6",children:bA.slice(0,4).map(t=>v.jsxs("div",{className:"space-y-2",children:[v.jsx(Pu,{className:"h-3.5 w-28"}),v.jsx(Pu,{className:"h-8 w-full"})]},t))})})}function wA({onRetry:t,onBack:e}){return v.jsx(Ip,{children:v.jsxs("div",{className:"flex flex-col items-center py-8 text-center",children:[v.jsx("div",{className:"mb-3 flex size-12 items-center justify-center rounded-xl bg-destructive/10 text-destructive",children:v.jsx(Ly,{className:"size-5"})}),v.jsx("p",{className:"font-medium text-foreground",children:"Kayıt yüklenemedi"}),v.jsx("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:"Dosya okunamadı ya da silinmiş olabilir. Boş bir formla üzerine yazmamak için düzenleme kapatıldı."}),v.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[v.jsx(Ge,{onClick:t,children:"Tekrar dene"}),e&&v.jsx(Ge,{variant:"outline",onClick:e,children:"Listeye dön"})]})]})})}function FY(t){return t?new Intl.DateTimeFormat("tr-TR",{day:"numeric",month:"short",year:"numeric"}).format(new Date(t)):"—"}function zY({collection:t,onOpen:e,onNew:n}){const[r,o]=S.useState(null),[i,s]=S.useState("");S.useEffect(()=>{yA(t.name).then(o)},[t.name]);const l=i.trim().toLowerCase(),u=r==null?void 0:r.filter(h=>h.title.toLowerCase().includes(l)||h.slug.includes(l)),d=!!r&&r.length>0;return v.jsxs(Ws,{children:[v.jsx(qs,{title:t.label??t.name,subtitle:r?`${r.length} kayıt`:"Kayıtlar yükleniyor…",actions:v.jsxs(Ge,{onClick:n,children:[v.jsx(Ys,{})," Yeni kayıt"]}),toolbar:d?v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("div",{className:"relative w-full max-w-sm",children:[v.jsx(z9,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),v.jsx(mo,{className:"pl-9",placeholder:"Başlık veya slug ara…",value:i,onChange:h=>s(h.target.value)})]}),v.jsx("span",{className:"ml-auto shrink-0 text-xs tabular-nums text-muted-foreground",children:l?`${(u==null?void 0:u.length)??0} sonuç`:null})]}):void 0}),v.jsx(TY,{children:v.jsxs(AY,{className:"flex h-full flex-col [&>[data-slot=table-container]]:min-h-0 [&>[data-slot=table-container]]:flex-1",children:[r===null&&v.jsx(gS,{rows:null,onOpen:e}),r!==null&&r.length===0&&v.jsx(fS,{icon:v.jsx(op,{className:"h-6 w-6"}),title:"Henüz kayıt yok",hint:"Bu koleksiyona ilk içeriği ekleyerek başla.",action:v.jsxs(Ge,{onClick:n,variant:"outline",children:[v.jsx(Ys,{})," İlk kaydı oluştur"]})}),d&&(u==null?void 0:u.length)===0&&v.jsx(fS,{icon:v.jsx(L9,{className:"h-6 w-6"}),title:"Eşleşen kayıt yok",hint:`“${i.trim()}” için sonuç bulunamadı. Aramayı değiştir ya da temizle.`,action:v.jsx(Ge,{variant:"outline",onClick:()=>s(""),children:"Aramayı temizle"})}),d&&u&&u.length>0&&v.jsx(gS,{rows:u,onOpen:e})]})})]})}const yf="h-9 bg-muted/50 px-4 text-xs font-medium uppercase tracking-wide text-muted-foreground";function gS({rows:t,onOpen:e}){return v.jsxs(Lj,{children:[v.jsx(Fj,{className:"sticky top-0 z-10",children:v.jsxs(Pm,{className:"hover:bg-transparent",children:[v.jsx(Jd,{className:De(yf,"w-full"),children:"Başlık"}),v.jsx(Jd,{className:yf,children:"Dosya"}),v.jsx(Jd,{className:De(yf,"text-right"),children:"Güncellendi"}),v.jsx(Jd,{className:De(yf,"w-10 pl-0"),children:v.jsx("span",{className:"sr-only",children:"Aç"})})]})}),v.jsx(zj,{children:t===null?bA.map(n=>v.jsxs(Pm,{className:"hover:bg-transparent",children:[v.jsx(Ni,{className:"px-4 py-3",children:v.jsx(Pu,{className:"h-3.5 w-48"})}),v.jsx(Ni,{className:"px-4 py-3",children:v.jsx(Pu,{className:"h-3 w-24"})}),v.jsx(Ni,{className:"px-4 py-3",children:v.jsx(Pu,{className:"ml-auto h-3 w-20"})}),v.jsx(Ni,{className:"w-10 py-3 pl-0"})]},n)):t.map(n=>v.jsxs(Pm,{tabIndex:0,onClick:()=>e(n.slug),onKeyDown:r=>r.key==="Enter"&&e(n.slug),className:"group/row cursor-pointer hover:bg-muted/40 focus:bg-accent focus:outline-none",children:[v.jsx(Ni,{className:"px-4 py-3 font-medium text-foreground",children:n.title}),v.jsx(Ni,{className:"px-4 py-3 font-mono text-xs text-muted-foreground",children:n.slug}),v.jsx(Ni,{className:"px-4 py-3 text-right text-xs tabular-nums text-muted-foreground",children:FY(n.updatedAt)}),v.jsxs(Ni,{className:"w-10 py-3 pr-4 pl-0 text-right",children:[v.jsx(DE,{className:"ml-auto h-4 w-4 text-transparent transition-colors group-hover/row:text-muted-foreground/70 group-focus/row:text-muted-foreground/70"}),v.jsx("span",{className:"sr-only",children:"aç"})]})]},n.slug))})]})}function CA(t,e){const[n,r]=S.useState({}),[o,i]=S.useState(!0),[s,l]=S.useState(!1),[u,d]=S.useState(0),h=S.useRef(0);S.useEffect(()=>{const m=++h.current;i(!0),l(!1),t().then(y=>{m===h.current&&(y===null&&e?l(!0):r(y??{}),i(!1))}).catch(()=>{m===h.current&&(l(!0),i(!1))})},[u]);const p=S.useCallback(()=>d(m=>m+1),[]);return{data:n,setData:r,loading:o,failed:s,retry:p}}function $Y({collection:t,slug:e,onSaved:n,onDeleted:r}){const o=e===null,i=S.useCallback(()=>o?Promise.resolve({}):uS(t.name,e),[t.name,e,o]),{data:s,setData:l,loading:u,failed:d,retry:h}=CA(i,!o),[p,m]=S.useState(""),[y,x]=S.useState(!1),[b,w]=S.useState(null),E=(O,I)=>l(L=>{const W={...L};return I===""||I===void 0?delete W[O]:W[O]=I,W}),_=S.useMemo(()=>r_(t.fields,s),[s,t.fields]),A=o?Ky(p||String(s.title??"icerik")):e,M=async()=>{w(null),x(!0);try{if(o&&await uS(t.name,A)){const I=`"${A}" zaten var — farklı bir slug seç.`;w(I),zs.error(I);return}const O=await rY(t.name,A,s);zs.success(`"${O}" kaydedildi`),n(O)}finally{x(!1)}},N=async()=>{o||(await oY(t.name,e),zs.success(`"${e}" silindi`),r())},D=t.label??t.name;return u?v.jsxs(Ws,{children:[v.jsx(qs,{title:D,subtitle:v.jsx(Af,{children:`${t.name}/…`})}),v.jsx(Ya,{children:v.jsx(kA,{})})]}):d?v.jsxs(Ws,{children:[v.jsx(qs,{title:D,subtitle:v.jsx(Af,{children:`${t.name}/${e}.json`})}),v.jsx(Ya,{children:v.jsx(wA,{onRetry:h,onBack:r})})]}):v.jsxs(Ws,{children:[v.jsx(qs,{title:D,badge:o?v.jsx(Qa,{variant:"secondary",className:"font-normal",children:"yeni"}):void 0,subtitle:v.jsx(Af,{children:`${t.name}/${A}.json`}),actions:v.jsxs(v.Fragment,{children:[!o&&v.jsxs(Ge,{variant:"destructive",onClick:N,children:[v.jsx($E,{})," Sil"]}),v.jsx(Ge,{onClick:M,disabled:y||!_.ok,children:y?"Kaydediliyor…":"Kaydet"})]})}),v.jsxs(Ya,{children:[b&&v.jsx(SA,{title:"Kaydedilemedi",children:b}),v.jsxs(Ip,{children:[o&&v.jsxs("div",{className:"mb-6 rounded-lg border bg-muted/40 p-4",children:[v.jsx(_A,{label:"Dosya adı",hint:`${A}.json`,children:v.jsx(mo,{value:p,onChange:O=>m(O.target.value),placeholder:"otomatik",className:"bg-card font-mono"})}),v.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"Boş bırakırsan başlıktan üretilir. Kaydettikten sonra değişmez."})]}),v.jsx("div",{className:"space-y-6",children:t.fields.map(O=>v.jsx(TA,{field:O,value:s[O.key],onChange:E},O.key))})]}),v.jsx(EA,{result:_})]})]})}function BY({singleton:t}){const e=S.useCallback(()=>sY(t.name),[t.name]),{data:n,setData:r,loading:o,failed:i,retry:s}=CA(e,!1),[l,u]=S.useState(!1),d=(x,b)=>r(w=>{const E={...w};return b===""||b===void 0?delete E[x]:E[x]=b,E}),h=S.useMemo(()=>r_(t.fields,n),[n,t.fields]),p=async()=>{u(!0);try{await aY(t.name,n),zs.success(`${t.label??t.name} kaydedildi`)}finally{u(!1)}},m=t.label??t.name,y=v.jsx(Qa,{variant:"secondary",className:"font-normal",children:"tekil"});return o?v.jsxs(Ws,{children:[v.jsx(qs,{title:m,badge:y}),v.jsx(Ya,{children:v.jsx(kA,{})})]}):i?v.jsxs(Ws,{children:[v.jsx(qs,{title:m,badge:y}),v.jsx(Ya,{children:v.jsx(wA,{onRetry:s})})]}):v.jsxs(Ws,{children:[v.jsx(qs,{title:m,badge:y,subtitle:v.jsx(Af,{children:`${t.name}.json`}),actions:v.jsx(Ge,{onClick:p,disabled:l||!h.ok,children:l?"Kaydediliyor…":"Kaydet"})}),v.jsxs(Ya,{children:[v.jsx(Ip,{children:v.jsx("div",{className:"space-y-6",children:t.fields.map(x=>v.jsx(TA,{field:x,value:n[x.key],onChange:d},x.key))})}),v.jsx(EA,{result:h})]})]})}function SA({title:t,tone:e="error",children:n}){const r=e==="error";return v.jsxs("div",{className:De("rounded-xl border p-4",r?"border-destructive/30 bg-destructive/5":"border-border bg-muted/40"),children:[v.jsxs("div",{className:De("flex items-center gap-2 text-sm font-medium",r?"text-destructive":"text-foreground"),children:[v.jsx(Ly,{className:"h-4 w-4 shrink-0"}),t]}),v.jsx("div",{className:"mt-2.5 text-sm text-muted-foreground",children:n})]})}function EA({result:t}){if(t.issues.length===0)return null;const e=t.issues.some(n=>n.level==="error");return v.jsx(SA,{tone:e?"error":"warning",title:e?"Kaydetmeden önce düzeltilecekler":"Uyarılar",children:v.jsx("ul",{className:"space-y-2",children:t.issues.map(n=>v.jsxs("li",{className:"flex items-start gap-2.5",children:[v.jsx("span",{"aria-hidden":!0,className:De("mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full",n.level==="error"?"bg-destructive":"bg-muted-foreground/50")}),v.jsx("span",{className:"rounded bg-background px-1.5 py-0.5 font-mono text-xs text-foreground",children:n.key}),v.jsx("span",{className:"min-w-0",children:n.message})]},`${n.key}-${n.message}`))})})}function _A({label:t,required:e,type:n,hint:r,children:o}){var s;const i=n?(s=Qx[n])==null?void 0:s.icon:null;return v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[i&&v.jsx(i,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60"}),v.jsx(nj,{className:"text-sm font-medium text-foreground",children:t}),e&&v.jsx("span",{className:"text-destructive","aria-hidden":!0,children:"*"}),r&&v.jsx("span",{className:"ml-auto truncate font-mono text-xs text-primary",children:r})]}),o]})}function TA({field:t,value:e,onChange:n}){return v.jsx(_A,{label:t.label||t.key,required:t.required,type:t.type,children:v.jsx(VY,{field:t,value:e,onChange:n})})}function VY({field:t,value:e,onChange:n}){const r=t.key;switch(t.type){case"richtext":return v.jsx(XG,{value:e??"",onChange:o=>n(r,o)});case"number":return v.jsx(mo,{type:"number",value:e===void 0?"":String(e),onChange:o=>n(r,o.target.value===""?"":Number(o.target.value))});case"boolean":return v.jsx(Ge,{type:"button",variant:e?"default":"outline",role:"switch","aria-checked":!!e,onClick:()=>n(r,!e),className:"min-w-20",children:e?"Evet":"Hayır"});case"date":return v.jsx(mo,{type:"date",className:"w-[240px]",value:e??"",onChange:o=>n(r,o.target.value)});case"select":return v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs(GE,{value:e||void 0,onValueChange:o=>n(r,o),children:[v.jsx(JE,{className:"w-[240px]",children:v.jsx(ZE,{placeholder:"Seç…"})}),v.jsx(YE,{children:(t.options??[]).map(o=>v.jsx(XE,{value:o,children:o},o))})]}),e?v.jsxs(Ge,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>n(r,""),className:"text-muted-foreground",children:[v.jsx(ip,{}),v.jsx("span",{className:"sr-only",children:"Temizle"})]}):null]});case"relation":return v.jsx(HY,{field:t,value:e,onChange:n});case"image":return v.jsx(WY,{value:e,onChange:o=>n(r,o)});default:return v.jsx(mo,{value:e??"",onChange:o=>n(r,o.target.value)})}}function HY({field:t,value:e,onChange:n}){const[r,o]=S.useState([]),i=Array.isArray(e)?e:[];S.useEffect(()=>{t.to&&nY(t.to).then(o).catch(()=>o([]))},[t.to]);const s=u=>n(t.key,u.length?u:""),l=u=>{s(i.includes(u)?i.filter(d=>d!==u):[...i,u])};return r.length===0?v.jsxs("p",{className:"rounded-lg border border-dashed bg-muted/30 px-3 py-2.5 text-sm text-muted-foreground",children:["“",t.to,"” içinde kayıt yok."]}):v.jsxs("div",{className:"space-y-2.5",children:[i.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.map(u=>v.jsxs(Qa,{variant:"secondary",className:"gap-1 pr-1 font-mono",children:[u,v.jsx("button",{type:"button",onClick:()=>l(u),className:"rounded-full text-muted-foreground transition-colors hover:text-destructive","aria-label":`${u} bağlantısını kaldır`,children:v.jsx(ip,{className:"h-3 w-3"})})]},u))}),v.jsxs(UE,{children:[v.jsx(WE,{asChild:!0,children:v.jsxs(Ge,{variant:"outline",children:[v.jsx(LE,{})," Bağlantı ekle"]})}),v.jsxs(qE,{align:"start",className:"max-h-72 w-56 overflow-y-auto",children:[v.jsxs(KE,{children:["“",t.to,"” kayıtları"]}),v.jsx(n1,{}),r.map(u=>v.jsx(tj,{checked:i.includes(u),onCheckedChange:()=>l(u),onSelect:d=>d.preventDefault(),className:"font-mono text-xs",children:u},u))]})]})]})}async function UY(t,e=1600){const n=await createImageBitmap(t),r=Math.min(1,e/n.width),o=Math.round(n.width*r),i=Math.round(n.height*r),s=document.createElement("canvas");s.width=o,s.height=i;const l=s.getContext("2d");if(!l)throw new Error("canvas yok");l.drawImage(n,0,0,o,i);const u=await new Promise(p=>s.toBlob(p,"image/webp",.85));if(!u)throw new Error("dönüştürülemedi");const d=new Uint8Array(await u.arrayBuffer());let h="";for(const p of d)h+=String.fromCharCode(p);return btoa(h)}function WY({value:t,onChange:e}){const[n,r]=S.useState(!1),o=typeof t=="string"?t:"",i=o?`/media/${o.split("/").pop()}`:null,s=async l=>{r(!0);try{e(await iY(await UY(l),l.name)),zs.success("Görsel yüklendi")}finally{r(!1)}};return v.jsxs("div",{className:"flex items-center gap-4 rounded-lg border bg-muted/30 p-3",children:[v.jsx("div",{className:De("flex h-24 w-24 shrink-0 items-center justify-center overflow-hidden rounded-lg border bg-card",!i&&"border-dashed"),children:i?v.jsx("img",{src:i,alt:"",className:"h-full w-full object-cover"}):v.jsx(jE,{className:"h-6 w-6 text-muted-foreground/60"})}),v.jsxs("div",{className:"min-w-0 space-y-2",children:[v.jsxs("label",{className:De(Ry({variant:"outline"}),"cursor-pointer bg-card"),children:[v.jsx(BE,{}),n?"Yükleniyor…":"Görsel yükle",v.jsx("input",{type:"file",accept:"image/*",hidden:!0,onChange:l=>{var d;const u=(d=l.target.files)==null?void 0:d[0];u&&s(u)}})]}),o&&v.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[v.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:o}),v.jsx(Ge,{type:"button",variant:"ghost",size:"xs",onClick:()=>e(""),className:"text-muted-foreground hover:text-destructive",children:"kaldır"})]})]})]})}const AA=document.getElementById("root");if(!AA)throw new Error("root yok");MN.createRoot(AA).render(v.jsx(S.StrictMode,{children:v.jsx(MY,{})}));
|