@isardsat/editorial-admin 6.5.0 → 6.6.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/build/client/assets/FilePicker-CWQ8ELBw.js +1 -0
- package/build/client/assets/Loading-BiO3HJmZ.js +11 -0
- package/build/client/assets/URLInput-CFnU0U1n.js +1 -0
- package/build/client/assets/{authSlice-DXFkOZ5W.js → authSlice-O1tz7SK1.js} +167 -167
- package/build/client/assets/{button-DYtHJlPL.js → button-494fplqA.js} +1 -1
- package/build/client/assets/{calendar-6ih_JEvR.js → calendar-DVBBYeOW.js} +1 -1
- package/build/client/assets/chevron-down-CtNmiOMb.js +6 -0
- package/build/client/assets/chevron-right-haBQNeuE.js +6 -0
- package/build/client/assets/{chunk-EF7DTUVF-MlADC7xe.js → chunk-EF7DTUVF-CaKisB5m.js} +1 -1
- package/build/client/assets/{createLucideIcon-BJQzFwzJ.js → createLucideIcon-BweVylaW.js} +1 -1
- package/build/client/assets/dashboard-DqU-WlEe.js +1 -0
- package/build/client/assets/dashboard._collection-LAkj-iO9.js +26 -0
- package/build/client/assets/dashboard._collection._document-Cqsuu-0-.js +1 -0
- package/build/client/assets/dashboard._collection.new-SI3Dkpds.js +1 -0
- package/build/client/assets/dashboard._layout-BUGw8Wsg.js +46 -0
- package/build/client/assets/dashboard.files-YptTPTFT.js +1 -0
- package/build/client/assets/date-picker-D7MFHjcF.js +1 -0
- package/build/client/assets/datetime-picker-DzApRNz_.js +1 -0
- package/build/client/assets/{entry.client-BI4QA1ti.js → entry.client-Be049MAC.js} +1 -1
- package/build/client/assets/{external-link-D1If5twJ.js → external-link-LWykkN17.js} +1 -1
- package/build/client/assets/files-DrzVVLDE.js +26 -0
- package/build/client/assets/home-BtNh5JTT.js +1 -0
- package/build/client/assets/hooks-BA9LC00C.js +1 -0
- package/build/client/assets/{index-xBXWoUIa.js → index-BJ-ODQ_I.js} +1 -1
- package/build/client/assets/index-BNiwB2Xo.js +1 -0
- package/build/client/assets/index-Blx_6p83.js +1 -0
- package/build/client/assets/index-CQ2mjYJl.js +1 -0
- package/build/client/assets/index-CqaffZUS.js +1 -0
- package/build/client/assets/{index-BCGL68Qt.js → index-DgN6jnv0.js} +1 -1
- package/build/client/assets/index-N8jzdZDg.js +45 -0
- package/build/client/assets/{index-Dycitln2.js → index-gfXi4hAm.js} +1 -1
- package/build/client/assets/itemForm-BcDnRX3X.js +13 -0
- package/build/client/assets/manifest-384b5d21.js +1 -0
- package/build/client/assets/{itemForm-ya4bvPWM.css → markdownEditor-D2iPtBtk.css} +1 -1
- package/build/client/assets/markdownEditor-DQtQQZeo.js +128 -0
- package/build/client/assets/popover-DDQEIzon.js +6 -0
- package/build/client/assets/root-BctYpWwq.css +1 -0
- package/build/client/assets/root-DtBI39a7.js +1 -0
- package/build/client/assets/{trash-CN5HT_ZJ.js → trash-BPu8wmdf.js} +1 -1
- package/build/client/assets/tslib.es6-De9GV7Vy.js +1 -0
- package/build/client/assets/types-qmeOZPBc.js +6 -0
- package/build/client/assets/upload-C84AIRF5.js +6 -0
- package/build/client/assets/{utils-BdGM_Id-.js → utils-5cV-49hI.js} +2 -2
- package/build/client/assets/x-BI8YVnoZ.js +6 -0
- package/build/client/index.html +3 -3
- package/package.json +2 -2
- package/build/client/assets/dashboard-eLqz7BO7.js +0 -1
- package/build/client/assets/dashboard._collection-BBg-A9Sj.js +0 -26
- package/build/client/assets/dashboard._collection._document-B0ZbqsBo.js +0 -1
- package/build/client/assets/dashboard._collection.new-mErjJpgV.js +0 -1
- package/build/client/assets/dashboard._layout-124HIuKq.js +0 -46
- package/build/client/assets/dashboard.files-BgTiS3Ze.js +0 -1
- package/build/client/assets/files-rJZM0-f6.js +0 -26
- package/build/client/assets/home-l-obs5PE.js +0 -1
- package/build/client/assets/index-BhhxCYB_.js +0 -1
- package/build/client/assets/index-Cl368BLL.js +0 -55
- package/build/client/assets/itemForm-D7gNDu4Q.js +0 -106
- package/build/client/assets/manifest-e71b8e01.js +0 -1
- package/build/client/assets/root-DVVVBPEK.css +0 -1
- package/build/client/assets/root-vSnuIdRx.js +0 -1
- package/build/client/assets/spinner-C3uu_C2V.js +0 -11
- package/build/client/assets/types-BFhFSnS8.js +0 -6
- package/build/client/assets/upload-CopmcV94.js +0 -11
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import{R as _,a as I,p as M,A as Ty,x as Xg,B as Qg,C as Jd}from"./chunk-EF7DTUVF-MlADC7xe.js";import{b as Ms,B as pi}from"./button-DYtHJlPL.js";import{I as mo,g as Iy,u as uc,h as Ny,s as Gr,b as My,l as Ay,o as Oy,F as Py,a as Qa,c as el,d as is,e as tl,f as nl,C as Fy,i as Kd,t as Ly}from"./types-BFhFSnS8.js";import{a as he,q as ep,r as Dy,t as Ry}from"./utils-BdGM_Id-.js";import{c as tp}from"./createLucideIcon-BJQzFwzJ.js";import{h as $y,i as ca,j as np,u as Oo,k as cc,l as rp,m as ip,n as op,o as sp,p as ap,F as lp,q as up,r as cp,s as dp,R as fp,W as By,C as hp,T as gp,D as Hy,a as dc,P as pp,O as mp,t as Vy,X as zy,v as xp,b as Wy,V as jy,c as yp,d as bp,e as vp,f as Cp,g as wp,A as Uy}from"./index-Cl368BLL.js";import{C as Jy}from"./upload-CopmcV94.js";import{u as Pr,c as Kr,b as _p,P as Ue,a as we,d as or}from"./index-BhhxCYB_.js";import{u as ct,a as As,b as Ky}from"./index-BCGL68Qt.js";import{C as kp}from"./calendar-6ih_JEvR.js";import{F as Zy}from"./files-rJZM0-f6.js";import{E as Sp}from"./external-link-D1If5twJ.js";import{a as Os}from"./index-xBXWoUIa.js";import{_ as Zd}from"./authSlice-DXFkOZ5W.js";/**
|
|
2
|
-
* @license lucide-react v0.487.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const qy=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Yy=tp("chevron-left",qy);/**
|
|
7
|
-
* @license lucide-react v0.487.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Gy=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Xy=tp("save",Gy),Qy={},qi={};function ro(e,t){try{const r=(Qy[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in qi?qi[r]:qd(r,r.split(":"))}catch{if(e in qi)return qi[e];const n=e?.match(e2);return n?qd(e,n.slice(1)):NaN}}const e2=/([+-]\d\d):?(\d\d)?/;function qd(e,t){const n=+t[0],r=+(t[1]||0);return qi[e]=n>0?n*60+r:n*60-r}class bn extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ro(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Ep(this),Kl(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new bn(...n,t):new bn(Date.now(),t)}withTimeZone(t){return new bn(+this,t)}getTimezoneOffset(){return-ro(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Kl(this),+this}[Symbol.for("constructDateFrom")](t){return new bn(+new Date(t),this.timeZone)}}const Yd=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Yd.test(e))return;const t=e.replace(Yd,"$1UTC");bn.prototype[t]&&(e.startsWith("get")?bn.prototype[e]=function(){return this.internal[t]()}:(bn.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),t2(this),+this},bn.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Kl(this),+this}))});function Kl(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function t2(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Ep(e)}function Ep(e){const t=ro(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),o=r-i,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const l=ro(e.timeZone,e),c=-new Date(+e).getTimezoneOffset()-l,d=l!==t,f=c-a;if(d&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);const h=ro(e.timeZone,e),g=l-h;g&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g))}}class ht extends bn{static tz(t,...n){return n.length?new ht(...n,t):new ht(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),i=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,i]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${i}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,i]=this.tzComponents();return`${t} GMT${n}${r}${i} (${n2(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),i=String(Math.abs(t)%60).padStart(2,"0");return[n,r,i]}withTimeZone(t){return new ht(+this,t)}[Symbol.for("constructDateFrom")](t){return new ht(+new Date(t),this.timeZone)}}function n2(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var ie;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ie||(ie={}));var Ve;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Ve||(Ve={}));var qt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(qt||(qt={}));var At;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(At||(At={}));const Tp=6048e5,r2=864e5,Gd=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Gd in e?e[Gd](t):e instanceof Date?new e.constructor(t):new Date(t)}function Oe(e,t){return rt(t||e,e)}function Ip(e,t,n){const r=Oe(e,n?.in);return isNaN(t)?rt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Np(e,t,n){const r=Oe(e,n?.in);if(isNaN(t))return rt(e,NaN);if(!t)return r;const i=r.getDate(),o=rt(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const s=o.getDate();return i>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let i2={};function Po(){return i2}function mi(e,t){const n=Po(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Oe(e,t?.in),o=i.getDay(),s=(o<r?7:0)+o-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function xo(e,t){return mi(e,{...t,weekStartsOn:1})}function Mp(e,t){const n=Oe(e,t?.in),r=n.getFullYear(),i=rt(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=xo(i),s=rt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=xo(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Xd(e){const t=Oe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ii(e,...t){const n=rt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function yo(e,t){const n=Oe(e,t?.in);return n.setHours(0,0,0,0),n}function Ap(e,t,n){const[r,i]=Ii(n?.in,e,t),o=yo(r),s=yo(i),a=+o-Xd(o),l=+s-Xd(s);return Math.round((a-l)/r2)}function o2(e,t){const n=Mp(e,t),r=rt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xo(r)}function s2(e,t,n){return Ip(e,t*7,n)}function a2(e,t,n){return Np(e,t*12,n)}function l2(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=rt.bind(null,i));const o=Oe(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),rt(r,n||NaN)}function u2(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=rt.bind(null,i));const o=Oe(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),rt(r,n||NaN)}function c2(e,t,n){const[r,i]=Ii(n?.in,e,t);return+yo(r)==+yo(i)}function Op(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function d2(e){return!(!Op(e)&&typeof e!="number"||isNaN(+Oe(e)))}function f2(e,t,n){const[r,i]=Ii(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),s=r.getMonth()-i.getMonth();return o*12+s}function h2(e,t){const n=Oe(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function g2(e,t){const[n,r]=Ii(e,t.start,t.end);return{start:n,end:r}}function p2(e,t){const{start:n,end:r}=g2(t?.in,e);let i=+n>+r;const o=i?+n:+r,s=i?r:n;s.setHours(0,0,0,0),s.setDate(1);let a=1;const l=[];for(;+s<=o;)l.push(rt(n,s)),s.setMonth(s.getMonth()+a);return i?l.reverse():l}function m2(e,t){const n=Oe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function x2(e,t){const n=Oe(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Pp(e,t){const n=Oe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Fp(e,t){const n=Po(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Oe(e,t?.in),o=i.getDay(),s=(o<r?-7:0)+6-(o-r);return i.setDate(i.getDate()+s),i.setHours(23,59,59,999),i}function y2(e,t){return Fp(e,{...t,weekStartsOn:1})}const b2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},v2=(e,t,n)=>{let r;const i=b2[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function rl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const C2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},w2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k2={date:rl({formats:C2,defaultWidth:"full"}),time:rl({formats:w2,defaultWidth:"full"}),dateTime:rl({formats:_2,defaultWidth:"full"})},S2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E2=(e,t,n,r)=>S2[e];function Vi(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const T2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},I2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},N2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},M2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},A2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},O2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P2=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},F2={ordinalNumber:P2,era:Vi({values:T2,defaultWidth:"wide"}),quarter:Vi({values:I2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vi({values:N2,defaultWidth:"wide"}),day:Vi({values:M2,defaultWidth:"wide"}),dayPeriod:Vi({values:A2,defaultWidth:"wide",formattingValues:O2,defaultFormattingWidth:"wide"})};function zi(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?D2(a,d=>d.test(s)):L2(a,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(s.length);return{value:u,rest:c}}}function L2(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function D2(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function R2(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(i.length);return{value:s,rest:a}}}const $2=/^(\d+)(th|st|nd|rd)?/i,B2=/\d+/i,H2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},V2={any:[/^b/i,/^(a|c)/i]},z2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},W2={any:[/1/i,/2/i,/3/i,/4/i]},j2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},U2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},K2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Z2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},q2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Y2={ordinalNumber:R2({matchPattern:$2,parsePattern:B2,valueCallback:e=>parseInt(e,10)}),era:zi({matchPatterns:H2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),quarter:zi({matchPatterns:z2,defaultMatchWidth:"wide",parsePatterns:W2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zi({matchPatterns:j2,defaultMatchWidth:"wide",parsePatterns:U2,defaultParseWidth:"any"}),day:zi({matchPatterns:J2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any"}),dayPeriod:zi({matchPatterns:Z2,defaultMatchWidth:"any",parsePatterns:q2,defaultParseWidth:"any"})},fc={code:"en-US",formatDistance:v2,formatLong:k2,formatRelative:E2,localize:F2,match:Y2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function G2(e,t){const n=Oe(e,t?.in);return Ap(n,Pp(n))+1}function Lp(e,t){const n=Oe(e,t?.in),r=+xo(n)-+o2(n);return Math.round(r/Tp)+1}function Dp(e,t){const n=Oe(e,t?.in),r=n.getFullYear(),i=Po(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=rt(t?.in||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const a=mi(s,t),l=rt(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const u=mi(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function X2(e,t){const n=Po(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Dp(e,t),o=rt(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),mi(o,t)}function Rp(e,t){const n=Oe(e,t?.in),r=+mi(n,t)-+X2(n,t);return Math.round(r/Tp)+1}function Ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Gn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ie(n+1,2)},d(e,t){return Ie(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ie(e.getHours()%12||12,t.length)},H(e,t){return Ie(e.getHours(),t.length)},m(e,t){return Ie(e.getMinutes(),t.length)},s(e,t){return Ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ie(i,t.length)}},Xr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qd={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Gn.y(e,t)},Y:function(e,t,n,r){const i=Dp(e,r),o=i>0?i:1-i;if(t==="YY"){const s=o%100;return Ie(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Ie(o,t.length)},R:function(e,t){const n=Mp(e);return Ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ie(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ie(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ie(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Gn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ie(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Rp(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ie(i,t.length)},I:function(e,t,n){const r=Lp(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Gn.d(e,t)},D:function(e,t,n){const r=G2(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ie(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ie(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ie(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Ie(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Xr.noon:r===0?i=Xr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Xr.evening:r>=12?i=Xr.afternoon:r>=4?i=Xr.morning:i=Xr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Gn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Gn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Gn.s(e,t)},S:function(e,t){return Gn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tf(r);case"XXXX":case"XX":return Sr(r);case"XXXXX":case"XXX":default:return Sr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tf(r);case"xxxx":case"xx":return Sr(r);case"xxxxx":case"xxx":default:return Sr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ef(r,":");case"OOOO":default:return"GMT"+Sr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ef(r,":");case"zzzz":default:return"GMT"+Sr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ie(r,t.length)},T:function(e,t,n){return Ie(+e,t.length)}};function ef(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Ie(o,2)}function tf(e,t){return e%60===0?(e>0?"-":"+")+Ie(Math.abs(e)/60,2):Sr(e,t)}function Sr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ie(Math.trunc(r/60),2),o=Ie(r%60,2);return n+i+t+o}const nf=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},$p=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Q2=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return nf(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",nf(r,t)).replace("{{time}}",$p(i,t))},eb={p:$p,P:Q2},tb=/^D+$/,nb=/^Y+$/,rb=["D","DD","YY","YYYY"];function ib(e){return tb.test(e)}function ob(e){return nb.test(e)}function sb(e,t,n){const r=ab(e,t,n);if(console.warn(r),rb.includes(e))throw new RangeError(r)}function ab(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ub=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cb=/^'([^]*?)'?$/,db=/''/g,fb=/[a-zA-Z]/;function io(e,t,n){const r=Po(),i=n?.locale??r.locale??fc,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Oe(e,n?.in);if(!d2(a))throw new RangeError("Invalid time value");let l=t.match(ub).map(c=>{const d=c[0];if(d==="p"||d==="P"){const f=eb[d];return f(c,i.formatLong)}return c}).join("").match(lb).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const d=c[0];if(d==="'")return{isToken:!1,value:hb(c)};if(Qd[d])return{isToken:!0,value:c};if(d.match(fb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:o,weekStartsOn:s,locale:i};return l.map(c=>{if(!c.isToken)return c.value;const d=c.value;(!n?.useAdditionalWeekYearTokens&&ob(d)||!n?.useAdditionalDayOfYearTokens&&ib(d))&&sb(d,t,String(e));const f=Qd[d[0]];return f(a,d,i.localize,u)}).join("")}function hb(e){const t=e.match(cb);return t?t[1].replace(db,"'"):e}function gb(e,t){const n=Oe(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=rt(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function pb(e,t){return Oe(e,t?.in).getMonth()}function mb(e,t){return Oe(e,t?.in).getFullYear()}function xb(e,t){return+Oe(e)>+Oe(t)}function yb(e,t){return+Oe(e)<+Oe(t)}function bb(e,t,n){const[r,i]=Ii(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function vb(e,t,n){const[r,i]=Ii(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function Cb(e,t,n){const r=Oe(e,n?.in),i=r.getFullYear(),o=r.getDate(),s=rt(e,0);s.setFullYear(i,t,15),s.setHours(0,0,0,0);const a=gb(s);return r.setMonth(t,Math.min(o,a)),r}function wb(e,t,n){const r=Oe(e,n?.in);return isNaN(+r)?rt(e,NaN):(r.setFullYear(t),r)}const rf=5,_b=4;function kb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),o=t.addDays(i,rf*7-1);return t.getMonth(e)===t.getMonth(o)?rf:_b}function Bp(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function Sb(e,t){const n=Bp(e,t),r=kb(e,t);return t.addDays(n,r*7-1)}class jn{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?ht.tz(this.options.timeZone):new this.Date,this.newDate=(r,i,o)=>this.overrides?.newDate?this.overrides.newDate(r,i,o):this.options.timeZone?new ht(r,i,o,this.options.timeZone):new Date(r,i,o),this.addDays=(r,i)=>this.overrides?.addDays?this.overrides.addDays(r,i):Ip(r,i),this.addMonths=(r,i)=>this.overrides?.addMonths?this.overrides.addMonths(r,i):Np(r,i),this.addWeeks=(r,i)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,i):s2(r,i),this.addYears=(r,i)=>this.overrides?.addYears?this.overrides.addYears(r,i):a2(r,i),this.differenceInCalendarDays=(r,i)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,i):Ap(r,i),this.differenceInCalendarMonths=(r,i)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,i):f2(r,i),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):p2(r),this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Sb(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):y2(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):h2(r),this.endOfWeek=(r,i)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,i):Fp(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):x2(r),this.format=(r,i,o)=>{const s=this.overrides?.format?this.overrides.format(r,i,this.options):io(r,i,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):Lp(r),this.getMonth=(r,i)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):pb(r,this.options),this.getYear=(r,i)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):mb(r,this.options),this.getWeek=(r,i)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):Rp(r,this.options),this.isAfter=(r,i)=>this.overrides?.isAfter?this.overrides.isAfter(r,i):xb(r,i),this.isBefore=(r,i)=>this.overrides?.isBefore?this.overrides.isBefore(r,i):yb(r,i),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):Op(r),this.isSameDay=(r,i)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,i):c2(r,i),this.isSameMonth=(r,i)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,i):bb(r,i),this.isSameYear=(r,i)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,i):vb(r,i),this.max=r=>this.overrides?.max?this.overrides.max(r):l2(r),this.min=r=>this.overrides?.min?this.overrides.min(r):u2(r),this.setMonth=(r,i)=>this.overrides?.setMonth?this.overrides.setMonth(r,i):Cb(r,i),this.setYear=(r,i)=>this.overrides?.setYear?this.overrides.setYear(r,i):wb(r,i),this.startOfBroadcastWeek=(r,i)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Bp(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):yo(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):xo(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):m2(r),this.startOfWeek=(r,i)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):mi(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):Pp(r),this.options={locale:fc,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let i=0;i<10;i++)r[i.toString()]=n.format(i);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const En=new jn;class Hp{constructor(t,n,r=En){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Eb{constructor(t,n){this.date=t,this.weeks=n}}class Tb{constructor(t,n){this.days=n,this.weekNumber=t}}function Dn(e,t,n=!1,r=En){let{from:i,to:o}=e;const{differenceInCalendarDays:s,isSameDay:a}=r;return i&&o?(s(o,i)<0&&([i,o]=[o,i]),s(t,i)>=(n?1:0)&&s(o,t)>=(n?1:0)):!n&&o?a(o,t):!n&&i?a(i,t):!1}function Vp(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function hc(e){return!!(e&&typeof e=="object"&&"from"in e)}function zp(e){return!!(e&&typeof e=="object"&&"after"in e)}function Wp(e){return!!(e&&typeof e=="object"&&"before"in e)}function jp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Up(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Rn(e,t,n=En){const r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:o,isAfter:s}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return i(e,a);if(Up(a,n))return a.includes(e);if(hc(a))return Dn(a,e,!1,n);if(jp(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(Vp(a)){const l=o(a.before,e),u=o(a.after,e),c=l>0,d=u<0;return s(a.before,a.after)?d&&c:c||d}return zp(a)?o(e,a.after)>0:Wp(a)?o(a.before,e)>0:typeof a=="function"?a(e):!1})}function Ib(e,t,n,r,i){const{disabled:o,hidden:s,modifiers:a,showOutsideDays:l,broadcastCalendar:u,today:c}=t,{isSameDay:d,isSameMonth:f,startOfMonth:h,isBefore:g,endOfMonth:x,isAfter:b}=i,y=n&&h(n),m=r&&x(r),p={[Ve.focused]:[],[Ve.outside]:[],[Ve.disabled]:[],[Ve.hidden]:[],[Ve.today]:[]},v={};for(const k of e){const{date:C,displayMonth:w}=k,S=!!(w&&!f(C,w)),T=!!(y&&g(C,y)),P=!!(m&&b(C,m)),F=!!(o&&Rn(C,o,i)),L=!!(s&&Rn(C,s,i))||T||P||!u&&!l&&S||u&&l===!1&&S,O=d(C,c??i.today());S&&p.outside.push(k),F&&p.disabled.push(k),L&&p.hidden.push(k),O&&p.today.push(k),a&&Object.keys(a).forEach(B=>{const H=a?.[B];H&&Rn(C,H,i)&&(v[B]?v[B].push(k):v[B]=[k])})}return k=>{const C={[Ve.focused]:!1,[Ve.disabled]:!1,[Ve.hidden]:!1,[Ve.outside]:!1,[Ve.today]:!1},w={};for(const S in p){const T=p[S];C[S]=T.some(P=>P===k)}for(const S in v)w[S]=v[S].some(T=>T===k);return{...C,...w}}}function Nb(e,t,n={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[o])=>(n[o]?i.push(n[o]):t[Ve[o]]?i.push(t[Ve[o]]):t[qt[o]]&&i.push(t[qt[o]]),i),[t[ie.Day]])}function Mb(e){return _.createElement("button",{...e})}function Ab(e){return _.createElement("span",{...e})}function Ob(e){const{size:t=24,orientation:n="left",className:r}=e;return _.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&_.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&_.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&_.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&_.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Pb(e){const{day:t,modifiers:n,...r}=e;return _.createElement("td",{...r})}function Fb(e){const{day:t,modifiers:n,...r}=e,i=_.useRef(null);return _.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),_.createElement("button",{ref:i,...r})}function Lb(e){const{options:t,className:n,components:r,classNames:i,...o}=e,s=[i[ie.Dropdown],n].join(" "),a=t?.find(({value:l})=>l===o.value);return _.createElement("span",{"data-disabled":o.disabled,className:i[ie.DropdownRoot]},_.createElement(r.Select,{className:s,...o},t?.map(({value:l,label:u,disabled:c})=>_.createElement(r.Option,{key:l,value:l,disabled:c},u))),_.createElement("span",{className:i[ie.CaptionLabel],"aria-hidden":!0},a?.label,_.createElement(r.Chevron,{orientation:"down",size:18,className:i[ie.Chevron]})))}function Db(e){return _.createElement("div",{...e})}function Rb(e){return _.createElement("div",{...e})}function $b(e){const{calendarMonth:t,displayIndex:n,...r}=e;return _.createElement("div",{...r},e.children)}function Bb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return _.createElement("div",{...r})}function Hb(e){return _.createElement("table",{...e})}function Vb(e){return _.createElement("div",{...e})}const Jp=I.createContext(void 0);function Fo(){const e=I.useContext(Jp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function zb(e){const{components:t}=Fo();return _.createElement(t.Dropdown,{...e})}function Wb(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...o}=e,{components:s,classNames:a,labels:{labelPrevious:l,labelNext:u}}=Fo(),c=I.useCallback(f=>{i&&n?.(f)},[i,n]),d=I.useCallback(f=>{r&&t?.(f)},[r,t]);return _.createElement("nav",{...o},_.createElement(s.PreviousMonthButton,{type:"button",className:a[ie.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:d},_.createElement(s.Chevron,{disabled:r?void 0:!0,className:a[ie.Chevron],orientation:"left"})),_.createElement(s.NextMonthButton,{type:"button",className:a[ie.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":i?void 0:!0,"aria-label":u(i),onClick:c},_.createElement(s.Chevron,{disabled:i?void 0:!0,orientation:"right",className:a[ie.Chevron]})))}function jb(e){const{components:t}=Fo();return _.createElement(t.Button,{...e})}function Ub(e){return _.createElement("option",{...e})}function Jb(e){const{components:t}=Fo();return _.createElement(t.Button,{...e})}function Kb(e){const{rootRef:t,...n}=e;return _.createElement("div",{...n,ref:t})}function Zb(e){return _.createElement("select",{...e})}function qb(e){const{week:t,...n}=e;return _.createElement("tr",{...n})}function Yb(e){return _.createElement("th",{...e})}function Gb(e){return _.createElement("thead",{"aria-hidden":!0},_.createElement("tr",{...e}))}function Xb(e){const{week:t,...n}=e;return _.createElement("th",{...n})}function Qb(e){return _.createElement("th",{...e})}function ev(e){return _.createElement("tbody",{...e})}function tv(e){const{components:t}=Fo();return _.createElement(t.Dropdown,{...e})}const nv=Object.freeze(Object.defineProperty({__proto__:null,Button:Mb,CaptionLabel:Ab,Chevron:Ob,Day:Pb,DayButton:Fb,Dropdown:Lb,DropdownNav:Db,Footer:Rb,Month:$b,MonthCaption:Bb,MonthGrid:Hb,Months:Vb,MonthsDropdown:zb,Nav:Wb,NextMonthButton:jb,Option:Ub,PreviousMonthButton:Jb,Root:Kb,Select:Zb,Week:qb,WeekNumber:Xb,WeekNumberHeader:Qb,Weekday:Yb,Weekdays:Gb,Weeks:ev,YearsDropdown:tv},Symbol.toStringTag,{value:"Module"}));function rv(e){return{...nv,...e}}function iv(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function gc(){const e={};for(const t in ie)e[ie[t]]=`rdp-${ie[t]}`;for(const t in Ve)e[Ve[t]]=`rdp-${Ve[t]}`;for(const t in qt)e[qt[t]]=`rdp-${qt[t]}`;for(const t in At)e[At[t]]=`rdp-${At[t]}`;return e}function Kp(e,t,n){return(n??new jn(t)).format(e,"LLLL y")}const ov=Kp;function sv(e,t,n){return(n??new jn(t)).format(e,"d")}function av(e,t=En){return t.format(e,"LLLL")}function lv(e,t=En){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function uv(){return""}function cv(e,t,n){return(n??new jn(t)).format(e,"cccccc")}function Zp(e,t=En){return t.format(e,"yyyy")}const dv=Zp,fv=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Kp,formatDay:sv,formatMonthCaption:ov,formatMonthDropdown:av,formatWeekNumber:lv,formatWeekNumberHeader:uv,formatWeekdayName:cv,formatYearCaption:dv,formatYearDropdown:Zp},Symbol.toStringTag,{value:"Module"}));function hv(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...fv,...e}}function gv(e,t,n,r,i){const{startOfMonth:o,startOfYear:s,endOfYear:a,eachMonthOfInterval:l,getMonth:u}=i;return l({start:s(e),end:a(e)}).map(f=>{const h=r.formatMonthDropdown(f,i),g=u(f),x=t&&f<o(t)||n&&f>o(n)||!1;return{value:g,label:h,disabled:x}})}function pv(e,t={},n={}){let r={...t?.[ie.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...n?.[i]}}),r}function mv(e,t,n){const r=e.today(),i=t?e.startOfISOWeek(r):e.startOfWeek(r),o=[];for(let s=0;s<7;s++){const a=e.addDays(i,s);o.push(a)}return o}function xv(e,t,n,r){if(!e||!t)return;const{startOfYear:i,endOfYear:o,addYears:s,getYear:a,isBefore:l,isSameYear:u}=r,c=i(e),d=o(t),f=[];let h=c;for(;l(h,d)||u(h,d);)f.push(h),h=s(h,1);return f.map(g=>{const x=n.formatYearDropdown(g,r);return{value:a(g),label:x,disabled:!1}})}function qp(e,t,n){return(n??new jn(t)).format(e,"LLLL y")}const yv=qp;function bv(e,t,n,r){let i=(r??new jn(n)).format(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i}function Yp(e,t,n,r){let i=(r??new jn(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const vv=Yp;function Cv(){return""}function wv(e){return"Choose the Month"}function _v(e){return"Go to the Next Month"}function kv(e){return"Go to the Previous Month"}function Sv(e,t,n){return(n??new jn(t)).format(e,"cccc")}function Ev(e,t){return`Week ${e}`}function Tv(e){return"Week Number"}function Iv(e){return"Choose the Year"}const Nv=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:yv,labelDay:vv,labelDayButton:Yp,labelGrid:qp,labelGridcell:bv,labelMonthDropdown:wv,labelNav:Cv,labelNext:_v,labelPrevious:kv,labelWeekNumber:Ev,labelWeekNumberHeader:Tv,labelWeekday:Sv,labelYearDropdown:Iv},Symbol.toStringTag,{value:"Module"})),Lo=e=>e instanceof HTMLElement?e:null,il=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Mv=e=>Lo(e.querySelector("[data-animated-month]")),ol=e=>Lo(e.querySelector("[data-animated-caption]")),sl=e=>Lo(e.querySelector("[data-animated-weeks]")),Av=e=>Lo(e.querySelector("[data-animated-nav]")),Ov=e=>Lo(e.querySelector("[data-animated-weekdays]"));function Pv(e,t,{classNames:n,months:r,focused:i,dateLib:o}){const s=I.useRef(null),a=I.useRef(r),l=I.useRef(!1);I.useLayoutEffect(()=>{const u=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const c=o.isSameMonth(r[0].date,u[0].date),d=o.isAfter(r[0].date,u[0].date),f=d?n[At.caption_after_enter]:n[At.caption_before_enter],h=d?n[At.weeks_after_enter]:n[At.weeks_before_enter],g=s.current,x=e.current.cloneNode(!0);if(x instanceof HTMLElement?(il(x).forEach(p=>{if(!(p instanceof HTMLElement))return;const v=Mv(p);v&&p.contains(v)&&p.removeChild(v);const k=ol(p);k&&k.classList.remove(f);const C=sl(p);C&&C.classList.remove(h)}),s.current=x):s.current=null,l.current||c||i)return;const b=g instanceof HTMLElement?il(g):[],y=il(e.current);if(y&&y.every(m=>m instanceof HTMLElement)&&b&&b.every(m=>m instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const m=Av(e.current);m&&(m.style.zIndex="1"),y.forEach((p,v)=>{const k=b[v];if(!k)return;p.style.position="relative",p.style.overflow="hidden";const C=ol(p);C&&C.classList.add(f);const w=sl(p);w&&w.classList.add(h);const S=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),m&&(m.style.zIndex=""),C&&C.classList.remove(f),w&&w.classList.remove(h),p.style.position="",p.style.overflow="",p.contains(k)&&p.removeChild(k)};k.style.pointerEvents="none",k.style.position="absolute",k.style.overflow="hidden",k.setAttribute("aria-hidden","true");const T=Ov(k);T&&(T.style.opacity="0");const P=ol(k);P&&(P.classList.add(d?n[At.caption_before_exit]:n[At.caption_after_exit]),P.addEventListener("animationend",S));const F=sl(k);F&&F.classList.add(d?n[At.weeks_before_exit]:n[At.weeks_after_exit]),p.insertBefore(k,p.firstChild)})}})}function Fv(e,t,n,r){const i=e[0],o=e[e.length-1],{ISOWeek:s,fixedWeeks:a,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:c,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:h,endOfMonth:g,endOfWeek:x,isAfter:b,startOfBroadcastWeek:y,startOfISOWeek:m,startOfWeek:p}=r,v=l?y(i,r):s?m(i):p(i),k=l?f(o):s?h(g(o)):x(g(o)),C=c(k,v),w=d(o,i)+1,S=[];for(let F=0;F<=C;F++){const L=u(v,F);if(t&&b(L,t))break;S.push(L)}const P=(l?35:42)*w;if(a&&S.length<P){const F=P-S.length;for(let L=0;L<F;L++){const O=u(S[S.length-1],1);S.push(O)}}return S}function Lv(e){const t=[];return e.reduce((n,r)=>{const i=r.weeks.reduce((o,s)=>[...o,...s.days],t);return[...n,...i]},t)}function Dv(e,t,n,r){const{numberOfMonths:i=1}=n,o=[];for(let s=0;s<i;s++){const a=r.addMonths(e,s);if(t&&a>t)break;o.push(a)}return o}function of(e,t,n,r){const{month:i,defaultMonth:o,today:s=r.today(),numberOfMonths:a=1}=e;let l=i||o||s;const{differenceInCalendarMonths:u,addMonths:c,startOfMonth:d}=r;if(n&&u(n,l)<a-1){const f=-1*(a-1);l=c(n,f)}return t&&u(l,t)<0&&(l=t),d(l)}function Rv(e,t,n,r){const{addDays:i,endOfBroadcastWeek:o,endOfISOWeek:s,endOfMonth:a,endOfWeek:l,getISOWeek:u,getWeek:c,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:h}=r,g=e.reduce((x,b)=>{const y=n.broadcastCalendar?d(b,r):n.ISOWeek?f(b):h(b),m=n.broadcastCalendar?o(b):n.ISOWeek?s(a(b)):l(a(b)),p=t.filter(w=>w>=y&&w<=m),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&p.length<v){const w=t.filter(S=>{const T=v-p.length;return S>m&&S<=i(m,T)});p.push(...w)}const k=p.reduce((w,S)=>{const T=n.ISOWeek?u(S):c(S),P=w.find(L=>L.weekNumber===T),F=new Hp(S,b,r);return P?P.days.push(F):w.push(new Tb(T,[F])),w},[]),C=new Eb(b,k);return x.push(C),x},[]);return n.reverseMonths?g.reverse():g}function $v(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:o,startOfMonth:s,endOfMonth:a,addYears:l,endOfYear:u,newDate:c,today:d}=t,{fromYear:f,toYear:h,fromMonth:g,toMonth:x}=e;!n&&g&&(n=g),!n&&f&&(n=t.newDate(f,0,1)),!r&&x&&(r=x),!r&&h&&(r=c(h,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):f?n=c(f,0,1):!n&&b&&(n=i(l(e.today??d(),-100))),r?r=a(r):h?r=c(h,11,31):!r&&b&&(r=u(e.today??d())),[n&&o(n),r&&o(r)]}function Bv(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o=1}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:l}=r,u=i?o:1,c=s(e);if(!t)return a(c,u);if(!(l(t,e)<o))return a(c,u)}function Hv(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:l}=r,u=i?o??1:1,c=s(e);if(!t)return a(c,-u);if(!(l(c,t)<=0))return a(c,-u)}function Vv(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function da(e,t){const[n,r]=I.useState(e);return[t===void 0?n:t,r]}function zv(e,t){const[n,r]=$v(e,t),{startOfMonth:i,endOfMonth:o}=t,s=of(e,n,r,t),[a,l]=da(s,e.month?s:void 0);I.useEffect(()=>{const C=of(e,n,r,t);l(C)},[e.timeZone]);const u=Dv(a,r,e,t),c=Fv(u,e.endMonth?o(e.endMonth):void 0,e,t),d=Rv(u,c,e,t),f=Vv(d),h=Lv(d),g=Hv(a,n,e,t),x=Bv(a,r,e,t),{disableNavigation:b,onMonthChange:y}=e,m=C=>f.some(w=>w.days.some(S=>S.isEqualTo(C))),p=C=>{if(b)return;let w=i(C);n&&w<i(n)&&(w=i(n)),r&&w>i(r)&&(w=i(r)),l(w),y?.(w)};return{months:d,weeks:f,days:h,navStart:n,navEnd:r,previousMonth:g,nextMonth:x,goToMonth:p,goToDay:C=>{m(C)||p(C.date)}}}var fn;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(fn||(fn={}));function sf(e){return!e[Ve.disabled]&&!e[Ve.hidden]&&!e[Ve.outside]}function Wv(e,t,n,r){let i,o=-1;for(const s of e){const a=t(s);sf(a)&&(a[Ve.focused]&&o<fn.FocusedModifier?(i=s,o=fn.FocusedModifier):r?.isEqualTo(s)&&o<fn.LastFocused?(i=s,o=fn.LastFocused):n(s.date)&&o<fn.Selected?(i=s,o=fn.Selected):a[Ve.today]&&o<fn.Today&&(i=s,o=fn.Today))}return i||(i=e.find(s=>sf(t(s)))),i}function jv(e,t,n,r,i,o,s){const{ISOWeek:a,broadcastCalendar:l}=o,{addDays:u,addMonths:c,addWeeks:d,addYears:f,endOfBroadcastWeek:h,endOfISOWeek:g,endOfWeek:x,max:b,min:y,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:v}=s;let C={day:u,week:d,month:c,year:f,startOfWeek:w=>l?m(w,s):a?p(w):v(w),endOfWeek:w=>l?h(w):a?g(w):x(w)}[e](n,t==="after"?1:-1);return t==="before"&&r?C=b([r,C]):t==="after"&&i&&(C=y([i,C])),C}function Gp(e,t,n,r,i,o,s,a=0){if(a>365)return;const l=jv(e,t,n.date,r,i,o,s),u=!!(o.disabled&&Rn(l,o.disabled,s)),c=!!(o.hidden&&Rn(l,o.hidden,s)),d=l,f=new Hp(l,d,s);return!u&&!c?f:Gp(e,t,f,r,i,o,s,a+1)}function Uv(e,t,n,r,i){const{autoFocus:o}=e,[s,a]=I.useState(),l=Wv(t.days,n,r||(()=>!1),s),[u,c]=I.useState(o?l:void 0);return{isFocusTarget:x=>!!l?.isEqualTo(x),setFocused:c,focused:u,blur:()=>{a(u),c(void 0)},moveFocus:(x,b)=>{if(!u)return;const y=Gp(x,b,u,t.navStart,t.navEnd,e,i);y&&(t.goToDay(y),c(y))}}}function Jv(e,t){const{selected:n,required:r,onSelect:i}=e,[o,s]=da(n,i?n:void 0),a=i?n:o,{isSameDay:l}=t,u=h=>a?.some(g=>l(g,h))??!1,{min:c,max:d}=e;return{selected:a,select:(h,g,x)=>{let b=[...a??[]];if(u(h)){if(a?.length===c||r&&a?.length===1)return;b=a?.filter(y=>!l(y,h))}else a?.length===d?b=[h]:b=[...b,h];return i||s(b),i?.(b,h,g,x),b},isSelected:u}}function Kv(e,t,n=0,r=0,i=!1,o=En){const{from:s,to:a}=t||{},{isSameDay:l,isAfter:u,isBefore:c}=o;let d;if(!s&&!a)d={from:e,to:n>0?void 0:e};else if(s&&!a)l(s,e)?i?d={from:s,to:void 0}:d=void 0:c(e,s)?d={from:e,to:s}:d={from:s,to:e};else if(s&&a)if(l(s,e)&&l(a,e))i?d={from:s,to:a}:d=void 0;else if(l(s,e))d={from:s,to:n>0?void 0:e};else if(l(a,e))d={from:e,to:n>0?void 0:e};else if(c(e,s))d={from:e,to:a};else if(u(e,s))d={from:s,to:e};else if(u(e,a))d={from:s,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const f=o.differenceInCalendarDays(d.to,d.from);r>0&&f>r?d={from:e,to:void 0}:n>1&&f<n&&(d={from:e,to:void 0})}return d}function Zv(e,t,n=En){const r=Array.isArray(t)?t:[t];let i=e.from;const o=n.differenceInCalendarDays(e.to,e.from),s=Math.min(o,6);for(let a=0;a<=s;a++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function af(e,t,n=En){return Dn(e,t.from,!1,n)||Dn(e,t.to,!1,n)||Dn(t,e.from,!1,n)||Dn(t,e.to,!1,n)}function qv(e,t,n=En){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?Dn(e,a,!1,n):Up(a,n)?a.some(l=>Dn(e,l,!1,n)):hc(a)?a.from&&a.to?af(e,{from:a.from,to:a.to},n):!1:jp(a)?Zv(e,a.dayOfWeek,n):Vp(a)?n.isAfter(a.before,a.after)?af(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):Rn(e.from,a,n)||Rn(e.to,a,n):zp(a)||Wp(a)?Rn(e.from,a,n)||Rn(e.to,a,n):!1))return!0;const s=r.filter(a=>typeof a=="function");if(s.length){let a=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(c=>c(a)))return!0;a=n.addDays(a,1)}}return!1}function Yv(e,t){const{disabled:n,excludeDisabled:r,selected:i,required:o,onSelect:s}=e,[a,l]=da(i,s?i:void 0),u=s?i:a;return{selected:u,select:(f,h,g)=>{const{min:x,max:b}=e,y=f?Kv(f,u,x,b,o,t):void 0;return r&&n&&y?.from&&y.to&&qv({from:y.from,to:y.to},n,t)&&(y.from=f,y.to=void 0),s||l(y),s?.(y,f,h,g),y},isSelected:f=>u&&Dn(u,f,!1,t)}}function Gv(e,t){const{selected:n,required:r,onSelect:i}=e,[o,s]=da(n,i?n:void 0),a=i?n:o,{isSameDay:l}=t;return{selected:a,select:(d,f,h)=>{let g=d;return!r&&a&&a&&l(d,a)&&(g=void 0),i||s(g),i?.(g,d,f,h),g},isSelected:d=>a?l(a,d):!1}}function Xv(e,t){const n=Gv(e,t),r=Jv(e,t),i=Yv(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}function Qv(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new ht(t.today,t.timeZone)),t.month&&(t.month=new ht(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new ht(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new ht(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new ht(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new ht(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(ue=>new ht(ue,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new ht(t.selected.from,t.timeZone):void 0,to:t.selected.to?new ht(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:i,dateLib:o,locale:s,classNames:a}=I.useMemo(()=>{const ue={...fc,...t.locale};return{dateLib:new jn({locale:ue,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:rv(t.components),formatters:hv(t.formatters),labels:{...Nv,...t.labels},locale:ue,classNames:{...gc(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:l,mode:u,navLayout:c,numberOfMonths:d=1,onDayBlur:f,onDayClick:h,onDayFocus:g,onDayKeyDown:x,onDayMouseEnter:b,onDayMouseLeave:y,onNextClick:m,onPrevClick:p,showWeekNumber:v,styles:k}=t,{formatCaption:C,formatDay:w,formatMonthDropdown:S,formatWeekNumber:T,formatWeekNumberHeader:P,formatWeekdayName:F,formatYearDropdown:L}=r,O=zv(t,o),{days:B,months:H,navStart:q,navEnd:Z,previousMonth:Q,nextMonth:X,goToMonth:N}=O,oe=Ib(B,t,q,Z,o),{isSelected:ce,select:A,selected:fe}=Xv(t,o)??{},{blur:ge,focused:ae,isFocusTarget:z,moveFocus:U,setFocused:G}=Uv(t,O,oe,ce??(()=>!1),o),{labelDayButton:ee,labelGridcell:se,labelGrid:me,labelMonthDropdown:Pe,labelNav:He,labelPrevious:Ye,labelNext:Ge,labelWeekday:Qe,labelWeekNumber:un,labelWeekNumberHeader:bt,labelYearDropdown:Ft}=i,st=I.useMemo(()=>mv(o,t.ISOWeek),[o,t.ISOWeek]),cn=u!==void 0||h!==void 0,vt=I.useCallback(()=>{Q&&(N(Q),p?.(Q))},[Q,N,p]),Ce=I.useCallback(()=>{X&&(N(X),m?.(X))},[N,X,m]),Ct=I.useCallback((ue,$e)=>_e=>{_e.preventDefault(),_e.stopPropagation(),G(ue),A?.(ue.date,$e,_e),h?.(ue.date,$e,_e)},[A,h,G]),R=I.useCallback((ue,$e)=>_e=>{G(ue),g?.(ue.date,$e,_e)},[g,G]),V=I.useCallback((ue,$e)=>_e=>{ge(),f?.(ue.date,$e,_e)},[ge,f]),E=I.useCallback((ue,$e)=>_e=>{const Yn={ArrowLeft:[_e.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[_e.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[_e.shiftKey?"year":"week","after"],ArrowUp:[_e.shiftKey?"year":"week","before"],PageUp:[_e.shiftKey?"year":"month","before"],PageDown:[_e.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Yn[_e.key]){_e.preventDefault(),_e.stopPropagation();const[zt,rs]=Yn[_e.key];U(zt,rs)}x?.(ue.date,$e,_e)},[U,x,t.dir]),le=I.useCallback((ue,$e)=>_e=>{b?.(ue.date,$e,_e)},[b]),pe=I.useCallback((ue,$e)=>_e=>{y?.(ue.date,$e,_e)},[y]),Ne=I.useCallback(ue=>$e=>{const _e=Number($e.target.value),Yn=o.setMonth(o.startOfMonth(ue),_e);N(Yn)},[o,N]),Ht=I.useCallback(ue=>$e=>{const _e=Number($e.target.value),Yn=o.setYear(o.startOfMonth(ue),_e);N(Yn)},[o,N]),{className:Vt,style:vr}=I.useMemo(()=>({className:[a[ie.Root],t.className].filter(Boolean).join(" "),style:{...k?.[ie.Root],...t.style}}),[a,t.className,t.style,k]),Cr=iv(t),dt=I.useRef(null);Pv(dt,!!t.animate,{classNames:a,months:H,focused:ae,dateLib:o});const qn={dayPickerProps:t,selected:fe,select:A,isSelected:ce,months:H,nextMonth:X,previousMonth:Q,goToMonth:N,getModifiers:oe,components:n,classNames:a,styles:k,labels:i,formatters:r};return _.createElement(Jp.Provider,{value:qn},_.createElement(n.Root,{rootRef:t.animate?dt:void 0,className:Vt,style:vr,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Cr},_.createElement(n.Months,{className:a[ie.Months],style:k?.[ie.Months]},!t.hideNavigation&&!c&&_.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[ie.Nav],style:k?.[ie.Nav],"aria-label":He(),onPreviousClick:vt,onNextClick:Ce,previousMonth:Q,nextMonth:X}),H.map((ue,$e)=>{const _e=gv(ue.date,q,Z,r,o),Yn=xv(q,Z,r,o);return _.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:a[ie.Month],style:k?.[ie.Month],key:$e,displayIndex:$e,calendarMonth:ue},c==="around"&&!t.hideNavigation&&$e===0&&_.createElement(n.PreviousMonthButton,{type:"button",className:a[ie.PreviousMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":Ye(Q),onClick:vt,"data-animated-button":t.animate?"true":void 0},_.createElement(n.Chevron,{disabled:Q?void 0:!0,className:a[ie.Chevron],orientation:t.dir==="rtl"?"right":"left"})),_.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[ie.MonthCaption],style:k?.[ie.MonthCaption],calendarMonth:ue,displayIndex:$e},l?.startsWith("dropdown")?_.createElement(n.DropdownNav,{className:a[ie.Dropdowns],style:k?.[ie.Dropdowns]},l==="dropdown"||l==="dropdown-months"?_.createElement(n.MonthsDropdown,{className:a[ie.MonthsDropdown],"aria-label":Pe(),classNames:a,components:n,disabled:!!t.disableNavigation,onChange:Ne(ue.date),options:_e,style:k?.[ie.Dropdown],value:o.getMonth(ue.date)}):_.createElement("span",null,S(ue.date,o)),l==="dropdown"||l==="dropdown-years"?_.createElement(n.YearsDropdown,{className:a[ie.YearsDropdown],"aria-label":Ft(o.options),classNames:a,components:n,disabled:!!t.disableNavigation,onChange:Ht(ue.date),options:Yn,style:k?.[ie.Dropdown],value:o.getYear(ue.date)}):_.createElement("span",null,L(ue.date,o)),_.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},C(ue.date,o.options,o))):_.createElement(n.CaptionLabel,{className:a[ie.CaptionLabel],role:"status","aria-live":"polite"},C(ue.date,o.options,o))),c==="around"&&!t.hideNavigation&&$e===d-1&&_.createElement(n.NextMonthButton,{type:"button",className:a[ie.NextMonthButton],tabIndex:X?void 0:-1,"aria-disabled":X?void 0:!0,"aria-label":Ge(X),onClick:Ce,"data-animated-button":t.animate?"true":void 0},_.createElement(n.Chevron,{disabled:X?void 0:!0,className:a[ie.Chevron],orientation:t.dir==="rtl"?"left":"right"})),$e===d-1&&c==="after"&&!t.hideNavigation&&_.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[ie.Nav],style:k?.[ie.Nav],"aria-label":He(),onPreviousClick:vt,onNextClick:Ce,previousMonth:Q,nextMonth:X}),_.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":me(ue.date,o.options,o)||void 0,className:a[ie.MonthGrid],style:k?.[ie.MonthGrid]},!t.hideWeekdays&&_.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[ie.Weekdays],style:k?.[ie.Weekdays]},v&&_.createElement(n.WeekNumberHeader,{"aria-label":bt(o.options),className:a[ie.WeekNumberHeader],style:k?.[ie.WeekNumberHeader],scope:"col"},P()),st.map((zt,rs)=>_.createElement(n.Weekday,{"aria-label":Qe(zt,o.options,o),className:a[ie.Weekday],key:rs,style:k?.[ie.Weekday],scope:"col"},F(zt,o.options,o)))),_.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[ie.Weeks],style:k?.[ie.Weeks]},ue.weeks.map((zt,rs)=>_.createElement(n.Week,{className:a[ie.Week],key:zt.weekNumber,style:k?.[ie.Week],week:zt},v&&_.createElement(n.WeekNumber,{week:zt,style:k?.[ie.WeekNumber],"aria-label":un(zt.weekNumber,{locale:s}),className:a[ie.WeekNumber],scope:"row",role:"rowheader"},T(zt.weekNumber,o)),zt.days.map(ft=>{const{date:dn}=ft,Te=oe(ft);if(Te[Ve.focused]=!Te.hidden&&!!ae?.isEqualTo(ft),Te[qt.selected]=ce?.(dn)||Te.selected,hc(fe)){const{from:Ga,to:Xa}=fe;Te[qt.range_start]=!!(Ga&&Xa&&o.isSameDay(dn,Ga)),Te[qt.range_end]=!!(Ga&&Xa&&o.isSameDay(dn,Xa)),Te[qt.range_middle]=Dn(fe,dn,!0,o)}const ky=pv(Te,k,t.modifiersStyles),Sy=Nb(Te,a,t.modifiersClassNames),Ey=!cn&&!Te.hidden?se(dn,Te,o.options,o):void 0;return _.createElement(n.Day,{key:`${o.format(dn,"yyyy-MM-dd")}_${o.format(ft.displayMonth,"yyyy-MM")}`,day:ft,modifiers:Te,className:Sy.join(" "),style:ky,role:"gridcell","aria-selected":Te.selected||void 0,"aria-label":Ey,"data-day":o.format(dn,"yyyy-MM-dd"),"data-month":ft.outside?o.format(dn,"yyyy-MM"):void 0,"data-selected":Te.selected||void 0,"data-disabled":Te.disabled||void 0,"data-hidden":Te.hidden||void 0,"data-outside":ft.outside||void 0,"data-focused":Te.focused||void 0,"data-today":Te.today||void 0},!Te.hidden&&cn?_.createElement(n.DayButton,{className:a[ie.DayButton],style:k?.[ie.DayButton],type:"button",day:ft,modifiers:Te,disabled:Te.disabled||void 0,tabIndex:z(ft)?0:-1,"aria-label":ee(dn,Te,o.options,o),onClick:Ct(ft,Te),onBlur:V(ft,Te),onFocus:R(ft,Te),onKeyDown:E(ft,Te),onMouseEnter:le(ft,Te),onMouseLeave:pe(ft,Te)},w(dn,o.options,o)):!Te.hidden&&w(ft.date,o.options,o))}))))))})),t.footer&&_.createElement(n.Footer,{className:a[ie.Footer],style:k?.[ie.Footer],role:"status","aria-live":"polite"},t.footer)))}function Xp({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:i="ghost",formatters:o,components:s,...a}){const l=gc();return M.jsx(Qv,{showOutsideDays:n,className:he("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...o},classNames:{root:he("w-fit",l.root),months:he("flex gap-4 flex-col md:flex-row relative",l.months),month:he("flex flex-col w-full gap-4",l.month),nav:he("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",l.nav),button_previous:he(Ms({variant:i}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",l.button_previous),button_next:he(Ms({variant:i}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",l.button_next),month_caption:he("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",l.month_caption),dropdowns:he("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",l.dropdowns),dropdown_root:he("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",l.dropdown_root),dropdown:he("absolute bg-popover inset-0 opacity-0",l.dropdown),caption_label:he("select-none font-medium",r==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:he("flex",l.weekdays),weekday:he("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",l.weekday),week:he("flex w-full mt-2",l.week),week_number_header:he("select-none w-(--cell-size)",l.week_number_header),week_number:he("text-[0.8rem] select-none text-muted-foreground",l.week_number),day:he("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",l.day),range_start:he("rounded-l-md bg-accent",l.range_start),range_middle:he("rounded-none",l.range_middle),range_end:he("rounded-r-md bg-accent",l.range_end),today:he("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:he("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:he("text-muted-foreground opacity-50",l.disabled),hidden:he("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:c,...d})=>M.jsx("div",{"data-slot":"calendar",ref:c,className:he(u),...d}),Chevron:({className:u,orientation:c,...d})=>c==="left"?M.jsx(Yy,{className:he("size-4",u),...d}):c==="right"?M.jsx($y,{className:he("size-4",u),...d}):M.jsx(Jy,{className:he("size-4",u),...d}),DayButton:eC,WeekNumber:({children:u,...c})=>M.jsx("td",{...c,children:M.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:u})}),...s},...a})}function eC({className:e,day:t,modifiers:n,...r}){const i=gc(),o=I.useRef(null);return I.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),M.jsx(pi,{ref:o,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:he("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",i.day,e),...r})}var fa="Popover",[Qp,VN]=Kr(fa,[ca]),Do=ca(),[tC,ur]=Qp(fa),em=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,a=Do(t),l=I.useRef(null),[u,c]=I.useState(!1),[d,f]=Pr({prop:r,defaultProp:i??!1,onChange:o,caller:fa});return M.jsx(np,{...a,children:M.jsx(tC,{scope:t,contentId:Oo(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:I.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:u,onCustomAnchorAdd:I.useCallback(()=>c(!0),[]),onCustomAnchorRemove:I.useCallback(()=>c(!1),[]),modal:s,children:n})})};em.displayName=fa;var tm="PopoverAnchor",nm=I.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ur(tm,n),o=Do(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return I.useEffect(()=>(s(),()=>a()),[s,a]),M.jsx(cc,{...o,...r,ref:t})});nm.displayName=tm;var rm="PopoverTrigger",im=I.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ur(rm,n),o=Do(n),s=ct(t,i.triggerRef),a=M.jsx(Ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cm(i.open),...r,ref:s,onClick:we(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:M.jsx(cc,{asChild:!0,...o,children:a})});im.displayName=rm;var pc="PopoverPortal",[nC,rC]=Qp(pc,{forceMount:void 0}),om=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=ur(pc,t);return M.jsx(nC,{scope:t,forceMount:n,children:M.jsx(_p,{present:n||o.open,children:M.jsx(rp,{asChild:!0,container:i,children:r})})})};om.displayName=pc;var xi="PopoverContent",sm=I.forwardRef((e,t)=>{const n=rC(xi,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=ur(xi,e.__scopePopover);return M.jsx(_p,{present:r||o.open,children:o.modal?M.jsx(oC,{...i,ref:t}):M.jsx(sC,{...i,ref:t})})});sm.displayName=xi;var iC=As("PopoverContent.RemoveScroll"),oC=I.forwardRef((e,t)=>{const n=ur(xi,e.__scopePopover),r=I.useRef(null),i=ct(t,r),o=I.useRef(!1);return I.useEffect(()=>{const s=r.current;if(s)return op(s)},[]),M.jsx(sp,{as:iC,allowPinchZoom:!0,children:M.jsx(am,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,s=>{s.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,u=a.button===2||l;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:we(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),sC=I.forwardRef((e,t)=>{const n=ur(xi,e.__scopePopover),r=I.useRef(!1),i=I.useRef(!1);return M.jsx(am,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;n.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),am=I.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=ur(xi,n),h=Do(n);return ap(),M.jsx(lp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:M.jsx(up,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:M.jsx(cp,{"data-state":cm(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),lm="PopoverClose",aC=I.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ur(lm,n);return M.jsx(Ue.button,{type:"button",...r,ref:t,onClick:we(e.onClick,()=>i.onOpenChange(!1))})});aC.displayName=lm;var lC="PopoverArrow",um=I.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Do(n);return M.jsx(ip,{...i,...r,ref:t})});um.displayName=lC;function cm(e){return e?"open":"closed"}var dm=em,uC=nm,cC=im,fm=om,hm=sm,dC=um;function gm({...e}){return M.jsx(dm,{"data-slot":"popover",...e})}function pm({...e}){return M.jsx(cC,{"data-slot":"popover-trigger",...e})}function mm({className:e,align:t="center",sideOffset:n=4,...r}){return M.jsx(fm,{children:M.jsx(hm,{"data-slot":"popover-content",align:t,sideOffset:n,className:he("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function fC({date:e,onDateTimeChange:t,placeholder:n="Pick a date and time",disabled:r=!1,className:i}){const[o,s]=I.useState(e),[a,l]=I.useState(e?io(e,"HH:mm"):"12:00");I.useEffect(()=>{s(e),e&&l(io(e,"HH:mm"))},[e]);const u=I.useCallback(d=>{const f=d.target.value;if(l(f),!o)return;const[h,g]=f.split(":").map(Number),x=new Date(o);x.setHours(h,g,0,0),t?.(x)},[o,t]),c=I.useCallback(d=>{if(!d){s(void 0),t?.(void 0);return}const[f,h]=a.split(":").map(Number);d.setHours(f,h,0,0),s(d),t?.(d)},[a,t]);return M.jsxs("div",{className:"flex gap-2",children:[M.jsx(mo,{type:"time",value:a,onChange:u,disabled:r||!o,className:"w-32"}),M.jsxs(gm,{children:[M.jsx(pm,{asChild:!0,children:M.jsxs(pi,{variant:"outline",className:he("flex-1 justify-start text-left font-normal",!o&&"text-muted-foreground",i),disabled:r,children:[M.jsx(kp,{className:"mr-2 h-4 w-4"}),o?io(o,"PPP"):M.jsx("span",{children:n})]})}),M.jsx(mm,{className:"w-auto p-0",children:M.jsx(Xp,{mode:"single",selected:o,onSelect:c,initialFocus:!0})})]})]})}var xm="AlertDialog",[hC,zN]=Kr(xm,[dp]),Un=dp(),ym=e=>{const{__scopeAlertDialog:t,...n}=e,r=Un(t);return M.jsx(fp,{...r,...n,modal:!0})};ym.displayName=xm;var gC="AlertDialogTrigger",pC=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Un(n);return M.jsx(Vy,{...i,...r,ref:t})});pC.displayName=gC;var mC="AlertDialogPortal",bm=e=>{const{__scopeAlertDialog:t,...n}=e,r=Un(t);return M.jsx(pp,{...r,...n})};bm.displayName=mC;var xC="AlertDialogOverlay",vm=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Un(n);return M.jsx(mp,{...i,...r,ref:t})});vm.displayName=xC;var ai="AlertDialogContent",[yC,bC]=hC(ai),vC=Ky("AlertDialogContent"),Cm=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Un(n),s=I.useRef(null),a=ct(t,s),l=I.useRef(null);return M.jsx(By,{contentName:ai,titleName:wm,docsSlug:"alert-dialog",children:M.jsx(yC,{scope:n,cancelRef:l,children:M.jsxs(hp,{role:"alertdialog",...o,...i,ref:a,onOpenAutoFocus:we(i.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[M.jsx(vC,{children:r}),M.jsx(wC,{contentRef:s})]})})})});Cm.displayName=ai;var wm="AlertDialogTitle",_m=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Un(n);return M.jsx(gp,{...i,...r,ref:t})});_m.displayName=wm;var km="AlertDialogDescription",Sm=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Un(n);return M.jsx(Hy,{...i,...r,ref:t})});Sm.displayName=km;var CC="AlertDialogAction",Em=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Un(n);return M.jsx(dc,{...i,...r,ref:t})});Em.displayName=CC;var Tm="AlertDialogCancel",Im=I.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=bC(Tm,n),o=Un(n),s=ct(t,i);return M.jsx(dc,{...o,...r,ref:s})});Im.displayName=Tm;var wC=({contentRef:e})=>{const t=`\`${ai}\` requires a description for the component to be accessible for screen reader users.
|
|
12
|
-
|
|
13
|
-
You can add a description to the \`${ai}\` by passing a \`${km}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
14
|
-
|
|
15
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ai}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
16
|
-
|
|
17
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return I.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},_C=ym,kC=bm,SC=vm,EC=Cm,TC=Em,IC=Im,NC=_m,MC=Sm;function AC({...e}){return M.jsx(_C,{"data-slot":"alert-dialog",...e})}function OC({...e}){return M.jsx(kC,{"data-slot":"alert-dialog-portal",...e})}function PC({className:e,...t}){return M.jsx(SC,{"data-slot":"alert-dialog-overlay",className:he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function FC({className:e,...t}){return M.jsxs(OC,{children:[M.jsx(PC,{}),M.jsx(EC,{"data-slot":"alert-dialog-content",className:he("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function LC({className:e,...t}){return M.jsx("div",{"data-slot":"alert-dialog-header",className:he("flex flex-col gap-2 text-center sm:text-left",e),...t})}function DC({className:e,...t}){return M.jsx("div",{"data-slot":"alert-dialog-footer",className:he("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function RC({className:e,...t}){return M.jsx(NC,{"data-slot":"alert-dialog-title",className:he("text-lg font-semibold",e),...t})}function $C({className:e,...t}){return M.jsx(MC,{"data-slot":"alert-dialog-description",className:he("text-muted-foreground text-sm",e),...t})}function BC({className:e,...t}){return M.jsx(TC,{className:he(Ms(),e),...t})}function HC({className:e,...t}){return M.jsx(IC,{className:he(Ms({variant:"outline"}),e),...t})}function VC({hasUnsavedChanges:e,title:t="Unsaved Changes",description:n="You have unsaved changes. Are you sure you want to leave this page? Your changes will be lost.",stayButtonText:r="Stay on Page",leaveButtonText:i="Leave Page"}){const o=Ty(({currentLocation:c,nextLocation:d})=>e&&c.pathname!==d.pathname),[s,a]=I.useState(!1),l=()=>{o.state==="blocked"&&o.proceed()},u=()=>{o.state==="blocked"&&o.reset()};return I.useEffect(()=>{a(o.state==="blocked")},[o.state,s]),I.useEffect(()=>{const c=d=>{e&&(d.preventDefault(),d.returnValue="")};return e&&window.addEventListener("beforeunload",c),()=>{window.removeEventListener("beforeunload",c)}},[e]),M.jsx(AC,{open:s,onOpenChange:a,children:M.jsxs(FC,{children:[M.jsxs(LC,{children:[M.jsx(RC,{children:t}),M.jsx($C,{children:n})]}),M.jsxs(DC,{children:[M.jsx(HC,{onClick:u,children:r}),M.jsx(BC,{onClick:l,children:i})]})]})})}function zC({value:e,name:t,register:n,onChange:r}){const{isLoading:i}=ep(),[o,s]=I.useState(!1);return i?M.jsx("div",{children:"Loading..."}):M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsxs("div",{className:"relative flex items-center flex-1",children:[M.jsx(mo,{...n(t),type:"text",value:e,readOnly:!0,onClick:()=>{s(!0)},onChange:a=>r(a.target.value),className:"border p-2 rounded"}),M.jsx(Xg,{to:`/${e}`,className:"absolute right-2",target:"_blank",children:M.jsx(Sp,{className:"h-4"})})]}),M.jsx(pi,{type:"button",onClick:()=>r(""),className:"text-white px-4 py-2 rounded",children:"Clear"})]}),o&&M.jsx("div",{className:"fixed inset-0 bg-black/40 flex items-center justify-center z-50",children:M.jsxs("div",{className:"bg-white p-4 rounded-lg shadow-lg max-w-2xl w-full max-h-[80vh] overflow-y-auto",children:[M.jsxs("div",{className:"flex justify-between items-center mb-4",children:[M.jsx("h2",{className:"text-xl font-bold",children:"Select File"}),M.jsx(pi,{onClick:()=>s(!1),children:M.jsx(zy,{})})]}),M.jsx(Zy,{onChange:a=>{s(!1),r(a)}})]})})]})}var WC=Object.defineProperty,jC=(e,t,n)=>t in e?WC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,er=(e,t,n)=>jC(e,typeof t!="symbol"?t+"":t,n);let UC=class Nm{constructor(t=new Map){this.map=t}clone(){return new Nm(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},os=class{constructor(){er(this,"map",new Map)}getOrCreate(t){let n=this.map.get(t);return n===void 0&&(n=new Set,this.map.set(t,n)),n}get(t){return this.map.get(t)}use(t,n){const r=this.get(t);r!==void 0&&n(r)}delete(t){return this.map.delete(t)}};function Ir(e,t){return t(e),e}function mc(){}const Mm="cell";function lf(e,t){return e===t}const ha=new Map;let JC=class{constructor(t={}){er(this,"subscriptions",new os),er(this,"singletonSubscriptions",new Map),er(this,"graph",new os),er(this,"state",new Map),er(this,"distinctNodes",new Map),er(this,"executionMaps",new Map),er(this,"definitionRegistry",new Set);for(const n of Object.getOwnPropertySymbols(t))this.state.set(n,t[n])}cellInstance(t,n=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,t),n!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,n===!0?lf:n),r}signalInstance(t=!0,n=Symbol()){return t!==!1&&this.distinctNodes.set(n,t===!0?lf:t),n}sub(t,n){this.register(t);const r=this.subscriptions.getOrCreate(t);return r.add(n),()=>r.delete(n)}singletonSub(t,n){return this.register(t),n===void 0?this.singletonSubscriptions.delete(t):this.singletonSubscriptions.set(t,n),()=>this.singletonSubscriptions.delete(t)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(t,n){const r=this.signalInstance();return this.connect({map:i=>(...o)=>{i(o)},sink:r,sources:t}),this.sub(r,n)}pubIn(t){var n;const r=Reflect.ownKeys(t),i=this.getExecutionMap(r),o=i.refCount.clone(),s=i.participatingNodes.slice(),a=new Map(this.state),l=u=>{this.graph.use(u,c=>{for(const{sources:d,sink:f}of c)d.has(u)&&o.decrement(f,()=>{s.splice(s.indexOf(f),1),l(f)})})};for(;;){const u=s.shift();if(u===void 0)break;const c=u;let d=!1;const f=h=>{const g=this.distinctNodes.get(c);if(g!=null&&g(a.get(c),h)){d=!1;return}d=!0,a.set(c,h),this.state.has(c)&&this.state.set(c,h)};if(Object.prototype.hasOwnProperty.call(t,c)?f(t[c]):i.projections.use(c,h=>{for(const g of h){const x=[...Array.from(g.sources),...Array.from(g.pulls)].map(b=>a.get(b));g.map(f)(...x)}}),d){const h=a.get(c);this.inContext(()=>{this.subscriptions.use(c,g=>{for(const x of g)x(h)})}),(n=this.singletonSubscriptions.get(c))==null||n(h)}else l(c)}}connect({sources:t,pulls:n=[],map:r,sink:i}){const o={map:r,pulls:new Set(n),sink:this.register(i),sources:new Set(t)};for(const s of[...t,...n])this.register(s),this.graph.getOrCreate(s).add(o);this.executionMaps.clear()}pub(t,n){this.pubIn({[t]:n})}pipe(t,...n){return this.combineOperators(...n)(t)}transformer(...t){return n=>Ir(this.signalInstance(),r=>(this.link(this.pipe(r,...t),n),r))}link(t,n){this.connect({map:r=>i=>{r(i)},sink:n,sources:[t]})}combine(...t){return Ir(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}combineCells(...t){return Ir(this.cellInstance(t.map(n=>this.getValue(n)),!0),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}getValue(t){return this.register(t),this.state.get(t)}getValues(t){return t.map(n=>this.getValue(n))}register(t){const n=ha.get(t);return n===void 0||this.definitionRegistry.has(t)?t:(this.definitionRegistry.add(t),Ir(n.type===Mm?this.cellInstance(n.initial,n.distinct,t):this.signalInstance(n.distinct,t),r=>{this.inContext(()=>{n.init(this,r)})}))}inContext(t){return t()}changeWith(t,n,r){this.connect({sources:[n],pulls:[t],sink:t,map:i=>(o,s)=>{i(r(s,o))}})}calculateExecutionMap(t){const n=[],r=new Set,i=new os,o=new UC,s=new os,a=(l,u=0)=>{o.increment(l),!r.has(l)&&(this.register(l),i.use(l,c=>{u=Math.max(...Array.from(c).map(d=>n.indexOf(d)))+1}),this.graph.use(l,c=>{for(const d of c)d.sources.has(l)?(s.getOrCreate(d.sink).add(d),a(d.sink,u)):i.getOrCreate(d.sink).add(l)}),r.add(l),n.splice(u,0,l))};return t.forEach(a),{participatingNodes:n,pendingPulls:i,projections:s,refCount:o}}getExecutionMap(t){let n=t;if(t.length===1){n=t[0];const i=this.executionMaps.get(n);if(i!==void 0)return i}else for(const[i,o]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===t.length&&i.every(s=>t.includes(s)))return o;const r=this.calculateExecutionMap(t);return this.executionMaps.set(n,r),r}combineOperators(...t){return n=>{for(const r of t)n=r(n,this);return n}}};function ne(e,t=mc,n=!0){return Ir(Symbol(),r=>{ha.set(r,{type:Mm,distinct:n,initial:e,init:t})})}function it(e=mc,t=!1){return Ir(Symbol(),n=>{ha.set(n,{type:"signal",distinct:t,init:e})})}function cr(e=mc){return Ir(Symbol(),t=>{ha.set(t,{type:"signal",distinct:!1,init:e})})}const Am=I.createContext(null);function ga(){const e=I.useContext(Am);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}function Ot(e){const t=ga();t.register(e);const n=I.useCallback(r=>t.sub(e,r),[t,e]);return I.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}function rn(...e){const t=ga();return Ot(t.combineCells.apply(t,e))}function _t(e){const t=ga();return t.register(e),I.useCallback(n=>{t.pub(e,n)},[t,e])}function li(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{i(e(o))},sink:r,sources:[t]}),r}}function We(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>(...o)=>{i(o)},pulls:e,sink:r,sources:[t]}),r}}function Om(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(e)},sink:r,sources:[t]}),r}}function Ro(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{e(o)&&i(o)},sink:r,sources:[t]}),r}}function Pm(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:o=>s=>{o(t=e(t,s))},sink:i,sources:[n]}),i}}function KC(e,t){return t(e),e}function ui(){}function on(e){return function(t){return{init:n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},postInit:n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},update:n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)}}}}function ZC({children:e,plugins:t}){const n=_.useMemo(()=>KC(new JC,r=>{var i,o;for(const s of t)(i=s.init)==null||i.call(s,r);for(const s of t)(o=s.postInit)==null||o.call(s,r)}),[]);return _.useEffect(()=>{var r;for(const i of t)(r=i.update)==null||r.call(i,n)}),_.createElement(Am.Provider,{value:n},e)}const Fm=I.createContext(null);function qC(e,t){return{getTheme:function(){return t??null}}}function yt(){const e=I.useContext(Fm);return e==null&&function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const o of n)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}function W(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const sn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,YC=sn&&"documentMode"in document?document.documentMode:null,Ut=sn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ir=sn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ps=!(!sn||!("InputEvent"in window)||YC)&&"getTargetRanges"in new window.InputEvent("input"),bo=sn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),yi=sn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,GC=sn&&/Android/.test(navigator.userAgent),Lm=sn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),uf=sn&&GC&&Lm,Fs=sn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Lm;function Ls(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const XC=1,QC=3,ew=9,tw=11,Fr=0,Dm=1,bi=2,nw=0,rw=1,iw=2,Ds=4,Rs=8,xc=128,ow=1792|(112|(3|Ds|Rs)|xc),yc=1,bc=2,vc=3,Cc=4,wc=5,_c=6,pa=bo||yi||Fs?" ":"",Vn=`
|
|
18
|
-
|
|
19
|
-
`,sw=ir?" ":pa,Rm="֑-߿יִ-﷽ﹰ-ﻼ",$m="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",aw=new RegExp("^[^"+$m+"]*["+Rm+"]"),lw=new RegExp("^[^"+Rm+"]*["+$m+"]"),Lr={bold:1,capitalize:1024,code:16,highlight:xc,italic:2,lowercase:256,strikethrough:Ds,subscript:32,superscript:64,underline:Rs,uppercase:512},uw={directionless:1,unmergeable:2},cf={center:bc,end:_c,justify:Cc,left:yc,right:vc,start:wc},cw={[bc]:"center",[_c]:"end",[Cc]:"justify",[yc]:"left",[vc]:"right",[wc]:"start"},dw={normal:0,segmented:2,token:1},fw={[nw]:"normal",[iw]:"segmented",[rw]:"token"},hw="$";function Bm(e,t,n,r,i,o){let s=e.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===t&&(D(s)&&Bm(s,a,n,r,i,o),n.has(a)||o.delete(a),i.push(a)),s=s.getNextSibling()}}const gw=100;let Zl=!1,kc=0;function pw(e){kc=e.timeStamp}function al(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Ma(e,n)!==void 0}function mw(e,t,n){const r=en($t(n));let i=null,o=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,o=r.focusOffset);const s=e.nodeValue;s!==null&&Kc(t,s,i,o,!1)}function xw(e,t,n){if($(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Kn(t)&&n.isAttached()}function yw(e,t,n,r){for(let i=e;i&&!o_(i);i=Ko(i)){const o=Ma(i,t);if(o!==void 0){const s=ze(o,n);if(s)return ve(s)||!Ke(i)?void 0:[i,s]}else if(i===r)return[r,E1(n)]}}function Hm(e,t,n){Zl=!0;const r=performance.now()-kc>gw;try{Lt(e,()=>{const i=j()||function(f){return f.getEditorState().read(()=>{const h=j();return h!==null?h.clone():null})}(e),o=new Map,s=e.getRootElement(),a=e._editorState,l=e._blockCursorElement;let u=!1,c="";for(let f=0;f<t.length;f++){const h=t[f],g=h.type,x=h.target,b=yw(x,e,a,s);if(!b)continue;const[y,m]=b;if(g==="characterData")r&&J(m)&&Kn(x)&&xw(i,x,m)&&mw(x,m,e);else if(g==="childList"){u=!0;const p=h.addedNodes;for(let C=0;C<p.length;C++){const w=p[C],S=k1(w),T=w.parentNode;if(T!=null&&w!==l&&S===null&&!al(w,T,e)){if(ir){const P=(Ke(w)?w.innerText:null)||w.nodeValue;P&&(c+=P)}T.removeChild(w)}}const v=h.removedNodes,k=v.length;if(k>0){let C=0;for(let w=0;w<k;w++){const S=v[w];(al(S,x,e)||l===S)&&(x.appendChild(S),C++)}k!==C&&o.set(y,m)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],g=h.addedNodes,x=h.target;for(let b=0;b<g.length;b++){const y=g[b],m=y.parentNode;m==null||y.nodeName!=="BR"||al(y,x,e)||m.removeChild(y)}}n.takeRecords()}i!==null&&(u&&Xe(i),ir&&M1(e)&&i.insertRawText(c))})}finally{Zl=!1}}function Vm(e){const t=e._observer;t!==null&&Hm(e,t.takeRecords(),t)}function zm(e){(function(t){kc===0&&$t(t).addEventListener("textInput",pw,!0)})(e),e._observer=new MutationObserver((t,n)=>{Hm(e,t,n)})}let bw=class Wm{constructor(t,n=new Map,r=void 0,i=new Map,o=void 0){this.node=t,this.sharedConfigMap=n,this.unknownState=r,this.knownState=i;const s=o!==void 0?o:function(a,l,u){let c=u.size;if(l)for(const d in l){const f=a.get(d);f&&u.has(f)||c++}return c}(n,r,i);this.size=s}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState};for(const[n,r]of this.knownState)n.isEqual(r,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(r);return ss(t)?{[hw]:t}:{}}getWritable(t){if(this.node===t)return this;const n=new Map(this.knownState),r=ss(i=this.unknownState)&&{...i};var i;if(r)for(const o of n.keys())delete r[o.key];return new Wm(t,this.sharedConfigMap,ss(r),n,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedConfigMap.set(r,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&r in o||this.size++,i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState={},t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i);this.unknownState=ss(this.unknownState)}};function ss(e){if(e)for(const t in e)return e}function vw(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new bw(t);return t.__state=n,n}function df(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,s=t.__format,a=t.__style,l=e.__state,u=t.__state;return(n===null||n===o)&&(r===null||r===s)&&(i===null||i===a)&&(e.__state===null||l===u||function(c,d){if(c===d)return!0;if(c&&d&&c.size!==d.size)return!1;const f=new Set,h=(x,b)=>{for(const[y,m]of x.knownState){if(f.has(y.key))continue;f.add(y.key);const p=b?b.getValue(y):y.defaultValue;if(p!==m&&!y.isEqual(p,m))return!0}return!1},g=(x,b)=>{const{unknownState:y}=x,m=b?b.unknownState:void 0;if(y){for(const[p,v]of Object.entries(y))if(!f.has(p)&&(f.add(p),v!==(m?m[p]:void 0)))return!0}return!1};return!(c&&h(c,d)||d&&h(d,c)||c&&g(c,d)||d&&g(d,c))}(l,u))}function ff(e,t){const n=e.mergeWithSibling(t),r=Je()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function hf(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&J(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(df(t,r)){r=ff(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&J(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(df(r,n)){r=ff(r,n);break}break}n.remove()}}else r.remove()}function Dr(e){return gf(e.anchor),gf(e.focus),e}function gf(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),J(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!D(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let sr,St,vo,ma,ql,Yl,Rr,Gt,Gl,Co,tt="",kt="",hn=null,gn="",Fn="",jm=!1,wo=!1,vs=null;function $s(e,t){const n=Rr.get(e);if(t!==null){const r=eu(e);r.parentNode===t&&t.removeChild(r)}if(Gt.has(e)||St._keyToDOMMap.delete(e),D(n)){const r=Hs(n,Rr);Xl(r,0,r.length-1,null)}n!==void 0&&Zc(Co,vo,ma,n,"destroyed")}function Xl(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&$s(o,r)}}function wr(e,t){e.setProperty("text-align",t)}const Cw="40px";function Um(e,t){const n=sr.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||Cw;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function Jm(e,t){const n=e.style;t===0?wr(n,""):t===yc?wr(n,"left"):t===bc?wr(n,"center"):t===vc?wr(n,"right"):t===Cc?wr(n,"justify"):t===wc?wr(n,"start"):t===_c&&wr(n,"end")}function Bs(e,t){const n=Gt.get(e);n===void 0&&W(60);const r=n.createDOM(sr,St);if(function(i,o,s){const a=s._keyToDOMMap;(function(l,u,c){const d=`__lexicalKey_${u._key}`;l[d]=c})(o,s,i),a.set(i,o)}(e,r,St),J(n)?r.setAttribute("data-lexical-text","true"):ve(n)&&r.setAttribute("data-lexical-decorator","true"),D(n)){const i=n.__indent,o=n.__size;if(i!==0&&Um(r,i),o!==0){const a=o-1;(function(l,u,c,d){const f=kt;kt="",Ql(l,c,0,u,c.getDOMSlot(d)),Zm(c,d),kt=f})(Hs(n,Gt),a,n,r)}const s=n.__format;s!==0&&Jm(r,s),n.isInline()||Km(null,n,r),Aa(n)&&(tt+=Vn,Fn+=Vn)}else{const i=n.getTextContent();if(ve(n)){const o=n.decorate(St,sr);o!==null&&qm(e,o),r.contentEditable="false"}else J(n)&&(n.isDirectionless()||(kt+=i));tt+=i,Fn+=i}return t!==null&&t.insertChild(r),Zc(Co,vo,ma,n,"created"),r}function Ql(e,t,n,r,i){const o=tt;tt="";let s=n;for(;s<=r;++s){Bs(e[s],i);const a=Gt.get(e[s]);a!==null&&J(a)&&(hn===null&&(hn=a.getFormat()),gn===""&&(gn=a.getStyle()))}Aa(t)&&(tt+=Vn),i.element.__lexicalTextContent=tt,tt=o+tt}function pf(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Xt(r)?"line-break":ve(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Km(e,t,n){const r=pf(e,Rr),i=pf(t,Gt);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Zm(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==kt||r!==vs){const i=kt==="",o=i?vs:function(s){return aw.test(s)?"rtl":lw.test(s)?"ltr":null}(kt);if(o!==r){const s=t.classList,a=sr.theme;let l=r!==null?a[r]:void 0,u=o!==null?a[o]:void 0;if(l!==void 0){if(typeof l=="string"){const c=Ls(l);l=a[r]=c}s.remove(...l)}if(o===null||i&&o==="ltr")t.removeAttribute("dir");else{if(u!==void 0){if(typeof u=="string"){const c=Ls(u);u=a[o]=c}u!==void 0&&s.add(...u)}t.dir=o}wo||(e.getWritable().__dir=o)}vs=o,t.__lexicalDirTextContent=kt,t.__lexicalDir=o}}function ww(e,t,n){const r=kt;var i;kt="",hn=null,gn="",function(o,s,a){const l=tt,u=o.__size,c=s.__size;tt="";const d=a.element;if(u===1&&c===1){const f=o.__first,h=s.__first;if(f===h)Yi(f,d);else{const x=eu(f),b=Bs(h,null);try{d.replaceChild(b,x)}catch(y){if(typeof y=="object"&&y!=null){const m=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${b.tagName} key: ${h}}, old child: {tag: ${x.tagName}, key: ${f}}.`;throw new Error(m)}throw y}$s(f,null)}const g=Gt.get(h);J(g)&&(hn===null&&(hn=g.getFormat()),gn===""&&(gn=g.getStyle()))}else{const f=Hs(o,Rr),h=Hs(s,Gt);if(f.length!==u&&W(227),h.length!==c&&W(228),u===0)c!==0&&Ql(h,s,0,c-1,a);else if(c===0){if(u!==0){const g=a.after==null&&a.before==null&&a.element.__lexicalLineBreak==null;Xl(f,0,u-1,g?null:d),g&&(d.textContent="")}}else(function(g,x,b,y,m,p){const v=y-1,k=m-1;let C,w,S=p.getFirstChild(),T=0,P=0;for(;T<=v&&P<=k;){const O=x[T],B=b[P];if(O===B)S=ll(Yi(B,p.element)),T++,P++;else{C===void 0&&(C=new Set(x)),w===void 0&&(w=new Set(b));const q=w.has(O),Z=C.has(B);if(q)if(Z){const Q=Ci(St,B);Q===S?S=ll(Yi(B,p.element)):(p.withBefore(S).insertChild(Q),Yi(B,p.element)),T++,P++}else Bs(B,p.withBefore(S)),P++;else S=ll(eu(O)),$s(O,p.element),T++}const H=Gt.get(B);H!==null&&J(H)&&(hn===null&&(hn=H.getFormat()),gn===""&&(gn=H.getStyle()))}const F=T>v,L=P>k;if(F&&!L){const O=b[k+1],B=O===void 0?null:St.getElementByKey(O);Ql(b,g,P,k,p.withBefore(B))}else L&&!F&&Xl(x,T,v,p.element)})(s,f,h,u,c,a)}Aa(s)&&(tt+=Vn),d.__lexicalTextContent=tt,tt=l+tt}(e,t,t.getDOMSlot(n)),Zm(t,n),i=t,hn==null||hn===i.__textFormat||wo||i.setTextFormat(hn),function(o){gn===""||gn===o.__textStyle||wo||o.setTextStyle(gn)}(t),kt=r}function Hs(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&W(101),n.push(r),r=i.__next}return n}function Yi(e,t){const n=Rr.get(e);let r=Gt.get(e);n!==void 0&&r!==void 0||W(61);const i=jm||Yl.has(e)||ql.has(e),o=Ci(St,e);if(n===r&&!i){if(D(n)){const s=o.__lexicalTextContent;s!==void 0&&(tt+=s,Fn+=s);const a=o.__lexicalDirTextContent;a!==void 0&&(kt+=a)}else{const s=n.getTextContent();J(n)&&!n.isDirectionless()&&(kt+=s),Fn+=s,tt+=s}return o}if(n!==r&&i&&Zc(Co,vo,ma,r,"updated"),r.updateDOM(n,o,sr)){const s=Bs(e,null);return t===null&&W(62),t.replaceChild(s,o),$s(e,null),s}if(D(n)&&D(r)){const s=r.__indent;s!==n.__indent&&Um(o,s);const a=r.__format;a!==n.__format&&Jm(o,a),i&&(ww(n,r,o),ut(r)||r.isInline()||Km(n,r,o)),Aa(r)&&(tt+=Vn,Fn+=Vn)}else{const s=r.getTextContent();if(ve(r)){const a=r.decorate(St,sr);a!==null&&qm(e,a)}else J(r)&&!r.isDirectionless()&&(kt+=s);tt+=s,Fn+=s}if(!wo&&ut(r)&&r.__cachedText!==Fn){const s=r.getWritable();s.__cachedText=Fn,r=s}return o}function qm(e,t){let n=St._pendingDecorators;const r=St._decorators;if(n===null){if(r[e]===t)return;n=S1(St)}n[e]=t}function ll(e){let t=e.nextSibling;return t!==null&&t===St._blockCursorElement&&(t=t.nextSibling),t}function _w(e,t,n,r,i,o){tt="",Fn="",kt="",jm=r===bi,vs=null,St=n,sr=n._config,vo=n._nodes,ma=St._listeners.mutation,ql=i,Yl=o,Rr=e._nodeMap,Gt=t._nodeMap,wo=t._readOnly,Gl=new Map(n._keyToDOMMap);const s=new Map;return Co=s,Yi("root",null),St=void 0,vo=void 0,ql=void 0,Yl=void 0,Rr=void 0,Gt=void 0,sr=void 0,Gl=void 0,Co=void 0,s}function eu(e){const t=Gl.get(e);return t===void 0&&W(75,e),t}function Jn(e){return{}}const xa={},kw={},ya={},Nr={},ci={},_o={},di={},$o={},tu={},ko={},So={},$n={},ba={},va={},Ym={},Gm={},Sw={},Sc={},Ew={},Ec={},Tc={},Eo={},Ic={},Ca={},Bo={},wa={},Nc={},Xm={},Vs={},nu={},Mc={},Tw={},_a={},Ac={},Iw={},ka={},Oc={},ru={},Nw={},Mw={},Gi={},Xi={},Qm={},e1={},t1={},Mn=Object.freeze({}),iu=30,ou=[["keydown",function(e,t){if(oo=e.timeStamp,su=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:s}=e;if(!te(t,Ym,e)&&n!=null){if(ul&&Qr(su))return Lt(t,()=>{as(t,cl)}),ul=!1,void(cl="");if(function(a,l,u,c){return zf(a)&&!l&&!c&&!u}(n,i,s,o))te(t,Gm,e);else if(function(a,l,u,c,d){return zf(a)&&!c&&!u&&(l||d)}(n,i,r,s,o))te(t,Sw,e);else if(function(a,l,u,c){return Vf(a)&&!l&&!c&&!u}(n,i,s,o))te(t,Sc,e);else if(function(a,l,u,c,d){return Vf(a)&&!c&&!u&&(l||d)}(n,i,r,s,o))te(t,Ew,e);else if(function(a,l,u){return function(c){return c==="ArrowUp"}(a)&&!l&&!u}(n,i,o))te(t,Ec,e);else if(function(a,l,u){return function(c){return c==="ArrowDown"}(a)&&!l&&!u}(n,i,o))te(t,Tc,e);else if(function(a,l){return Wf(a)&&l}(n,r))so=!0,te(t,Eo,e);else if(function(a){return a===" "}(n))te(t,Ic,e);else if(function(a,l){return Ut&&l&&a.toLowerCase()==="o"}(n,i))e.preventDefault(),so=!0,te(t,ci,!0);else if(function(a,l){return Wf(a)&&!l}(n,r))so=!1,te(t,Eo,e);else if(function(a,l,u,c){return Ut?!l&&!u&&(Qr(a)||a.toLowerCase()==="h"&&c):c||l||u?!1:Qr(a)}(n,s,o,i))Qr(n)?te(t,Ca,e):(e.preventDefault(),te(t,Nr,!0));else if(function(a){return a==="Escape"}(n))te(t,Bo,e);else if(function(a,l,u,c,d){return Ut?!(u||c||d)&&(ji(a)||a.toLowerCase()==="d"&&l):l||c||d?!1:ji(a)}(n,i,r,s,o))ji(n)?te(t,wa,e):(e.preventDefault(),te(t,Nr,!1));else if(function(a,l,u){return Qr(a)&&(Ut?l:u)}(n,s,i))e.preventDefault(),te(t,ko,!0);else if(function(a,l,u){return ji(a)&&(Ut?l:u)}(n,s,i))e.preventDefault(),te(t,ko,!1);else if(function(a,l){return Ut&&l&&Qr(a)}(n,o))e.preventDefault(),te(t,So,!0);else if(function(a,l){return Ut&&l&&ji(a)}(n,o))e.preventDefault(),te(t,So,!1);else if(function(a,l,u,c){return a.toLowerCase()==="b"&&!l&&Qi(u,c)}(n,s,o,i))e.preventDefault(),te(t,$n,"bold");else if(function(a,l,u,c){return a.toLowerCase()==="u"&&!l&&Qi(u,c)}(n,s,o,i))e.preventDefault(),te(t,$n,"underline");else if(function(a,l,u,c){return a.toLowerCase()==="i"&&!l&&Qi(u,c)}(n,s,o,i))e.preventDefault(),te(t,$n,"italic");else if(function(a,l,u,c){return a==="Tab"&&!l&&!u&&!c}(n,s,i,o))te(t,Nc,e);else if(function(a,l,u,c){return a.toLowerCase()==="z"&&!l&&Qi(u,c)}(n,r,o,i))e.preventDefault(),te(t,ba,void 0);else if(function(a,l,u,c){return Ut?a.toLowerCase()==="z"&&u&&l:a.toLowerCase()==="y"&&c||a.toLowerCase()==="z"&&c&&l}(n,r,o,i))e.preventDefault(),te(t,va,void 0);else{const a=t._editorState._selection;a===null||$(a)?!ir&&jf(n,o,i)&&(e.preventDefault(),te(t,ru,e)):function(l,u,c,d){return u?!1:l.toLowerCase()==="c"?Ut?c:d:!1}(n,r,o,i)?(e.preventDefault(),te(t,ka,e)):function(l,u,c,d){return u?!1:l.toLowerCase()==="x"?Ut?c:d:!1}(n,r,o,i)?(e.preventDefault(),te(t,Oc,e)):jf(n,o,i)&&(e.preventDefault(),te(t,ru,e))}(function(a,l,u,c){return a||l||u||c})(i,r,s,o)&&te(t,t1,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Pi(n)&&r!=="touch"&&e.button===0&&Lt(t,()=>{ve(kn(n))||(lu=!0)})}],["compositionstart",function(e,t){Lt(t,()=>{const n=j();if($(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();lt(r.key),(e.timeStamp<oo+iu||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||J(i)&&i.getStyle()!==n.style)&&te(t,di,sw)}})}],["compositionend",function(e,t){ir?Wi=!0:yi||!bo&&!Fs?Lt(t,()=>{as(t,e.data)}):(ul=!0,cl=e.data)}],["input",function(e,t){e.stopPropagation(),Lt(t,()=>{const n=j(),r=e.data,i=s1(e);if(r!=null&&$(n)&&i1(n,i,r,e.timeStamp,!1)){Wi&&(as(t,r),Wi=!1);const o=n.anchor.getNode(),s=en($t(t));if(s===null)return;const a=n.isBackward(),l=a?n.anchor.offset:n.focus.offset,u=a?n.focus.offset:n.anchor.offset;Ps&&!n.isCollapsed()&&J(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+u)===N1(s.anchorNode)||te(t,di,r);const c=r.length;ir&&c>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=c),bo||yi||Fs||!t.isComposing()||(oo=0,lt(null))}else Jc(!1,t,r!==null?r:void 0),Wi&&(as(t,r||void 0),Wi=!1);(function(){gt();const o=Je();Vm(o)})()},{event:e}),ri=null}],["click",function(e,t){Lt(t,()=>{const n=j(),r=en($t(t)),i=Mi();if(r){if($(n)){const o=n.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!ut(s)&&Le().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const a=function(l,u){let c=l;for(;c!==Le()&&c!=null;){if(u(c))return c;c=c.getParent()}return null}(s,l=>D(l)&&!l.isInline());D(a)&&a.select(0)}}else if(e.pointerType==="touch"){const o=r.anchorNode;(Ke(o)||Kn(o))&&Xe(Dc(i,r,t,e))}}te(t,ya,e)})}],["cut",Mn],["copy",Mn],["dragstart",Mn],["dragover",Mn],["dragend",Mn],["paste",Mn],["focus",Mn],["blur",Mn],["drop",Mn]];Ps&&ou.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=s1(n);i==="deleteCompositionText"||ir&&M1(r)||i!=="insertCompositionText"&&Lt(r,()=>{const s=j();if(i==="deleteContentBackward"){if(s===null){const h=Mi();if(!$(h))return;Xe(h.clone())}if($(s)){const h=s.anchor.key===s.focus.key;if(a=n.timeStamp,su==="MediaLast"&&a<oo+iu&&r.isComposing()&&h){if(lt(null),oo=0,setTimeout(()=>{Lt(r,()=>{lt(null)})},iu),$(s)){const g=s.anchor.getNode();g.markDirty(),J(g)||W(142),o1(s,g)}}else{lt(null),n.preventDefault();const g=s.anchor.getNode(),x=g.getTextContent(),b=g.canInsertTextAfter(),y=s.anchor.offset===0&&s.focus.offset===x.length;let m=uf&&h&&!y&&b;if(m&&s.isCollapsed()&&(m=!ve(fu(s.anchor,!0))),!m){te(r,Nr,!0);const p=j();uf&&$(p)&&p.isCollapsed()&&(Er=p,setTimeout(()=>Er=null))}}return}}var a;if(!$(s))return;const l=n.data;ri!==null&&Jc(!1,r,ri),s.dirty&&ri===null||!s.isCollapsed()||ut(s.anchor.getNode())||o===null||s.applyDOMRange(o),ri=null;const u=s.anchor,c=s.focus,d=u.getNode(),f=c.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":te(r,di,n);break;case"insertFromComposition":lt(null),te(r,di,n);break;case"insertLineBreak":lt(null),te(r,ci,!1);break;case"insertParagraph":lt(null),so&&!yi?(so=!1,te(r,ci,!1)):te(r,_o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":te(r,$o,n);break;case"deleteByComposition":(function(h,g){return h!==g||D(h)||D(g)||!h.isToken()||!g.isToken()})(d,f)&&te(r,tu,n);break;case"deleteByDrag":case"deleteByCut":te(r,tu,n);break;case"deleteContent":te(r,Nr,!1);break;case"deleteWordBackward":te(r,ko,!0);break;case"deleteWordForward":te(r,ko,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":te(r,So,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":te(r,So,!1);break;case"formatStrikeThrough":te(r,$n,"strikethrough");break;case"formatBold":te(r,$n,"bold");break;case"formatItalic":te(r,$n,"italic");break;case"formatUnderline":te(r,$n,"underline");break;case"historyUndo":te(r,ba,void 0);break;case"historyRedo":te(r,va,void 0)}else{if(l===`
|
|
20
|
-
`)n.preventDefault(),te(r,ci,!1);else if(l===Vn)n.preventDefault(),te(r,_o,void 0);else if(l==null&&n.dataTransfer){const h=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(h)}else l!=null&&i1(s,o,l,n.timeStamp,!0)?(n.preventDefault(),te(r,di,l)):ri=l;n1=n.timeStamp}})}(e,t)]);let oo=0,su=null,n1=0,ri=null;const zs=new WeakMap;let au=!1,lu=!1,so=!1,Wi=!1,ul=!1,cl="",Er=null,r1=[0,"",0,"root",0];function i1(e,t,n,r,i){const o=e.anchor,s=e.focus,a=o.getNode(),l=Je(),u=en($t(l)),c=u!==null?u.anchorNode:null,d=o.key,f=l.getElementByKey(d),h=n.length;return d!==s.key||!J(a)||(!i&&(!Ps||n1<r+50)||a.isDirty()&&h<2||T1(n))&&o.offset!==s.offset&&!a.isComposing()||ii(a)||a.isDirty()&&h>1||(i||!Ps)&&f!==null&&!a.isComposing()&&c!==vi(f)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||function(g,x){if(x.isSegmented())return!0;if(!g.isCollapsed())return!1;const b=g.anchor.offset,y=x.getParentOrThrow(),m=x.isToken();return b===0?!x.canInsertTextBefore()||!y.canInsertTextBefore()&&!x.isComposing()||m||function(p){const v=p.getPreviousSibling();return(J(v)||D(v)&&v.isInline())&&!v.canInsertTextAfter()}(x):b===x.getTextContentSize()&&(!x.canInsertTextAfter()||!y.canInsertTextAfter()&&!x.isComposing()||m)}(e,a)}function mf(e,t){return Kn(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function xf(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=e;au&&(au=!1,mf(r,i)&&mf(o,s)&&!Er)||Lt(t,()=>{if(!n)return void Xe(null);if(!Jo(t,r,o))return;let a=j();if(Er&&$(a)&&a.isCollapsed()){const l=a.anchor,u=Er.anchor;(l.key===u.key&&l.offset===u.offset+1||l.offset===1&&u.getNode().is(l.getNode().getPreviousSibling()))&&(a=Er.clone(),Xe(a))}if(Er=null,$(a)){const l=a.anchor,u=l.getNode();if(a.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(a.dirty=!0);const c=$t(t).event,d=c?c.timeStamp:performance.now(),[f,h,g,x,b]=r1,y=Le(),m=t.isComposing()===!1&&y.getTextContent()==="";if(d<b+200&&l.offset===g&&l.key===x)Cs(a,f,h);else if(l.type==="text")J(u)||W(141),o1(a,u);else if(l.type==="element"&&!m){D(u)||W(259);const p=l.getNode();p.isEmpty()?function(v,k){const C=k.getTextFormat(),w=k.getTextStyle();Cs(v,C,w)}(a,p):Cs(a,0,"")}}else{const c=l.key,d=a.focus.key,f=a.getNodes(),h=f.length,g=a.isBackward(),x=g?s:i,b=g?i:s,y=g?d:c,m=g?c:d;let p=ow,v=!1;for(let k=0;k<h;k++){const C=f[k],w=C.getTextContentSize();if(J(C)&&w!==0&&!(k===0&&C.__key===y&&x===w||k===h-1&&C.__key===m&&b===0)&&(v=!0,p&=C.getFormat(),p===0))break}a.format=v?p:0}}te(t,xa,void 0)})}function Cs(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function o1(e,t){Cs(e,t.getFormat(),t.getStyle())}function s1(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function as(e,t){const n=e._compositionKey;if(lt(null),n!==null&&t!=null){if(t===""){const r=ze(n),i=vi(e.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&J(r)&&Kc(r,i.nodeValue,null,null,!0))}if(t[t.length-1]===`
|
|
21
|
-
`){const r=j();if($(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void te(e,Eo,null)}}}Jc(!0,e,t)}function a1(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const fi=new Map;function l1(e){const t=t_(e.target);if(t===null)return;const n=jc(t.anchorNode);if(n===null)return;lu&&(lu=!1,Lt(n,()=>{const l=Mi(),u=t.anchorNode;(Ke(u)||Kn(u))&&Xe(Dc(l,t,n,e))}));const r=Uc(n),i=r[r.length-1],o=i._key,s=fi.get(o),a=s||i;a!==n&&xf(t,a,!1),xf(t,n,!0),n!==i?fi.set(o,n):s&&fi.delete(o)}function yf(e){e._lexicalHandled=!0}function bf(e){return e._lexicalHandled===!0}function Aw(e){const t=e.ownerDocument,n=zs.get(t);n===void 0&&W(162);const r=n-1;r>=0||W(164),zs.set(t,r),r===0&&t.removeEventListener("selectionchange",l1);const i=Na(e);Wc(i)?(function(s){if(s._parentEditor!==null){const a=Uc(s),l=a[a.length-1]._key;fi.get(l)===s&&fi.delete(l)}else fi.delete(s._key)}(i),e.__lexicalEditor=null):i&&W(198);const o=a1(e);for(let s=0;s<o.length;s++)o[s]();e.__lexicalEventHandles=[]}function uu(e,t,n){gt();const r=e.__key,i=e.getParent();if(i===null)return;const o=function(a){const l=j();if(!$(l)||!D(a))return l;const{anchor:u,focus:c}=l,d=u.getNode(),f=c.getNode();return hu(d,a)&&u.set(a.__key,0,"element"),hu(f,a)&&c.set(a.__key,0,"element"),l}(e);let s=!1;if($(o)&&t){const a=o.anchor,l=o.focus;a.key===r&&(Us(a,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),l.key===r&&(Us(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else et(o)&&t&&e.isSelected()&&e.selectPrevious();if($(o)&&t&&!s){const a=e.getIndexWithinParent();Mr(e),js(o,i,a,-1)}else Mr(e);n||je(i)||i.canBeEmpty()||!i.isEmpty()||uu(i,t),t&&ut(i)&&i.isEmpty()&&i.selectEnd()}class Sa{static getType(){W(64,this.name)}static clone(t){W(65,this.name)}afterCloneFrom(t){this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state}constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),_1(this,t)}getType(){return this.__type}isInline(){W(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=ze(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||j();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(J(this))return r;if($(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(ve(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:ze(t)}getParentOrThrow(){const t=this.getParent();return t===null&&W(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(je(n))return D(t)||t===this&&ve(t)||W(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&W(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:ze(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:ze(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=D(this)?this:this.getParent(),r=D(t)?t:t.getParent(),i=n&&r?_s(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=_s(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?L1(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&W(279),!1)))}isParentOf(t){const n=_s(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===t)break;const a=D(o)?n?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;continue}const l=n?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===t)break;let c=null,d=u;do{if(d===null&&W(68),c=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||i.has(d.__key)||r.push(d)}while(c===null);o=c}return n||r.reverse(),r}isDirty(){const t=Je()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){const t=ze(this.__key);return t===null&&W(113),t}getWritable(){gt();const t=dr(),n=Je(),r=t._nodeMap,i=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,a=j();if(a!==null&&a.setCachedNodes(null),s.has(i))return Ks(o),o;const l=Yc(o);return s.add(i),Ks(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){W(70)}updateDOM(t,n,r){W(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){W(18,this.name)}updateFromJSON(t){return function(n,r){const i=n.getWritable();return(r||i.__state)&&vw(n).updateFromJSON(r),i}(this,t.$)}static transform(){return null}remove(t){uu(this,!0,t)}replace(t,n){gt();let r=j();r!==null&&(r=r.clone()),ml(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,a=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size;Mr(a);const c=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,h=i.__next,g=i.__parent;if(uu(i,!1,!0),c===null?l.__first=s:c.getWritable().__next=s,a.__prev=f,d===null?l.__last=s:d.getWritable().__prev=s,a.__next=h,a.__parent=g,l.__size=u,n&&(D(this)&&D(a)||W(139),this.getChildren().forEach(x=>{a.append(x)})),$(r)){Xe(r);const x=r.anchor,b=r.focus;x.key===o&&_f(x,a),b.key===o&&_f(b,a)}return tr()===o&<(s),a}insertAfter(t,n=!0){gt(),ml(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),s=j();let a=!1,l=!1;if(o!==null){const h=t.getIndexWithinParent();if(Mr(i),$(s)){const g=o.__key,x=s.anchor,b=s.focus;a=x.type==="element"&&x.key===g&&x.offset===h+1,l=b.type==="element"&&b.key===g&&b.offset===h+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,n&&$(s)){const h=this.getIndexWithinParent();js(s,c,h+1);const g=c.__key;a&&s.anchor.set(g,h+2,"element"),l&&s.focus.set(g,h+2,"element")}return t}insertBefore(t,n=!0){gt(),ml(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;Mr(i);const s=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();s===null?a.__first=o:s.getWritable().__next=o,a.__size++,r.__prev=o,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const c=j();return n&&$(c)&&js(c,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return Ee()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){gt();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(D(r))return r.select();if(!J(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(t,n)}selectNext(t,n){gt();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(D(r))return r.select(0,0);if(!J(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}class Ho extends Sa{static getType(){return"linebreak"}static clone(t){return new Ho(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
22
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&Zs(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&ls(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&ls(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&Zs(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&ls(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&ls(o))return!0}return!1}(t)?null:{conversion:Ow,priority:0}}}static importJSON(t){return Qt().updateFromJSON(t)}}function Ow(e){return{node:Qt()}}function Qt(){return Nt(new Ho)}function Xt(e){return e instanceof Ho}function ls(e){return Kn(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function dl(e,t){return 16&t?"code":t&xc?"mark":32&t?"sub":64&t?"sup":null}function fl(e,t){return 1&t?"strong":2&t?"em":"span"}function u1(e,t,n,r,i){const o=r.classList;let s=hi(i,"base");s!==void 0&&o.add(...s),s=hi(i,"underlineStrikethrough");let a=!1;const l=t&Rs&&t&Ds;s!==void 0&&(n&Rs&&n&Ds?(a=!0,l||o.add(...s)):l&&o.remove(...s));for(const u in Lr){const c=Lr[u];if(s=hi(i,u),s!==void 0)if(n&c){if(a&&(u==="underline"||u==="strikethrough")){t&c&&o.remove(...s);continue}t&c&&(!l||u!=="underline")&&u!=="strikethrough"||o.add(...s)}else t&c&&o.remove(...s)}}function c1(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?pa:"");if(r==null)t.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||ir){const[a,l,u]=function(c,d){const f=c.length,h=d.length;let g=0,x=0;for(;g<f&&g<h&&c[g]===d[g];)g++;for(;x+g<f&&x+g<h&&c[f-x-1]===d[h-x-1];)x++;return[g,f-g-x,d.slice(g,h-x)]}(s,o);l!==0&&r.deleteData(a,l),r.insertData(a,u)}else r.nodeValue=o}}function vf(e,t,n,r,i,o){c1(i,e,t);const s=o.theme.text;s!==void 0&&u1(0,0,r,e,s)}function us(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Tn extends Sa{static getType(){return"text"}static clone(t){return new Tn(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return fw[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===tr()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=Lr[t];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return Js(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=dl(0,r),o=fl(0,r),s=i===null?o:i,a=document.createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(l=document.createElement(o),a.appendChild(l)),vf(l,this,0,r,this.__text,t);const u=this.__style;return u!==""&&(a.style.cssText=u),a}updateDOM(t,n,r){const i=this.__text,o=t.__format,s=this.__format,a=dl(0,o),l=dl(0,s),u=fl(0,o),c=fl(0,s);if((a===null?u:a)!==(l===null?c:l))return!0;if(a===l&&u!==c){const x=n.firstChild;x==null&&W(48);const b=document.createElement(c);return vf(b,this,0,s,i,r),n.replaceChild(b,x),!1}let d=n;l!==null&&a!==null&&(d=n.firstChild,d==null&&W(49)),c1(i,d,this);const f=r.theme.text;f!==void 0&&o!==s&&u1(0,o,s,d,f);const h=t.__style,g=this.__style;return h!==g&&(n.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:Dw,priority:0}),b:()=>({conversion:Fw,priority:0}),code:()=>({conversion:An,priority:0}),em:()=>({conversion:An,priority:0}),i:()=>({conversion:An,priority:0}),mark:()=>({conversion:An,priority:0}),s:()=>({conversion:An,priority:0}),span:()=>({conversion:Pw,priority:0}),strong:()=>({conversion:An,priority:0}),sub:()=>({conversion:An,priority:0}),sup:()=>({conversion:An,priority:0}),u:()=>({conversion:An,priority:0})}}static importJSON(t){return Re().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return Ke(n)||W(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=us(n,"b")),this.hasFormat("italic")&&(n=us(n,"i")),this.hasFormat("strikethrough")&&(n=us(n,"s")),this.hasFormat("underline")&&(n=us(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?Lr[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?uw[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=Js(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=dw[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){gt();let r=t,i=n;const o=j(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!$(o))return h1(a,r,a,i,"text","text");{const l=tr();l!==o.anchor.key&&l!==o.focus.key||lt(a),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),s=o.__text,a=r.length;let l=t;l<0&&(l=a+l,l<0&&(l=0));const u=j();if(i&&$(u)){const d=t+a;u.setTextNodeRange(o,d,o,d)}const c=s.slice(0,l)+r+s.slice(l+n);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){gt();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=tr(),s=r.length;t.sort((S,T)=>S-T),t.push(s);const a=[],l=t.length;for(let S=0,T=0;S<s&&T<=l;T++){const P=t[T];P>S&&(a.push(r.slice(S,P)),S=P)}const u=a.length;if(u===1)return[n];const c=a[0],d=n.getParent();let f;const h=n.getFormat(),g=n.getStyle(),x=n.__detail;let b=!1,y=null,m=null;const p=j();if($(p)){const[S,T]=p.isBackward()?[p.focus,p.anchor]:[p.anchor,p.focus];S.type==="text"&&S.key===i&&(y=S),T.type==="text"&&T.key===i&&(m=T)}n.isSegmented()?(f=Re(c),f.__format=h,f.__style=g,f.__detail=x,b=!0):(f=n.getWritable(),f.__text=c);const v=[f];for(let S=1;S<u;S++){const T=Re(a[S]);T.__format=h,T.__style=g,T.__detail=x;const P=T.__key;o===i&<(P),v.push(T)}const k=y?y.offset:null,C=m?m.offset:null;let w=0;for(const S of v){if(!y&&!m)break;const T=w+S.getTextContentSize();if(y!==null&&k!==null&&k<=T&&k>=w&&(y.set(S.getKey(),k-w,"text"),k<T&&(y=null)),m!==null&&C!==null&&C<=T&&C>=w){m.set(S.getKey(),C-w,"text");break}w=T}if(d!==null){(function(P){const F=P.getPreviousSibling(),L=P.getNextSibling();F!==null&&Ks(F),L!==null&&Ks(L)})(this);const S=d.getWritable(),T=this.getIndexWithinParent();b?(S.splice(T,0,v),this.remove()):S.splice(T,1,v),$(p)&&js(p,d,T,u-1)}return v}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||W(50);const r=this.__key,i=t.__key,o=this.__text,s=o.length;tr()===i&<(r);const a=j();if($(a)){const d=a.anchor,f=a.focus;d!==null&&d.key===i&&Mf(d,n,r,t,s),f!==null&&f.key===i&&Mf(f,n,r,t,s)}const l=t.__text,u=n?l+o:o+l;this.setTextContent(u);const c=this.getWritable();return t.remove(),c}isTextEntity(){return!1}}function Pw(e){return{forChild:Pc(e.style),node:null}}function Fw(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Pc(t.style,n?void 0:"bold"),node:null}}const Cf=new WeakMap;function Lw(e){if(!Ke(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function Dw(e){const t=e;e.parentElement===null&&W(129);let n=t.textContent||"";if(function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=Cf.get(o))===void 0&&!Lw(o);)s.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let l=0;l<s.length;l++)Cf.set(s[l],a);return a}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const a=r[s];a===`
|
|
23
|
-
`||a===`\r
|
|
24
|
-
`?i.push(Qt()):a===" "?i.push(Ni()):a!==""&&i.push(Re(a))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=wf(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=wf(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Re(n)}}function wf(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,Ke(n)){const o=n.style.display;if(o===""&&!mu(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(Kn(n))return n;if(n.nodeName==="BR")return null}}const Rw={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function An(e){const t=Rw[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Pc(e.style,t),node:null}}function Re(e=""){return Nt(new Tn(e))}function J(e){return e instanceof Tn}function Pc(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),s=e.fontStyle==="italic",a=r.includes("underline"),l=e.verticalAlign;return u=>(J(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Vo extends Tn{static getType(){return"tab"}static clone(t){return new Vo(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=hi(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Ni().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&W(126),super.setTextContent(t)}setDetail(t){return t!==2&&W(127),this}setMode(t){return t!=="normal"&&W(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ni(){return Nt(new Vo)}function Fc(e){return e instanceof Vo}class $w{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:F1(Rt(ar(this,"next")),Rt(ar(t,"next")))<0}getNode(){const t=ze(this.key);return t===null&&W(20),t}set(t,n,r,i){const o=this._selection,s=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,Wo()||(tr()===s&<(t),o!==null&&(o.setCachedNodes(null),o.dirty=!0)))}}function _n(e,t,n){return new $w(e,t,n)}function hl(e,t){let n=t.__key,r=e.offset,i="element";if(J(t)){i="text";const o=t.getTextContentSize();r>o&&(r=o)}else if(!D(t)){const o=t.getNextSibling();if(J(o))n=o.__key,r=0,i="text";else{const s=t.getParent();s&&(n=s.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function _f(e,t){if(D(t)){const n=t.getLastDescendant();D(n)||J(n)?hl(e,n):hl(e,t)}else hl(e,t)}class Ea{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!et(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Ea(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(J(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(t);for(let s=0;s<r;s++)n[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const o=ze(i);o!==null&&r.push(o)}return Wo()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function $(e){return e instanceof Zr}class Zr{constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!$(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=function(r){const i=[],[o,s]=r.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,l=new Set;for(const u of r)if(wn(u)){const{origin:c}=u;i.length===0?a.add(c):(l.add(c),i.push(c))}else{const{origin:c}=u;D(c)&&l.has(c)||i.push(c)}if(s&&i.push(s.caret.origin),wi(r.focus)&&D(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=Sn(r.focus.origin,"previous");wn(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=ed(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!D(u)||l.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=Rt(r.anchor),c=Rt(r.anchor.getFlipped()),d=h=>Ar(h)?h.origin:h.getNodeAtCaret(),f=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);i.push(f)}return i}(R1(Yf(this),"next"));return Wo()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[a,l]=cu(this);let u="",c=!0;for(let d=0;d<t.length;d++){const f=t[d];if(D(f)&&!f.isInline())c||(u+=`
|
|
25
|
-
`),c=!f.isEmpty();else if(c=!1,J(f)){let h=f.getTextContent();f===n?f===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(h=a<l?h.slice(a,l):h.slice(l,a)):h=s?h.slice(a):h.slice(l):f===r&&(h=s?h.slice(0,l):h.slice(0,a)),u+=h}else!ve(f)&&!Xt(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){const n=Je(),r=n.getEditorState()._selection,i=f1(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),Dr(this)}clone(){const t=this.anchor,n=this.focus;return new Zr(_n(t.key,t.offset,t.type),_n(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=Js(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Lr[t];return!!(this.format&n)}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let o=0;o<i;o++){const s=n[o];s===`
|
|
26
|
-
`||s===`\r
|
|
27
|
-
`?r.push(Qt()):s===" "?r.push(Ni()):r.push(Re(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let s=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,a=n),s.type==="element"&&function(b,y,m,p){const v=b.getNode(),k=v.getChildAtIndex(b.offset),C=Re(),w=ut(v)?Ee().append(C):C;C.setFormat(m),C.setStyle(p),k===null?v.append(w):k.insertBefore(w),b.is(y)&&y.set(C.__key,0,"text"),b.set(C.__key,0,"text")}(s,a,i,o),a.type==="element"&&Vr(a,Rt(ar(a,"next")));const l=s.offset;let u=a.offset;const c=this.getNodes(),d=c.length;let f=c[0];J(f)||W(26);const h=f.getTextContent().length,g=f.getParentOrThrow();let x=c[d-1];if(d===1&&a.type==="element"&&(u=h,a.set(s.key,u,"text")),this.isCollapsed()&&l===h&&(f.isSegmented()||f.isToken()||!f.canInsertTextAfter()||!g.canInsertTextAfter()&&f.getNextSibling()===null)){let b=f.getNextSibling();if(J(b)&&b.canInsertTextBefore()&&!ii(b)||(b=Re(),b.setFormat(i),b.setStyle(o),g.canInsertTextAfter()?f.insertAfter(b):g.insertAfter(b)),b.select(0,0),f=b,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(f.isSegmented()||f.isToken()||!f.canInsertTextBefore()||!g.canInsertTextBefore()&&f.getPreviousSibling()===null)){let b=f.getPreviousSibling();if(J(b)&&!ii(b)||(b=Re(),b.setFormat(i),g.canInsertTextBefore()?f.insertBefore(b):g.insertBefore(b)),b.select(),f=b,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&l!==h){const b=Re(f.getTextContent());b.setFormat(i),f.replace(b),f=b}else if(!this.isCollapsed()&&t!==""){const b=x.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||D(b)&&(!b.canInsertTextBefore()||!b.canInsertTextAfter()))return this.insertText(""),d1(this.anchor,this.focus,null),void this.insertText(t)}if(d===1){if(f.isToken()){const p=Re(t);return p.select(),void f.replace(p)}const b=f.getFormat(),y=f.getStyle();if(l!==u||b===i&&y===o){if(Fc(f)){const p=Re(t);return p.setFormat(i),p.setStyle(o),p.select(),void f.replace(p)}}else{if(f.getTextContent()!==""){const p=Re(t);if(p.setFormat(i),p.setStyle(o),p.select(),l===0)f.insertBefore(p,!1);else{const[v]=f.splitText(l);v.insertAfter(p,!1)}return void(p.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(o)}const m=u-l;f=f.spliceText(l,m,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=t.length:(this.format=b,this.style=y))}else{const b=new Set([...f.getParentKeys(),...x.getParentKeys()]),y=D(f)?f:f.getParentOrThrow();let m=D(x)?x:x.getParentOrThrow(),p=x;if(!y.is(m)&&m.isInline())do p=m,m=m.getParentOrThrow();while(m.isInline());if(a.type==="text"&&(u!==0||x.getTextContent()==="")||a.type==="element"&&x.getIndexWithinParent()<u)if(J(x)&&!x.isToken()&&u!==x.getTextContentSize()){if(x.isSegmented()){const S=Re(x.getTextContent());x.replace(S),x=S}ut(a.getNode())||a.type!=="text"||(x=x.spliceText(0,u,"")),b.add(x.__key)}else{const S=x.getParentOrThrow();S.canBeEmpty()||S.getChildrenSize()!==1?x.remove():S.remove()}else b.add(x.__key);const v=m.getChildren(),k=new Set(c),C=y.is(m),w=y.isInline()&&f.getNextSibling()===null?y:f;for(let S=v.length-1;S>=0;S--){const T=v[S];if(T.is(f)||D(T)&&T.isParentOf(f))break;T.isAttached()&&(!k.has(T)||T.is(p)?C||w.insertAfter(T,!1):T.remove())}if(!C){let S=m,T=null;for(;S!==null;){const P=S.getChildren(),F=P.length;(F===0||P[F-1].is(T))&&(b.delete(S.__key),T=S),S=S.getParent()}}if(f.isToken())if(l===h)f.select();else{const S=Re(t);S.select(),f.replace(S)}else f=f.spliceText(l,h-l,t,!0),f.getTextContent()===""?f.remove():f.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let S=1;S<d;S++){const T=c[S],P=T.__key;b.has(P)||T.remove()}}}removeText(){const t=j()===this;bl(this,h_(Yf(this))),t&&j()!==this&&Xe(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void lt(null);const r=this.getNodes(),i=[];for(const v of r)J(v)&&i.push(v);const o=v=>{r.forEach(k=>{if(D(k)){const C=k.getFormatFlags(t,v);k.setTextFormat(C)}})},s=i.length;if(s===0)return this.toggleFormat(t),lt(null),void o(n);const a=this.anchor,l=this.focus,u=this.isBackward(),c=u?l:a,d=u?a:l;let f=0,h=i[0],g=c.type==="element"?0:c.offset;if(c.type==="text"&&g===h.getTextContentSize()&&(f=1,h=i[1],g=0),h==null)return;const x=h.getFormatFlags(t,n);o(x);const b=s-1;let y=i[b];const m=d.type==="text"?d.offset:y.getTextContentSize();if(h.is(y)){if(g===m)return;if(ii(h)||g===0&&m===h.getTextContentSize())h.setFormat(x);else{const v=h.splitText(g,m),k=g===0?v[0]:v[1];k.setFormat(x),c.type==="text"&&c.set(k.__key,0,"text"),d.type==="text"&&d.set(k.__key,m-g,"text")}return void(this.format=x)}g===0||ii(h)||([,h]=h.splitText(g),g=0),h.setFormat(x);const p=y.getFormatFlags(t,x);m>0&&(m===y.getTextContentSize()||ii(y)||([y]=y.splitText(m)),y.setFormat(p));for(let v=f+1;v<b;v++){const k=i[v],C=k.getFormatFlags(t,p);k.setFormat(C)}c.type==="text"&&c.set(h.__key,g,"text"),d.type==="text"&&d.set(y.__key,m,"text"),this.format=x|p}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=j();return $(g)||W(134),g.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=yl(n,Zt),i=t[t.length-1];if(D(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=gl(this);r.splice(g,0,t),i.selectEnd()}return}if(!t.some(g=>(D(g)||ve(g))&&!g.isInline())){D(r)||W(211,n.constructor.name,n.getType());const g=gl(this);return r.splice(g,0,t),void i.selectEnd()}const o=function(g){const x=Ee();let b=null;for(let y=0;y<g.length;y++){const m=g[y],p=Xt(m);if(p||ve(m)&&m.isInline()||D(m)&&m.isInline()||J(m)||m.isParentRequired()){if(b===null&&(b=m.createParentElementNode(),x.append(b),p))continue;b!==null&&b.append(m)}else x.append(m),b=null}return x}(t),s=o.getLastDescendant(),a=o.getChildren(),l=!D(r)||!r.isEmpty()?this.insertParagraph():null,u=a[a.length-1];let c=a[0];var d;D(d=c)&&Zt(d)&&!d.isEmpty()&&D(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(D(r)||W(211,n.constructor.name,n.getType()),r.append(...c.getChildren()),c=a[1]),c&&(r===null&&W(212,n.constructor.name,n.getType()),function(g,x,b){const y=x.getParentOrThrow().getLastChild();let m=x;const p=[x];for(;m!==y;)m.getNextSibling()||W(140),m=m.getNextSibling(),p.push(m);let v=g;for(const k of p)v=v.insertAfter(k)}(r,c));const f=yl(s,Zt);l&&D(f)&&(l.canMergeWhenEmpty()||Zt(u))&&(f.append(...l.getChildren()),l.remove()),D(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const h=D(r)?r.getLastChild():null;Xt(h)&&f!==r&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=Ee();return Le().splice(this.anchor.offset,0,[s]),s.select(),s}const t=gl(this),n=yl(this.anchor.getNode(),Zt);D(n)||W(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(t){const n=Qt();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=this.getNodes(),n=t.length,r=n-1,i=this.anchor,o=this.focus;let s=t[0],a=t[r];const[l,u]=cu(this);if(n===0)return[];if(n===1){if(J(s)&&!this.isCollapsed()){const d=l>u?u:l,f=l>u?l:u,h=s.splitText(d,f),g=d===0?h[0]:h[1];return g!=null?[g]:[]}return[s]}const c=i.isBefore(o);if(J(s)){const d=c?l:u;d===s.getTextContentSize()?t.shift():d!==0&&([,s]=s.splitText(d),t[0]=s)}if(J(a)){const d=a.getTextContent().length,f=c?u:l;f===0?t.pop():f!==d&&([a]=a.splitText(f),t[r]=a)}return t}modify(t,n,r){if(Af(this,t,n,r))return;const i=t==="move",o=Je(),s=en($t(o));if(!s)return;const a=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();if(l===null||a===null||!D(u)||u.isInline()||u.canBeEmpty()||gu(a,o,l),this.dirty){let c=Ci(o,this.anchor.key),d=Ci(o,this.focus.key);this.anchor.type==="text"&&(c=vi(c)),this.focus.type==="text"&&(d=vi(d)),c&&d&&g1(s,c,this.anchor.offset,d,this.focus.offset)}if(function(c,d,f,h){c.modify(d,f,h)}(s,t,n?"backward":"forward",r),s.rangeCount>0){const c=s.getRangeAt(0),d=this.anchor.getNode(),f=ut(d)?d:Xw(d);if(this.applyDOMRange(c),this.dirty=!0,!i){const h=this.getNodes(),g=[];let x=!1;for(let b=0;b<h.length;b++){const y=h[b];hu(y,f)?g.push(y):x=!0}if(x&&g.length>0)if(n){const b=g[0];D(b)?b.selectStart():b.getParentOrThrow().selectStart()}else{const b=g[g.length-1];D(b)?b.selectEnd():b.getParentOrThrow().selectEnd()}s.anchorNode===c.startContainer&&s.anchorOffset===c.startOffset||function(b){const y=b.focus,m=b.anchor,p=m.key,v=m.offset,k=m.type;m.set(y.key,y.offset,y.type,!0),y.set(p,v,k,!0)}(this)}}r==="lineboundary"&&Af(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&D(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(D(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=nd(ar(r,t?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(wn(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(D(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Rt(l);bl(this,_i(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(wi(l)){if(D(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(ve(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&D(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=Lc();u.add(l.origin.getKey()),Xe(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return bl(this,_i(!l.origin.isEmpty()&&u.isEmpty()?rd(pt(u,l.direction)):o.anchor,l)),this.removeText()}}const s=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&Sf(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(i)||t&&l!==u||!t&&l!==0)return void Ef(a,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(a)||t&&l!==0||!t&&l!==u)return void Ef(i,t,l)}(function(l,u){const c=l.anchor,d=l.focus,f=c.getNode(),h=d.getNode();if(f===h&&c.type==="text"&&d.type==="text"){const g=c.offset,x=d.offset,b=g<x,y=b?g:x,m=b?x:g,p=m-1;y!==p&&function(v){return!(T1(v)||Bw(v))}(f.getTextContent().slice(y,m))&&(u?d.set(d.key,p,d.type):c.set(c.key,p,c.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&ut(r.getParent())&&r.getPreviousSibling()===null&&Sf(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function et(e){return e instanceof Ea}function kf(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function cu(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[kf(n),kf(r)]}function Sf(e,t){for(let n=t;n;n=n.getParent()){if(D(n)){if(n.collapseAtStart(e))return!0;if(je(n))break}if(n.getPreviousSibling())break}return!1}const Bw=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function Ef(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,a=0;for(let u=0;u<o;u++){const c=u===o-1;if(a=s,s+=i[u].length,t&&s===n||s>n||c){i.splice(u,1),c&&(a=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function Tf(e,t,n,r){let i,o=t;if(Ke(e)){let s=!1;const a=e.childNodes,l=a.length,u=r._blockCursorElement;o===l&&(s=!0,o=l-1);let c=a[o],d=!1;if(c===u)c=a[o+1],d=!0;else if(u!==null){const f=u.parentNode;e===f&&t>Array.prototype.indexOf.call(f.children,u)&&o--}if(i=oi(c),J(i))o=Hf(i,s);else{let f=oi(e);if(f===null)return null;if(D(f)){const h=r.getElementByKey(f.getKey());h===null&&W(214),[f,o]=f.getDOMSlot(h).resolveChildIndex(f,h,e,t),D(f)||W(215),s&&o>=f.getChildrenSize()&&(o=Math.max(0,f.getChildrenSize()-1));let x=f.getChildAtIndex(o);if(D(x)&&function(b,y,m){const p=b.getParent();return m===null||p===null||!p.canBeEmpty()||p!==m.getNode()}(x,0,n)){const b=s?x.getLastDescendant():x.getFirstDescendant();b===null?f=x:(x=b,f=D(x)?x:x.getParentOrThrow()),o=0}J(x)?(i=x,f=null,o=Hf(x,s)):x!==f&&s&&!d&&(D(f)||W(216),o=Math.min(f.getChildrenSize(),o+1))}else{const h=f.getIndexWithinParent();o=t===0&&ve(f)&&oi(e)===f?h:h+1,f=f.getParentOrThrow()}if(D(f))return _n(f.__key,o,"element")}}else i=oi(e);return J(i)?_n(i.__key,o,"text"):null}function If(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(t){if((n||!t)&&o===null&&D(s)&&s.isInline()){const a=s.getPreviousSibling();J(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else D(o)&&!n&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):J(o)&&e.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(t&&D(o)&&o.isInline())e.set(o.__key,0,"element");else if((n||t)&&o===null&&D(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();J(a)&&e.set(a.__key,0,"text")}}}function d1(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);If(e,r,i),If(t,!r,i),i&&t.set(e.key,e.offset,e.type);const o=Je();if(o.isComposing()&&o._compositionKey!==e.key&&$(n)){const s=n.anchor,a=n.focus;e.set(s.key,s.offset,s.type,!0),t.set(a.key,a.offset,a.type,!0)}}}function f1(e,t,n,r,i,o){if(e===null||n===null||!Jo(i,e,n))return null;const s=Tf(e,t,$(o)?o.anchor:null,i);if(s===null)return null;const a=Tf(n,r,$(o)?o.focus:null,i);if(a===null)return null;if(s.type==="element"&&a.type==="element"){const l=oi(e),u=oi(n);if(ve(l)&&ve(u))return null}return d1(s,a,o),[s,a]}function Ws(e){return D(e)&&!e.isInline()}function h1(e,t,n,r,i,o){const s=dr(),a=new Zr(_n(e,t,i),_n(n,r,o),0,"");return a.dirty=!0,s._selection=a,a}function zo(){const e=_n("root",0,"element"),t=_n("root",0,"element");return new Zr(e,t,0,"")}function Lc(){return new Ea(new Set)}function Dc(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,a=s==="selectionchange",l=!Zl&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,c,d,f;if($(e)&&!l)return e.clone();if(t===null)return null;if(u=t.anchorNode,c=t.focusNode,d=t.anchorOffset,f=t.focusOffset,a&&$(e)&&!Jo(n,u,c))return e.clone();const h=f1(u,d,c,f,n,e);if(h===null)return null;const[g,x]=h;return new Zr(g,x,$(e)?e.format:0,$(e)?e.style:"")}function j(){return dr()._selection}function Mi(){return Je()._editorState._selection}function js(e,t,n,r=1){const i=e.anchor,o=e.focus,s=i.getNode(),a=o.getNode();if(!t.is(s)&&!t.is(a))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const c=Math.max(0,u+r);i.set(l,c,"element"),o.set(l,c,"element"),Nf(e)}}else{const u=e.isBackward(),c=u?o:i,d=c.getNode(),f=u?i:o,h=f.getNode();if(t.is(d)){const g=c.offset;(n<=g&&r>0||n<g&&r<0)&&c.set(l,Math.max(0,g+r),"element")}if(t.is(h)){const g=f.offset;(n<=g&&r>0||n<g&&r<0)&&f.set(l,Math.max(0,g+r),"element")}}Nf(e)}function Nf(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!D(o))return;const a=o.getChildrenSize(),l=n>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(J(u)){let c=0;l&&(c=u.getTextContentSize()),t.set(u.__key,c,"text"),r.set(u.__key,c,"text")}}else{if(D(o)){const a=o.getChildrenSize(),l=n>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(J(u)){let c=0;l&&(c=u.getTextContentSize()),t.set(u.__key,c,"text")}}if(D(s)){const a=s.getChildrenSize(),l=i>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(i);if(J(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}}function Us(e,t,n,r,i){let o=null,s=0,a=null;r!==null?(o=r.__key,J(r)?(s=r.getTextContentSize(),a="text"):D(r)&&(s=r.getChildrenSize(),a="element")):i!==null&&(o=i.__key,J(i)?a="text":D(i)&&(a="element")),o!==null&&a!==null?e.set(o,s,a):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function Mf(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function g1(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function Hw(e,t,n,r,i,o,s){const a=r.anchorNode,l=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&zc(d))return;if(!$(t))return void(e!==null&&Jo(n,a,l)&&r.removeAllRanges());const f=t.anchor,h=t.focus,g=f.key,x=h.key,b=Ci(n,g),y=Ci(n,x),m=f.offset,p=h.offset,v=t.format,k=t.style,C=t.isCollapsed();let w=b,S=y,T=!1;if(f.type==="text"){w=vi(b);const H=f.getNode();T=H.getFormat()!==v||H.getStyle()!==k}else $(e)&&e.anchor.type==="text"&&(T=!0);var P,F,L,O,B;if(h.type==="text"&&(S=vi(y)),w!==null&&S!==null&&(C&&(e===null||T||$(e)&&(e.format!==v||e.style!==k))&&(P=v,F=k,L=m,O=g,B=performance.now(),r1=[P,F,L,O,B]),u!==m||c!==p||a!==w||l!==S||r.type==="Range"&&C||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),f.type==="element"))){if(g1(r,w,m,S,p),!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===document.activeElement){const H=$(t)&&t.anchor.type==="element"?w.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(H!==null){let q;if(H instanceof Text){const Z=document.createRange();Z.selectNode(H),q=Z.getBoundingClientRect()}else q=H.getBoundingClientRect();(function(Z,Q,X){const N=A1(X),oe=qc(N);if(N===null||oe===null)return;let{top:ce,bottom:A}=Q,fe=0,ge=0,ae=X;for(;ae!==null;){const z=ae===N.body;if(z)fe=0,ge=$t(Z).innerHeight;else{const G=ae.getBoundingClientRect();fe=G.top,ge=G.bottom}let U=0;if(ce<fe?U=-(fe-ce):A>ge&&(U=A-ge),U!==0)if(z)oe.scrollBy(0,U);else{const G=ae.scrollTop;ae.scrollTop+=U;const ee=ae.scrollTop-G;ce-=ee,A-=ee}if(z)break;ae=Ko(ae)}})(n,q,o)}}au=!0}}function Ai(e){let t=j()||Mi();t===null&&(t=Le().selectEnd()),t.insertNodes(e)}function gl(e){let t=e;e.isCollapsed()||t.removeText();const n=j();$(n)&&(t=n),$(t)||W(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!Zt(i);){const s=i;if([i,o]=Vw(i,o),s.is(i))break}return o}function Vw(e,t){const n=e.getParent();if(!n){const i=Ee();return Le().append(i),i.select(),[Le(),0]}if(J(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!D(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new Zr(_n(e.__key,t,"element"),_n(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function Af(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[c,d]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return d.set(c.key,c.offset,c.type),!0}const o=ar(e.focus,n?"previous":"next"),s=r==="lineboundary",a=t==="move";let l=o,u=i==="decorators-and-blocks";if(!D1(l)){for(const c of l){u=!1;const{origin:d}=c;if(!ve(d)||d.isIsolated()||(l=c,!s||!d.isInline()))break}if(u)for(const c of nd(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(wn(c))c.origin.isInline()||(l=c);else{if(D(c.origin))continue;ve(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===o)return!1;if(a&&!s&&ve(l.origin)&&l.origin.isKeyboardSelectable()){const c=Lc();return c.add(l.origin.getKey()),Xe(c),!0}return l=Rt(l),a&&Vr(e.anchor,l),Vr(e.focus,l),u||!s}let ot=null,nt=null,It=!1,pl=!1,ws=0;const Of={characterData:!0,childList:!0,subtree:!0};function Wo(){return It||ot!==null&&ot._readOnly}function gt(){It&&W(13)}function p1(){ws>99&&W(14)}function dr(){return ot===null&&W(195,m1()),ot}function Je(){return nt===null&&W(196,m1()),nt}function m1(){let e=0;const t=new Set,n=Ia.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=Na(i);if(Wc(o))e++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function zw(){return nt}function Pf(e,t,n){const r=t.__type,i=function(a,l){const u=a._nodes.get(l);return u===void 0&&W(30,l),u}(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const s=o.length;for(let a=0;a<s&&(o[a](t),t.isAttached());a++);}function Ff(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function x1(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function Ww(e){return Rc(e,Je()._nodes)}function Rc(e,t){const n=e.type,r=t.get(n);r===void 0&&W(17,n);const i=r.klass;e.type!==i.getType()&&W(18,i.name);const o=i.importJSON(e),s=e.children;if(D(o)&&Array.isArray(s))for(let a=0;a<s.length;a++){const l=Rc(s[a],t);o.append(l)}return o}function Lf(e,t,n){const r=ot,i=It,o=nt;ot=t,It=!0,nt=e;try{return n()}finally{ot=r,It=i,nt=o}}function Ln(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const o=e._editorState,s=o._selection,a=n._selection,l=e._dirtyType!==Fr,u=ot,c=It,d=nt,f=e._updating,h=e._observer;let g=null;if(e._pendingEditorState=null,e._editorState=n,!i&&l&&h!==null){nt=e,ot=n,It=!1,e._updating=!0;try{const C=e._dirtyType,w=e._dirtyElements,S=e._dirtyLeaves;h.disconnect(),g=_w(o,n,e,C,w,S)}catch(C){if(C instanceof Error&&e._onError(C),pl)throw C;return C1(e,null,r,n),zm(e),e._dirtyType=bi,pl=!0,Ln(e,o),void(pl=!1)}finally{h.observe(r,Of),e._updating=f,ot=u,It=c,nt=d}}n._readOnly||(n._readOnly=!0);const x=e._dirtyLeaves,b=e._dirtyElements,y=e._normalizedNodes,m=e._updateTags,p=e._deferred;l&&(e._dirtyType=Fr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(C,w){const S=C._decorators;let T=C._pendingDecorators||S;const P=w._nodeMap;let F;for(F in T)P.has(F)||(T===S&&(T=S1(C)),delete T[F])}(e,n);const v=i?null:en($t(e));if(e._editable&&v!==null&&(l||a===null||a.dirty)&&r!==null&&!m.has("skip-dom-selection")){nt=e,ot=n;try{if(h!==null&&h.disconnect(),l||a===null||a.dirty){const C=e._blockCursorElement;C!==null&&gu(C,e,r),Hw(s,a,e,v,m,r)}(function(C,w,S){let T=C._blockCursorElement;if($(S)&&S.isCollapsed()&&S.anchor.type==="element"&&w.contains(document.activeElement)){const P=S.anchor,F=P.getNode(),L=P.offset;let O=!1,B=null;if(L===F.getChildrenSize())xl(F.getChildAtIndex(L-1))&&(O=!0);else{const H=F.getChildAtIndex(L);if(H!==null&&xl(H)){const q=H.getPreviousSibling();(q===null||xl(q))&&(O=!0,B=C.getElementByKey(H.__key))}}if(O){const H=C.getElementByKey(F.__key);return T===null&&(C._blockCursorElement=T=function(q){const Z=q.theme,Q=document.createElement("div");Q.contentEditable="false",Q.setAttribute("data-lexical-cursor","true");let X=Z.blockCursor;if(X!==void 0){if(typeof X=="string"){const N=Ls(X);X=Z.blockCursor=N}X!==void 0&&Q.classList.add(...X)}return Q}(C._config)),w.style.caretColor="transparent",void(B===null?H.appendChild(T):H.insertBefore(T,B))}}T!==null&&gu(T,C,w)})(e,r,a)}finally{h!==null&&h.observe(r,Of),nt=d,ot=u}}g!==null&&function(C,w,S,T,P){const F=Array.from(C._listeners.mutation),L=F.length;for(let O=0;O<L;O++){const[B,H]=F[O],q=w.get(H);q!==void 0&&B(q,{dirtyLeaves:T,prevEditorState:P,updateTags:S})}}(e,g,m,x,o),$(a)||a===null||s!==null&&s.is(a)||e.dispatchCommand(xa,void 0);const k=e._pendingDecorators;k!==null&&(e._decorators=k,e._pendingDecorators=null,ao("decorator",e,!0,k)),function(C,w,S){const T=Bf(w),P=Bf(S);T!==P&&ao("textcontent",C,!0,P)}(e,t||o,n),ao("update",e,!0,{dirtyElements:b,dirtyLeaves:x,editorState:n,normalizedNodes:y,prevEditorState:t||o,tags:m}),function(C,w){if(C._deferred=[],w.length!==0){const S=C._updating;C._updating=!0;try{for(let T=0;T<w.length;T++)w[T]()}finally{C._updating=S}}}(e,p),function(C){const w=C._updates;if(w.length!==0){const S=w.shift();if(S){const[T,P]=S;$c(C,T,P)}}}(e)}function ao(e,t,n,...r){const i=t._updating;t._updating=n;try{const o=Array.from(t._listeners[e]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{t._updating=i}}function y1(e,t,n){if(e._updating===!1||nt!==e){let i=!1;return e.update(()=>{i=y1(e,t,n)}),i}const r=Uc(e);for(let i=4;i>=0;i--)for(let o=0;o<r.length;o++){const s=r[o]._commands.get(t);if(s!==void 0){const a=s[i];if(a!==void 0){const l=Array.from(a),u=l.length;for(let c=0;c<u;c++)if(l[c](n,e)===!0)return!0}}}return!1}function Df(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,s]=i;let a;if(s!==void 0){if(a=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete){const l=e._pendingEditorState;l===null&&W(191),l._flushSync=!0}a&&e._deferred.push(a),x1(e,s.tag)}o()}}return r}function $c(e,t,n){const r=e._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,x1(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),i&&e._deferred.push(i);const a=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=b1(l||a),u=!0),l._flushSync=s;const c=ot,d=It,f=nt,h=e._updating;ot=l,It=!1,e._updating=!0,nt=e;const g=e._headless||e.getRootElement()===null;try{u&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=function(m,p){const v=m.getEditorState()._selection,k=en($t(m));return $(v)||v==null?Dc(v,k,m,p):v.clone()}(e,n&&n.event||null));const b=e._compositionKey;t(),o=Df(e,o),function(m,p){const v=p.getEditorState()._selection,k=m._selection;if($(k)){const C=k.anchor,w=k.focus;let S;if(C.type==="text"&&(S=C.getNode(),S.selectionTransform(v,k)),w.type==="text"){const T=w.getNode();S!==T&&T.selectionTransform(v,k)}}}(l,e),e._dirtyType!==Fr&&(o?function(m,p){const v=p._dirtyLeaves,k=m._nodeMap;for(const C of v){const w=k.get(C);J(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&hf(w)}}(l,e):function(m,p){const v=p._dirtyLeaves,k=p._dirtyElements,C=m._nodeMap,w=tr(),S=new Map;let T=v,P=T.size,F=k,L=F.size;for(;P>0||L>0;){if(P>0){p._dirtyLeaves=new Set;for(const O of T){const B=C.get(O);J(B)&&B.isAttached()&&B.isSimpleText()&&!B.isUnmergeable()&&hf(B),B!==void 0&&Ff(B,w)&&Pf(p,B,S),v.add(O)}if(T=p._dirtyLeaves,P=T.size,P>0){ws++;continue}}p._dirtyLeaves=new Set,p._dirtyElements=new Map;for(const O of F){const B=O[0],H=O[1];if(B!=="root"&&!H)continue;const q=C.get(B);q!==void 0&&Ff(q,w)&&Pf(p,q,S),k.set(B,H)}T=p._dirtyLeaves,P=T.size,F=p._dirtyElements,L=F.size,ws++}p._dirtyLeaves=v,p._dirtyElements=k}(l,e),Df(e),function(m,p,v,k){const C=m._nodeMap,w=p._nodeMap,S=[];for(const[T]of k){const P=w.get(T);P!==void 0&&(P.isAttached()||(D(P)&&Bm(P,T,C,w,S,k),C.has(T)||k.delete(T),S.push(T)))}for(const T of S)w.delete(T);for(const T of v){const P=w.get(T);P===void 0||P.isAttached()||(C.has(T)||v.delete(T),w.delete(T))}}(a,l,e._dirtyLeaves,e._dirtyElements)),b!==e._compositionKey&&(l._flushSync=!0);const y=l._selection;if($(y)){const m=l._nodeMap,p=y.anchor.key,v=y.focus.key;m.get(p)!==void 0&&m.get(v)!==void 0||W(19)}else et(y)&&y._nodes.size===0&&(l._selection=null)}catch(b){return b instanceof Error&&e._onError(b),e._pendingEditorState=a,e._dirtyType=bi,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Ln(e)}finally{ot=c,It=d,nt=f,e._updating=h,ws=0}e._dirtyType!==Fr||e._deferred.length>0||function(b,y){const m=y.getEditorState()._selection,p=b._selection;if(p!==null){if(p.dirty||!p.is(m))return!0}else if(m!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,Ln(e)):u&&Kw(()=>{Ln(e)}):(l._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Lt(e,t,n){e._updating?nt===e?t():e._updates.push([t,n]):$c(e,t,n)}class lo{constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new lo(this.element,t,this.after)}withAfter(t){return new lo(this.element,this.before,t)}withElement(t){return new lo(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&W(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&W(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&W(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(yi||bo);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,i))]}const o=Rf(n,r);o.push(i);const s=Rf(n,this.element);let a=t.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=o[l],c=s[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[t.getParentOrThrow(),a]}}function Rf(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=t.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==e&&W(225),n.reverse()}class an extends Sa{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return cw[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=Je()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(J(n)&&t.push(n),D(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;D(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;D(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const o=n[r-1];return D(o)&&o.getLastDescendant()||o||null}const i=n[t];return D(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:ze(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&W(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:ze(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&W(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=t;){if(i===t)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContent(),D(o)&&i!==r-1&&!o.isInline()&&(t+=Vn)}return t}getTextContentSize(){let t=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContentSize(),D(o)&&i!==r-1&&!o.isInline()&&(t+=Vn.length)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=cf[t];return!!(this.getFormat()&n)}return!1}hasTextFormat(t){const n=Lr[t];return!!(this.getTextFormat()&n)}getFormatFlags(t,n){return Js(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){gt();const r=j();let i=t,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){const l=this.getFirstChild();if(J(l)||D(l))return l.select(0,0)}else if(!(t!==void 0&&t!==s||n!==void 0&&n!==s)){const l=this.getLastChild();if(J(l)||D(l))return l.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const a=this.__key;return $(r)?(r.anchor.set(a,i,"element"),r.focus.set(a,o,"element"),r.dirty=!0,r):h1(a,i,a,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?cf[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,o=this.getChildrenSize(),s=this.getWritable();t+n<=o||W(226,String(t),String(n),String(o));const a=s.__key,l=[],u=[],c=this.getChildAtIndex(t+n);let d=null,f=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const g=this.getChildAtIndex(t);g!==null&&(d=g.getPreviousSibling())}if(n>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let x=0;x<n;x++){g===null&&W(100);const b=g.getNextSibling(),y=g.__key;Mr(g.getWritable()),u.push(y),g=b}}let h=d;for(let g=0;g<i;g++){const x=r[g];h!==null&&x.is(h)&&(d=h=h.getPreviousSibling());const b=x.getWritable();b.__parent===a&&f--,Mr(b);const y=x.__key;if(h===null)s.__first=y,b.__prev=null;else{const m=h.getWritable();m.__next=y,b.__prev=m.__key}x.__key===a&&W(76),b.__parent=a,l.push(y),h=x}if(t+n===o)h!==null&&(h.getWritable().__next=null,s.__last=h.__key);else if(c!==null){const g=c.getWritable();if(h!==null){const x=h.getWritable();g.__prev=h.__key,x.__next=c.__key}else g.__prev=null}if(s.__size=f,u.length){const g=j();if($(g)){const x=new Set(u),b=new Set(l),{anchor:y,focus:m}=g;$f(y,x,b)&&Us(y,y.getNode(),this,d,c),$f(m,x,b)&&Us(m,m.getNode(),this,d,c),f!==0||this.canBeEmpty()||je(this)||this.remove()}}return s}getDOMSlot(t){return new lo(t)}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(t.textFormat=n),r!==""&&(t.textStyle=r),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,n){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,n){const r=this.getDOMSlot(t);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function D(e){return e instanceof an}function $f(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class jo extends Sa{decorate(t,n){W(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ve(e){return e instanceof jo}class Uo extends an{static getType(){return"root"}static clone(){return new Uo}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){W(51)}getTextContent(){const t=this.__cachedText;return!Wo()&&Je()._dirtyType!==Fr||t===null?super.getTextContent():t}remove(){W(52)}replace(t){W(53)}insertBefore(t){W(54)}insertAfter(t){W(55)}updateDOM(t,n){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];D(r)||ve(r)||W(56)}return super.append(...t)}static importJSON(t){return Le().updateFromJSON(t)}collapseAtStart(){return!0}}function ut(e){return e instanceof Uo}function b1(e){return new Ta(new Map(e._nodeMap))}function Bc(){return new Ta(new Map([["root",new Uo]]))}function v1(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&W(130,n.name),D(e)){const r=t.children;Array.isArray(r)||W(59,n.name);const i=e.getChildren();for(let o=0;o<i.length;o++){const s=v1(i[o]);r.push(s)}}return t}class Ta{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return Lf(n&&n.editor||null,this,t)}clone(t){const n=new Ta(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Lf(null,this,()=>({root:v1(Le())}))}}class Hc extends an{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Oi extends an{static getType(){return"paragraph"}static clone(t){return new Oi(t.__key)}createDOM(t){const n=document.createElement("p"),r=hi(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:jw,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r}return{element:n}}static importJSON(t){return Ee().updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(t,n){const r=Ee();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||J(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function jw(e){const t=Ee();return e.style&&(t.setFormat(e.style.textAlign),Gc(e,t)),{node:t}}function Ee(){return Nt(new Oi)}function Vc(e){return e instanceof Oi}const xe=0,De=1,du=3,zn=4;function C1(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Bc(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=Fr,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function Uw(e){const t=e||{},n=zw(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,s=Bc(),a=t.namespace||(i!==null?i._config.namespace:I1()),l=t.editorState,u=[Uo,Tn,Ho,Vo,Oi,Hc,...t.nodes||[]],{onError:c,html:d}=t,f=t.editable===void 0||t.editable;let h;if(e===void 0&&n!==null)h=n._nodes;else{h=new Map;for(let x=0;x<u.length;x++){let b=u[x],y=null,m=null;if(typeof b!="function"){const C=b;b=C.replace,y=C.with,m=C.withKlass||null}const p=b.getType(),v=b.transform(),k=new Set;v!==null&&k.add(v),h.set(p,{exportDOM:d&&d.export?d.export.get(b):void 0,klass:b,replace:y,replaceWithKlass:m,transforms:k})}}const g=new Ia(s,i,h,{disableEvents:o,namespace:a,theme:r},c||console.error,function(x,b){const y=new Map,m=new Set,p=v=>{Object.keys(v).forEach(k=>{let C=y.get(k);C===void 0&&(C=[],y.set(k,C)),C.push(v[k])})};return x.forEach(v=>{const k=v.klass.importDOM;if(k==null||m.has(k))return;m.add(k);const C=k.call(v.klass);C!==null&&p(C)}),b&&p(b),y}(h,d?d.import:void 0),f);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=bi),g}class Ia{constructor(t,n,r,i,o,s,a){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=Fr,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=I1(),this._onError=o,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&W(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(t);o===void 0&&W(36,String(t));const s=o[r];return s.add(n),()=>{s.delete(n),o.every(a=>a.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;o.set(n,i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{o.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&W(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=Kf(r).get(n.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);i.push(s)}return function(s,a){const l=Kf(s.getEditorState()),u=[];for(const c of a){const d=l.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const f=ze(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:"history-merge"}:void 0)}(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return te(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=hi(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,C1(this,n,t,i),n!==null&&(this._config.disableEvents||Aw(n),r!=null&&n.classList.remove(...r)),t!==null){const o=qc(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=bi,zm(this),this._updateTags.add("history-merge"),Ln(this),this._config.disableEvents||function(a,l){const u=a.ownerDocument,c=zs.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",l1),zs.set(u,(c||0)+1),a.__lexicalEditor=l;const d=a1(a);for(let f=0;f<ou.length;f++){const[h,g]=ou[f],x=typeof g=="function"?b=>{bf(b)||(yf(b),(l.isEditable()||h==="click")&&g(b,l))}:b=>{if(bf(b))return;yf(b);const y=l.isEditable();switch(h){case"cut":return y&&te(l,Oc,b);case"copy":return te(l,ka,b);case"paste":return y&&te(l,$o,b);case"dragstart":return y&&te(l,_a,b);case"dragover":return y&&te(l,Ac,b);case"dragend":return y&&te(l,Iw,b);case"focus":return y&&te(l,Qm,b);case"blur":return y&&te(l,e1,b);case"drop":return y&&te(l,Mc,b)}};a.addEventListener(h,x),d.push(()=>{a.removeEventListener(h,x)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add("history-merge"),Ln(this);ao("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&W(38);let r=t;r._readOnly&&(r=b1(t),r._selection=t._selection?t._selection.clone():null),Vm(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),Ln(this)),this._pendingEditorState=r,this._dirtyType=bi,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||Ln(this)}parseEditorState(t,n){return function(r,i,o){const s=Bc(),a=ot,l=It,u=nt,c=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,h=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,ot=s,It=!1,nt=i;try{const g=i._nodes;Rc(r.root,g),o&&o(),s._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=c,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=h,ot=a,It=l,nt=u}return s}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Ln(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,o){r._updating?r._updates.push([i,o]):$c(r,i,o)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Lt(this,()=>{const i=j(),o=Le();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),Yw("focus"),Gw(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=en(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,ao("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ia.version="0.27.2+prod.esm";let Jw=1;const Kw=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function zc(e){const t=document.activeElement;if(!Ke(t))return!1;const n=t.nodeName;return ve(kn(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&Na(t)==null)}function Jo(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!zc(t)&&jc(t)===e}catch{return!1}}function Wc(e){return e instanceof Ia}function jc(e){let t=e;for(;t!=null;){const n=Na(t);if(Wc(n))return n;t=Ko(t)}return null}function Na(e){return e?e.__lexicalEditor:null}function ii(e){return e.isToken()||e.isSegmented()}function Kn(e){return Pi(e)&&e.nodeType===QC}function Zw(e){return Pi(e)&&e.nodeType===ew}function vi(e){let t=e;for(;t!=null;){if(Kn(t))return t;t=t.firstChild}return null}function Js(e,t,n){const r=Lr[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function w1(e){return J(e)||Xt(e)||ve(e)}function _1(e,t){if(t!=null)return void(e.__key=t);gt(),p1();const n=Je(),r=dr(),i=""+Jw++;r._nodeMap.set(i,e),D(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=Dm,e.__key=i}function Mr(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(i===null)if(o!==null){const s=o.getWritable();r.__first=o.__key,s.__prev=null}else r.__first=null;else{const s=i.getWritable();if(o!==null){const a=o.getWritable();a.__prev=s.__key,s.__next=a.__key}else s.__next=null;n.__prev=null}if(o===null)if(i!==null){const s=i.getWritable();r.__last=i.__key,s.__next=null}else r.__last=null;else{const s=o.getWritable();if(i!==null){const a=i.getWritable();a.__next=s.__key,s.__prev=a.__key}else s.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function Ks(e){p1();const t=e.getLatest(),n=t.__parent,r=dr(),i=Je(),o=r._nodeMap,s=i._dirtyElements;n!==null&&function(l,u,c){let d=l;for(;d!==null;){if(c.has(d))return;const f=u.get(d);if(f===void 0)break;c.set(d,!1),d=f.__parent}}(n,o,s);const a=t.__key;i._dirtyType=Dm,D(e)?s.set(a,!0):i._dirtyLeaves.add(a)}function lt(e){gt();const t=Je(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=ze(n);r!==null&&r.getWritable()}if(e!==null){const r=ze(e);r!==null&&r.getWritable()}}}function tr(){return Wo()?null:Je()._compositionKey}function ze(e,t){const n=(t||dr())._nodeMap.get(e);return n===void 0?null:n}function k1(e,t){const n=Ma(e,Je());return n!==void 0?ze(n,t):null}function Ma(e,t){return e[`__lexicalKey_${t._key}`]}function kn(e,t){let n=e;for(;n!=null;){const r=k1(n,t);if(r!==null)return r;n=Ko(n)}return null}function S1(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Bf(e){return e.read(()=>Le().getTextContent())}function Le(){return E1(dr())}function E1(e){return e._nodeMap.get("root")}function Xe(e){gt();const t=dr();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function oi(e){const t=Je(),n=function(r,i){let o=r;for(;o!=null;){const s=Ma(o,i);if(s!==void 0)return s;o=Ko(o)}return null}(e,t);return n===null?e===t.getRootElement()?ze("root"):null:ze(n)}function Hf(e,t){return t?e.getTextContentSize():0}function T1(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Uc(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function I1(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function N1(e){return Kn(e)?e.nodeValue:null}function Jc(e,t,n){const r=en($t(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let a=N1(i);const l=kn(i);if(a!==null&&J(l)){if(a===pa&&n){const u=n.length;a=n,o=u,s=u}a!==null&&Kc(l,a,o,s,e)}}}function Kc(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let a=t;(s||i)&&t[t.length-1]===pa&&(a=t.slice(0,-1));const l=o.getTextContent();if(i||a!==l){if(a===""){if(lt(null),bo||yi||Fs)o.remove();else{const x=Je();setTimeout(()=>{x.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),c=Mi(),d=o.getTextContentSize(),f=tr(),h=o.getKey();if(o.isToken()||f!==null&&h===f&&!s||$(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!o.canInsertTextBefore()&&!s||c.focus.key===e.__key&&c.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const g=j();if(!$(g)||n===null||r===null)return void o.setTextContent(a);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const x=Re(o.getTextContent());o.replace(x),o=x}o.setTextContent(a)}}}function Vf(e){return e==="ArrowLeft"}function zf(e){return e==="ArrowRight"}function Qi(e,t){return Ut?e:t}function Wf(e){return e==="Enter"}function Qr(e){return e==="Backspace"}function ji(e){return e==="Delete"}function jf(e,t,n){return e.toLowerCase()==="a"&&Qi(t,n)}function qw(e){const t=Le();if($(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Dr(e),e}{const n=t.select(0,t.getChildrenSize());return Xe(Dr(n)),n}}function hi(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=Ls(i);return n[t]=o,o}return i}function Zc(e,t,n,r,i){if(n.size===0)return;const o=r.__type,s=r.__key,a=t.get(o);a===void 0&&W(33,o);const l=a.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const c=u.get(s),d=c==="destroyed"&&i==="created";(c===void 0||d)&&u.set(s,d?"updated":i)}function Uf(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function fu(e,t){const n=e.offset;if(e.type==="element")return Uf(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?Uf(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function M1(e){const t=$t(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function te(e,t,n){return y1(e,t,n)}function Aa(e){return!ut(e)&&!e.isLastChild()&&!e.isInline()}function Ci(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&W(75,t),n}function Ko(e){const t=e.assignedSlot||e.parentElement;return pu(t)?t.host:t}function A1(e){return Zw(e)?e:Ke(e)?e.ownerDocument:null}function Yw(e){gt(),Je()._updateTags.add(e)}function Gw(e){gt(),Je()._deferred.push(e)}function hu(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function qc(e){const t=A1(e);return t?t.defaultView:null}function $t(e){const t=e._window;return t===null&&W(78),t}function Xw(e){let t=e.getParentOrThrow();for(;t!==null;){if(je(t))return t;t=t.getParentOrThrow()}return t}function je(e){return ut(e)||D(e)&&e.isShadowRoot()}function Qw(e){const t=e.constructor.clone(e);return _1(t,null),t}function Nt(e){const t=Je(),n=e.constructor.getType(),r=t._nodes.get(n);r===void 0&&W(200,e.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(e),a=s.constructor;return o!==null?s instanceof o||W(201,o.name,o.getType(),a.name,a.getType(),e.constructor.name,n):s instanceof e.constructor&&a!==e.constructor||W(202,a.name,a.getType(),e.constructor.name,n),s.__key===e.__key&&W(203,e.constructor.name,n,a.name,a.getType()),s}return e}function ml(e,t){!ut(e.getParent())||D(t)||ve(t)||W(99)}function e_(e){const t=ze(e);return t===null&&W(63,e),t}function xl(e){return(ve(e)||D(e)&&!e.canBeEmpty())&&!e.isInline()}function gu(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function en(e){return sn?(e||window).getSelection():null}function t_(e){const t=qc(e);return t?t.getSelection():null}function n_(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),je(e)&&W(102);const r=s=>{const a=s.getParentOrThrow(),l=je(a),u=s!==n||l?Qw(s):s;if(l)return D(s)&&D(u)||W(133),s.insertAfter(u),[s,u,u];{const[c,d,f]=r(a),h=s.getNextSiblings();return f.append(u,...h),[c,d,u]}},[i,o]=r(n);return[i,o]}function O1(e){return Ke(e)&&e.tagName==="A"}function Ke(e){return Pi(e)&&e.nodeType===XC}function Pi(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function pu(e){return Pi(e)&&e.nodeType===tw}function mu(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function Zs(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function Zt(e){if(ve(e)&&!e.isInline())return!0;if(!D(e)||je(e))return!1;const t=e.getFirstChild(),n=t===null||Xt(t)||J(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function yl(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function r_(){return Je()}const Jf=new WeakMap,i_=new Map;function Kf(e){if(!e._readOnly&&e.isEmpty())return i_;e._readOnly||W(192);let t=Jf.get(e);return t||(t=function(n){const r=new Map;for(const[i,o]of n._nodeMap){const s=o.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(i,o)}return r}(e),Jf.set(e,t)),t}function Yc(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Gc(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function o_(e){return e.__lexicalUnmanaged===!0}const s_={next:"previous",previous:"next"};class Xc{constructor(t){this.origin=t}[Symbol.iterator](){return P1({hasNext:wi,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return pt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return pt(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const s=this.getParentAtCaret(),a=new Map;for(let l=o.getAdjacentCaret();l!==null&&a.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of i){if(a.size>0){const u=o.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const c=l.getParent();c&&c.is(s)&&l.remove(),u.replace(l)}}else u===null&&W(263,Array.from(a).join(" "))}else o.insert(l);o=pt(l,this.direction)}for(const l of a.values())l.remove();return this}}class To extends Xc{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Sn(t,this.direction)}getParentCaret(t="root"){return pt(Qc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Fi(this.direction);return pt(this.getNodeAtCaret(),t)||Sn(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof To&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const a_={root:ut,shadowRoot:je};function Fi(e){return s_[e]}function Qc(e,t="root"){return a_[t](e)?null:e}class $r extends Xc{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:pt(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return D(this.origin)?Sn(this.origin,this.direction):null}getParentCaret(t="root"){return pt(Qc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Fi(this.direction);return pt(this.getNodeAtCaret(),t)||Sn(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof $r&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof $r||t instanceof Br)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Br extends Xc{type="text";constructor(t,n){super(t),this.offset=n}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Hr(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return pt(Qc(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Hr(this.origin,Fi(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Br&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof $r||t instanceof Br)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return pt(this.origin,this.direction)}}function Ar(e){return e instanceof Br}function wi(e){return e instanceof $r}function wn(e){return e instanceof To}const l_={next:class extends Br{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Br{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},u_={next:class extends $r{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends $r{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},c_={next:class extends To{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends To{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function pt(e,t){return e?new u_[t](e):null}function Hr(e,t,n){return e?new l_[t](e,Oa(e,n)):null}function Oa(e,t){const n=e.getTextContentSize(),r=t==="next"?n:t==="previous"?0:t;return r>=0&&r<=n||W(274,String(t),String(n)),r}function Zf(e,t){return new f_(e,t)}function Sn(e,t){return D(e)?new c_[t](e):null}function d_(e){return e&&e.getChildCaret()||e}function ed(e){return e&&d_(e.getAdjacentCaret())}class td{type="node-caret-range";constructor(t,n,r){this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new td(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return Ar(o)?function(s,a){const{direction:l,origin:u}=s,c=Oa(u,a==="focus"?Fi(l):l);return Zf(s,c-s.offset)}(o,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[Zf(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=Ar(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Ar(r),o=s=>s.isSameNodeCaret(r)?null:ed(s)||s.getParentCaret(t);return P1({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:o(n),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class f_{type="slice";constructor(t,n){this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),o=t.getTextContent();return Hr(t.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function nd(e){return _i(e,pt(Le(),e.direction))}function _i(e,t){return e.direction!==t.direction&&W(265),new td(e,t,e.direction)}function P1(e){const{initial:t,hasNext:n,step:r,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function F1(e,t){const n=_s(e.origin,t.origin);switch(n===null&&W(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?function(o,s){return Math.sign(o-s)}(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return L1(n)}}function L1(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let o=t,s=n;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function cs(e,t){return t.is(e)}function qf(e){return D(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function _s(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=qf(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=qf(t);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(cs(e,r)||W(276),{commonAncestor:r,type:"ancestor"}):i===null?(cs(t,r)||W(277),{commonAncestor:r,type:"descendant"}):((D(o)||cs(e,o))&&(D(i)||cs(t,i))&&r.is(o.getParent())&&r.is(i.getParent())||W(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function ar(e,t){const{type:n,key:r,offset:i}=e,o=e_(e.key);return n==="text"?(J(o)||W(266,o.getType(),r),Hr(o,t,i)):(D(o)||W(267,o.getType(),r),$1(o,e.offset,t))}function Vr(e,t){const{origin:n,direction:r}=t,i=r==="next";Ar(t)?e.set(n.getKey(),t.offset,"text"):wi(t)?J(n)?e.set(n.getKey(),Oa(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(wn(t)&&D(n)||W(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function bl(e,t){Vr(e.anchor,t.anchor),Vr(e.focus,t.focus)}function Yf(e){const{anchor:t,focus:n}=e,r=ar(t,"next"),i=ar(n,"next"),o=F1(r,i)<=0?"next":"previous";return _i(ki(r,o),ki(i,o))}function rd(e){const{direction:t,origin:n}=e,r=pt(n,Fi(t)).getNodeAtCaret();return r?pt(r,t):Sn(n.getParentOrThrow(),t)}function Gf(e,t="root"){const n=[e];for(let r=wn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(rd(r));return n}function vl(e){return!!e&&e.origin.isAttached()}function h_(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const o=R1(e,r),s=Gf(o.anchor,n),a=Gf(o.focus.getFlipped(),n),l=new Set,u=[];for(const g of o.iterNodeCarets(n))if(wn(g))l.add(g.origin.getKey());else if(wi(g)){const{origin:x}=g;D(x)&&!l.has(x.getKey())||u.push(x)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:x}=g.caret,b=x.getTextContentSize(),y=rd(pt(x,r)),m=x.getMode();if(Math.abs(g.distance)===b&&i==="removeEmptySlices"||m==="token"&&g.distance!==0)y.remove();else if(g.distance!==0){i="removeEmptySlices";let p=g.removeTextSlice();const v=g.caret.origin;if(m==="segmented"){const k=p.origin,C=Re(k.getTextContent()).setStyle(k.getStyle()).setFormat(k.getFormat());y.replaceOrInsert(C),p=Hr(C,r,p.offset)}v.is(s[0].origin)&&(s[0]=p),v.is(a[0].origin)&&(a[0]=p.getFlipped())}}let c,d;for(const g of s)if(vl(g)){c=Rt(g);break}for(const g of a)if(vl(g)){d=Rt(g);break}const f=function(g,x,b){if(!g||!x)return null;const y=g.getParentAtCaret(),m=x.getParentAtCaret();if(!y||!m)return null;const p=y.getParents().reverse();p.push(y);const v=m.getParents().reverse();v.push(m);const k=Math.min(p.length,v.length);let C;for(C=0;C<k&&p[C]===v[C];C++);const w=(P,F)=>{let L;for(let O=C;O<P.length;O++){const B=P[O];if(je(B))return;!L&&F(B)&&(L=B)}return L},S=w(p,Zt),T=S&&w(v,P=>b.has(P.getKey())&&Zt(P));return S&&T?[S,T]:null}(c,d,l);if(f){const[g,x]=f;Sn(g,"previous").splice(0,x.getChildren()),x.remove()}const h=[c,d,...s,...a].find(vl);if(h){const g=ki(Rt(h),e.direction);return _i(g,g)}W(269,JSON.stringify(s.map(g=>g.origin.__key)))}function Rt(e){const t=function(i){let o=i;for(;wn(o);){const s=ed(o);if(!wn(s))break;o=s}return o}(e.getLatest()),{direction:n}=t;if(J(t.origin))return Ar(t)?t:Hr(t.origin,n,n);const r=t.getAdjacentCaret();return wi(r)&&J(r.origin)?Hr(r.origin,n,Fi(n)):t}function D1(e){return Ar(e)&&e.offset!==Oa(e.origin,e.direction)}function ki(e,t){return e.direction===t?e:e.getFlipped()}function R1(e,t){return e.direction===t?e:_i(ki(e.focus,t),ki(e.anchor,t))}function $1(e,t,n){let r=Sn(e,"next");for(let i=0;i<t;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return ki(r,n)}function g_(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const p_=new Map;function m_(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(t[i.trim()]=o.trim())}return t}function B1(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&n!==null){const[r,i]=n,o=e.isBackward(),s=r.getNode(),a=i.getNode(),l=t.is(s),u=t.is(a);if(l||u){const[c,d]=cu(e),f=s.is(a),h=t.is(o?a:s),g=t.is(o?s:a);let x,b=0;return f?(b=c>d?d:c,x=c>d?c:d):h?(b=o?d:c,x=void 0):g&&(b=0,x=o?c:d),t.__text=t.__text.slice(b,x),t}}return t}function Xf(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return D(t)||g_(177),e.offset===t.getChildrenSize()}function x_(e){const t=e.getStyle(),n=m_(t);p_.set(t,n)}function y_(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function b_(e,t,n=y_){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let o=null;if(r){const[s,a]=r;o=zo(),o.anchor.set(s.key,s.offset,s.type),o.focus.set(a.key,a.offset,a.type);const l=th(s.getNode(),Zt),u=th(a.getNode(),Zt);D(l)&&i.set(l.getKey(),l),D(u)&&i.set(u.getKey(),u)}for(const s of e.getNodes())D(s)&&Zt(s)&&i.set(s.getKey(),s);for(const[s,a]of i){const l=t();n(a,l),a.replace(l,!0),o&&(s===o.anchor.key&&o.anchor.set(l.getKey(),o.anchor.offset,o.anchor.type),s===o.focus.key&&o.focus.set(l.getKey(),o.focus.offset,o.focus.type))}o&&e.is(j())&&Xe(o)}function Qf(e,t){const n=ar(e.focus,t?"previous":"next");if(D1(n))return!1;for(const r of nd(n)){if(wn(r))return!r.origin.isInline();if(!D(r.origin)){if(ve(r.origin))return!0;break}}return!1}function v_(e,t,n,r){e.modify(t?"extend":"move",n,r)}function C_(e){const t=e.anchor.getNode();return(ut(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function eh(e,t,n){const r=C_(e);v_(e,t,n?!r:r,"character")}function th(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function w_(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Pa=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,__=Pa&&"documentMode"in document?document.documentMode:null,k_=Pa&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!Pa||!("InputEvent"in window)||__)&&"getTargetRanges"in new window.InputEvent("input");function H1(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function Mt(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const S_=Pa,E_=k_;function tn(e,...t){const n=H1(...t);n.length>0&&e.classList.add(...n)}function Fa(e,...t){const n=H1(...t);n.length>0&&e.classList.remove(...n)}function T_(e){return e?e.getAdjacentCaret():null}function V1(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function xu(e){const t=fr(e,n=>D(n)&&!n.isInline());return D(t)||w_(4,e.__key),t}const fr=(e,t)=>{let n=e;for(;n!==Le()&&n!=null;){if(t(n))return n;n=n.getParent()}return null};function z1(e){const t=j()||Mi();if($(t)){const{focus:n}=t,r=n.getNode(),i=n.offset;if(je(r))$1(r,i,"next").insert(e),e.selectNext();else{let o,s;J(r)?(o=r.getParentOrThrow(),s=r.getIndexWithinParent(),i>0&&(s+=1,r.splitText(i))):(o=r,s=i);const[,a]=n_(o,s);a.insertBefore(e),a.selectStart()}}else{if(t!=null){const r=t.getNodes();r[r.length-1].getTopLevelElementOrThrow().insertAfter(e)}else Le().append(e);const n=Ee();e.insertAfter(n),n.select()}return e.getLatest()}function id(e,t){const n=t();return e.replace(n),n.append(e),n}function nr(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function I_(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);i!==null&&n.push(i)}return n}let Cl=!(E_||!S_)&&void 0;function N_(e){let t=1;if(function(){if(Cl===void 0){const n=document.createElement("div");n.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(n);const r=n.getBoundingClientRect();n.style.setProperty("zoom","2"),Cl=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return Cl}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}const ds=0,yu=1,bu=2,Kt=0,M_=1,nh=2,A_=3,O_=4;function P_(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return Kt;const o=t._selection,s=e._selection;if(i)return M_;if(!($(o)&&$(s)&&s.isCollapsed()&&o.isCollapsed()))return Kt;const a=function(y,m,p){const v=y._nodeMap,k=[];for(const C of m){const w=v.get(C);w!==void 0&&k.push(w)}for(const[C,w]of p){if(!w)continue;const S=v.get(C);S===void 0||ut(S)||k.push(S)}return k}(t,n,r);if(a.length===0)return Kt;if(a.length>1){const y=t._nodeMap,m=y.get(o.anchor.key),p=y.get(s.anchor.key);return m&&p&&!e._nodeMap.has(m.__key)&&J(m)&&m.__text.length===1&&o.anchor.offset===1?nh:Kt}const l=a[0],u=e._nodeMap.get(l.__key);if(!J(u)||!J(l)||u.__mode!==l.__mode)return Kt;const c=u.__text,d=l.__text;if(c===d)return Kt;const f=o.anchor,h=s.anchor;if(f.key!==h.key||f.type!=="text")return Kt;const g=f.offset,x=h.offset,b=d.length-c.length;return b===1&&x===g-1?nh:b===-1&&x===g+1?A_:b===-1&&x===g?O_:Kt}function F_(e,t){let n=Date.now(),r=Kt;return(i,o,s,a,l,u)=>{const c=Date.now();if(u.has("historic"))return r=Kt,n=c,bu;const d=P_(i,o,a,l,e.isComposing()),f=(()=>{const h=s===null||s.editor===e,g=u.has("history-push");if(!g&&h&&u.has("history-merge"))return ds;if(i===null)return yu;const x=o._selection;return a.size>0||l.size>0?g===!1&&d!==Kt&&d===r&&c<n+t&&h||a.size===1&&function(b,y,m){const p=y._nodeMap.get(b),v=m._nodeMap.get(b),k=y._selection,C=m._selection;return!($(k)&&$(C)&&k.anchor.type==="element"&&k.focus.type==="element"&&C.anchor.type==="text"&&C.focus.type==="text"||!J(p)||!J(v)||p.__parent!==v.__parent)&&JSON.stringify(y.read(()=>p.exportJSON()))===JSON.stringify(m.read(()=>v.exportJSON()))}(Array.from(a)[0],i,o)?ds:yu:x!==null?ds:bu})();return n=c,r=d,f}}function rh(e){e.undoStack=[],e.redoStack=[],e.current=null}function L_(e,t,n){const r=F_(e,n);return Mt(e.registerCommand(ba,()=>(function(o,s){const a=s.redoStack,l=s.undoStack;if(l.length!==0){const u=s.current,c=l.pop();u!==null&&(a.push(u),o.dispatchCommand(Gi,!0)),l.length===0&&o.dispatchCommand(Xi,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),xe),e.registerCommand(va,()=>(function(o,s){const a=s.redoStack,l=s.undoStack;if(a.length!==0){const u=s.current;u!==null&&(l.push(u),o.dispatchCommand(Xi,!0));const c=a.pop();a.length===0&&o.dispatchCommand(Gi,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),xe),e.registerCommand(Nw,()=>(rh(t),!1),xe),e.registerCommand(Mw,()=>(rh(t),e.dispatchCommand(Gi,!1),e.dispatchCommand(Xi,!1),!0),xe),e.registerUpdateListener(({editorState:o,prevEditorState:s,dirtyLeaves:a,dirtyElements:l,tags:u})=>{const c=t.current,d=t.redoStack,f=t.undoStack,h=c===null?null:c.editorState;if(c!==null&&o===h)return;const g=r(s,o,c,a,l,u);if(g===yu)d.length!==0&&(t.redoStack=[],e.dispatchCommand(Gi,!1)),c!==null&&(f.push({...c}),e.dispatchCommand(Xi,!0));else if(g===bu)return;t.current={editor:e,editorState:o}}))}function W1(){return{current:null,redoStack:[],undoStack:[]}}function D_({delay:e,externalHistoryState:t}){const[n]=yt();return function(r,i,o=1e3){const s=I.useMemo(()=>i||W1(),[i]);I.useEffect(()=>L_(r,s,o),[o,r,s])}(n,t,e),null}function R_(e,t){const n=t.body?t.body.childNodes:[];let r=[];const i=[];for(let o=0;o<n.length;o++){const s=n[o];if(!U1.has(s.nodeName)){const a=J1(s,e,i,!1);a!==null&&(r=r.concat(a))}}return function(o){for(const s of o)s.getNextSibling()instanceof Hc&&s.insertAfter(Qt());for(const s of o){const a=s.getChildren();for(const l of a)s.insertBefore(l);s.remove()}}(i),r}function $_(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Le().getChildren();for(let i=0;i<r.length;i++)j1(e,r[i],n,t);return n.innerHTML}function j1(e,t,n,r=null){let i=r===null||t.isSelected(r);const o=D(t)&&t.excludeFromCopy("html");let s=t;if(r!==null){let h=Yc(t);h=J(h)&&r!==null?B1(r,h):h,s=h}const a=D(s)?s.getChildren():[],l=e._nodes.get(s.getType());let u;u=l&&l.exportDOM!==void 0?l.exportDOM(e,s):s.exportDOM(e);const{element:c,after:d}=u;if(!c)return!1;const f=document.createDocumentFragment();for(let h=0;h<a.length;h++){const g=a[h],x=j1(e,g,f,r);!i&&D(t)&&x&&t.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!o){if((Ke(c)||pu(c))&&c.append(f),n.append(c),d){const h=d.call(s,c);h&&(pu(c)?c.replaceChildren(h):c.replaceWith(h))}}else n.append(f);return i}const U1=new Set(["STYLE","SCRIPT"]);function J1(e,t,n,r,i=new Map,o){let s=[];if(U1.has(e.nodeName))return s;let a=null;const l=function(g,x){const{nodeName:b}=g,y=x._htmlConversions.get(b.toLowerCase());let m=null;if(y!==void 0)for(const p of y){const v=p(g);v!==null&&(m===null||(m.priority||0)<=(v.priority||0))&&(m=v)}return m!==null?m.conversion:null}(e,t),u=l?l(e):null;let c=null;if(u!==null){c=u.after;const g=u.node;if(a=Array.isArray(g)?g[g.length-1]:g,a!==null){for(const[,x]of i)if(a=x(a,o),!a)break;a&&s.push(...Array.isArray(g)?g:[a])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const d=e.childNodes;let f=[];const h=(a==null||!je(a))&&(a!=null&&Ws(a)||r);for(let g=0;g<d.length;g++)f.push(...J1(d[g],t,n,h,new Map(i),a));return c!=null&&(f=c(f)),Zs(e)&&(f=B_(e,f,h?()=>{const g=new Hc;return n.push(g),g}:Ee)),a==null?f.length>0?s=s.concat(f):Zs(e)&&function(g){return g.nextSibling==null||g.previousSibling==null?!1:mu(g.nextSibling)&&mu(g.previousSibling)}(e)&&(s=s.concat(Qt())):D(a)&&a.append(...f),s}function B_(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const a=t[s];if(Ws(a))r&&!a.getFormat()&&a.setFormat(r),i.push(a);else if(o.push(a),s===t.length-1||s<t.length-1&&Ws(t[s+1])){const l=n();l.setFormat(r),l.append(...o),i.push(l),o=[]}}return i}function qs(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function H_(e,t=j()){return t==null&&qs(166),$(t)&&t.isCollapsed()||t.getNodes().length===0?"":$_(e,t)}function V_(e,t=j()){return t==null&&qs(166),$(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(z_(e,t))}function ih(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const a=JSON.parse(r);if(a.namespace===n._config.namespace&&Array.isArray(a.nodes))return oh(n,W_(a.nodes),t)}catch{}const i=e.getData("text/html"),o=e.getData("text/plain");if(i&&o!==i)try{const a=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(l):l}(i),"text/html");return oh(n,R_(n,a),t)}catch{}const s=o||e.getData("text/uri-list");if(s!=null)if($(t)){const a=s.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l<a.length;l++){const u=j();if($(u)){const c=a[l];c===`
|
|
28
|
-
`||c===`\r
|
|
29
|
-
`?u.insertParagraph():c===" "?u.insertNodes([Ni()]):u.insertText(c)}}}else t.insertRawText(s)}function oh(e,t,n){e.dispatchCommand(kw,{nodes:t,selection:n})||n.insertNodes(t)}function K1(e,t,n,r=[]){let i=t===null||n.isSelected(t);const o=D(n)&&n.excludeFromCopy("html");let s=n;if(t!==null){let u=Yc(n);u=J(u)&&t!==null?B1(t,u):u,s=u}const a=D(s)?s.getChildren():[],l=function(u){const c=u.exportJSON(),d=u.constructor;if(c.type!==d.getType()&&qs(58,d.name),D(u)){const f=c.children;Array.isArray(f)||qs(59,d.name)}return c}(s);if(J(s)){const u=s.__text;u.length>0?l.text=u:i=!1}for(let u=0;u<a.length;u++){const c=a[u],d=K1(e,t,c,l.children);!i&&D(n)&&d&&n.extractWithChild(c,t,"clone")&&(i=!0)}if(i&&!o)r.push(l);else if(Array.isArray(l.children))for(let u=0;u<l.children.length;u++){const c=l.children[u];r.push(c)}return i}function z_(e,t){const n=[],r=Le().getChildren();for(let i=0;i<r.length;i++)K1(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function W_(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=Ww(r);J(i)&&x_(i),t.push(i)}return t}let ei=null;async function sh(e,t,n){if(ei!==null)return!1;if(t!==null)return new Promise((u,c)=>{e.update(()=>{u(ah(e,t,n))})});const r=e.getRootElement(),i=e._window||window,o=window.document,s=en(i);if(r===null||s===null)return!1;const a=o.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(o.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((u,c)=>{const d=e.registerCommand(ka,f=>(nr(f,ClipboardEvent)&&(d(),ei!==null&&(window.clearTimeout(ei),ei=null),u(ah(e,f,n))),!0),zn);ei=window.setTimeout(()=>{d(),ei=null,u(!1)},50),o.execCommand("copy"),a.remove()})}function ah(e,t,n){if(n===void 0){const i=en(e._window);if(!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!Jo(e,o,s))return!1;const a=j();if(a===null)return!1;n=U_(a)}t.preventDefault();const r=t.clipboardData;return r!==null&&(J_(r,n),!0)}const j_=[["text/html",H_],["application/x-lexical-editor",V_]];function U_(e=j()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=r_();for(const[r,i]of j_){const o=i(n,e);o!==null&&(t[r]=o)}}return t}function J_(e,t){for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function lh(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Li=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,K_=Li&&"documentMode"in document?document.documentMode:null,Z_=!(!Li||!("InputEvent"in window)||K_)&&"getTargetRanges"in new window.InputEvent("input"),q_=Li&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),uh=Li&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Y_=Li&&/^(?=.*Chrome).*/i.test(navigator.userAgent),G_=Li&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Y_,ch=Jn();let La=class Z1 extends an{static getType(){return"quote"}static clone(t){return new Z1(t.__key)}createDOM(t){const n=document.createElement("blockquote");return tn(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:X_,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Zo().updateFromJSON(t)}insertNewAfter(t,n){const r=Ee(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=Ee();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function Zo(){return Nt(new La)}function vu(e){return e instanceof La}let qo=class q1 extends an{static getType(){return"heading"}static clone(t){return new q1(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}setTag(t){const n=this.getWritable();return this.__tag=t,n}createDOM(t){const n=this.__tag,r=document.createElement(n),i=t.theme.heading;if(i!==void 0){const o=i[n];tn(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:ti,priority:0}),h2:t=>({conversion:ti,priority:0}),h3:t=>({conversion:ti,priority:0}),h4:t=>({conversion:ti,priority:0}),h5:t=>({conversion:ti,priority:0}),h6:t=>({conversion:ti,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&dh(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>dh(t)?{conversion:n=>({node:vn("h1")}),priority:3}:null}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return vn(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?Ee():vn(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,n),r===0&&!this.isEmpty()&&t){const a=Ee();a.select(),this.replace(a,!0)}return o}collapseAtStart(){const t=this.isEmpty()?Ee():vn(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function dh(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function ti(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=vn(t),e.style!==null&&(Gc(e,n),n.setFormat(e.style.textAlign))),{node:n}}function X_(e){const t=Zo();return e.style!==null&&(t.setFormat(e.style.textAlign),Gc(e,t)),{node:t}}function vn(e="h1"){return Nt(new qo(e))}function Da(e){return e instanceof qo}function fs(e){let t=null;if(nr(e,DragEvent)?t=e.dataTransfer:nr(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function fh(e){const t=j();if(!$(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(n.has(s))continue;const a=fr(o,u=>D(u)&&!u.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),e(a))}return n.size>0}function hs(e){const t=kn(e);return ve(t)}function wl(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function Q_(e){return Mt(e.registerCommand(ya,t=>{const n=j();return!!et(n)&&(n.clear(),!0)},0),e.registerCommand(Nr,t=>{const n=j();return!!$(n)&&(n.deleteCharacter(t),!0)},xe),e.registerCommand(ko,t=>{const n=j();return!!$(n)&&(n.deleteWord(t),!0)},xe),e.registerCommand(So,t=>{const n=j();return!!$(n)&&(n.deleteLine(t),!0)},xe),e.registerCommand(di,t=>{const n=j();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)ih(r,n,e);else if($(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},xe),e.registerCommand(tu,()=>{const t=j();return!!$(t)&&(t.removeText(),!0)},xe),e.registerCommand($n,t=>{const n=j();return!!$(n)&&(n.formatText(t),!0)},xe),e.registerCommand(Tw,t=>{const n=j();if(!$(n)&&!et(n))return!1;const r=n.getNodes();for(const i of r){const o=fr(i,s=>D(s)&&!s.isInline());o!==null&&o.setFormat(t)}return!0},xe),e.registerCommand(ci,t=>{const n=j();return!!$(n)&&(n.insertLineBreak(t),!0)},xe),e.registerCommand(_o,()=>{const t=j();return!!$(t)&&(t.insertParagraph(),!0)},xe),e.registerCommand(Xm,()=>(Ai([Ni()]),!0),xe),e.registerCommand(Vs,()=>fh(t=>{const n=t.getIndent();t.setIndent(n+1)}),xe),e.registerCommand(nu,()=>fh(t=>{const n=t.getIndent();n>0&&t.setIndent(n-1)}),xe),e.registerCommand(Ec,t=>{const n=j();if(et(n)&&!hs(t.target)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if($(n)){const r=fu(n.focus,!0);if(!t.shiftKey&&ve(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},xe),e.registerCommand(Tc,t=>{const n=j();if(et(n)){const r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if($(n)){if(function(i){const o=i.focus;return o.key==="root"&&o.offset===Le().getChildrenSize()}(n))return t.preventDefault(),!0;const r=fu(n.focus,!1);if(!t.shiftKey&&ve(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},xe),e.registerCommand(Sc,t=>{const n=j();if(et(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}if(!$(n))return!1;if(Qf(n,!0)){const r=t.shiftKey;return t.preventDefault(),eh(n,r,!0),!0}return!1},xe),e.registerCommand(Gm,t=>{const n=j();if(et(n)&&!hs(t.target)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),i[0].selectNext(0,0),!0}if(!$(n))return!1;const r=t.shiftKey;return!!Qf(n,!1)&&(t.preventDefault(),eh(n,r,!1),!0)},xe),e.registerCommand(Ca,t=>{if(hs(t.target))return!1;const n=j();if(!$(n))return!1;const{anchor:r}=n,i=r.getNode();return n.isCollapsed()&&r.offset===0&&!ut(i)&&xu(i).getIndent()>0?(t.preventDefault(),e.dispatchCommand(nu,void 0)):(!uh||navigator.language!=="ko-KR")&&(t.preventDefault(),e.dispatchCommand(Nr,!0))},xe),e.registerCommand(wa,t=>{if(hs(t.target))return!1;const n=j();return!!$(n)&&(t.preventDefault(),e.dispatchCommand(Nr,!1))},xe),e.registerCommand(Eo,t=>{const n=j();if(!$(n))return!1;if(wl(n),t!==null){if((uh||q_||G_)&&Z_)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(ci,!1)}return e.dispatchCommand(_o,void 0)},xe),e.registerCommand(Bo,()=>{const t=j();return!!$(t)&&(e.blur(),!0)},xe),e.registerCommand(Mc,t=>{const[,n]=fs(t);if(n.length>0){const i=lh(t.clientX,t.clientY);if(i!==null){const{offset:o,node:s}=i,a=kn(s);if(a!==null){const l=zo();if(J(a))l.anchor.set(a.getKey(),o,"text"),l.focus.set(a.getKey(),o,"text");else{const c=a.getParentOrThrow().getKey(),d=a.getIndexWithinParent()+1;l.anchor.set(c,d,"element"),l.focus.set(c,d,"element")}const u=Dr(l);Xe(u)}e.dispatchCommand(ch,n)}return t.preventDefault(),!0}const r=j();return!!$(r)},xe),e.registerCommand(_a,t=>{const[n]=fs(t),r=j();return!(n&&!$(r))},xe),e.registerCommand(Ac,t=>{const[n]=fs(t),r=j();if(n&&!$(r))return!1;const i=lh(t.clientX,t.clientY);if(i!==null){const o=kn(i.node);ve(o)&&t.preventDefault()}return!0},xe),e.registerCommand(ru,()=>(qw(),!0),xe),e.registerCommand(ka,t=>(sh(e,nr(t,ClipboardEvent)?t:null),!0),xe),e.registerCommand(Oc,t=>(async function(n,r){await sh(r,nr(n,ClipboardEvent)?n:null),r.update(()=>{const i=j();$(i)?i.removeText():et(i)&&i.getNodes().forEach(o=>o.remove())})}(t,e),!0),xe),e.registerCommand($o,t=>{const[,n,r]=fs(t);return n.length>0&&!r?(e.dispatchCommand(ch,n),!0):Pi(t.target)&&zc(t.target)?!1:j()!==null&&(function(i,o){i.preventDefault(),o.update(()=>{const s=j(),a=nr(i,InputEvent)||nr(i,KeyboardEvent)?null:i.clipboardData;a!=null&&s!==null&&ih(a,s,o)},{tag:"paste"})}(t,e),!0)},xe),e.registerCommand(Ic,t=>{const n=j();return $(n)&&wl(n),!1},xe),e.registerCommand(Nc,t=>{const n=j();return $(n)&&wl(n),!1},xe))}function Pt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Dt(e,t){return e.length>0?(Pt(e,e.length,0,t),e):t}const pn=hr(/[A-Za-z]/),Yt=hr(/[\dA-Za-z]/),e9=hr(/[#-'*+\--9=?A-Z^-~]/);function Cu(e){return e!==null&&(e<32||e===127)}const wu=hr(/\d/),t9=hr(/[\dA-Fa-f]/),n9=hr(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const r9=hr(new RegExp("\\p{P}|\\p{S}","u")),Pn=hr(/\s/);function hr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Si(e){if(e===null||Ze(e)||Pn(e))return 1;if(r9(e))return 2}function Ra(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function i9(e){let n={}.singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},f=[["enter",c,a],["enter",s[u][1],a],["exit",s[u][1],a],["enter",d,a]],h=a.parser.constructs.insideSpan.null;h&&Pt(f,f.length,0,Ra(h,s.slice(u+1,l),a)),Pt(f,f.length,0,[["exit",d,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",c,a]]),Pt(s,u-1,l-u+3,f),l=u+f.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){const u=this.previous,c=this.events;let d=0;return f;function f(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const x=Si(u);if(g===126)return d>1?l(g):(s.consume(g),d++,h);if(d<2&&!n)return l(g);const b=s.exit("strikethroughSequenceTemporary"),y=Si(g);return b._open=!y||y===2&&!!x,b._close=!x||x===2&&!!y,a(g)}}}const o9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Y1.peek=c9;function s9(){return{canContainEols:["delete"],enter:{strikethrough:l9},exit:{strikethrough:u9}}}function a9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:o9}],handlers:{delete:Y1}}}function l9(e){this.enter({type:"delete",children:[]},e)}function u9(e){this.exit(e)}function Y1(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function c9(){return"~"}function hh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const d9=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],gh={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function G1(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function f9(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function h9(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function ph(e){return h9(e)||G1(e)}const mh=document.createElement("i");function Io(e){const t="&"+e+";";mh.innerHTML=t;const n=mh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const g9=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function p9(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,s=-1,a="",l,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,l=n.position.start):l=n.position);let c=(l?l.line:0)||1,d=(l?l.column:0)||1,f=g(),h;for(o--;++o<=e.length;)if(h===10&&(d=(u?u[s]:0)||1),h=e.charCodeAt(o),h===38){const y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){a+=String.fromCharCode(h),d++;continue}const m=o+1;let p=m,v=m,k;if(y===35){v=++p;const O=e.charCodeAt(v);O===88||O===120?(k="hexadecimal",v=++p):k="decimal"}else k="named";let C="",w="",S="";const T=k==="named"?ph:k==="decimal"?G1:f9;for(v--;++v<=e.length;){const O=e.charCodeAt(v);if(!T(O))break;S+=String.fromCharCode(O),k==="named"&&d9.includes(S)&&(C=S,w=Io(S))}let P=e.charCodeAt(v)===59;if(P){v++;const O=k==="named"?Io(S):!1;O&&(C=S,w=O)}let F=1+v-m,L="";if(!(!P&&n.nonTerminated===!1))if(!S)k!=="named"&&x(4,F);else if(k==="named"){if(P&&!w)x(5,1);else if(C!==S&&(v=p+C.length,F=1+v-p,P=!1),!P){const O=C?1:3;if(n.attribute){const B=e.charCodeAt(v);B===61?(x(O,F),w=""):ph(B)?w="":x(O,F)}else x(O,F)}L=w}else{P||x(2,F);let O=Number.parseInt(S,k==="hexadecimal"?16:10);if(m9(O))x(7,F),L="�";else if(O in gh)x(6,F),L=gh[O];else{let B="";x9(O)&&x(6,F),O>65535&&(O-=65536,B+=String.fromCharCode(O>>>10|55296),O=56320|O&1023),L=B+String.fromCharCode(O)}}if(L){b(),f=g(),o=v-1,d+=v-m+1,i.push(L);const O=g();O.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,L,{start:f,end:O},e.slice(m-1,v)),f=O}else S=e.slice(m-1,v),a+=S,d+=S.length,o=v-1}else h===10&&(c++,s++,d=0),Number.isNaN(h)?b():(a+=String.fromCharCode(h),d++);return i.join("");function g(){return{line:c,column:d,offset:o+((l?l.offset:0)||0)}}function x(y,m){let p;n.warning&&(p=g(),p.column+=m,p.offset+=m,n.warning.call(n.warningContext||void 0,g9[y],p,y))}function b(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:f,end:g()}),a="")}}function m9(e){return e>=55296&&e<=57343||e>1114111}function x9(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const y9=/["&'<>`]/g,b9=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v9=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,C9=/[|\\{}()[\]^$+*?.]/g,xh=new WeakMap;function w9(e,t){if(e=e.replace(t.subset?_9(t.subset):y9,r),t.subset||t.escapeOnly)return e;return e.replace(b9,n).replace(v9,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function _9(e){let t=xh.get(e);return t||(t=k9(e),xh.set(e,t)),t}function k9(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(C9,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function S9(e){return"&#x"+e.toString(16).toUpperCase()+";"}function E9(e,t){return w9(e,Object.assign({format:S9},t))}function Bn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yh(e.position):"start"in e||"end"in e?yh(e):"line"in e||"column"in e?_u(e):""}function _u(e){return bh(e&&e.line)+":"+bh(e&&e.column)}function yh(e){return _u(e&&e.start)+"-"+_u(e&&e.end)}function bh(e){return e&&typeof e=="number"?e:1}class Ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Bn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;const X1=" ";function T9(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:l,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:g,mdxJsxFlowTagAttributeNameLocal:x,mdxJsxFlowTagAttributeValueLiteral:b,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:m,mdxJsxFlowTag:p,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:l,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:g,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:b,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:m,mdxJsxTextTag:p}};function e(){this.buffer()}function t(w){return{line:w.line,column:w.column,offset:w.offset}}function n(w){this.config.enter.data.call(this,w),this.config.exit.data.call(this,w)}function r(w){const S={name:void 0,attributes:[],close:!1,selfClosing:!1,start:w.start,end:w.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=S,this.buffer()}function i(w){if(this.data.mdxJsxTagStack.length===0)throw new Ae("Unexpected closing slash `/` in tag, expected an open tag first",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(w){if(this.data.mdxJsxTag.close)throw new Ae("Unexpected attribute in closing tag, expected the end of the tag",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(w){if(this.data.mdxJsxTag.close)throw new Ae("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function a(){const w=this.data.mdxJsxTag;w.close=!0}function l(w){const S=this.data.mdxJsxTag;S.name=this.sliceSerialize(w)}function u(w){const S=this.data.mdxJsxTag;S.name+="."+this.sliceSerialize(w)}function c(w){const S=this.data.mdxJsxTag;S.name+=":"+this.sliceSerialize(w)}function d(w){const S=this.data.mdxJsxTag;o.call(this,w),S.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(w.start),end:void 0}})}function f(w){const S=this.data.mdxJsxTag;o.call(this,w),S.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(w.start),end:void 0}}),this.buffer()}function h(w){const S=this.data.mdxJsxTag,T=S.attributes[S.attributes.length-1];T.type;const P=w.estree;T.value=this.resume(),T.position,T.position.end=t(w.end),P&&(T.data={estree:P})}function g(w){const S=this.data.mdxJsxTag,T=S.attributes[S.attributes.length-1];T.type,T.name=this.sliceSerialize(w),T.position,T.position.end=t(w.end)}function x(w){const S=this.data.mdxJsxTag,T=S.attributes[S.attributes.length-1];T.type,T.name+=":"+this.sliceSerialize(w),T.position,T.position.end=t(w.end)}function b(w){const S=this.data.mdxJsxTag,T=S.attributes[S.attributes.length-1];T.value=p9(this.resume(),{nonTerminated:!1}),T.position,T.position.end=t(w.end)}function y(w){const S=this.data.mdxJsxTag,T=S.attributes[S.attributes.length-1];T.type;const P={type:"mdxJsxAttributeValueExpression",value:this.resume()},F=w.estree;F&&(P.data={estree:F}),T.value=P,T.position,T.position.end=t(w.end)}function m(){const w=this.data.mdxJsxTag;w.selfClosing=!0}function p(w){const S=this.data.mdxJsxTag,T=this.data.mdxJsxTagStack,P=T[T.length-1];if(S.close&&P.name!==S.name)throw new Ae("Unexpected closing tag `"+C(S)+"`, expected corresponding closing tag for `"+C(P)+"` ("+Bn(P)+")",{start:w.start,end:w.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),S.close?T.pop():this.enter({type:w.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:S.name||null,attributes:S.attributes,children:[]},w,v),S.selfClosing||S.close?this.exit(w,k):T.push(S)}function v(w,S){const T=this.data.mdxJsxTagStack,P=T[T.length-1],F=w?" before the end of `"+w.type+"`":"",L=w?{start:w.start,end:w.end}:void 0;throw new Ae("Expected a closing tag for `"+C(P)+"` ("+Bn({start:S.start,end:S.end})+")"+F,L,"mdast-util-mdx-jsx:end-tag-mismatch")}function k(w,S){const T=this.data.mdxJsxTag;throw new Ae("Expected the closing tag `"+C(T)+"` either after the end of `"+S.type+"` ("+Bn(S.end)+") or another opening tag after the start of `"+S.type+"` ("+Bn(S.start)+")",{start:w.start,end:w.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function C(w){return"<"+(w.close?"/":"")+(w.name||"")+">"}}function I9(e){const t={},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||Number.POSITIVE_INFINITY,s=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=M9,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function a(l,u,c,d){const f=l.type==="mdxJsxFlowElement",h=l.name?!l.children||l.children.length===0:!1,g=Q1(c),x=e0(g),b=c.createTracker(d),y=c.createTracker(d),m=[],p=(f?x:"")+"<"+(l.name||""),v=c.enter(l.type);if(b.move(p),y.move(p),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let T=-1;for(;++T<l.attributes.length;){const P=l.attributes[T];let F;if(P.type==="mdxJsxExpressionAttribute")F="{"+(P.value||"")+"}";else{if(!P.name)throw new Error("Cannot serialize attribute w/o name");const L=P.value,O=P.name;let B="";if(L!=null)if(typeof L=="object")B="{"+(L.value||"")+"}";else{const H=r&&hh(L,n)>hh(L,s)?s:n;B=H+E9(L,{subset:[H]})+H}F=O+(B?"=":"")+B}m.push(F)}}let k=!1;const C=m.join(" ");f&&(/\r?\n|\r/.test(C)||b.current().now.column+C.length+(h?i?2:3:1)>o)&&(k=!0);let w=b,S=p;if(k){w=y;let T=-1;for(;++T<m.length;)m[T]=x+X1+m[T];S+=w.move(`
|
|
30
|
-
`+m.join(`
|
|
31
|
-
`)+`
|
|
32
|
-
`+x)}else C&&(S+=w.move(" "+C));return h&&(S+=w.move((i||k?"":" ")+"/")),S+=w.move(">"),l.children&&l.children.length>0&&(l.type==="mdxJsxTextElement"?S+=w.move(c.containerPhrasing(l,{...w.current(),before:">",after:"<"})):(w.shift(2),S+=w.move(`
|
|
33
|
-
`),S+=w.move(N9(l,c,w.current())),S+=w.move(`
|
|
34
|
-
`))),h||(S+=w.move((f?x:"")+"</"+(l.name||"")+">")),v(),S}}function N9(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),s=e0(Q1(t)),a=[];let l=-1;for(r.push(-1);++l<i.length;){const u=i[l];r[r.length-1]=l;const c={before:`
|
|
35
|
-
`,after:`
|
|
36
|
-
`,...o.current()},d=t.handle(u,e,t,c),f=u.type==="mdxJsxFlowElement"?d:t.indentLines(d,function(h,g,x){return(x?"":s)+h});a.push(o.move(f)),u.type!=="list"&&(t.bulletLastUsed=void 0),l<i.length-1&&a.push(o.move(`
|
|
37
|
-
|
|
38
|
-
`))}return r.pop(),a.join("")}function Q1(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function e0(e){return X1.repeat(e)}function M9(){return"<"}const A9=/[$_\p{ID_Start}]/u,O9=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,P9=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,F9={};function Wt(e){return e?A9.test(String.fromCodePoint(e)):!1}function Ui(e,t){const r=(t||F9).jsx?P9:O9;return e?r.test(String.fromCodePoint(e)):!1}function Se(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return ye(l)?(e.enter(n),a(l)):t(l)}function a(l){return ye(l)&&o++<i?(e.consume(l),a):(e.exit(n),t(l))}}const L9={}.hasOwnProperty,D9=Symbol("continue"),_l=Symbol("exit"),R9=Symbol("skip");function $9(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(o,s,a,l){return kl(o)&&(u.displayName="node ("+o.type+")"),u;function u(){const c=n?vh(n(o,s,a,l)):[];if(c[0]===_l)return c;if(c[0]!==R9){let d;for(d in o)if(L9.call(o,d)&&o[d]&&typeof o[d]=="object"&&d!=="data"&&d!=="position"){const f=l.concat(o),h=o[d];if(Array.isArray(h)){const g=h;let x=0;for(;x>-1&&x<g.length;){const b=g[x];if(kl(b)){const y=i(b,d,x,f)();if(y[0]===_l)return y;x=typeof y[1]=="number"?y[1]:x+1}else x++}}else if(kl(h)){const g=i(h,d,void 0,f)();if(g[0]===_l)return g}}}return r?vh(r(o,s,a,l)):c}}}function vh(e){return Array.isArray(e)?e:typeof e=="number"?[D9,e]:[e]}function kl(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function B9(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),o=[],s=[],a=i.onComment,l=i.onToken;let u=!1,c,d;const f=Object.assign({},i,{onComment:o,preserveParens:!0});l&&(f.onToken=s);const h=H9(e,t.tokenTypes),g=h.value,x=n+g+r,b=Ch(g);if(b&&!t.allowEmpty)throw new Ae("Unexpected empty expression",{place:m(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=t.expression&&!b?t.acorn.parseExpressionAt(x,0,f):t.acorn.parse(x,f)}catch(p){const v=p,k=m(v.pos);v.message=String(v.message).replace(/ \(\d+:\d+\)$/,""),v.pos=k.offset,v.loc={line:k.line,column:k.column-1},d=v,u=v.raisedAt>=n.length+g.length||v.message==="Unterminated comment"}if(c&&t.expression&&!b)if(Ch(x.slice(c.end,x.length-r.length)))c={type:"Program",start:0,end:n.length+g.length,body:[{type:"ExpressionStatement",expression:c,start:0,end:n.length+g.length}],sourceType:"module",comments:[]};else{const p=m(c.end),v=new Error("Unexpected content after expression");v.pos=p.offset,v.loc={line:p.line,column:p.column-1},d=v,c=void 0}if(c){if(c.comments=o,$9(c,function(p,v,k,C){let w=C[C.length-1],S=v;p.type==="ParenthesizedExpression"&&w&&S&&(typeof k=="number"&&(w=w[S],S=k),w[S]=p.expression),y(p)}),Array.isArray(a))a.push(...o);else if(typeof a=="function")for(const p of o)a(p.type==="Block",p.value,p.start,p.end,p.loc.start,p.loc.end);for(const p of s)p.end<=n.length||p.start-n.length>=g.length||(y(p),Array.isArray(l)?l.push(p):l(p))}return{estree:c,error:d,swallow:u};function y(p){const v=m(p.start),k=m(p.end);p.start=v.offset,p.end=k.offset,p.loc={start:{line:v.line,column:v.column-1,offset:v.offset},end:{line:k.line,column:k.column-1,offset:k.offset}},p.range=[p.start,p.end]}function m(p){let v=p-n.length;v<0?v=0:v>g.length&&(v=g.length);let k=V9(h.stops,v);return k||(k={line:t.start.line,column:t.start.column,offset:t.start.offset}),k}}function Ch(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function H9(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const o=i[1].type;if(o==="lineEnding"||t.includes(o)){const s=i[2].sliceStream(i[1]);for(;s.length>0&&s[0]===-1;)s.shift();const a=z9(s);n.stops.push([n.value.length,i[1].start]),n.value+=a,n.stops.push([n.value.length,i[1].end])}}}return n}function V9(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}function z9(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
39
|
-
`;break}case-3:{o=`\r
|
|
40
|
-
`;break}case-2:{o=" ";break}case-1:{if(r)continue;o=" ";break}default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}function Sl(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=wh(n.start,r[0]||t.start),o=wh(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function wh(e,t){if(e&&typeof e=="object"){const n="line"in e?El(e.line):void 0,r="column"in e?El(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:El(t)}}}function El(e){return typeof e=="number"&&e>-1?e:void 0}const W9=2,si="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",j9="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",U9="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",_h="#unexpected-type-in-code-expected-an-object-spread-spread",J9="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",K9="#could-not-parse-expression-with-acorn";function kh(e,t,n,r,i,o,s,a,l,u,c){const d=this,f=this.events.length+3;let h=0,g,x;return b;function b(v){return e.enter(n),e.enter(r),e.consume(v),e.exit(r),g=d.now(),y}function y(v){if(v===null){if(x)throw x;const k=new Ae("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw k.url=si+j9,k}if(re(v))return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p;if(v===125&&h===0){const k=o?Z9.call(d,o,s,i,f,g,u||!1,l||!1):{type:"ok",estree:void 0};if(k.type==="ok"){e.enter(r),e.consume(v),e.exit(r);const C=e.exit(n);return a&&k.estree&&Object.assign(C,{estree:k.estree}),t}return x=k.message,e.enter(i),e.consume(v),m}return e.enter(i),m(v)}function m(v){return v===125&&h===0||v===null||re(v)?(e.exit(i),y(v)):(v===123&&!o?h+=1:v===125&&(h-=1),e.consume(v),m)}function p(v){const k=d.now();if(k.line!==g.line&&!c&&d.parser.lazy[k.line]){const C=new Ae("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw C.url=si+U9,C}return ye(v)?Se(e,y,"linePrefix",W9+1)(v):y(v)}}function Z9(e,t,n,r,i,o,s){const a=B9(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:s?"({":"",suffix:s?"})":""}),l=a.estree;if(s&&l){const u=l.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const c=Sl(u),d=new Ae("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=si+_h,d}if(u.expression.properties[1]){const c=Sl(u.expression.properties[1]),d=new Ae("Unexpected extra content in spread: only a single spread is supported",{place:c.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw d.url=si+J9,d}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=Sl(u.expression.properties[0]),d=new Ae("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=si+_h,d}}if(a.error){const u=new Ae("Could not parse expression with acorn",{cause:a.error,place:{line:a.error.loc.line,column:a.error.loc.column+1,offset:a.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=si+K9,{type:"nok",message:u}}return{type:"ok",estree:l}}const Sh="https://github.com/micromark/micromark-extension-mdx-jsx";function t0(e,t,n,r,i,o,s,a,l,u,c,d,f,h,g,x,b,y,m,p,v,k,C,w,S,T,P,F,L,O,B,H){const q=this;let Z,Q;return X;function X(E){return e.enter(a),e.enter(l),e.consume(E),e.exit(l),N}function N(E){return Ze(E)?n(E):(Z=oe,Ce(E))}function oe(E){if(E===47)return e.enter(u),e.consume(E),e.exit(u),Z=ce,Ce;if(E===62)return vt(E);if(E!==null&&E>=0&&Wt(E))return e.enter(d),e.enter(f),e.consume(E),A;V(E,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(E===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function ce(E){if(E===62)return vt(E);if(E!==null&&E>=0&&Wt(E))return e.enter(d),e.enter(f),e.consume(E),A;V(E,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(E===42||E===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function A(E){if(E!==null&&E>=0&&Ui(E,{jsx:!0}))return e.consume(E),A;if(E===46||E===47||E===58||E===62||E===123||Ze(E)||Pn(E))return e.exit(f),Z=fe,Ce(E);V(E,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(E===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function fe(E){if(E===46)return e.enter(h),e.consume(E),e.exit(h),Z=ge,Ce;if(E===58)return e.enter(x),e.consume(E),e.exit(x),Z=U,Ce;if(E===47||E===62||E===123||E!==null&&E>=0&&Wt(E))return e.exit(d),se(E);V(E,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(E){if(E!==null&&E>=0&&Wt(E))return e.enter(g),e.consume(E),ae;V(E,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ae(E){if(E!==null&&E>=0&&Ui(E,{jsx:!0}))return e.consume(E),ae;if(E===46||E===47||E===62||E===123||Ze(E)||Pn(E))return e.exit(g),Z=z,Ce(E);V(E,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(E===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function z(E){if(E===46)return e.enter(h),e.consume(E),e.exit(h),Z=ge,Ce;if(E===47||E===62||E===123||E!==null&&E>=0&&Wt(E))return e.exit(d),se(E);V(E,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function U(E){if(E!==null&&E>=0&&Wt(E))return e.enter(b),e.consume(E),G;V(E,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(E===43||E!==null&&E>46&&E<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function G(E){if(E!==null&&E>=0&&Ui(E,{jsx:!0}))return e.consume(E),G;if(E===47||E===62||E===123||Ze(E)||Pn(E))return e.exit(b),Z=ee,Ce(E);V(E,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ee(E){if(E===47||E===62||E===123||E!==null&&E>=0&&Wt(E))return e.exit(d),se(E);V(E,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function se(E){if(E===47)return e.enter(c),e.consume(E),e.exit(c),Z=cn,Ce;if(E===62)return vt(E);if(E===123)return kh.call(q,e,me,y,m,p,r,i,o,!0,!1,s)(E);if(E!==null&&E>=0&&Wt(E))return e.enter(v),e.enter(k),e.enter(C),e.consume(E),Pe;V(E,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function me(E){return Z=se,Ce(E)}function Pe(E){if(E!==null&&E>=0&&Ui(E,{jsx:!0}))return e.consume(E),Pe;if(E===47||E===58||E===61||E===62||E===123||Ze(E)||Pn(E))return e.exit(C),Z=He,Ce(E);V(E,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function He(E){if(E===58)return e.enter(w),e.consume(E),e.exit(w),Z=Ye,Ce;if(E===61)return e.exit(k),e.enter(T),e.consume(E),e.exit(T),Z=un,Ce;if(E===47||E===62||E===123||Ze(E)||Pn(E)||E!==null&&E>=0&&Wt(E))return e.exit(k),e.exit(v),Z=se,Ce(E);V(E,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ye(E){if(E!==null&&E>=0&&Wt(E))return e.enter(S),e.consume(E),Ge;V(E,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ge(E){if(E!==null&&E>=0&&Ui(E,{jsx:!0}))return e.consume(E),Ge;if(E===47||E===61||E===62||E===123||Ze(E)||Pn(E))return e.exit(S),e.exit(k),Z=Qe,Ce(E);V(E,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Qe(E){if(E===61)return e.enter(T),e.consume(E),e.exit(T),Z=un,Ce;if(E===47||E===62||E===123||E!==null&&E>=0&&Wt(E))return e.exit(v),se(E);V(E,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function un(E){if(E===34||E===39)return e.enter(P),e.enter(F),e.consume(E),e.exit(F),Q=E,Ft;if(E===123)return kh.call(q,e,bt,O,B,H,r,i,o,!1,!1,s)(E);V(E,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(E===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function bt(E){return e.exit(v),Z=se,Ce(E)}function Ft(E){return E===null&&V(E,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(Q)+"`"),E===Q?(e.enter(F),e.consume(E),e.exit(F),e.exit(P),e.exit(v),Q=void 0,Z=se,Ce):re(E)?(Z=Ft,Ce(E)):(e.enter(L),st(E))}function st(E){return E===null||E===Q||re(E)?(e.exit(L),Ft(E)):(e.consume(E),st)}function cn(E){if(E===62)return vt(E);V(E,"after self-closing slash","`>` to end the tag"+(E===42||E===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function vt(E){return e.enter(l),e.consume(E),e.exit(l),e.exit(a),t}function Ce(E){return re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),R):ye(E)||Pn(E)?(e.enter("esWhitespace"),Ct(E)):Z(E)}function Ct(E){return re(E)?(e.exit("esWhitespace"),Ce(E)):ye(E)||Pn(E)?(e.consume(E),Ct):(e.exit("esWhitespace"),Z(E))}function R(E){if(!s&&q.parser.lazy[q.now().line]){const le=new Ae("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",q.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw le.url=Sh+"#unexpected-lazy-line-in-container-expected-line-to-be",le}return Ce(E)}function V(E,le,pe){const Ne=new Ae("Unexpected "+(E===null?"end of file":"character `"+(E===96?"` ` `":String.fromCodePoint(E))+"` ("+q9(E)+")")+" "+le+", expected "+pe,q.now(),"micromark-extension-mdx-jsx:unexpected-"+(E===null?"eof":"character"));throw Ne.url=Sh+(E===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Ne}}function q9(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function Y9(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return t0.call(this,r,i,o,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function G9(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,o){const s=this;return a;function a(d){return l(d)}function l(d){return t0.call(s,r,u,o,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(d)}function u(d){return ye(d)?Se(r,c,"whitespace")(d):c(d)}function c(d){const f=s.parser.constructs.flow[123],h=Array.isArray(f)?f:f?[f]:[];let g;for(const x of h)if(x.name==="mdxFlowExpression"){g=x;break}return d===60?a(d):d===123&&g?r.attempt(g,c,o)(d):d===null||re(d)?i(d):o(d)}}}function X9(e){const t={},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:G9(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:Y9(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Q9(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const Eh={}.hasOwnProperty;function ek(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Eh.call(i,e)){const l=String(i[e]);s=Eh.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const tk={}.hasOwnProperty;function n0(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)n0(e,t.extensions[n]);for(r in t)if(tk.call(t,r))switch(r){case"extensions":break;case"unsafe":{Th(e[r],t[r]);break}case"join":{Th(e[r],t[r]);break}case"handlers":{nk(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Th(e,t){t&&e.push(...t)}function nk(e,t){t&&Object.assign(e,t)}function rk(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),ik);return i(),s}function ik(e,t,n){return">"+(n?"":" ")+e}function r0(e,t){return Ih(e,t.inConstruct,!0)&&!Ih(e,t.notInConstruct,!1)}function Ih(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Nh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
41
|
-
`&&r0(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
42
|
-
`}function ok(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function ku(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function sk(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ak(e,t,n,r){const i=sk(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ku(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(o,lk);return d(),f}const a=n.createTracker(r),l=i.repeat(Math.max(ok(o,i)+1,3)),u=n.enter("codeFenced");let c=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
|
|
43
|
-
`,encode:["`"],...a.current()})),d()}return c+=a.move(`
|
|
44
|
-
`),o&&(c+=a.move(o+`
|
|
45
|
-
`)),c+=a.move(l),u(),c}function lk(e,t,n){return(n?"":" ")+e}function od(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function uk(e,t,n,r){const i=od(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
46
|
-
`,...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function ck(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function lr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ys(e,t,n){const r=Si(e),i=Si(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}i0.peek=dk;function i0(e,t,n,r){const i=ck(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const u=l.charCodeAt(0),c=Ys(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(l=lr(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Ys(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+lr(d));const h=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+l+h}function dk(e,t,n){return n.options.emphasis||"*"}const sd=function(e){if(e==null)return pk;if(typeof e=="function")return $a(e);if(typeof e=="object")return Array.isArray(e)?fk(e):hk(e);if(typeof e=="string")return gk(e);throw new Error("Expected function, string, or object as test")};function fk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sd(e[n]);return $a(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function hk(e){const t=e;return $a(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function gk(e){return $a(t);function t(n){return n&&n.type===e}}function $a(e){return t;function t(n,r,i){return!!(mk(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function pk(){return!0}function mk(e){return e!==null&&typeof e=="object"&&"type"in e}const o0=[],xk=!0,Su=!1,yk="skip";function bk(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=sd(i),s=r?-1:1;a(e,void 0,[])();function a(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=o0,g,x,b;if((!t||o(l,u,c[c.length-1]||void 0))&&(h=vk(n(l,c)),h[0]===Su))return h;if("children"in l&&l.children){const y=l;if(y.children&&h[0]!==yk)for(x=(r?y.children.length:-1)+s,b=c.concat(y);x>-1&&x<y.children.length;){const m=y.children[x];if(g=a(m,x,b)(),g[0]===Su)return g;x=typeof g[1]=="number"?g[1]:x+s}}return h}}}function vk(e){return Array.isArray(e)?e:typeof e=="number"?[xk,e]:e==null?o0:[e]}function Ck(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),bk(e,o,a,i);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return s(l,d,c)}}const wk={};function ad(e,t){const n=wk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return s0(e,r,i)}function s0(e,t,n){if(_k(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mh(e.children,t,n)}return Array.isArray(e)?Mh(e,t,n):""}function Mh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=s0(e[i],t,n);return r.join("")}function _k(e){return!!(e&&typeof e=="object")}function a0(e,t){let n=!1;return Ck(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Su}),!!((!e.depth||e.depth<3)&&ad(e)&&(t.options.setext||n))}function kk(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(a0(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...o.current(),before:`
|
|
47
|
-
`,after:`
|
|
48
|
-
`});return d(),c(),f+`
|
|
49
|
-
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
50
|
-
`))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
51
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=lr(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}l0.peek=Sk;function l0(e){return e.value||""}function Sk(){return"<"}u0.peek=Ek;function u0(e,t,n,r){const i=od(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),s(),u}function Ek(){return"!"}c0.peek=Tk;function c0(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const u=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Tk(){return"!"}d0.peek=Ik;function d0(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let l;if(s.atBreak)for(;l=a.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function Ik(){return"`"}function f0(e,t){const n=ad(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}h0.peek=Nk;function h0(e,t,n,r){const i=od(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(f0(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),a(),u}function Nk(e,t,n){return f0(e,n)?"<":"["}g0.peek=Mk;function g0(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Mk(){return"["}function ld(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ak(e){const t=ld(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Ok(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function p0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Pk(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?Ok(n):ld(n);const a=e.ordered?s==="."?")":".":Ak(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),p0(n)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function Fk(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Lk(e,t,n,r){const i=Fk(n);let o=n.bulletCurrent||ld(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return l(),u;function c(d,f,h){return f?(h?"":" ".repeat(s))+d:(h?o:o+" ".repeat(s-o.length))+d}}function Dk(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const Rk=sd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $k(e,t,n,r){return(e.children.some(function(s){return Rk(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Bk(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}m0.peek=Hk;function m0(e,t,n,r){const i=Bk(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const u=l.charCodeAt(0),c=Ys(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(l=lr(u)+l.slice(1));const d=l.charCodeAt(l.length-1),f=Ys(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+lr(d));const h=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+l+h}function Hk(e,t,n){return n.options.strong||"*"}function Vk(e,t,n,r){return n.safe(e.value,r)}function zk(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wk(e,t,n){const r=(p0(n)+(n.options.ruleSpaces?" ":"")).repeat(zk(n));return n.options.ruleSpaces?r.slice(0,-1):r}const x0={blockquote:rk,break:Nh,code:ak,definition:uk,emphasis:i0,hardBreak:Nh,heading:kk,html:l0,image:u0,imageReference:c0,inlineCode:d0,link:h0,linkReference:g0,list:Pk,listItem:Lk,paragraph:Dk,root:$k,strong:m0,text:Vk,thematicBreak:Wk},jk=[Uk];function Uk(e,t,n,r){if(t.type==="code"&&ku(t,r)&&(e.type==="list"||e.type===t.type&&ku(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&a0(t,r))?void 0:n.spread?1:0}const _r=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Jk=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
52
|
-
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:_r},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
53
|
-
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:_r},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
54
|
-
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:_r},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
55
|
-
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
56
|
-
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
57
|
-
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:_r},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:_r},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:_r},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:_r},{atBreak:!0,character:"~"}];function y0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Kk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function b0(e){return e.replace(Kk,Zk)}function Zk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return y0(n.slice(o?2:1),o?16:10)}return Io(n)||e}function qk(e){return e.label||!e.identifier?e.label||"":b0(e.identifier)}function Yk(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Gk(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,a=n.before,l;r.push(-1);let u=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let g=t.handle.handlers[i[s+1].type];g&&g.peek&&(g=g.peek),d=g?g(i[s+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else d=n.after;o.length>0&&(a==="\r"||a===`
|
|
58
|
-
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",u=t.createTracker(n),u.move(o.join("")));let f=t.handle(c,e,t,{...u.current(),after:d,before:a});l&&l===f.slice(0,1)&&(f=lr(l.charCodeAt(0))+f.slice(1));const h=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,l=void 0,h&&(o.length>0&&h.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+lr(a.charCodeAt(0))),h.after&&(l=d)),u.move(f),o.push(f),a=f.slice(-1)}return r.pop(),o.join("")}function Xk(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<i.length;){const l=i[a];r[r.length-1]=a,s.push(o.move(t.handle(l,e,t,{before:`
|
|
59
|
-
`,after:`
|
|
60
|
-
`,...o.current()}))),l.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(Qk(l,i[a+1],e,t)))}return r.pop(),s.join("")}function Qk(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
|
|
61
|
-
`.repeat(1+o);if(o===!1)return`
|
|
62
|
-
|
|
63
|
-
<!---->
|
|
64
|
-
|
|
65
|
-
`}return`
|
|
66
|
-
|
|
67
|
-
`}const e3=/\r?\n|\r/g;function t3(e,t){const n=[];let r=0,i=0,o;for(;o=e3.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function n3(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={};let a=-1;for(;++a<e.unsafe.length;){const c=e.unsafe[a];if(!r0(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(r);){const h="before"in c||!!c.atBreak,g="after"in c,x=f.index+(h?f[1].length:0);i.includes(x)?(s[x].before&&!h&&(s[x].before=!1),s[x].after&&!g&&(s[x].after=!1)):(i.push(x),s[x]={before:h,after:g})}}i.sort(r3);let l=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const c=i[a];c<l||c>=u||c+1<u&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(l!==c&&o.push(Ah(r.slice(l,c),"\\")),l=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(lr(r.charCodeAt(c))),l++))}return o.push(Ah(r.slice(l,u),n.after)),o.join("")}function r3(e,t){return e-t}function Ah(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let s=-1,a=0,l;for(;l=n.exec(o);)r.push(l.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function i3(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:r}}function a(u){r+=u}function l(u){const c=u||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return i+=d.length-1,o=d.length===1?o+f.length:1+f.length+r,c}}function v0(e,t){const n=t||{},r={associationId:qk,containerPhrasing:l3,containerFlow:u3,createTracker:i3,compilePattern:Yk,enter:o,handlers:{...x0},handle:void 0,indentLines:t3,indexStack:[],join:[...jk],options:{},safe:c3,stack:[],unsafe:[...Jk]};n0(r,n),r.options.tightDefinitions&&r.join.push(a3),r.handle=ek("type",{invalid:o3,unknown:s3,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
|
|
68
|
-
`,after:`
|
|
69
|
-
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
70
|
-
`),i;function o(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function o3(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function s3(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function a3(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function l3(e,t){return Gk(e,this,t)}function u3(e,t){return Xk(e,this,t)}function c3(e,t){return n3(this,e,t)}const d3=["mdxJsxTextElement","mdxJsxFlowElement"];function C0(e){return d3.includes(e.type)&&f3.includes(e.name.toLowerCase())}const f3=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function h3(e,t){const n=Oh(e),r=Oh(t),i={...n,...r};return g3(i)}function Oh(e){const t={};return e.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,o]=r.split(":").map(s=>s.trim());t[i]=o}),t}function g3(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}function p3(e){return e.children instanceof Array}function m3({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const s=new Set,a=new Map;t=t.sort((y,m)=>(m.priority??0)-(y.priority??0)),d(e,null);function l(y,m){s.add(y),m&&a.set(y,{...m})}function u(y,m){if(o===null)return o=m,o;if(!p3(y))throw new Error("Attempting to append children to a non-parent");const p=y.children,v=p.at(-1);if(v){const k=t.find(C=>{var w;return(w=C.shouldJoin)==null?void 0:w.call(C,v,m)});if(k){const C=k.join(v,m);return p.splice(p.length-1,1,C),C}}return p.push(m),m}function c(y,m){y.getChildren().forEach(p=>{d(p,m)})}function d(y,m,p=null){var v;const k=t.find((C,w)=>{var S;return p?.has(w)?!1:(S=C.testLexicalNode)==null?void 0:S.call(C,y)});if(!k)throw new Error(`no lexical visitor found for ${y.getType()}`,{cause:y});(v=k.visitLexicalNode)==null||v.call(k,{lexicalNode:y,mdastParent:m,actions:{addAndStepInto(C,w={},S=!0){const T={type:C,...w,...S?{children:[]}:{}};u(m,T),D(y)&&S&&c(y,T)},appendToParent:u,visitChildren:c,visit:d,registerReferredComponent:l,nextVisitor(){d(y,m,(p??new Set).add(t.indexOf(k)))}}})}if(o===null)throw new Error("traversal ended with no root element");const f=new Map,h=new Map;for(const y of s){const m=n.find(p=>p.name===y)??a.get(y)??n.find(p=>p.name==="*");if(!m)throw new Error(`Component ${y} is used but not imported`);if(m.source)if(m.defaultExport)h.set(y,m.source);else{const{source:p}=m,v=f.get(p);v?v.push(y):f.set(p,[y])}}if(!i){for(const[y,m]of f.entries()){const p=m.filter(v=>a.has(v));p.length>0?f.set(y,p):f.delete(y)}for(const y of h.keys())a.has(y)||h.delete(y)}const g=Array.from(f).map(([y,m])=>({type:"mdxjsEsm",value:`import { ${m.join(", ")} } from '${y}'`}));g.push(...Array.from(h).map(([y,m])=>({type:"mdxjsEsm",value:`import ${y} from '${m}'`})));const x=o,b=x.children.find(y=>y.type==="yaml");return b?x.children.splice(x.children.indexOf(b)+1,0,...g):x.children.unshift(...g),ks(x,[]),w0(x),r||_0(x),x}function w0(e){if("children"in e&&e.children.length>0){if(C0(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=h3(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{w0(t)})}}function _0(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),_0(r))}),t.children=n}}const Ph=/\s+$/,Fh=/^\s+/;function ks(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if(n?.type==="text"){const i=n.value.match(Ph);if(i){n.value=n.value.replace(Ph,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),ks(o,t.slice(0,-1)))}}const r=e.children.at(0);if(r?.type==="text"){const i=r.value.match(Fh);if(i){r.value=r.value.replace(Fh,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),ks(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{ks(r,[...t,n])})}}function x3({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return v0(m3({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
|
|
71
|
-
`}const Lh={}.hasOwnProperty;function y3(e){const t={};let n=-1;for(;++n<e.length;)b3(t,e[n]);return t}function b3(e,t){let n;for(n in t){const i=(Lh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Lh.call(i,s)||(i[s]=[]);const a=o[s];v3(i[s],Array.isArray(a)?a:a?[a]:[])}}}function v3(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pt(e,0,0,r)}function gi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const C3={tokenize:w3};function w3(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Se(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return re(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const _3={tokenize:k3},Dh={tokenize:S3};function k3(e){const t=this,n=[];let r=0,i,o,s;return a;function a(p){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,l,u)(p)}return u(p)}function l(p){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const v=t.events.length;let k=v,C;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){C=t.events[k][1].end;break}y(r);let w=v;for(;w<t.events.length;)t.events[w][1].end={...C},w++;return Pt(t.events,k+1,0,t.events.slice(v)),t.events.length=w,u(p)}return a(p)}function u(p){if(r===n.length){if(!i)return f(p);if(i.currentConstruct&&i.currentConstruct.concrete)return g(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dh,c,d)(p)}function c(p){return i&&m(),y(r),f(p)}function d(p){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(p)}function f(p){return t.containerState={},e.attempt(Dh,h,g)(p)}function h(p){return r++,n.push([t.currentConstruct,t.containerState]),f(p)}function g(p){if(p===null){i&&m(),y(0),e.consume(p);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(p)}function x(p){if(p===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(p);return}return re(p)?(e.consume(p),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(p),x)}function b(p,v){const k=t.sliceStream(p);if(v&&k.push(null),p.previous=o,o&&(o.next=p),o=p,i.defineSkip(p.start),i.write(k),t.parser.lazy[p.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const w=t.events.length;let S=w,T,P;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(T){P=t.events[S][1].end;break}T=!0}for(y(r),C=w;C<t.events.length;)t.events[C][1].end={...P},C++;Pt(t.events,S+1,0,t.events.slice(w)),t.events.length=C}}function y(p){let v=n.length;for(;v-- >p;){const k=n[v];t.containerState=k[1],k[0].exit.call(t,e)}n.length=p}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function S3(e,t,n){return Se(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Eu={name:"attention",resolveAll:E3,tokenize:T3};function E3(e,t){let n=-1,r,i,o,s,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Rh(d,-l),Rh(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Dt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Dt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Dt(u,Ra(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Dt(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Dt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function T3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Si(r);let o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;const u=e.exit("attentionSequence"),c=Si(l),d=!c||c===2&&i||n.includes(l),f=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?d:d&&(i||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(l)}}function Rh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const I3={name:"autolink",tokenize:N3};function N3(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return pn(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||Yt(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||Yt(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Cu(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):e9(h)?(e.consume(h),u):n(h)}function c(h){return Yt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Yt(h))&&r++<63){const g=h===45?f:d;return e.consume(h),g}return n(h)}}const Ba={partial:!0,tokenize:M3};function M3(e,t,n){return r;function r(o){return ye(o)?Se(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||re(o)?t(o):n(o)}}const k0={continuation:{tokenize:O3},exit:P3,name:"blockQuote",tokenize:A3};function A3(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return ye(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function O3(e,t,n){const r=this;return i;function i(s){return ye(s)?Se(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(k0,t,n)(s)}}function P3(e){e.exit("blockQuote")}const S0={name:"characterEscape",tokenize:F3};function F3(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return n9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const E0={name:"characterReference",tokenize:L3};function L3(e,t,n){const r=this;let i=0,o,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Yt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=t9,c):(e.enter("characterReferenceValue"),o=7,s=wu,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===Yt&&!Io(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const $h={partial:!0,tokenize:R3},Bh={concrete:!0,name:"codeFenced",tokenize:D3};function D3(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,s=0,a;return l;function l(C){return u(C)}function u(C){const w=r.events[r.events.length-1];return o=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(C)}function c(C){return C===a?(s++,e.consume(C),c):s<3?n(C):(e.exit("codeFencedFenceSequence"),ye(C)?Se(e,d,"whitespace")(C):d(C))}function d(C){return C===null||re(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check($h,x,v)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||re(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):ye(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Se(e,h,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),f)}function h(C){return C===null||re(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||re(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===a?n(C):(e.consume(C),g)}function x(C){return e.attempt(i,v,b)(C)}function b(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&ye(C)?Se(e,m,"linePrefix",o+1)(C):m(C)}function m(C){return C===null||re(C)?e.check($h,x,v)(C):(e.enter("codeFlowValue"),p(C))}function p(C){return C===null||re(C)?(e.exit("codeFlowValue"),m(C)):(e.consume(C),p)}function v(C){return e.exit("codeFenced"),t(C)}function k(C,w,S){let T=0;return P;function P(H){return C.enter("lineEnding"),C.consume(H),C.exit("lineEnding"),F}function F(H){return C.enter("codeFencedFence"),ye(H)?Se(C,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):L(H)}function L(H){return H===a?(C.enter("codeFencedFenceSequence"),O(H)):S(H)}function O(H){return H===a?(T++,C.consume(H),O):T>=s?(C.exit("codeFencedFenceSequence"),ye(H)?Se(C,B,"whitespace")(H):B(H)):S(H)}function B(H){return H===null||re(H)?(C.exit("codeFencedFence"),w(H)):S(H)}}}function R3(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Tl={name:"codeIndented",tokenize:B3},$3={partial:!0,tokenize:H3};function B3(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Se(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):re(u)?e.attempt($3,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||re(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function H3(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Se(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):re(s)?i(s):n(s)}}const V3={name:"codeText",previous:W3,resolve:z3,tokenize:j3};function z3(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function W3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function j3(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||re(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class U3{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ji(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ji(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ji(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ji(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ji(this.left,n.reverse())}}}function Ji(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function T0(e){const t={};let n=-1,r,i,o,s,a,l,u;const c=new U3(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,J3(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return Pt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function J3(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],u={};let c,d,f=-1,h=n,g=0,x=0;const b=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(x=f+1,b.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),f=b.length;f--;){const y=a.slice(b[f],b[f+1]),m=o.pop();l.push([m,m+y.length-1]),e.splice(m,2,y)}for(l.reverse(),f=-1;++f<l.length;)u[g+l[f][0]]=g+l[f][1],g+=l[f][1]-l[f][0]-1;return u}const K3={resolve:q3,tokenize:Y3},Z3={partial:!0,tokenize:G3};function q3(e){return T0(e),e}function Y3(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):re(a)?e.check(Z3,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function G3(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Se(e,o,"linePrefix")}function o(s){if(s===null||re(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function I0(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||Cu(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),f(y)):y===null||y===60||re(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!c&&(y===null||y===41||Ze(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,x):y===41?(e.consume(y),c--,x):y===null||y===32||y===40||Cu(y)?n(y):(e.consume(y),y===92?b:x)}function b(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function N0(e,t,n,r,i,o){const s=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):re(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||re(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!ye(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function M0(e,t,n,r,i,o){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,l):n(f)}function l(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),u(f))}function u(f){return f===s?(e.exit(o),l(s)):f===null?n(f):re(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Se(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||re(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function uo(e,t){let n;return r;function r(i){return re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ye(i)?Se(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const X3={name:"definition",tokenize:e7},Q3={partial:!0,tokenize:t7};function e7(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return N0.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=gi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Ze(h)?uo(e,u)(h):u(h)}function u(h){return I0(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(Q3,d,d)(h)}function d(h){return ye(h)?Se(e,f,"whitespace")(h):f(h)}function f(h){return h===null||re(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function t7(e,t,n){return r;function r(a){return Ze(a)?uo(e,i)(a):n(a)}function i(a){return M0(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return ye(a)?Se(e,s,"whitespace")(a):s(a)}function s(a){return a===null||re(a)?t(a):n(a)}}const n7={name:"hardBreakEscape",tokenize:r7};function r7(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const i7={name:"headingAtx",resolve:o7,tokenize:s7};function o7(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function s7(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Ze(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||re(c)?(e.exit("atxHeading"),t(c)):ye(c)?Se(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Ze(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const a7=["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"],Hh=["pre","script","style","textarea"],l7={concrete:!0,name:"htmlFlow",resolveTo:d7,tokenize:f7},u7={partial:!0,tokenize:g7},c7={partial:!0,tokenize:h7};function d7(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function f7(e,t,n){const r=this;let i,o,s,a,l;return u;function u(A){return c(A)}function c(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),f):A===47?(e.consume(A),o=!0,x):A===63?(e.consume(A),i=3,r.interrupt?t:N):pn(A)?(e.consume(A),s=String.fromCharCode(A),b):n(A)}function f(A){return A===45?(e.consume(A),i=2,h):A===91?(e.consume(A),i=5,a=0,g):pn(A)?(e.consume(A),i=4,r.interrupt?t:N):n(A)}function h(A){return A===45?(e.consume(A),r.interrupt?t:N):n(A)}function g(A){const fe="CDATA[";return A===fe.charCodeAt(a++)?(e.consume(A),a===fe.length?r.interrupt?t:L:g):n(A)}function x(A){return pn(A)?(e.consume(A),s=String.fromCharCode(A),b):n(A)}function b(A){if(A===null||A===47||A===62||Ze(A)){const fe=A===47,ge=s.toLowerCase();return!fe&&!o&&Hh.includes(ge)?(i=1,r.interrupt?t(A):L(A)):a7.includes(s.toLowerCase())?(i=6,fe?(e.consume(A),y):r.interrupt?t(A):L(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):o?m(A):p(A))}return A===45||Yt(A)?(e.consume(A),s+=String.fromCharCode(A),b):n(A)}function y(A){return A===62?(e.consume(A),r.interrupt?t:L):n(A)}function m(A){return ye(A)?(e.consume(A),m):P(A)}function p(A){return A===47?(e.consume(A),P):A===58||A===95||pn(A)?(e.consume(A),v):ye(A)?(e.consume(A),p):P(A)}function v(A){return A===45||A===46||A===58||A===95||Yt(A)?(e.consume(A),v):k(A)}function k(A){return A===61?(e.consume(A),C):ye(A)?(e.consume(A),k):p(A)}function C(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,w):ye(A)?(e.consume(A),C):S(A)}function w(A){return A===l?(e.consume(A),l=null,T):A===null||re(A)?n(A):(e.consume(A),w)}function S(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Ze(A)?k(A):(e.consume(A),S)}function T(A){return A===47||A===62||ye(A)?p(A):n(A)}function P(A){return A===62?(e.consume(A),F):n(A)}function F(A){return A===null||re(A)?L(A):ye(A)?(e.consume(A),F):n(A)}function L(A){return A===45&&i===2?(e.consume(A),q):A===60&&i===1?(e.consume(A),Z):A===62&&i===4?(e.consume(A),oe):A===63&&i===3?(e.consume(A),N):A===93&&i===5?(e.consume(A),X):re(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(u7,ce,O)(A)):A===null||re(A)?(e.exit("htmlFlowData"),O(A)):(e.consume(A),L)}function O(A){return e.check(c7,B,ce)(A)}function B(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),H}function H(A){return A===null||re(A)?O(A):(e.enter("htmlFlowData"),L(A))}function q(A){return A===45?(e.consume(A),N):L(A)}function Z(A){return A===47?(e.consume(A),s="",Q):L(A)}function Q(A){if(A===62){const fe=s.toLowerCase();return Hh.includes(fe)?(e.consume(A),oe):L(A)}return pn(A)&&s.length<8?(e.consume(A),s+=String.fromCharCode(A),Q):L(A)}function X(A){return A===93?(e.consume(A),N):L(A)}function N(A){return A===62?(e.consume(A),oe):A===45&&i===2?(e.consume(A),N):L(A)}function oe(A){return A===null||re(A)?(e.exit("htmlFlowData"),ce(A)):(e.consume(A),oe)}function ce(A){return e.exit("htmlFlow"),t(A)}}function h7(e,t,n){const r=this;return i;function i(s){return re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function g7(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ba,t,n)}}const p7={name:"htmlText",tokenize:m7};function m7(e,t,n){const r=this;let i,o,s;return a;function a(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),l}function l(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),k):N===63?(e.consume(N),p):pn(N)?(e.consume(N),S):n(N)}function u(N){return N===45?(e.consume(N),c):N===91?(e.consume(N),o=0,g):pn(N)?(e.consume(N),m):n(N)}function c(N){return N===45?(e.consume(N),h):n(N)}function d(N){return N===null?n(N):N===45?(e.consume(N),f):re(N)?(s=d,Z(N)):(e.consume(N),d)}function f(N){return N===45?(e.consume(N),h):d(N)}function h(N){return N===62?q(N):N===45?f(N):d(N)}function g(N){const oe="CDATA[";return N===oe.charCodeAt(o++)?(e.consume(N),o===oe.length?x:g):n(N)}function x(N){return N===null?n(N):N===93?(e.consume(N),b):re(N)?(s=x,Z(N)):(e.consume(N),x)}function b(N){return N===93?(e.consume(N),y):x(N)}function y(N){return N===62?q(N):N===93?(e.consume(N),y):x(N)}function m(N){return N===null||N===62?q(N):re(N)?(s=m,Z(N)):(e.consume(N),m)}function p(N){return N===null?n(N):N===63?(e.consume(N),v):re(N)?(s=p,Z(N)):(e.consume(N),p)}function v(N){return N===62?q(N):p(N)}function k(N){return pn(N)?(e.consume(N),C):n(N)}function C(N){return N===45||Yt(N)?(e.consume(N),C):w(N)}function w(N){return re(N)?(s=w,Z(N)):ye(N)?(e.consume(N),w):q(N)}function S(N){return N===45||Yt(N)?(e.consume(N),S):N===47||N===62||Ze(N)?T(N):n(N)}function T(N){return N===47?(e.consume(N),q):N===58||N===95||pn(N)?(e.consume(N),P):re(N)?(s=T,Z(N)):ye(N)?(e.consume(N),T):q(N)}function P(N){return N===45||N===46||N===58||N===95||Yt(N)?(e.consume(N),P):F(N)}function F(N){return N===61?(e.consume(N),L):re(N)?(s=F,Z(N)):ye(N)?(e.consume(N),F):T(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,O):re(N)?(s=L,Z(N)):ye(N)?(e.consume(N),L):(e.consume(N),B)}function O(N){return N===i?(e.consume(N),i=void 0,H):N===null?n(N):re(N)?(s=O,Z(N)):(e.consume(N),O)}function B(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||Ze(N)?T(N):(e.consume(N),B)}function H(N){return N===47||N===62||Ze(N)?T(N):n(N)}function q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function Z(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return ye(N)?Se(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):X(N)}function X(N){return e.enter("htmlTextData"),s(N)}}const ud={name:"labelEnd",resolveAll:v7,resolveTo:C7,tokenize:w7},x7={tokenize:_7},y7={tokenize:k7},b7={tokenize:S7};function v7(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Pt(e,0,e.length,n),e}function C7(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=Dt(a,e.slice(o+1,o+r+3)),a=Dt(a,[["enter",c,t]]),a=Dt(a,Ra(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=Dt(a,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),a=Dt(a,e.slice(s+1)),a=Dt(a,[["exit",l,t]]),Pt(e,o,e.length,a),e}function w7(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(f){return o?o._inactive?d(f):(s=r.parser.defined.includes(gi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(x7,c,s?c:d)(f):f===91?e.attempt(y7,c,s?u:d)(f):s?c(f):d(f)}function u(f){return e.attempt(b7,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function _7(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ze(d)?uo(e,o)(d):o(d)}function o(d){return d===41?c(d):I0(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ze(d)?uo(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?M0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Ze(d)?uo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function k7(e,t,n){const r=this;return i;function i(a){return N0.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(gi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function S7(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const E7={name:"labelStartImage",resolveAll:ud.resolveAll,tokenize:T7};function T7(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const I7={name:"labelStartLink",resolveAll:ud.resolveAll,tokenize:N7};function N7(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Il={name:"lineEnding",tokenize:M7};function M7(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Se(e,t,"linePrefix")}}const Ss={name:"thematicBreak",tokenize:A7};function A7(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||re(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),ye(u)?Se(e,a,"whitespace")(u):a(u))}}const Tt={continuation:{tokenize:L7},exit:R7,name:"list",tokenize:F7},O7={partial:!0,tokenize:$7},P7={partial:!0,tokenize:D7};function F7(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:wu(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ss,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return wu(h)&&++s<10?(e.consume(h),l):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ba,r.interrupt?n:c,e.attempt(O7,f,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return ye(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function L7(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ba,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Se(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!ye(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(P7,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Se(e,e.attempt(Tt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function D7(e,t,n){const r=this;return Se(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function R7(e){e.exit(this.containerState.type)}function $7(e,t,n){const r=this;return Se(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!ye(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Vh={name:"setextUnderline",resolveTo:B7,tokenize:H7};function B7(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function H7(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),ye(u)?Se(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||re(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const V7={tokenize:z7};function z7(e){const t=this,n=e.attempt(Ba,r,e.attempt(this.parser.constructs.flowInitial,i,Se(e,e.attempt(this.parser.constructs.flow,i,e.attempt(K3,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const W7={resolveAll:O0()},j7=A0("string"),U7=A0("text");function A0(e){return{resolveAll:O0(e==="text"?J7:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function O0(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function J7(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)l=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const K7={42:Tt,43:Tt,45:Tt,48:Tt,49:Tt,50:Tt,51:Tt,52:Tt,53:Tt,54:Tt,55:Tt,56:Tt,57:Tt,62:k0},Z7={91:X3},q7={[-2]:Tl,[-1]:Tl,32:Tl},Y7={35:i7,42:Ss,45:[Vh,Ss],60:l7,61:Vh,95:Ss,96:Bh,126:Bh},G7={38:E0,92:S0},X7={[-5]:Il,[-4]:Il,[-3]:Il,33:E7,38:E0,42:Eu,60:[I3,p7],91:I7,92:[n7,S0],93:ud,95:Eu,96:V3},Q7={null:[Eu,W7]},eS={null:[42,95]},tS={null:[]},nS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eS,contentInitial:Z7,disable:tS,document:K7,flow:Y7,flowInitial:q7,insideSpan:Q7,string:G7,text:X7},Symbol.toStringTag,{value:"Module"}));function rS(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[];const l={attempt:w(k),check:w(C),consume:m,enter:p,exit:v,interrupt:w(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function d(F){return s=Dt(s,F),b(),s[s.length-1]!==null?[]:(S(t,0),u.events=Ra(o,u.events,u),u.events)}function f(F,L){return oS(h(F),L)}function h(F){return iS(s,F)}function g(){const{_bufferIndex:F,_index:L,line:O,column:B,offset:H}=r;return{_bufferIndex:F,_index:L,line:O,column:B,offset:H}}function x(F){i[F.line]=F.column,P()}function b(){let F;for(;r._index<s.length;){const L=s[r._index];if(typeof L=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<L.length;)y(L.charCodeAt(r._bufferIndex));else y(L)}}function y(F){c=c(F)}function m(F){re(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,P()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function p(F,L){const O=L||{};return O.type=F,O.start=g(),u.events.push(["enter",O,u]),a.push(O),O}function v(F){const L=a.pop();return L.end=g(),u.events.push(["exit",L,u]),L}function k(F,L){S(F,L.from)}function C(F,L){L.restore()}function w(F,L){return O;function O(B,H,q){let Z,Q,X,N;return Array.isArray(B)?ce(B):"tokenize"in B?ce([B]):oe(B);function oe(ae){return z;function z(U){const G=U!==null&&ae[U],ee=U!==null&&ae.null,se=[...Array.isArray(G)?G:G?[G]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return ce(se)(U)}}function ce(ae){return Z=ae,Q=0,ae.length===0?q:A(ae[Q])}function A(ae){return z;function z(U){return N=T(),X=ae,ae.partial||(u.currentConstruct=ae),ae.name&&u.parser.constructs.disable.null.includes(ae.name)?ge():ae.tokenize.call(L?Object.assign(Object.create(u),L):u,l,fe,ge)(U)}}function fe(ae){return F(X,N),H}function ge(ae){return N.restore(),++Q<Z.length?A(Z[Q]):q}}}function S(F,L){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&Pt(u.events,L,u.events.length-L,F.resolve(u.events.slice(L),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function T(){const F=g(),L=u.previous,O=u.currentConstruct,B=u.events.length,H=Array.from(a);return{from:B,restore:q};function q(){r=F,u.previous=L,u.currentConstruct=O,u.events.length=B,a=H,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function iS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function oS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
72
|
-
`;break}case-3:{s=`\r
|
|
73
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function sS(e){const r={constructs:y3([nS,...(e||{}).extensions||[]]),content:i(C3),defined:[],document:i(_3),flow:i(V7),lazy:{},string:i(j7),text:i(U7)};return r;function i(o){return s;function s(a){return rS(r,o,a)}}}function aS(e){for(;!T0(e););return e}const zh=/[\0\t\n\r]/g;function lS(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const l=[];let u,c,d,f,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(zh.lastIndex=d,u=zh.exec(o),f=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(f),!u){t=o.slice(d);break}if(h===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(o.slice(d,f)),e+=f-d),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const P0={}.hasOwnProperty;function uS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),cS(n)(aS(sS(n).document().write(lS()(e,t,!0))))}function cS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(bt),autolinkProtocol:T,autolinkEmail:T,atxHeading:o(Ye),blockQuote:o(ee),characterEscape:T,characterReference:T,codeFenced:o(se),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(se,s),codeText:o(me,s),codeTextData:T,data:T,codeFlowValue:T,definition:o(Pe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(He),hardBreakEscape:o(Ge),hardBreakTrailing:o(Ge),htmlFlow:o(Qe,s),htmlFlowData:T,htmlText:o(Qe,s),htmlTextData:T,image:o(un),label:s,link:o(bt),listItem:o(st),listItemValue:f,listOrdered:o(Ft,d),listUnordered:o(Ft),paragraph:o(cn),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Ye),strong:o(vt),thematicBreak:o(Ct)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:G,autolinkProtocol:U,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:ae,characterReference:z,codeFenced:l(b),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:P,codeIndented:l(y),codeText:l(H),codeTextData:P,data:P,definition:l(),definitionDestinationString:v,definitionLabelString:m,definitionTitleString:p,emphasis:l(),hardBreakEscape:l(L),hardBreakTrailing:l(L),htmlFlow:l(O),htmlFlowData:P,htmlText:l(B),htmlTextData:P,image:l(Z),label:X,labelText:Q,lineEnding:F,link:l(q),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:fe,resourceDestinationString:N,resourceTitleString:oe,resource:ce,setextHeading:l(S),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};F0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let V={type:"root",children:[]};const E={stack:[V],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:c,data:n},le=[];let pe=-1;for(;++pe<R.length;)if(R[pe][1].type==="listOrdered"||R[pe][1].type==="listUnordered")if(R[pe][0]==="enter")le.push(pe);else{const Ne=le.pop();pe=i(R,Ne,pe)}for(pe=-1;++pe<R.length;){const Ne=t[R[pe][0]];P0.call(Ne,R[pe][1].type)&&Ne[R[pe][1].type].call(Object.assign({sliceSerialize:R[pe][2].sliceSerialize},E),R[pe][1])}if(E.tokenStack.length>0){const Ne=E.tokenStack[E.tokenStack.length-1];(Ne[1]||Wh).call(E,void 0,Ne[0])}for(V.position={start:Xn(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:Xn(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)V=t.transforms[pe](V)||V;return V}function i(R,V,E){let le=V-1,pe=-1,Ne=!1,Ht,Vt,vr,Cr;for(;++le<=E;){const dt=R[le];switch(dt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{dt[0]==="enter"?pe++:pe--,Cr=void 0;break}case"lineEndingBlank":{dt[0]==="enter"&&(Ht&&!Cr&&!pe&&!vr&&(vr=le),Cr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Cr=void 0}if(!pe&&dt[0]==="enter"&&dt[1].type==="listItemPrefix"||pe===-1&&dt[0]==="exit"&&(dt[1].type==="listUnordered"||dt[1].type==="listOrdered")){if(Ht){let qn=le;for(Vt=void 0;qn--;){const ue=R[qn];if(ue[1].type==="lineEnding"||ue[1].type==="lineEndingBlank"){if(ue[0]==="exit")continue;Vt&&(R[Vt][1].type="lineEndingBlank",Ne=!0),ue[1].type="lineEnding",Vt=qn}else if(!(ue[1].type==="linePrefix"||ue[1].type==="blockQuotePrefix"||ue[1].type==="blockQuotePrefixWhitespace"||ue[1].type==="blockQuoteMarker"||ue[1].type==="listItemIndent"))break}vr&&(!Vt||vr<Vt)&&(Ht._spread=!0),Ht.end=Object.assign({},Vt?R[Vt][1].start:dt[1].end),R.splice(Vt||le,0,["exit",Ht,dt[2]]),le++,E++}if(dt[1].type==="listItemPrefix"){const qn={type:"listItem",_spread:!1,start:Object.assign({},dt[1].start),end:void 0};Ht=qn,R.splice(le,0,["enter",qn,dt[2]]),le++,E++,vr=void 0,Cr=!0}}}return R[V][1]._spread=Ne,E}function o(R,V){return E;function E(le){a.call(this,R(le),le),V&&V.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(R,V,E){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([V,E||void 0]),R.position={start:Xn(V.start),end:void 0}}function l(R){return V;function V(E){R&&R.call(this,E),u.call(this,E)}}function u(R,V){const E=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==R.type&&(V?V.call(this,R,le[0]):(le[1]||Wh).call(this,R,le[0]));else throw new Error("Cannot close `"+R.type+"` ("+Bn({start:R.start,end:R.end})+"): it’s not open");E.position.end=Xn(R.end)}function c(){return ad(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(R){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function h(){const R=this.resume(),V=this.stack[this.stack.length-1];V.lang=R}function g(){const R=this.resume(),V=this.stack[this.stack.length-1];V.meta=R}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R.replace(/(\r?\n|\r)$/g,"")}function m(R){const V=this.resume(),E=this.stack[this.stack.length-1];E.label=V,E.identifier=gi(this.sliceSerialize(R)).toLowerCase()}function p(){const R=this.resume(),V=this.stack[this.stack.length-1];V.title=R}function v(){const R=this.resume(),V=this.stack[this.stack.length-1];V.url=R}function k(R){const V=this.stack[this.stack.length-1];if(!V.depth){const E=this.sliceSerialize(R).length;V.depth=E}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(R){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function T(R){const E=this.stack[this.stack.length-1].children;let le=E[E.length-1];(!le||le.type!=="text")&&(le=Ce(),le.position={start:Xn(R.start),end:void 0},E.push(le)),this.stack.push(le)}function P(R){const V=this.stack.pop();V.value+=this.sliceSerialize(R),V.position.end=Xn(R.end)}function F(R){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const E=V.children[V.children.length-1];E.position.end=Xn(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(T.call(this,R),P.call(this,R))}function L(){this.data.atHardBreak=!0}function O(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R}function B(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R}function H(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R}function q(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=V,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function Z(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=V,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function Q(R){const V=this.sliceSerialize(R),E=this.stack[this.stack.length-2];E.label=b0(V),E.identifier=gi(V).toLowerCase()}function X(){const R=this.stack[this.stack.length-1],V=this.resume(),E=this.stack[this.stack.length-1];if(this.data.inReference=!0,E.type==="link"){const le=R.children;E.children=le}else E.alt=V}function N(){const R=this.resume(),V=this.stack[this.stack.length-1];V.url=R}function oe(){const R=this.resume(),V=this.stack[this.stack.length-1];V.title=R}function ce(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function fe(R){const V=this.resume(),E=this.stack[this.stack.length-1];E.label=V,E.identifier=gi(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ge(R){this.data.characterReferenceType=R.type}function ae(R){const V=this.sliceSerialize(R),E=this.data.characterReferenceType;let le;E?(le=y0(V,E==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Io(V);const pe=this.stack[this.stack.length-1];pe.value+=le}function z(R){const V=this.stack.pop();V.position.end=Xn(R.end)}function U(R){P.call(this,R);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(R)}function G(R){P.call(this,R);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(R)}function ee(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function me(){return{type:"inlineCode",value:""}}function Pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function He(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function un(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Ft(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function st(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function cn(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function Ce(){return{type:"text",value:""}}function Ct(){return{type:"thematicBreak"}}}function Xn(e){return{line:e.line,column:e.column,offset:e.offset}}function F0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?F0(e,r):dS(e,r)}}function dS(e,t){let n;for(n in t)if(P0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Wh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Bn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Bn({start:t.start,end:t.end})+") is still open")}function Ki(e){return e.children instanceof Array}class Tu extends Error{constructor(t,n){super(t),this.name="MarkdownParseError",this.cause=n}}class Iu extends Error{constructor(t){super(t),this.name="UnrecognizedMarkdownConstructError"}}function fS(e){const t=new Map;return e.type!=="root"?{importDeclarations:{}}:(e.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,o;(((o=(i=r.data)==null?void 0:i.estree)==null?void 0:o.body)??[]).forEach(s=>{s.type==="ImportDeclaration"&&s.specifiers.forEach(a=>{t.set(a.local.name,{source:`${s.source.value}`,defaultExport:a.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(t.entries())})}function hS({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var s;let a;try{a=uS(t,{extensions:r,mdastExtensions:i})}catch(l){throw l instanceof Error?new Tu(`Error parsing markdown: ${l.message}`,l):new Tu(`Error parsing markdown: ${l}`,l)}a.children.length===0&&a.children.push({type:"paragraph",children:[]}),((s=a.children.at(-1))==null?void 0:s.type)!=="paragraph"&&a.children.push({type:"paragraph",children:[]}),gS({root:e,mdastRoot:a,visitors:n,...o})}function gS({root:e,mdastRoot:t,visitors:n,...r}){const i=new WeakMap,o=new WeakMap,s=fS(t);n=n.sort((u,c)=>(c.priority??0)-(u.priority??0));function a(u,c){if(!Ki(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(d=>{l(d,c,u)})}function l(u,c,d,f=null){const h=n.find((g,x)=>f?.has(x)?!1:typeof g.testNode=="string"?g.testNode===u.type:g.testNode(u,r));if(!h)try{throw new Iu(`Unsupported markdown syntax: ${v0(u)}`)}catch{throw new Iu(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}h.visitNode({mdastNode:u,lexicalParent:c,mdastParent:d,descriptors:r,metaData:s,actions:{visitChildren:a,nextVisitor(){l(u,c,d,(f??new Set).add(n.indexOf(h)))},addAndStepInto(g){c.append(g),Ki(u)&&a(u,g)},addFormatting(g,x){x||Ki(u)&&(x=u),x&&i.set(x,g|(i.get(d)??0))},removeFormatting(g,x){x||Ki(u)&&(x=u),x&&i.set(x,g^(i.get(d)??0))},getParentFormatting(){return i.get(d)??0},addStyle(g,x){x||Ki(u)&&(x=u),x&&o.set(x,g)},getParentStyle(){return o.get(d)??""}}})}l(t,e,null)}var pS=Object.defineProperty,mS=(e,t,n)=>t in e?pS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nl=(e,t,n)=>(mS(e,typeof t!="symbol"?t+"":t,n),n);const jh="generic-html";class Yo extends an{constructor(t,n,r,i){super(i),Nl(this,"__tag"),Nl(this,"__nodeType"),Nl(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return jh}static clone(t){return new Yo(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=L0(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:jh,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function L0(e,t,n){return Nt(new Yo(e,t,n))}function xS(e){return e instanceof Yo}const yS={testLexicalNode:xS,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},bS={testLexicalNode:Xt,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
|
|
74
|
-
`})}},vS={testLexicalNode:Vc,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},CS={testLexicalNode:ut,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}},co=1,fo=2,Es=4,ho=8,cd=16,Ts=32,Is=64;function Uh(e){return e.type==="text"}const wS=["u","span","sub","sup"],_S={shouldJoin:(e,t)=>{if(["text","emphasis","strong"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&wS.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},join(e,t){return Uh(e)&&Uh(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:J,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=J(r)?r.getFormat():0,o=e.getTextContent(),s=e.getFormat(),a=e.getStyle();let l=t;if(a&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:a}]})),i&s&ho&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&s&Is&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&s&Ts&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&s&fo&&(l=n.appendToParent(l,{type:"emphasis",children:[]})),i&s&co&&(l=n.appendToParent(l,{type:"strong",children:[]})),i&s&Es&&(l=n.appendToParent(l,{type:"delete",children:[]})),s&ho&&!(i&ho)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),s&Is&&!(i&Is)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),s&Ts&&!(i&Ts)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&fo&&!(i&fo)&&(l=n.appendToParent(l,{type:"emphasis",children:[]})),s&co&&!(i&co)&&(l=n.appendToParent(l,{type:"strong",children:[]})),s&Es&&!(i&Es)&&(l=n.appendToParent(l,{type:"delete",children:[]})),s&cd){n.appendToParent(l,{type:"inlineCode",value:o});return}n.appendToParent(l,{type:"text",value:o})}},kS={testNode:"break",visitNode:function({lexicalParent:e}){e.append(Qt())}};function gs(e,t){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===e,visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:n=>n.type==="html"&&n.value===`<${e}>`,visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:n=>n.type==="html"&&n.value===`</${e}>`,visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}const SS={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Es),t.visitChildren(e,n)}},ES={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Re(e.value).setFormat(t.getParentFormatting()|cd))}},TS={testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(fo),t.visitChildren(e,n)}},IS={testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(co),t.visitChildren(e,n)}},NS=[TS,IS,...gs("u",ho),...gs("code",cd),ES,SS,...gs("sup",Is),...gs("sub",Ts)],MS={testNode:C0,visitNode:function({mdastNode:e,actions:t,lexicalParent:n}){e.name==="span"&&e.attributes.length===1&&e.attributes[0].type==="mdxJsxAttribute"&&e.attributes[0].name==="style"?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto(L0(e.name,e.type,e.attributes))},priority:-100},AS=["listitem","quote","admonition"],OS={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){AS.includes(t.getType())?n.visitChildren(e,t):n.addAndStepInto(Ee())}},PS={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},FS={testNode:"text",visitNode({mdastNode:e,actions:t}){const n=Re(e.value);n.setFormat(t.getParentFormatting());const r=t.getParentStyle();r!==""&&n.setStyle(r),t.addAndStepInto(n)}},LS=()=>_.createElement(D_,{externalHistoryState:Ot(l8)}),jt={eof:null,exclamationMark:33,dash:45,greaterThan:62},kr={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function DS(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}const Jh=(e,t,n)=>{return r;function r(g){return e.enter("comment"),e.consume(g),i}function i(g){return g===jt.exclamationMark?(e.consume(g),o):n(g)}function o(g){return g===jt.dash?(e.consume(g),s):n(g)}function s(g){return g===jt.dash?(e.consume(g),a):n(g)}function a(g){return g===jt.greaterThan?n(g):re(g)?c(g):(e.enter(kr.data),g===jt.dash?(e.consume(g),l):u(g))}function l(g){return g===jt.greaterThan?n(g):u(g)}function u(g){return g===jt.eof?n(g):g===jt.dash?(e.consume(g),f):re(g)?(e.exit(kr.data),c(g)):(e.consume(g),u)}function c(g){return e.enter(kr.lineEnding),e.consume(g),e.exit(kr.lineEnding),Se(e,d,kr.linePrefix)}function d(g){return re(g)?c(g):(e.enter(kr.data),u(g))}function f(g){return g===jt.dash?(e.consume(g),h):u(g)}function h(g){return g===jt.greaterThan?(e.exit(kr.data),e.enter("commentEnd"),e.consume(g),e.exit("commentEnd"),e.exit("comment"),t(g)):g===jt.dash?(e.consume(g),h):u(g)}},RS={flow:{60:{tokenize:Jh,concrete:!0}},text:{60:{tokenize:Jh}}},$S="_bold_1tncs_10",BS="_italic_1tncs_14",HS="_underline_1tncs_18",VS="_strikethrough_1tncs_34",zS="_underlineStrikethrough_1tncs_38",WS="_subscript_1tncs_42",jS="_superscript_1tncs_47",US="_code_1tncs_52",JS="_nestedListItem_1tncs_59",KS="_listitem_1tncs_69",ZS="_listItemChecked_1tncs_73",qS="_listItemUnchecked_1tncs_74",YS="_admonitionDanger_1tncs_151",GS="_admonitionInfo_1tncs_152",XS="_admonitionNote_1tncs_153",QS="_admonitionTip_1tncs_154",e8="_admonitionCaution_1tncs_155",at={bold:$S,italic:BS,underline:HS,strikethrough:VS,underlineStrikethrough:zS,subscript:WS,superscript:jS,code:US,nestedListItem:JS,listitem:KS,listItemChecked:ZS,listItemUnchecked:qS,admonitionDanger:YS,admonitionInfo:GS,admonitionNote:XS,admonitionTip:QS,admonitionCaution:e8},dd={text:{bold:at.bold,italic:at.italic,underline:at.underline,code:at.code,strikethrough:at.strikethrough,subscript:at.subscript,superscript:at.superscript,underlineStrikethrough:at.underlineStrikethrough},list:{listitem:at.listitem,listitemChecked:at.listItemChecked,listitemUnchecked:at.listItemUnchecked,nested:{listitem:at.nestedListItem}},admonition:{danger:at.admonitionDanger,info:at.admonitionInfo,note:at.admonitionNote,tip:at.admonitionTip,caution:at.admonitionCaution}},fd=Jn(),gr=ne(null),qe=ne(null),Nu=ne(""),Mu=ne(!0),nn=ne(!1,e=>{e.sub(e.pipe(nn,We(gr)),([t,n])=>{n?.setEditable(!t)})}),Au=ne(""),Kh=ne(!1),No=ne(!1),D0=ne(0),Gs=ne(null),Ou=it(e=>{e.link(e.pipe(Gs,Ro(t=>t!==null)),Ou)}),R0=it(e=>{e.sub(e.pipe(R0,We(qe)),([t,n])=>{n?.dispatchCommand($n,t)})}),Ei=ne(null,e=>{e.sub(e.pipe(Ei,We(qe)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:fr(r,a=>{const l=a.getParent();return l!==null&&je(l)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null){const a=Da(i)?i.getTag():i.getType();e.pub(ix,a)}})}),$0=ne(""),zr=ne(""),Xs=ne(!1),Ha=it(e=>{e.link(zr,Ha),e.sub($0,t=>{e.pubIn({[Xs]:!0,[zr]:t})})}),Pu=it(e=>{e.link(e.pipe(Ha,We(Ru),Ro(([,t])=>!t),li(([t])=>t)),Pu)}),B0=ne([]),H0=ne([]),V0=ne([]),z0=ne([]),W0=ne([]),j0=ne([]),Fu=ne({}),t8=ne(!1),U0=ne([]),n8=ne([]),Va=ne([]),Go=ne(null),r8=ne(null),pr=Et(H0),Wn=Et(B0),Lu=Et(V0),Du=Et(z0),mr=Et(W0),J0=Et(j0),Ru=ne(!1),hd=it(e=>{e.sub(e.pipe(hd,We(zr,gr,No),Ro(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(Ru,!0),n?.update(()=>{Le().clear(),gd(e,Le(),t),r?n.focus():Xe(null)},{onUpdate:()=>{e.pub(Ru,!1)}})})}),K0=it(e=>{e.sub(e.pipe(K0,We(qe,No)),([t,n,r])=>{n?.update(()=>{const i=j();if(i!==null){const o={children:[],append(s){this.children.push(s)},getType(){return i.getNodes()[0].getType()}};gd(e,o,t),Ai(o.children)}r?n.focus():Xe(null)})})});function Z0(){return Pm((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}const q0=ne([],e=>{e.pipe(e.combine(q0,qe),Z0())}),Y0=ne([],e=>{e.pipe(e.combine(Y0,gr),Z0())}),i8=ne(null),$u=it(),In=ne(e=>{throw new Error(`No icon component for ${e}`)});function Et(e,t){return it((n,r)=>{n.changeWith(e,r,(i,o)=>{Array.isArray(o)||(o=[o]);let s=i;for(const a of o)i.includes(a)||(s=[...s,a]);return s}),t?.(n,r)})}function G0(e){const t=j();$(t)&&e.pubIn({[Ei]:t,[D0]:t.format})}const X0=Et(Y0,(e,t)=>{e.pub(t,[n=>n.registerCommand(xa,(r,i)=>(e.pubIn({[qe]:i,[No]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(i8,{rootNode:Le(),editorType:"lexical"})}),G0(e),!1),zn),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(Gs)!==null||r.size===0&&i.size===0)return;let a;o.read(()=>{Le().getLastChild()instanceof jo&&n.update(()=>{Le().append(Ee())},{discrete:!0}),a=x3({root:Le(),visitors:e.getValue(W0),jsxComponentDescriptors:e.getValue(U0),toMarkdownExtensions:e.getValue(j0),toMarkdownOptions:e.getValue(Fu),jsxIsAvailable:e.getValue(t8)})}),e.pub(zr,a.trim()),e.pub(Xs,!1)}),n=>n.registerCommand(Qm,()=>(e.pub(No,!0),!1),zn)])}),Mo=Et(q0,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{G0(e)})}),n=>n.registerCommand(e1,r=>{var i;const o=e.getValue(gr);return o&&!((i=o.getRootElement())!=null&&i.contains(r.relatedTarget))&&e.pubIn({[No]:!1,[$u]:r}),!1},zn)])});function gd(e,t,n){try{hS({root:t,visitors:e.getValue(B0),mdastExtensions:e.getValue(z0),markdown:n,syntaxExtensions:e.getValue(V0),jsxComponentDescriptors:e.getValue(U0),directiveDescriptors:e.getValue(n8),codeBlockEditorDescriptors:e.getValue(Va)}),e.pub(Gs,null)}catch(r){if(r instanceof Tu||r instanceof Iu)e.pubIn({[zr]:n,[Gs]:{error:r.message,source:n}});else throw r}}const Q0=ne([]),qr=Et(Q0),ex=ne([]),o8=Et(ex),tx=ne([]),s8=Et(tx),nx=ne([]);Et(nx);const a8=ne([]),rx=Et(a8),l8=ne(W1()),ix=ne("");it();const Qs=it(e=>{e.sub(e.pipe(Qs,We(qe)),([t,n])=>{n?.update(()=>{const r=j();$(r)&&(b_(r,t),setTimeout(()=>{n.focus()}))})})}),ox=it(e=>{e.sub(e.pipe(ox,We(qe)),([t,n])=>{n?.focus(()=>{n.getEditorState().read(()=>{const r=j();$(r)&&(n.update(()=>{const i=t();i.isInline()?(Ai([i]),je(i.getParentOrThrow())&&id(i,Ee).selectEnd()):z1(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(fd,void 0)}))})},{defaultSelection:"rootEnd"})})}),ea=ne("rich-text",e=>{function t(){return Pm((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(ea,t(),We(ta)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(hd,r)}),e.sub(e.pipe(ea,t(),Ro(n=>n.current==="rich-text"),We(qe)),([,n])=>{n?.dispatchCommand(fd,void 0)})}),ta=ne("",e=>{e.link(zr,ta),e.link(ta,Ha)}),pd=ne([]),Di=Et(pd),sx=ne(()=>{throw new Error("No translation function provided")}),Zh=ne(dd),u8=on({init(e,t){const n=t?.initialMarkdown??"";e.register(X0),e.register(Mo),e.register(Ha),e.pubIn({[$0]:t?.trim?n.trim():n,[In]:t?.iconComponentFor,[Wn]:[PS,OS,FS,kS,...NS],[pr]:[Oi,Tn,Yo],[mr]:[CS,vS,_S,bS,yS],[qr]:LS,[Nu]:t?.contentEditableClassName,[Mu]:t?.spellCheck,[Fu]:t?.toMarkdownOptions,[Kh]:t?.autoFocus,[Au]:t?.placeholder,[nn]:t?.readOnly,[sx]:t?.translation,[Du]:s9(),[Lu]:i9(),[J0]:[I9(),a9()],[Zh]:t?.lexicalTheme??dd}),e.singletonSub(Ou,t?.onError),e.singletonSub(Pu,r=>{t?.onChange(r,e.getValue(Xs))}),e.singletonSub($u,t?.onBlur),t?.suppressHtmlProcessing||e.pubIn({[Du]:[T9(),DS()],[Lu]:[X9(),Q9(),RS],[Wn]:MS})},postInit(e,t){const n=Uw({editable:t?.readOnly!==!0,namespace:"MDXEditor",nodes:e.getValue(H0),onError:r=>{throw r},theme:e.getValue(Zh)});n.update(()=>{const r=t?.initialMarkdown.trim()??"";gd(e,Le(),r);const i=t?.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(ui,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(ui,{defaultSelection:i.defaultSelection??"rootStart"})})}}),e.pub(gr,n),e.pub(qe,n)},update(e,t){e.pubIn({[Nu]:t?.contentEditableClassName,[Mu]:t?.spellCheck,[Fu]:t?.toMarkdownOptions,[Kh]:t?.autoFocus,[Au]:t?.placeholder,[nn]:t?.readOnly}),e.singletonSub(Pu,n=>{t?.onChange(n,e.getValue(Xs))}),e.singletonSub($u,t?.onBlur),e.singletonSub(Ou,t?.onError)}});function Bt(){return Ot(sx)}function c8(){return Le().getTextContent()}function d8(e,t=!0){if(e)return!1;let n=c8();return t&&(n=n.trim()),n===""}function f8(e){if(!d8(e,!1))return!1;const t=Le().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(ve(i))return!1;if(D(i)){if(!Vc(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let a=0;a<s;a++){const l=o[r];if(!J(l))return!1}}}return!0}function ax(e){return()=>f8(e)}const lx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?I.useLayoutEffect:I.useEffect;function h8({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:h,className:g,id:x,role:b="textbox",spellCheck:y=!0,style:m,tabIndex:p,"data-testid":v,...k},C){const[w,S]=I.useState(e.isEditable()),T=I.useCallback(F=>{F&&F.ownerDocument&&F.ownerDocument.defaultView?e.setRootElement(F):e.setRootElement(null)},[e]),P=I.useMemo(()=>function(...F){return L=>{F.forEach(O=>{typeof O=="function"?O(L):O!=null&&(O.current=L)})}}(C,T),[T,C]);return lx(()=>(S(e.isEditable()),e.registerEditableListener(F=>{S(F)})),[e]),M.jsx("div",{"aria-activedescendant":w?t:void 0,"aria-autocomplete":w?n:"none","aria-controls":w?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":w&&b==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":u,"aria-multiline":c,"aria-owns":w?d:void 0,"aria-readonly":!w||void 0,"aria-required":f,autoCapitalize:h,className:g,contentEditable:w,"data-testid":v,id:x,ref:P,role:w?b:void 0,spellCheck:y,style:m,tabIndex:p,...k})}const g8=I.forwardRef(h8);function qh(e){return e.getEditorState().read(ax(e.isComposing()))}const p8=I.forwardRef(m8);function m8(e,t){const{placeholder:n,...r}=e,[i]=yt();return M.jsxs(M.Fragment,{children:[M.jsx(g8,{editor:i,...r,ref:t}),n!=null&&M.jsx(x8,{editor:i,content:n})]})}function x8({content:e,editor:t}){const n=function(s){const[a,l]=I.useState(()=>qh(s));return lx(()=>{function u(){const c=qh(s);l(c)}return u(),Mt(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),a}(t),[r,i]=I.useState(t.isEditable());if(I.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(s=>{i(s)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:M.jsx("div",{"aria-hidden":!0,children:o})}const y8=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?I.useLayoutEffect:I.useEffect;function b8(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function v8(){return function(e){const[t]=yt(),n=I.useMemo(()=>e(t),[t,e]),[r,i]=I.useState(()=>n.initialValueFn()),o=I.useRef(r);return y8(()=>{const{initialValueFn:s,subscribe:a}=n,l=s();return o.current!==l&&(o.current=l,i(l)),a(u=>{o.current=u,i(u)})},[n,e]),r}(b8)}function C8(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const a=s.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[u,c,d,f,h,g]=l;e.update(()=>{const x=j();if($(x)){const b=x.anchor;let y=b.getNode(),m=0,p=0;if(J(y)&&u>=0&&c>=0&&(m=u,p=u+c,x.setTextNodeRange(y,m,y,p)),m===p&&d===""||(x.insertRawText(d),y=b.getNode()),J(y)){m=f,p=f+h;const v=y.getTextContentSize();m=m>v?v:m,p=p>v?v:p,x.setTextNodeRange(y,m,y,p)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const Bu=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?I.useLayoutEffect:I.useEffect;function Yh(e){return e.getEditorState().read(ax(e.isComposing()))}function w8({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=yt(),i=function(o,s){const[a,l]=I.useState(()=>o.getDecorators());return Bu(()=>o.registerDecoratorListener(u=>{Os.flushSync(()=>{l(u)})}),[o]),I.useEffect(()=>{l(o.getDecorators())},[o]),I.useMemo(()=>{const u=[],c=Object.keys(a);for(let d=0;d<c.length;d++){const f=c[d],h=M.jsx(s,{onError:x=>o._onError(x),children:M.jsx(I.Suspense,{fallback:null,children:a[f]})}),g=o.getElementByKey(f);g!==null&&u.push(Os.createPortal(h,g,f))}return u},[s,a,o])}(r,n);return function(o){Bu(()=>Mt(Q_(o),C8(o)),[o])}(r),M.jsxs(M.Fragment,{children:[e,M.jsx(_8,{content:t}),i]})}function _8({content:e}){const[t]=yt(),n=function(i){const[o,s]=I.useState(()=>Yh(i));return Bu(()=>{function a(){const l=Yh(i);s(l)}return a(),Mt(i.registerUpdateListener(()=>{a()}),i.registerEditableListener(()=>{a()}))},[i]),o}(t),r=v8();return n?typeof e=="function"?e(r):e:null}var Ml={exports:{}};/*!
|
|
75
|
-
Copyright (c) 2018 Jed Watson.
|
|
76
|
-
Licensed under the MIT License (MIT), see
|
|
77
|
-
http://jedwatson.github.io/classnames
|
|
78
|
-
*/var Gh;function k8(){return Gh||(Gh=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Ml)),Ml.exports}var S8=k8();const ke=Qg(S8),E8="_editorRoot_sects_53",T8="_editorWrapper_sects_155",I8="_toolbarRoot_sects_162",N8="_readOnlyToolbarRoot_sects_189",M8="_toolbarToggleItem_sects_208",A8="_toolbarGroupOfGroups_sects_219",O8="_toolbarToggleSingleGroup_sects_224",P8="_toolbarButton_sects_239",F8="_selectContainer_sects_288",L8="_selectItem_sects_301",D8="_selectTrigger_sects_308",R8="_selectDropdownArrow_sects_374",$8="_contentEditable_sects_380",B8="_iconButton_sects_457",H8="_primaryButton_sects_507",V8="_secondaryButton_sects_508",z8="_linkDialogEditForm_sects_541",W8="_linkDialogAnchor_sects_587",j8="_linkDialogPopoverContent_sects_601",U8="_dialogContent_sects_603",J8="_popoverArrow_sects_650",K8="_linkDialogPreviewAnchor_sects_654",Z8="_tooltipTrigger_sects_677",q8="_tooltipContent_sects_681",Y8="_actionButton_sects_695",G8="_dialogOverlay_sects_870",X8="_focusedImage_sects_916",Q8="_imageWrapper_sects_920",e6="_editImageToolbar_sects_933",t6="_editImageButton_sects_937",n6="_imageControlWrapperResizing_sects_1032",r6="_imageResizer_sects_1036",i6="_imageResizerN_sects_1045",o6="_imageResizerNe_sects_1051",s6="_imageResizerE_sects_1057",a6="_imageResizerSe_sects_1063",l6="_imageResizerS_sects_1063",u6="_imageResizerSw_sects_1075",c6="_imageResizerW_sects_1081",d6="_imageResizerNw_sects_1087",f6="_imagePlaceholder_sects_1093",h6="_placeholder_sects_1101",g6="_rootContentEditableWrapper_sects_1114",p6="_downshiftInputWrapper_sects_1124",m6="_downshiftInput_sects_1124",x6="_downshiftAutocompleteContainer_sects_1155",y6="_textInput_sects_1201",b6="_multiFieldForm_sects_1209",v6="_formField_sects_1215",C6="_popupContainer_sects_1235",Y={editorRoot:E8,editorWrapper:T8,toolbarRoot:I8,readOnlyToolbarRoot:N8,toolbarToggleItem:M8,toolbarGroupOfGroups:A8,toolbarToggleSingleGroup:O8,toolbarButton:P8,selectContainer:F8,selectItem:L8,selectTrigger:D8,selectDropdownArrow:R8,contentEditable:$8,iconButton:B8,primaryButton:H8,secondaryButton:V8,linkDialogEditForm:z8,linkDialogAnchor:W8,linkDialogPopoverContent:j8,dialogContent:U8,popoverArrow:J8,linkDialogPreviewAnchor:K8,tooltipTrigger:Z8,tooltipContent:q8,actionButton:Y8,dialogOverlay:G8,focusedImage:X8,imageWrapper:Q8,editImageToolbar:e6,editImageButton:t6,imageControlWrapperResizing:n6,imageResizer:r6,imageResizerN:i6,imageResizerNe:o6,imageResizerE:s6,imageResizerSe:a6,imageResizerS:l6,imageResizerSw:u6,imageResizerW:c6,imageResizerNw:d6,imagePlaceholder:f6,placeholder:h6,rootContentEditableWrapper:g6,downshiftInputWrapper:p6,downshiftInput:m6,downshiftAutocompleteContainer:x6,textInput:y6,multiFieldForm:b6,formField:v6,popupContainer:C6},w6={undo:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),code:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),_.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),_.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),_.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),_.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),_.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),sandpack:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.68262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),_.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),_.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),_.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),_.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),_.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),_.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),_.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),_.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),_.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))};function Hu(e,t){return Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hu(e,t)}var Xh={error:null},_6=function(e){var t,n;function r(){for(var o,s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return(o=e.call.apply(e,[this].concat(a))||this).state=Xh,o.resetErrorBoundary=function(){for(var u,c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];o.props.onReset==null||(u=o.props).onReset.apply(u,d),o.reset()},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Hu(t,n),r.getDerivedStateFromError=function(o){return{error:o}};var i=r.prototype;return i.reset=function(){this.setState(Xh)},i.componentDidCatch=function(o,s){var a,l;(a=(l=this.props).onError)==null||a.call(l,o,s)},i.componentDidUpdate=function(o,s){var a,l,u,c,d=this.state.error,f=this.props.resetKeys;d!==null&&s.error!==null&&((u=o.resetKeys)===void 0&&(u=[]),(c=f)===void 0&&(c=[]),u.length!==c.length||u.some(function(h,g){return!Object.is(h,c[g])}))&&((a=(l=this.props).onResetKeysChange)==null||a.call(l,o.resetKeys,f),this.reset())},i.render=function(){var o=this.state.error,s=this.props,a=s.fallbackRender,l=s.FallbackComponent,u=s.fallback;if(o!==null){var c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(I.isValidElement(u))return u;if(typeof a=="function")return a(c);if(l)return I.createElement(l,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(I.Component);function k6({children:e,onError:t}){return M.jsx(_6,{fallback:M.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const S6=({children:e})=>{const t=Ot(gr),n=_.useMemo(()=>[t,qC(null,dd)],[t]);return _.createElement(Fm.Provider,{value:n},e)},E6=()=>{const e=Bt(),t=_t(r8),n=c=>{t({current:c})},[r,i,o,s,a,l,u]=rn(Nu,Mu,Q0,ex,nx,Au,tx);return _.createElement(_.Fragment,null,s.map((c,d)=>_.createElement(c,{key:d})),_.createElement(ux,{wrappers:a},_.createElement("div",{className:ke(Y.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},_.createElement(w8,{contentEditable:_.createElement("div",{ref:n},_.createElement(p8,{className:ke(Y.contentEditable,r),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:i})),placeholder:_.createElement("div",{className:ke(Y.contentEditable,Y.placeholder,r)},_.createElement("p",null,l)),ErrorBoundary:k6}))),o.map((c,d)=>_.createElement(c,{key:d})),u.map((c,d)=>_.createElement(c,{key:d})))},T6={listItemIndent:"one"},I6=e=>w6[e];function N6(e,t,n={}){let r=t;for(const[i,o]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(o));return r}const ux=({wrappers:e,children:t})=>{if(e.length===0)return _.createElement(_.Fragment,null,t);const n=e[0];return _.createElement(n,null,_.createElement(ux,{wrappers:e.slice(1)},t))},M6=({children:e,className:t,overlayContainer:n})=>{const r=_.useRef(null),i=_t(Go);return _.useEffect(()=>{const o=document.createElement("div");return o.classList.add("mdxeditor-popup-container",Y.editorRoot,Y.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(o),r.current=o,i(r),()=>{o.remove()}},[t,r,n,i]),_.createElement("div",{className:ke("mdxeditor",Y.editorRoot,Y.editorWrapper,t)},e)},A6=({mdxRef:e})=>{const t=ga();return _.useImperativeHandle(e,()=>({getMarkdown:()=>{const n=t.getValue(ea);return n==="source"||n==="diff"?t.getValue(ta):t.getValue(zr)},setMarkdown:n=>{t.pub(hd,n)},insertMarkdown:n=>{t.pub(K0,n)},focus:(n,r)=>{var i;(i=t.getValue(gr))==null||i.focus(n,r)}}),[t]),null},O6=_.forwardRef((e,t)=>_.createElement(ZC,{plugins:[u8({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??ui,onBlur:e.onBlur??ui,toMarkdownOptions:e.toMarkdownOptions??T6,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??I6,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??ui,translation:e.translation??N6,trim:e.trim??!0,lexicalTheme:e.lexicalTheme}),...e.plugins??[]]},_.createElement(M6,{className:e.className,overlayContainer:e.overlayContainer},_.createElement(S6,null,_.createElement(E6,null))),_.createElement(A6,{mdxRef:t}))),cx=typeof window<"u"&&typeof window.document.createElement<"u",na=cx&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function P6(e,t){return na?e:t}const F6={testLexicalNode:Da,visitLexicalNode:({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},L6={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(vn(`h${e.depth}`))}},D6=[48,49,50,51,52,53,54],dx=[1,2,3,4,5,6],R6={49:1,50:2,51:3,52:4,53:5,54:6},za=ne(dx,e=>{e.pub(X0,t=>t.registerCommand(Ym,n=>{const{keyCode:r,ctrlKey:i,metaKey:o,altKey:s}=n;return D6.includes(r)&&P6(o,i)&&s?(n.preventDefault(),t.update(()=>{if(r===48)e.pub(Qs,()=>Ee());else{const a=e.getValue(za),l=R6[r];a.includes(l)||e.pub(Qs,()=>vn(`h${l}`))}}),!0):!1},De))}),$6=on({init(e){e.pubIn({[Di]:"headings",[Wn]:L6,[pr]:qo,[mr]:F6})},update(e,t){e.pub(za,t?.allowedHeadingLevels??dx)}});function Qh(e,t){return e.getEditorState().read(()=>{const n=ze(t);return n!==null&&n.isSelected()})}function fx(e){const[t]=yt(),[n,r]=I.useState(()=>Qh(t,e));return I.useEffect(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(Qh(t,e))});return()=>{i=!1,o()}},[t,e]),[n,I.useCallback(i=>{t.update(()=>{let o=j();et(o)||(o=Lc(),Xe(o)),et(o)&&(i?o.add(e):o.delete(e))})},[t,e]),I.useCallback(()=>{t.update(()=>{const i=j();et(i)&&i.clear()})},[t])]}const hx=Jn();function B6({nodeKey:e}){const[t]=yt(),[n,r,i]=fx(e),o=I.useCallback(s=>{const a=j();return n&&et(a)&&(s.preventDefault(),a.getNodes().forEach(l=>{Wa(l)&&l.remove()})),!1},[n]);return I.useEffect(()=>Mt(t.registerCommand(ya,s=>{const a=t.getElementByKey(e);return s.target===a&&(s.shiftKey||i(),r(!n),!0)},De),t.registerCommand(wa,o,De),t.registerCommand(Ca,o,De)),[i,t,n,e,o,r]),I.useEffect(()=>{const s=t.getElementByKey(e),a=t._config.theme.hrSelected??"selected";s!==null&&(n?tn(s,a):Fa(s,a))},[t,n,e]),null}let Xo=class gx extends jo{static getType(){return"horizontalrule"}static clone(t){return new gx(t.__key)}static importJSON(t){return Ri().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:H6,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(t){const n=document.createElement("hr");return tn(n,t.theme.hr),n}getTextContent(){return`
|
|
79
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return M.jsx(B6,{nodeKey:this.__key})}};function H6(){return{node:Ri()}}function Ri(){return Nt(new Xo)}function Wa(e){return e instanceof Xo}function V6(){const[e]=yt();return I.useEffect(()=>e.registerCommand(hx,t=>{const n=j();if(!$(n))return!1;if(n.focus.getNode()!==null){const r=Ri();z1(r)}return!0},xe),[e]),null}const z6={testLexicalNode:Wa,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},W6={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(Ri())}},j6=cr(e=>{e.sub(e.pipe(j6,We(qe)),([,t])=>{t?.dispatchCommand(hx,void 0)})}),U6=on({init(e){e.pubIn({[Di]:"thematicBreak",[Wn]:W6,[pr]:Xo,[mr]:z6,[qr]:V6})}});function mn(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Vu(e){let t=1,n=e.getParent();for(;n!=null;){if(be(n)){const r=n.getParent();if(de(r)){t++,n=r.getParent();continue}mn(40)}return t}return t}function zu(e){let t=e.getParent();de(t)||mn(40);let n=t;for(;n!==null;)n=n.getParent(),de(n)&&(t=n);return t}function px(e){let t=[];const n=e.getChildren().filter(be);for(let r=0;r<n.length;r++){const i=n[r],o=i.getFirstChild();de(o)?t=t.concat(px(o)):t.push(i)}return t}function xn(e){return be(e)&&de(e.getFirstChild())}function eg(e){return xt().append(e)}function mx(e,t){return be(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Wu(e){const t=j();if(t!==null){let n=t.getNodes();if($(t)){const i=t.getStartEndPoints();i===null&&mn(143);const[o]=i,s=o.getNode(),a=s.getParent();if(je(s)){const l=s.getFirstChild();if(l)n=l.selectStart().getNodes();else{const u=Ee();s.append(u),n=u.select().getNodes()}}else if(mx(s,n)){const l=mt(e);if(je(a)){s.replace(l);const u=xt();D(s)&&(u.setFormat(s.getFormatType()),u.setIndent(s.getIndent())),l.append(u)}else if(be(s)){const u=s.getParentOrThrow();Wr(l,u.getChildren()),u.replace(l)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(!D(o)||!o.isEmpty()||be(o)||r.has(o.getKey())){if(w1(o)){let s=o.getParent();for(;s!=null;){const a=s.getKey();if(de(s)){if(!r.has(a)){const l=mt(e);Wr(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(je(l)&&!r.has(a)){r.add(a),tg(s,e);break}s=l}}}}else tg(o,e)}}}function Wr(e,t){e.splice(e.getChildrenSize(),0,t)}function tg(e,t){if(de(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=xt();let o;if(Wr(i,e.getChildren()),de(n)&&t===n.getListType())n.append(i),de(r)&&t===r.getListType()&&(Wr(n,r.getChildren()),r.remove()),o=n;else if(de(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const s=mt(t);s.append(i),e.replace(s),o=s}return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),e.remove(),o}function md(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&xn(n)&&xn(r)&&(md(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function J6(){const e=j();if($(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(mx(r,n))t.add(zu(r));else for(let i=0;i<n.length;i++){const o=n[i];if(w1(o)){const s=V1(o,ln);s!=null&&t.add(zu(s))}}for(const i of t){let o=i;const s=px(i);for(const a of s){const l=Ee().setTextStyle(e.style).setTextFormat(e.format);Wr(l,a.getChildren()),o.insertAfter(l),o=l,a.__key===e.anchor.key&&Vr(e.anchor,Rt(Sn(l,"next"))),a.__key===e.focus.key&&Vr(e.focus,Rt(Sn(l,"next"))),a.remove()}i.remove()}}}function K6(e){const t=new Set;if(xn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(xn(r)&&xn(i)){const o=i.getFirstChild();if(de(o)){o.append(e);const s=r.getFirstChild();de(s)&&(Wr(o,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(xn(r)){const o=r.getFirstChild();if(de(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(xn(i)){const o=i.getFirstChild();de(o)&&o.append(e)}else if(de(n)){const o=xt().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),s=mt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());o.append(s),s.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function Z6(e){if(xn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(de(n?n.getParent():void 0)&&be(n)&&de(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const o=t.getListType(),s=xt(),a=mt(o);s.append(a),e.getPreviousSiblings().forEach(c=>a.append(c));const l=xt(),u=mt(o);l.append(u),Wr(u,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(l),n.replace(e)}}}function q6(){const e=j();if(!$(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!be(t)||t.getChildrenSize()!==0)return!1;const n=zu(t),r=t.getParent();de(r)||mn(40);const i=r.getParent();let o;if(je(i))o=Ee(),n.insertAfter(o);else{if(!be(i))return!1;o=xt(),i.insertAfter(o)}o.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const a=mt(r.getListType());if(be(o)){const l=xt();l.append(a),o.insertAfter(l)}else o.insertAfter(a);a.append(...s)}return function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const u=l.getParent();if(u==null||!be(u)&&!de(u))break;l=u}l.remove()}(t),!0}function ra(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class ln extends an{static getType(){return"listitem"}static clone(t){return new ln(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){const n=document.createElement("li"),r=this.getParent();de(r)&&r.getListType()==="check"&&rg(n,this,null),n.value=this.__value,ng(n,t.theme,this);const i=this.__style||this.__textStyle;return i&&(n.style.cssText=i),n}updateDOM(t,n,r){const i=this.getParent();de(i)&&i.getListType()==="check"&&rg(n,this,t),n.value=this.__value,ng(n,r.theme,this);const o=t.__style||t.__textStyle,s=this.__style||this.__textStyle;return o!==s&&(n.style.cssText=s,s===""&&n.removeAttribute("style")),!1}static transform(){return t=>{if(be(t)||mn(144),t.__checked==null)return;const n=t.getParent();de(n)&&n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:Y6,priority:0})}}static importJSON(t){return xt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const n=this.createDOM(t._config);n.style.textAlign=this.getFormatType();const r=this.getDirection();return r&&(n.dir=r),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(D(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(be(t))return super.replace(t);this.setIndent(0);const r=this.getParentOrThrow();if(!de(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{const i=mt(r.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),i.append(s)}r.insertAfter(t),t.insertAfter(i)}return n&&(D(t)||mn(139),this.getChildren().forEach(i=>{t.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){const r=this.getParentOrThrow();if(de(r)||mn(39),be(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const o=mt(r.getListType());i.forEach(s=>o.append(s)),t.insertAfter(o,n)}return t}remove(t){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&xn(n)&&xn(r)&&(md(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(t,n=!0){const r=xt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(t){const n=Ee();this.getChildren().forEach(s=>n.append(s));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=be(i);if(r.getChildrenSize()===1)if(o)r.remove(),i.select();else{r.insertBefore(n),r.remove();const s=t.anchor,a=t.focus,l=n.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(l,s.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const n=this.getWritable();return n.__value=t,n}getChecked(){const t=this.getLatest();let n;const r=this.getParent();return de(r)&&(n=r.getListType()),n==="check"?!!t.__checked:void 0}setChecked(t){const n=this.getWritable();return n.__checked=t,n}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let n=t.getParentOrThrow(),r=0;for(;be(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(t){typeof t!="number"&&mn(117),(t=Math.floor(t))>=0||mn(199);let n=this.getIndent();for(;n!==t;)n<t?(K6(this),n++):(Z6(this),n--);return this}canInsertAfter(t){return be(t)}canReplaceWith(t){return be(t)}canMergeWith(t){return be(t)||Vc(t)}extractWithChild(t,n){if(!$(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return mt("bullet")}canMergeWhenEmpty(){return!0}}function ng(e,t,n){const r=[],i=[],o=t.list,s=o?o.listitem:void 0;let a;if(o&&o.nested&&(a=o.nested.listitem),s!==void 0&&r.push(...ra(s)),o){const l=n.getParent(),u=de(l)&&l.getListType()==="check",c=n.getChecked();u&&!c||i.push(o.listitemUnchecked),u&&c||i.push(o.listitemChecked),u&&r.push(c?o.listitemChecked:o.listitemUnchecked)}if(a!==void 0){const l=ra(a);n.getChildren().some(u=>de(u))?r.push(...l):i.push(...l)}i.length>0&&Fa(e,...i),r.length>0&&tn(e,...r)}function rg(e,t,n,r){de(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function Y6(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return G6(n)}const t=e.getAttribute("aria-checked");return{node:xt(t==="true"||t!=="false"&&void 0)}}function G6(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:xt(e.hasAttribute("checked"))}}function xt(e){return Nt(new ln(void 0,e))}function be(e){return e instanceof ln}class Nn extends an{static getType(){return"list"}static clone(t){const n=t.__listType||sg[t.__tag];return new Nn(n,t.__start,t.__key)}constructor(t="number",n=1,r){super(r);const i=sg[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){const n=this.getWritable();return n.__listType=t,n.__tag=t==="number"?"ol":"ul",n}getListType(){return this.__listType}getStart(){return this.__start}setStart(t){const n=this.getWritable();return n.__start=t,n}createDOM(t,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,ig(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||(ig(n,r.theme,this),!1)}static transform(){return t=>{de(t)||mn(163),function(n){const r=n.getNextSibling();de(r)&&n.getListType()===r.getListType()&&md(n,r)}(t),function(n){const r=n.getListType()!=="check";let i=n.getStart();for(const o of n.getChildren())be(o)&&(o.getValue()!==i&&o.setValue(i),r&&o.getLatest().__checked!=null&&o.setChecked(void 0),de(o.getFirstChild())||i++)}(t)}}static importDOM(){return{ol:()=>({conversion:og,priority:0}),ul:()=>({conversion:og,priority:0})}}static importJSON(t){return mt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const n=this.createDOM(t._config,t);return Ke(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(be(r))super.append(r);else{const i=xt();if(de(r))i.append(r);else if(D(r))if(r.isInline())i.append(r);else{const o=Re(r.getTextContent());i.append(o)}else i.append(r);super.append(i)}}return this}extractWithChild(t){return be(t)}}function ig(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],a=Vu(n)-1,l=a%s.length,u=s[l],c=o[n.__tag];let d;const f=o.nested,h=o.checklist;if(f!==void 0&&f.list&&(d=f.list),c!==void 0&&r.push(c),h!==void 0&&n.__listType==="check"&&r.push(h),u!==void 0){r.push(...ra(u));for(let g=0;g<s.length;g++)g!==l&&i.push(n.__tag+g)}if(d!==void 0){const g=ra(d);a>1?r.push(...g):i.push(...g)}}i.length>0&&Fa(e,...i),r.length>0&&tn(e,...r)}function X6(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(be(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(o=>{de(o)&&t.push(eg(o))})}else t.push(eg(r))}return t}function og(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=mt("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(Ke(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?mt("check"):mt("bullet")),{after:X6,node:n}}const sg={ol:"number",ul:"bullet"};function mt(e="number",t=1){return Nt(new Nn(e,t))}function de(e){return e instanceof Nn}const xx=Jn(),yx=Jn(),bx=Jn(),vx=Jn();function Q6(e){return Mt(e.registerCommand(yx,()=>(Wu("number"),!0),De),e.registerCommand(xx,()=>(Wu("bullet"),!0),De),e.registerCommand(vx,()=>(J6(),!0),De),e.registerCommand(_o,()=>q6(),De),e.registerNodeTransform(ln,t=>{const n=t.getFirstChild();if(n){if(J(n)){const r=n.getStyle(),i=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const r=j();$(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(Tn,t=>{const n=t.getParent();if(be(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),i=t.getFormat();r===n.getTextStyle()&&i===n.getTextFormat()||n.setTextStyle(r).setTextFormat(i)}}))}function eE(e,t){e.update(()=>Wu(t))}const tE={testNode:"list",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(o=>typeof o.checked=="boolean")?"check":e.ordered?"number":"bullet",i=mt(r);if(be(t)){const o=xt();o.append(i),t.insertAfter(o)}else t.append(i);n.visitChildren(e,i)}},nE={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(xt(r))}},rE={testLexicalNode:de,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})}},iE={testLexicalNode:be,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&de(i)){const o=t.children.at(-1);o?n.visitChildren(e,o):n.visitChildren(i,t)}else{const o=e.getParent(),s=n.appendToParent(t,{type:"listItem",checked:o.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});let a=null;for(const l of e.getChildren())J(l)||Xt(l)||l.isInline()&&(D(l)||ve(l))?(a||(a=n.appendToParent(s,{type:"paragraph",children:[]})),n.visit(l,a)):(a=null,n.visit(l,s))}}};function oE(e,t){return Mt(e.registerCommand(Nc,n=>{const r=j();if(!$(r))return!1;n.preventDefault();const i=function(o){const s=o.getNodes();if(I_(s,f=>Ws(f)&&f.canIndent()?f:null).length>0)return!0;const a=o.anchor,l=o.focus,u=l.isBefore(a)?l:a,c=u.getNode(),d=xu(c);if(d.canIndent()){const f=d.getKey();let h=zo();if(h.anchor.set(f,0,"element"),h.focus.set(f,0,"element"),h=Dr(h),h.anchor.is(u))return!0}return!1}(r)?n.shiftKey?nu:Vs:Xm;return e.dispatchCommand(i,void 0)},xe),e.registerCommand(Vs,()=>{if(t==null)return!1;const n=j();if(!$(n))return!1;const r=n.getNodes().map(i=>xu(i).getIndent());return Math.max(...r)+1>=t},zn))}function ag({maxIndent:e}){const[t]=yt();return I.useEffect(()=>oE(t,e),[t,e]),null}function lg(){const[e]=yt();return I.useEffect(()=>Mt(e.registerCommand(bx,()=>(eE(e,"check"),!0),De),e.registerCommand(Tc,t=>dg(t,e,!1),De),e.registerCommand(Ec,t=>dg(t,e,!0),De),e.registerCommand(Bo,t=>{if(ju()!=null){const n=e.getRootElement();return n?.focus(),!0}return!1},De),e.registerCommand(Ic,t=>{const n=ju();return!(n==null||!e.isEditable())&&(e.update(()=>{const r=kn(n);be(r)&&(t.preventDefault(),r.toggleChecked())}),!0)},De),e.registerCommand(Sc,t=>e.getEditorState().read(()=>{const n=j();if($(n)&&n.isCollapsed()){const{anchor:r}=n,i=r.type==="element";if(i||r.offset===0){const o=r.getNode(),s=fr(o,a=>D(a)&&!a.isInline());if(be(s)){const a=s.getParent();if(de(a)&&a.getListType()==="check"&&(i||s.getFirstDescendant()===o)){const l=e.getElementByKey(s.__key);if(l!=null&&document.activeElement!==l)return l.focus(),t.preventDefault(),!0}}}}return!1}),De),e.registerRootListener((t,n)=>{t!==null&&(t.addEventListener("click",ug),t.addEventListener("pointerdown",cg)),n!==null&&(n.removeEventListener("click",ug),n.removeEventListener("pointerdown",cg))}))),null}function Cx(e,t){const n=e.target;if(!Ke(n))return;const r=n.firstChild;if(Ke(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;const o=n.getBoundingClientRect(),s=e.pageX/N_(n);(n.dir==="rtl"?s<o.right&&s>o.right-20:s>o.left&&s<o.left+20)&&t()}function ug(e){Cx(e,()=>{if(Ke(e.target)){const t=e.target,n=jc(t);n!=null&&n.isEditable()&&n.update(()=>{const r=kn(t);be(r)&&(t.focus(),r.toggleChecked())})}})}function cg(e){Cx(e,()=>{e.preventDefault()})}function ju(){const e=document.activeElement;return Ke(e)&&e.tagName==="LI"&&e.parentNode!=null&&e.parentNode.__lexicalListType==="check"?e:null}function dg(e,t,n){const r=ju();return r!=null&&t.update(()=>{const i=kn(r);if(!be(i))return;const o=function(s,a){let l=a?s.getPreviousSibling():s.getNextSibling(),u=s;for(;l==null&&be(u);)u=u.getParentOrThrow().getParent(),u!=null&&(l=a?u.getPreviousSibling():u.getNextSibling());for(;be(l);){const c=a?l.getLastChild():l.getFirstChild();if(!de(c))return l;l=a?c.getLastChild():c.getFirstChild()}return null}(i,n);if(o!=null){o.selectStart();const s=t.getElementByKey(o.__key);s!=null&&(e.preventDefault(),setTimeout(()=>{s.focus()},0))}}),!1}function fg(){const[e]=yt();return I.useEffect(()=>{if(!e.hasNodes([Nn,ln]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),function(t){I.useEffect(()=>Q6(t),[t])}(e),null}const sE={name:"tasklistCheck",tokenize:lE};function aE(){return{text:{91:sE}}}function lE(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Ze(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return re(l)?t(l):ye(l)?e.check({tokenize:uE},t,n)(l):n(l)}}function uE(e,t,n){return Se(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function cE(){return{exit:{taskListCheckValueChecked:hg,taskListCheckValueUnchecked:hg,paragraph:fE}}}function dE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hE}}}function hg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function fE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hE(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let l=x0.listItem(e,t,n,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+s}}const gE=new Map([["number",yx],["bullet",xx],["check",bx],["",vx]]),Uu=ne("",e=>{e.sub(e.pipe(Ei,We(qe)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:fr(r,a=>{const l=a.getParent();return l!==null&&je(l)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null)if(de(i)){const a=V1(r,Nn),l=a?a.getListType():i.getListType();e.pub(Uu,l)}else e.pub(Uu,"")})}),wx=it(e=>{e.sub(e.pipe(wx,We(qe)),([t,n])=>{n?.dispatchCommand(gE.get(t),void 0)})}),pE=on({init(e){var t;(t=e.getValue(gr))==null||t.registerCommand(Vs,()=>!xE(7),zn),e.pubIn({[Di]:"lists",[Du]:cE(),[Lu]:aE(),[Wn]:[tE,nE],[pr]:[ln,Nn],[mr]:[rE,iE],[J0]:dE(),[qr]:[ag,fg,lg],[rx]:[ag,fg,lg]})}});function mE(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>D(n)?n:n.getParentOrThrow()))}function xE(e){const t=j();if(!$(t))return!1;const n=mE(t);let r=0;for(const i of n)if(de(i))r=Math.max(Vu(i)+1,r);else if(be(i)){const o=i.getParent();if(o?.getChildren().length===1){const s=o.getParent();if(be(s)&&s.getChildren().length===1)return!1}if(!de(o))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(Vu(o)+1,r)}return r<=e}function _x(e){const t=e+"CollectionProvider",[n,r]=Kr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:b,children:y}=x,m=_.useRef(null),p=_.useRef(new Map).current;return M.jsx(i,{scope:b,itemMap:p,collectionRef:m,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=As(a),u=_.forwardRef((x,b)=>{const{scope:y,children:m}=x,p=o(a,y),v=ct(b,p.collectionRef);return M.jsx(l,{ref:v,children:m})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=As(c),h=_.forwardRef((x,b)=>{const{scope:y,children:m,...p}=x,v=_.useRef(null),k=ct(b,v),C=o(c,y);return _.useEffect(()=>(C.itemMap.set(v,{ref:v,...p}),()=>void C.itemMap.delete(v))),M.jsx(f,{[d]:"",ref:k,children:m})});h.displayName=c;function g(x){const b=o(e+"CollectionConsumer",x);return _.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const p=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,w)=>p.indexOf(C.ref.current)-p.indexOf(w.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},g,r]}var yE=I.createContext(void 0);function ja(e){const t=I.useContext(yE);return e||t||"ltr"}var Al="rovingFocusGroup.onEntryFocus",bE={bubbles:!1,cancelable:!0},Qo="RovingFocusGroup",[Ju,kx,vE]=_x(Qo),[CE,Ua]=Kr(Qo,[vE]),[wE,_E]=CE(Qo),Sx=I.forwardRef((e,t)=>M.jsx(Ju.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(Ju.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(kE,{...e,ref:t})})}));Sx.displayName=Qo;var kE=I.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=I.useRef(null),h=ct(t,f),g=ja(o),[x,b]=Pr({prop:s,defaultProp:a??null,onChange:l,caller:Qo}),[y,m]=I.useState(!1),p=xp(u),v=kx(n),k=I.useRef(!1),[C,w]=I.useState(0);return I.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(Al,p),()=>S.removeEventListener(Al,p)},[p]),M.jsx(wE,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:x,onItemFocus:I.useCallback(S=>b(S),[b]),onItemShiftTab:I.useCallback(()=>m(!0),[]),onFocusableItemAdd:I.useCallback(()=>w(S=>S+1),[]),onFocusableItemRemove:I.useCallback(()=>w(S=>S-1),[]),children:M.jsx(Ue.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:we(e.onMouseDown,()=>{k.current=!0}),onFocus:we(e.onFocus,S=>{const T=!k.current;if(S.target===S.currentTarget&&T&&!y){const P=new CustomEvent(Al,bE);if(S.currentTarget.dispatchEvent(P),!P.defaultPrevented){const F=v().filter(q=>q.focusable),L=F.find(q=>q.active),O=F.find(q=>q.id===x),H=[L,O,...F].filter(Boolean).map(q=>q.ref.current);Ix(H,c)}}k.current=!1}),onBlur:we(e.onBlur,()=>m(!1))})})}),Ex="RovingFocusGroupItem",Tx=I.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...a}=e,l=Oo(),u=o||l,c=_E(Ex,n),d=c.currentTabStopId===u,f=kx(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:x}=c;return I.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),M.jsx(Ju.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:M.jsx(Ue.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:we(e.onMouseDown,b=>{r?c.onItemFocus(u):b.preventDefault()}),onFocus:we(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:we(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=TE(b,c.orientation,c.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let p=f().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")p.reverse();else if(y==="prev"||y==="next"){y==="prev"&&p.reverse();const v=p.indexOf(b.currentTarget);p=c.loop?IE(p,v+1):p.slice(v+1)}setTimeout(()=>Ix(p))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:x!=null}):s})})});Tx.displayName=Ex;var SE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TE(e,t,n){const r=EE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return SE[r]}function Ix(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function IE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Nx=Sx,xd=Tx,Mx="Toggle",Ax=I.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[s,a]=Pr({prop:n,onChange:i,defaultProp:r??!1,caller:Mx});return M.jsx(Ue.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:we(e.onClick,()=>{e.disabled||a(!s)})})});Ax.displayName=Mx;var xr="ToggleGroup",[Ox,Px]=Kr(xr,[Ua]),Fx=Ua(),yd=_.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return M.jsx(NE,{...i,ref:t})}if(n==="multiple"){const i=r;return M.jsx(ME,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${xr}\``)});yd.displayName=xr;var[Lx,Dx]=Ox(xr),NE=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,a]=Pr({prop:n,defaultProp:r??"",onChange:i,caller:xr});return M.jsx(Lx,{scope:e.__scopeToggleGroup,type:"single",value:_.useMemo(()=>s?[s]:[],[s]),onItemActivate:a,onItemDeactivate:_.useCallback(()=>a(""),[a]),children:M.jsx(Rx,{...o,ref:t})})}),ME=_.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,a]=Pr({prop:n,defaultProp:r??[],onChange:i,caller:xr}),l=_.useCallback(c=>a((d=[])=>[...d,c]),[a]),u=_.useCallback(c=>a((d=[])=>d.filter(f=>f!==c)),[a]);return M.jsx(Lx,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:l,onItemDeactivate:u,children:M.jsx(Rx,{...o,ref:t})})});yd.displayName=xr;var[AE,OE]=Ox(xr),Rx=_.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:a=!0,...l}=e,u=Fx(n),c=ja(s),d={role:"group",dir:c,...l};return M.jsx(AE,{scope:n,rovingFocus:i,disabled:r,children:i?M.jsx(Nx,{asChild:!0,...u,orientation:o,dir:c,loop:a,children:M.jsx(Ue.div,{...d,ref:t})}):M.jsx(Ue.div,{...d,ref:t})})}),ia="ToggleGroupItem",$x=_.forwardRef((e,t)=>{const n=Dx(ia,e.__scopeToggleGroup),r=OE(ia,e.__scopeToggleGroup),i=Fx(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,a={...e,pressed:o,disabled:s},l=_.useRef(null);return r.rovingFocus?M.jsx(xd,{asChild:!0,...i,focusable:!s,active:o,ref:l,children:M.jsx(gg,{...a,ref:t})}):M.jsx(gg,{...a,ref:t})});$x.displayName=ia;var gg=_.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=Dx(ia,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=o.type==="single"?s:void 0;return M.jsx(Ax,{...a,...i,ref:t,onPressedChange:l=>{l?o.onItemActivate(r):o.onItemDeactivate(r)}})}),PE=yd,FE=$x,bd="Toolbar",[LE,UN]=Kr(bd,[Ua,Px]),vd=Ua(),Bx=Px(),[DE,Hx]=LE(bd),Vx=I.forwardRef((e,t)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:o=!0,...s}=e,a=vd(n),l=ja(i);return M.jsx(DE,{scope:n,orientation:r,dir:l,children:M.jsx(Nx,{asChild:!0,...a,orientation:r,dir:l,loop:o,children:M.jsx(Ue.div,{role:"toolbar","aria-orientation":r,dir:l,...s,ref:t})})})});Vx.displayName=bd;var zx="ToolbarSeparator",Wx=I.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=Hx(zx,n);return M.jsx(Wy,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:t})});Wx.displayName=zx;var RE="ToolbarButton",Cd=I.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=vd(n);return M.jsx(xd,{asChild:!0,...i,focusable:!e.disabled,children:M.jsx(Ue.button,{type:"button",...r,ref:t})})});Cd.displayName=RE;var $E="ToolbarLink",BE=I.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=vd(n);return M.jsx(xd,{asChild:!0,...i,focusable:!0,children:M.jsx(Ue.a,{...r,ref:t,onKeyDown:we(e.onKeyDown,o=>{o.key===" "&&o.currentTarget.click()})})})});BE.displayName=$E;var jx="ToolbarToggleGroup",Ux=I.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=Hx(jx,n),o=Bx(n);return M.jsx(PE,{"data-orientation":i.orientation,dir:i.dir,...o,...r,ref:t,rovingFocus:!1})});Ux.displayName=jx;var HE="ToolbarToggleItem",Jx=I.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=Bx(n),o={__scopeToolbar:e.__scopeToolbar};return M.jsx(Cd,{asChild:!0,...o,children:M.jsx(FE,{...i,...r,ref:t})})});Jx.displayName=HE;var VE=Vx,zE=Wx,Kx=Cd,wd=Ux,WE=Jx;const jE=new Set(["http:","https:","mailto:","sms:","tel:"]);class Zn extends an{static getType(){return"link"}static clone(t){return new Zn(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=n;this.__url=t,this.__target=i,this.__rel=o,this.__title=s}createDOM(t){const n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),tn(n,t.theme.link),n}updateDOM(t,n,r){if(O1(n)){const i=this.__url,o=this.__target,s=this.__rel,a=this.__title;i!==t.__url&&(n.href=i),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),s!==t.__rel&&(s?n.rel=s:n.removeAttribute("rel")),a!==t.__title&&(a?n.title=a:n.removeAttribute("title"))}return!1}static importDOM(){return{a:t=>({conversion:UE,priority:1})}}static importJSON(t){return jr().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){try{const n=new URL(t);if(!jE.has(n.protocol))return"about:blank"}catch{return t}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=jr(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!$(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function UE(e){let t=null;if(O1(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=jr(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function jr(e="",t){return Nt(new Zn(e,t))}function yn(e){return e instanceof Zn}class $i extends Zn{constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(t){return new $i(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?document.createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return Ku().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=this.getParentOrThrow().insertNewAfter(t,n);if(D(r)){const i=Ku(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}}function Ku(e="",t){return Nt(new $i(e,t))}function Tr(e){return e instanceof $i}const Ti=Jn();function pg(e,t){if(e.type==="element"){const n=e.getNode();return D(n)||function(r,...i){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of i)s.append("v",a);throw o.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function Ol(e,t={}){const{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel,o=j();if(!$(o))return;const s=o.extract();if(e===null)return void s.forEach(u=>{const c=fr(u,d=>!Tr(d)&&yn(d));if(c){const d=c.getChildren();for(let f=0;f<d.length;f++)c.insertBefore(d[f]);c.remove()}});const a=new Set,l=u=>{a.has(u.getKey())||(a.add(u.getKey()),u.setURL(e),n!==void 0&&u.setTarget(n),i!==void 0&&u.setRel(i),r!==void 0&&u.setTitle(r))};if(s.length===1){const u=mg(s[0],yn);if(u!==null)return l(u)}(function(u){const c=j();if(!$(c))return u();const d=Dr(c),f=d.isBackward(),h=pg(d.anchor,f?-1:0),g=pg(d.focus,f?0:-1);if(u(),h||g){const x=j();if($(x)){const b=x.clone();if(h){const y=h.getParent();y&&b.anchor.set(y.getKey(),h.getIndexWithinParent()+(f?1:0),"element")}if(g){const y=g.getParent();y&&b.focus.set(y.getKey(),g.getIndexWithinParent()+(f?0:1),"element")}Xe(Dr(b))}}})(()=>{let u=null;for(const c of s){if(!c.isAttached())continue;const d=mg(c,yn);if(d){l(d);continue}if(D(c)){if(!c.isInline())continue;if(yn(c)){if(!(Tr(c)||u!==null&&u.getParentOrThrow().isParentOf(c))){l(c),u=c;continue}for(const h of c.getChildren())c.insertBefore(h);c.remove();continue}}const f=c.getPreviousSibling();yn(f)&&f.is(u)?f.append(c):(u=jr(e,{rel:i,target:n,title:r}),c.insertAfter(u),u.append(c))}})}function mg(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const JE={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(jr(e.url,{title:e.title}))}},KE={testLexicalNode:yn,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};function ZE({validateUrl:e,attributes:t}){const[n]=yt();return I.useEffect(()=>{if(!n.hasNodes([Zn]))throw new Error("LinkPlugin: LinkNode not registered on editor");return Mt(n.registerCommand(Ti,r=>{if(r===null)return Ol(r),!0;if(typeof r=="string")return!(e!==void 0&&!e(r))&&(Ol(r,t),!0);{const{url:i,target:o,rel:s,title:a}=r;return Ol(i,{...t,rel:s,target:o,title:a}),!0}},De),e!==void 0?n.registerCommand($o,r=>{const i=j();if(!$(i)||i.isCollapsed()||!nr(r,ClipboardEvent))return!1;const o=r;if(o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!e(s)&&!i.getNodes().some(a=>D(a))&&(n.dispatchCommand(Ti,{...t,url:s}),r.preventDefault(),!0)},De):()=>{})},[n,e,t]),null}function xg(e,t=n=>n){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function Zx(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const qE=/[.,;\s]/;function oa(e){return qE.test(e)}function qx(e){return oa(e[e.length-1])}function Zu(e){return oa(e[0])}function Yx(e){let t=e.getPreviousSibling();return D(t)&&(t=t.getLastDescendant()),t===null||Xt(t)||J(t)&&qx(t.getTextContent())}function Gx(e){let t=e.getNextSibling();return D(t)&&(t=t.getFirstDescendant()),t===null||Xt(t)||J(t)&&Zu(t.getTextContent())}function YE(e,t,n,r){return(e>0?oa(n[e-1]):Yx(r[0]))?t<n.length?oa(n[t]):Gx(r[r.length-1]):!1}function GE(e,t,n){const r=[],i=[],o=[];let s=0,a=0;const l=[...e];for(;l.length>0;){const u=l[0],c=u.getTextContent().length,d=a;a+c<=t?(r.push(u),s+=c):d>=n?o.push(u):i.push(u),a+=c,l.shift()}return[s,r,i,o]}function XE(e,t,n,r){const i=Ku(r.url,r.attributes);if(e.length===1){let o,s=e[0];t===0?[o,s]=s.splitText(n):[,o,s]=s.splitText(t,n);const a=Re(r.text);return a.setFormat(o.getFormat()),a.setDetail(o.getDetail()),a.setStyle(o.getStyle()),i.append(a),o.replace(i),s}if(e.length>1){const o=e[0];let s,a=o.getTextContent().length;t===0?s=o:[,s]=o.splitText(t);const l=[];let u;for(let h=1;h<e.length;h++){const g=e[h],x=g.getTextContent().length,b=a;if(b<n)if(a+x<=n)l.push(g);else{const[y,m]=g.splitText(n-b);l.push(y),u=m}a+=x}const c=j(),d=c?c.getNodes().find(J):void 0,f=Re(s.getTextContent());return f.setFormat(s.getFormat()),f.setDetail(s.getDetail()),f.setStyle(s.getStyle()),i.append(f,...l),d&&d===s&&($(c)?f.select(c.anchor.offset,c.focus.offset):et(c)&&f.select(0,f.getTextContent().length)),s.replace(i),u}}function Pl(e,t,n){const r=e.getChildren(),i=r.length;for(let l=0;l<i;l++){const u=r[l];if(!J(u)||!u.isSimpleText())return Ns(e),void n(null,e.getURL())}const o=e.getTextContent(),s=Zx(o,t);if(s===null||s.text!==o||!Yx(e)||!Gx(e))return Ns(e),void n(null,e.getURL());const a=e.getURL();if(a!==s.url&&(e.setURL(s.url),n(s.url,a)),s.attributes){const l=e.getRel();l!==s.attributes.rel&&(e.setRel(s.attributes.rel||null),n(s.attributes.rel||null,l));const u=e.getTarget();u!==s.attributes.target&&(e.setTarget(s.attributes.target||null),n(s.attributes.target||null,u))}}function Ns(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(n=>n.getLatest())}function QE(e,t,n){I.useEffect(()=>{e.hasNodes([$i])||function(i,...o){const s=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",i);for(const l of o)a.append("v",l);throw s.search=a.toString(),Error(`Minified Lexical error #${i}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const r=(i,o)=>{n&&n(i,o)};return Mt(e.registerNodeTransform(Tn,i=>{const o=i.getParentOrThrow(),s=i.getPreviousSibling();if(Tr(o)&&!o.getIsUnlinked())Pl(o,t,r);else if(!yn(o)){if(i.isSimpleText()&&(Zu(i.getTextContent())||!Tr(s))){const a=function(l){const u=[l];let c=l.getNextSibling();for(;c!==null&&J(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u}(i);(function(l,u,c){let d=[...l];const f=d.map(b=>b.getTextContent()).join("");let h,g=f,x=0;for(;(h=Zx(g,u))&&h!==null;){const b=h.index,y=b+h.length;if(YE(x+b,x+y,f,d)){const[m,,p,v]=GE(d,x+b,x+y),k=XE(p,x+b-m,x+y-m,h);d=k?[k,...v]:v,c(h.url,null),x=0}else x+=y;g=g.substring(y)}})(a,t,r)}(function(a,l,u){const c=a.getPreviousSibling(),d=a.getNextSibling(),f=a.getTextContent();var h;!Tr(c)||c.getIsUnlinked()||Zu(f)&&(h=f,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(h):/^\.[a-zA-Z0-9]{1,}/.test(h)))||(c.append(a),Pl(c,l,u),u(null,c.getURL())),!Tr(d)||d.getIsUnlinked()||qx(f)||(Ns(d),Pl(d,l,u),u(null,d.getURL()))})(i,t,r)}}),e.registerCommand(Ti,i=>{const o=j();return i!==null||!$(o)||o.extract().forEach(s=>{const a=s.getParent();if(Tr(a))return a.setIsUnlinked(!a.getIsUnlinked()),a.markDirty(),!0}),!1},De))},[e,t,n])}function e4({matchers:e,onChange:t}){const[n]=yt();return QE(n,e,t),null}const t4=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,n4=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,r4=[xg(t4,e=>e.startsWith("http")?e:`https://${e}`),xg(n4,e=>`mailto:${e}`)],i4=()=>_.createElement(e4,{matchers:r4}),o4=ne(!1),s4=on({init(e,t){const n=!!t?.disableAutoLink,r=t?.validateUrl?{validateUrl:t.validateUrl}:{};e.pubIn({[Di]:"link",[Wn]:JE,[pr]:[Zn,$i],[mr]:KE,[o4]:n,[qr]:()=>_.createElement(_.Fragment,null,_.createElement(ZE,{...r}),n?null:_.createElement(i4,null))})}});function a4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var l4=["color"],u4=I.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=a4(e,l4);return I.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),I.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});const yg=()=>_.createElement("div",{className:Y.imagePlaceholder},_.createElement(u4,null));function qu({nodeKey:e,imageSource:t,initialImagePath:n,title:r,alt:i}){const[o,s,a]=rn(b5,In,nn),[l]=yt(),u=_t(x5),c=Bt();return _.createElement("div",{className:Y.editImageToolbar},_.createElement("button",{className:Y.iconButton,type:"button",title:c("imageEditor.deleteImage","Delete image"),disabled:a,onClick:d=>{d.preventDefault(),l.update(()=>{var f;(f=ze(e))==null||f.remove()})}},s("delete_small")),!o&&_.createElement("button",{type:"button",className:ke(Y.iconButton,Y.editImageButton),title:c("imageEditor.editImage","Edit image"),disabled:a,onClick:()=>{u({nodeKey:e,initialValues:{src:n||t,title:r,altText:i}})}},s("settings")))}function eo(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Be.apply(null,arguments)}var Fl={exports:{}},Ll,bg;function c4(){if(bg)return Ll;bg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ll=e,Ll}var Dl,vg;function d4(){if(vg)return Dl;vg=1;var e=c4();function t(){}function n(){}return n.resetWarningCache=t,Dl=function(){function r(s,a,l,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Dl}var Cg;function f4(){return Cg||(Cg=1,Fl.exports=d4()()),Fl.exports}var h4=f4();const K=Qg(h4);var Rl={exports:{}},Me={};/** @license React v17.0.2
|
|
80
|
-
* react-is.production.min.js
|
|
81
|
-
*
|
|
82
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the MIT license found in the
|
|
85
|
-
* LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/var wg;function g4(){if(wg)return Me;wg=1;var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,s=60110,a=60112,l=60113,u=60120,c=60115,d=60116,f=60121,h=60122,g=60117,x=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),i=y("react.profiler"),o=y("react.provider"),s=y("react.context"),a=y("react.forward_ref"),l=y("react.suspense"),u=y("react.suspense_list"),c=y("react.memo"),d=y("react.lazy"),f=y("react.block"),h=y("react.server.block"),g=y("react.fundamental"),x=y("react.debug_trace_mode"),b=y("react.legacy_hidden")}function m(O){if(typeof O=="object"&&O!==null){var B=O.$$typeof;switch(B){case e:switch(O=O.type,O){case n:case i:case r:case l:case u:return O;default:switch(O=O&&O.$$typeof,O){case s:case a:case d:case c:case o:return O;default:return B}}case t:return B}}}var p=o,v=e,k=a,C=n,w=d,S=c,T=t,P=i,F=r,L=l;return Me.ContextConsumer=s,Me.ContextProvider=p,Me.Element=v,Me.ForwardRef=k,Me.Fragment=C,Me.Lazy=w,Me.Memo=S,Me.Portal=T,Me.Profiler=P,Me.StrictMode=F,Me.Suspense=L,Me.isAsyncMode=function(){return!1},Me.isConcurrentMode=function(){return!1},Me.isContextConsumer=function(O){return m(O)===s},Me.isContextProvider=function(O){return m(O)===o},Me.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===e},Me.isForwardRef=function(O){return m(O)===a},Me.isFragment=function(O){return m(O)===n},Me.isLazy=function(O){return m(O)===d},Me.isMemo=function(O){return m(O)===c},Me.isPortal=function(O){return m(O)===t},Me.isProfiler=function(O){return m(O)===i},Me.isStrictMode=function(O){return m(O)===r},Me.isSuspense=function(O){return m(O)===l},Me.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===n||O===i||O===x||O===r||O===l||O===u||O===b||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===c||O.$$typeof===o||O.$$typeof===s||O.$$typeof===a||O.$$typeof===g||O.$$typeof===f||O[0]===h)},Me.typeOf=m,Me}var _g;function p4(){return _g||(_g=1,Rl.exports=g4()),Rl.exports}p4();let kg=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Sg=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",$l=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Sg(n.overflowY,t)||Sg(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},ps=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,m4=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var x4=(e,t)=>{var n,r,i,o,s,a;if(typeof document>"u")return[];let{inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d=typeof u=="function"?u:L=>L!==u;if(!kg(e))throw new TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,h=[],g=e;for(;kg(g)&&d(g);){if(g=m4(g),g===f){h.push(g);break}g!=null&&g===document.body&&$l(g)&&!$l(document.documentElement)||g!=null&&$l(g,c)&&h.push(g)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,y=(s=window.scrollX)!=null?s:pageXOffset,m=(a=window.scrollY)!=null?a:pageYOffset,{height:p,width:v,top:k,right:C,bottom:w,left:S}=e.getBoundingClientRect(),T=k,P=l==="center"?S+v/2:l==="end"?C:S,F=[];for(let L=0;L<h.length;L++){let O=h[L],{height:B,width:H,top:q,right:Z,bottom:Q,left:X}=O.getBoundingClientRect();if(k>=0&&S>=0&&w<=b&&C<=x&&k>=q&&w<=Q&&S>=X&&C<=Z)return F;let N=getComputedStyle(O),oe=parseInt(N.borderLeftWidth,10),ce=parseInt(N.borderTopWidth,10),A=parseInt(N.borderRightWidth,10),fe=parseInt(N.borderBottomWidth,10),ge=0,ae=0,z="offsetWidth"in O?O.offsetWidth-O.clientWidth-oe-A:0,U="offsetHeight"in O?O.offsetHeight-O.clientHeight-ce-fe:0,G="offsetWidth"in O?O.offsetWidth===0?0:H/O.offsetWidth:0,ee="offsetHeight"in O?O.offsetHeight===0?0:B/O.offsetHeight:0;if(f===O)ge=ps(m,m+b,b,ce,fe,m+T,m+T+p,p),ae=l==="start"?P:l==="center"?P-x/2:l==="end"?P-x:ps(y,y+x,x,oe,A,y+P,y+P+v,v),ge=Math.max(0,ge+m),ae=Math.max(0,ae+y);else{ge=ps(q,Q,B,ce,fe+U,T,T+p,p),ae=l==="start"?P-X-oe:l==="center"?P-(X+H/2)+z/2:l==="end"?P-Z+A+z:ps(X,Z,H,oe,A+z,P,P+v,v);let{scrollLeft:se,scrollTop:me}=O;ge=Math.max(0,Math.min(me+ge/ee,O.scrollHeight-B/ee+U)),ae=Math.max(0,Math.min(se+ae/G,O.scrollWidth-H/G+z)),T+=me-ge,P+=se-ae}F.push({el:O,top:ge,left:ae})}return F},y4=0;function Xx(){}function b4(e,t){if(e){var n=x4(e,{boundary:t});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function Eg(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function Qx(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r(),n=setTimeout(function(){n=null,e.apply(void 0,s)},t)}return i.cancel=r,i}function On(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return t.some(function(a){return a&&a.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function ms(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function v4(){return String(y4++)}function C4(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Yu(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=e5(t,r)?t[r]:e[r],n},{})}function e5(e,t){return e[t]!==void 0}function w4(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function xs(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var s=t+e;s<0?s=i?o:0:s>o&&(s=i?0:o);var a=Ao(e,s,n,r,i);return a===-1?t>=n?-1:t:a}function Ao(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return i?e>0?Ao(1,0,n,r,!1):Ao(-1,n-1,n,r,!1):-1}function Tg(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Eg(i,e,n)||r&&Eg(i,n.document.activeElement,n))})}var _4=Qx(function(e){t5(e).textContent=""},500);function k4(e,t){var n=t5(t);e&&(n.textContent=e,_4(t))}function t5(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var S4=["isInitialMount","highlightedIndex","items","environment"],n5={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function E4(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){T4(s,e,t,n),n[s]!==t[s]&&(o[s]=n[s])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(Be({type:i},o))}function T4(e,t,n,r){var i=t.props,o=t.type,s="on"+_d(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](Be({type:o},r))}function I4(e,t){return t.changes}function N4(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var M4=Qx(function(e,t){k4(e(),t)},200),A4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?I.useLayoutEffect:I.useEffect;function O4(e){var t=e.id,n=t===void 0?"downshift-"+v4():t,r=e.labelId,i=e.menuId,o=e.getItemId,s=e.toggleButtonId,a=e.inputId,l=I.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(u){return n+"-item-"+u},toggleButtonId:s||n+"-toggle-button",inputId:a||n+"-input"});return l.current}function P4(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function F4(e){return e?String(e):""}function _d(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function r5(e){var t=I.useRef(e);return t.current=e,t}function L4(e,t,n){var r=I.useRef(),i=I.useRef(),o=I.useCallback(function(f,h){i.current=h,f=Yu(f,h.props);var g=e(f,h),x=h.props.stateReducer(f,Be({},h,{changes:g}));return x},[e]),s=I.useReducer(o,t),a=s[0],l=s[1],u=r5(n),c=I.useCallback(function(f){return l(Be({props:u.current},f))},[u]),d=i.current;return I.useEffect(function(){d&&r.current&&r.current!==a&&E4(d,Yu(r.current,d.props),a),r.current=a},[a,n,d]),[a,c]}var go={itemToString:F4,stateReducer:I4,getA11ySelectionMessage:N4,scrollIntoView:b4,environment:typeof window>"u"?{}:window};function Cn(e,t,n){n===void 0&&(n=n5);var r=e["default"+_d(t)];return r!==void 0?r:n[t]}function ys(e,t,n){n===void 0&&(n=n5);var r=e[t];if(r!==void 0)return r;var i=e["initial"+_d(t)];return i!==void 0?i:Cn(e,t,n)}function D4(e){var t=ys(e,"selectedItem"),n=ys(e,"isOpen"),r=ys(e,"highlightedIndex"),i=ys(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function po(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,s=t.selectedItem,a=t.highlightedIndex;return r.length===0?-1:i!==void 0&&a===i?i:o!==void 0?o:s?r.indexOf(s):n===0?-1:n<0?r.length-1:0}function R4(e,t,n,r){var i=I.useRef({isMouseDown:!1,isTouchMove:!1});return I.useEffect(function(){if(n?.addEventListener!=null){var o=function(){i.current.isMouseDown=!0},s=function(d){i.current.isMouseDown=!1,e&&!Tg(d.target,t.map(function(f){return f.current}),n)&&r()},a=function(){i.current.isTouchMove=!1},l=function(){i.current.isTouchMove=!0},u=function(d){e&&!i.current.isTouchMove&&!Tg(d.target,t.map(function(f){return f.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",a),n.addEventListener("touchmove",l),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",u)}}},[e,n]),i}var $4=function(){return Xx};function Ig(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,a=eo(n,S4);I.useEffect(function(){r||M4(function(){return e(Be({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},a))},s.document)},t)}function B4(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,s=e.scrollIntoView,a=I.useRef(!0);return A4(function(){t<0||!n||!Object.keys(r.current).length||(a.current===!1?a.current=!0:s(i(t),o))},[t]),a}var H4=Xx;function Ng(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return Be({isOpen:!1,highlightedIndex:-1},i&&Be({selectedItem:e.items[t],isOpen:Cn(e,"isOpen"),highlightedIndex:Cn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function V4(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:po(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:po(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:Cn(i,"highlightedIndex"),isOpen:Cn(i,"isOpen"),selectedItem:Cn(i,"selectedItem"),inputValue:Cn(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Be({},e,o)}K.array.isRequired,K.func,K.func,K.func,K.number,K.number,K.number,K.bool,K.bool,K.bool,K.any,K.any,K.any,K.string,K.string,K.string,K.func,K.string,K.func,K.func,K.func,K.func,K.func,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});function z4(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Zd(Zd({},go),{getA11yStatusMessage:z4});var kd=0,Sd=1,Ed=2,Td=3,Id=4,Nd=5,Md=6,Ad=7,Od=8,sa=9,Pd=10,i5=11,o5=12,Fd=13,s5=14,a5=15,l5=16,u5=17,c5=18,Ld=19,d5=20,f5=21,Dd=22,h5=Object.freeze({__proto__:null,InputKeyDownArrowDown:kd,InputKeyDownArrowUp:Sd,InputKeyDownEscape:Ed,InputKeyDownHome:Td,InputKeyDownEnd:Id,InputKeyDownPageUp:Nd,InputKeyDownPageDown:Md,InputKeyDownEnter:Ad,InputChange:Od,InputBlur:sa,InputFocus:Pd,MenuMouseLeave:i5,ItemMouseMove:o5,ItemClick:Fd,ToggleButtonClick:s5,FunctionToggleMenu:a5,FunctionOpenMenu:l5,FunctionCloseMenu:u5,FunctionSetHighlightedIndex:c5,FunctionSelectItem:Ld,FunctionSetInputValue:d5,FunctionReset:f5,ControlledPropUpdatedSelectedItem:Dd});function W4(e){var t=D4(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),Be({},t,{inputValue:r})}K.array.isRequired,K.func,K.func,K.func,K.func,K.number,K.number,K.number,K.bool,K.bool,K.bool,K.any,K.any,K.any,K.string,K.string,K.string,K.string,K.string,K.string,K.func,K.string,K.string,K.func,K.func,K.func,K.func,K.func,K.func,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});function j4(e,t,n){var r=I.useRef(),i=L4(e,t,n),o=i[0],s=i[1];return I.useEffect(function(){e5(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:Dd,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Yu(o,n),s]}var U4=Be({},go,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:C4});function J4(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case Fd:s={isOpen:Cn(i,"isOpen"),highlightedIndex:Cn(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case kd:e.isOpen?s={highlightedIndex:xs(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:po(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Sd:e.isOpen?o?s=Ng(i,e.highlightedIndex):s={highlightedIndex:xs(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:po(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Ad:s=Ng(i,e.highlightedIndex);break;case Ed:s=Be({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nd:s={highlightedIndex:xs(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Md:s={highlightedIndex:xs(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Td:s={highlightedIndex:Ao(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case Id:s={highlightedIndex:Ao(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case sa:s=Be({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case Od:s={isOpen:!0,highlightedIndex:Cn(i,"highlightedIndex"),inputValue:t.inputValue};break;case Pd:s={isOpen:!0,highlightedIndex:po(i,e,0)};break;case Ld:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case Dd:s={inputValue:t.inputValue};break;default:return V4(e,t,h5)}return Be({},e,s)}var K4=["onMouseLeave","refKey","ref"],Z4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],q4=["onClick","onPress","refKey","ref"],Y4=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];g5.stateChangeTypes=h5;function g5(e){e===void 0&&(e={});var t=Be({},U4,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,s=t.environment,a=t.getA11yStatusMessage,l=t.getA11ySelectionMessage,u=t.itemToString,c=W4(t),d=j4(J4,c,t),f=d[0],h=d[1],g=f.isOpen,x=f.highlightedIndex,b=f.selectedItem,y=f.inputValue,m=I.useRef(null),p=I.useRef({}),v=I.useRef(null),k=I.useRef(null),C=I.useRef(!0),w=O4(t),S=I.useRef(),T=r5({state:f,props:t}),P=I.useCallback(function(z){return p.current[w.getItemId(z)]},[w]);Ig(a,[g,x,y,i],Be({isInitialMount:C.current,previousResultCount:S.current,items:i,environment:s,itemToString:u},f)),Ig(l,[b],Be({isInitialMount:C.current,previousResultCount:S.current,items:i,environment:s,itemToString:u},f));var F=B4({menuElement:m.current,highlightedIndex:x,isOpen:g,itemRefs:p,scrollIntoView:o,getItemNodeFromIndex:P});H4({isInitialMount:C.current}),I.useEffect(function(){var z=n||r||g;z&&v.current&&v.current.focus()},[]),I.useEffect(function(){C.current||(S.current=i.length)});var L=R4(g,[v,m,k],s,function(){h({type:sa,selectItem:!1})}),O=$4();I.useEffect(function(){return C.current=!1,function(){C.current=!0}},[]),I.useEffect(function(){var z;if(!g)p.current={};else if(((z=s.document)==null?void 0:z.activeElement)!==v.current){var U;v==null||(U=v.current)==null||U.focus()}},[g,s]);var B=I.useMemo(function(){return{ArrowDown:function(U){U.preventDefault(),h({type:kd,altKey:U.altKey,getItemNodeFromIndex:P})},ArrowUp:function(U){U.preventDefault(),h({type:Sd,altKey:U.altKey,getItemNodeFromIndex:P})},Home:function(U){T.current.state.isOpen&&(U.preventDefault(),h({type:Td,getItemNodeFromIndex:P}))},End:function(U){T.current.state.isOpen&&(U.preventDefault(),h({type:Id,getItemNodeFromIndex:P}))},Escape:function(U){var G=T.current.state;(G.isOpen||G.inputValue||G.selectedItem||G.highlightedIndex>-1)&&(U.preventDefault(),h({type:Ed}))},Enter:function(U){var G=T.current.state;!G.isOpen||U.which===229||(U.preventDefault(),h({type:Ad,getItemNodeFromIndex:P}))},PageUp:function(U){T.current.state.isOpen&&(U.preventDefault(),h({type:Nd,getItemNodeFromIndex:P}))},PageDown:function(U){T.current.state.isOpen&&(U.preventDefault(),h({type:Md,getItemNodeFromIndex:P}))}}},[h,T,P]),H=I.useCallback(function(z){return Be({id:w.labelId,htmlFor:w.inputId},z)},[w]),q=I.useCallback(function(z,U){var G,ee=z===void 0?{}:z,se=ee.onMouseLeave,me=ee.refKey,Pe=me===void 0?"ref":me,He=ee.ref,Ye=eo(ee,K4),Ge=U===void 0?{}:U;return Ge.suppressRefError,Be((G={},G[Pe]=ms(He,function(Qe){m.current=Qe}),G.id=w.menuId,G.role="listbox",G["aria-labelledby"]=Ye&&Ye["aria-label"]?void 0:""+w.labelId,G.onMouseLeave=On(se,function(){h({type:i5})}),G),Ye)},[h,O,w]),Z=I.useCallback(function(z){var U,G,ee=z===void 0?{}:z,se=ee.item,me=ee.index,Pe=ee.refKey,He=Pe===void 0?"ref":Pe,Ye=ee.ref,Ge=ee.onMouseMove,Qe=ee.onMouseDown,un=ee.onClick;ee.onPress;var bt=ee.disabled,Ft=eo(ee,Z4),st=T.current,cn=st.props,vt=st.state,Ce=P4(se,me,cn.items,"Pass either item or index to getItemProps!"),Ct=Ce[1],R="onClick",V=un,E=function(){Ct!==vt.highlightedIndex&&(F.current=!1,h({type:o5,index:Ct,disabled:bt}))},le=function(){h({type:Fd,index:Ct})},pe=function(Ht){return Ht.preventDefault()};return Be((U={},U[He]=ms(Ye,function(Ne){Ne&&(p.current[w.getItemId(Ct)]=Ne)}),U.disabled=bt,U.role="option",U["aria-selected"]=""+(Ct===vt.highlightedIndex),U.id=w.getItemId(Ct),U),!bt&&(G={},G[R]=On(V,le),G),{onMouseMove:On(Ge,E),onMouseDown:On(Qe,pe)},Ft)},[h,T,F,w]),Q=I.useCallback(function(z){var U,G=z===void 0?{}:z,ee=G.onClick;G.onPress;var se=G.refKey,me=se===void 0?"ref":se,Pe=G.ref,He=eo(G,q4),Ye=T.current.state,Ge=function(){h({type:s5})};return Be((U={},U[me]=ms(Pe,function(Qe){k.current=Qe}),U["aria-controls"]=w.menuId,U["aria-expanded"]=Ye.isOpen,U.id=w.toggleButtonId,U.tabIndex=-1,U),!He.disabled&&Be({},{onClick:On(ee,Ge)}),He)},[h,T,w]),X=I.useCallback(function(z,U){var G,ee=z===void 0?{}:z,se=ee.onKeyDown,me=ee.onChange,Pe=ee.onInput,He=ee.onFocus,Ye=ee.onBlur;ee.onChangeText;var Ge=ee.refKey,Qe=Ge===void 0?"ref":Ge,un=ee.ref,bt=eo(ee,Y4),Ft=U===void 0?{}:U;Ft.suppressRefError;var st=T.current.state,cn=function(pe){var Ne=w4(pe);Ne&&B[Ne]&&B[Ne](pe)},vt=function(pe){h({type:Od,inputValue:pe.target.value})},Ce=function(pe){if(st.isOpen&&!L.current.isMouseDown){var Ne=pe.relatedTarget===null&&s.document.activeElement!==s.document.body;h({type:sa,selectItem:!Ne})}},Ct=function(){st.isOpen||h({type:Pd})},R="onChange",V={};if(!bt.disabled){var E;V=(E={},E[R]=On(me,Pe,vt),E.onKeyDown=On(se,cn),E.onBlur=On(Ye,Ce),E.onFocus=On(He,Ct),E)}return Be((G={},G[Qe]=ms(un,function(le){v.current=le}),G["aria-activedescendant"]=st.isOpen&&st.highlightedIndex>-1?w.getItemId(st.highlightedIndex):"",G["aria-autocomplete"]="list",G["aria-controls"]=w.menuId,G["aria-expanded"]=st.isOpen,G["aria-labelledby"]=bt&&bt["aria-label"]?void 0:""+w.labelId,G.autoComplete="off",G.id=w.inputId,G.role="combobox",G.value=st.inputValue,G),V,bt)},[O,T,w,B,h,L,s]),N=I.useCallback(function(){h({type:a5})},[h]),oe=I.useCallback(function(){h({type:u5})},[h]),ce=I.useCallback(function(){h({type:l5})},[h]),A=I.useCallback(function(z){h({type:c5,highlightedIndex:z})},[h]),fe=I.useCallback(function(z){h({type:Ld,selectedItem:z})},[h]),ge=I.useCallback(function(z){h({type:d5,inputValue:z})},[h]),ae=I.useCallback(function(){h({type:f5})},[h]);return{getItemProps:Z,getLabelProps:H,getMenuProps:q,getInputProps:X,getToggleButtonProps:Q,toggleMenu:N,openMenu:ce,closeMenu:oe,setHighlightedIndex:A,setInputValue:ge,selectItem:fe,reset:ae,highlightedIndex:x,isOpen:g,selectedItem:b,inputValue:y}}K.array,K.array,K.array,K.func,K.func,K.func,K.number,K.number,K.number,K.func,K.func,K.string,K.string,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});go.itemToString,go.stateReducer,go.environment;const Mg=20,p5=e=>e.suggestions.length>0?_.createElement(G4,{...e}):_.createElement("input",{className:Y.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),G4=({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:s})=>{const[a,l]=_.useState(t.slice(0,Mg)),u=Ot(In),c=t.length>0,{isOpen:d,getToggleButtonProps:f,getMenuProps:h,getInputProps:g,highlightedIndex:x,getItemProps:b,selectedItem:y}=g5({initialInputValue:o,onInputValueChange({inputValue:p=""}){s(r,p),p=p.toLowerCase()||"";const v=[];for(const k of t)if(k.toLowerCase().includes(p)&&(v.push(k),v.length>=Mg))break;l(v)},items:a,itemToString(p){return p??""}}),m=d&&a.length>0;return _.createElement("div",{className:Y.downshiftAutocompleteContainer},_.createElement("div",{"data-visible-dropdown":m,className:Y.downshiftInputWrapper},_.createElement(Iy,{name:r,control:n,render:({field:p})=>{const v=g();return _.createElement("input",{...v,name:p.name,placeholder:i,className:Y.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})}}),c&&_.createElement("button",{"aria-label":"toggle menu",type:"button",...f()},u("arrow_drop_down"))),_.createElement("div",{className:Y.downshiftAutocompleteContainer},_.createElement("ul",{...h(),"data-visible":m},a.map((p,v)=>_.createElement("li",{"data-selected":y===p,"data-highlighted":x===v,key:`${p}${v}`,...b({item:p,index:v})},p)))))},X4=()=>{const[e,t,n,r]=rn(Gu,Or,Go,rr),i=_t(v5),o=_t(y5),s=Bt(),{register:a,handleSubmit:l,control:u,setValue:c,reset:d}=uc({values:t.type==="editing"?t.initialValues:{}});return t.type==="inactive"?null:_.createElement(fp,{open:!0,onOpenChange:f=>{f||(o(),d({src:"",title:"",altText:""}))}},_.createElement(pp,{container:n?.current},_.createElement(mp,{className:Y.dialogOverlay}),_.createElement(hp,{className:Y.dialogContent,onOpenAutoFocus:f=>{f.preventDefault()}},_.createElement(gp,null,s("uploadImage.dialogTitle","Upload an image")),_.createElement("form",{onSubmit:async f=>{f.preventDefault(),f.stopPropagation(),await l(i)(f),d({src:"",title:"",altText:""})},className:Y.multiFieldForm},r===null?_.createElement("input",{type:"hidden",accept:"image/*",...a("file")}):_.createElement("div",{className:Y.formField},_.createElement("label",{htmlFor:"file"},s("uploadImage.uploadInstructions","Upload an image from your device:")),_.createElement("input",{type:"file",accept:"image/*",...a("file")})),_.createElement("div",{className:Y.formField},_.createElement("label",{htmlFor:"src"},r!==null?s("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):s("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),_.createElement(p5,{register:a,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:c,control:u,placeholder:s("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),_.createElement("div",{className:Y.formField},_.createElement("label",{htmlFor:"alt"},s("uploadImage.alt","Alt:")),_.createElement("input",{type:"text",...a("altText"),className:Y.textInput})),_.createElement("div",{className:Y.formField},_.createElement("label",{htmlFor:"title"},s("uploadImage.title","Title:")),_.createElement("input",{type:"text",...a("title"),className:Y.textInput})),_.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},_.createElement("button",{type:"submit",title:s("dialogControls.save","Save"),"aria-label":s("dialogControls.save","Save"),className:ke(Y.primaryButton)},s("dialogControls.save","Save")),_.createElement(dc,{asChild:!0},_.createElement("button",{type:"reset",title:s("dialogControls.cancel","Cancel"),"aria-label":s("dialogControls.cancel","Cancel"),className:ke(Y.secondaryButton)},s("dialogControls.cancel","Cancel"))))))))};function Bl(e,t,n){return Math.min(Math.max(e,t),n)}const Fe={east:1,north:8,south:2,west:4};function Q4({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const o=I.useRef(null),s=I.useRef({priority:"",value:"default"}),a=I.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),l=i.getRootElement(),u=r||(l!==null?l.getBoundingClientRect().width-20:100),c=l!==null?l.getBoundingClientRect().height-20:100,d=100,f=100,h=m=>{const p=m===Fe.east||m===Fe.west,v=m===Fe.north||m===Fe.south,k=m&Fe.north&&m&Fe.west||m&Fe.south&&m&Fe.east,C=p?"ew":v?"ns":k?"nwse":"nesw";l!==null&&l.style.setProperty("cursor",`${C}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${C}-resize`,"important"),s.current.value=document.body.style.getPropertyValue("-webkit-user-select"),s.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},g=()=>{l!==null&&l.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",s.current.value,s.current.priority))},x=(m,p)=>{if(!i.isEditable())return;const v=n.current,k=o.current;if(v!==null&&k!==null){m.preventDefault();const{width:C,height:w}=v.getBoundingClientRect(),S=a.current;S.startWidth=C,S.startHeight=w,S.ratio=C/w,S.currentWidth=C,S.currentHeight=w,S.startX=m.clientX,S.startY=m.clientY,S.isResizing=!0,S.direction=p,h(p),e(),k.classList.add(Y.imageControlWrapperResizing),v.style.height=`${w}px`,v.style.width=`${C}px`,document.addEventListener("pointermove",b),document.addEventListener("pointerup",y)}},b=m=>{const p=n.current,v=a.current,k=v.direction&(Fe.east|Fe.west),C=v.direction&(Fe.south|Fe.north);if(p!==null&&v.isResizing)if(k&&C){let w=Math.floor(v.startX-m.clientX);w=v.direction&Fe.east?-w:w;const S=Bl(v.startWidth+w,d,u),T=S/v.ratio;p.style.width=`${S}px`,p.style.height=`${T}px`,v.currentHeight=T,v.currentWidth=S}else if(C){let w=Math.floor(v.startY-m.clientY);w=v.direction&Fe.south?-w:w;const S=Bl(v.startHeight+w,f,c);p.style.height=`${S}px`,v.currentHeight=S}else{let w=Math.floor(v.startX-m.clientX);w=v.direction&Fe.east?-w:w;const S=Bl(v.startWidth+w,d,u);p.style.width=`${S}px`,v.currentWidth=S}},y=()=>{const m=n.current,p=a.current,v=o.current;if(m!==null&&v!==null&&p.isResizing){const k=p.currentWidth,C=p.currentHeight;p.startWidth=0,p.startHeight=0,p.ratio=0,p.startX=0,p.startY=0,p.currentWidth=0,p.currentHeight=0,p.isResizing=!1,v.classList.remove(Y.imageControlWrapperResizing),g(),t(k,C),document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",y)}};return I.createElement("div",{ref:o},I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerN),onPointerDown:m=>{x(m,Fe.north)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerNe),onPointerDown:m=>{x(m,Fe.north|Fe.east)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerE),onPointerDown:m=>{x(m,Fe.east)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerSe),onPointerDown:m=>{x(m,Fe.south|Fe.east)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerS),onPointerDown:m=>{x(m,Fe.south)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerSw),onPointerDown:m=>{x(m,Fe.south|Fe.west)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerW),onPointerDown:m=>{x(m,Fe.west)}}),I.createElement("div",{className:ke(Y.imageResizer,Y.imageResizerNw),onPointerDown:m=>{x(m,Fe.north|Fe.west)}}))}const eT="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
|
|
87
|
-
<svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
|
88
|
-
<rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
|
|
89
|
-
<text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
|
|
90
|
-
</svg>
|
|
91
|
-
`),tT={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{const n=new Image;n.onerror=()=>{this.__cache[e]=eT,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function nT({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:s}){return _.createElement("img",{className:n??void 0,alt:t,src:tT.read(i),title:e,ref:r,draggable:"false",width:o,height:s})}function rT({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:s}){const[a,l,u,c,d]=rn(ec,Xu,Qu,nn,tc),f=_.useRef(null),h=_.useRef(null),[g,x,b]=fx(r),[y]=yt(),[m,p]=_.useState(null),v=_.useRef(null),[k,C]=_.useState(!1),[w,S]=_.useState(null),[T,P]=_.useState(null),F=_.useCallback(X=>{if(g&&et(j())){X.preventDefault();const oe=ze(r);aa(oe)&&oe.remove()}return!1},[g,r]),L=_.useCallback(X=>{const N=j(),oe=h.current;return g&&et(N)&&N.getNodes().length===1&&oe!==null&&oe!==document.activeElement?(X.preventDefault(),oe.focus(),!0):!1},[g]),O=_.useCallback(X=>h.current===X.target?(Xe(null),y.update(()=>{x(!0);const N=y.getRootElement();N!==null&&N.focus()}),!0):!1,[y,x]);_.useEffect(()=>{u?(async()=>{T||P(e);const N=await u(e);S(N)})().catch(N=>{console.error(N)}):S(e)},[e,u,T]),_.useEffect(()=>{let X=!0;const N=Mt(y.registerUpdateListener(({editorState:oe})=>{X&&p(oe.read(()=>j()))}),y.registerCommand(xa,(oe,ce)=>(v.current=ce,!1),De),y.registerCommand(ya,oe=>{const ce=oe;return k?!0:ce.target===f.current?(ce.shiftKey?x(!g):(b(),x(!0)),!0):!1},De),y.registerCommand(_a,oe=>oe.target===f.current?(oe.preventDefault(),!0):!1,De),y.registerCommand(wa,F,De),y.registerCommand(Ca,F,De),y.registerCommand(Eo,L,De),y.registerCommand(Bo,O,De));return()=>{X=!1,N()}},[b,y,k,g,r,F,L,O,x]);const B=(X,N)=>{setTimeout(()=>{C(!1)},200),y.update(()=>{const oe=ze(r);aa(oe)&&oe.setWidthAndHeight(X,N)})},H=()=>{C(!0)},q=et(m),Z=g,Q=_.useMemo(()=>{if(s.length===0)return null;const X=s.find(N=>N.type==="mdxJsxAttribute"&&(N.name==="class"||N.name==="className"));return X?X.value:null},[s]);return w!==null?_.createElement(_.Suspense,{fallback:a?_.createElement(a,null):null},_.createElement("div",{className:Y.imageWrapper,"data-editor-block-type":"image"},_.createElement("div",{draggable:q},_.createElement(nT,{width:i,height:o,className:ke({[Y.focusedImage]:Z},Q),src:w,title:t??"",alt:n??"",imageRef:f})),q&&Z&&!l&&_.createElement(Q4,{editor:y,imageRef:f,onResizeStart:H,onResizeEnd:B}),c||_.createElement(d,{nodeKey:r,imageSource:w,initialImagePath:T,title:t??"",alt:n??""}))):null}var iT=Object.defineProperty,oT=(e,t,n)=>t in e?iT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ni=(e,t,n)=>(oT(e,typeof t!="symbol"?t+"":t,n),n);function sT(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:Yr({altText:t,src:n,title:r,width:i,height:o})}}return null}class es extends jo{constructor(t,n,r,i,o,s,a){super(a),ni(this,"__src"),ni(this,"__altText"),ni(this,"__title"),ni(this,"__width"),ni(this,"__height"),ni(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i||"inherit",this.__height=o||"inherit",this.__rest=s??[]}static getType(){return"image"}static clone(t){return new es(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}static importJSON(t){const{altText:n,title:r,src:i,width:o,rest:s,height:a}=t;return Yr({altText:n,title:r,src:i,height:a,width:o,rest:s})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width&&t.setAttribute("width",this.__width.toString()),this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:()=>({conversion:sT,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t){const n=document.createElement("span"),i=t.theme.image;return i!==void 0&&(n.className=i),n}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return _.createElement(rT,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function Yr(e){const{altText:t,title:n,src:r,key:i,width:o,height:s,rest:a}=e;return new es(r,t,n,o,s,a,i)}function aa(e){return e instanceof es}const aT={testLexicalNode:aa,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},lT={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Yr({src:e.url,altText:e.alt??"",title:e.title??""}))}},uT={testNode:e=>e.type==="html"&&e.value.trim().startsWith("<img"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,o=r.alt,s=r.title,a=r.width,l=r.height,u=Yr({src:i||"",altText:o,title:s,width:a,height:l});if(t.getType()==="root"){const c=Ee();c.append(u),t.append(c)}else t.append(u)}};function Zi(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}const cT={testNode:e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img",visitNode({mdastNode:e,lexicalParent:t}){const n=Zi(e,"src");if(!n)return;const r=Zi(e,"alt")??"",i=Zi(e,"title"),o=Zi(e,"height"),s=Zi(e,"width"),a=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),l=Yr({src:n,altText:r,title:i,width:s?parseInt(s,10):void 0,height:o?parseInt(o,10):void 0,rest:a});if(t.getType()==="root"){const u=Ee();u.append(l),t.append(u)}else t.append(l)}},Rd=it(e=>{e.sub(e.pipe(Rd,We(qe)),([t,n])=>{n?.update(()=>{const r=Yr({altText:t.altText??"",src:t.src,title:t.title??""});Ai([r]),je(r.getParentOrThrow())&&id(r,Ee).selectEnd()})})}),dT=it(e=>{e.sub(e.pipe(dT,We(rr)),([t,n])=>{const r=i=>{e.pub(Rd,{...t,src:i})};"file"in t?n?.(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),Gu=ne([]),Xu=ne(!1),rr=ne(null),Qu=ne(null),ec=ne(null),Or=ne({type:"inactive"},e=>{e.sub(e.pipe(v5,We(qe,rr,Or)),([t,n,r,i])=>{const o=i.type==="editing"?s=>{n?.update(()=>{const{nodeKey:a}=i,l=ze(a);l.setTitle(t.title),l.setAltText(t.altText),l.setSrc(s)}),e.pub(Or,{type:"inactive"})}:s=>{e.pub(Rd,{...t,src:s}),e.pub(Or,{type:"inactive"})};t.file&&t.file.length>0?r?.(t.file.item(0)).then(o).catch(s=>{throw s}):t.src&&o(t.src)}),e.pub(Mo,t=>{const n=e.getValue(rr);return Mt(t.registerCommand(la,r=>{const i=Yr(r);return Ai([i]),je(i.getParentOrThrow())&&id(i,Ee).selectEnd(),!0},xe),t.registerCommand(_a,r=>pT(r),du),t.registerCommand(Ac,r=>mT(r,!!n),De),t.registerCommand(Mc,r=>xT(r,t,e.getValue(rr)),du),t.registerCommand($o,r=>{var i,o;if(!n){let u=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return u=u.filter(c=>c.type.includes("text")),!u.length||u.length===0}const s=Array.from(((o=r.clipboardData)==null?void 0:o.items)??[]);if(s.some(u=>!u.type.includes("image"))||!s.length||s.length===0)return!1;const l=e.getValue(rr);return Promise.all(s.map(u=>l(u.getAsFile()))).then(u=>{u.forEach(c=>{t.dispatchCommand(la,{src:c,altText:""})})}).catch(u=>{throw u}),!0},zn))})}),m5=cr(e=>{e.link(e.pipe(m5,Om({type:"new"})),Or)}),x5=it(e=>{e.link(e.pipe(x5,li(t=>({type:"editing",...t}))),Or)}),y5=cr(e=>{e.link(e.pipe(y5,Om({type:"inactive"})),Or)}),b5=ne(!1),v5=it(),tc=ne(qu),fT=on({init(e,t){e.pubIn({[Wn]:[lT,uT,cT],[pr]:es,[mr]:aT,[qr]:t?.ImageDialog??X4,[rr]:t?.imageUploadHandler??null,[Gu]:t?.imageAutocompleteSuggestions??[],[Xu]:!!t?.disableImageResize,[b5]:!!t?.disableImageSettingsButton,[Qu]:t?.imagePreviewHandler??null,[tc]:t?.EditImageToolbar??qu,[ec]:t?.imagePlaceholder??yg})},update(e,t){e.pubIn({[rr]:t?.imageUploadHandler??null,[Gu]:t?.imageAutocompleteSuggestions??[],[Xu]:!!t?.disableImageResize,[Qu]:t?.imagePreviewHandler??null,[tc]:t?.EditImageToolbar??qu,[ec]:t?.imagePlaceholder??yg})}}),hT=e=>cx?(e??window).getSelection():null,la=Jn(),gT="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function pT(e){const t=$d();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=gT,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}function mT(e,t){var n;if(t){let i=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(i=i.filter(o=>o.type.includes("image")),i.length>0)return e.preventDefault(),!0}return $d()?(C5(e)||e.preventDefault(),!0):!1}function xT(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(a=>a.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(a=>a.kind==="string"?new Promise(l=>{a.getAsString(l)}):n(a.getAsFile()))).then(a=>{a.forEach(l=>{t.dispatchCommand(la,{src:l,altText:""})})}).catch(a=>{throw a}),!0;const o=$d();if(!o)return!1;const s=yT(e);if(!s)return!1;if(e.preventDefault(),C5(e)){const a=bT(e);o.remove();const l=zo();a!=null&&l.applyDOMRange(a),Xe(l),t.dispatchCommand(la,s)}return!0}function $d(){const e=j();if(!et(e))return null;const n=e.getNodes()[0];return aa(n)?n:null}function yT(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}function C5(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}function bT(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=hT(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}const vT={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(Zo())}},CT={testLexicalNode:vu,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}},wT=on({init(e){e.pubIn({[Di]:"quote",[Wn]:vT,[pr]:La,[mr]:CT})}});function _T(){let e=ui;return{publish:()=>{e()},subscribe:t=>{e=t}}}var kT=Object.defineProperty,ST=(e,t,n)=>t in e?kT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qn=(e,t,n)=>(ST(e,typeof t!="symbol"?t+"":t,n),n);class Bi extends jo{constructor(t,n,r,i){super(i),Qn(this,"__code"),Qn(this,"__meta"),Qn(this,"__language"),Qn(this,"__focusEmitter",_T()),Qn(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),Qn(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),Qn(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),Qn(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new Bi(t.__code,t.__language,t.__meta,t.__key)}static importJSON(t){const{code:n,meta:r,language:i}=t;return ts({code:n,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:MT,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return _.createElement(IT,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const w5=_.createContext(null),ET=({parentEditor:e,lexicalNode:t,children:n})=>{const r=_.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(fd,void 0)},0)})},setLanguage:i=>{e.update(()=>{t.setLanguage(i)})},setMeta:i=>{e.update(()=>{t.setMeta(i)})}}),[t,e]);return _.createElement(w5.Provider,{value:r},n)};function TT(){const e=_.useContext(w5);if(!e)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return e}const IT=e=>{const t=Ot(Va),n=Ot(Bd);let r=t.sort((l,u)=>u.priority-l.priority).find(l=>l.match(e.language||"",e.meta||""));if(r||(r=t.find(l=>l.match(n||"",e.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:o,parentEditor:s,...a}=e;return _.createElement(ET,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},_.createElement(i,{...a}))};function ts(e){const{code:t="",language:n="",meta:r=""}=e;return new Bi(t,n,r)}function NT(e){return e instanceof Bi}function MT(e){const t=e,n=t.textContent??"",r=e.getAttribute("class")??"",i=e.getAttribute("data-language")??"",o=r.match(/language-(\w+)/),s=o?o[1]:i,a=t.getAttribute("data-meta")??"";return{node:ts({code:n,language:s,meta:a})}}const AT={testLexicalNode:NT,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("code",{value:e.getCode(),lang:e.getLanguage(),meta:e.getMeta()})}},OT={testNode:(e,{codeBlockEditorDescriptors:t})=>e.type==="code"?t.find(r=>r.match(e.lang,e.meta))!==void 0:!1,visitNode({mdastNode:e,actions:t}){t.addAndStepInto(ts({code:e.value,language:e.lang,meta:e.meta}))}},Bd=ne(""),PT=it(e=>{e.link(e.pipe(PT,We(Bd),li(([t,n])=>()=>ts({language:n,...t}))),ox)});Et(Va);const FT=on({update(e,t){e.pub(Bd,t?.defaultCodeBlockLanguage??"")},init(e,t){e.pubIn({[Di]:"codeblock",[Va]:t?.codeBlockEditorDescriptors??[],[Wn]:OT,[pr]:Bi,[mr]:AT})}});function Ag(e,[t,n]){return Math.min(n,Math.max(t,e))}var LT=[" ","Enter","ArrowUp","ArrowDown"],DT=[" ","Enter"],Ur="Select",[Ja,Ka,RT]=_x(Ur),[Hi,JN]=Kr(Ur,[RT,ca]),Za=ca(),[$T,yr]=Hi(Ur),[BT,HT]=Hi(Ur),_5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:g}=e,x=Za(t),[b,y]=I.useState(null),[m,p]=I.useState(null),[v,k]=I.useState(!1),C=ja(u),[w,S]=Pr({prop:r,defaultProp:i??!1,onChange:o,caller:Ur}),[T,P]=Pr({prop:s,defaultProp:a,onChange:l,caller:Ur}),F=I.useRef(null),L=b?g||!!b.closest("form"):!0,[O,B]=I.useState(new Set),H=Array.from(O).map(q=>q.props.value).join(";");return M.jsx(np,{...x,children:M.jsxs($T,{required:h,scope:t,trigger:b,onTriggerChange:y,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:v,onValueNodeHasChildrenChange:k,contentId:Oo(),value:T,onValueChange:P,open:w,onOpenChange:S,dir:C,triggerPointerDownPosRef:F,disabled:f,children:[M.jsx(Ja.Provider,{scope:t,children:M.jsx(BT,{scope:e.__scopeSelect,onNativeOptionAdd:I.useCallback(q=>{B(Z=>new Set(Z).add(q))},[]),onNativeOptionRemove:I.useCallback(q=>{B(Z=>{const Q=new Set(Z);return Q.delete(q),Q})},[]),children:n})}),L?M.jsxs(W5,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:q=>P(q.target.value),disabled:f,form:g,children:[T===void 0?M.jsx("option",{value:""}):null,Array.from(O)]},H):null]})})};_5.displayName=Ur;var k5="SelectTrigger",S5=I.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Za(n),s=yr(k5,n),a=s.disabled||r,l=ct(t,s.onTriggerChange),u=Ka(n),c=I.useRef("touch"),[d,f,h]=U5(x=>{const b=u().filter(p=>!p.disabled),y=b.find(p=>p.value===s.value),m=J5(b,x,y);m!==void 0&&s.onValueChange(m.value)}),g=x=>{a||(s.onOpenChange(!0),h()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return M.jsx(cc,{asChild:!0,...o,children:M.jsx(Ue.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":j5(s.value)?"":void 0,...i,ref:l,onClick:we(i.onClick,x=>{x.currentTarget.focus(),c.current!=="mouse"&&g(x)}),onPointerDown:we(i.onPointerDown,x=>{c.current=x.pointerType;const b=x.target;b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(g(x),x.preventDefault())}),onKeyDown:we(i.onKeyDown,x=>{const b=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(b&&x.key===" ")&<.includes(x.key)&&(g(),x.preventDefault())})})})});S5.displayName=k5;var E5="SelectValue",T5=I.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...a}=e,l=yr(E5,n),{onValueNodeHasChildrenChange:u}=l,c=o!==void 0,d=ct(t,l.onValueNodeChange);return or(()=>{u(c)},[u,c]),M.jsx(Ue.span,{...a,ref:d,style:{pointerEvents:"none"},children:j5(l.value)?M.jsx(M.Fragment,{children:s}):o})});T5.displayName=E5;var VT="SelectIcon",I5=I.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return M.jsx(Ue.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});I5.displayName=VT;var zT="SelectPortal",N5=e=>M.jsx(rp,{asChild:!0,...e});N5.displayName=zT;var Jr="SelectContent",M5=I.forwardRef((e,t)=>{const n=yr(Jr,e.__scopeSelect),[r,i]=I.useState();if(or(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Os.createPortal(M.jsx(A5,{scope:e.__scopeSelect,children:M.jsx(Ja.Slot,{scope:e.__scopeSelect,children:M.jsx("div",{children:e.children})})}),o):null}return M.jsx(O5,{...e,ref:t})});M5.displayName=Jr;var Jt=10,[A5,br]=Hi(Jr),WT="SelectContentImpl",jT=As("SelectContent.RemoveScroll"),O5=I.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:x,avoidCollisions:b,...y}=e,m=yr(Jr,n),[p,v]=I.useState(null),[k,C]=I.useState(null),w=ct(t,z=>v(z)),[S,T]=I.useState(null),[P,F]=I.useState(null),L=Ka(n),[O,B]=I.useState(!1),H=I.useRef(!1);I.useEffect(()=>{if(p)return op(p)},[p]),ap();const q=I.useCallback(z=>{const[U,...G]=L().map(me=>me.ref.current),[ee]=G.slice(-1),se=document.activeElement;for(const me of z)if(me===se||(me?.scrollIntoView({block:"nearest"}),me===U&&k&&(k.scrollTop=0),me===ee&&k&&(k.scrollTop=k.scrollHeight),me?.focus(),document.activeElement!==se))return},[L,k]),Z=I.useCallback(()=>q([S,p]),[q,S,p]);I.useEffect(()=>{O&&Z()},[O,Z]);const{onOpenChange:Q,triggerPointerDownPosRef:X}=m;I.useEffect(()=>{if(p){let z={x:0,y:0};const U=ee=>{z={x:Math.abs(Math.round(ee.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(ee.pageY)-(X.current?.y??0))}},G=ee=>{z.x<=10&&z.y<=10?ee.preventDefault():p.contains(ee.target)||Q(!1),document.removeEventListener("pointermove",U),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",G,{capture:!0})}}},[p,Q,X]),I.useEffect(()=>{const z=()=>Q(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[Q]);const[N,oe]=U5(z=>{const U=L().filter(se=>!se.disabled),G=U.find(se=>se.ref.current===document.activeElement),ee=J5(U,z,G);ee&&setTimeout(()=>ee.ref.current.focus())}),ce=I.useCallback((z,U,G)=>{const ee=!H.current&&!G;(m.value!==void 0&&m.value===U||ee)&&(T(z),ee&&(H.current=!0))},[m.value]),A=I.useCallback(()=>p?.focus(),[p]),fe=I.useCallback((z,U,G)=>{const ee=!H.current&&!G;(m.value!==void 0&&m.value===U||ee)&&F(z)},[m.value]),ge=r==="popper"?nc:P5,ae=ge===nc?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:x,avoidCollisions:b}:{};return M.jsx(A5,{scope:n,content:p,viewport:k,onViewportChange:C,itemRefCallback:ce,selectedItem:S,onItemLeave:A,itemTextRefCallback:fe,focusSelectedItem:Z,selectedItemText:P,position:r,isPositioned:O,searchRef:N,children:M.jsx(sp,{as:jT,allowPinchZoom:!0,children:M.jsx(lp,{asChild:!0,trapped:m.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:we(i,z=>{m.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:M.jsx(up,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:M.jsx(ge,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:z=>z.preventDefault(),...y,...ae,onPlaced:()=>B(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:we(y.onKeyDown,z=>{const U=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!U&&z.key.length===1&&oe(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ee=L().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const se=z.target,me=ee.indexOf(se);ee=ee.slice(me+1)}setTimeout(()=>q(ee)),z.preventDefault()}})})})})})})});O5.displayName=WT;var UT="SelectItemAlignedPosition",P5=I.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=yr(Jr,n),s=br(Jr,n),[a,l]=I.useState(null),[u,c]=I.useState(null),d=ct(t,w=>c(w)),f=Ka(n),h=I.useRef(!1),g=I.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:y,focusSelectedItem:m}=s,p=I.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&x&&b&&y){const w=o.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),T=o.valueNode.getBoundingClientRect(),P=y.getBoundingClientRect();if(o.dir!=="rtl"){const se=P.left-S.left,me=T.left-se,Pe=w.left-me,He=w.width+Pe,Ye=Math.max(He,S.width),Ge=window.innerWidth-Jt,Qe=Ag(me,[Jt,Math.max(Jt,Ge-Ye)]);a.style.minWidth=He+"px",a.style.left=Qe+"px"}else{const se=S.right-P.right,me=window.innerWidth-T.right-se,Pe=window.innerWidth-w.right-me,He=w.width+Pe,Ye=Math.max(He,S.width),Ge=window.innerWidth-Jt,Qe=Ag(me,[Jt,Math.max(Jt,Ge-Ye)]);a.style.minWidth=He+"px",a.style.right=Qe+"px"}const F=f(),L=window.innerHeight-Jt*2,O=x.scrollHeight,B=window.getComputedStyle(u),H=parseInt(B.borderTopWidth,10),q=parseInt(B.paddingTop,10),Z=parseInt(B.borderBottomWidth,10),Q=parseInt(B.paddingBottom,10),X=H+q+O+Q+Z,N=Math.min(b.offsetHeight*5,X),oe=window.getComputedStyle(x),ce=parseInt(oe.paddingTop,10),A=parseInt(oe.paddingBottom,10),fe=w.top+w.height/2-Jt,ge=L-fe,ae=b.offsetHeight/2,z=b.offsetTop+ae,U=H+q+z,G=X-U;if(U<=fe){const se=F.length>0&&b===F[F.length-1].ref.current;a.style.bottom="0px";const me=u.clientHeight-x.offsetTop-x.offsetHeight,Pe=Math.max(ge,ae+(se?A:0)+me+Z),He=U+Pe;a.style.height=He+"px"}else{const se=F.length>0&&b===F[0].ref.current;a.style.top="0px";const Pe=Math.max(fe,H+x.offsetTop+(se?ce:0)+ae)+G;a.style.height=Pe+"px",x.scrollTop=U-fe+x.offsetTop}a.style.margin=`${Jt}px 0`,a.style.minHeight=N+"px",a.style.maxHeight=L+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,a,u,x,b,y,o.dir,r]);or(()=>p(),[p]);const[v,k]=I.useState();or(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const C=I.useCallback(w=>{w&&g.current===!0&&(p(),m?.(),g.current=!1)},[p,m]);return M.jsx(KT,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:C,children:M.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:M.jsx(Ue.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});P5.displayName=UT;var JT="SelectPopperPosition",nc=I.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Jt,...o}=e,s=Za(n);return M.jsx(cp,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}})});nc.displayName=JT;var[KT,Hd]=Hi(Jr,{}),rc="SelectViewport",F5=I.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=br(rc,n),s=Hd(rc,n),a=ct(t,o.onViewportChange),l=I.useRef(0);return M.jsxs(M.Fragment,{children:[M.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:r}),M.jsx(Ja.Slot,{scope:n,children:M.jsx(Ue.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:we(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f?.current&&d){const h=Math.abs(l.current-c.scrollTop);if(h>0){const g=window.innerHeight-Jt*2,x=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),y=Math.max(x,b);if(y<g){const m=y+h,p=Math.min(g,m),v=m-p;d.style.height=p+"px",d.style.bottom==="0px"&&(c.scrollTop=v>0?v:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});F5.displayName=rc;var L5="SelectGroup",[ZT,qT]=Hi(L5),YT=I.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Oo();return M.jsx(ZT,{scope:n,id:i,children:M.jsx(Ue.div,{role:"group","aria-labelledby":i,...r,ref:t})})});YT.displayName=L5;var D5="SelectLabel",GT=I.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=qT(D5,n);return M.jsx(Ue.div,{id:i.id,...r,ref:t})});GT.displayName=D5;var ua="SelectItem",[XT,R5]=Hi(ua),$5=I.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=yr(ua,n),l=br(ua,n),u=a.value===r,[c,d]=I.useState(o??""),[f,h]=I.useState(!1),g=ct(t,m=>l.itemRefCallback?.(m,r,i)),x=Oo(),b=I.useRef("touch"),y=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return M.jsx(XT,{scope:n,value:r,disabled:i,textId:x,isSelected:u,onItemTextChange:I.useCallback(m=>{d(p=>p||(m?.textContent??"").trim())},[]),children:M.jsx(Ja.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:M.jsx(Ue.div,{role:"option","aria-labelledby":x,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:we(s.onFocus,()=>h(!0)),onBlur:we(s.onBlur,()=>h(!1)),onClick:we(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:we(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:we(s.onPointerDown,m=>{b.current=m.pointerType}),onPointerMove:we(s.onPointerMove,m=>{b.current=m.pointerType,i?l.onItemLeave?.():b.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:we(s.onKeyDown,m=>{l.searchRef?.current!==""&&m.key===" "||(DT.includes(m.key)&&y(),m.key===" "&&m.preventDefault())})})})})});$5.displayName=ua;var to="SelectItemText",B5=I.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=yr(to,n),a=br(to,n),l=R5(to,n),u=HT(to,n),[c,d]=I.useState(null),f=ct(t,y=>d(y),l.onItemTextChange,y=>a.itemTextRefCallback?.(y,l.value,l.disabled)),h=c?.textContent,g=I.useMemo(()=>M.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=u;return or(()=>(x(g),()=>b(g)),[x,b,g]),M.jsxs(M.Fragment,{children:[M.jsx(Ue.span,{id:l.textId,...o,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Os.createPortal(o.children,s.valueNode):null]})});B5.displayName=to;var H5="SelectItemIndicator",QT=I.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return R5(H5,n).isSelected?M.jsx(Ue.span,{"aria-hidden":!0,...r,ref:t}):null});QT.displayName=H5;var ic="SelectScrollUpButton",eI=I.forwardRef((e,t)=>{const n=br(ic,e.__scopeSelect),r=Hd(ic,e.__scopeSelect),[i,o]=I.useState(!1),s=ct(t,r.onScrollButtonChange);return or(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;o(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?M.jsx(V5,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});eI.displayName=ic;var oc="SelectScrollDownButton",tI=I.forwardRef((e,t)=>{const n=br(oc,e.__scopeSelect),r=Hd(oc,e.__scopeSelect),[i,o]=I.useState(!1),s=ct(t,r.onScrollButtonChange);return or(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)<u;o(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?M.jsx(V5,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});tI.displayName=oc;var V5=I.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=br("SelectScrollButton",n),s=I.useRef(null),a=Ka(n),l=I.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return I.useEffect(()=>()=>l(),[l]),or(()=>{a().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),M.jsx(Ue.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:we(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:we(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:we(i.onPointerLeave,()=>{l()})})}),nI="SelectSeparator",z5=I.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return M.jsx(Ue.div,{"aria-hidden":!0,...r,ref:t})});z5.displayName=nI;var sc="SelectArrow",rI=I.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Za(n),o=yr(sc,n),s=br(sc,n);return o.open&&s.position==="popper"?M.jsx(ip,{...i,...r,ref:t}):null});rI.displayName=sc;var iI="SelectBubbleInput",W5=I.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=I.useRef(null),o=ct(r,i),s=Ny(t);return I.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&c){const d=new Event("change",{bubbles:!0});c.call(a,t),a.dispatchEvent(d)}},[s,t]),M.jsx(Ue.select,{...n,style:{...jy,...n.style},ref:o,defaultValue:t})});W5.displayName=iI;function j5(e){return e===""||e===void 0}function U5(e){const t=xp(e),n=I.useRef(""),r=I.useRef(0),i=I.useCallback(s=>{const a=n.current+s;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=I.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return I.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function J5(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=oI(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function oI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sI=_5,aI=S5,lI=T5,uI=I5,cI=N5,dI=M5,fI=F5,hI=$5,gI=B5,pI=z5;const ns=_.forwardRef(({title:e,children:t},n)=>{const r=Ot(Go);return _.createElement(yp,{delayDuration:100},_.createElement(bp,null,_.createElement(vp,{ref:n,asChild:!0},_.createElement("span",{className:Y.tooltipTrigger},t)),_.createElement(Cp,{container:r?.current},_.createElement(wp,{className:ke(Y.tooltipContent),sideOffset:10},e))))}),mI=_.forwardRef(({children:e,className:t,...n},r)=>_.createElement(hI,{...n,ref:r,className:ke(t,Y.selectItem)},_.createElement(gI,null,e))),xI=({title:e,placeholder:t,className:n})=>{const[r,i]=rn(nn,In);return _.createElement(ns,{title:e},_.createElement(aI,{"aria-label":t,className:ke(Y.selectTrigger,n),"data-toolbar-item":!0,disabled:r},_.createElement(lI,{placeholder:t}),_.createElement(uI,{className:Y.selectDropdownArrow},i("arrow_drop_down"))))},yI=({children:e,className:t=Y.selectContainer})=>{const n=Ot(Go);return _.createElement(cI,{container:n?.current},_.createElement(dI,{className:ke(t,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},_.createElement(fI,{"data-editor-dropdown":!0},e)))},bI=e=>_.createElement(sI,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},_.createElement(xI,{title:e.triggerTitle,placeholder:e.placeholder}),_.createElement(yI,null,e.items.map((t,n)=>t==="separator"?_.createElement(pI,{key:n}):_.createElement(mI,{key:n,value:t.value},t.label))));function vI(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?Xf(n)?r:i:Xf(t)?r:i}catch{return null}}function K5(e){const t=j(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const o=n.getRangeAt(0);let s;if(n.isCollapsed){let a=n.anchorNode;a?.nodeType==3&&(a=a.parentNode),s=a.getBoundingClientRect(),s.width=0}else if(n.anchorNode===i){let a=i;for(;a.firstElementChild!=null;)a=a.firstElementChild;s=a.getBoundingClientRect()}else s=o.getBoundingClientRect();return{top:Math.round(s.top),left:Math.round(s.left),width:Math.round(s.width),height:Math.round(s.height)}}else if(!r||r.className!=="link-input")return null;return null}function CI({url:e,title:t,onSubmit:n,onCancel:r,linkAutocompleteSuggestions:i}){const{register:o,handleSubmit:s,control:a,setValue:l,reset:u}=uc({values:{url:e,title:t}}),c=Bt();return _.createElement("form",{onSubmit:d=>{s(n)(d),d.stopPropagation(),d.preventDefault()},onReset:d=>{d.stopPropagation(),r()},className:ke(Y.multiFieldForm,Y.linkDialogEditForm)},_.createElement("div",{className:Y.formField},_.createElement("label",{htmlFor:"link-url"},c("createLink.url","URL")),_.createElement(p5,{register:o,initialInputValue:e,inputName:"url",suggestions:i,setValue:l,control:a,placeholder:c("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),_.createElement("div",{className:Y.formField},_.createElement("label",{htmlFor:"link-title"},c("createLink.title","Title")),_.createElement("input",{id:"link-title",className:Y.textInput,size:40,...o("title")})),_.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},_.createElement("button",{type:"submit",title:c("createLink.saveTooltip","Set URL"),"aria-label":c("createLink.saveTooltip","Set URL"),className:ke(Y.primaryButton)},c("dialogControls.save","Save")),_.createElement("button",{type:"reset",title:c("createLink.cancelTooltip","Cancel change"),"aria-label":c("createLink.cancelTooltip","Cancel change"),className:ke(Y.secondaryButton)},c("dialogControls.cancel","Cancel"))))}const wI=()=>{const[e,t,n,r,i,o]=rn(Go,qe,In,wt,Q5,ey),s=_t(Z5),a=_t(q5),l=_t(Y5),u=_t(G5),c=_t(X5);_.useEffect(()=>{const b=()=>{t?.getEditorState().read(()=>{s(!0)})};return window.addEventListener("resize",b),window.addEventListener("scroll",b),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b)}},[t,s]);const[d,f]=_.useState(!1),h=Bt();if(r.type==="inactive")return null;const g=r.rectangle,x=r.type==="preview"&&r.url.startsWith("http");return _.createElement(dm,{open:!0},_.createElement(uC,{"data-visible":r.type==="edit",className:Y.linkDialogAnchor,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`}}),_.createElement(fm,{container:e?.current},_.createElement(hm,{className:ke(Y.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:b=>{b.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&_.createElement(CI,{url:r.url,title:r.title,onSubmit:a,onCancel:l.bind(null),linkAutocompleteSuggestions:i}),r.type==="preview"&&_.createElement(_.Fragment,null,_.createElement("a",{className:Y.linkDialogPreviewAnchor,href:r.url,...x?{target:"_blank",rel:"noreferrer"}:{},onClick:b=>{o!==null&&(b.preventDefault(),o(r.url))},title:x?h("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},_.createElement("span",null,r.url),x&&n("open_in_new")),_.createElement(Hl,{onClick:()=>{u()},title:h("linkPreview.edit","Edit link URL"),"aria-label":h("linkPreview.edit","Edit link URL")},n("edit")),_.createElement(yp,null,_.createElement(bp,{open:d},_.createElement(vp,{asChild:!0},_.createElement(Hl,{title:h("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":h("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{f(!0),setTimeout(()=>{f(!1)},1e3)})}},n(d?"check":"content_copy"))),_.createElement(Cp,{container:e?.current},_.createElement(wp,{className:ke(Y.tooltipContent),sideOffset:5},h("linkPreview.copied","Copied!"),_.createElement(Uy,null))))),_.createElement(Hl,{title:h("linkPreview.remove","Remove link"),"aria-label":h("linkPreview.remove","Remove link"),onClick:()=>{c()}},n("link_off"))),_.createElement(dC,{className:Y.popoverArrow}))))},Hl=_.forwardRef(({className:e,...t},n)=>_.createElement("button",{className:ke(Y.actionButton,e),ref:n,...t}));function ac(e){if(!e)return null;const t=vI(e);if(t===null)return null;const n=t.getParent();return yn(n)?n:yn(t)?t:null}const Z5=it(),wt=ne({type:"inactive"},e=>{e.pub(Mo,t=>t.registerCommand(Bo,()=>e.getValue(wt).type==="preview"?(e.pub(wt,{type:"inactive"}),!0):!1,De)),e.sub(e.pipe(ea),t=>{t!=="rich-text"&&e.pub(wt,{type:"inactive"})}),e.pub(Mo,t=>t.registerCommand(t1,n=>{if(n.key==="k"&&(na?n.metaKey:n.ctrlKey)&&!e.getValue(nn)){const r=j();return $(r)?(e.pub(Vd),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},du)),e.link(e.pipe(G5,We(wt),li(([,t])=>{if(t.type==="preview")return{type:"edit",initialUrl:t.url,url:t.url,title:t.title,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot switch to edit mode when not in preview mode")})),wt),e.sub(e.pipe(q5,We(qe,wt,Ei)),([t,n,r,i])=>{var o,s;const a=((o=t.url)==null?void 0:o.trim())??"",l=((s=t.title)==null?void 0:s.trim())??"";if(a!==""){if(i?.isCollapsed()){const u=l||a;n?.update(()=>{const c=ac(i);if(c)c.setURL(a),c.setTitle(l);else{const d=jr(a,{title:l});d.append(Re(u)),Ai([d]),d.select()}},{discrete:!0})}else n?.dispatchCommand(Ti,{url:a,title:l});e.pub(wt,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:l,url:a})}else r.type==="edit"&&r.initialUrl!==""&&n?.dispatchCommand(Ti,null),e.pub(wt,{type:"inactive"})}),e.link(e.pipe(Y5,We(wt,qe),li(([,t,n])=>{if(t.type==="edit")return n?.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),wt),e.link(e.pipe(e.combine(Ei,Z5),We(qe,wt,nn),li(([[t],n,r,i])=>{if($(t)&&n&&!i){const o=ac(t);if(o){const s=K5(n);return s?{type:"preview",url:o.getURL(),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:s}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),wt)}),q5=it(),Y5=cr();cr();const G5=cr(),X5=cr(e=>{e.sub(e.pipe(X5,We(qe)),([,t])=>{t?.dispatchCommand(Ti,null)})}),Vd=cr(e=>{e.sub(e.pipe(Vd,We(Ei,qe),Ro(([,t])=>$(t))),([,t,n])=>{n?.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=ac(t),i=K5(n);r?e.pub(wt,{type:"edit",initialUrl:r.getURL(),initialTitle:r.getTitle()??"",url:r.getURL(),title:r.getTitle()??"",linkNodeKey:r.getKey(),rectangle:i}):e.pub(wt,{type:"edit",initialUrl:"",initialTitle:"",title:"",url:"",linkNodeKey:"",rectangle:i})})})})})}),Q5=ne([]),ey=ne(null),ty=ne(null,e=>{e.pub(Mo,t=>{function n(r){const[i,o]=e.getValues([nn,ty]);!i||o===null||t.update(()=>{const s=kn(r.target);if(s!==null){const a=fr(s,l=>l instanceof Zn);a!==null&&o(r,a,a.getURL())}})}return t.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})}),_I=on({init(e,t){e.pub(qr,t?.LinkDialog??wI),e.pub(ey,t?.onClickLinkCallback??null),e.pub(ty,t?.onReadOnlyClickLinkCallback??null)},update(e,t={}){e.pub(Q5,t.linkAutocompleteSuggestions??[])}});function zd(e,t){return _.forwardRef((n,r)=>{const i=ke(t.className,n.className);return _.createElement(e,{...t,...n,className:i,ref:r})})}function kI(e){return({title:t,children:n,...r})=>_.createElement(e,{...r},_.createElement(ns,{title:t},n))}const SI=({readOnly:e,children:t,className:n})=>_.createElement(VE,{className:ke("mdxeditor-toolbar",Y.toolbarRoot,{[Y.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t),EI=zd(Kx,{className:Y.toolbarButton,"data-toolbar-item":!0}),TI=kI(EI),ny=zd(WE,{className:Y.toolbarToggleItem,"data-toolbar-item":!0});zd(wd,{type:"single",className:Y.toolbarToggleSingleGroup});const ry=_.forwardRef(({on:e,title:t,children:n,disabled:r,...i},o)=>_.createElement(wd,{type:"single",className:Y.toolbarToggleSingleGroup,...i,value:e?"on":"off",ref:o},_.createElement(ny,{"aria-label":t,value:"on",disabled:r},_.createElement(ns,{title:t},n)))),II=({items:e})=>_.createElement("div",{className:Y.toolbarGroupOfGroups},e.map((t,n)=>_.createElement(ry,{key:n,title:t.title,on:t.active,onValueChange:r=>{t.onChange(r==="on")},disabled:t.disabled},t.contents))),NI=({value:e,onChange:t,className:n,ggClassName:r,items:i})=>{const o=Bt();return _.createElement("div",{className:ke(Y.toolbarGroupOfGroups,r)},_.createElement(wd,{"aria-label":o("toolbar.toggleGroup","toggle group"),type:"single",className:ke(Y.toolbarToggleSingleGroup,n),onValueChange:t,value:e||"",onFocus:s=>{s.preventDefault()}},i.map((s,a)=>_.createElement(ny,{key:a,"aria-label":s.title,value:s.value},_.createElement(ns,{title:s.title},s.contents)))))},Og=zE,Vl=ne(()=>null),zl=ne(""),Pg=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",MI=on({init(e,t){const n=t?.toolbarPosition==="bottom"?s8:o8;e.pubIn({[Vl]:t?.toolbarContents??Pg,[zl]:t?.toolbarClassName??"",[n]:()=>{const[r,i,o]=rn(Vl,nn,zl);return _.createElement(SI,{className:o,readOnly:i},r())}})},update(e,t){e.pub(Vl,t?.toolbarContents??Pg),e.pub(zl,t?.toolbarClassName??"")}});var Wl={exports:{}},Fg;function AI(){return Fg||(Fg=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
92
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
93
|
-
*
|
|
94
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
95
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
96
|
-
* @namespace
|
|
97
|
-
* @public
|
|
98
|
-
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(p){return p instanceof l?new l(p.type,m(p.content),p.alias):Array.isArray(p)?p.map(m):p.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++o}),m.__id},clone:function m(p,v){v=v||{};var k,C;switch(a.util.type(p)){case"Object":if(C=a.util.objId(p),v[C])return v[C];k={},v[C]=k;for(var w in p)p.hasOwnProperty(w)&&(k[w]=m(p[w],v));return k;case"Array":return C=a.util.objId(p),v[C]?v[C]:(k=[],v[C]=k,p.forEach(function(S,T){k[T]=m(S,v)}),k);default:return p}},getLanguage:function(m){for(;m;){var p=i.exec(m.className);if(p)return p[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,p){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+p)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(k){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(m){var p=document.getElementsByTagName("script");for(var v in p)if(p[v].src==m)return p[v]}return null}},isActive:function(m,p,v){for(var k="no-"+p;m;){var C=m.classList;if(C.contains(p))return!0;if(C.contains(k))return!1;m=m.parentElement}return!!v}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,p){var v=a.util.clone(a.languages[m]);for(var k in p)v[k]=p[k];return v},insertBefore:function(m,p,v,k){k=k||a.languages;var C=k[m],w={};for(var S in C)if(C.hasOwnProperty(S)){if(S==p)for(var T in v)v.hasOwnProperty(T)&&(w[T]=v[T]);v.hasOwnProperty(S)||(w[S]=C[S])}var P=k[m];return k[m]=w,a.languages.DFS(a.languages,function(F,L){L===P&&F!=m&&(this[F]=w)}),w},DFS:function m(p,v,k,C){C=C||{};var w=a.util.objId;for(var S in p)if(p.hasOwnProperty(S)){v.call(p,S,p[S],k||S);var T=p[S],P=a.util.type(T);P==="Object"&&!C[w(T)]?(C[w(T)]=!0,m(T,v,null,C)):P==="Array"&&!C[w(T)]&&(C[w(T)]=!0,m(T,v,S,C))}}},plugins:{},highlightAll:function(m,p){a.highlightAllUnder(document,m,p)},highlightAllUnder:function(m,p,v){var k={callback:v,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),a.hooks.run("before-all-elements-highlight",k);for(var C=0,w;w=k.elements[C++];)a.highlightElement(w,p===!0,k.callback)},highlightElement:function(m,p,v){var k=a.util.getLanguage(m),C=a.languages[k];a.util.setLanguage(m,k);var w=m.parentElement;w&&w.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(w,k);var S=m.textContent,T={element:m,language:k,grammar:C,code:S};function P(L){T.highlightedCode=L,a.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,a.hooks.run("after-highlight",T),a.hooks.run("complete",T),v&&v.call(T.element)}if(a.hooks.run("before-sanity-check",T),w=T.element.parentElement,w&&w.nodeName.toLowerCase()==="pre"&&!w.hasAttribute("tabindex")&&w.setAttribute("tabindex","0"),!T.code){a.hooks.run("complete",T),v&&v.call(T.element);return}if(a.hooks.run("before-highlight",T),!T.grammar){P(a.util.encode(T.code));return}if(p&&r.Worker){var F=new Worker(a.filename);F.onmessage=function(L){P(L.data)},F.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else P(a.highlight(T.code,T.grammar,T.language))},highlight:function(m,p,v){var k={code:m,grammar:p,language:v};if(a.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=a.tokenize(k.code,k.grammar),a.hooks.run("after-tokenize",k),l.stringify(a.util.encode(k.tokens),k.language)},tokenize:function(m,p){var v=p.rest;if(v){for(var k in v)p[k]=v[k];delete p.rest}var C=new d;return f(C,C.head,m),c(m,C,p,C.head,0),g(C)},hooks:{all:{},add:function(m,p){var v=a.hooks.all;v[m]=v[m]||[],v[m].push(p)},run:function(m,p){var v=a.hooks.all[m];if(!(!v||!v.length))for(var k=0,C;C=v[k++];)C(p)}},Token:l};r.Prism=a;function l(m,p,v,k){this.type=m,this.content=p,this.alias=v,this.length=(k||"").length|0}l.stringify=function m(p,v){if(typeof p=="string")return p;if(Array.isArray(p)){var k="";return p.forEach(function(P){k+=m(P,v)}),k}var C={type:p.type,content:m(p.content,v),tag:"span",classes:["token",p.type],attributes:{},language:v},w=p.alias;w&&(Array.isArray(w)?Array.prototype.push.apply(C.classes,w):C.classes.push(w)),a.hooks.run("wrap",C);var S="";for(var T in C.attributes)S+=" "+T+'="'+(C.attributes[T]||"").replace(/"/g,""")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+S+">"+C.content+"</"+C.tag+">"};function u(m,p,v,k){m.lastIndex=p;var C=m.exec(v);if(C&&k&&C[1]){var w=C[1].length;C.index+=w,C[0]=C[0].slice(w)}return C}function c(m,p,v,k,C,w){for(var S in v)if(!(!v.hasOwnProperty(S)||!v[S])){var T=v[S];T=Array.isArray(T)?T:[T];for(var P=0;P<T.length;++P){if(w&&w.cause==S+","+P)return;var F=T[P],L=F.inside,O=!!F.lookbehind,B=!!F.greedy,H=F.alias;if(B&&!F.pattern.global){var q=F.pattern.toString().match(/[imsuy]*$/)[0];F.pattern=RegExp(F.pattern.source,q+"g")}for(var Z=F.pattern||F,Q=k.next,X=C;Q!==p.tail&&!(w&&X>=w.reach);X+=Q.value.length,Q=Q.next){var N=Q.value;if(p.length>m.length)return;if(!(N instanceof l)){var oe=1,ce;if(B){if(ce=u(Z,X,m,O),!ce||ce.index>=m.length)break;var ae=ce.index,A=ce.index+ce[0].length,fe=X;for(fe+=Q.value.length;ae>=fe;)Q=Q.next,fe+=Q.value.length;if(fe-=Q.value.length,X=fe,Q.value instanceof l)continue;for(var ge=Q;ge!==p.tail&&(fe<A||typeof ge.value=="string");ge=ge.next)oe++,fe+=ge.value.length;oe--,N=m.slice(X,fe),ce.index-=X}else if(ce=u(Z,0,N,O),!ce)continue;var ae=ce.index,z=ce[0],U=N.slice(0,ae),G=N.slice(ae+z.length),ee=X+N.length;w&&ee>w.reach&&(w.reach=ee);var se=Q.prev;U&&(se=f(p,se,U),X+=U.length),h(p,se,oe);var me=new l(S,L?a.tokenize(z,L):z,H,z);if(Q=f(p,se,me),G&&f(p,Q,G),oe>1){var Pe={cause:S+","+P,reach:ee};c(m,p,v,Q.prev,X,Pe),w&&Pe.reach>w.reach&&(w.reach=Pe.reach)}}}}}}function d(){var m={value:null,prev:null,next:null},p={value:null,prev:m,next:null};m.next=p,this.head=m,this.tail=p,this.length=0}function f(m,p,v){var k=p.next,C={value:v,prev:p,next:k};return p.next=C,k.prev=C,m.length++,C}function h(m,p,v){for(var k=p.next,C=0;C<v&&k!==m.tail;C++)k=k.next;p.next=k,k.prev=p,m.length-=C}function g(m){for(var p=[],v=m.head.next;v!==m.tail;)p.push(v.value),v=v.next;return p}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(m){var p=JSON.parse(m.data),v=p.language,k=p.code,C=p.immediateClose;r.postMessage(a.highlight(k,a.languages[v],v)),C&&r.close()},!1)),a;var x=a.util.currentScript();x&&(a.filename=x.src,x.hasAttribute("data-manual")&&(a.manual=!0));function b(){a.manual||a.highlightAll()}if(!a.manual){var y=document.readyState;y==="loading"||y==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return a}(t);e.exports&&(e.exports=n),typeof Jd<"u"&&(Jd.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(x,b){return"✖ Error "+x+" while fetching file: "+b},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",u="loaded",c="failed",d="pre[data-src]:not(["+a+'="'+u+'"]):not(['+a+'="'+l+'"])';function f(x,b,y){var m=new XMLHttpRequest;m.open("GET",x,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?b(m.responseText):m.status>=400?y(i(m.status,m.statusText)):y(o))},m.send(null)}function h(x){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(b){var y=Number(b[1]),m=b[2],p=b[3];return m?p?[y,Number(p)]:[y,void 0]:[y,y]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var b=x.element;if(b.matches(d)){x.code="",b.setAttribute(a,l);var y=b.appendChild(document.createElement("CODE"));y.textContent=r;var m=b.getAttribute("data-src"),p=x.language;if(p==="none"){var v=(/\.(\w+)$/.exec(m)||[,"none"])[1];p=s[v]||v}n.util.setLanguage(y,p),n.util.setLanguage(b,p);var k=n.plugins.autoloader;k&&k.loadLanguages(p),f(m,function(C){b.setAttribute(a,u);var w=h(b.getAttribute("data-range"));if(w){var S=C.split(/\r\n?|\n/g),T=w[0],P=w[1]==null?S.length:w[1];T<0&&(T+=S.length),T=Math.max(0,Math.min(T-1,S.length)),P<0&&(P+=S.length),P=Math.max(0,Math.min(P,S.length)),C=S.slice(T,P).join(`
|
|
99
|
-
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(T+1))}y.textContent=C,n.highlightElement(y)},function(C){b.setAttribute(a,c),y.textContent=C})}}),n.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(d),m=0,p;p=y[m++];)n.highlightElement(p)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(Wl)),Wl.exports}AI();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var h=0,g=f.length;h<g;h++){var x=f[h];if(x.type!=="code"){d(x.content);continue}var b=x.content[1],y=x.content[3];if(b&&y&&b.type==="code-language"&&y.type==="code-block"&&typeof b.content=="string"){var m=b.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var p="language-"+m;y.alias?typeof y.alias=="string"?y.alias=[y.alias,p]:y.alias.push(p):y.alias=[p]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",f=0,h=c.classes.length;f<h;f++){var g=c.classes[f],x=/language-(.+)/.exec(g);if(x){d=x[1];break}}var b=e.languages[d];if(b)c.content=e.highlight(u(c.content),b,d);else if(d&&d!=="none"&&e.plugins.autoloader){var y="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=y,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(y);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,h){if(h=h.toLowerCase(),h[0]==="#"){var g;return h[1]==="x"?g=parseInt(h.slice(2),16):g=Number(h.slice(1)),l(g)}else{var x=a[h];return x||f}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);var Lg={},Dg;function OI(){return Dg||(Dg=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Lg}OI();var Rg={},$g;function PI(){return $g||($g=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),Rg}PI();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});var Bg={},Hg;function FI(){return Hg||(Hg=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Bg}FI();var Vg={},zg;function LI(){return zg||(zg=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),Vg}LI();var Wg={},jg;function DI(){return jg||(jg=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),Wg}DI();const RI=globalThis.Prism||window.Prism,Ug=e=>{try{return!!e&&RI.languages.hasOwnProperty(e)}catch{return!1}};function iy(e,t){for(const n of e.childNodes){if(Ke(n)&&n.tagName===t)return!0;iy(n,t)}return!1}const no="data-language",bs="data-highlight-language";let Wd=class oy extends an{static getType(){return"code"}static clone(t){return new oy(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=Ug(t)}createDOM(t){const n=document.createElement("code");tn(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(no,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(bs,r)),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;return i?i!==o&&(n.setAttribute(no,i),this.__isSyntaxHighlightSupported&&n.setAttribute(bs,i)):o&&(n.removeAttribute(no),t.__isSyntaxHighlightSupported&&n.removeAttribute(bs)),!1}exportDOM(t){const n=document.createElement("pre");tn(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(no,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(bs,r)),{element:n}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||iy(t,"BR"))?{conversion:Jg,priority:1}:null,div:()=>({conversion:$I,priority:1}),pre:()=>({conversion:Jg,priority:0}),table:t=>jl(t)?{conversion:BI,priority:3}:null,td:t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&jl(r)?{conversion:Kg,priority:3}:null},tr:t=>{const n=t.closest("table");return n&&jl(n)?{conversion:Kg,priority:3}:null}}}static importJSON(t){return Hn().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(t,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
|
|
100
|
-
`&&r[i-2].getTextContent()===`
|
|
101
|
-
`&&t.isCollapsed()&&t.anchor.key===this.__key&&t.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const l=Ee();return this.insertAfter(l,n),l}const{anchor:o,focus:s}=t,a=(o.isBefore(s)?o:s).getNode();if(J(a)){let l=VI(a);const u=[];for(;;)if(Fc(l))u.push(Ni()),l=l.getNextSibling();else{if(!ay(l))break;{let b=0;const y=l.getTextContent(),m=l.getTextContentSize();for(;b<m&&y[b]===" ";)b++;if(b!==0&&u.push(sy(" ".repeat(b))),b!==m)break;l=l.getNextSibling()}}const c=a.splitText(o.offset)[0],d=o.offset===0?0:1,f=c.getIndexWithinParent()+d,h=a.getParentOrThrow(),g=[Qt(),...u];h.splice(f,0,g);const x=u[u.length-1];x?x.select():o.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(jd(a)){const{offset:l}=t.anchor;a.splice(l,0,[Qt()]),a.select(l+1,l+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Ee();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n.__isSyntaxHighlightSupported=Ug(t),n}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}};function Hn(e){return Nt(new Wd(e))}function jd(e){return e instanceof Wd}function Jg(e){return{node:Hn(e.getAttribute(no))}}function $I(e){const t=e,n=Zg(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(Zg(i))return!0;i=i.parentElement}return!1}(t)?{node:n?Hn():null}:{node:null}}function BI(){return{node:Hn()}}function Kg(){return{node:null}}function Zg(e){return e.style.fontFamily.match("monospace")!==null}function jl(e){return e.classList.contains("js-file-line-container")}class qa extends Tn{constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new qa(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=Ul(t.theme,this.__highlightType);return tn(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=Ul(r.theme,t.__highlightType),s=Ul(r.theme,this.__highlightType);return o!==s&&(o&&Fa(n,o),s&&tn(n,s)),i}static importJSON(t){return sy().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return Hn()}}function Ul(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function sy(e="",t){return Nt(new qa(e,t))}function ay(e){return e instanceof qa}function HI(e,t){let n=e;for(let r=pt(e,t);r&&(ay(r.origin)||Fc(r.origin));r=T_(r))n=r.origin;return n}function VI(e){return HI(e,"previous")}function lc(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function zI(e){const t=lc(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const qg=/[!-/:-@[-`{-~\s]/,ly=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,WI=ly&&"documentMode"in document?document.documentMode:null;ly&&"InputEvent"in window&&!WI&&new window.InputEvent("input");function jI(e){return J(e)&&!e.hasFormat("code")}function UI(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Yg(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(uy(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}function uy(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}function JI(e,t=_y){const n=zI(t),r=lc(n.textFormat,({tag:s})=>s[s.length-1]),i=lc(n.textMatch,({trigger:s})=>s);for(const s of t){const a=s.type;if(a==="element"||a==="text-match"||a==="multiline-element"){const l=s.dependencies;for(const u of l)e.hasNode(u)||UI(173,u.getType())}}const o=(s,a,l)=>{(function(u,c,d,f){const h=u.getParent();if(!je(h)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[d-1]!==" ")return!1;for(const{regExp:x,replace:b}of f){const y=g.match(x);if(y&&y[0].length===(y[0].endsWith(" ")?d:d-1)){const m=c.getNextSiblings(),[p,v]=c.splitText(d);if(p.remove(),b(u,v?[v,...m]:m,y,!1)!==!1)return!0}}return!1})(s,a,l,n.element)||function(u,c,d,f){const h=u.getParent();if(!je(h)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[d-1]!==" ")return!1;for(const{regExpStart:x,replace:b,regExpEnd:y}of f){if(y&&!("optional"in y)||y&&"optional"in y&&!y.optional)continue;const m=g.match(x);if(m&&m[0].length===(m[0].endsWith(" ")?d:d-1)){const p=c.getNextSiblings(),[v,k]=c.splitText(d);if(v.remove(),b(u,k?[k,...p]:p,m,null,null,!1)!==!1)return!0}}return!1}(s,a,l,n.multilineElement)||function(u,c,d){let f=u.getTextContent();const h=d[f[c-1]];if(h==null)return!1;c<f.length&&(f=f.slice(0,c));for(const g of h){if(!g.replace||!g.regExp)continue;const x=f.match(g.regExp);if(x===null)continue;const b=x.index||0,y=b+x[0].length;let m;return b===0?[m]=u.splitText(y):[,m]=u.splitText(b,y),m.selectNext(0,0),g.replace(m,x),!0}return!1}(a,l,i)||function(u,c,d){const f=u.getTextContent(),h=c-1,g=f[h],x=d[g];if(!x)return!1;for(const b of x){const{tag:y}=b,m=y.length,p=h-m+1;if(m>1&&!uy(f,p,y,0,m)||f[p-1]===" ")continue;const v=f[h+1];if(b.intraword===!1&&v&&!qg.test(v))continue;const k=u;let C=k,w=Yg(f,p,y),S=C;for(;w<0&&(S=S.getPreviousSibling())&&!Xt(S);)if(J(S)){const Z=S.getTextContent();C=S,w=Yg(Z,Z.length,y)}if(w<0||C===k&&w+m===p)continue;const T=C.getTextContent();if(w>0&&T[w-1]===g)continue;const P=T[w-1];if(b.intraword===!1&&P&&!qg.test(P))continue;const F=k.getTextContent(),L=F.slice(0,p)+F.slice(h+1);k.setTextContent(L);const O=C===k?L:T;C.setTextContent(O.slice(0,w)+O.slice(w+m));const B=j(),H=zo();Xe(H);const q=h-m*(C===k?2:1)+1;H.anchor.set(C.__key,w,"text"),H.focus.set(k.__key,q,"text");for(const Z of b.format)H.hasFormat(Z)||H.formatText(Z);H.anchor.set(H.focus.key,H.focus.offset,H.focus.type);for(const Z of b.format)H.hasFormat(Z)&&H.toggleFormat(Z);return $(B)&&(H.format=B.format),!0}}(a,l,r)};return e.registerUpdateListener(({tags:s,dirtyLeaves:a,editorState:l,prevEditorState:u})=>{if(s.has("collaboration")||s.has("historic")||e.isComposing())return;const c=l.read(j),d=u.read(j);if(!$(d)||!$(c)||!c.isCollapsed()||c.is(d))return;const f=c.anchor.key,h=c.anchor.offset,g=l._nodeMap.get(f);!J(g)||!a.has(f)||h!==1&&h>d.anchor.offset+1||e.update(()=>{if(!jI(g))return;const x=g.getParent();x===null||jd(x)||o(x,g,c.anchor.offset)})})}const KI=/^(\s*)(\d{1,})\.\s/,ZI=/^(\s*)[-*+]\s/,qI=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,YI=/^(#{1,6})\s/,GI=/^>\s/,XI=/^[ \t]*```(\w+)?/,QI=/[ \t]*```$/,cy=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},Ud=e=>(t,n,r)=>{const i=t.getPreviousSibling(),o=t.getNextSibling(),s=xt(e==="check"?r[3]==="x":void 0);if(de(o)&&o.getListType()===e){const l=o.getFirstChild();l!==null?l.insertBefore(s):o.append(s),t.remove()}else if(de(i)&&i.getListType()===e)i.append(s),t.remove();else{const l=mt(e,e==="number"?Number(r[2]):void 0);l.append(s),t.replace(l)}s.append(...n),s.select(0,0);const a=function(l){const u=l.match(/\t/g),c=l.match(/ /g);let d=0;return u&&(d+=u.length),c&&(d+=Math.floor(c.length/4)),d}(r[1]);a&&s.setIndent(a)},Ya=(e,t,n)=>{const r=[],i=e.getChildren();let o=0;for(const s of i)if(be(s)){if(s.getChildrenSize()===1){const c=s.getFirstChild();if(de(c)){r.push(Ya(c,t,n+1));continue}}const a=" ".repeat(4*n),l=e.getListType(),u=l==="number"?`${e.getStart()+o}. `:l==="check"?`- [${s.getChecked()?"x":" "}] `:"- ";r.push(a+u+t(s)),o++}return r.join(`
|
|
102
|
-
`)},eN={dependencies:[qo],export:(e,t)=>{if(!Da(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:YI,replace:cy(e=>{const t="h"+e[1].length;return vn(t)}),type:"element"},dy={dependencies:[La],export:(e,t)=>{if(!vu(e))return null;const n=t(e).split(`
|
|
103
|
-
`),r=[];for(const i of n)r.push("> "+i);return r.join(`
|
|
104
|
-
`)},regExp:GI,replace:(e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(vu(o))return o.splice(o.getChildrenSize(),0,[Qt(),...t]),o.select(0,0),void e.remove()}const i=Zo();i.append(...t),e.replace(i),i.select(0,0)},type:"element"},fy={dependencies:[Wd],export:e=>{if(!jd(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?`
|
|
105
|
-
`+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:QI},regExpStart:XI,replace:(e,t,n,r,i,o)=>{let s,a;if(!t&&i){if(i.length===1)r?(s=Hn(),a=n[1]+i[0]):(s=Hn(n[1]),a=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(s=Hn(n[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();a=i.join(`
|
|
106
|
-
`)}const l=Re(a);s.append(l),e.append(s)}else t&&cy(l=>Hn(l?l[1]:void 0))(e,t,n,o)},type:"multiline-element"},hy={dependencies:[Nn,ln],export:(e,t)=>de(e)?Ya(e,t,0):null,regExp:ZI,replace:Ud("bullet"),type:"element"},tN={dependencies:[Nn,ln],export:(e,t)=>de(e)?Ya(e,t,0):null,regExp:qI,replace:Ud("check"),type:"element"},gy={dependencies:[Nn,ln],export:(e,t)=>de(e)?Ya(e,t,0):null,regExp:KI,replace:Ud("number"),type:"element"},py={format:["code"],tag:"`",type:"text-format"},nN={format:["highlight"],tag:"==",type:"text-format"},my={format:["bold","italic"],tag:"***",type:"text-format"},xy={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},yy={format:["bold"],tag:"**",type:"text-format"},by={format:["bold"],intraword:!1,tag:"__",type:"text-format"},rN={format:["strikethrough"],tag:"~~",type:"text-format"},vy={format:["italic"],tag:"*",type:"text-format"},Cy={format:["italic"],intraword:!1,tag:"_",type:"text-format"},wy={dependencies:[Zn],export:(e,t,n)=>{if(!yn(e))return null;const r=e.getTitle(),i=t(e);return r?`[${i}](${e.getURL()} "${r}")`:`[${i}](${e.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{const[,n,r,i]=t,o=jr(r,{title:i}),s=Re(n);return s.setFormat(e.getFormat()),o.append(s),e.replace(o),s},trigger:")",type:"text-match"},iN=[eN,dy,hy,gy],oN=[fy],sN=[py,my,xy,yy,by,nN,vy,Cy,rN],aN=[wy],_y=[...iN,...oN,...sN,...aN],lN=[{dependencies:[Xo],export:e=>Wa(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Ri();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},..._y];function Gg({transformers:e=lN}){const[t]=yt();return I.useEffect(()=>JI(t,e),[t,e]),null}const uN=on({init(e){const t=e.getValue(pd),n=t.includes("headings")?e.getValue(za):[],r=fN(t,n);e.pubIn({[qr]:()=>_.createElement(Gg,{transformers:r}),[rx]:()=>_.createElement(Gg,{transformers:r})})}}),cN=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},dN={dependencies:[Xo],export:e=>Wa(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Ri();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"};function fN(e,t){const n=[my,xy,yy,by,py,vy,Cy];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),s={dependencies:[qo],export:(a,l)=>{if(!Da(a))return null;const u=Number(a.getTag().slice(1));return"#".repeat(u)+" "+l(a)},regExp:o,replace:cN(a=>{const l=`h${a[1].length}`;return vn(l)}),type:"element"};n.push(s)}if(e.includes("thematicBreak")&&n.push(dN),e.includes("quote")&&n.push(dy),e.includes("link")&&n.push(wy),e.includes("lists")&&n.push(gy,hy,tN),e.includes("codeblock")){const r={...fy,dependencies:[Bi],replace:(i,o,s)=>{const a=ts({code:"",language:s[1]??"",meta:""});i.replace(a),setTimeout(()=>{a.select()},80)}};n.push(r)}return n}const hN=()=>{const e=_t(Qs),t=Ot(ix),n=Ot(pd),r=n.includes("quote"),i=n.includes("headings"),o=Bt();if(!r&&!i)return null;const s=[{label:o("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(r&&s.push({label:o("toolbar.blockTypes.quote","Quote"),value:"quote"}),i){const a=Ot(za);s.push(...a.map(l=>({label:o("toolbar.blockTypes.heading","Heading {{level}}",{level:l}),value:`h${l}`})))}return _.createElement(bI,{value:t,onChange:a=>{switch(a){case"quote":e(()=>Zo());break;case"paragraph":e(()=>Ee());break;case"":break;default:if(a.startsWith("h"))e(()=>vn(a));else throw new Error(`Unknown block type: ${a}`)}},triggerTitle:o("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:o("toolbar.blockTypeSelect.placeholder","Block type"),items:s})},Jl=({format:e,addTitle:t,removeTitle:n,icon:r,formatName:i})=>{const[o,s]=rn(D0,In),a=_t(R0),l=(o&e)!==0;return _.createElement(ry,{title:l?n:t,on:l,onValueChange:()=>{a(i)}},s(r))},gN=({options:e})=>{const t=Bt(),n=typeof e>"u";return _.createElement("div",{className:Y.toolbarGroupOfGroups},n||e.includes("Bold")?_.createElement(Jl,{format:co,addTitle:t("toolbar.bold","Bold"),removeTitle:t("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||e.includes("Italic")?_.createElement(Jl,{format:fo,addTitle:t("toolbar.italic","Italic"),removeTitle:t("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||e.includes("Underline")?_.createElement(Jl,{format:ho,addTitle:t("toolbar.underline","Underline"),removeTitle:t("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},pN=()=>{const e=_t(Vd),t=Ot(In),n=Bt();return _.createElement(TI,{"aria-label":n("toolbar.link","Create link"),title:n("toolbar.link","Create link"),onClick:r=>{e()}},t("link"))},mN=_.forwardRef((e,t)=>{const n=_t(m5),[r,i]=rn(nn,In),o=Bt();return _.createElement(Kx,{className:Y.toolbarButton,ref:t,disabled:r,onClick:()=>{n()}},_.createElement(ns,{title:o("toolbar.image","Insert image")},i("add_photo")))}),xN={bullet:"format_list_bulleted",number:"format_list_numbered",check:"format_list_checked"},yN=({options:e=["bullet","number","check"]})=>{const[t,n]=rn(Uu,In),r=_t(wx),i=Bt(),o={bullet:i("toolbar.bulletedList","Bulleted list"),number:i("toolbar.numberedList","Numbered list"),check:i("toolbar.checkList","Check list")},s=e.map(a=>({value:a,title:o[a],contents:n(xN[a])}));return _.createElement(NI,{value:t||"",items:s,onChange:r})},bN=()=>{const[e,t]=rn(In,qe),[n,r]=_.useState(!1),[i,o]=_.useState(!1),s=Bt();return _.useEffect(()=>{if(t)return Mt(t.registerCommand(Xi,a=>(r(a),!1),zn),t.registerCommand(Gi,a=>(o(a),!1),zn))},[t]),_.createElement(II,{items:[{title:s("toolbar.undo","Undo {{shortcut}}",{shortcut:na?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:e("undo"),active:!1,onChange:()=>t?.dispatchCommand(ba,void 0)},{title:s("toolbar.redo","Redo {{shortcut}}",{shortcut:na?"⌘Y":"Ctrl+Y"}),disabled:!i,contents:e("redo"),active:!1,onChange:()=>t?.dispatchCommand(va,void 0)}]})},vN="_mdxeditor_x49hi_2",CN={mdxeditor:vN},wN={match:(e,t)=>!0,priority:0,Editor:e=>{const t=TT();return M.jsxs("div",{className:"flex flex-col bg-gray-100 my-4",onKeyDown:n=>n.nativeEvent.stopImmediatePropagation(),children:[M.jsx("input",{defaultValue:e.language}),M.jsx("textarea",{className:"flex-1",defaultValue:e.code,onChange:n=>t.setCode(n.target.value)})]})}};function _N(e){const t=[];function n(r){for(const i of r)t.push(i),i.children&&n(i.children)}return n(e),t}function kN({className:e,markdown:t,name:n,register:r,onChange:i}){const{data:o}=ep(),s=I.useMemo(()=>o?_N(o):[],[o]);return M.jsx(O6,{...r(n),className:he("flex flex-col w-full rounded-md border border-input bg-transparent text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",CN.mdxeditor,e),suppressHtmlProcessing:!0,markdown:t,onChange:i,plugins:[$6(),pE(),s4(),_I(),wT(),fT({imageAutocompleteSuggestions:s?.filter(a=>a.type!=="directory").map(a=>a.relativePath),imagePreviewHandler:a=>new Promise(l=>l(`/${a}`)),disableImageResize:!0,disableImageSettingsButton:!1}),U6(),uN(),FT({codeBlockEditorDescriptors:[wN]}),MI({toolbarClassName:"flex flex-row overflow-hidden shrink-0 h-10 border-b bg-white rounded-none",toolbarContents:()=>M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex items-center flex-1 gap-1",children:[M.jsx(hN,{}),M.jsx(gN,{}),M.jsx(Og,{}),M.jsx(yN,{options:["bullet","number"]}),M.jsx(Og,{}),M.jsx(pN,{}),M.jsx(mN,{}),M.jsx("div",{className:"ml-auto",children:M.jsx(bN,{})})]})})})]})}function SN({date:e,onDateChange:t,placeholder:n="Pick a date",disabled:r=!1,className:i}){return M.jsxs(gm,{children:[M.jsx(pm,{asChild:!0,children:M.jsxs(pi,{variant:"outline",className:he("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",i),disabled:r,children:[M.jsx(kp,{className:"mr-2 h-4 w-4"}),e?io(e,"PPP"):M.jsx("span",{children:n})]})}),M.jsx(mm,{className:"w-auto p-0",children:M.jsx(Xp,{mode:"single",selected:e,onSelect:t,initialFocus:!0})})]})}function EN({...e}){return M.jsxs("div",{className:"relative flex justify-center items-center",children:[M.jsx(mo,{...e}),e.value&&M.jsx(Xg,{to:e.value,className:"flex items-center absolute right-0 mr-3",children:M.jsx(Sp,{className:"h-4"})})]})}function KN({itemType:e,fields:t,data:n,isNew:r}){const[i]=Dy(),[o]=Ry(),s=I.useCallback(d=>({id:n?.id??"",...Object.fromEntries(Object.keys(d).map(f=>[f,n?.[f]??(d[f].type==="boolean"?!1:"")]))}),[n,t]),a=I.useMemo(()=>{const d={id:Gr().min(1,"ID is required").regex(/^[a-z0-9-]+$/,"ID can only include lowercase letters and numbers")};return Object.entries(t).forEach(([f,h])=>{let g;switch(h.type){case"boolean":g=My();break;case"number":g=Gr().refine(x=>!isNaN(Number(x)),"Must be a valid number");break;case"url":g=Gr().url("Must be a valid URL");break;case"date":g=Gr();break;case"datetime":g=Gr();break;default:g=Gr()}h.isRequired?h.type!=="boolean"&&(g=g.min(1,`${h.displayName} is required`)):g=g.optional().or(Ay("")),d[f]=g}),Oy(d)},[t]),l=uc({resolver:Ly(a),defaultValues:s(t)});I.useEffect(()=>{if(!l)return;const d=window.location.hash;d&&l.setFocus(d.substring(1))},[l]),I.useEffect(()=>{const d=f=>{(f.ctrlKey||f.metaKey)&&f.key==="s"&&(f.preventDefault(),(l.formState.isDirty||r)&&l.handleSubmit(u)())};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l,r,u]);async function u(d){r?i({...d,type:e}):o({...d,type:e})}const c=I.useMemo(()=>Object.entries(t).filter(([,d])=>d.type==="boolean"),[t]);return M.jsxs(Py,{...l,children:[M.jsxs("form",{onSubmit:l.handleSubmit(u),className:"space-y-4 max-w-[800px] w-[800px]",children:[M.jsx(Qa,{name:"id",control:l.control,disabled:n?.id==="default",rules:{required:!0},render:({field:d})=>n?.id==="default"?M.jsx(M.Fragment,{}):M.jsxs(el,{children:[M.jsx(is,{className:"flex gap-1 items-baseline",children:"ID"}),M.jsx(tl,{children:M.jsx(mo,{placeholder:"my-item-id",...l.register("id"),...d,onChange:f=>{const h=f.target.value.toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/[^a-z0-9-]/g,"");d.onChange(h)},onBlur:f=>{const h=f.target.value.trim().replace(/^-+|-+$/g,"");d.onChange(h)}})}),M.jsx(nl,{})]})}),c.length>0&&M.jsxs("div",{className:"flex flex-col gap-3",children:[M.jsx(is,{children:"Flags"}),M.jsx("div",{className:"flex flex-row flex-wrap gap-4",children:c.map(([d,f])=>M.jsx(Qa,{name:d,control:l.control,render:({field:h})=>M.jsxs(el,{className:"flex flex-col items-start",children:[M.jsxs("div",{className:"flex flex-row space-x-2",children:[M.jsx(tl,{children:M.jsx(Fy,{...l.register(d),checked:h.value==="true",onCheckedChange:g=>{h.onChange(g===!0?"true":"false")}})}),M.jsx(is,{className:"flex gap-1 items-baseline",children:f.displayName})]}),f.displayExtra&&M.jsx(Kd,{children:f.displayExtra}),M.jsx(nl,{})]})},d))})]}),Object.entries(t).filter(([,d])=>d.type!=="boolean").map(([d,f])=>M.jsx(Qa,{name:d,control:l.control,rules:{required:f.isRequired},render:({field:h})=>M.jsxs(el,{children:[M.jsxs(is,{className:"flex gap-1 items-baseline",children:[f.displayName,!f.isRequired&&M.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),M.jsx(tl,{children:f.type==="markdown"?M.jsx(kN,{name:d,register:l.register,className:"h-52",markdown:h.value,onChange:(g,x)=>{x||h.onChange(g)},placeholder:f.placeholder}):f.type==="url"?M.jsx(EN,{...l.register(d),placeholder:f.placeholder??"https://",...h}):f.type==="string"&&f.isUploadedFile?M.jsx(zC,{name:d,register:l.register,value:h.value,onChange:h.onChange}):f.type==="date"?M.jsx(SN,{...l.register(d),date:h.value?new Date(h.value):void 0,onDateChange:g=>{h.onChange(g?g.toISOString():void 0)},placeholder:f.placeholder??"Select date"}):f.type==="datetime"?M.jsx(fC,{...l.register(d),date:h.value?new Date(h.value):void 0,onDateTimeChange:g=>{h.onChange(g?g.toISOString():void 0)},placeholder:f.placeholder??"Select date and time"}):M.jsx(mo,{...l.register(d),placeholder:f.placeholder,...h})}),f.displayExtra&&M.jsx(Kd,{children:f.displayExtra}),M.jsx(nl,{})]})},d)),M.jsxs(pi,{disabled:!l.formState.isDirty&&!r,type:"submit",children:[M.jsx(Xy,{})," Save"]})]}),M.jsx(VC,{hasUnsavedChanges:l.formState.isDirty})]})}export{KN as I};
|