reactjs-tiptap-editor-pro 0.2.25 → 0.2.26

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.
@@ -27,11 +27,11 @@
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
- */const h3=Ue.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:i,iconNode:a,...c},l)=>Ue.createElement("svg",{ref:l,...Uoe,width:e,height:e,stroke:t,strokeWidth:o?Number(n)*24/Number(e):n,className:u3("lucide",r),...c},[...a.map(([s,u])=>Ue.createElement(s,u)),...Array.isArray(i)?i:[i]]));async function $oe(t){if(!(t in jp))throw new Error("[lucide-react]: Name in Lucide DynamicIcon not found");return(await jp[t]()).__iconNode}const Roe=Ue.forwardRef(({name:t,fallback:e,...n},o)=>{const[r,i]=Ue.useState();return Ue.useEffect(()=>{$oe(t).then(i).catch(a=>{console.error(a)})},[t]),r==null?e==null?null:Ue.createElement(e):Ue.createElement(h3,{ref:o,...n,iconNode:r})}),Boe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Loe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Dr=(t,e)=>{for(const n in e)t[n]=e[n];return t},zu="numeric",Au="ascii",Eu="alpha",di="asciinumeric",ii="alphanumeric",Uu="domain",f3="emoji",Ioe="scheme",Woe="slashscheme",Jl="whitespace";function Voe(t,e){return t in e||(e[t]=[]),e[t]}function Po(t,e,n){e[zu]&&(e[di]=!0,e[ii]=!0),e[Au]&&(e[di]=!0,e[Eu]=!0),e[di]&&(e[ii]=!0),e[Eu]&&(e[ii]=!0),e[ii]&&(e[Uu]=!0),e[f3]&&(e[Uu]=!0);for(const o in e){const r=Voe(o,n);r.indexOf(t)<0&&r.push(t)}}function Hoe(t,e){const n={};for(const o in e)e[o].indexOf(t)>=0&&(n[o]=!0);return n}function Dt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Dt.groups={};Dt.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let o=0;o<e.jr.length;o++){const r=e.jr[o][0],i=e.jr[o][1];if(i&&r.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,o){for(let r=0;r<t.length;r++)this.tt(t[r],e,n,o)},tr(t,e,n,o){o=o||Dt.groups;let r;return e&&e.j?r=e:(r=new Dt(e),n&&o&&Po(e,n,o)),this.jr.push([t,r]),r},ts(t,e,n,o){let r=this;const i=t.length;if(!i)return r;for(let a=0;a<i-1;a++)r=r.tt(t[a]);return r.tt(t[i-1],e,n,o)},tt(t,e,n,o){o=o||Dt.groups;const r=this;if(e&&e.j)return r.j[t]=e,e;const i=e;let a,c=r.go(t);if(c?(a=new Dt,Dr(a.j,c.j),a.jr.push.apply(a.jr,c.jr),a.jd=c.jd,a.t=c.t):a=new Dt,i){if(o)if(a.t&&typeof a.t=="string"){const l=Dr(Hoe(a.t,o),n);Po(i,l,o)}else n&&Po(i,n,o);a.t=i}return r.j[t]=a,a}};const Ee=(t,e,n,o,r)=>t.ta(e,n,o,r),Ye=(t,e,n,o,r)=>t.tr(e,n,o,r),Cp=(t,e,n,o,r)=>t.ts(e,n,o,r),xe=(t,e,n,o,r)=>t.tt(e,n,o,r),jn="WORD",qu="UWORD",p3="ASCIINUMERICAL",y3="ALPHANUMERICAL",Ti="LOCALHOST",Fu="TLD",$u="UTLD",Oa="SCHEME",fr="SLASH_SCHEME",qh="NUM",Ru="WS",Fh="NL",ui="OPENBRACE",hi="CLOSEBRACE",dc="OPENBRACKET",uc="CLOSEBRACKET",hc="OPENPAREN",fc="CLOSEPAREN",pc="OPENANGLEBRACKET",yc="CLOSEANGLEBRACKET",gc="FULLWIDTHLEFTPAREN",_c="FULLWIDTHRIGHTPAREN",mc="LEFTCORNERBRACKET",bc="RIGHTCORNERBRACKET",vc="LEFTWHITECORNERBRACKET",kc="RIGHTWHITECORNERBRACKET",xc="FULLWIDTHLESSTHAN",Mc="FULLWIDTHGREATERTHAN",Sc="AMPERSAND",$h="APOSTROPHE",wc="ASTERISK",Yn="AT",Oc="BACKSLASH",Tc="BACKTICK",Dc="CARET",to="COLON",Rh="COMMA",Nc="DOLLAR",dn="DOT",jc="EQUALS",Bh="EXCLAMATION",Vt="HYPHEN",fi="PERCENT",Pc="PIPE",Cc="PLUS",zc="POUND",pi="QUERY",Lh="QUOTE",g3="FULLWIDTHMIDDLEDOT",Ih="SEMI",un="SLASH",yi="TILDE",Ac="UNDERSCORE",_3="EMOJI",Ec="SYM";var m3=Object.freeze({__proto__:null,WORD:jn,UWORD:qu,ASCIINUMERICAL:p3,ALPHANUMERICAL:y3,LOCALHOST:Ti,TLD:Fu,UTLD:$u,SCHEME:Oa,SLASH_SCHEME:fr,NUM:qh,WS:Ru,NL:Fh,OPENBRACE:ui,CLOSEBRACE:hi,OPENBRACKET:dc,CLOSEBRACKET:uc,OPENPAREN:hc,CLOSEPAREN:fc,OPENANGLEBRACKET:pc,CLOSEANGLEBRACKET:yc,FULLWIDTHLEFTPAREN:gc,FULLWIDTHRIGHTPAREN:_c,LEFTCORNERBRACKET:mc,RIGHTCORNERBRACKET:bc,LEFTWHITECORNERBRACKET:vc,RIGHTWHITECORNERBRACKET:kc,FULLWIDTHLESSTHAN:xc,FULLWIDTHGREATERTHAN:Mc,AMPERSAND:Sc,APOSTROPHE:$h,ASTERISK:wc,AT:Yn,BACKSLASH:Oc,BACKTICK:Tc,CARET:Dc,COLON:to,COMMA:Rh,DOLLAR:Nc,DOT:dn,EQUALS:jc,EXCLAMATION:Bh,HYPHEN:Vt,PERCENT:fi,PIPE:Pc,PLUS:Cc,POUND:zc,QUERY:pi,QUOTE:Lh,FULLWIDTHMIDDLEDOT:g3,SEMI:Ih,SLASH:un,TILDE:yi,UNDERSCORE:Ac,EMOJI:_3,SYM:Ec});const On=/[a-z]/,Ir=new RegExp("\\p{L}","u"),Yl=new RegExp("\\p{Emoji}","u"),Tn=/\d/,Ql=/\s/,zp="\r",es=`
31
- `,Xoe="️",Zoe="‍",ts="";let Zi=null,Gi=null;function Goe(t=[]){const e={};Dt.groups=e;const n=new Dt;Zi==null&&(Zi=Ap(Boe)),Gi==null&&(Gi=Ap(Loe)),xe(n,"'",$h),xe(n,"{",ui),xe(n,"}",hi),xe(n,"[",dc),xe(n,"]",uc),xe(n,"(",hc),xe(n,")",fc),xe(n,"<",pc),xe(n,">",yc),xe(n,"(",gc),xe(n,")",_c),xe(n,"「",mc),xe(n,"」",bc),xe(n,"『",vc),xe(n,"』",kc),xe(n,"<",xc),xe(n,">",Mc),xe(n,"&",Sc),xe(n,"*",wc),xe(n,"@",Yn),xe(n,"`",Tc),xe(n,"^",Dc),xe(n,":",to),xe(n,",",Rh),xe(n,"$",Nc),xe(n,".",dn),xe(n,"=",jc),xe(n,"!",Bh),xe(n,"-",Vt),xe(n,"%",fi),xe(n,"|",Pc),xe(n,"+",Cc),xe(n,"#",zc),xe(n,"?",pi),xe(n,'"',Lh),xe(n,"/",un),xe(n,";",Ih),xe(n,"~",yi),xe(n,"_",Ac),xe(n,"\\",Oc),xe(n,"・",g3);const o=Ye(n,Tn,qh,{[zu]:!0});Ye(o,Tn,o);const r=Ye(o,On,p3,{[di]:!0}),i=Ye(o,Ir,y3,{[ii]:!0}),a=Ye(n,On,jn,{[Au]:!0});Ye(a,Tn,r),Ye(a,On,a),Ye(r,Tn,r),Ye(r,On,r);const c=Ye(n,Ir,qu,{[Eu]:!0});Ye(c,On),Ye(c,Tn,i),Ye(c,Ir,c),Ye(i,Tn,i),Ye(i,On),Ye(i,Ir,i);const l=xe(n,es,Fh,{[Jl]:!0}),s=xe(n,zp,Ru,{[Jl]:!0}),u=Ye(n,Ql,Ru,{[Jl]:!0});xe(n,ts,u),xe(s,es,l),xe(s,ts,u),Ye(s,Ql,u),xe(u,zp),xe(u,es),Ye(u,Ql,u),xe(u,ts,u);const h=Ye(n,Yl,_3,{[f3]:!0});xe(h,"#"),Ye(h,Yl,h),xe(h,Xoe,h);const f=xe(h,Zoe);xe(f,"#"),Ye(f,Yl,h);const p=[[On,a],[Tn,r]],y=[[On,null],[Ir,c],[Tn,i]];for(let _=0;_<Zi.length;_++)Hn(n,Zi[_],Fu,jn,p);for(let _=0;_<Gi.length;_++)Hn(n,Gi[_],$u,qu,y);Po(Fu,{tld:!0,ascii:!0},e),Po($u,{utld:!0,alpha:!0},e),Hn(n,"file",Oa,jn,p),Hn(n,"mailto",Oa,jn,p),Hn(n,"http",fr,jn,p),Hn(n,"https",fr,jn,p),Hn(n,"ftp",fr,jn,p),Hn(n,"ftps",fr,jn,p),Po(Oa,{scheme:!0,ascii:!0},e),Po(fr,{slashscheme:!0,ascii:!0},e),t=t.sort((_,g)=>_[0]>g[0]?1:-1);for(let _=0;_<t.length;_++){const g=t[_][0],b=t[_][1]?{[Ioe]:!0}:{[Woe]:!0};g.indexOf("-")>=0?b[Uu]=!0:On.test(g)?Tn.test(g)?b[di]=!0:b[Au]=!0:b[zu]=!0,Cp(n,g,g,b)}return Cp(n,"localhost",Ti,{ascii:!0}),n.jd=new Dt(Ec),{start:n,tokens:Dr({groups:e},m3)}}function b3(t,e){const n=Koe(e.replace(/[A-Z]/g,c=>c.toLowerCase())),o=n.length,r=[];let i=0,a=0;for(;a<o;){let c=t,l=null,s=0,u=null,h=-1,f=-1;for(;a<o&&(l=c.go(n[a]));)c=l,c.accepts()?(h=0,f=0,u=c):h>=0&&(h+=n[a].length,f++),s+=n[a].length,i+=n[a].length,a++;i-=h,a-=f,s-=h,r.push({t:u.t,v:e.slice(i-s,i),s:i-s,e:i})}return r}function Koe(t){const e=[],n=t.length;let o=0;for(;o<n;){let r=t.charCodeAt(o),i,a=r<55296||r>56319||o+1===n||(i=t.charCodeAt(o+1))<56320||i>57343?t[o]:t.slice(o,o+2);e.push(a),o+=a.length}return e}function Hn(t,e,n,o,r){let i;const a=e.length;for(let c=0;c<a-1;c++){const l=e[c];t.j[l]?i=t.j[l]:(i=new Dt(o),i.jr=r.slice(),t.j[l]=i),t=i}return i=new Dt(n),i.jr=r.slice(),t.j[e[a-1]]=i,i}function Ap(t){const e=[],n=[];let o=0,r="0123456789";for(;o<t.length;){let i=0;for(;r.indexOf(t[o+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let a=parseInt(t.substring(o,o+i),10);a>0;a--)n.pop();o+=i}else n.push(t[o]),o++}return e}const Di={defaultProtocol:"http",events:null,format:Ep,formatHref:Ep,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Wh(t,e=null){let n=Dr({},Di);t&&(n=Dr(n,t instanceof Wh?t.o:t));const o=n.ignoreTags,r=[];for(let i=0;i<o.length;i++)r.push(o[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=r}Wh.prototype={o:Di,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const o=e!=null;let r=this.o[t];return r&&(typeof r=="object"?(r=n.t in r?r[n.t]:Di[t],typeof r=="function"&&o&&(r=r(e,n))):typeof r=="function"&&o&&(r=r(e,n.t,n)),r)},getObj(t,e,n){let o=this.o[t];return typeof o=="function"&&e!=null&&(o=o(e,n.t,n)),o},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Ep(t){return t}function v3(t,e){this.t="token",this.v=t,this.tk=e}v3.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),o=t.get("format",e,this);return n&&o.length>n?o.substring(0,n)+"…":o},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Di.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),o=t.get("formatHref",n,this),r=t.get("tagName",n,e),i=this.toFormattedString(t),a={},c=t.get("className",n,e),l=t.get("target",n,e),s=t.get("rel",n,e),u=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return a.href=o,c&&(a.class=c),l&&(a.target=l),s&&(a.rel=s),u&&Dr(a,u),{tagName:r,attributes:a,content:i,eventListeners:h}}};function Yc(t,e){class n extends v3{constructor(r,i){super(r,i),this.t=t}}for(const o in e)n.prototype[o]=e[o];return n.t=t,n}const Up=Yc("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),qp=Yc("text"),Joe=Yc("nl"),Ki=Yc("url",{isLink:!0,toHref(t=Di.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Ti&&t[1].t===to}}),Lt=t=>new Dt(t);function Yoe({groups:t}){const e=t.domain.concat([Sc,wc,Yn,Oc,Tc,Dc,Nc,jc,Vt,qh,fi,Pc,Cc,zc,un,Ec,yi,Ac]),n=[to,Rh,dn,Bh,fi,pi,Lh,Ih,pc,yc,ui,hi,uc,dc,hc,fc,gc,_c,mc,bc,vc,kc,xc,Mc],o=[Sc,$h,wc,Oc,Tc,Dc,Nc,jc,Vt,ui,hi,fi,Pc,Cc,zc,pi,un,Ec,yi,Ac],r=Lt(),i=xe(r,yi);Ee(i,o,i),Ee(i,t.domain,i);const a=Lt(),c=Lt(),l=Lt();Ee(r,t.domain,a),Ee(r,t.scheme,c),Ee(r,t.slashscheme,l),Ee(a,o,i),Ee(a,t.domain,a);const s=xe(a,Yn);xe(i,Yn,s),xe(c,Yn,s),xe(l,Yn,s);const u=xe(i,dn);Ee(u,o,i),Ee(u,t.domain,i);const h=Lt();Ee(s,t.domain,h),Ee(h,t.domain,h);const f=xe(h,dn);Ee(f,t.domain,h);const p=Lt(Up);Ee(f,t.tld,p),Ee(f,t.utld,p),xe(s,Ti,p);const y=xe(h,Vt);xe(y,Vt,y),Ee(y,t.domain,h),Ee(p,t.domain,h),xe(p,dn,f),xe(p,Vt,y);const _=xe(p,to);Ee(_,t.numeric,Up);const g=xe(a,Vt),m=xe(a,dn);xe(g,Vt,g),Ee(g,t.domain,a),Ee(m,o,i),Ee(m,t.domain,a);const b=Lt(Ki);Ee(m,t.tld,b),Ee(m,t.utld,b),Ee(b,t.domain,a),Ee(b,o,i),xe(b,dn,m),xe(b,Vt,g),xe(b,Yn,s);const v=xe(b,to),w=Lt(Ki);Ee(v,t.numeric,w);const M=Lt(Ki),O=Lt();Ee(M,e,M),Ee(M,n,O),Ee(O,e,M),Ee(O,n,O),xe(b,un,M),xe(w,un,M);const D=xe(c,to),j=xe(l,to),T=xe(j,un),A=xe(T,un);Ee(c,t.domain,a),xe(c,dn,m),xe(c,Vt,g),Ee(l,t.domain,a),xe(l,dn,m),xe(l,Vt,g),Ee(D,t.domain,M),xe(D,un,M),xe(D,pi,M),Ee(A,t.domain,M),Ee(A,e,M),xe(A,un,M);const R=[[ui,hi],[dc,uc],[hc,fc],[pc,yc],[gc,_c],[mc,bc],[vc,kc],[xc,Mc]];for(let S=0;S<R.length;S++){const[P,k]=R[S],I=xe(M,P);xe(O,P,I),xe(I,k,M);const C=Lt(Ki);Ee(I,e,C);const q=Lt();Ee(I,n),Ee(C,e,C),Ee(C,n,q),Ee(q,e,C),Ee(q,n,q),xe(C,k,M),xe(q,k,M)}return xe(r,Ti,b),xe(r,Fh,Joe),{start:r,tokens:m3}}function Qoe(t,e,n){let o=n.length,r=0,i=[],a=[];for(;r<o;){let c=t,l=null,s=null,u=0,h=null,f=-1;for(;r<o&&!(l=c.go(n[r].t));)a.push(n[r++]);for(;r<o&&(s=l||c.go(n[r].t));)l=null,c=s,c.accepts()?(f=0,h=c):f>=0&&f++,r++,u++;if(f<0)r-=u,r<o&&(a.push(n[r]),r++);else{a.length>0&&(i.push(ns(qp,e,a)),a=[]),r-=f,u-=f;const p=h.t,y=n.slice(r-u,r);i.push(ns(p,e,y))}}return a.length>0&&i.push(ns(qp,e,a)),i}function ns(t,e,n){const o=n[0].s,r=n[n.length-1].e,i=e.slice(o,r);return new t(i,n)}const ere=typeof console<"u"&&console&&console.warn||(()=>{}),tre="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ge={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function nre(){return Dt.groups={},Ge.scanner=null,Ge.parser=null,Ge.tokenQueue=[],Ge.pluginQueue=[],Ge.customSchemes=[],Ge.initialized=!1,Ge}function ore(t,e=!1){if(Ge.initialized&&ere(`linkifyjs: already initialized - will not register custom scheme "${t}" ${tre}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
30
+ */const h3=Ue.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:i,iconNode:a,...c},l)=>Ue.createElement("svg",{ref:l,...Uoe,width:e,height:e,stroke:t,strokeWidth:o?Number(n)*24/Number(e):n,className:u3("lucide",r),...c},[...a.map(([s,u])=>Ue.createElement(s,u)),...Array.isArray(i)?i:[i]]));async function $oe(t){if(!(t in jp))throw new Error("[lucide-react]: Name in Lucide DynamicIcon not found");return(await jp[t]()).__iconNode}const Roe=Ue.forwardRef(({name:t,fallback:e,...n},o)=>{const[r,i]=Ue.useState();return Ue.useEffect(()=>{$oe(t).then(i).catch(a=>{console.error(a)})},[t]),r==null?e==null?null:Ue.createElement(e):Ue.createElement(h3,{ref:o,...n,iconNode:r})}),Boe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Loe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Dr=(t,e)=>{for(const n in e)t[n]=e[n];return t},zu="numeric",Au="ascii",Eu="alpha",di="asciinumeric",ii="alphanumeric",Uu="domain",f3="emoji",Ioe="scheme",Woe="slashscheme",Jl="whitespace";function Voe(t,e){return t in e||(e[t]=[]),e[t]}function Po(t,e,n){e[zu]&&(e[di]=!0,e[ii]=!0),e[Au]&&(e[di]=!0,e[Eu]=!0),e[di]&&(e[ii]=!0),e[Eu]&&(e[ii]=!0),e[ii]&&(e[Uu]=!0),e[f3]&&(e[Uu]=!0);for(const o in e){const r=Voe(o,n);r.indexOf(t)<0&&r.push(t)}}function Hoe(t,e){const n={};for(const o in e)e[o].indexOf(t)>=0&&(n[o]=!0);return n}function Dt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Dt.groups={};Dt.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let o=0;o<e.jr.length;o++){const r=e.jr[o][0],i=e.jr[o][1];if(i&&r.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,o){for(let r=0;r<t.length;r++)this.tt(t[r],e,n,o)},tr(t,e,n,o){o=o||Dt.groups;let r;return e&&e.j?r=e:(r=new Dt(e),n&&o&&Po(e,n,o)),this.jr.push([t,r]),r},ts(t,e,n,o){let r=this;const i=t.length;if(!i)return r;for(let a=0;a<i-1;a++)r=r.tt(t[a]);return r.tt(t[i-1],e,n,o)},tt(t,e,n,o){o=o||Dt.groups;const r=this;if(e&&e.j)return r.j[t]=e,e;const i=e;let a,c=r.go(t);if(c?(a=new Dt,Dr(a.j,c.j),a.jr.push.apply(a.jr,c.jr),a.jd=c.jd,a.t=c.t):a=new Dt,i){if(o)if(a.t&&typeof a.t=="string"){const l=Dr(Hoe(a.t,o),n);Po(i,l,o)}else n&&Po(i,n,o);a.t=i}return r.j[t]=a,a}};const Ee=(t,e,n,o,r)=>t.ta(e,n,o,r),Qe=(t,e,n,o,r)=>t.tr(e,n,o,r),Cp=(t,e,n,o,r)=>t.ts(e,n,o,r),xe=(t,e,n,o,r)=>t.tt(e,n,o,r),jn="WORD",qu="UWORD",p3="ASCIINUMERICAL",y3="ALPHANUMERICAL",Ti="LOCALHOST",Fu="TLD",$u="UTLD",Oa="SCHEME",fr="SLASH_SCHEME",qh="NUM",Ru="WS",Fh="NL",ui="OPENBRACE",hi="CLOSEBRACE",dc="OPENBRACKET",uc="CLOSEBRACKET",hc="OPENPAREN",fc="CLOSEPAREN",pc="OPENANGLEBRACKET",yc="CLOSEANGLEBRACKET",gc="FULLWIDTHLEFTPAREN",_c="FULLWIDTHRIGHTPAREN",mc="LEFTCORNERBRACKET",bc="RIGHTCORNERBRACKET",vc="LEFTWHITECORNERBRACKET",kc="RIGHTWHITECORNERBRACKET",xc="FULLWIDTHLESSTHAN",Mc="FULLWIDTHGREATERTHAN",Sc="AMPERSAND",$h="APOSTROPHE",wc="ASTERISK",Yn="AT",Oc="BACKSLASH",Tc="BACKTICK",Dc="CARET",to="COLON",Rh="COMMA",Nc="DOLLAR",dn="DOT",jc="EQUALS",Bh="EXCLAMATION",Vt="HYPHEN",fi="PERCENT",Pc="PIPE",Cc="PLUS",zc="POUND",pi="QUERY",Lh="QUOTE",g3="FULLWIDTHMIDDLEDOT",Ih="SEMI",un="SLASH",yi="TILDE",Ac="UNDERSCORE",_3="EMOJI",Ec="SYM";var m3=Object.freeze({__proto__:null,WORD:jn,UWORD:qu,ASCIINUMERICAL:p3,ALPHANUMERICAL:y3,LOCALHOST:Ti,TLD:Fu,UTLD:$u,SCHEME:Oa,SLASH_SCHEME:fr,NUM:qh,WS:Ru,NL:Fh,OPENBRACE:ui,CLOSEBRACE:hi,OPENBRACKET:dc,CLOSEBRACKET:uc,OPENPAREN:hc,CLOSEPAREN:fc,OPENANGLEBRACKET:pc,CLOSEANGLEBRACKET:yc,FULLWIDTHLEFTPAREN:gc,FULLWIDTHRIGHTPAREN:_c,LEFTCORNERBRACKET:mc,RIGHTCORNERBRACKET:bc,LEFTWHITECORNERBRACKET:vc,RIGHTWHITECORNERBRACKET:kc,FULLWIDTHLESSTHAN:xc,FULLWIDTHGREATERTHAN:Mc,AMPERSAND:Sc,APOSTROPHE:$h,ASTERISK:wc,AT:Yn,BACKSLASH:Oc,BACKTICK:Tc,CARET:Dc,COLON:to,COMMA:Rh,DOLLAR:Nc,DOT:dn,EQUALS:jc,EXCLAMATION:Bh,HYPHEN:Vt,PERCENT:fi,PIPE:Pc,PLUS:Cc,POUND:zc,QUERY:pi,QUOTE:Lh,FULLWIDTHMIDDLEDOT:g3,SEMI:Ih,SLASH:un,TILDE:yi,UNDERSCORE:Ac,EMOJI:_3,SYM:Ec});const On=/[a-z]/,Ir=new RegExp("\\p{L}","u"),Yl=new RegExp("\\p{Emoji}","u"),Tn=/\d/,Ql=/\s/,zp="\r",es=`
31
+ `,Xoe="️",Zoe="‍",ts="";let Zi=null,Gi=null;function Goe(t=[]){const e={};Dt.groups=e;const n=new Dt;Zi==null&&(Zi=Ap(Boe)),Gi==null&&(Gi=Ap(Loe)),xe(n,"'",$h),xe(n,"{",ui),xe(n,"}",hi),xe(n,"[",dc),xe(n,"]",uc),xe(n,"(",hc),xe(n,")",fc),xe(n,"<",pc),xe(n,">",yc),xe(n,"(",gc),xe(n,")",_c),xe(n,"「",mc),xe(n,"」",bc),xe(n,"『",vc),xe(n,"』",kc),xe(n,"<",xc),xe(n,">",Mc),xe(n,"&",Sc),xe(n,"*",wc),xe(n,"@",Yn),xe(n,"`",Tc),xe(n,"^",Dc),xe(n,":",to),xe(n,",",Rh),xe(n,"$",Nc),xe(n,".",dn),xe(n,"=",jc),xe(n,"!",Bh),xe(n,"-",Vt),xe(n,"%",fi),xe(n,"|",Pc),xe(n,"+",Cc),xe(n,"#",zc),xe(n,"?",pi),xe(n,'"',Lh),xe(n,"/",un),xe(n,";",Ih),xe(n,"~",yi),xe(n,"_",Ac),xe(n,"\\",Oc),xe(n,"・",g3);const o=Qe(n,Tn,qh,{[zu]:!0});Qe(o,Tn,o);const r=Qe(o,On,p3,{[di]:!0}),i=Qe(o,Ir,y3,{[ii]:!0}),a=Qe(n,On,jn,{[Au]:!0});Qe(a,Tn,r),Qe(a,On,a),Qe(r,Tn,r),Qe(r,On,r);const c=Qe(n,Ir,qu,{[Eu]:!0});Qe(c,On),Qe(c,Tn,i),Qe(c,Ir,c),Qe(i,Tn,i),Qe(i,On),Qe(i,Ir,i);const l=xe(n,es,Fh,{[Jl]:!0}),s=xe(n,zp,Ru,{[Jl]:!0}),u=Qe(n,Ql,Ru,{[Jl]:!0});xe(n,ts,u),xe(s,es,l),xe(s,ts,u),Qe(s,Ql,u),xe(u,zp),xe(u,es),Qe(u,Ql,u),xe(u,ts,u);const h=Qe(n,Yl,_3,{[f3]:!0});xe(h,"#"),Qe(h,Yl,h),xe(h,Xoe,h);const f=xe(h,Zoe);xe(f,"#"),Qe(f,Yl,h);const p=[[On,a],[Tn,r]],y=[[On,null],[Ir,c],[Tn,i]];for(let _=0;_<Zi.length;_++)Hn(n,Zi[_],Fu,jn,p);for(let _=0;_<Gi.length;_++)Hn(n,Gi[_],$u,qu,y);Po(Fu,{tld:!0,ascii:!0},e),Po($u,{utld:!0,alpha:!0},e),Hn(n,"file",Oa,jn,p),Hn(n,"mailto",Oa,jn,p),Hn(n,"http",fr,jn,p),Hn(n,"https",fr,jn,p),Hn(n,"ftp",fr,jn,p),Hn(n,"ftps",fr,jn,p),Po(Oa,{scheme:!0,ascii:!0},e),Po(fr,{slashscheme:!0,ascii:!0},e),t=t.sort((_,g)=>_[0]>g[0]?1:-1);for(let _=0;_<t.length;_++){const g=t[_][0],b=t[_][1]?{[Ioe]:!0}:{[Woe]:!0};g.indexOf("-")>=0?b[Uu]=!0:On.test(g)?Tn.test(g)?b[di]=!0:b[Au]=!0:b[zu]=!0,Cp(n,g,g,b)}return Cp(n,"localhost",Ti,{ascii:!0}),n.jd=new Dt(Ec),{start:n,tokens:Dr({groups:e},m3)}}function b3(t,e){const n=Koe(e.replace(/[A-Z]/g,c=>c.toLowerCase())),o=n.length,r=[];let i=0,a=0;for(;a<o;){let c=t,l=null,s=0,u=null,h=-1,f=-1;for(;a<o&&(l=c.go(n[a]));)c=l,c.accepts()?(h=0,f=0,u=c):h>=0&&(h+=n[a].length,f++),s+=n[a].length,i+=n[a].length,a++;i-=h,a-=f,s-=h,r.push({t:u.t,v:e.slice(i-s,i),s:i-s,e:i})}return r}function Koe(t){const e=[],n=t.length;let o=0;for(;o<n;){let r=t.charCodeAt(o),i,a=r<55296||r>56319||o+1===n||(i=t.charCodeAt(o+1))<56320||i>57343?t[o]:t.slice(o,o+2);e.push(a),o+=a.length}return e}function Hn(t,e,n,o,r){let i;const a=e.length;for(let c=0;c<a-1;c++){const l=e[c];t.j[l]?i=t.j[l]:(i=new Dt(o),i.jr=r.slice(),t.j[l]=i),t=i}return i=new Dt(n),i.jr=r.slice(),t.j[e[a-1]]=i,i}function Ap(t){const e=[],n=[];let o=0,r="0123456789";for(;o<t.length;){let i=0;for(;r.indexOf(t[o+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let a=parseInt(t.substring(o,o+i),10);a>0;a--)n.pop();o+=i}else n.push(t[o]),o++}return e}const Di={defaultProtocol:"http",events:null,format:Ep,formatHref:Ep,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Wh(t,e=null){let n=Dr({},Di);t&&(n=Dr(n,t instanceof Wh?t.o:t));const o=n.ignoreTags,r=[];for(let i=0;i<o.length;i++)r.push(o[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=r}Wh.prototype={o:Di,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const o=e!=null;let r=this.o[t];return r&&(typeof r=="object"?(r=n.t in r?r[n.t]:Di[t],typeof r=="function"&&o&&(r=r(e,n))):typeof r=="function"&&o&&(r=r(e,n.t,n)),r)},getObj(t,e,n){let o=this.o[t];return typeof o=="function"&&e!=null&&(o=o(e,n.t,n)),o},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Ep(t){return t}function v3(t,e){this.t="token",this.v=t,this.tk=e}v3.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),o=t.get("format",e,this);return n&&o.length>n?o.substring(0,n)+"…":o},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Di.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),o=t.get("formatHref",n,this),r=t.get("tagName",n,e),i=this.toFormattedString(t),a={},c=t.get("className",n,e),l=t.get("target",n,e),s=t.get("rel",n,e),u=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return a.href=o,c&&(a.class=c),l&&(a.target=l),s&&(a.rel=s),u&&Dr(a,u),{tagName:r,attributes:a,content:i,eventListeners:h}}};function Yc(t,e){class n extends v3{constructor(r,i){super(r,i),this.t=t}}for(const o in e)n.prototype[o]=e[o];return n.t=t,n}const Up=Yc("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),qp=Yc("text"),Joe=Yc("nl"),Ki=Yc("url",{isLink:!0,toHref(t=Di.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Ti&&t[1].t===to}}),Lt=t=>new Dt(t);function Yoe({groups:t}){const e=t.domain.concat([Sc,wc,Yn,Oc,Tc,Dc,Nc,jc,Vt,qh,fi,Pc,Cc,zc,un,Ec,yi,Ac]),n=[to,Rh,dn,Bh,fi,pi,Lh,Ih,pc,yc,ui,hi,uc,dc,hc,fc,gc,_c,mc,bc,vc,kc,xc,Mc],o=[Sc,$h,wc,Oc,Tc,Dc,Nc,jc,Vt,ui,hi,fi,Pc,Cc,zc,pi,un,Ec,yi,Ac],r=Lt(),i=xe(r,yi);Ee(i,o,i),Ee(i,t.domain,i);const a=Lt(),c=Lt(),l=Lt();Ee(r,t.domain,a),Ee(r,t.scheme,c),Ee(r,t.slashscheme,l),Ee(a,o,i),Ee(a,t.domain,a);const s=xe(a,Yn);xe(i,Yn,s),xe(c,Yn,s),xe(l,Yn,s);const u=xe(i,dn);Ee(u,o,i),Ee(u,t.domain,i);const h=Lt();Ee(s,t.domain,h),Ee(h,t.domain,h);const f=xe(h,dn);Ee(f,t.domain,h);const p=Lt(Up);Ee(f,t.tld,p),Ee(f,t.utld,p),xe(s,Ti,p);const y=xe(h,Vt);xe(y,Vt,y),Ee(y,t.domain,h),Ee(p,t.domain,h),xe(p,dn,f),xe(p,Vt,y);const _=xe(p,to);Ee(_,t.numeric,Up);const g=xe(a,Vt),m=xe(a,dn);xe(g,Vt,g),Ee(g,t.domain,a),Ee(m,o,i),Ee(m,t.domain,a);const b=Lt(Ki);Ee(m,t.tld,b),Ee(m,t.utld,b),Ee(b,t.domain,a),Ee(b,o,i),xe(b,dn,m),xe(b,Vt,g),xe(b,Yn,s);const v=xe(b,to),w=Lt(Ki);Ee(v,t.numeric,w);const M=Lt(Ki),O=Lt();Ee(M,e,M),Ee(M,n,O),Ee(O,e,M),Ee(O,n,O),xe(b,un,M),xe(w,un,M);const D=xe(c,to),j=xe(l,to),T=xe(j,un),A=xe(T,un);Ee(c,t.domain,a),xe(c,dn,m),xe(c,Vt,g),Ee(l,t.domain,a),xe(l,dn,m),xe(l,Vt,g),Ee(D,t.domain,M),xe(D,un,M),xe(D,pi,M),Ee(A,t.domain,M),Ee(A,e,M),xe(A,un,M);const R=[[ui,hi],[dc,uc],[hc,fc],[pc,yc],[gc,_c],[mc,bc],[vc,kc],[xc,Mc]];for(let S=0;S<R.length;S++){const[P,k]=R[S],I=xe(M,P);xe(O,P,I),xe(I,k,M);const C=Lt(Ki);Ee(I,e,C);const q=Lt();Ee(I,n),Ee(C,e,C),Ee(C,n,q),Ee(q,e,C),Ee(q,n,q),xe(C,k,M),xe(q,k,M)}return xe(r,Ti,b),xe(r,Fh,Joe),{start:r,tokens:m3}}function Qoe(t,e,n){let o=n.length,r=0,i=[],a=[];for(;r<o;){let c=t,l=null,s=null,u=0,h=null,f=-1;for(;r<o&&!(l=c.go(n[r].t));)a.push(n[r++]);for(;r<o&&(s=l||c.go(n[r].t));)l=null,c=s,c.accepts()?(f=0,h=c):f>=0&&f++,r++,u++;if(f<0)r-=u,r<o&&(a.push(n[r]),r++);else{a.length>0&&(i.push(ns(qp,e,a)),a=[]),r-=f,u-=f;const p=h.t,y=n.slice(r-u,r);i.push(ns(p,e,y))}}return a.length>0&&i.push(ns(qp,e,a)),i}function ns(t,e,n){const o=n[0].s,r=n[n.length-1].e,i=e.slice(o,r);return new t(i,n)}const ere=typeof console<"u"&&console&&console.warn||(()=>{}),tre="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ge={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function nre(){return Dt.groups={},Ge.scanner=null,Ge.parser=null,Ge.tokenQueue=[],Ge.pluginQueue=[],Ge.customSchemes=[],Ge.initialized=!1,Ge}function ore(t,e=!1){if(Ge.initialized&&ere(`linkifyjs: already initialized - will not register custom scheme "${t}" ${tre}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
32
32
  1. Must only contain digits, lowercase ASCII letters or "-"
33
33
  2. Cannot start or end with "-"
34
- 3. "-" cannot repeat`);Ge.customSchemes.push([t,e])}function rre(){Ge.scanner=Goe(Ge.customSchemes);for(let t=0;t<Ge.tokenQueue.length;t++)Ge.tokenQueue[t][1]({scanner:Ge.scanner});Ge.parser=Yoe(Ge.scanner.tokens);for(let t=0;t<Ge.pluginQueue.length;t++)Ge.pluginQueue[t][1]({scanner:Ge.scanner,parser:Ge.parser});return Ge.initialized=!0,Ge}function Vh(t){return Ge.initialized||rre(),Qoe(Ge.parser.start,t,b3(Ge.scanner.start,t))}Vh.scan=b3;function ire(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const o=new Wh(n),r=Vh(t),i=[];for(let a=0;a<r.length;a++){const c=r[a];c.isLink&&(!e||c.t===e)&&o.check(c)&&i.push(c.toFormattedObject(o))}return i}var Uc=200,lt=function(){};lt.prototype.append=function(e){return e.length?(e=lt.from(e),!this.length&&e||e.length<Uc&&this.leafAppend(e)||this.length<Uc&&e.leafPrepend(this)||this.appendInner(e)):this};lt.prototype.prepend=function(e){return e.length?lt.from(e).append(this):this};lt.prototype.appendInner=function(e){return new are(this,e)};lt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?lt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};lt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};lt.prototype.forEach=function(e,n,o){n===void 0&&(n=0),o===void 0&&(o=this.length),n<=o?this.forEachInner(e,n,o,0):this.forEachInvertedInner(e,n,o,0)};lt.prototype.map=function(e,n,o){n===void 0&&(n=0),o===void 0&&(o=this.length);var r=[];return this.forEach(function(i,a){return r.push(e(i,a))},n,o),r};lt.from=function(e){return e instanceof lt?e:e&&e.length?new k3(e):lt.empty};var k3=function(t){function e(o){t.call(this),this.values=o}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,a,c){for(var l=i;l<a;l++)if(r(this.values[l],c+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,a,c){for(var l=i-1;l>=a;l--)if(r(this.values[l],c+l)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Uc)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Uc)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(lt);lt.empty=new k3([]);var are=function(t){function e(n,o){t.call(this),this.left=n,this.right=o,this.length=n.length+o.length,this.depth=Math.max(n.depth,o.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(o){return o<this.left.length?this.left.get(o):this.right.get(o-this.left.length)},e.prototype.forEachInner=function(o,r,i,a){var c=this.left.length;if(r<c&&this.left.forEachInner(o,r,Math.min(i,c),a)===!1||i>c&&this.right.forEachInner(o,Math.max(r-c,0),Math.min(this.length,i)-c,a+c)===!1)return!1},e.prototype.forEachInvertedInner=function(o,r,i,a){var c=this.left.length;if(r>c&&this.right.forEachInvertedInner(o,r-c,Math.max(i,c)-c,a+c)===!1||i<c&&this.left.forEachInvertedInner(o,Math.min(r,c),i,a)===!1)return!1},e.prototype.sliceInner=function(o,r){if(o==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(o,r):o>=i?this.right.slice(o-i,r-i):this.left.slice(o,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(o){var r=this.right.leafAppend(o);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(o){var r=this.left.leafPrepend(o);if(r)return new e(r,this.right)},e.prototype.appendInner=function(o){return this.left.depth>=Math.max(this.right.depth,o.depth)+1?new e(this.left,new e(this.right,o)):new e(this,o)},e}(lt);const cre=500;class on{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}let r,i;n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let a=e.tr,c,l,s=[],u=[];return this.items.forEach((h,f)=>{if(!h.step){r||(r=this.remapping(o,f+1),i=r.maps.length),i--,u.push(h);return}if(r){u.push(new hn(h.map));let p=h.step.map(r.slice(i)),y;p&&a.maybeStep(p).doc&&(y=a.mapping.maps[a.mapping.maps.length-1],s.push(new hn(y,void 0,void 0,s.length+u.length))),i--,y&&r.appendMap(y,i)}else a.maybeStep(h.step);if(h.selection)return c=r?h.selection.map(r.slice(i)):h.selection,l=new on(this.items.slice(0,o).append(u.reverse().concat(s)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:c}}addTransform(e,n,o,r){let i=[],a=this.eventCount,c=this.items,l=!r&&c.length?c.get(c.length-1):null;for(let u=0;u<e.steps.length;u++){let h=e.steps[u].invert(e.docs[u]),f=new hn(e.mapping.maps[u],h,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():c=c.slice(0,c.length-1)),i.push(f),n&&(a++,n=void 0),r||(l=f)}let s=a-o.depth;return s>sre&&(c=lre(c,s),a-=s),new on(c.append(i),a)}remapping(e,n){let o=new yr;return this.items.forEach((r,i)=>{let a=r.mirrorOffset!=null&&i-r.mirrorOffset>=e?o.maps.length-r.mirrorOffset:void 0;o.appendMap(r.map,a)},e,n),o}addMaps(e){return this.eventCount==0?this:new on(this.items.append(e.map(n=>new hn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let o=[],r=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,c=this.eventCount;this.items.forEach(f=>{f.selection&&c--},r);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let y=i.maps[p];if(f.step){let _=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&c++,o.push(new hn(y,_,g))}else o.push(new hn(y))},r);let s=[];for(let f=n;f<a;f++)s.push(new hn(i.maps[f]));let u=this.items.slice(0,r).append(s).append(o),h=new on(u,c);return h.emptyItemCount()>cre&&(h=h.compress(this.items.length-o.length)),h}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),o=n.maps.length,r=[],i=0;return this.items.forEach((a,c)=>{if(c>=e)r.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(o)),s=l&&l.getMap();if(o--,s&&n.appendMap(s,o),l){let u=a.selection&&a.selection.map(n.slice(o));u&&i++;let h=new hn(s.invert(),l,u),f,p=r.length-1;(f=r.length&&r[p].merge(h))?r[p]=f:r.push(h)}}else a.map&&o--},this.items.length,0),new on(lt.from(r.reverse()),i)}}on.empty=new on(lt.empty,0);function lre(t,e){let n;return t.forEach((o,r)=>{if(o.selection&&e--==0)return n=r,!1}),t.slice(n)}class hn{constructor(e,n,o,r){this.map=e,this.step=n,this.selection=o,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new hn(n.getMap().invert(),n,this.selection)}}}class Qn{constructor(e,n,o,r,i){this.done=e,this.undone=n,this.prevRanges=o,this.prevTime=r,this.prevComposition=i}}const sre=20;function dre(t,e,n,o){let r=n.getMeta(Uo),i;if(r)return r.historyState;n.getMeta(fre)&&(t=new Qn(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Uo))return a.getMeta(Uo).redo?new Qn(t.done.addTransform(n,void 0,o,Ta(e)),t.undone,Fp(n.mapping.maps),t.prevTime,t.prevComposition):new Qn(t.done,t.undone.addTransform(n,void 0,o,Ta(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let c=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=c&&(t.prevTime<(n.time||0)-o.newGroupDelay||!ure(n,t.prevRanges)),s=a?rs(t.prevRanges,n.mapping):Fp(n.mapping.maps);return new Qn(t.done.addTransform(n,l?e.selection.getBookmark():void 0,o,Ta(e)),on.empty,s,n.time,c??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Qn(t.done.rebased(n,i),t.undone.rebased(n,i),rs(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Qn(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),rs(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function ure(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((o,r)=>{for(let i=0;i<e.length;i+=2)o<=e[i+1]&&r>=e[i]&&(n=!0)}),n}function Fp(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((o,r,i,a)=>e.push(i,a));return e}function rs(t,e){if(!t)return null;let n=[];for(let o=0;o<t.length;o+=2){let r=e.map(t[o],1),i=e.map(t[o+1],-1);r<=i&&n.push(r,i)}return n}function hre(t,e,n){let o=Ta(e),r=Uo.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,o);if(!i)return null;let a=i.selection.resolve(i.transform.doc),c=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),r,o),l=new Qn(n?c:i.remaining,n?i.remaining:c,null,0,-1);return i.transform.setSelection(a).setMeta(Uo,{redo:n,historyState:l})}let is=!1,$p=null;function Ta(t){let e=t.plugins;if($p!=e){is=!1,$p=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){is=!0;break}}return is}const Uo=new zr("history"),fre=new zr("closeHistory");function pre(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vo({key:Uo,state:{init(){return new Qn(on.empty,on.empty,null,0,-1)},apply(e,n,o){return dre(n,o,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let o=n.inputType,r=o=="historyUndo"?M3:o=="historyRedo"?S3:null;return r?(n.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function x3(t,e){return(n,o)=>{let r=Uo.getState(n);if(!r||(t?r.undone:r.done).eventCount==0)return!1;if(o){let i=hre(r,n,t);i&&o(e?i.scrollIntoView():i)}return!0}}const M3=x3(!1,!0),S3=x3(!0,!0);function yre(t={}){return new Vo({view(e){return new gre(e,t)}})}class gre{constructor(e,n){var o;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(o=n.width)!==null&&o!==void 0?o:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let i=a=>{this[r](a)};return e.dom.addEventListener(r,i),{name:r,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,o;if(n){let c=e.nodeBefore,l=e.nodeAfter;if(c||l){let s=this.editorView.nodeDOM(this.cursorPos-(c?c.nodeSize:0));if(s){let u=s.getBoundingClientRect(),h=c?u.bottom:u.top;c&&l&&(h=(h+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),o={left:u.left,right:u.right,top:h-this.width/2,bottom:h+this.width/2}}}}if(!o){let c=this.editorView.coordsAtPos(this.cursorPos);o={left:c.left-this.width/2,right:c.left+this.width/2,top:c.top,bottom:c.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,a;if(!r||r==document.body&&getComputedStyle(r).position=="static")i=-pageXOffset,a=-pageYOffset;else{let c=r.getBoundingClientRect();i=c.left-r.scrollLeft,a=c.top-r.scrollTop}this.element.style.left=o.left-i+"px",this.element.style.top=o.top-a+"px",this.element.style.width=o.right-o.left+"px",this.element.style.height=o.bottom-o.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=o&&o.type.spec.disableDropCursor,i=typeof r=="function"?r(this.editorView,n,e):r;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let c=w5(this.editorView.state.doc,a,this.editorView.dragging.slice);c!=null&&(a=c)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}class Qe extends Ce{constructor(e){super(e,e)}map(e,n){let o=e.resolve(n.map(this.head));return Qe.valid(o)?new Qe(o):Ce.near(o)}content(){return Se.empty}eq(e){return e instanceof Qe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Qe(e.resolve(n.pos))}getBookmark(){return new Hh(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!_re(e)||!mre(e))return!1;let o=n.type.spec.allowGapCursor;if(o!=null)return o;let r=n.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,n,o=!1){e:for(;;){if(!o&&Qe.valid(e))return e;let r=e.pos,i=null;for(let a=e.depth;;a--){let c=e.node(a);if(n>0?e.indexAfter(a)<c.childCount:e.index(a)>0){i=c.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;r+=n;let l=e.doc.resolve(r);if(Qe.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!Ne.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*n),o=!1;continue e}break}i=a,r+=n;let c=e.doc.resolve(r);if(Qe.valid(c))return c}return null}}}Qe.prototype.visible=!1;Qe.findFrom=Qe.findGapCursorFrom;Ce.jsonID("gapcursor",Qe);class Hh{constructor(e){this.pos=e}map(e){return new Hh(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Qe.valid(n)?new Qe(n):Ce.near(n)}}function _re(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),o=t.node(e);if(n==0){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function mre(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),o=t.node(e);if(n==o.childCount){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function bre(){return new Vo({props:{decorations:Mre,createSelectionBetween(t,e,n){return e.pos==n.pos&&Qe.valid(n)?new Qe(n):null},handleClick:kre,handleKeyDown:vre,handleDOMEvents:{beforeinput:xre}}})}const vre=vh({ArrowLeft:Ji("horiz",-1),ArrowRight:Ji("horiz",1),ArrowUp:Ji("vert",-1),ArrowDown:Ji("vert",1)});function Ji(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(o,r,i){let a=o.selection,c=e>0?a.$to:a.$from,l=a.empty;if(a instanceof qe){if(!i.endOfTextblock(n)||c.depth==0)return!1;l=!1,c=o.doc.resolve(e>0?c.after():c.before())}let s=Qe.findGapCursorFrom(c,e,l);return s?(r&&r(o.tr.setSelection(new Qe(s))),!0):!1}}function kre(t,e,n){if(!t||!t.editable)return!1;let o=t.state.doc.resolve(e);if(!Qe.valid(o))return!1;let r=t.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&Ne.isSelectable(t.state.doc.nodeAt(r.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Qe(o))),!0)}function xre(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Qe))return!1;let{$from:n}=t.state.selection,o=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!o)return!1;let r=ye.empty;for(let a=o.length-1;a>=0;a--)r=ye.from(o[a].createAndFill(null,r));let i=t.state.tr.replace(n.pos,n.pos,new Se(r,0,0));return i.setSelection(qe.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Mre(t){if(!(t.selection instanceof Qe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Je.create(t.doc,[yt.widget(t.selection.head,e,{key:"gapcursor"})])}var Bu,Lu;if(typeof WeakMap<"u"){let t=new WeakMap;Bu=e=>t.get(e),Lu=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Bu=o=>{for(let r=0;r<t.length;r+=2)if(t[r]==o)return t[r+1]},Lu=(o,r)=>(n==10&&(n=0),t[n++]=o,t[n++]=r)}var et=class{constructor(t,e,n,o){this.width=t,this.height=e,this.map=n,this.problems=o}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const o=e%this.width,r=e/this.width|0;let i=o+1,a=r+1;for(let c=1;i<this.width&&this.map[e+c]==n;c++)i++;for(let c=1;a<this.height&&this.map[e+this.width*c]==n;c++)a++;return{left:o,top:r,right:i,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:o,right:r,top:i,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?o==0:r==this.width)?null:this.map[i*this.width+(n<0?o-1:r)]:(n<0?i==0:a==this.height)?null:this.map[o+this.width*(n<0?i-1:a)]}rectBetween(t,e){const{left:n,right:o,top:r,bottom:i}=this.findCell(t),{left:a,right:c,top:l,bottom:s}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(r,l),right:Math.max(o,c),bottom:Math.max(i,s)}}cellsInRect(t){const e=[],n={};for(let o=t.top;o<t.bottom;o++)for(let r=t.left;r<t.right;r++){const i=o*this.width+r,a=this.map[i];n[a]||(n[a]=!0,!(r==t.left&&r&&this.map[i-1]==a||o==t.top&&o&&this.map[i-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let o=0,r=0;;o++){const i=r+n.child(o).nodeSize;if(o==t){let a=e+t*this.width;const c=(t+1)*this.width;for(;a<c&&this.map[a]<r;)a++;return a==c?i-1:this.map[a]}r=i}}static get(t){return Bu(t)||Lu(t,Sre(t))}};function Sre(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=wre(t),n=t.childCount,o=[];let r=0,i=null;const a=[];for(let s=0,u=e*n;s<u;s++)o[s]=0;for(let s=0,u=0;s<n;s++){const h=t.child(s);u++;for(let y=0;;y++){for(;r<o.length&&o[r]!=0;)r++;if(y==h.childCount)break;const _=h.child(y),{colspan:g,rowspan:m,colwidth:b}=_.attrs;for(let v=0;v<m;v++){if(v+s>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:m-v});break}const w=r+v*e;for(let M=0;M<g;M++){o[w+M]==0?o[w+M]=u:(i||(i=[])).push({type:"collision",row:s,pos:u,n:g-M});const O=b&&b[M];if(O){const D=(w+M)%e*2,j=a[D];j==null||j!=O&&a[D+1]==1?(a[D]=O,a[D+1]=1):j==O&&a[D+1]++}}}r+=g,u+=_.nodeSize}const f=(s+1)*e;let p=0;for(;r<f;)o[r++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:s,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const c=new et(e,n,o,i);let l=!1;for(let s=0;!l&&s<a.length;s+=2)a[s]!=null&&a[s+1]<n&&(l=!0);return l&&Ore(c,a,t),c}function wre(t){let e=-1,n=!1;for(let o=0;o<t.childCount;o++){const r=t.child(o);let i=0;if(n)for(let a=0;a<o;a++){const c=t.child(a);for(let l=0;l<c.childCount;l++){const s=c.child(l);a+s.attrs.rowspan>o&&(i+=s.attrs.colspan)}}for(let a=0;a<r.childCount;a++){const c=r.child(a);i+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function Ore(t,e,n){t.problems||(t.problems=[]);const o={};for(let r=0;r<t.map.length;r++){const i=t.map[r];if(o[i])continue;o[i]=!0;const a=n.nodeAt(i);if(!a)throw new RangeError(`No cell with offset ${i} found`);let c=null;const l=a.attrs;for(let s=0;s<l.colspan;s++){const u=(r+s)%t.width,h=e[u*2];h!=null&&(!l.colwidth||l.colwidth[s]!=h)&&((c||(c=Tre(l)))[s]=h)}c&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:c})}}function Tre(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function gt(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const o=t.nodes[n],r=o.spec.tableRole;r&&(e[r]=o)}}return e}var no=new zr("selectingCells");function Er(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Dre(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function ln(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Qc(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Er(e.$head)||Nre(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function Nre(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const o=e.type.spec.tableRole;if(o=="cell"||o=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const o=e.type.spec.tableRole;if(o=="cell"||o=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function Iu(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function jre(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Xh(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function w3(t,e,n){const o=t.node(-1),r=et.get(o),i=t.start(-1),a=r.nextCell(t.pos-i,e,n);return a==null?null:t.node(0).resolve(i+a)}function Lo(t,e,n=1){const o={...t,colspan:t.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(e,n),o.colwidth.some(r=>r>0)||(o.colwidth=null)),o}function O3(t,e,n=1){const o={...t,colspan:t.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let r=0;r<n;r++)o.colwidth.splice(e,0,0)}return o}function Pre(t,e,n){const o=gt(e.type.schema).header_cell;for(let r=0;r<t.height;r++)if(e.nodeAt(t.map[n+r*t.width]).type!=o)return!1;return!0}var Ke=class Pn extends Ce{constructor(e,n=e){const o=e.node(-1),r=et.get(o),i=e.start(-1),a=r.rectBetween(e.pos-i,n.pos-i),c=e.node(0),l=r.cellsInRect(a).filter(u=>u!=n.pos-i);l.unshift(n.pos-i);const s=l.map(u=>{const h=o.nodeAt(u);if(!h)throw RangeError(`No cell with offset ${u} found`);const f=i+u+1;return new sh(c.resolve(f),c.resolve(f+h.content.size))});super(s[0].$from,s[0].$to,s),this.$anchorCell=e,this.$headCell=n}map(e,n){const o=e.resolve(n.map(this.$anchorCell.pos)),r=e.resolve(n.map(this.$headCell.pos));if(Iu(o)&&Iu(r)&&Xh(o,r)){const i=this.$anchorCell.node(-1)!=o.node(-1);return i&&this.isRowSelection()?Pn.rowSelection(o,r):i&&this.isColSelection()?Pn.colSelection(o,r):new Pn(o,r)}return qe.between(o,r)}content(){const e=this.$anchorCell.node(-1),n=et.get(e),o=this.$anchorCell.start(-1),r=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),i={},a=[];for(let l=r.top;l<r.bottom;l++){const s=[];for(let u=l*n.width+r.left,h=r.left;h<r.right;h++,u++){const f=n.map[u];if(i[f])continue;i[f]=!0;const p=n.findCell(f);let y=e.nodeAt(f);if(!y)throw RangeError(`No cell with offset ${f} found`);const _=r.left-p.left,g=p.right-r.right;if(_>0||g>0){let m=y.attrs;if(_>0&&(m=Lo(m,0,_)),g>0&&(m=Lo(m,m.colspan-g,g)),p.left<r.left){if(y=y.type.createAndFill(m),!y)throw RangeError(`Could not create cell with attrs ${JSON.stringify(m)}`)}else y=y.type.create(m,y.content)}if(p.top<r.top||p.bottom>r.bottom){const m={...y.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?y=y.type.createAndFill(m):y=y.type.create(m,y.content)}s.push(y)}a.push(e.child(l).copy(ye.from(s)))}const c=this.isColSelection()&&this.isRowSelection()?e:a;return new Se(ye.from(c),1,1)}replace(e,n=Se.empty){const o=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){const{$from:c,$to:l}=r[a],s=e.mapping.slice(o);e.replace(s.map(c.pos),s.map(l.pos),a?Se.empty:n)}const i=Ce.findFrom(e.doc.resolve(e.mapping.slice(o).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Se(ye.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),o=et.get(n),r=this.$anchorCell.start(-1),i=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let a=0;a<i.length;a++)e(n.nodeAt(i[a]),r+i[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const o=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,r)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const o=e.node(-1),r=et.get(o),i=e.start(-1),a=r.findCell(e.pos-i),c=r.findCell(n.pos-i),l=e.node(0);return a.top<=c.top?(a.top>0&&(e=l.resolve(i+r.map[a.left])),c.bottom<r.height&&(n=l.resolve(i+r.map[r.width*(r.height-1)+c.right-1]))):(c.top>0&&(n=l.resolve(i+r.map[c.left])),a.bottom<r.height&&(e=l.resolve(i+r.map[r.width*(r.height-1)+a.right-1]))),new Pn(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=et.get(e),o=this.$anchorCell.start(-1),r=n.colCount(this.$anchorCell.pos-o),i=n.colCount(this.$headCell.pos-o);if(Math.min(r,i)>0)return!1;const a=r+this.$anchorCell.nodeAfter.attrs.colspan,c=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,c)==n.width}eq(e){return e instanceof Pn&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const o=e.node(-1),r=et.get(o),i=e.start(-1),a=r.findCell(e.pos-i),c=r.findCell(n.pos-i),l=e.node(0);return a.left<=c.left?(a.left>0&&(e=l.resolve(i+r.map[a.top*r.width])),c.right<r.width&&(n=l.resolve(i+r.map[r.width*(c.top+1)-1]))):(c.left>0&&(n=l.resolve(i+r.map[c.top*r.width])),a.right<r.width&&(e=l.resolve(i+r.map[r.width*(a.top+1)-1]))),new Pn(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Pn(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,o=n){return new Pn(e.resolve(n),e.resolve(o))}getBookmark(){return new Cre(this.$anchorCell.pos,this.$headCell.pos)}};Ke.prototype.visible=!1;Ce.jsonID("cell",Ke);var Cre=class T3{constructor(e,n){this.anchor=e,this.head=n}map(e){return new T3(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),o=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&Xh(n,o)?new Ke(n,o):Ce.near(o,1)}};function zre(t){if(!(t.selection instanceof Ke))return null;const e=[];return t.selection.forEachCell((n,o)=>{e.push(yt.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Je.create(t.doc,e)}function Are({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,o=e.pos,r=t.depth;for(;r>=0&&!(t.after(r+1)<t.end(r));r--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,o--);return n==o&&/row|table/.test(t.node(r).type.spec.tableRole)}function Ere({$from:t,$to:e}){let n,o;for(let r=t.depth;r>0;r--){const i=t.node(r);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let r=e.depth;r>0;r--){const i=e.node(r);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){o=i;break}}return n!==o&&e.parentOffset===0}function Ure(t,e,n){const o=(e||t).selection,r=(e||t).doc;let i,a;if(o instanceof Ne&&(a=o.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=Ke.create(r,o.from);else if(a=="row"){const c=r.resolve(o.from+1);i=Ke.rowSelection(c,c)}else if(!n){const c=et.get(o.node),l=o.from+1,s=l+c.map[c.width*c.height-1];i=Ke.create(r,l+1,s)}}else o instanceof qe&&Are(o)?i=qe.create(r,o.from):o instanceof qe&&Ere(o)&&(i=qe.create(r,o.$from.start(),o.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var qre=new zr("fix-tables");function D3(t,e,n,o){const r=t.childCount,i=e.childCount;e:for(let a=0,c=0;a<i;a++){const l=e.child(a);for(let s=c,u=Math.min(r,a+3);s<u;s++)if(t.child(s)==l){c=s+1,n+=l.nodeSize;continue e}o(l,n),c<r&&t.child(c).sameMarkup(l)?D3(t.child(c),l,n+1,o):l.nodesBetween(0,l.content.size,o,n+1),n+=l.nodeSize}}function N3(t,e){let n;const o=(r,i)=>{r.type.spec.tableRole=="table"&&(n=Fre(t,r,i,n))};return e?e.doc!=t.doc&&D3(e.doc,t.doc,0,o):t.doc.descendants(o),n}function Fre(t,e,n,o){const r=et.get(e);if(!r.problems)return o;o||(o=t.tr);const i=[];for(let l=0;l<r.height;l++)i.push(0);for(let l=0;l<r.problems.length;l++){const s=r.problems[l];if(s.type=="collision"){const u=e.nodeAt(s.pos);if(!u)continue;const h=u.attrs;for(let f=0;f<h.rowspan;f++)i[s.row+f]+=s.n;o.setNodeMarkup(o.mapping.map(n+1+s.pos),null,Lo(h,h.colspan-s.n,s.n))}else if(s.type=="missing")i[s.row]+=s.n;else if(s.type=="overlong_rowspan"){const u=e.nodeAt(s.pos);if(!u)continue;o.setNodeMarkup(o.mapping.map(n+1+s.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-s.n})}else if(s.type=="colwidth mismatch"){const u=e.nodeAt(s.pos);if(!u)continue;o.setNodeMarkup(o.mapping.map(n+1+s.pos),null,{...u.attrs,colwidth:s.colwidth})}else if(s.type=="zero_sized"){const u=o.mapping.map(n);o.delete(u,u+e.nodeSize)}}let a,c;for(let l=0;l<i.length;l++)i[l]&&(a==null&&(a=l),c=l);for(let l=0,s=n+1;l<r.height;l++){const u=e.child(l),h=s+u.nodeSize,f=i[l];if(f>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const y=[];for(let g=0;g<f;g++){const m=gt(t.schema)[p].createAndFill();m&&y.push(m)}const _=(l==0||a==l-1)&&c==l?s+1:h-1;o.insert(o.mapping.map(_),y)}s=h}return o.setMeta(qre,{fixTables:!0})}function xn(t){const e=t.selection,n=Qc(t),o=n.node(-1),r=n.start(-1),i=et.get(o);return{...e instanceof Ke?i.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r):i.findCell(n.pos-r),tableStart:r,map:i,table:o}}function j3(t,{map:e,tableStart:n,table:o},r){let i=r>0?-1:0;Pre(e,o,r+i)&&(i=r==0||r==e.width?null:0);for(let a=0;a<e.height;a++){const c=a*e.width+r;if(r>0&&r<e.width&&e.map[c-1]==e.map[c]){const l=e.map[c],s=o.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,O3(s.attrs,r-e.colCount(l))),a+=s.attrs.rowspan-1}else{const l=i==null?gt(o.type.schema).cell:o.nodeAt(e.map[c+i]).type,s=e.positionAt(a,r,o);t.insert(t.mapping.map(n+s),l.createAndFill())}}return t}function $re(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(j3(t.tr,n,n.left))}return!0}function Rre(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(j3(t.tr,n,n.right))}return!0}function Bre(t,{map:e,table:n,tableStart:o},r){const i=t.mapping.maps.length;for(let a=0;a<e.height;){const c=a*e.width+r,l=e.map[c],s=n.nodeAt(l),u=s.attrs;if(r>0&&e.map[c-1]==l||r<e.width-1&&e.map[c+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(o+l),null,Lo(u,r-e.colCount(l)));else{const h=t.mapping.slice(i).map(o+l);t.delete(h,h+s.nodeSize)}a+=u.rowspan}}function Lre(t,e){if(!ln(t))return!1;if(e){const n=xn(t),o=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;Bre(o,n,r),r!=n.left;r--){const i=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=et.get(i)}e(o)}return!0}function Ire(t,e,n){var o;const r=gt(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((o=e.nodeAt(t.map[i+n*t.width]))==null?void 0:o.type)!=r)return!1;return!0}function P3(t,{map:e,tableStart:n,table:o},r){var i;let a=n;for(let s=0;s<r;s++)a+=o.child(s).nodeSize;const c=[];let l=r>0?-1:0;Ire(e,o,r+l)&&(l=r==0||r==e.height?null:0);for(let s=0,u=e.width*r;s<e.width;s++,u++)if(r>0&&r<e.height&&e.map[u]==e.map[u-e.width]){const h=e.map[u],f=o.nodeAt(h).attrs;t.setNodeMarkup(n+h,null,{...f,rowspan:f.rowspan+1}),s+=f.colspan-1}else{const h=l==null?gt(o.type.schema).cell:(i=o.nodeAt(e.map[u+l*e.width]))==null?void 0:i.type,f=h==null?void 0:h.createAndFill();f&&c.push(f)}return t.insert(a,gt(o.type.schema).row.create(null,c)),t}function Wre(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(P3(t.tr,n,n.top))}return!0}function Vre(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(P3(t.tr,n,n.bottom))}return!0}function Hre(t,{map:e,table:n,tableStart:o},r){let i=0;for(let s=0;s<r;s++)i+=n.child(s).nodeSize;const a=i+n.child(r).nodeSize,c=t.mapping.maps.length;t.delete(i+o,a+o);const l=new Set;for(let s=0,u=r*e.width;s<e.width;s++,u++){const h=e.map[u];if(!l.has(h)){if(l.add(h),r>0&&h==e.map[u-e.width]){const f=n.nodeAt(h).attrs;t.setNodeMarkup(t.mapping.slice(c).map(h+o),null,{...f,rowspan:f.rowspan-1}),s+=f.colspan-1}else if(r<e.height&&h==e.map[u+e.width]){const f=n.nodeAt(h),p=f.attrs,y=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),_=e.positionAt(r+1,s,n);t.insert(t.mapping.slice(c).map(o+_),y),s+=p.colspan-1}}}}function Xre(t,e){if(!ln(t))return!1;if(e){const n=xn(t),o=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;Hre(o,n,r),r!=n.top;r--){const i=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=et.get(n.table)}e(o)}return!0}function Rp(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Zre({width:t,height:e,map:n},o){let r=o.top*t+o.left,i=r,a=(o.bottom-1)*t+o.left,c=r+(o.right-o.left-1);for(let l=o.top;l<o.bottom;l++){if(o.left>0&&n[i]==n[i-1]||o.right<t&&n[c]==n[c+1])return!0;i+=t,c+=t}for(let l=o.left;l<o.right;l++){if(o.top>0&&n[r]==n[r-t]||o.bottom<e&&n[a]==n[a+t])return!0;r++,a++}return!1}function Gre(t,e){const n=t.selection;if(!(n instanceof Ke)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=xn(t),{map:r}=o;if(Zre(r,o))return!1;if(e){const i=t.tr,a={};let c=ye.empty,l,s;for(let u=o.top;u<o.bottom;u++)for(let h=o.left;h<o.right;h++){const f=r.map[u*r.width+h],p=o.table.nodeAt(f);if(!(a[f]||!p))if(a[f]=!0,l==null)l=f,s=p;else{Rp(p)||(c=c.append(p.content));const y=i.mapping.map(f+o.tableStart);i.delete(y,y+p.nodeSize)}}if(l==null||s==null)return!0;if(i.setNodeMarkup(l+o.tableStart,null,{...O3(s.attrs,s.attrs.colspan,o.right-o.left-s.attrs.colspan),rowspan:o.bottom-o.top}),c.size){const u=l+1+s.content.size,h=Rp(s)?l+1:u;i.replaceWith(h+o.tableStart,u+o.tableStart,c)}i.setSelection(new Ke(i.doc.resolve(l+o.tableStart))),e(i)}return!0}function Kre(t,e){const n=gt(t.schema);return Jre(({node:o})=>n[o.type.spec.tableRole])(t,e)}function Jre(t){return(e,n)=>{var o;const r=e.selection;let i,a;if(r instanceof Ke){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=Dre(r.$from),!i)return!1;a=(o=Er(r.$from))==null?void 0:o.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let c=i.attrs;const l=[],s=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const u=xn(e),h=e.tr;for(let p=0;p<u.right-u.left;p++)l.push(s?{...c,colwidth:s&&s[p]?[s[p]]:null}:c);let f;for(let p=u.top;p<u.bottom;p++){let y=u.map.positionAt(p,u.left,u.table);p==u.top&&(y+=i.nodeSize);for(let _=u.left,g=0;_<u.right;_++,g++)_==u.left&&p==u.top||h.insert(f=h.mapping.map(y+u.tableStart,1),t({node:i,row:p,col:_}).createAndFill(l[g]))}h.setNodeMarkup(a,t({node:i,row:u.top,col:u.left}),l[0]),r instanceof Ke&&h.setSelection(new Ke(h.doc.resolve(r.$anchorCell.pos),f?h.doc.resolve(f):void 0)),n(h)}return!0}}function Yre(t,e){return function(n,o){if(!ln(n))return!1;const r=Qc(n);if(r.nodeAfter.attrs[t]===e)return!1;if(o){const i=n.tr;n.selection instanceof Ke?n.selection.forEachCell((a,c)=>{a.attrs[t]!==e&&i.setNodeMarkup(c,null,{...a.attrs,[t]:e})}):i.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[t]:e}),o(i)}return!0}}function Qre(t){return function(e,n){if(!ln(e))return!1;if(n){const o=gt(e.schema),r=xn(e),i=e.tr,a=r.map.cellsInRect(t=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:t=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),c=a.map(l=>r.table.nodeAt(l));for(let l=0;l<a.length;l++)c[l].type==o.header_cell&&i.setNodeMarkup(r.tableStart+a[l],o.cell,c[l].attrs);if(i.steps.length==0)for(let l=0;l<a.length;l++)i.setNodeMarkup(r.tableStart+a[l],o.header_cell,c[l].attrs);n(i)}return!0}}function Bp(t,e,n){const o=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let r=0;r<o.length;r++){const i=e.table.nodeAt(o[r]);if(i&&i.type!==n.header_cell)return!1}return!0}function el(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Qre(t):function(n,o){if(!ln(n))return!1;if(o){const r=gt(n.schema),i=xn(n),a=n.tr,c=Bp("row",i,r),l=Bp("column",i,r),u=(t==="column"?c:t==="row"?l:!1)?1:0,h=t=="column"?{left:0,top:u,right:1,bottom:i.map.height}:t=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?l?r.cell:r.header_cell:t=="row"?c?r.cell:r.header_cell:r.cell;i.map.cellsInRect(h).forEach(p=>{const y=p+i.tableStart,_=a.doc.nodeAt(y);_&&a.setNodeMarkup(y,f,_.attrs)}),o(a)}return!0}}el("row",{useDeprecatedLogic:!0});el("column",{useDeprecatedLogic:!0});var eie=el("cell",{useDeprecatedLogic:!0});function tie(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let o=t.index(-1)-1,r=t.before();o>=0;o--){const i=t.node(-1).child(o),a=i.lastChild;if(a)return r-1-a.nodeSize;r-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let o=t.indexAfter(-1),r=t.after();o<n.childCount;o++){const i=n.child(o);if(i.childCount)return r+1;r+=i.nodeSize}}return null}function nie(t){return function(e,n){if(!ln(e))return!1;const o=tie(Qc(e),t);if(o==null)return!1;if(n){const r=e.doc.resolve(o);n(e.tr.setSelection(qe.between(r,jre(r))).scrollIntoView())}return!0}}function oie(t,e){const n=t.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function Yi(t,e){const n=t.selection;if(!(n instanceof Ke))return!1;if(e){const o=t.tr,r=gt(t.schema).cell.createAndFill().content;n.forEachCell((i,a)=>{i.content.eq(r)||o.replace(o.mapping.map(a+1),o.mapping.map(a+i.nodeSize-1),new Se(r,0,0))}),o.docChanged&&e(o)}return!0}function rie(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:o}=t;for(;e.childCount==1&&(n>0&&o>0||e.child(0).type.spec.tableRole=="table");)n--,o--,e=e.child(0).content;const r=e.child(0),i=r.type.spec.tableRole,a=r.type.schema,c=[];if(i=="row")for(let l=0;l<e.childCount;l++){let s=e.child(l).content;const u=l?0:Math.max(0,n-1),h=l<e.childCount-1?0:Math.max(0,o-1);(u||h)&&(s=Wu(gt(a).row,new Se(s,u,h)).content),c.push(s)}else if(i=="cell"||i=="header_cell")c.push(n||o?Wu(gt(a).row,new Se(e,n,o)).content:e);else return null;return iie(a,c)}function iie(t,e){const n=[];for(let r=0;r<e.length;r++){const i=e[r];for(let a=i.childCount-1;a>=0;a--){const{rowspan:c,colspan:l}=i.child(a).attrs;for(let s=r;s<r+c;s++)n[s]=(n[s]||0)+l}}let o=0;for(let r=0;r<n.length;r++)o=Math.max(o,n[r]);for(let r=0;r<n.length;r++)if(r>=e.length&&e.push(ye.empty),n[r]<o){const i=gt(t).cell.createAndFill(),a=[];for(let c=n[r];c<o;c++)a.push(i);e[r]=e[r].append(ye.from(a))}return{height:e.length,width:o,rows:e}}function Wu(t,e){const n=t.createAndFill();return new lh(n).replace(0,n.content.size,e).doc}function aie({width:t,height:e,rows:n},o,r){if(t!=o){const i=[],a=[];for(let c=0;c<n.length;c++){const l=n[c],s=[];for(let u=i[c]||0,h=0;u<o;h++){let f=l.child(h%l.childCount);u+f.attrs.colspan>o&&(f=f.type.createChecked(Lo(f.attrs,f.attrs.colspan,u+f.attrs.colspan-o),f.content)),s.push(f),u+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)i[c+p]=(i[c+p]||0)+f.attrs.colspan}a.push(ye.from(s))}n=a,t=o}if(e!=r){const i=[];for(let a=0,c=0;a<r;a++,c++){const l=[],s=n[c%e];for(let u=0;u<s.childCount;u++){let h=s.child(u);a+h.attrs.rowspan>r&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,r-h.attrs.rowspan)},h.content)),l.push(h)}i.push(ye.from(l))}n=i,e=r}return{width:t,height:e,rows:n}}function cie(t,e,n,o,r,i,a){const c=t.doc.type.schema,l=gt(c);let s,u;if(r>e.width)for(let h=0,f=0;h<e.height;h++){const p=n.child(h);f+=p.nodeSize;const y=[];let _;p.lastChild==null||p.lastChild.type==l.cell?_=s||(s=l.cell.createAndFill()):_=u||(u=l.header_cell.createAndFill());for(let g=e.width;g<r;g++)y.push(_);t.insert(t.mapping.slice(a).map(f-1+o),y)}if(i>e.height){const h=[];for(let y=0,_=(e.height-1)*e.width;y<Math.max(e.width,r);y++){const g=y>=e.width?!1:n.nodeAt(e.map[_+y]).type==l.header_cell;h.push(g?u||(u=l.header_cell.createAndFill()):s||(s=l.cell.createAndFill()))}const f=l.row.create(null,ye.from(h)),p=[];for(let y=e.height;y<i;y++)p.push(f);t.insert(t.mapping.slice(a).map(o+n.nodeSize-2),p)}return!!(s||u)}function Lp(t,e,n,o,r,i,a,c){if(a==0||a==e.height)return!1;let l=!1;for(let s=r;s<i;s++){const u=a*e.width+s,h=e.map[u];if(e.map[u-e.width]==h){l=!0;const f=n.nodeAt(h),{top:p,left:y}=e.findCell(h);t.setNodeMarkup(t.mapping.slice(c).map(h+o),null,{...f.attrs,rowspan:a-p}),t.insert(t.mapping.slice(c).map(e.positionAt(a,y,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-a})),s+=f.attrs.colspan-1}}return l}function Ip(t,e,n,o,r,i,a,c){if(a==0||a==e.width)return!1;let l=!1;for(let s=r;s<i;s++){const u=s*e.width+a,h=e.map[u];if(e.map[u-1]==h){l=!0;const f=n.nodeAt(h),p=e.colCount(h),y=t.mapping.slice(c).map(h+o);t.setNodeMarkup(y,null,Lo(f.attrs,a-p,f.attrs.colspan-(a-p))),t.insert(y+f.nodeSize,f.type.createAndFill(Lo(f.attrs,0,a-p))),s+=f.attrs.rowspan-1}}return l}function Wp(t,e,n,o,r){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let a=et.get(i);const{top:c,left:l}=o,s=l+r.width,u=c+r.height,h=t.tr;let f=0;function p(){if(i=n?h.doc.nodeAt(n-1):h.doc,!i)throw new Error("No table found");a=et.get(i),f=h.mapping.maps.length}cie(h,a,i,n,s,u,f)&&p(),Lp(h,a,i,n,l,s,c,f)&&p(),Lp(h,a,i,n,l,s,u,f)&&p(),Ip(h,a,i,n,c,u,l,f)&&p(),Ip(h,a,i,n,c,u,s,f)&&p();for(let y=c;y<u;y++){const _=a.positionAt(y,l,i),g=a.positionAt(y,s,i);h.replace(h.mapping.slice(f).map(_+n),h.mapping.slice(f).map(g+n),new Se(r.rows[y-c],0,0))}p(),h.setSelection(new Ke(h.doc.resolve(n+a.positionAt(c,l,i)),h.doc.resolve(n+a.positionAt(u-1,s-1,i)))),e(h)}var lie=vh({ArrowLeft:Qi("horiz",-1),ArrowRight:Qi("horiz",1),ArrowUp:Qi("vert",-1),ArrowDown:Qi("vert",1),"Shift-ArrowLeft":ea("horiz",-1),"Shift-ArrowRight":ea("horiz",1),"Shift-ArrowUp":ea("vert",-1),"Shift-ArrowDown":ea("vert",1),Backspace:Yi,"Mod-Backspace":Yi,Delete:Yi,"Mod-Delete":Yi});function Da(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Qi(t,e){return(n,o,r)=>{if(!r)return!1;const i=n.selection;if(i instanceof Ke)return Da(n,o,Ce.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const a=C3(r,t,e);if(a==null)return!1;if(t=="horiz")return Da(n,o,Ce.near(n.doc.resolve(i.head+e),e));{const c=n.doc.resolve(a),l=w3(c,t,e);let s;return l?s=Ce.near(l,1):e<0?s=Ce.near(n.doc.resolve(c.before(-1)),-1):s=Ce.near(n.doc.resolve(c.after(-1)),1),Da(n,o,s)}}}function ea(t,e){return(n,o,r)=>{if(!r)return!1;const i=n.selection;let a;if(i instanceof Ke)a=i;else{const l=C3(r,t,e);if(l==null)return!1;a=new Ke(n.doc.resolve(l))}const c=w3(a.$headCell,t,e);return c?Da(n,o,new Ke(a.$anchorCell,c)):!1}}function sie(t,e){const n=t.state.doc,o=Er(n.resolve(e));return o?(t.dispatch(t.state.tr.setSelection(new Ke(o))),!0):!1}function die(t,e,n){if(!ln(t.state))return!1;let o=rie(n);const r=t.state.selection;if(r instanceof Ke){o||(o={width:1,height:1,rows:[ye.from(Wu(gt(t.state.schema).cell,n))]});const i=r.$anchorCell.node(-1),a=r.$anchorCell.start(-1),c=et.get(i).rectBetween(r.$anchorCell.pos-a,r.$headCell.pos-a);return o=aie(o,c.right-c.left,c.bottom-c.top),Wp(t.state,t.dispatch,a,c,o),!0}else if(o){const i=Qc(t.state),a=i.start(-1);return Wp(t.state,t.dispatch,a,et.get(i.node(-1)).findCell(i.pos-a),o),!0}else return!1}function uie(t,e){var n;if(e.ctrlKey||e.metaKey)return;const o=Vp(t,e.target);let r;if(e.shiftKey&&t.state.selection instanceof Ke)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&o&&(r=Er(t.state.selection.$anchor))!=null&&((n=as(t,e))==null?void 0:n.pos)!=r.pos)i(r,e),e.preventDefault();else if(!o)return;function i(l,s){let u=as(t,s);const h=no.getState(t.state)==null;if(!u||!Xh(l,u))if(h)u=l;else return;const f=new Ke(l,u);if(h||!t.state.selection.eq(f)){const p=t.state.tr.setSelection(f);h&&p.setMeta(no,l.pos),t.dispatch(p)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",c),no.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(no,-1))}function c(l){const s=l,u=no.getState(t.state);let h;if(u!=null)h=t.state.doc.resolve(u);else if(Vp(t,s.target)!=o&&(h=as(t,e),!h))return a();h&&i(h,s)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",c)}function C3(t,e,n){if(!(t.state.selection instanceof qe))return null;const{$head:o}=t.state.selection;for(let r=o.depth-1;r>=0;r--){const i=o.node(r);if((n<0?o.index(r):o.indexAfter(r))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const c=o.before(r),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?c:null}}return null}function Vp(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function as(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Er(t.state.doc.resolve(n.pos)):null}var hie=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Vu(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,Vu(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function Vu(t,e,n,o,r,i){var a;let c=0,l=!0,s=e.firstChild;const u=t.firstChild;if(u){for(let h=0,f=0;h<u.childCount;h++){const{colspan:p,colwidth:y}=u.child(h).attrs;for(let _=0;_<p;_++,f++){const g=r==f?i:y&&y[_],m=g?g+"px":"";if(c+=g||o,g||(l=!1),s)s.style.width!=m&&(s.style.width=m),s=s.nextSibling;else{const b=document.createElement("col");b.style.width=m,e.appendChild(b)}}}for(;s;){const h=s.nextSibling;(a=s.parentNode)==null||a.removeChild(s),s=h}l?(n.style.width=c+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=c+"px")}}var Ut=new zr("tableColumnResizing");function fie({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:o=hie,lastColumnResizable:r=!0}={}){const i=new Vo({key:Ut,state:{init(a,c){var l,s;const u=(s=(l=i.spec)==null?void 0:l.props)==null?void 0:s.nodeViews,h=gt(c.schema).table.name;return o&&u&&(u[h]=(f,p)=>new o(f,n,p)),new pie(-1,!1)},apply(a,c){return c.apply(a)}},props:{attributes:a=>{const c=Ut.getState(a);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,c)=>{yie(a,c,t,r)},mouseleave:a=>{gie(a)},mousedown:(a,c)=>{_ie(a,c,e,n)}},decorations:a=>{const c=Ut.getState(a);if(c&&c.activeHandle>-1)return xie(a,c.activeHandle)},nodeViews:{}}});return i}var pie=class Na{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,o=e.getMeta(Ut);if(o&&o.setHandle!=null)return new Na(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new Na(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&e.docChanged){let r=e.mapping.map(n.activeHandle,-1);return Iu(e.doc.resolve(r))||(r=-1),new Na(r,n.dragging)}return n}};function yie(t,e,n,o){if(!t.editable)return;const r=Ut.getState(t.state);if(r&&!r.dragging){const i=bie(e.target);let a=-1;if(i){const{left:c,right:l}=i.getBoundingClientRect();e.clientX-c<=n?a=Hp(t,e,"left",n):l-e.clientX<=n&&(a=Hp(t,e,"right",n))}if(a!=r.activeHandle){if(!o&&a!==-1){const c=t.state.doc.resolve(a),l=c.node(-1),s=et.get(l),u=c.start(-1);if(s.colCount(c.pos-u)+c.nodeAfter.attrs.colspan-1==s.width-1)return}z3(t,a)}}}function gie(t){if(!t.editable)return;const e=Ut.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&z3(t,-1)}function _ie(t,e,n,o){var r;if(!t.editable)return!1;const i=(r=t.dom.ownerDocument.defaultView)!=null?r:window,a=Ut.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const c=t.state.doc.nodeAt(a.activeHandle),l=mie(t,a.activeHandle,c.attrs);t.dispatch(t.state.tr.setMeta(Ut,{setDragging:{startX:e.clientX,startWidth:l}}));function s(h){i.removeEventListener("mouseup",s),i.removeEventListener("mousemove",u);const f=Ut.getState(t.state);f!=null&&f.dragging&&(vie(t,f.activeHandle,Xp(f.dragging,h,n)),t.dispatch(t.state.tr.setMeta(Ut,{setDragging:null})))}function u(h){if(!h.which)return s(h);const f=Ut.getState(t.state);if(f&&f.dragging){const p=Xp(f.dragging,h,n);Zp(t,f.activeHandle,p,o)}}return Zp(t,a.activeHandle,l,o),i.addEventListener("mouseup",s),i.addEventListener("mousemove",u),e.preventDefault(),!0}function mie(t,e,{colspan:n,colwidth:o}){const r=o&&o[o.length-1];if(r)return r;const i=t.domAtPos(e);let c=i.node.childNodes[i.offset].offsetWidth,l=n;if(o)for(let s=0;s<n;s++)o[s]&&(c-=o[s],l--);return c/l}function bie(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Hp(t,e,n,o){const r=n=="right"?-o:o,i=t.posAtCoords({left:e.clientX+r,top:e.clientY});if(!i)return-1;const{pos:a}=i,c=Er(t.state.doc.resolve(a));if(!c)return-1;if(n=="right")return c.pos;const l=et.get(c.node(-1)),s=c.start(-1),u=l.map.indexOf(c.pos-s);return u%l.width==0?-1:s+l.map[u-1]}function Xp(t,e,n){const o=e.clientX-t.startX;return Math.max(n,t.startWidth+o)}function z3(t,e){t.dispatch(t.state.tr.setMeta(Ut,{setHandle:e}))}function vie(t,e,n){const o=t.state.doc.resolve(e),r=o.node(-1),i=et.get(r),a=o.start(-1),c=i.colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let s=0;s<i.height;s++){const u=s*i.width+c;if(s&&i.map[u]==i.map[u-i.width])continue;const h=i.map[u],f=r.nodeAt(h).attrs,p=f.colspan==1?0:c-i.colCount(h);if(f.colwidth&&f.colwidth[p]==n)continue;const y=f.colwidth?f.colwidth.slice():kie(f.colspan);y[p]=n,l.setNodeMarkup(a+h,null,{...f,colwidth:y})}l.docChanged&&t.dispatch(l)}function Zp(t,e,n,o){const r=t.state.doc.resolve(e),i=r.node(-1),a=r.start(-1),c=et.get(i).colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1;let l=t.domAtPos(r.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&Vu(i,l.firstChild,l,o,c,n)}function kie(t){return Array(t).fill(0)}function xie(t,e){var n;const o=[],r=t.doc.resolve(e),i=r.node(-1);if(!i)return Je.empty;const a=et.get(i),c=r.start(-1),l=a.colCount(r.pos-c)+r.nodeAfter.attrs.colspan-1;for(let s=0;s<a.height;s++){const u=l+s*a.width;if((l==a.width-1||a.map[u]!=a.map[u+1])&&(s==0||a.map[u]!=a.map[u-a.width])){const h=a.map[u],f=c+h+i.nodeAt(h).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=Ut.getState(t))!=null&&n.dragging&&o.push(yt.node(c+h,c+h+i.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),o.push(yt.widget(f,p))}}return Je.create(t.doc,o)}function Mie({allowTableNodeSelection:t=!1}={}){return new Vo({key:no,state:{init(){return null},apply(e,n){const o=e.getMeta(no);if(o!=null)return o==-1?null:o;if(n==null||!e.docChanged)return n;const{deleted:r,pos:i}=e.mapping.mapResult(n);return r?null:i}},props:{decorations:zre,handleDOMEvents:{mousedown:uie},createSelectionBetween(e){return no.getState(e.state)!=null?e.state.selection:null},handleTripleClick:sie,handleKeyDown:lie,handlePaste:die},appendTransaction(e,n,o){return Ure(o,N3(o,n),t)}})}var Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function A3(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var cs,Gp;function E3(){if(Gp)return cs;Gp=1;var t=Object.prototype.toString;return cs=function(n){var o=t.call(n),r=o==="[object Arguments]";return r||(r=o!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&t.call(n.callee)==="[object Function]"),r},cs}var ls,Kp;function Sie(){if(Kp)return ls;Kp=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=E3(),r=Object.prototype.propertyIsEnumerable,i=!r.call({toString:null},"toString"),a=r.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var p=f.constructor;return p&&p.prototype===f},s={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!s["$"+f]&&e.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),h=function(f){if(typeof window>"u"||!u)return l(f);try{return l(f)}catch{return!1}};t=function(p){var y=p!==null&&typeof p=="object",_=n.call(p)==="[object Function]",g=o(p),m=y&&n.call(p)==="[object String]",b=[];if(!y&&!_&&!g)throw new TypeError("Object.keys called on a non-object");var v=a&&_;if(m&&p.length>0&&!e.call(p,0))for(var w=0;w<p.length;++w)b.push(String(w));if(g&&p.length>0)for(var M=0;M<p.length;++M)b.push(String(M));else for(var O in p)!(v&&O==="prototype")&&e.call(p,O)&&b.push(String(O));if(i)for(var D=h(p),j=0;j<c.length;++j)!(D&&c[j]==="constructor")&&e.call(p,c[j])&&b.push(c[j]);return b}}return ls=t,ls}var ss,Jp;function Gh(){if(Jp)return ss;Jp=1;var t=Array.prototype.slice,e=E3(),n=Object.keys,o=n?function(a){return n(a)}:Sie(),r=Object.keys;return o.shim=function(){if(Object.keys){var a=function(){var c=Object.keys(arguments);return c&&c.length===arguments.length}(1,2);a||(Object.keys=function(l){return e(l)?r(t.call(l)):r(l)})}else Object.keys=o;return Object.keys||o},ss=o,ss}var ds,Yp;function tl(){if(Yp)return ds;Yp=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ds=t,ds}var us,Qp;function Kh(){return Qp||(Qp=1,us=SyntaxError),us}var hs,e0;function Jt(){return e0||(e0=1,hs=TypeError),hs}var fs,t0;function wie(){return t0||(t0=1,fs=Object.getOwnPropertyDescriptor),fs}var ps,n0;function Zo(){if(n0)return ps;n0=1;var t=wie();if(t)try{t([],"length")}catch{t=null}return ps=t,ps}var ys,o0;function Jh(){if(o0)return ys;o0=1;var t=tl(),e=Kh(),n=Jt(),o=Zo();return ys=function(i,a,c){if(!i||typeof i!="object"&&typeof i!="function")throw new n("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,f=!!o&&o(i,a);if(t)t(i,a,{configurable:u===null&&f?f.configurable:!u,enumerable:l===null&&f?f.enumerable:!l,value:c,writable:s===null&&f?f.writable:!s});else if(h||!l&&!s&&!u)i[a]=c;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ys}var gs,r0;function Yh(){if(r0)return gs;r0=1;var t=tl(),e=function(){return!!t};return e.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},gs=e,gs}var _s,i0;function Go(){if(i0)return _s;i0=1;var t=Gh(),e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,r=Jh(),i=function(s){return typeof s=="function"&&n.call(s)==="[object Function]"},a=Yh()(),c=function(s,u,h,f){if(u in s){if(f===!0){if(s[u]===h)return}else if(!i(f)||!f())return}a?r(s,u,h,!0):r(s,u,h)},l=function(s,u){var h=arguments.length>2?arguments[2]:{},f=t(u);e&&(f=o.call(f,Object.getOwnPropertySymbols(u)));for(var p=0;p<f.length;p+=1)c(s,f[p],u[f[p]],h[f[p]])};return l.supportsDescriptors=!!a,_s=l,_s}var ms={exports:{}},bs,a0;function Qh(){return a0||(a0=1,bs=Object),bs}var vs,c0;function U3(){return c0||(c0=1,vs=Error),vs}var ks,l0;function Oie(){return l0||(l0=1,ks=EvalError),ks}var xs,s0;function Tie(){return s0||(s0=1,xs=RangeError),xs}var Ms,d0;function Die(){return d0||(d0=1,Ms=ReferenceError),Ms}var Ss,u0;function Nie(){return u0||(u0=1,Ss=URIError),Ss}var ws,h0;function jie(){return h0||(h0=1,ws=Math.abs),ws}var Os,f0;function Pie(){return f0||(f0=1,Os=Math.floor),Os}var Ts,p0;function Cie(){return p0||(p0=1,Ts=Math.max),Ts}var Ds,y0;function zie(){return y0||(y0=1,Ds=Math.min),Ds}var Ns,g0;function Aie(){return g0||(g0=1,Ns=Math.pow),Ns}var js,_0;function Eie(){return _0||(_0=1,js=Math.round),js}var Ps,m0;function Uie(){return m0||(m0=1,Ps=Number.isNaN||function(e){return e!==e}),Ps}var Cs,b0;function qie(){if(b0)return Cs;b0=1;var t=Uie();return Cs=function(n){return t(n)||n===0?n:n<0?-1:1},Cs}var zs,v0;function nl(){return v0||(v0=1,zs=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var r=42;e[n]=r;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,n);if(c.value!==r||c.enumerable!==!0)return!1}return!0}),zs}var As,k0;function e2(){if(k0)return As;k0=1;var t=typeof Symbol<"u"&&Symbol,e=nl();return As=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},As}var Es,x0;function q3(){return x0||(x0=1,Es=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Es}var Us,M0;function F3(){if(M0)return Us;M0=1;var t=Qh();return Us=t.getPrototypeOf||null,Us}var qs,S0;function Fie(){if(S0)return qs;S0=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,o="[object Function]",r=function(l,s){for(var u=[],h=0;h<l.length;h+=1)u[h]=l[h];for(var f=0;f<s.length;f+=1)u[f+l.length]=s[f];return u},i=function(l,s){for(var u=[],h=s,f=0;h<l.length;h+=1,f+=1)u[f]=l[h];return u},a=function(c,l){for(var s="",u=0;u<c.length;u+=1)s+=c[u],u+1<c.length&&(s+=l);return s};return qs=function(l){var s=this;if(typeof s!="function"||e.apply(s)!==o)throw new TypeError(t+s);for(var u=i(arguments,1),h,f=function(){if(this instanceof h){var m=s.apply(this,r(u,arguments));return Object(m)===m?m:this}return s.apply(l,r(u,arguments))},p=n(0,s.length-u.length),y=[],_=0;_<p;_++)y[_]="$"+_;if(h=Function("binder","return function ("+a(y,",")+"){ return binder.apply(this,arguments); }")(f),s.prototype){var g=function(){};g.prototype=s.prototype,h.prototype=new g,g.prototype=null}return h},qs}var Fs,w0;function $i(){if(w0)return Fs;w0=1;var t=Fie();return Fs=Function.prototype.bind||t,Fs}var $s,O0;function t2(){return O0||(O0=1,$s=Function.prototype.call),$s}var Rs,T0;function n2(){return T0||(T0=1,Rs=Function.prototype.apply),Rs}var Bs,D0;function $ie(){return D0||(D0=1,Bs=typeof Reflect<"u"&&Reflect&&Reflect.apply),Bs}var Ls,N0;function $3(){if(N0)return Ls;N0=1;var t=$i(),e=n2(),n=t2(),o=$ie();return Ls=o||t.call(n,e),Ls}var Is,j0;function o2(){if(j0)return Is;j0=1;var t=$i(),e=Jt(),n=t2(),o=$3();return Is=function(i){if(i.length<1||typeof i[0]!="function")throw new e("a function is required");return o(t,n,i)},Is}var Ws,P0;function Rie(){if(P0)return Ws;P0=1;var t=o2(),e=Zo(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var o=!!n&&e&&e(Object.prototype,"__proto__"),r=Object,i=r.getPrototypeOf;return Ws=o&&typeof o.get=="function"?t([o.get]):typeof i=="function"?function(c){return i(c==null?c:r(c))}:!1,Ws}var Vs,C0;function R3(){if(C0)return Vs;C0=1;var t=q3(),e=F3(),n=Rie();return Vs=t?function(r){return t(r)}:e?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return e(r)}:n?function(r){return n(r)}:null,Vs}var Hs,z0;function r2(){if(z0)return Hs;z0=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=$i();return Hs=n.call(t,e),Hs}var Xs,A0;function Ln(){if(A0)return Xs;A0=1;var t,e=Qh(),n=U3(),o=Oie(),r=Tie(),i=Die(),a=Kh(),c=Jt(),l=Nie(),s=jie(),u=Pie(),h=Cie(),f=zie(),p=Aie(),y=Eie(),_=qie(),g=Function,m=function(_e){try{return g('"use strict"; return ('+_e+").constructor;")()}catch{}},b=Zo(),v=tl(),w=function(){throw new c},M=b?function(){try{return arguments.callee,w}catch{try{return b(arguments,"callee").get}catch{return w}}}():w,O=e2()(),D=R3(),j=F3(),T=q3(),A=n2(),R=t2(),S={},P=typeof Uint8Array>"u"||!D?t:D(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":O&&D?D([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&D?D(D([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O||!D?t:D(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O||!D?t:D(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&D?D(""[Symbol.iterator]()):t,"%Symbol%":O?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":M,"%TypedArray%":P,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":A,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":j,"%Math.abs%":s,"%Math.floor%":u,"%Math.max%":h,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":y,"%Math.sign%":_,"%Reflect.getPrototypeOf%":T};if(D)try{null.error}catch(_e){var I=D(D(_e));k["%Error.prototype%"]=I}var C=function _e(fe){var ge;if(fe==="%AsyncFunction%")ge=m("async function () {}");else if(fe==="%GeneratorFunction%")ge=m("function* () {}");else if(fe==="%AsyncGeneratorFunction%")ge=m("async function* () {}");else if(fe==="%AsyncGenerator%"){var me=_e("%AsyncGeneratorFunction%");me&&(ge=me.prototype)}else if(fe==="%AsyncIteratorPrototype%"){var be=_e("%AsyncGenerator%");be&&D&&(ge=D(be.prototype))}return k[fe]=ge,ge},q={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},K=$i(),B=r2(),ne=K.call(R,Array.prototype.concat),$=K.call(A,Array.prototype.splice),U=K.call(R,String.prototype.replace),ae=K.call(R,String.prototype.slice),Z=K.call(R,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,pe=function(fe){var ge=ae(fe,0,1),me=ae(fe,-1);if(ge==="%"&&me!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(me==="%"&&ge!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return U(fe,J,function(x,H,W,F){be[be.length]=W?U(F,de,"$1"):H||x}),be},he=function(fe,ge){var me=fe,be;if(B(q,me)&&(be=q[me],me="%"+be[0]+"%"),B(k,me)){var x=k[me];if(x===S&&(x=C(me)),typeof x>"u"&&!ge)throw new c("intrinsic "+fe+" exists, but is not available. Please file an issue!");return{alias:be,name:me,value:x}}throw new a("intrinsic "+fe+" does not exist!")};return Xs=function(fe,ge){if(typeof fe!="string"||fe.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ge!="boolean")throw new c('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,fe)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var me=pe(fe),be=me.length>0?me[0]:"",x=he("%"+be+"%",ge),H=x.name,W=x.value,F=!1,E=x.alias;E&&(be=E[0],$(me,ne([0,1],E)));for(var V=1,ie=!0;V<me.length;V+=1){var oe=me[V],Y=ae(oe,0,1),L=ae(oe,-1);if((Y==='"'||Y==="'"||Y==="`"||L==='"'||L==="'"||L==="`")&&Y!==L)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!ie)&&(F=!0),be+="."+oe,H="%"+be+"%",B(k,H))W=k[H];else if(W!=null){if(!(oe in W)){if(!ge)throw new c("base intrinsic for "+fe+" exists, but the property is not available.");return}if(b&&V+1>=me.length){var G=b(W,oe);ie=!!G,ie&&"get"in G&&!("originalValue"in G.get)?W=G.get:W=W[oe]}else ie=B(W,oe),W=W[oe];ie&&!F&&(k[H]=W)}}return W},Xs}var Zs,E0;function Bie(){if(E0)return Zs;E0=1;var t=Ln(),e=Jh(),n=Yh()(),o=Zo(),r=Jt(),i=t("%Math.floor%");return Zs=function(c,l){if(typeof c!="function")throw new r("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||i(l)!==l)throw new r("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],u=!0,h=!0;if("length"in c&&o){var f=o(c,"length");f&&!f.configurable&&(u=!1),f&&!f.writable&&(h=!1)}return(u||h||!s)&&(n?e(c,"length",l,!0,!0):e(c,"length",l)),c},Zs}var Gs,U0;function Lie(){if(U0)return Gs;U0=1;var t=$i(),e=n2(),n=$3();return Gs=function(){return n(t,e,arguments)},Gs}var q0;function Ur(){return q0||(q0=1,function(t){var e=Bie(),n=tl(),o=o2(),r=Lie();t.exports=function(a){var c=o(arguments),l=a.length-(arguments.length-1);return e(c,1+(l>0?l:0),!0)},n?n(t.exports,"apply",{value:r}):t.exports.apply=r}(ms)),ms.exports}var Ks,F0;function bt(){if(F0)return Ks;F0=1;var t=Ln(),e=o2(),n=e([t("%String.prototype.indexOf%")]);return Ks=function(r,i){var a=t(r,!!i);return typeof a=="function"&&n(r,".prototype.")>-1?e([a]):a},Ks}var Js,$0;function B3(){if($0)return Js;$0=1;var t=Gh(),e=nl()(),n=bt(),o=Qh(),r=n("Array.prototype.push"),i=n("Object.prototype.propertyIsEnumerable"),a=e?o.getOwnPropertySymbols:null;return Js=function(l,s){if(l==null)throw new TypeError("target must be an object");var u=o(l);if(arguments.length===1)return u;for(var h=1;h<arguments.length;++h){var f=o(arguments[h]),p=t(f),y=e&&(o.getOwnPropertySymbols||a);if(y)for(var _=y(f),g=0;g<_.length;++g){var m=_[g];i(f,m)&&r(p,m)}for(var b=0;b<p.length;++b){var v=p[b];if(i(f,v)){var w=f[v];u[v]=w}}}return u},Js}var Ys,R0;function L3(){if(R0)return Ys;R0=1;var t=B3(),e=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",r=o.split(""),i={},a=0;a<r.length;++a)i[r[a]]=r[a];var c=Object.assign({},i),l="";for(var s in c)l+=s;return o!==l},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var o=Object.preventExtensions({1:2});try{Object.assign(o,"xy")}catch{return o[1]==="y"}return!1};return Ys=function(){return!Object.assign||e()||n()?t:Object.assign},Ys}var Qs,B0;function Iie(){if(B0)return Qs;B0=1;var t=Go(),e=L3();return Qs=function(){var o=e();return t(Object,{assign:o},{assign:function(){return Object.assign!==o}}),o},Qs}var ed,L0;function Wie(){if(L0)return ed;L0=1;var t=Go(),e=Ur(),n=B3(),o=L3(),r=Iie(),i=e.apply(o()),a=function(l,s){return i(Object,arguments)};return t(a,{getPolyfill:o,implementation:n,shim:r}),ed=a,ed}var td,I0;function I3(){if(I0)return td;I0=1;var t=Ln(),e=Ur(),n=e(t("String.prototype.indexOf"));return td=function(r,i){var a=t(r,!!i);return typeof a=="function"&&n(r,".prototype.")>-1?e(a):a},td}var nd,W0;function Vie(){if(W0)return nd;W0=1;var t=function(){return typeof(function(){}).name=="string"},e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}t.functionsHaveConfigurableNames=function(){if(!t()||!e)return!1;var r=e(function(){},"name");return!!r&&!!r.configurable};var n=Function.prototype.bind;return t.boundFunctionsHaveNames=function(){return t()&&typeof n=="function"&&(function(){}).bind().name!==""},nd=t,nd}var od,V0;function Hie(){if(V0)return od;V0=1;var t=Jh(),e=Yh()(),n=Vie().functionsHaveConfigurableNames(),o=Jt();return od=function(i,a){if(typeof i!="function")throw new o("`fn` is not a function");var c=arguments.length>2&&!!arguments[2];return(!c||n)&&(e?t(i,"name",a,!0,!0):t(i,"name",a)),i},od}var rd,H0;function W3(){if(H0)return rd;H0=1;var t=Hie(),e=Jt(),n=Object;return rd=t(function(){if(this==null||this!==n(this))throw new e("RegExp.prototype.flags getter called on non-object");var r="";return this.hasIndices&&(r+="d"),this.global&&(r+="g"),this.ignoreCase&&(r+="i"),this.multiline&&(r+="m"),this.dotAll&&(r+="s"),this.unicode&&(r+="u"),this.unicodeSets&&(r+="v"),this.sticky&&(r+="y"),r},"get flags",!0),rd}var id,X0;function V3(){if(X0)return id;X0=1;var t=W3(),e=Go().supportsDescriptors,n=Object.getOwnPropertyDescriptor;return id=function(){if(e&&/a/mig.flags==="gim"){var r=n(RegExp.prototype,"flags");if(r&&typeof r.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var i="",a={};if(Object.defineProperty(a,"hasIndices",{get:function(){i+="d"}}),Object.defineProperty(a,"sticky",{get:function(){i+="y"}}),r.get.call(a),i==="dy")return r.get}}return t},id}var ad,Z0;function Xie(){if(Z0)return ad;Z0=1;var t=Go().supportsDescriptors,e=V3(),n=Zo(),o=Object.defineProperty,r=U3(),i=R3(),a=/a/;return ad=function(){if(!t||!i)throw new r("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=e(),s=i(a),u=n(s,"flags");return(!u||u.get!==l)&&o(s,"flags",{configurable:!0,enumerable:!1,get:l}),l},ad}var cd,G0;function Zie(){if(G0)return cd;G0=1;var t=Go(),e=Ur(),n=W3(),o=V3(),r=Xie(),i=e(o());return t(i,{getPolyfill:o,implementation:n,shim:r}),cd=i,cd}var Wr={exports:{}},ld,K0;function Ko(){if(K0)return ld;K0=1;var t=nl();return ld=function(){return t()&&!!Symbol.toStringTag},ld}var sd,J0;function H3(){if(J0)return sd;J0=1;var t=Ko()(),e=bt(),n=e("Object.prototype.toString"),o=function(c){return t&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:n(c)==="[object Arguments]"},r=function(c){return o(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&n(c)!=="[object Array]"&&"callee"in c&&n(c.callee)==="[object Function]"},i=function(){return o(arguments)}();return o.isLegacyArguments=r,sd=i?o:r,sd}const Gie={},Kie=Object.freeze(Object.defineProperty({__proto__:null,default:Gie},Symbol.toStringTag,{value:"Module"})),Jie=A3(Kie);var dd,Y0;function ol(){if(Y0)return dd;Y0=1;var t=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=t&&e&&typeof e.get=="function"?e.get:null,o=t&&Map.prototype.forEach,r=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=r&&i&&typeof i.get=="function"?i.get:null,c=r&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,s=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,h=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,_=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,M=String.prototype.toLowerCase,O=RegExp.prototype.test,D=Array.prototype.concat,j=Array.prototype.join,T=Array.prototype.slice,A=Math.floor,R=typeof BigInt=="function"?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,k=typeof Symbol=="function"&&typeof Symbol.iterator=="object",I=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||!0)?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,q=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ee){return ee.__proto__}:null);function K(ee,re){if(ee===1/0||ee===-1/0||ee!==ee||ee&&ee>-1e3&&ee<1e3||O.call(/e/,re))return re;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ee=="number"){var Fe=ee<0?-A(-ee):A(ee);if(Fe!==ee){var Le=String(Fe),N=b.call(re,Le.length+1);return v.call(Le,ze,"$&_")+"."+v.call(v.call(N,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(re,ze,"$&_")}var B=Jie,ne=B.custom,$=x(ne)?ne:null,U={__proto__:null,double:'"',single:"'"},ae={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};dd=function ee(re,ze,Fe,Le){var N=ze||{};if(F(N,"quoteStyle")&&!F(U,N.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(F(N,"maxStringLength")&&(typeof N.maxStringLength=="number"?N.maxStringLength<0&&N.maxStringLength!==1/0:N.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var z=F(N,"customInspect")?N.customInspect:!0;if(typeof z!="boolean"&&z!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(F(N,"indent")&&N.indent!==null&&N.indent!==" "&&!(parseInt(N.indent,10)===N.indent&&N.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(F(N,"numericSeparator")&&typeof N.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var X=N.numericSeparator;if(typeof re>"u")return"undefined";if(re===null)return"null";if(typeof re=="boolean")return re?"true":"false";if(typeof re=="string")return ke(re,N);if(typeof re=="number"){if(re===0)return 1/0/re>0?"0":"-0";var le=String(re);return X?K(re,le):le}if(typeof re=="bigint"){var Me=String(re)+"n";return X?K(re,Me):Me}var je=typeof N.depth>"u"?5:N.depth;if(typeof Fe>"u"&&(Fe=0),Fe>=je&&je>0&&typeof re=="object")return pe(re)?"[Array]":"[Object]";var Re=ve(N,Fe);if(typeof Le>"u")Le=[];else if(ie(Le,re)>=0)return"[Circular]";function Ve(or,Wi,nG){if(Wi&&(Le=T.call(Le),Le.push(Wi)),nG){var Q2={depth:N.depth};return F(N,"quoteStyle")&&(Q2.quoteStyle=N.quoteStyle),ee(or,Q2,Fe+1,Le)}return ee(or,N,Fe+1,Le)}if(typeof re=="function"&&!_e(re)){var $t=V(re),Yt=Pe(re,Ve);return"[Function"+($t?": "+$t:" (anonymous)")+"]"+(Yt.length>0?" { "+j.call(Yt,", ")+" }":"")}if(x(re)){var Rt=k?v.call(String(re),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(re);return typeof re=="object"&&!k?De(Rt):Rt}if(ce(re)){for(var zt="<"+M.call(String(re.nodeName)),Qt=re.attributes||[],Bt=0;Bt<Qt.length;Bt++)zt+=" "+Qt[Bt].name+"="+Z(J(Qt[Bt].value),"double",N);return zt+=">",re.childNodes&&re.childNodes.length&&(zt+="..."),zt+="</"+M.call(String(re.nodeName))+">",zt}if(pe(re)){if(re.length===0)return"[]";var Ot=Pe(re,Ve);return Re&&!ue(Ot)?"["+Oe(Ot,Re)+"]":"[ "+j.call(Ot,", ")+" ]"}if(fe(re)){var en=Pe(re,Ve);return!("cause"in Error.prototype)&&"cause"in re&&!C.call(re,"cause")?"{ ["+String(re)+"] "+j.call(D.call("[cause]: "+Ve(re.cause),en),", ")+" }":en.length===0?"["+String(re)+"]":"{ ["+String(re)+"] "+j.call(en,", ")+" }"}if(typeof re=="object"&&z){if($&&typeof re[$]=="function"&&B)return B(re,{depth:je-Fe});if(z!=="symbol"&&typeof re.inspect=="function")return re.inspect()}if(oe(re)){var In=[];return o&&o.call(re,function(or,Wi){In.push(Ve(Wi,re,!0)+" => "+Ve(or,re))}),te("Map",n.call(re),In,Re)}if(G(re)){var ot=[];return c&&c.call(re,function(or){ot.push(Ve(or,re))}),te("Set",a.call(re),ot,Re)}if(Y(re))return Te("WeakMap");if(Q(re))return Te("WeakSet");if(L(re))return Te("WeakRef");if(me(re))return De(Ve(Number(re)));if(H(re))return De(Ve(R.call(re)));if(be(re))return De(y.call(re));if(ge(re))return De(Ve(String(re)));if(typeof window<"u"&&re===window)return"{ [object Window] }";if(typeof globalThis<"u"&&re===globalThis||typeof Zt<"u"&&re===Zt)return"{ [object globalThis] }";if(!he(re)&&!_e(re)){var tr=Pe(re,Ve),Mn=q?q(re)===Object.prototype:re instanceof Object||re.constructor===Object,nr=re instanceof Object?"":"null prototype",Y2=!Mn&&I&&Object(re)===re&&I in re?b.call(E(re),8,-1):nr?"Object":"",tG=Mn||typeof re.constructor!="function"?"":re.constructor.name?re.constructor.name+" ":"",Nl=tG+(Y2||nr?"["+j.call(D.call([],Y2||[],nr||[]),": ")+"] ":"");return tr.length===0?Nl+"{}":Re?Nl+"{"+Oe(tr,Re)+"}":Nl+"{ "+j.call(tr,", ")+" }"}return String(re)};function Z(ee,re,ze){var Fe=ze.quoteStyle||re,Le=U[Fe];return Le+ee+Le}function J(ee){return v.call(String(ee),/"/g,"&quot;")}function de(ee){return!I||!(typeof ee=="object"&&(I in ee||typeof ee[I]<"u"))}function pe(ee){return E(ee)==="[object Array]"&&de(ee)}function he(ee){return E(ee)==="[object Date]"&&de(ee)}function _e(ee){return E(ee)==="[object RegExp]"&&de(ee)}function fe(ee){return E(ee)==="[object Error]"&&de(ee)}function ge(ee){return E(ee)==="[object String]"&&de(ee)}function me(ee){return E(ee)==="[object Number]"&&de(ee)}function be(ee){return E(ee)==="[object Boolean]"&&de(ee)}function x(ee){if(k)return ee&&typeof ee=="object"&&ee instanceof Symbol;if(typeof ee=="symbol")return!0;if(!ee||typeof ee!="object"||!P)return!1;try{return P.call(ee),!0}catch{}return!1}function H(ee){if(!ee||typeof ee!="object"||!R)return!1;try{return R.call(ee),!0}catch{}return!1}var W=Object.prototype.hasOwnProperty||function(ee){return ee in this};function F(ee,re){return W.call(ee,re)}function E(ee){return _.call(ee)}function V(ee){if(ee.name)return ee.name;var re=m.call(g.call(ee),/^function\s*([\w$]+)/);return re?re[1]:null}function ie(ee,re){if(ee.indexOf)return ee.indexOf(re);for(var ze=0,Fe=ee.length;ze<Fe;ze++)if(ee[ze]===re)return ze;return-1}function oe(ee){if(!n||!ee||typeof ee!="object")return!1;try{n.call(ee);try{a.call(ee)}catch{return!0}return ee instanceof Map}catch{}return!1}function Y(ee){if(!s||!ee||typeof ee!="object")return!1;try{s.call(ee,s);try{h.call(ee,h)}catch{return!0}return ee instanceof WeakMap}catch{}return!1}function L(ee){if(!p||!ee||typeof ee!="object")return!1;try{return p.call(ee),!0}catch{}return!1}function G(ee){if(!a||!ee||typeof ee!="object")return!1;try{a.call(ee);try{n.call(ee)}catch{return!0}return ee instanceof Set}catch{}return!1}function Q(ee){if(!h||!ee||typeof ee!="object")return!1;try{h.call(ee,h);try{s.call(ee,s)}catch{return!0}return ee instanceof WeakSet}catch{}return!1}function ce(ee){return!ee||typeof ee!="object"?!1:typeof HTMLElement<"u"&&ee instanceof HTMLElement?!0:typeof ee.nodeName=="string"&&typeof ee.getAttribute=="function"}function ke(ee,re){if(ee.length>re.maxStringLength){var ze=ee.length-re.maxStringLength,Fe="... "+ze+" more character"+(ze>1?"s":"");return ke(b.call(ee,0,re.maxStringLength),re)+Fe}var Le=ae[re.quoteStyle||"single"];Le.lastIndex=0;var N=v.call(v.call(ee,Le,"\\$1"),/[\x00-\x1f]/g,we);return Z(N,"single",re)}function we(ee){var re=ee.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[re];return ze?"\\"+ze:"\\x"+(re<16?"0":"")+w.call(re.toString(16))}function De(ee){return"Object("+ee+")"}function Te(ee){return ee+" { ? }"}function te(ee,re,ze,Fe){var Le=Fe?Oe(ze,Fe):j.call(ze,", ");return ee+" ("+re+") {"+Le+"}"}function ue(ee){for(var re=0;re<ee.length;re++)if(ie(ee[re],`
34
+ 3. "-" cannot repeat`);Ge.customSchemes.push([t,e])}function rre(){Ge.scanner=Goe(Ge.customSchemes);for(let t=0;t<Ge.tokenQueue.length;t++)Ge.tokenQueue[t][1]({scanner:Ge.scanner});Ge.parser=Yoe(Ge.scanner.tokens);for(let t=0;t<Ge.pluginQueue.length;t++)Ge.pluginQueue[t][1]({scanner:Ge.scanner,parser:Ge.parser});return Ge.initialized=!0,Ge}function Vh(t){return Ge.initialized||rre(),Qoe(Ge.parser.start,t,b3(Ge.scanner.start,t))}Vh.scan=b3;function ire(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const o=new Wh(n),r=Vh(t),i=[];for(let a=0;a<r.length;a++){const c=r[a];c.isLink&&(!e||c.t===e)&&o.check(c)&&i.push(c.toFormattedObject(o))}return i}var Uc=200,lt=function(){};lt.prototype.append=function(e){return e.length?(e=lt.from(e),!this.length&&e||e.length<Uc&&this.leafAppend(e)||this.length<Uc&&e.leafPrepend(this)||this.appendInner(e)):this};lt.prototype.prepend=function(e){return e.length?lt.from(e).append(this):this};lt.prototype.appendInner=function(e){return new are(this,e)};lt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?lt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};lt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};lt.prototype.forEach=function(e,n,o){n===void 0&&(n=0),o===void 0&&(o=this.length),n<=o?this.forEachInner(e,n,o,0):this.forEachInvertedInner(e,n,o,0)};lt.prototype.map=function(e,n,o){n===void 0&&(n=0),o===void 0&&(o=this.length);var r=[];return this.forEach(function(i,a){return r.push(e(i,a))},n,o),r};lt.from=function(e){return e instanceof lt?e:e&&e.length?new k3(e):lt.empty};var k3=function(t){function e(o){t.call(this),this.values=o}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,a,c){for(var l=i;l<a;l++)if(r(this.values[l],c+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,a,c){for(var l=i-1;l>=a;l--)if(r(this.values[l],c+l)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Uc)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Uc)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(lt);lt.empty=new k3([]);var are=function(t){function e(n,o){t.call(this),this.left=n,this.right=o,this.length=n.length+o.length,this.depth=Math.max(n.depth,o.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(o){return o<this.left.length?this.left.get(o):this.right.get(o-this.left.length)},e.prototype.forEachInner=function(o,r,i,a){var c=this.left.length;if(r<c&&this.left.forEachInner(o,r,Math.min(i,c),a)===!1||i>c&&this.right.forEachInner(o,Math.max(r-c,0),Math.min(this.length,i)-c,a+c)===!1)return!1},e.prototype.forEachInvertedInner=function(o,r,i,a){var c=this.left.length;if(r>c&&this.right.forEachInvertedInner(o,r-c,Math.max(i,c)-c,a+c)===!1||i<c&&this.left.forEachInvertedInner(o,Math.min(r,c),i,a)===!1)return!1},e.prototype.sliceInner=function(o,r){if(o==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(o,r):o>=i?this.right.slice(o-i,r-i):this.left.slice(o,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(o){var r=this.right.leafAppend(o);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(o){var r=this.left.leafPrepend(o);if(r)return new e(r,this.right)},e.prototype.appendInner=function(o){return this.left.depth>=Math.max(this.right.depth,o.depth)+1?new e(this.left,new e(this.right,o)):new e(this,o)},e}(lt);const cre=500;class on{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}let r,i;n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let a=e.tr,c,l,s=[],u=[];return this.items.forEach((h,f)=>{if(!h.step){r||(r=this.remapping(o,f+1),i=r.maps.length),i--,u.push(h);return}if(r){u.push(new hn(h.map));let p=h.step.map(r.slice(i)),y;p&&a.maybeStep(p).doc&&(y=a.mapping.maps[a.mapping.maps.length-1],s.push(new hn(y,void 0,void 0,s.length+u.length))),i--,y&&r.appendMap(y,i)}else a.maybeStep(h.step);if(h.selection)return c=r?h.selection.map(r.slice(i)):h.selection,l=new on(this.items.slice(0,o).append(u.reverse().concat(s)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:c}}addTransform(e,n,o,r){let i=[],a=this.eventCount,c=this.items,l=!r&&c.length?c.get(c.length-1):null;for(let u=0;u<e.steps.length;u++){let h=e.steps[u].invert(e.docs[u]),f=new hn(e.mapping.maps[u],h,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():c=c.slice(0,c.length-1)),i.push(f),n&&(a++,n=void 0),r||(l=f)}let s=a-o.depth;return s>sre&&(c=lre(c,s),a-=s),new on(c.append(i),a)}remapping(e,n){let o=new yr;return this.items.forEach((r,i)=>{let a=r.mirrorOffset!=null&&i-r.mirrorOffset>=e?o.maps.length-r.mirrorOffset:void 0;o.appendMap(r.map,a)},e,n),o}addMaps(e){return this.eventCount==0?this:new on(this.items.append(e.map(n=>new hn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let o=[],r=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,c=this.eventCount;this.items.forEach(f=>{f.selection&&c--},r);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let y=i.maps[p];if(f.step){let _=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&c++,o.push(new hn(y,_,g))}else o.push(new hn(y))},r);let s=[];for(let f=n;f<a;f++)s.push(new hn(i.maps[f]));let u=this.items.slice(0,r).append(s).append(o),h=new on(u,c);return h.emptyItemCount()>cre&&(h=h.compress(this.items.length-o.length)),h}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),o=n.maps.length,r=[],i=0;return this.items.forEach((a,c)=>{if(c>=e)r.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(o)),s=l&&l.getMap();if(o--,s&&n.appendMap(s,o),l){let u=a.selection&&a.selection.map(n.slice(o));u&&i++;let h=new hn(s.invert(),l,u),f,p=r.length-1;(f=r.length&&r[p].merge(h))?r[p]=f:r.push(h)}}else a.map&&o--},this.items.length,0),new on(lt.from(r.reverse()),i)}}on.empty=new on(lt.empty,0);function lre(t,e){let n;return t.forEach((o,r)=>{if(o.selection&&e--==0)return n=r,!1}),t.slice(n)}class hn{constructor(e,n,o,r){this.map=e,this.step=n,this.selection=o,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new hn(n.getMap().invert(),n,this.selection)}}}class Qn{constructor(e,n,o,r,i){this.done=e,this.undone=n,this.prevRanges=o,this.prevTime=r,this.prevComposition=i}}const sre=20;function dre(t,e,n,o){let r=n.getMeta(Uo),i;if(r)return r.historyState;n.getMeta(fre)&&(t=new Qn(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Uo))return a.getMeta(Uo).redo?new Qn(t.done.addTransform(n,void 0,o,Ta(e)),t.undone,Fp(n.mapping.maps),t.prevTime,t.prevComposition):new Qn(t.done,t.undone.addTransform(n,void 0,o,Ta(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let c=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=c&&(t.prevTime<(n.time||0)-o.newGroupDelay||!ure(n,t.prevRanges)),s=a?rs(t.prevRanges,n.mapping):Fp(n.mapping.maps);return new Qn(t.done.addTransform(n,l?e.selection.getBookmark():void 0,o,Ta(e)),on.empty,s,n.time,c??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Qn(t.done.rebased(n,i),t.undone.rebased(n,i),rs(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Qn(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),rs(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function ure(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((o,r)=>{for(let i=0;i<e.length;i+=2)o<=e[i+1]&&r>=e[i]&&(n=!0)}),n}function Fp(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((o,r,i,a)=>e.push(i,a));return e}function rs(t,e){if(!t)return null;let n=[];for(let o=0;o<t.length;o+=2){let r=e.map(t[o],1),i=e.map(t[o+1],-1);r<=i&&n.push(r,i)}return n}function hre(t,e,n){let o=Ta(e),r=Uo.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,o);if(!i)return null;let a=i.selection.resolve(i.transform.doc),c=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),r,o),l=new Qn(n?c:i.remaining,n?i.remaining:c,null,0,-1);return i.transform.setSelection(a).setMeta(Uo,{redo:n,historyState:l})}let is=!1,$p=null;function Ta(t){let e=t.plugins;if($p!=e){is=!1,$p=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){is=!0;break}}return is}const Uo=new zr("history"),fre=new zr("closeHistory");function pre(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vo({key:Uo,state:{init(){return new Qn(on.empty,on.empty,null,0,-1)},apply(e,n,o){return dre(n,o,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let o=n.inputType,r=o=="historyUndo"?M3:o=="historyRedo"?S3:null;return r?(n.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function x3(t,e){return(n,o)=>{let r=Uo.getState(n);if(!r||(t?r.undone:r.done).eventCount==0)return!1;if(o){let i=hre(r,n,t);i&&o(e?i.scrollIntoView():i)}return!0}}const M3=x3(!1,!0),S3=x3(!0,!0);function yre(t={}){return new Vo({view(e){return new gre(e,t)}})}class gre{constructor(e,n){var o;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(o=n.width)!==null&&o!==void 0?o:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let i=a=>{this[r](a)};return e.dom.addEventListener(r,i),{name:r,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,o;if(n){let c=e.nodeBefore,l=e.nodeAfter;if(c||l){let s=this.editorView.nodeDOM(this.cursorPos-(c?c.nodeSize:0));if(s){let u=s.getBoundingClientRect(),h=c?u.bottom:u.top;c&&l&&(h=(h+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),o={left:u.left,right:u.right,top:h-this.width/2,bottom:h+this.width/2}}}}if(!o){let c=this.editorView.coordsAtPos(this.cursorPos);o={left:c.left-this.width/2,right:c.left+this.width/2,top:c.top,bottom:c.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,a;if(!r||r==document.body&&getComputedStyle(r).position=="static")i=-pageXOffset,a=-pageYOffset;else{let c=r.getBoundingClientRect();i=c.left-r.scrollLeft,a=c.top-r.scrollTop}this.element.style.left=o.left-i+"px",this.element.style.top=o.top-a+"px",this.element.style.width=o.right-o.left+"px",this.element.style.height=o.bottom-o.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=o&&o.type.spec.disableDropCursor,i=typeof r=="function"?r(this.editorView,n,e):r;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let c=w5(this.editorView.state.doc,a,this.editorView.dragging.slice);c!=null&&(a=c)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}class et extends Ce{constructor(e){super(e,e)}map(e,n){let o=e.resolve(n.map(this.head));return et.valid(o)?new et(o):Ce.near(o)}content(){return Se.empty}eq(e){return e instanceof et&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new et(e.resolve(n.pos))}getBookmark(){return new Hh(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!_re(e)||!mre(e))return!1;let o=n.type.spec.allowGapCursor;if(o!=null)return o;let r=n.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,n,o=!1){e:for(;;){if(!o&&et.valid(e))return e;let r=e.pos,i=null;for(let a=e.depth;;a--){let c=e.node(a);if(n>0?e.indexAfter(a)<c.childCount:e.index(a)>0){i=c.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;r+=n;let l=e.doc.resolve(r);if(et.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!Ne.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*n),o=!1;continue e}break}i=a,r+=n;let c=e.doc.resolve(r);if(et.valid(c))return c}return null}}}et.prototype.visible=!1;et.findFrom=et.findGapCursorFrom;Ce.jsonID("gapcursor",et);class Hh{constructor(e){this.pos=e}map(e){return new Hh(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return et.valid(n)?new et(n):Ce.near(n)}}function _re(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),o=t.node(e);if(n==0){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function mre(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),o=t.node(e);if(n==o.childCount){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function bre(){return new Vo({props:{decorations:Mre,createSelectionBetween(t,e,n){return e.pos==n.pos&&et.valid(n)?new et(n):null},handleClick:kre,handleKeyDown:vre,handleDOMEvents:{beforeinput:xre}}})}const vre=vh({ArrowLeft:Ji("horiz",-1),ArrowRight:Ji("horiz",1),ArrowUp:Ji("vert",-1),ArrowDown:Ji("vert",1)});function Ji(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(o,r,i){let a=o.selection,c=e>0?a.$to:a.$from,l=a.empty;if(a instanceof qe){if(!i.endOfTextblock(n)||c.depth==0)return!1;l=!1,c=o.doc.resolve(e>0?c.after():c.before())}let s=et.findGapCursorFrom(c,e,l);return s?(r&&r(o.tr.setSelection(new et(s))),!0):!1}}function kre(t,e,n){if(!t||!t.editable)return!1;let o=t.state.doc.resolve(e);if(!et.valid(o))return!1;let r=t.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&Ne.isSelectable(t.state.doc.nodeAt(r.inside))?!1:(t.dispatch(t.state.tr.setSelection(new et(o))),!0)}function xre(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof et))return!1;let{$from:n}=t.state.selection,o=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!o)return!1;let r=ye.empty;for(let a=o.length-1;a>=0;a--)r=ye.from(o[a].createAndFill(null,r));let i=t.state.tr.replace(n.pos,n.pos,new Se(r,0,0));return i.setSelection(qe.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Mre(t){if(!(t.selection instanceof et))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Je.create(t.doc,[yt.widget(t.selection.head,e,{key:"gapcursor"})])}var Bu,Lu;if(typeof WeakMap<"u"){let t=new WeakMap;Bu=e=>t.get(e),Lu=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Bu=o=>{for(let r=0;r<t.length;r+=2)if(t[r]==o)return t[r+1]},Lu=(o,r)=>(n==10&&(n=0),t[n++]=o,t[n++]=r)}var Ye=class{constructor(t,e,n,o){this.width=t,this.height=e,this.map=n,this.problems=o}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const o=e%this.width,r=e/this.width|0;let i=o+1,a=r+1;for(let c=1;i<this.width&&this.map[e+c]==n;c++)i++;for(let c=1;a<this.height&&this.map[e+this.width*c]==n;c++)a++;return{left:o,top:r,right:i,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:o,right:r,top:i,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?o==0:r==this.width)?null:this.map[i*this.width+(n<0?o-1:r)]:(n<0?i==0:a==this.height)?null:this.map[o+this.width*(n<0?i-1:a)]}rectBetween(t,e){const{left:n,right:o,top:r,bottom:i}=this.findCell(t),{left:a,right:c,top:l,bottom:s}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(r,l),right:Math.max(o,c),bottom:Math.max(i,s)}}cellsInRect(t){const e=[],n={};for(let o=t.top;o<t.bottom;o++)for(let r=t.left;r<t.right;r++){const i=o*this.width+r,a=this.map[i];n[a]||(n[a]=!0,!(r==t.left&&r&&this.map[i-1]==a||o==t.top&&o&&this.map[i-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let o=0,r=0;;o++){const i=r+n.child(o).nodeSize;if(o==t){let a=e+t*this.width;const c=(t+1)*this.width;for(;a<c&&this.map[a]<r;)a++;return a==c?i-1:this.map[a]}r=i}}static get(t){return Bu(t)||Lu(t,Sre(t))}};function Sre(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=wre(t),n=t.childCount,o=[];let r=0,i=null;const a=[];for(let s=0,u=e*n;s<u;s++)o[s]=0;for(let s=0,u=0;s<n;s++){const h=t.child(s);u++;for(let y=0;;y++){for(;r<o.length&&o[r]!=0;)r++;if(y==h.childCount)break;const _=h.child(y),{colspan:g,rowspan:m,colwidth:b}=_.attrs;for(let v=0;v<m;v++){if(v+s>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:m-v});break}const w=r+v*e;for(let M=0;M<g;M++){o[w+M]==0?o[w+M]=u:(i||(i=[])).push({type:"collision",row:s,pos:u,n:g-M});const O=b&&b[M];if(O){const D=(w+M)%e*2,j=a[D];j==null||j!=O&&a[D+1]==1?(a[D]=O,a[D+1]=1):j==O&&a[D+1]++}}}r+=g,u+=_.nodeSize}const f=(s+1)*e;let p=0;for(;r<f;)o[r++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:s,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const c=new Ye(e,n,o,i);let l=!1;for(let s=0;!l&&s<a.length;s+=2)a[s]!=null&&a[s+1]<n&&(l=!0);return l&&Ore(c,a,t),c}function wre(t){let e=-1,n=!1;for(let o=0;o<t.childCount;o++){const r=t.child(o);let i=0;if(n)for(let a=0;a<o;a++){const c=t.child(a);for(let l=0;l<c.childCount;l++){const s=c.child(l);a+s.attrs.rowspan>o&&(i+=s.attrs.colspan)}}for(let a=0;a<r.childCount;a++){const c=r.child(a);i+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function Ore(t,e,n){t.problems||(t.problems=[]);const o={};for(let r=0;r<t.map.length;r++){const i=t.map[r];if(o[i])continue;o[i]=!0;const a=n.nodeAt(i);if(!a)throw new RangeError(`No cell with offset ${i} found`);let c=null;const l=a.attrs;for(let s=0;s<l.colspan;s++){const u=(r+s)%t.width,h=e[u*2];h!=null&&(!l.colwidth||l.colwidth[s]!=h)&&((c||(c=Tre(l)))[s]=h)}c&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:c})}}function Tre(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function gt(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const o=t.nodes[n],r=o.spec.tableRole;r&&(e[r]=o)}}return e}var no=new zr("selectingCells");function Er(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Dre(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function ln(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Qc(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Er(e.$head)||Nre(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function Nre(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const o=e.type.spec.tableRole;if(o=="cell"||o=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const o=e.type.spec.tableRole;if(o=="cell"||o=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function Iu(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function jre(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Xh(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function w3(t,e,n){const o=t.node(-1),r=Ye.get(o),i=t.start(-1),a=r.nextCell(t.pos-i,e,n);return a==null?null:t.node(0).resolve(i+a)}function Lo(t,e,n=1){const o={...t,colspan:t.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(e,n),o.colwidth.some(r=>r>0)||(o.colwidth=null)),o}function O3(t,e,n=1){const o={...t,colspan:t.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let r=0;r<n;r++)o.colwidth.splice(e,0,0)}return o}function Pre(t,e,n){const o=gt(e.type.schema).header_cell;for(let r=0;r<t.height;r++)if(e.nodeAt(t.map[n+r*t.width]).type!=o)return!1;return!0}var Ke=class Pn extends Ce{constructor(e,n=e){const o=e.node(-1),r=Ye.get(o),i=e.start(-1),a=r.rectBetween(e.pos-i,n.pos-i),c=e.node(0),l=r.cellsInRect(a).filter(u=>u!=n.pos-i);l.unshift(n.pos-i);const s=l.map(u=>{const h=o.nodeAt(u);if(!h)throw RangeError(`No cell with offset ${u} found`);const f=i+u+1;return new sh(c.resolve(f),c.resolve(f+h.content.size))});super(s[0].$from,s[0].$to,s),this.$anchorCell=e,this.$headCell=n}map(e,n){const o=e.resolve(n.map(this.$anchorCell.pos)),r=e.resolve(n.map(this.$headCell.pos));if(Iu(o)&&Iu(r)&&Xh(o,r)){const i=this.$anchorCell.node(-1)!=o.node(-1);return i&&this.isRowSelection()?Pn.rowSelection(o,r):i&&this.isColSelection()?Pn.colSelection(o,r):new Pn(o,r)}return qe.between(o,r)}content(){const e=this.$anchorCell.node(-1),n=Ye.get(e),o=this.$anchorCell.start(-1),r=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),i={},a=[];for(let l=r.top;l<r.bottom;l++){const s=[];for(let u=l*n.width+r.left,h=r.left;h<r.right;h++,u++){const f=n.map[u];if(i[f])continue;i[f]=!0;const p=n.findCell(f);let y=e.nodeAt(f);if(!y)throw RangeError(`No cell with offset ${f} found`);const _=r.left-p.left,g=p.right-r.right;if(_>0||g>0){let m=y.attrs;if(_>0&&(m=Lo(m,0,_)),g>0&&(m=Lo(m,m.colspan-g,g)),p.left<r.left){if(y=y.type.createAndFill(m),!y)throw RangeError(`Could not create cell with attrs ${JSON.stringify(m)}`)}else y=y.type.create(m,y.content)}if(p.top<r.top||p.bottom>r.bottom){const m={...y.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?y=y.type.createAndFill(m):y=y.type.create(m,y.content)}s.push(y)}a.push(e.child(l).copy(ye.from(s)))}const c=this.isColSelection()&&this.isRowSelection()?e:a;return new Se(ye.from(c),1,1)}replace(e,n=Se.empty){const o=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){const{$from:c,$to:l}=r[a],s=e.mapping.slice(o);e.replace(s.map(c.pos),s.map(l.pos),a?Se.empty:n)}const i=Ce.findFrom(e.doc.resolve(e.mapping.slice(o).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Se(ye.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),o=Ye.get(n),r=this.$anchorCell.start(-1),i=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let a=0;a<i.length;a++)e(n.nodeAt(i[a]),r+i[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const o=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,r)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const o=e.node(-1),r=Ye.get(o),i=e.start(-1),a=r.findCell(e.pos-i),c=r.findCell(n.pos-i),l=e.node(0);return a.top<=c.top?(a.top>0&&(e=l.resolve(i+r.map[a.left])),c.bottom<r.height&&(n=l.resolve(i+r.map[r.width*(r.height-1)+c.right-1]))):(c.top>0&&(n=l.resolve(i+r.map[c.left])),a.bottom<r.height&&(e=l.resolve(i+r.map[r.width*(r.height-1)+a.right-1]))),new Pn(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Ye.get(e),o=this.$anchorCell.start(-1),r=n.colCount(this.$anchorCell.pos-o),i=n.colCount(this.$headCell.pos-o);if(Math.min(r,i)>0)return!1;const a=r+this.$anchorCell.nodeAfter.attrs.colspan,c=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,c)==n.width}eq(e){return e instanceof Pn&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const o=e.node(-1),r=Ye.get(o),i=e.start(-1),a=r.findCell(e.pos-i),c=r.findCell(n.pos-i),l=e.node(0);return a.left<=c.left?(a.left>0&&(e=l.resolve(i+r.map[a.top*r.width])),c.right<r.width&&(n=l.resolve(i+r.map[r.width*(c.top+1)-1]))):(c.left>0&&(n=l.resolve(i+r.map[c.top*r.width])),a.right<r.width&&(e=l.resolve(i+r.map[r.width*(a.top+1)-1]))),new Pn(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Pn(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,o=n){return new Pn(e.resolve(n),e.resolve(o))}getBookmark(){return new Cre(this.$anchorCell.pos,this.$headCell.pos)}};Ke.prototype.visible=!1;Ce.jsonID("cell",Ke);var Cre=class T3{constructor(e,n){this.anchor=e,this.head=n}map(e){return new T3(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),o=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&Xh(n,o)?new Ke(n,o):Ce.near(o,1)}};function zre(t){if(!(t.selection instanceof Ke))return null;const e=[];return t.selection.forEachCell((n,o)=>{e.push(yt.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Je.create(t.doc,e)}function Are({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,o=e.pos,r=t.depth;for(;r>=0&&!(t.after(r+1)<t.end(r));r--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,o--);return n==o&&/row|table/.test(t.node(r).type.spec.tableRole)}function Ere({$from:t,$to:e}){let n,o;for(let r=t.depth;r>0;r--){const i=t.node(r);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let r=e.depth;r>0;r--){const i=e.node(r);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){o=i;break}}return n!==o&&e.parentOffset===0}function Ure(t,e,n){const o=(e||t).selection,r=(e||t).doc;let i,a;if(o instanceof Ne&&(a=o.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=Ke.create(r,o.from);else if(a=="row"){const c=r.resolve(o.from+1);i=Ke.rowSelection(c,c)}else if(!n){const c=Ye.get(o.node),l=o.from+1,s=l+c.map[c.width*c.height-1];i=Ke.create(r,l+1,s)}}else o instanceof qe&&Are(o)?i=qe.create(r,o.from):o instanceof qe&&Ere(o)&&(i=qe.create(r,o.$from.start(),o.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var qre=new zr("fix-tables");function D3(t,e,n,o){const r=t.childCount,i=e.childCount;e:for(let a=0,c=0;a<i;a++){const l=e.child(a);for(let s=c,u=Math.min(r,a+3);s<u;s++)if(t.child(s)==l){c=s+1,n+=l.nodeSize;continue e}o(l,n),c<r&&t.child(c).sameMarkup(l)?D3(t.child(c),l,n+1,o):l.nodesBetween(0,l.content.size,o,n+1),n+=l.nodeSize}}function N3(t,e){let n;const o=(r,i)=>{r.type.spec.tableRole=="table"&&(n=Fre(t,r,i,n))};return e?e.doc!=t.doc&&D3(e.doc,t.doc,0,o):t.doc.descendants(o),n}function Fre(t,e,n,o){const r=Ye.get(e);if(!r.problems)return o;o||(o=t.tr);const i=[];for(let l=0;l<r.height;l++)i.push(0);for(let l=0;l<r.problems.length;l++){const s=r.problems[l];if(s.type=="collision"){const u=e.nodeAt(s.pos);if(!u)continue;const h=u.attrs;for(let f=0;f<h.rowspan;f++)i[s.row+f]+=s.n;o.setNodeMarkup(o.mapping.map(n+1+s.pos),null,Lo(h,h.colspan-s.n,s.n))}else if(s.type=="missing")i[s.row]+=s.n;else if(s.type=="overlong_rowspan"){const u=e.nodeAt(s.pos);if(!u)continue;o.setNodeMarkup(o.mapping.map(n+1+s.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-s.n})}else if(s.type=="colwidth mismatch"){const u=e.nodeAt(s.pos);if(!u)continue;o.setNodeMarkup(o.mapping.map(n+1+s.pos),null,{...u.attrs,colwidth:s.colwidth})}else if(s.type=="zero_sized"){const u=o.mapping.map(n);o.delete(u,u+e.nodeSize)}}let a,c;for(let l=0;l<i.length;l++)i[l]&&(a==null&&(a=l),c=l);for(let l=0,s=n+1;l<r.height;l++){const u=e.child(l),h=s+u.nodeSize,f=i[l];if(f>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const y=[];for(let g=0;g<f;g++){const m=gt(t.schema)[p].createAndFill();m&&y.push(m)}const _=(l==0||a==l-1)&&c==l?s+1:h-1;o.insert(o.mapping.map(_),y)}s=h}return o.setMeta(qre,{fixTables:!0})}function xn(t){const e=t.selection,n=Qc(t),o=n.node(-1),r=n.start(-1),i=Ye.get(o);return{...e instanceof Ke?i.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r):i.findCell(n.pos-r),tableStart:r,map:i,table:o}}function j3(t,{map:e,tableStart:n,table:o},r){let i=r>0?-1:0;Pre(e,o,r+i)&&(i=r==0||r==e.width?null:0);for(let a=0;a<e.height;a++){const c=a*e.width+r;if(r>0&&r<e.width&&e.map[c-1]==e.map[c]){const l=e.map[c],s=o.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,O3(s.attrs,r-e.colCount(l))),a+=s.attrs.rowspan-1}else{const l=i==null?gt(o.type.schema).cell:o.nodeAt(e.map[c+i]).type,s=e.positionAt(a,r,o);t.insert(t.mapping.map(n+s),l.createAndFill())}}return t}function $re(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(j3(t.tr,n,n.left))}return!0}function Rre(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(j3(t.tr,n,n.right))}return!0}function Bre(t,{map:e,table:n,tableStart:o},r){const i=t.mapping.maps.length;for(let a=0;a<e.height;){const c=a*e.width+r,l=e.map[c],s=n.nodeAt(l),u=s.attrs;if(r>0&&e.map[c-1]==l||r<e.width-1&&e.map[c+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(o+l),null,Lo(u,r-e.colCount(l)));else{const h=t.mapping.slice(i).map(o+l);t.delete(h,h+s.nodeSize)}a+=u.rowspan}}function Lre(t,e){if(!ln(t))return!1;if(e){const n=xn(t),o=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;Bre(o,n,r),r!=n.left;r--){const i=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=Ye.get(i)}e(o)}return!0}function Ire(t,e,n){var o;const r=gt(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((o=e.nodeAt(t.map[i+n*t.width]))==null?void 0:o.type)!=r)return!1;return!0}function P3(t,{map:e,tableStart:n,table:o},r){var i;let a=n;for(let s=0;s<r;s++)a+=o.child(s).nodeSize;const c=[];let l=r>0?-1:0;Ire(e,o,r+l)&&(l=r==0||r==e.height?null:0);for(let s=0,u=e.width*r;s<e.width;s++,u++)if(r>0&&r<e.height&&e.map[u]==e.map[u-e.width]){const h=e.map[u],f=o.nodeAt(h).attrs;t.setNodeMarkup(n+h,null,{...f,rowspan:f.rowspan+1}),s+=f.colspan-1}else{const h=l==null?gt(o.type.schema).cell:(i=o.nodeAt(e.map[u+l*e.width]))==null?void 0:i.type,f=h==null?void 0:h.createAndFill();f&&c.push(f)}return t.insert(a,gt(o.type.schema).row.create(null,c)),t}function Wre(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(P3(t.tr,n,n.top))}return!0}function Vre(t,e){if(!ln(t))return!1;if(e){const n=xn(t);e(P3(t.tr,n,n.bottom))}return!0}function Hre(t,{map:e,table:n,tableStart:o},r){let i=0;for(let s=0;s<r;s++)i+=n.child(s).nodeSize;const a=i+n.child(r).nodeSize,c=t.mapping.maps.length;t.delete(i+o,a+o);const l=new Set;for(let s=0,u=r*e.width;s<e.width;s++,u++){const h=e.map[u];if(!l.has(h)){if(l.add(h),r>0&&h==e.map[u-e.width]){const f=n.nodeAt(h).attrs;t.setNodeMarkup(t.mapping.slice(c).map(h+o),null,{...f,rowspan:f.rowspan-1}),s+=f.colspan-1}else if(r<e.height&&h==e.map[u+e.width]){const f=n.nodeAt(h),p=f.attrs,y=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),_=e.positionAt(r+1,s,n);t.insert(t.mapping.slice(c).map(o+_),y),s+=p.colspan-1}}}}function Xre(t,e){if(!ln(t))return!1;if(e){const n=xn(t),o=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;Hre(o,n,r),r!=n.top;r--){const i=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=Ye.get(n.table)}e(o)}return!0}function Rp(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Zre({width:t,height:e,map:n},o){let r=o.top*t+o.left,i=r,a=(o.bottom-1)*t+o.left,c=r+(o.right-o.left-1);for(let l=o.top;l<o.bottom;l++){if(o.left>0&&n[i]==n[i-1]||o.right<t&&n[c]==n[c+1])return!0;i+=t,c+=t}for(let l=o.left;l<o.right;l++){if(o.top>0&&n[r]==n[r-t]||o.bottom<e&&n[a]==n[a+t])return!0;r++,a++}return!1}function Gre(t,e){const n=t.selection;if(!(n instanceof Ke)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=xn(t),{map:r}=o;if(Zre(r,o))return!1;if(e){const i=t.tr,a={};let c=ye.empty,l,s;for(let u=o.top;u<o.bottom;u++)for(let h=o.left;h<o.right;h++){const f=r.map[u*r.width+h],p=o.table.nodeAt(f);if(!(a[f]||!p))if(a[f]=!0,l==null)l=f,s=p;else{Rp(p)||(c=c.append(p.content));const y=i.mapping.map(f+o.tableStart);i.delete(y,y+p.nodeSize)}}if(l==null||s==null)return!0;if(i.setNodeMarkup(l+o.tableStart,null,{...O3(s.attrs,s.attrs.colspan,o.right-o.left-s.attrs.colspan),rowspan:o.bottom-o.top}),c.size){const u=l+1+s.content.size,h=Rp(s)?l+1:u;i.replaceWith(h+o.tableStart,u+o.tableStart,c)}i.setSelection(new Ke(i.doc.resolve(l+o.tableStart))),e(i)}return!0}function Kre(t,e){const n=gt(t.schema);return Jre(({node:o})=>n[o.type.spec.tableRole])(t,e)}function Jre(t){return(e,n)=>{var o;const r=e.selection;let i,a;if(r instanceof Ke){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=Dre(r.$from),!i)return!1;a=(o=Er(r.$from))==null?void 0:o.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let c=i.attrs;const l=[],s=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const u=xn(e),h=e.tr;for(let p=0;p<u.right-u.left;p++)l.push(s?{...c,colwidth:s&&s[p]?[s[p]]:null}:c);let f;for(let p=u.top;p<u.bottom;p++){let y=u.map.positionAt(p,u.left,u.table);p==u.top&&(y+=i.nodeSize);for(let _=u.left,g=0;_<u.right;_++,g++)_==u.left&&p==u.top||h.insert(f=h.mapping.map(y+u.tableStart,1),t({node:i,row:p,col:_}).createAndFill(l[g]))}h.setNodeMarkup(a,t({node:i,row:u.top,col:u.left}),l[0]),r instanceof Ke&&h.setSelection(new Ke(h.doc.resolve(r.$anchorCell.pos),f?h.doc.resolve(f):void 0)),n(h)}return!0}}function Yre(t,e){return function(n,o){if(!ln(n))return!1;const r=Qc(n);if(r.nodeAfter.attrs[t]===e)return!1;if(o){const i=n.tr;n.selection instanceof Ke?n.selection.forEachCell((a,c)=>{a.attrs[t]!==e&&i.setNodeMarkup(c,null,{...a.attrs,[t]:e})}):i.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[t]:e}),o(i)}return!0}}function Qre(t){return function(e,n){if(!ln(e))return!1;if(n){const o=gt(e.schema),r=xn(e),i=e.tr,a=r.map.cellsInRect(t=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:t=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),c=a.map(l=>r.table.nodeAt(l));for(let l=0;l<a.length;l++)c[l].type==o.header_cell&&i.setNodeMarkup(r.tableStart+a[l],o.cell,c[l].attrs);if(i.steps.length==0)for(let l=0;l<a.length;l++)i.setNodeMarkup(r.tableStart+a[l],o.header_cell,c[l].attrs);n(i)}return!0}}function Bp(t,e,n){const o=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let r=0;r<o.length;r++){const i=e.table.nodeAt(o[r]);if(i&&i.type!==n.header_cell)return!1}return!0}function el(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Qre(t):function(n,o){if(!ln(n))return!1;if(o){const r=gt(n.schema),i=xn(n),a=n.tr,c=Bp("row",i,r),l=Bp("column",i,r),u=(t==="column"?c:t==="row"?l:!1)?1:0,h=t=="column"?{left:0,top:u,right:1,bottom:i.map.height}:t=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?l?r.cell:r.header_cell:t=="row"?c?r.cell:r.header_cell:r.cell;i.map.cellsInRect(h).forEach(p=>{const y=p+i.tableStart,_=a.doc.nodeAt(y);_&&a.setNodeMarkup(y,f,_.attrs)}),o(a)}return!0}}el("row",{useDeprecatedLogic:!0});el("column",{useDeprecatedLogic:!0});var eie=el("cell",{useDeprecatedLogic:!0});function tie(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let o=t.index(-1)-1,r=t.before();o>=0;o--){const i=t.node(-1).child(o),a=i.lastChild;if(a)return r-1-a.nodeSize;r-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let o=t.indexAfter(-1),r=t.after();o<n.childCount;o++){const i=n.child(o);if(i.childCount)return r+1;r+=i.nodeSize}}return null}function nie(t){return function(e,n){if(!ln(e))return!1;const o=tie(Qc(e),t);if(o==null)return!1;if(n){const r=e.doc.resolve(o);n(e.tr.setSelection(qe.between(r,jre(r))).scrollIntoView())}return!0}}function oie(t,e){const n=t.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function Yi(t,e){const n=t.selection;if(!(n instanceof Ke))return!1;if(e){const o=t.tr,r=gt(t.schema).cell.createAndFill().content;n.forEachCell((i,a)=>{i.content.eq(r)||o.replace(o.mapping.map(a+1),o.mapping.map(a+i.nodeSize-1),new Se(r,0,0))}),o.docChanged&&e(o)}return!0}function rie(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:o}=t;for(;e.childCount==1&&(n>0&&o>0||e.child(0).type.spec.tableRole=="table");)n--,o--,e=e.child(0).content;const r=e.child(0),i=r.type.spec.tableRole,a=r.type.schema,c=[];if(i=="row")for(let l=0;l<e.childCount;l++){let s=e.child(l).content;const u=l?0:Math.max(0,n-1),h=l<e.childCount-1?0:Math.max(0,o-1);(u||h)&&(s=Wu(gt(a).row,new Se(s,u,h)).content),c.push(s)}else if(i=="cell"||i=="header_cell")c.push(n||o?Wu(gt(a).row,new Se(e,n,o)).content:e);else return null;return iie(a,c)}function iie(t,e){const n=[];for(let r=0;r<e.length;r++){const i=e[r];for(let a=i.childCount-1;a>=0;a--){const{rowspan:c,colspan:l}=i.child(a).attrs;for(let s=r;s<r+c;s++)n[s]=(n[s]||0)+l}}let o=0;for(let r=0;r<n.length;r++)o=Math.max(o,n[r]);for(let r=0;r<n.length;r++)if(r>=e.length&&e.push(ye.empty),n[r]<o){const i=gt(t).cell.createAndFill(),a=[];for(let c=n[r];c<o;c++)a.push(i);e[r]=e[r].append(ye.from(a))}return{height:e.length,width:o,rows:e}}function Wu(t,e){const n=t.createAndFill();return new lh(n).replace(0,n.content.size,e).doc}function aie({width:t,height:e,rows:n},o,r){if(t!=o){const i=[],a=[];for(let c=0;c<n.length;c++){const l=n[c],s=[];for(let u=i[c]||0,h=0;u<o;h++){let f=l.child(h%l.childCount);u+f.attrs.colspan>o&&(f=f.type.createChecked(Lo(f.attrs,f.attrs.colspan,u+f.attrs.colspan-o),f.content)),s.push(f),u+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)i[c+p]=(i[c+p]||0)+f.attrs.colspan}a.push(ye.from(s))}n=a,t=o}if(e!=r){const i=[];for(let a=0,c=0;a<r;a++,c++){const l=[],s=n[c%e];for(let u=0;u<s.childCount;u++){let h=s.child(u);a+h.attrs.rowspan>r&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,r-h.attrs.rowspan)},h.content)),l.push(h)}i.push(ye.from(l))}n=i,e=r}return{width:t,height:e,rows:n}}function cie(t,e,n,o,r,i,a){const c=t.doc.type.schema,l=gt(c);let s,u;if(r>e.width)for(let h=0,f=0;h<e.height;h++){const p=n.child(h);f+=p.nodeSize;const y=[];let _;p.lastChild==null||p.lastChild.type==l.cell?_=s||(s=l.cell.createAndFill()):_=u||(u=l.header_cell.createAndFill());for(let g=e.width;g<r;g++)y.push(_);t.insert(t.mapping.slice(a).map(f-1+o),y)}if(i>e.height){const h=[];for(let y=0,_=(e.height-1)*e.width;y<Math.max(e.width,r);y++){const g=y>=e.width?!1:n.nodeAt(e.map[_+y]).type==l.header_cell;h.push(g?u||(u=l.header_cell.createAndFill()):s||(s=l.cell.createAndFill()))}const f=l.row.create(null,ye.from(h)),p=[];for(let y=e.height;y<i;y++)p.push(f);t.insert(t.mapping.slice(a).map(o+n.nodeSize-2),p)}return!!(s||u)}function Lp(t,e,n,o,r,i,a,c){if(a==0||a==e.height)return!1;let l=!1;for(let s=r;s<i;s++){const u=a*e.width+s,h=e.map[u];if(e.map[u-e.width]==h){l=!0;const f=n.nodeAt(h),{top:p,left:y}=e.findCell(h);t.setNodeMarkup(t.mapping.slice(c).map(h+o),null,{...f.attrs,rowspan:a-p}),t.insert(t.mapping.slice(c).map(e.positionAt(a,y,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-a})),s+=f.attrs.colspan-1}}return l}function Ip(t,e,n,o,r,i,a,c){if(a==0||a==e.width)return!1;let l=!1;for(let s=r;s<i;s++){const u=s*e.width+a,h=e.map[u];if(e.map[u-1]==h){l=!0;const f=n.nodeAt(h),p=e.colCount(h),y=t.mapping.slice(c).map(h+o);t.setNodeMarkup(y,null,Lo(f.attrs,a-p,f.attrs.colspan-(a-p))),t.insert(y+f.nodeSize,f.type.createAndFill(Lo(f.attrs,0,a-p))),s+=f.attrs.rowspan-1}}return l}function Wp(t,e,n,o,r){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let a=Ye.get(i);const{top:c,left:l}=o,s=l+r.width,u=c+r.height,h=t.tr;let f=0;function p(){if(i=n?h.doc.nodeAt(n-1):h.doc,!i)throw new Error("No table found");a=Ye.get(i),f=h.mapping.maps.length}cie(h,a,i,n,s,u,f)&&p(),Lp(h,a,i,n,l,s,c,f)&&p(),Lp(h,a,i,n,l,s,u,f)&&p(),Ip(h,a,i,n,c,u,l,f)&&p(),Ip(h,a,i,n,c,u,s,f)&&p();for(let y=c;y<u;y++){const _=a.positionAt(y,l,i),g=a.positionAt(y,s,i);h.replace(h.mapping.slice(f).map(_+n),h.mapping.slice(f).map(g+n),new Se(r.rows[y-c],0,0))}p(),h.setSelection(new Ke(h.doc.resolve(n+a.positionAt(c,l,i)),h.doc.resolve(n+a.positionAt(u-1,s-1,i)))),e(h)}var lie=vh({ArrowLeft:Qi("horiz",-1),ArrowRight:Qi("horiz",1),ArrowUp:Qi("vert",-1),ArrowDown:Qi("vert",1),"Shift-ArrowLeft":ea("horiz",-1),"Shift-ArrowRight":ea("horiz",1),"Shift-ArrowUp":ea("vert",-1),"Shift-ArrowDown":ea("vert",1),Backspace:Yi,"Mod-Backspace":Yi,Delete:Yi,"Mod-Delete":Yi});function Da(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Qi(t,e){return(n,o,r)=>{if(!r)return!1;const i=n.selection;if(i instanceof Ke)return Da(n,o,Ce.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const a=C3(r,t,e);if(a==null)return!1;if(t=="horiz")return Da(n,o,Ce.near(n.doc.resolve(i.head+e),e));{const c=n.doc.resolve(a),l=w3(c,t,e);let s;return l?s=Ce.near(l,1):e<0?s=Ce.near(n.doc.resolve(c.before(-1)),-1):s=Ce.near(n.doc.resolve(c.after(-1)),1),Da(n,o,s)}}}function ea(t,e){return(n,o,r)=>{if(!r)return!1;const i=n.selection;let a;if(i instanceof Ke)a=i;else{const l=C3(r,t,e);if(l==null)return!1;a=new Ke(n.doc.resolve(l))}const c=w3(a.$headCell,t,e);return c?Da(n,o,new Ke(a.$anchorCell,c)):!1}}function sie(t,e){const n=t.state.doc,o=Er(n.resolve(e));return o?(t.dispatch(t.state.tr.setSelection(new Ke(o))),!0):!1}function die(t,e,n){if(!ln(t.state))return!1;let o=rie(n);const r=t.state.selection;if(r instanceof Ke){o||(o={width:1,height:1,rows:[ye.from(Wu(gt(t.state.schema).cell,n))]});const i=r.$anchorCell.node(-1),a=r.$anchorCell.start(-1),c=Ye.get(i).rectBetween(r.$anchorCell.pos-a,r.$headCell.pos-a);return o=aie(o,c.right-c.left,c.bottom-c.top),Wp(t.state,t.dispatch,a,c,o),!0}else if(o){const i=Qc(t.state),a=i.start(-1);return Wp(t.state,t.dispatch,a,Ye.get(i.node(-1)).findCell(i.pos-a),o),!0}else return!1}function uie(t,e){var n;if(e.ctrlKey||e.metaKey)return;const o=Vp(t,e.target);let r;if(e.shiftKey&&t.state.selection instanceof Ke)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&o&&(r=Er(t.state.selection.$anchor))!=null&&((n=as(t,e))==null?void 0:n.pos)!=r.pos)i(r,e),e.preventDefault();else if(!o)return;function i(l,s){let u=as(t,s);const h=no.getState(t.state)==null;if(!u||!Xh(l,u))if(h)u=l;else return;const f=new Ke(l,u);if(h||!t.state.selection.eq(f)){const p=t.state.tr.setSelection(f);h&&p.setMeta(no,l.pos),t.dispatch(p)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",c),no.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(no,-1))}function c(l){const s=l,u=no.getState(t.state);let h;if(u!=null)h=t.state.doc.resolve(u);else if(Vp(t,s.target)!=o&&(h=as(t,e),!h))return a();h&&i(h,s)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",c)}function C3(t,e,n){if(!(t.state.selection instanceof qe))return null;const{$head:o}=t.state.selection;for(let r=o.depth-1;r>=0;r--){const i=o.node(r);if((n<0?o.index(r):o.indexAfter(r))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const c=o.before(r),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?c:null}}return null}function Vp(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function as(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Er(t.state.doc.resolve(n.pos)):null}var hie=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Vu(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,Vu(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function Vu(t,e,n,o,r,i){var a;let c=0,l=!0,s=e.firstChild;const u=t.firstChild;if(u){for(let h=0,f=0;h<u.childCount;h++){const{colspan:p,colwidth:y}=u.child(h).attrs;for(let _=0;_<p;_++,f++){const g=r==f?i:y&&y[_],m=g?g+"px":"";if(c+=g||o,g||(l=!1),s)s.style.width!=m&&(s.style.width=m),s=s.nextSibling;else{const b=document.createElement("col");b.style.width=m,e.appendChild(b)}}}for(;s;){const h=s.nextSibling;(a=s.parentNode)==null||a.removeChild(s),s=h}l?(n.style.width=c+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=c+"px")}}var Ut=new zr("tableColumnResizing");function fie({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:o=hie,lastColumnResizable:r=!0}={}){const i=new Vo({key:Ut,state:{init(a,c){var l,s;const u=(s=(l=i.spec)==null?void 0:l.props)==null?void 0:s.nodeViews,h=gt(c.schema).table.name;return o&&u&&(u[h]=(f,p)=>new o(f,n,p)),new pie(-1,!1)},apply(a,c){return c.apply(a)}},props:{attributes:a=>{const c=Ut.getState(a);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,c)=>{yie(a,c,t,r)},mouseleave:a=>{gie(a)},mousedown:(a,c)=>{_ie(a,c,e,n)}},decorations:a=>{const c=Ut.getState(a);if(c&&c.activeHandle>-1)return xie(a,c.activeHandle)},nodeViews:{}}});return i}var pie=class Na{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,o=e.getMeta(Ut);if(o&&o.setHandle!=null)return new Na(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new Na(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&e.docChanged){let r=e.mapping.map(n.activeHandle,-1);return Iu(e.doc.resolve(r))||(r=-1),new Na(r,n.dragging)}return n}};function yie(t,e,n,o){if(!t.editable)return;const r=Ut.getState(t.state);if(r&&!r.dragging){const i=bie(e.target);let a=-1;if(i){const{left:c,right:l}=i.getBoundingClientRect();e.clientX-c<=n?a=Hp(t,e,"left",n):l-e.clientX<=n&&(a=Hp(t,e,"right",n))}if(a!=r.activeHandle){if(!o&&a!==-1){const c=t.state.doc.resolve(a),l=c.node(-1),s=Ye.get(l),u=c.start(-1);if(s.colCount(c.pos-u)+c.nodeAfter.attrs.colspan-1==s.width-1)return}z3(t,a)}}}function gie(t){if(!t.editable)return;const e=Ut.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&z3(t,-1)}function _ie(t,e,n,o){var r;if(!t.editable)return!1;const i=(r=t.dom.ownerDocument.defaultView)!=null?r:window,a=Ut.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const c=t.state.doc.nodeAt(a.activeHandle),l=mie(t,a.activeHandle,c.attrs);t.dispatch(t.state.tr.setMeta(Ut,{setDragging:{startX:e.clientX,startWidth:l}}));function s(h){i.removeEventListener("mouseup",s),i.removeEventListener("mousemove",u);const f=Ut.getState(t.state);f!=null&&f.dragging&&(vie(t,f.activeHandle,Xp(f.dragging,h,n)),t.dispatch(t.state.tr.setMeta(Ut,{setDragging:null})))}function u(h){if(!h.which)return s(h);const f=Ut.getState(t.state);if(f&&f.dragging){const p=Xp(f.dragging,h,n);Zp(t,f.activeHandle,p,o)}}return Zp(t,a.activeHandle,l,o),i.addEventListener("mouseup",s),i.addEventListener("mousemove",u),e.preventDefault(),!0}function mie(t,e,{colspan:n,colwidth:o}){const r=o&&o[o.length-1];if(r)return r;const i=t.domAtPos(e);let c=i.node.childNodes[i.offset].offsetWidth,l=n;if(o)for(let s=0;s<n;s++)o[s]&&(c-=o[s],l--);return c/l}function bie(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Hp(t,e,n,o){const r=n=="right"?-o:o,i=t.posAtCoords({left:e.clientX+r,top:e.clientY});if(!i)return-1;const{pos:a}=i,c=Er(t.state.doc.resolve(a));if(!c)return-1;if(n=="right")return c.pos;const l=Ye.get(c.node(-1)),s=c.start(-1),u=l.map.indexOf(c.pos-s);return u%l.width==0?-1:s+l.map[u-1]}function Xp(t,e,n){const o=e.clientX-t.startX;return Math.max(n,t.startWidth+o)}function z3(t,e){t.dispatch(t.state.tr.setMeta(Ut,{setHandle:e}))}function vie(t,e,n){const o=t.state.doc.resolve(e),r=o.node(-1),i=Ye.get(r),a=o.start(-1),c=i.colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let s=0;s<i.height;s++){const u=s*i.width+c;if(s&&i.map[u]==i.map[u-i.width])continue;const h=i.map[u],f=r.nodeAt(h).attrs,p=f.colspan==1?0:c-i.colCount(h);if(f.colwidth&&f.colwidth[p]==n)continue;const y=f.colwidth?f.colwidth.slice():kie(f.colspan);y[p]=n,l.setNodeMarkup(a+h,null,{...f,colwidth:y})}l.docChanged&&t.dispatch(l)}function Zp(t,e,n,o){const r=t.state.doc.resolve(e),i=r.node(-1),a=r.start(-1),c=Ye.get(i).colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1;let l=t.domAtPos(r.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&Vu(i,l.firstChild,l,o,c,n)}function kie(t){return Array(t).fill(0)}function xie(t,e){var n;const o=[],r=t.doc.resolve(e),i=r.node(-1);if(!i)return Je.empty;const a=Ye.get(i),c=r.start(-1),l=a.colCount(r.pos-c)+r.nodeAfter.attrs.colspan-1;for(let s=0;s<a.height;s++){const u=l+s*a.width;if((l==a.width-1||a.map[u]!=a.map[u+1])&&(s==0||a.map[u]!=a.map[u-a.width])){const h=a.map[u],f=c+h+i.nodeAt(h).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=Ut.getState(t))!=null&&n.dragging&&o.push(yt.node(c+h,c+h+i.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),o.push(yt.widget(f,p))}}return Je.create(t.doc,o)}function Mie({allowTableNodeSelection:t=!1}={}){return new Vo({key:no,state:{init(){return null},apply(e,n){const o=e.getMeta(no);if(o!=null)return o==-1?null:o;if(n==null||!e.docChanged)return n;const{deleted:r,pos:i}=e.mapping.mapResult(n);return r?null:i}},props:{decorations:zre,handleDOMEvents:{mousedown:uie},createSelectionBetween(e){return no.getState(e.state)!=null?e.state.selection:null},handleTripleClick:sie,handleKeyDown:lie,handlePaste:die},appendTransaction(e,n,o){return Ure(o,N3(o,n),t)}})}var Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function A3(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var cs,Gp;function E3(){if(Gp)return cs;Gp=1;var t=Object.prototype.toString;return cs=function(n){var o=t.call(n),r=o==="[object Arguments]";return r||(r=o!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&t.call(n.callee)==="[object Function]"),r},cs}var ls,Kp;function Sie(){if(Kp)return ls;Kp=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=E3(),r=Object.prototype.propertyIsEnumerable,i=!r.call({toString:null},"toString"),a=r.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var p=f.constructor;return p&&p.prototype===f},s={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!s["$"+f]&&e.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),h=function(f){if(typeof window>"u"||!u)return l(f);try{return l(f)}catch{return!1}};t=function(p){var y=p!==null&&typeof p=="object",_=n.call(p)==="[object Function]",g=o(p),m=y&&n.call(p)==="[object String]",b=[];if(!y&&!_&&!g)throw new TypeError("Object.keys called on a non-object");var v=a&&_;if(m&&p.length>0&&!e.call(p,0))for(var w=0;w<p.length;++w)b.push(String(w));if(g&&p.length>0)for(var M=0;M<p.length;++M)b.push(String(M));else for(var O in p)!(v&&O==="prototype")&&e.call(p,O)&&b.push(String(O));if(i)for(var D=h(p),j=0;j<c.length;++j)!(D&&c[j]==="constructor")&&e.call(p,c[j])&&b.push(c[j]);return b}}return ls=t,ls}var ss,Jp;function Gh(){if(Jp)return ss;Jp=1;var t=Array.prototype.slice,e=E3(),n=Object.keys,o=n?function(a){return n(a)}:Sie(),r=Object.keys;return o.shim=function(){if(Object.keys){var a=function(){var c=Object.keys(arguments);return c&&c.length===arguments.length}(1,2);a||(Object.keys=function(l){return e(l)?r(t.call(l)):r(l)})}else Object.keys=o;return Object.keys||o},ss=o,ss}var ds,Yp;function tl(){if(Yp)return ds;Yp=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ds=t,ds}var us,Qp;function Kh(){return Qp||(Qp=1,us=SyntaxError),us}var hs,e0;function Jt(){return e0||(e0=1,hs=TypeError),hs}var fs,t0;function wie(){return t0||(t0=1,fs=Object.getOwnPropertyDescriptor),fs}var ps,n0;function Zo(){if(n0)return ps;n0=1;var t=wie();if(t)try{t([],"length")}catch{t=null}return ps=t,ps}var ys,o0;function Jh(){if(o0)return ys;o0=1;var t=tl(),e=Kh(),n=Jt(),o=Zo();return ys=function(i,a,c){if(!i||typeof i!="object"&&typeof i!="function")throw new n("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,f=!!o&&o(i,a);if(t)t(i,a,{configurable:u===null&&f?f.configurable:!u,enumerable:l===null&&f?f.enumerable:!l,value:c,writable:s===null&&f?f.writable:!s});else if(h||!l&&!s&&!u)i[a]=c;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ys}var gs,r0;function Yh(){if(r0)return gs;r0=1;var t=tl(),e=function(){return!!t};return e.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},gs=e,gs}var _s,i0;function Go(){if(i0)return _s;i0=1;var t=Gh(),e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,r=Jh(),i=function(s){return typeof s=="function"&&n.call(s)==="[object Function]"},a=Yh()(),c=function(s,u,h,f){if(u in s){if(f===!0){if(s[u]===h)return}else if(!i(f)||!f())return}a?r(s,u,h,!0):r(s,u,h)},l=function(s,u){var h=arguments.length>2?arguments[2]:{},f=t(u);e&&(f=o.call(f,Object.getOwnPropertySymbols(u)));for(var p=0;p<f.length;p+=1)c(s,f[p],u[f[p]],h[f[p]])};return l.supportsDescriptors=!!a,_s=l,_s}var ms={exports:{}},bs,a0;function Qh(){return a0||(a0=1,bs=Object),bs}var vs,c0;function U3(){return c0||(c0=1,vs=Error),vs}var ks,l0;function Oie(){return l0||(l0=1,ks=EvalError),ks}var xs,s0;function Tie(){return s0||(s0=1,xs=RangeError),xs}var Ms,d0;function Die(){return d0||(d0=1,Ms=ReferenceError),Ms}var Ss,u0;function Nie(){return u0||(u0=1,Ss=URIError),Ss}var ws,h0;function jie(){return h0||(h0=1,ws=Math.abs),ws}var Os,f0;function Pie(){return f0||(f0=1,Os=Math.floor),Os}var Ts,p0;function Cie(){return p0||(p0=1,Ts=Math.max),Ts}var Ds,y0;function zie(){return y0||(y0=1,Ds=Math.min),Ds}var Ns,g0;function Aie(){return g0||(g0=1,Ns=Math.pow),Ns}var js,_0;function Eie(){return _0||(_0=1,js=Math.round),js}var Ps,m0;function Uie(){return m0||(m0=1,Ps=Number.isNaN||function(e){return e!==e}),Ps}var Cs,b0;function qie(){if(b0)return Cs;b0=1;var t=Uie();return Cs=function(n){return t(n)||n===0?n:n<0?-1:1},Cs}var zs,v0;function nl(){return v0||(v0=1,zs=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var r=42;e[n]=r;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,n);if(c.value!==r||c.enumerable!==!0)return!1}return!0}),zs}var As,k0;function e2(){if(k0)return As;k0=1;var t=typeof Symbol<"u"&&Symbol,e=nl();return As=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},As}var Es,x0;function q3(){return x0||(x0=1,Es=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Es}var Us,M0;function F3(){if(M0)return Us;M0=1;var t=Qh();return Us=t.getPrototypeOf||null,Us}var qs,S0;function Fie(){if(S0)return qs;S0=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,o="[object Function]",r=function(l,s){for(var u=[],h=0;h<l.length;h+=1)u[h]=l[h];for(var f=0;f<s.length;f+=1)u[f+l.length]=s[f];return u},i=function(l,s){for(var u=[],h=s,f=0;h<l.length;h+=1,f+=1)u[f]=l[h];return u},a=function(c,l){for(var s="",u=0;u<c.length;u+=1)s+=c[u],u+1<c.length&&(s+=l);return s};return qs=function(l){var s=this;if(typeof s!="function"||e.apply(s)!==o)throw new TypeError(t+s);for(var u=i(arguments,1),h,f=function(){if(this instanceof h){var m=s.apply(this,r(u,arguments));return Object(m)===m?m:this}return s.apply(l,r(u,arguments))},p=n(0,s.length-u.length),y=[],_=0;_<p;_++)y[_]="$"+_;if(h=Function("binder","return function ("+a(y,",")+"){ return binder.apply(this,arguments); }")(f),s.prototype){var g=function(){};g.prototype=s.prototype,h.prototype=new g,g.prototype=null}return h},qs}var Fs,w0;function $i(){if(w0)return Fs;w0=1;var t=Fie();return Fs=Function.prototype.bind||t,Fs}var $s,O0;function t2(){return O0||(O0=1,$s=Function.prototype.call),$s}var Rs,T0;function n2(){return T0||(T0=1,Rs=Function.prototype.apply),Rs}var Bs,D0;function $ie(){return D0||(D0=1,Bs=typeof Reflect<"u"&&Reflect&&Reflect.apply),Bs}var Ls,N0;function $3(){if(N0)return Ls;N0=1;var t=$i(),e=n2(),n=t2(),o=$ie();return Ls=o||t.call(n,e),Ls}var Is,j0;function o2(){if(j0)return Is;j0=1;var t=$i(),e=Jt(),n=t2(),o=$3();return Is=function(i){if(i.length<1||typeof i[0]!="function")throw new e("a function is required");return o(t,n,i)},Is}var Ws,P0;function Rie(){if(P0)return Ws;P0=1;var t=o2(),e=Zo(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var o=!!n&&e&&e(Object.prototype,"__proto__"),r=Object,i=r.getPrototypeOf;return Ws=o&&typeof o.get=="function"?t([o.get]):typeof i=="function"?function(c){return i(c==null?c:r(c))}:!1,Ws}var Vs,C0;function R3(){if(C0)return Vs;C0=1;var t=q3(),e=F3(),n=Rie();return Vs=t?function(r){return t(r)}:e?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return e(r)}:n?function(r){return n(r)}:null,Vs}var Hs,z0;function r2(){if(z0)return Hs;z0=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=$i();return Hs=n.call(t,e),Hs}var Xs,A0;function Ln(){if(A0)return Xs;A0=1;var t,e=Qh(),n=U3(),o=Oie(),r=Tie(),i=Die(),a=Kh(),c=Jt(),l=Nie(),s=jie(),u=Pie(),h=Cie(),f=zie(),p=Aie(),y=Eie(),_=qie(),g=Function,m=function(_e){try{return g('"use strict"; return ('+_e+").constructor;")()}catch{}},b=Zo(),v=tl(),w=function(){throw new c},M=b?function(){try{return arguments.callee,w}catch{try{return b(arguments,"callee").get}catch{return w}}}():w,O=e2()(),D=R3(),j=F3(),T=q3(),A=n2(),R=t2(),S={},P=typeof Uint8Array>"u"||!D?t:D(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":O&&D?D([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&D?D(D([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O||!D?t:D(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O||!D?t:D(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&D?D(""[Symbol.iterator]()):t,"%Symbol%":O?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":M,"%TypedArray%":P,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":A,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":j,"%Math.abs%":s,"%Math.floor%":u,"%Math.max%":h,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":y,"%Math.sign%":_,"%Reflect.getPrototypeOf%":T};if(D)try{null.error}catch(_e){var I=D(D(_e));k["%Error.prototype%"]=I}var C=function _e(fe){var ge;if(fe==="%AsyncFunction%")ge=m("async function () {}");else if(fe==="%GeneratorFunction%")ge=m("function* () {}");else if(fe==="%AsyncGeneratorFunction%")ge=m("async function* () {}");else if(fe==="%AsyncGenerator%"){var me=_e("%AsyncGeneratorFunction%");me&&(ge=me.prototype)}else if(fe==="%AsyncIteratorPrototype%"){var be=_e("%AsyncGenerator%");be&&D&&(ge=D(be.prototype))}return k[fe]=ge,ge},q={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},K=$i(),B=r2(),ne=K.call(R,Array.prototype.concat),$=K.call(A,Array.prototype.splice),U=K.call(R,String.prototype.replace),ae=K.call(R,String.prototype.slice),Z=K.call(R,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,pe=function(fe){var ge=ae(fe,0,1),me=ae(fe,-1);if(ge==="%"&&me!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(me==="%"&&ge!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return U(fe,J,function(x,H,W,F){be[be.length]=W?U(F,de,"$1"):H||x}),be},he=function(fe,ge){var me=fe,be;if(B(q,me)&&(be=q[me],me="%"+be[0]+"%"),B(k,me)){var x=k[me];if(x===S&&(x=C(me)),typeof x>"u"&&!ge)throw new c("intrinsic "+fe+" exists, but is not available. Please file an issue!");return{alias:be,name:me,value:x}}throw new a("intrinsic "+fe+" does not exist!")};return Xs=function(fe,ge){if(typeof fe!="string"||fe.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ge!="boolean")throw new c('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,fe)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var me=pe(fe),be=me.length>0?me[0]:"",x=he("%"+be+"%",ge),H=x.name,W=x.value,F=!1,E=x.alias;E&&(be=E[0],$(me,ne([0,1],E)));for(var V=1,ie=!0;V<me.length;V+=1){var oe=me[V],Y=ae(oe,0,1),L=ae(oe,-1);if((Y==='"'||Y==="'"||Y==="`"||L==='"'||L==="'"||L==="`")&&Y!==L)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!ie)&&(F=!0),be+="."+oe,H="%"+be+"%",B(k,H))W=k[H];else if(W!=null){if(!(oe in W)){if(!ge)throw new c("base intrinsic for "+fe+" exists, but the property is not available.");return}if(b&&V+1>=me.length){var G=b(W,oe);ie=!!G,ie&&"get"in G&&!("originalValue"in G.get)?W=G.get:W=W[oe]}else ie=B(W,oe),W=W[oe];ie&&!F&&(k[H]=W)}}return W},Xs}var Zs,E0;function Bie(){if(E0)return Zs;E0=1;var t=Ln(),e=Jh(),n=Yh()(),o=Zo(),r=Jt(),i=t("%Math.floor%");return Zs=function(c,l){if(typeof c!="function")throw new r("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||i(l)!==l)throw new r("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],u=!0,h=!0;if("length"in c&&o){var f=o(c,"length");f&&!f.configurable&&(u=!1),f&&!f.writable&&(h=!1)}return(u||h||!s)&&(n?e(c,"length",l,!0,!0):e(c,"length",l)),c},Zs}var Gs,U0;function Lie(){if(U0)return Gs;U0=1;var t=$i(),e=n2(),n=$3();return Gs=function(){return n(t,e,arguments)},Gs}var q0;function Ur(){return q0||(q0=1,function(t){var e=Bie(),n=tl(),o=o2(),r=Lie();t.exports=function(a){var c=o(arguments),l=a.length-(arguments.length-1);return e(c,1+(l>0?l:0),!0)},n?n(t.exports,"apply",{value:r}):t.exports.apply=r}(ms)),ms.exports}var Ks,F0;function bt(){if(F0)return Ks;F0=1;var t=Ln(),e=o2(),n=e([t("%String.prototype.indexOf%")]);return Ks=function(r,i){var a=t(r,!!i);return typeof a=="function"&&n(r,".prototype.")>-1?e([a]):a},Ks}var Js,$0;function B3(){if($0)return Js;$0=1;var t=Gh(),e=nl()(),n=bt(),o=Qh(),r=n("Array.prototype.push"),i=n("Object.prototype.propertyIsEnumerable"),a=e?o.getOwnPropertySymbols:null;return Js=function(l,s){if(l==null)throw new TypeError("target must be an object");var u=o(l);if(arguments.length===1)return u;for(var h=1;h<arguments.length;++h){var f=o(arguments[h]),p=t(f),y=e&&(o.getOwnPropertySymbols||a);if(y)for(var _=y(f),g=0;g<_.length;++g){var m=_[g];i(f,m)&&r(p,m)}for(var b=0;b<p.length;++b){var v=p[b];if(i(f,v)){var w=f[v];u[v]=w}}}return u},Js}var Ys,R0;function L3(){if(R0)return Ys;R0=1;var t=B3(),e=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",r=o.split(""),i={},a=0;a<r.length;++a)i[r[a]]=r[a];var c=Object.assign({},i),l="";for(var s in c)l+=s;return o!==l},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var o=Object.preventExtensions({1:2});try{Object.assign(o,"xy")}catch{return o[1]==="y"}return!1};return Ys=function(){return!Object.assign||e()||n()?t:Object.assign},Ys}var Qs,B0;function Iie(){if(B0)return Qs;B0=1;var t=Go(),e=L3();return Qs=function(){var o=e();return t(Object,{assign:o},{assign:function(){return Object.assign!==o}}),o},Qs}var ed,L0;function Wie(){if(L0)return ed;L0=1;var t=Go(),e=Ur(),n=B3(),o=L3(),r=Iie(),i=e.apply(o()),a=function(l,s){return i(Object,arguments)};return t(a,{getPolyfill:o,implementation:n,shim:r}),ed=a,ed}var td,I0;function I3(){if(I0)return td;I0=1;var t=Ln(),e=Ur(),n=e(t("String.prototype.indexOf"));return td=function(r,i){var a=t(r,!!i);return typeof a=="function"&&n(r,".prototype.")>-1?e(a):a},td}var nd,W0;function Vie(){if(W0)return nd;W0=1;var t=function(){return typeof(function(){}).name=="string"},e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}t.functionsHaveConfigurableNames=function(){if(!t()||!e)return!1;var r=e(function(){},"name");return!!r&&!!r.configurable};var n=Function.prototype.bind;return t.boundFunctionsHaveNames=function(){return t()&&typeof n=="function"&&(function(){}).bind().name!==""},nd=t,nd}var od,V0;function Hie(){if(V0)return od;V0=1;var t=Jh(),e=Yh()(),n=Vie().functionsHaveConfigurableNames(),o=Jt();return od=function(i,a){if(typeof i!="function")throw new o("`fn` is not a function");var c=arguments.length>2&&!!arguments[2];return(!c||n)&&(e?t(i,"name",a,!0,!0):t(i,"name",a)),i},od}var rd,H0;function W3(){if(H0)return rd;H0=1;var t=Hie(),e=Jt(),n=Object;return rd=t(function(){if(this==null||this!==n(this))throw new e("RegExp.prototype.flags getter called on non-object");var r="";return this.hasIndices&&(r+="d"),this.global&&(r+="g"),this.ignoreCase&&(r+="i"),this.multiline&&(r+="m"),this.dotAll&&(r+="s"),this.unicode&&(r+="u"),this.unicodeSets&&(r+="v"),this.sticky&&(r+="y"),r},"get flags",!0),rd}var id,X0;function V3(){if(X0)return id;X0=1;var t=W3(),e=Go().supportsDescriptors,n=Object.getOwnPropertyDescriptor;return id=function(){if(e&&/a/mig.flags==="gim"){var r=n(RegExp.prototype,"flags");if(r&&typeof r.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var i="",a={};if(Object.defineProperty(a,"hasIndices",{get:function(){i+="d"}}),Object.defineProperty(a,"sticky",{get:function(){i+="y"}}),r.get.call(a),i==="dy")return r.get}}return t},id}var ad,Z0;function Xie(){if(Z0)return ad;Z0=1;var t=Go().supportsDescriptors,e=V3(),n=Zo(),o=Object.defineProperty,r=U3(),i=R3(),a=/a/;return ad=function(){if(!t||!i)throw new r("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=e(),s=i(a),u=n(s,"flags");return(!u||u.get!==l)&&o(s,"flags",{configurable:!0,enumerable:!1,get:l}),l},ad}var cd,G0;function Zie(){if(G0)return cd;G0=1;var t=Go(),e=Ur(),n=W3(),o=V3(),r=Xie(),i=e(o());return t(i,{getPolyfill:o,implementation:n,shim:r}),cd=i,cd}var Wr={exports:{}},ld,K0;function Ko(){if(K0)return ld;K0=1;var t=nl();return ld=function(){return t()&&!!Symbol.toStringTag},ld}var sd,J0;function H3(){if(J0)return sd;J0=1;var t=Ko()(),e=bt(),n=e("Object.prototype.toString"),o=function(c){return t&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:n(c)==="[object Arguments]"},r=function(c){return o(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&n(c)!=="[object Array]"&&"callee"in c&&n(c.callee)==="[object Function]"},i=function(){return o(arguments)}();return o.isLegacyArguments=r,sd=i?o:r,sd}const Gie={},Kie=Object.freeze(Object.defineProperty({__proto__:null,default:Gie},Symbol.toStringTag,{value:"Module"})),Jie=A3(Kie);var dd,Y0;function ol(){if(Y0)return dd;Y0=1;var t=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=t&&e&&typeof e.get=="function"?e.get:null,o=t&&Map.prototype.forEach,r=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=r&&i&&typeof i.get=="function"?i.get:null,c=r&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,s=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,h=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,_=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,M=String.prototype.toLowerCase,O=RegExp.prototype.test,D=Array.prototype.concat,j=Array.prototype.join,T=Array.prototype.slice,A=Math.floor,R=typeof BigInt=="function"?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,k=typeof Symbol=="function"&&typeof Symbol.iterator=="object",I=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||!0)?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,q=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ee){return ee.__proto__}:null);function K(ee,re){if(ee===1/0||ee===-1/0||ee!==ee||ee&&ee>-1e3&&ee<1e3||O.call(/e/,re))return re;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ee=="number"){var Fe=ee<0?-A(-ee):A(ee);if(Fe!==ee){var Le=String(Fe),N=b.call(re,Le.length+1);return v.call(Le,ze,"$&_")+"."+v.call(v.call(N,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(re,ze,"$&_")}var B=Jie,ne=B.custom,$=x(ne)?ne:null,U={__proto__:null,double:'"',single:"'"},ae={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};dd=function ee(re,ze,Fe,Le){var N=ze||{};if(F(N,"quoteStyle")&&!F(U,N.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(F(N,"maxStringLength")&&(typeof N.maxStringLength=="number"?N.maxStringLength<0&&N.maxStringLength!==1/0:N.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var z=F(N,"customInspect")?N.customInspect:!0;if(typeof z!="boolean"&&z!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(F(N,"indent")&&N.indent!==null&&N.indent!==" "&&!(parseInt(N.indent,10)===N.indent&&N.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(F(N,"numericSeparator")&&typeof N.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var X=N.numericSeparator;if(typeof re>"u")return"undefined";if(re===null)return"null";if(typeof re=="boolean")return re?"true":"false";if(typeof re=="string")return ke(re,N);if(typeof re=="number"){if(re===0)return 1/0/re>0?"0":"-0";var le=String(re);return X?K(re,le):le}if(typeof re=="bigint"){var Me=String(re)+"n";return X?K(re,Me):Me}var je=typeof N.depth>"u"?5:N.depth;if(typeof Fe>"u"&&(Fe=0),Fe>=je&&je>0&&typeof re=="object")return pe(re)?"[Array]":"[Object]";var Re=ve(N,Fe);if(typeof Le>"u")Le=[];else if(ie(Le,re)>=0)return"[Circular]";function Ve(or,Wi,nG){if(Wi&&(Le=T.call(Le),Le.push(Wi)),nG){var Q2={depth:N.depth};return F(N,"quoteStyle")&&(Q2.quoteStyle=N.quoteStyle),ee(or,Q2,Fe+1,Le)}return ee(or,N,Fe+1,Le)}if(typeof re=="function"&&!_e(re)){var $t=V(re),Yt=Pe(re,Ve);return"[Function"+($t?": "+$t:" (anonymous)")+"]"+(Yt.length>0?" { "+j.call(Yt,", ")+" }":"")}if(x(re)){var Rt=k?v.call(String(re),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(re);return typeof re=="object"&&!k?De(Rt):Rt}if(ce(re)){for(var zt="<"+M.call(String(re.nodeName)),Qt=re.attributes||[],Bt=0;Bt<Qt.length;Bt++)zt+=" "+Qt[Bt].name+"="+Z(J(Qt[Bt].value),"double",N);return zt+=">",re.childNodes&&re.childNodes.length&&(zt+="..."),zt+="</"+M.call(String(re.nodeName))+">",zt}if(pe(re)){if(re.length===0)return"[]";var Ot=Pe(re,Ve);return Re&&!ue(Ot)?"["+Oe(Ot,Re)+"]":"[ "+j.call(Ot,", ")+" ]"}if(fe(re)){var en=Pe(re,Ve);return!("cause"in Error.prototype)&&"cause"in re&&!C.call(re,"cause")?"{ ["+String(re)+"] "+j.call(D.call("[cause]: "+Ve(re.cause),en),", ")+" }":en.length===0?"["+String(re)+"]":"{ ["+String(re)+"] "+j.call(en,", ")+" }"}if(typeof re=="object"&&z){if($&&typeof re[$]=="function"&&B)return B(re,{depth:je-Fe});if(z!=="symbol"&&typeof re.inspect=="function")return re.inspect()}if(oe(re)){var In=[];return o&&o.call(re,function(or,Wi){In.push(Ve(Wi,re,!0)+" => "+Ve(or,re))}),te("Map",n.call(re),In,Re)}if(G(re)){var ot=[];return c&&c.call(re,function(or){ot.push(Ve(or,re))}),te("Set",a.call(re),ot,Re)}if(Y(re))return Te("WeakMap");if(Q(re))return Te("WeakSet");if(L(re))return Te("WeakRef");if(me(re))return De(Ve(Number(re)));if(H(re))return De(Ve(R.call(re)));if(be(re))return De(y.call(re));if(ge(re))return De(Ve(String(re)));if(typeof window<"u"&&re===window)return"{ [object Window] }";if(typeof globalThis<"u"&&re===globalThis||typeof Zt<"u"&&re===Zt)return"{ [object globalThis] }";if(!he(re)&&!_e(re)){var tr=Pe(re,Ve),Mn=q?q(re)===Object.prototype:re instanceof Object||re.constructor===Object,nr=re instanceof Object?"":"null prototype",Y2=!Mn&&I&&Object(re)===re&&I in re?b.call(E(re),8,-1):nr?"Object":"",tG=Mn||typeof re.constructor!="function"?"":re.constructor.name?re.constructor.name+" ":"",Nl=tG+(Y2||nr?"["+j.call(D.call([],Y2||[],nr||[]),": ")+"] ":"");return tr.length===0?Nl+"{}":Re?Nl+"{"+Oe(tr,Re)+"}":Nl+"{ "+j.call(tr,", ")+" }"}return String(re)};function Z(ee,re,ze){var Fe=ze.quoteStyle||re,Le=U[Fe];return Le+ee+Le}function J(ee){return v.call(String(ee),/"/g,"&quot;")}function de(ee){return!I||!(typeof ee=="object"&&(I in ee||typeof ee[I]<"u"))}function pe(ee){return E(ee)==="[object Array]"&&de(ee)}function he(ee){return E(ee)==="[object Date]"&&de(ee)}function _e(ee){return E(ee)==="[object RegExp]"&&de(ee)}function fe(ee){return E(ee)==="[object Error]"&&de(ee)}function ge(ee){return E(ee)==="[object String]"&&de(ee)}function me(ee){return E(ee)==="[object Number]"&&de(ee)}function be(ee){return E(ee)==="[object Boolean]"&&de(ee)}function x(ee){if(k)return ee&&typeof ee=="object"&&ee instanceof Symbol;if(typeof ee=="symbol")return!0;if(!ee||typeof ee!="object"||!P)return!1;try{return P.call(ee),!0}catch{}return!1}function H(ee){if(!ee||typeof ee!="object"||!R)return!1;try{return R.call(ee),!0}catch{}return!1}var W=Object.prototype.hasOwnProperty||function(ee){return ee in this};function F(ee,re){return W.call(ee,re)}function E(ee){return _.call(ee)}function V(ee){if(ee.name)return ee.name;var re=m.call(g.call(ee),/^function\s*([\w$]+)/);return re?re[1]:null}function ie(ee,re){if(ee.indexOf)return ee.indexOf(re);for(var ze=0,Fe=ee.length;ze<Fe;ze++)if(ee[ze]===re)return ze;return-1}function oe(ee){if(!n||!ee||typeof ee!="object")return!1;try{n.call(ee);try{a.call(ee)}catch{return!0}return ee instanceof Map}catch{}return!1}function Y(ee){if(!s||!ee||typeof ee!="object")return!1;try{s.call(ee,s);try{h.call(ee,h)}catch{return!0}return ee instanceof WeakMap}catch{}return!1}function L(ee){if(!p||!ee||typeof ee!="object")return!1;try{return p.call(ee),!0}catch{}return!1}function G(ee){if(!a||!ee||typeof ee!="object")return!1;try{a.call(ee);try{n.call(ee)}catch{return!0}return ee instanceof Set}catch{}return!1}function Q(ee){if(!h||!ee||typeof ee!="object")return!1;try{h.call(ee,h);try{s.call(ee,s)}catch{return!0}return ee instanceof WeakSet}catch{}return!1}function ce(ee){return!ee||typeof ee!="object"?!1:typeof HTMLElement<"u"&&ee instanceof HTMLElement?!0:typeof ee.nodeName=="string"&&typeof ee.getAttribute=="function"}function ke(ee,re){if(ee.length>re.maxStringLength){var ze=ee.length-re.maxStringLength,Fe="... "+ze+" more character"+(ze>1?"s":"");return ke(b.call(ee,0,re.maxStringLength),re)+Fe}var Le=ae[re.quoteStyle||"single"];Le.lastIndex=0;var N=v.call(v.call(ee,Le,"\\$1"),/[\x00-\x1f]/g,we);return Z(N,"single",re)}function we(ee){var re=ee.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[re];return ze?"\\"+ze:"\\x"+(re<16?"0":"")+w.call(re.toString(16))}function De(ee){return"Object("+ee+")"}function Te(ee){return ee+" { ? }"}function te(ee,re,ze,Fe){var Le=Fe?Oe(ze,Fe):j.call(ze,", ");return ee+" ("+re+") {"+Le+"}"}function ue(ee){for(var re=0;re<ee.length;re++)if(ie(ee[re],`
35
35
  `)>=0)return!1;return!0}function ve(ee,re){var ze;if(ee.indent===" ")ze=" ";else if(typeof ee.indent=="number"&&ee.indent>0)ze=j.call(Array(ee.indent+1)," ");else return null;return{base:ze,prev:j.call(Array(re+1),ze)}}function Oe(ee,re){if(ee.length===0)return"";var ze=`
36
36
  `+re.prev+re.base;return ze+j.call(ee,","+ze)+`
37
37
  `+re.prev}function Pe(ee,re){var ze=pe(ee),Fe=[];if(ze){Fe.length=ee.length;for(var Le=0;Le<ee.length;Le++)Fe[Le]=F(ee,Le)?re(ee[Le],ee):""}var N=typeof S=="function"?S(ee):[],z;if(k){z={};for(var X=0;X<N.length;X++)z["$"+N[X]]=N[X]}for(var le in ee)F(ee,le)&&(ze&&String(Number(le))===le&&le<ee.length||k&&z["$"+le]instanceof Symbol||(O.call(/[^\w$]/,le)?Fe.push(re(le,ee)+": "+re(ee[le],ee)):Fe.push(le+": "+re(ee[le],ee))));if(typeof S=="function")for(var Me=0;Me<N.length;Me++)C.call(ee,N[Me])&&Fe.push("["+re(N[Me])+"]: "+re(ee[N[Me]],ee));return Fe}return dd}var ud,Q0;function Yie(){if(Q0)return ud;Q0=1;var t=ol(),e=Jt(),n=function(c,l,s){for(var u=c,h;(h=u.next)!=null;u=h)if(h.key===l)return u.next=h.next,s||(h.next=c.next,c.next=h),h},o=function(c,l){if(c){var s=n(c,l);return s&&s.value}},r=function(c,l,s){var u=n(c,l);u?u.value=s:c.next={key:l,next:c.next,value:s}},i=function(c,l){return c?!!n(c,l):!1},a=function(c,l){if(c)return n(c,l,!0)};return ud=function(){var l,s={assert:function(u){if(!s.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){var h=l&&l.next,f=a(l,u);return f&&h&&h===f&&(l=void 0),!!f},get:function(u){return o(l,u)},has:function(u){return i(l,u)},set:function(u,h){l||(l={next:void 0}),r(l,u,h)}};return s},ud}var hd,ey;function X3(){if(ey)return hd;ey=1;var t=Ln(),e=bt(),n=ol(),o=Jt(),r=t("%Map%",!0),i=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),c=e("Map.prototype.has",!0),l=e("Map.prototype.delete",!0),s=e("Map.prototype.size",!0);return hd=!!r&&function(){var h,f={assert:function(p){if(!f.has(p))throw new o("Side channel does not contain "+n(p))},delete:function(p){if(h){var y=l(h,p);return s(h)===0&&(h=void 0),y}return!1},get:function(p){if(h)return i(h,p)},has:function(p){return h?c(h,p):!1},set:function(p,y){h||(h=new r),a(h,p,y)}};return f},hd}var fd,ty;function Qie(){if(ty)return fd;ty=1;var t=Ln(),e=bt(),n=ol(),o=X3(),r=Jt(),i=t("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),c=e("WeakMap.prototype.set",!0),l=e("WeakMap.prototype.has",!0),s=e("WeakMap.prototype.delete",!0);return fd=i?function(){var h,f,p={assert:function(y){if(!p.has(y))throw new r("Side channel does not contain "+n(y))},delete:function(y){if(i&&y&&(typeof y=="object"||typeof y=="function")){if(h)return s(h,y)}else if(o&&f)return f.delete(y);return!1},get:function(y){return i&&y&&(typeof y=="object"||typeof y=="function")&&h?a(h,y):f&&f.get(y)},has:function(y){return i&&y&&(typeof y=="object"||typeof y=="function")&&h?l(h,y):!!f&&f.has(y)},set:function(y,_){i&&y&&(typeof y=="object"||typeof y=="function")?(h||(h=new i),c(h,y,_)):o&&(f||(f=o()),f.set(y,_))}};return p}:o,fd}var pd,ny;function Z3(){if(ny)return pd;ny=1;var t=Jt(),e=ol(),n=Yie(),o=X3(),r=Qie(),i=r||o||n;return pd=function(){var c,l={assert:function(s){if(!l.has(s))throw new t("Side channel does not contain "+e(s))},delete:function(s){return!!c&&c.delete(s)},get:function(s){return c&&c.get(s)},has:function(s){return!!c&&c.has(s)},set:function(s,u){c||(c=i()),c.set(s,u)}};return l},pd}var yd,oy;function eae(){if(oy)return yd;oy=1;var t=r2(),e=Z3()(),n=Jt(),o={assert:function(r,i){if(!r||typeof r!="object"&&typeof r!="function")throw new n("`O` is not an object");if(typeof i!="string")throw new n("`slot` must be a string");if(e.assert(r),!o.has(r,i))throw new n("`"+i+"` is not present on `O`")},get:function(r,i){if(!r||typeof r!="object"&&typeof r!="function")throw new n("`O` is not an object");if(typeof i!="string")throw new n("`slot` must be a string");var a=e.get(r);return a&&a["$"+i]},has:function(r,i){if(!r||typeof r!="object"&&typeof r!="function")throw new n("`O` is not an object");if(typeof i!="string")throw new n("`slot` must be a string");var a=e.get(r);return!!a&&t(a,"$"+i)},set:function(r,i,a){if(!r||typeof r!="object"&&typeof r!="function")throw new n("`O` is not an object");if(typeof i!="string")throw new n("`slot` must be a string");var c=e.get(r);c||(c={},e.set(r,c)),c["$"+i]=a}};return Object.freeze&&Object.freeze(o),yd=o,yd}var gd,ry;function tae(){if(ry)return gd;ry=1;var t=eae(),e=Kh(),n=typeof StopIteration=="object"?StopIteration:null;return gd=function(r){if(!n)throw new e("this environment lacks StopIteration");t.set(r,"[[Done]]",!1);var i={next:function(){var c=t.get(this,"[[Iterator]]"),l=!!t.get(c,"[[Done]]");try{return{done:l,value:l?void 0:c.next()}}catch(s){if(t.set(c,"[[Done]]",!0),s!==n)throw s;return{done:!0,value:void 0}}}};return t.set(i,"[[Iterator]]",r),i},gd}var _d,iy;function G3(){if(iy)return _d;iy=1;var t={}.toString;return _d=Array.isArray||function(e){return t.call(e)=="[object Array]"},_d}var md,ay;function K3(){if(ay)return md;ay=1;var t=bt(),e=t("String.prototype.valueOf"),n=function(c){try{return e(c),!0}catch{return!1}},o=t("Object.prototype.toString"),r="[object String]",i=Ko()();return md=function(c){return typeof c=="string"?!0:!c||typeof c!="object"?!1:i?n(c):o(c)===r},md}var bd,cy;function J3(){if(cy)return bd;cy=1;var t=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;t||(n=function(a){return!1});var o=t?Map.prototype.has:null,r=e?Set.prototype.has:null;return!n&&!o&&(n=function(a){return!1}),bd=n||function(a){if(!a||typeof a!="object")return!1;try{if(o.call(a),r)try{r.call(a)}catch{return!0}return a instanceof t}catch{}return!1},bd}var vd,ly;function Y3(){if(ly)return vd;ly=1;var t=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;e||(n=function(a){return!1});var o=t?Map.prototype.has:null,r=e?Set.prototype.has:null;return!n&&!r&&(n=function(a){return!1}),vd=n||function(a){if(!a||typeof a!="object")return!1;try{if(r.call(a),o)try{o.call(a)}catch{return!0}return a instanceof e}catch{}return!1},vd}var sy;function nae(){if(sy)return Wr.exports;sy=1;var t=H3(),e=tae();if(e2()()||nl()()){var n=Symbol.iterator;Wr.exports=function(T){if(T!=null&&typeof T[n]<"u")return T[n]();if(t(T))return Array.prototype[n].call(T)}}else{var o=G3(),r=K3(),i=Ln(),a=i("%Map%",!0),c=i("%Set%",!0),l=I3(),s=l("Array.prototype.push"),u=l("String.prototype.charCodeAt"),h=l("String.prototype.slice"),f=function(T,A){var R=T.length;if(A+1>=R)return A+1;var S=u(T,A);if(S<55296||S>56319)return A+1;var P=u(T,A+1);return P<56320||P>57343?A+1:A+2},p=function(T){var A=0;return{next:function(){var S=A>=T.length,P;return S||(P=T[A],A+=1),{done:S,value:P}}}},y=function(T,A){if(o(T)||t(T))return p(T);if(r(T)){var R=0;return{next:function(){var P=f(T,R),k=h(T,R,P);return R=P,{done:P>T.length,value:k}}}}if(A&&typeof T["_es6-shim iterator_"]<"u")return T["_es6-shim iterator_"]()};if(!a&&!c)Wr.exports=function(T){if(T!=null)return y(T,!0)};else{var _=J3(),g=Y3(),m=l("Map.prototype.forEach",!0),b=l("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var v=l("Map.prototype.iterator",!0),w=l("Set.prototype.iterator",!0);var M=l("Map.prototype.@@iterator",!0)||l("Map.prototype._es6-shim iterator_",!0),O=l("Set.prototype.@@iterator",!0)||l("Set.prototype._es6-shim iterator_",!0),D=function(T){if(_(T)){if(v)return e(v(T));if(M)return M(T);if(m){var A=[];return m(T,function(S,P){s(A,[P,S])}),p(A)}}if(g(T)){if(w)return e(w(T));if(O)return O(T);if(b){var R=[];return b(T,function(S){s(R,S)}),p(R)}}};Wr.exports=function(T){return D(T)||y(T)}}}return Wr.exports}var kd,dy;function Q3(){if(dy)return kd;dy=1;var t=function(e){return e!==e};return kd=function(n,o){return n===0&&o===0?1/n===1/o:!!(n===o||t(n)&&t(o))},kd}var xd,uy;function e8(){if(uy)return xd;uy=1;var t=Q3();return xd=function(){return typeof Object.is=="function"?Object.is:t},xd}var Md,hy;function oae(){if(hy)return Md;hy=1;var t=e8(),e=Go();return Md=function(){var o=t();return e(Object,{is:o},{is:function(){return Object.is!==o}}),o},Md}var Sd,fy;function rae(){if(fy)return Sd;fy=1;var t=Go(),e=Ur(),n=Q3(),o=e8(),r=oae(),i=e(o(),Object);return t(i,{getPolyfill:o,implementation:n,shim:r}),Sd=i,Sd}var wd,py;function t8(){if(py)return wd;py=1;var t=Ur(),e=bt(),n=Ln(),o=n("%ArrayBuffer%",!0),r=e("ArrayBuffer.prototype.byteLength",!0),i=e("Object.prototype.toString"),a=!!o&&!r&&new o(0).slice,c=!!a&&t(a);return wd=r||c?function(s){if(!s||typeof s!="object")return!1;try{return r?r(s):c(s,0),!0}catch{return!1}}:o?function(s){return i(s)==="[object ArrayBuffer]"}:function(s){return!1},wd}var Od,yy;function iae(){if(yy)return Od;yy=1;var t=bt(),e=t("Date.prototype.getDay"),n=function(c){try{return e(c),!0}catch{return!1}},o=t("Object.prototype.toString"),r="[object Date]",i=Ko()();return Od=function(c){return typeof c!="object"||c===null?!1:i?n(c):o(c)===r},Od}var Td,gy;function n8(){if(gy)return Td;gy=1;var t=bt(),e=Ko()(),n=r2(),o=Zo(),r;if(e){var i=t("RegExp.prototype.exec"),a={},c=function(){throw a},l={toString:c,valueOf:c};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=c),r=function(f){if(!f||typeof f!="object")return!1;var p=o(f,"lastIndex"),y=p&&n(p,"value");if(!y)return!1;try{i(f,l)}catch(_){return _===a}}}else{var s=t("Object.prototype.toString"),u="[object RegExp]";r=function(f){return!f||typeof f!="object"&&typeof f!="function"?!1:s(f)===u}}return Td=r,Td}var Dd,_y;function aae(){if(_y)return Dd;_y=1;var t=bt(),e=t("SharedArrayBuffer.prototype.byteLength",!0);return Dd=e?function(o){if(!o||typeof o!="object")return!1;try{return e(o),!0}catch{return!1}}:function(o){return!1},Dd}var Nd,my;function cae(){if(my)return Nd;my=1;var t=bt(),e=t("Number.prototype.toString"),n=function(c){try{return e(c),!0}catch{return!1}},o=t("Object.prototype.toString"),r="[object Number]",i=Ko()();return Nd=function(c){return typeof c=="number"?!0:!c||typeof c!="object"?!1:i?n(c):o(c)===r},Nd}var jd,by;function lae(){if(by)return jd;by=1;var t=bt(),e=t("Boolean.prototype.toString"),n=t("Object.prototype.toString"),o=function(c){try{return e(c),!0}catch{return!1}},r="[object Boolean]",i=Ko()();return jd=function(c){return typeof c=="boolean"?!0:c===null||typeof c!="object"?!1:i?o(c):n(c)===r},jd}var ta={exports:{}},Pd,vy;function sae(){if(vy)return Pd;vy=1;var t=bt(),e=n8(),n=t("RegExp.prototype.exec"),o=Jt();return Pd=function(i){if(!e(i))throw new o("`regex` must be a RegExp");return function(c){return n(i,c)!==null}},Pd}var ky;function dae(){if(ky)return ta.exports;ky=1;var t=bt(),e=t("Object.prototype.toString"),n=e2()(),o=sae();if(n){var r=t("Symbol.prototype.toString"),i=o(/^Symbol\(.*\)$/),a=function(l){return typeof l.valueOf()!="symbol"?!1:i(r(l))};ta.exports=function(l){if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||e(l)!=="[object Symbol]")return!1;try{return a(l)}catch{return!1}}}else ta.exports=function(l){return!1};return ta.exports}var na={exports:{}},Cd,xy;function uae(){if(xy)return Cd;xy=1;var t=typeof BigInt<"u"&&BigInt;return Cd=function(){return typeof t=="function"&&typeof BigInt=="function"&&typeof t(42)=="bigint"&&typeof BigInt(42)=="bigint"},Cd}var My;function hae(){if(My)return na.exports;My=1;var t=uae()();if(t){var e=BigInt.prototype.valueOf,n=function(r){try{return e.call(r),!0}catch{}return!1};na.exports=function(r){return r===null||typeof r>"u"||typeof r=="boolean"||typeof r=="string"||typeof r=="number"||typeof r=="symbol"||typeof r=="function"?!1:typeof r=="bigint"?!0:n(r)}}else na.exports=function(r){return!1};return na.exports}var zd,Sy;function fae(){if(Sy)return zd;Sy=1;var t=K3(),e=cae(),n=lae(),o=dae(),r=hae();return zd=function(a){if(a==null||typeof a!="object"&&typeof a!="function")return null;if(t(a))return"String";if(e(a))return"Number";if(n(a))return"Boolean";if(o(a))return"Symbol";if(r(a))return"BigInt"},zd}var Ad,wy;function pae(){if(wy)return Ad;wy=1;var t=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,e=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,n;t||(n=function(a){return!1});var o=t?t.prototype.has:null,r=e?e.prototype.has:null;return!n&&!o&&(n=function(a){return!1}),Ad=n||function(a){if(!a||typeof a!="object")return!1;try{if(o.call(a,o),r)try{r.call(a,r)}catch{return!0}return a instanceof t}catch{}return!1},Ad}var oa={exports:{}},Oy;function yae(){if(Oy)return oa.exports;Oy=1;var t=Ln(),e=bt(),n=t("%WeakSet%",!0),o=e("WeakSet.prototype.has",!0);if(o){var r=e("WeakMap.prototype.has",!0);oa.exports=function(a){if(!a||typeof a!="object")return!1;try{if(o(a,o),r)try{r(a,r)}catch{return!0}return a instanceof n}catch{}return!1}}else oa.exports=function(a){return!1};return oa.exports}var Ed,Ty;function gae(){if(Ty)return Ed;Ty=1;var t=J3(),e=Y3(),n=pae(),o=yae();return Ed=function(i){if(i&&typeof i=="object"){if(t(i))return"Map";if(e(i))return"Set";if(n(i))return"WeakMap";if(o(i))return"WeakSet"}return!1},Ed}var Ud,Dy;function _ae(){if(Dy)return Ud;Dy=1;var t=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,o;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw o}}),o={},e(function(){throw 42},null,n)}catch(b){b!==o&&(e=null)}else e=null;var r=/^\s*class\b/,i=function(v){try{var w=t.call(v);return r.test(w)}catch{return!1}},a=function(v){try{return i(v)?!1:(t.call(v),!0)}catch{return!1}},c=Object.prototype.toString,l="[object Object]",s="[object Function]",u="[object GeneratorFunction]",h="[object HTMLAllCollection]",f="[object HTML document.all class]",p="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),g=function(){return!1};if(typeof document=="object"){var m=document.all;c.call(m)===c.call(document.all)&&(g=function(v){if((_||!v)&&(typeof v>"u"||typeof v=="object"))try{var w=c.call(v);return(w===h||w===f||w===p||w===l)&&v("")==null}catch{}return!1})}return Ud=e?function(v){if(g(v))return!0;if(!v||typeof v!="function"&&typeof v!="object")return!1;try{e(v,null,n)}catch(w){if(w!==o)return!1}return!i(v)&&a(v)}:function(v){if(g(v))return!0;if(!v||typeof v!="function"&&typeof v!="object")return!1;if(y)return a(v);if(i(v))return!1;var w=c.call(v);return w!==s&&w!==u&&!/^\[object HTML/.test(w)?!1:a(v)},Ud}var qd,Ny;function mae(){if(Ny)return qd;Ny=1;var t=_ae(),e=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=function(l,s,u){for(var h=0,f=l.length;h<f;h++)n.call(l,h)&&(u==null?s(l[h],h,l):s.call(u,l[h],h,l))},r=function(l,s,u){for(var h=0,f=l.length;h<f;h++)u==null?s(l.charAt(h),h,l):s.call(u,l.charAt(h),h,l)},i=function(l,s,u){for(var h in l)n.call(l,h)&&(u==null?s(l[h],h,l):s.call(u,l[h],h,l))};function a(c){return e.call(c)==="[object Array]"}return qd=function(l,s,u){if(!t(s))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=u),a(l)?o(l,s,h):typeof l=="string"?r(l,s,h):i(l,s,h)},qd}var Fd,jy;function bae(){return jy||(jy=1,Fd=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Fd}var $d,Py;function vae(){if(Py)return $d;Py=1;var t=bae(),e=typeof globalThis>"u"?Zt:globalThis;return $d=function(){for(var o=[],r=0;r<t.length;r++)typeof e[t[r]]=="function"&&(o[o.length]=t[r]);return o},$d}var Rd,Cy;function kae(){if(Cy)return Rd;Cy=1;var t=mae(),e=vae(),n=Ur(),o=bt(),r=Zo(),i=o("Object.prototype.toString"),a=Ko()(),c=typeof globalThis>"u"?Zt:globalThis,l=e(),s=o("String.prototype.slice"),u=Object.getPrototypeOf,h=o("Array.prototype.indexOf",!0)||function(g,m){for(var b=0;b<g.length;b+=1)if(g[b]===m)return b;return-1},f={__proto__:null};a&&r&&u?t(l,function(_){var g=new c[_];if(Symbol.toStringTag in g){var m=u(g),b=r(m,Symbol.toStringTag);if(!b){var v=u(m);b=r(v,Symbol.toStringTag)}f["$"+_]=n(b.get)}}):t(l,function(_){var g=new c[_],m=g.slice||g.set;m&&(f["$"+_]=n(m))});var p=function(g){var m=!1;return t(f,function(b,v){if(!m)try{"$"+b(g)===v&&(m=s(v,1))}catch{}}),m},y=function(g){var m=!1;return t(f,function(b,v){if(!m)try{b(g),m=s(v,1)}catch{}}),m};return Rd=function(g){if(!g||typeof g!="object")return!1;if(!a){var m=s(i(g),8,-1);return h(l,m)>-1?m:m!=="Object"?!1:y(g)}return r?p(g):null},Rd}var Bd,zy;function xae(){if(zy)return Bd;zy=1;var t=bt(),e=t("ArrayBuffer.prototype.byteLength",!0),n=t8();return Bd=function(r){return n(r)?e?e(r):r.byteLength:NaN},Bd}var Ld,Ay;function Mae(){if(Ay)return Ld;Ay=1;var t=Wie(),e=I3(),n=Zie(),o=Ln(),r=nae(),i=Z3(),a=rae(),c=H3(),l=G3(),s=t8(),u=iae(),h=n8(),f=aae(),p=Gh(),y=fae(),_=gae(),g=kae(),m=xae(),b=e("SharedArrayBuffer.prototype.byteLength",!0),v=e("Date.prototype.getTime"),w=Object.getPrototypeOf,M=e("Object.prototype.toString"),O=o("%Set%",!0),D=e("Map.prototype.has",!0),j=e("Map.prototype.get",!0),T=e("Map.prototype.size",!0),A=e("Set.prototype.add",!0),R=e("Set.prototype.delete",!0),S=e("Set.prototype.has",!0),P=e("Set.prototype.size",!0);function k(Z,J,de,pe){for(var he=r(Z),_e;(_e=he.next())&&!_e.done;)if(B(J,_e.value,de,pe))return R(Z,_e.value),!0;return!1}function I(Z){if(typeof Z>"u")return null;if(typeof Z!="object")return typeof Z=="symbol"?!1:typeof Z=="string"||typeof Z=="number"?+Z==+Z:!0}function C(Z,J,de,pe,he,_e){var fe=I(de);if(fe!=null)return fe;var ge=j(J,fe),me=t({},he,{strict:!1});return typeof ge>"u"&&!D(J,fe)||!B(pe,ge,me,_e)?!1:!D(Z,fe)&&B(pe,ge,me,_e)}function q(Z,J,de){var pe=I(de);return pe??(S(J,pe)&&!S(Z,pe))}function K(Z,J,de,pe,he,_e){for(var fe=r(Z),ge,me;(ge=fe.next())&&!ge.done;)if(me=ge.value,B(de,me,he,_e)&&B(pe,j(J,me),he,_e))return R(Z,me),!0;return!1}function B(Z,J,de,pe){var he=de||{};if(he.strict?a(Z,J):Z===J)return!0;var _e=y(Z),fe=y(J);if(_e!==fe)return!1;if(!Z||!J||typeof Z!="object"&&typeof J!="object")return he.strict?a(Z,J):Z==J;var ge=pe.has(Z),me=pe.has(J),be;if(ge&&me){if(pe.get(Z)===pe.get(J))return!0}else be={};return ge||pe.set(Z,be),me||pe.set(J,be),ae(Z,J,he,pe)}function ne(Z){return!Z||typeof Z!="object"||typeof Z.length!="number"||typeof Z.copy!="function"||typeof Z.slice!="function"||Z.length>0&&typeof Z[0]!="number"?!1:!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function $(Z,J,de,pe){if(P(Z)!==P(J))return!1;for(var he=r(Z),_e=r(J),fe,ge,me;(fe=he.next())&&!fe.done;)if(fe.value&&typeof fe.value=="object")me||(me=new O),A(me,fe.value);else if(!S(J,fe.value)){if(de.strict||!q(Z,J,fe.value))return!1;me||(me=new O),A(me,fe.value)}if(me){for(;(ge=_e.next())&&!ge.done;)if(ge.value&&typeof ge.value=="object"){if(!k(me,ge.value,de.strict,pe))return!1}else if(!de.strict&&!S(Z,ge.value)&&!k(me,ge.value,de.strict,pe))return!1;return P(me)===0}return!0}function U(Z,J,de,pe){if(T(Z)!==T(J))return!1;for(var he=r(Z),_e=r(J),fe,ge,me,be,x,H;(fe=he.next())&&!fe.done;)if(be=fe.value[0],x=fe.value[1],be&&typeof be=="object")me||(me=new O),A(me,be);else if(H=j(J,be),typeof H>"u"&&!D(J,be)||!B(x,H,de,pe)){if(de.strict||!C(Z,J,be,x,de,pe))return!1;me||(me=new O),A(me,be)}if(me){for(;(ge=_e.next())&&!ge.done;)if(be=ge.value[0],H=ge.value[1],be&&typeof be=="object"){if(!K(me,Z,be,H,de,pe))return!1}else if(!de.strict&&(!Z.has(be)||!B(j(Z,be),H,de,pe))&&!K(me,Z,be,H,t({},de,{strict:!1}),pe))return!1;return P(me)===0}return!0}function ae(Z,J,de,pe){var he,_e;if(typeof Z!=typeof J||Z==null||J==null||M(Z)!==M(J)||c(Z)!==c(J))return!1;var fe=l(Z),ge=l(J);if(fe!==ge)return!1;var me=Z instanceof Error,be=J instanceof Error;if(me!==be||(me||be)&&(Z.name!==J.name||Z.message!==J.message))return!1;var x=h(Z),H=h(J);if(x!==H||(x||H)&&(Z.source!==J.source||n(Z)!==n(J)))return!1;var W=u(Z),F=u(J);if(W!==F||(W||F)&&v(Z)!==v(J)||de.strict&&w&&w(Z)!==w(J))return!1;var E=g(Z),V=g(J);if(E!==V)return!1;if(E||V){if(Z.length!==J.length)return!1;for(he=0;he<Z.length;he++)if(Z[he]!==J[he])return!1;return!0}var ie=ne(Z),oe=ne(J);if(ie!==oe)return!1;if(ie||oe){if(Z.length!==J.length)return!1;for(he=0;he<Z.length;he++)if(Z[he]!==J[he])return!1;return!0}var Y=s(Z),L=s(J);if(Y!==L)return!1;if(Y||L)return m(Z)!==m(J)?!1:typeof Uint8Array=="function"&&B(new Uint8Array(Z),new Uint8Array(J),de,pe);var G=f(Z),Q=f(J);if(G!==Q)return!1;if(G||Q)return b(Z)!==b(J)?!1:typeof Uint8Array=="function"&&B(new Uint8Array(Z),new Uint8Array(J),de,pe);if(typeof Z!=typeof J)return!1;var ce=p(Z),ke=p(J);if(ce.length!==ke.length)return!1;for(ce.sort(),ke.sort(),he=ce.length-1;he>=0;he--)if(ce[he]!=ke[he])return!1;for(he=ce.length-1;he>=0;he--)if(_e=ce[he],!B(Z[_e],J[_e],de,pe))return!1;var we=_(Z),De=_(J);return we!==De?!1:we==="Set"||De==="Set"?$(Z,J,de,pe):we==="Map"?U(Z,J,de,pe):!0}return Ld=function(J,de,pe){return B(J,de,pe,i())},Ld}var Sae=Mae();const wae=Zh(Sae);var It={},i2="1.13.7",Ey=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},rl=Array.prototype,a2=Object.prototype,Uy=typeof Symbol<"u"?Symbol.prototype:null,Oae=rl.push,Ri=rl.slice,Ni=a2.toString,Tae=a2.hasOwnProperty,o8=typeof ArrayBuffer<"u",Dae=typeof DataView<"u",Nae=Array.isArray,qy=Object.keys,Fy=Object.create,$y=o8&&ArrayBuffer.isView,jae=isNaN,Pae=isFinite,r8=!{toString:null}.propertyIsEnumerable("toString"),Ry=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Cae=Math.pow(2,53)-1;function wt(t,e){return e=e==null?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),o=Array(n),r=0;r<n;r++)o[r]=arguments[r+e];switch(e){case 0:return t.call(this,o);case 1:return t.call(this,arguments[0],o);case 2:return t.call(this,arguments[0],arguments[1],o)}var i=Array(e+1);for(r=0;r<e;r++)i[r]=arguments[r];return i[e]=o,t.apply(this,i)}}function mo(t){var e=typeof t;return e==="function"||e==="object"&&!!t}function i8(t){return t===null}function c2(t){return t===void 0}function l2(t){return t===!0||t===!1||Ni.call(t)==="[object Boolean]"}function a8(t){return!!(t&&t.nodeType===1)}function vt(t){var e="[object "+t+"]";return function(n){return Ni.call(n)===e}}const il=vt("String"),s2=vt("Number"),c8=vt("Date"),l8=vt("RegExp"),s8=vt("Error"),d2=vt("Symbol"),u2=vt("ArrayBuffer");var d8=vt("Function"),zae=Ey.document&&Ey.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof zae!="function"&&(d8=function(t){return typeof t=="function"||!1});const _t=d8,u8=vt("Object");var h8=Dae&&(!/\[native code\]/.test(String(DataView))||u8(new DataView(new ArrayBuffer(8)))),h2=typeof Map<"u"&&u8(new Map),Aae=vt("DataView");function Eae(t){return t!=null&&_t(t.getInt8)&&u2(t.buffer)}const ji=h8?Eae:Aae,bo=Nae||vt("Array");function vo(t,e){return t!=null&&Tae.call(t,e)}var Hu=vt("Arguments");(function(){Hu(arguments)||(Hu=function(t){return vo(t,"callee")})})();const al=Hu;function f8(t){return!d2(t)&&Pae(t)&&!isNaN(parseFloat(t))}function f2(t){return s2(t)&&jae(t)}function p2(t){return function(){return t}}function p8(t){return function(e){var n=t(e);return typeof n=="number"&&n>=0&&n<=Cae}}function y8(t){return function(e){return e==null?void 0:e[t]}}const qc=y8("byteLength"),Uae=p8(qc);var qae=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Fae(t){return $y?$y(t)&&!ji(t):Uae(t)&&qae.test(Ni.call(t))}const y2=o8?Fae:p2(!1),jt=y8("length");function $ae(t){for(var e={},n=t.length,o=0;o<n;++o)e[t[o]]=!0;return{contains:function(r){return e[r]===!0},push:function(r){return e[r]=!0,t.push(r)}}}function g8(t,e){e=$ae(e);var n=Ry.length,o=t.constructor,r=_t(o)&&o.prototype||a2,i="constructor";for(vo(t,i)&&!e.contains(i)&&e.push(i);n--;)i=Ry[n],i in t&&t[i]!==r[i]&&!e.contains(i)&&e.push(i)}function rt(t){if(!mo(t))return[];if(qy)return qy(t);var e=[];for(var n in t)vo(t,n)&&e.push(n);return r8&&g8(t,e),e}function _8(t){if(t==null)return!0;var e=jt(t);return typeof e=="number"&&(bo(t)||il(t)||al(t))?e===0:jt(rt(t))===0}function g2(t,e){var n=rt(e),o=n.length;if(t==null)return!o;for(var r=Object(t),i=0;i<o;i++){var a=n[i];if(e[a]!==r[a]||!(a in r))return!1}return!0}function We(t){if(t instanceof We)return t;if(!(this instanceof We))return new We(t);this._wrapped=t}We.VERSION=i2;We.prototype.value=function(){return this._wrapped};We.prototype.valueOf=We.prototype.toJSON=We.prototype.value;We.prototype.toString=function(){return String(this._wrapped)};function By(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,qc(t))}var Ly="[object DataView]";function Xu(t,e,n,o){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var r=typeof t;return r!=="function"&&r!=="object"&&typeof e!="object"?!1:m8(t,e,n,o)}function m8(t,e,n,o){t instanceof We&&(t=t._wrapped),e instanceof We&&(e=e._wrapped);var r=Ni.call(t);if(r!==Ni.call(e))return!1;if(h8&&r=="[object Object]"&&ji(t)){if(!ji(e))return!1;r=Ly}switch(r){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return Uy.valueOf.call(t)===Uy.valueOf.call(e);case"[object ArrayBuffer]":case Ly:return m8(By(t),By(e),n,o)}var i=r==="[object Array]";if(!i&&y2(t)){var a=qc(t);if(a!==qc(e))return!1;if(t.buffer===e.buffer&&t.byteOffset===e.byteOffset)return!0;i=!0}if(!i){if(typeof t!="object"||typeof e!="object")return!1;var c=t.constructor,l=e.constructor;if(c!==l&&!(_t(c)&&c instanceof c&&_t(l)&&l instanceof l)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],o=o||[];for(var s=n.length;s--;)if(n[s]===t)return o[s]===e;if(n.push(t),o.push(e),i){if(s=t.length,s!==e.length)return!1;for(;s--;)if(!Xu(t[s],e[s],n,o))return!1}else{var u=rt(t),h;if(s=u.length,rt(e).length!==s)return!1;for(;s--;)if(h=u[s],!(vo(e,h)&&Xu(t[h],e[h],n,o)))return!1}return n.pop(),o.pop(),!0}function b8(t,e){return Xu(t,e)}function qr(t){if(!mo(t))return[];var e=[];for(var n in t)e.push(n);return r8&&g8(t,e),e}function _2(t){var e=jt(t);return function(n){if(n==null)return!1;var o=qr(n);if(jt(o))return!1;for(var r=0;r<e;r++)if(!_t(n[t[r]]))return!1;return t!==x8||!_t(n[m2])}}var m2="forEach",v8="has",b2=["clear","delete"],k8=["get",v8,"set"],Rae=b2.concat(m2,k8),x8=b2.concat(k8),Bae=["add"].concat(b2,m2,v8);const M8=h2?_2(Rae):vt("Map"),S8=h2?_2(x8):vt("WeakMap"),w8=h2?_2(Bae):vt("Set"),O8=vt("WeakSet");function Jo(t){for(var e=rt(t),n=e.length,o=Array(n),r=0;r<n;r++)o[r]=t[e[r]];return o}function T8(t){for(var e=rt(t),n=e.length,o=Array(n),r=0;r<n;r++)o[r]=[e[r],t[e[r]]];return o}function v2(t){for(var e={},n=rt(t),o=0,r=n.length;o<r;o++)e[t[n[o]]]=n[o];return e}function Pi(t){var e=[];for(var n in t)_t(t[n])&&e.push(n);return e.sort()}function k2(t,e){return function(n){var o=arguments.length;if(e&&(n=Object(n)),o<2||n==null)return n;for(var r=1;r<o;r++)for(var i=arguments[r],a=t(i),c=a.length,l=0;l<c;l++){var s=a[l];(!e||n[s]===void 0)&&(n[s]=i[s])}return n}}const x2=k2(qr),Nr=k2(rt),M2=k2(qr,!0);function Lae(){return function(){}}function D8(t){if(!mo(t))return{};if(Fy)return Fy(t);var e=Lae();e.prototype=t;var n=new e;return e.prototype=null,n}function N8(t,e){var n=D8(t);return e&&Nr(n,e),n}function j8(t){return mo(t)?bo(t)?t.slice():x2({},t):t}function P8(t,e){return e(t),t}function S2(t){return bo(t)?t:[t]}We.toPath=S2;function Bi(t){return We.toPath(t)}function w2(t,e){for(var n=e.length,o=0;o<n;o++){if(t==null)return;t=t[e[o]]}return n?t:void 0}function O2(t,e,n){var o=w2(t,Bi(e));return c2(o)?n:o}function C8(t,e){e=Bi(e);for(var n=e.length,o=0;o<n;o++){var r=e[o];if(!vo(t,r))return!1;t=t[r]}return!!n}function cl(t){return t}function Io(t){return t=Nr({},t),function(e){return g2(e,t)}}function ll(t){return t=Bi(t),function(e){return w2(e,t)}}function Li(t,e,n){if(e===void 0)return t;switch(n??3){case 1:return function(o){return t.call(e,o)};case 3:return function(o,r,i){return t.call(e,o,r,i)};case 4:return function(o,r,i,a){return t.call(e,o,r,i,a)}}return function(){return t.apply(e,arguments)}}function z8(t,e,n){return t==null?cl:_t(t)?Li(t,e,n):mo(t)&&!bo(t)?Io(t):ll(t)}function sl(t,e){return z8(t,e,1/0)}We.iteratee=sl;function Pt(t,e,n){return We.iteratee!==sl?We.iteratee(t,e):z8(t,e,n)}function A8(t,e,n){e=Pt(e,n);for(var o=rt(t),r=o.length,i={},a=0;a<r;a++){var c=o[a];i[c]=e(t[c],c,t)}return i}function T2(){}function E8(t){return t==null?T2:function(e){return O2(t,e)}}function U8(t,e,n){var o=Array(Math.max(0,t));e=Li(e,n,1);for(var r=0;r<t;r++)o[r]=e(r);return o}function Fc(t,e){return e==null&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}const jr=Date.now||function(){return new Date().getTime()};function q8(t){var e=function(i){return t[i]},n="(?:"+rt(t).join("|")+")",o=RegExp(n),r=RegExp(n,"g");return function(i){return i=i==null?"":""+i,o.test(i)?i.replace(r,e):i}}const F8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},$8=q8(F8),Iae=v2(F8),R8=q8(Iae),B8=We.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Id=/(.)^/,Wae={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Vae=/\\|'|\r|\n|\u2028|\u2029/g;function Hae(t){return"\\"+Wae[t]}var Xae=/^\s*(\w|\$)+\s*$/;function L8(t,e,n){!e&&n&&(e=n),e=M2({},e,We.templateSettings);var o=RegExp([(e.escape||Id).source,(e.interpolate||Id).source,(e.evaluate||Id).source].join("|")+"|$","g"),r=0,i="__p+='";t.replace(o,function(s,u,h,f,p){return i+=t.slice(r,p).replace(Vae,Hae),r=p+s.length,u?i+=`'+
@@ -8111,4 +8111,4 @@ Character number: `+e.characterNumber},t.prototype.lineNumber=function(){return
8111
8111
  *
8112
8112
  * This source code is licensed under the ISC license.
8113
8113
  * See the LICENSE file in the root directory of this source tree.
8114
- */const eG=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],rnt=d("zoom-out",eG),int=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:eG,default:rnt},Symbol.toStringTag,{value:"Module"}));exports.AllSelection=qt;exports.CellSelection=Ke;exports.DOMParser=Mr;exports.DOMSerializer=Wo;exports.Decoration=yt;exports.DecorationSet=Je;exports.DynamicIcon=Roe;exports.EditorState=pr;exports.EditorView=jJ;exports.Fragment=ye;exports.Node=rn;exports.NodeRange=_i;exports.NodeSelection=Ne;exports.Plugin=Vo;exports.PluginKey=zr;exports.ReplaceAroundStep=ct;exports.ReplaceStep=at;exports.Schema=vG;exports.Selection=Ce;exports.SelectionRange=sh;exports.Slice=Se;exports.TextSelection=qe;exports.Transform=lh;exports.Tweet=H1e;exports.VisibilitySensor=Kle;exports.addColumnAfter=Rre;exports.addColumnBefore=$re;exports.addRowAfter=Vre;exports.addRowBefore=Wre;exports.canJoin=Cr;exports.canSplit=gr;exports.clamp=ite;exports.clsx=yn;exports.columnResizing=fie;exports.createParagraphNear=bk;exports.cva=Eoe;exports.d=zoe;exports.debounce=Gk;exports.deepEqual=wae;exports.deleteColumn=Lre;exports.deleteRow=Xre;exports.deleteSelection=kh;exports.deleteTable=oie;exports.differenceBy=bne;exports.dropCursor=yre;exports.exitCode=VJ;exports.find=ire;exports.findWrapping=ah;exports.fixTables=N3;exports.gapCursor=bre;exports.goToNextCell=nie;exports.history=pre;exports.i=tse;exports.isNumber=kne;exports.joinBackward=hk;exports.joinDown=IJ;exports.joinForward=gk;exports.joinPoint=ch;exports.joinTextblockBackward=RJ;exports.joinTextblockForward=BJ;exports.joinUp=LJ;exports.keymap=$J;exports.lift=WJ;exports.liftEmptyBlock=vk;exports.liftListItem=oY;exports.liftTarget=Pr;exports.mammoth=Hle;exports.mergeCells=Gre;exports.newlineInCode=mk;exports.redo=S3;exports.registerCustomProtocol=ore;exports.reset=nre;exports.selectNodeBackward=pk;exports.selectNodeForward=_k;exports.selectParentNode=ZJ;exports.selectTextblockEnd=JJ;exports.selectTextblockStart=KJ;exports.setBlockType=QJ;exports.setCellAttr=Yre;exports.sinkListItem=aY;exports.splitCell=Kre;exports.tableEditing=Mie;exports.throttle=Rne;exports.toggleHeader=el;exports.toggleHeaderCell=eie;exports.tokenize=Vh;exports.truncate=Wne;exports.twMerge=xoe;exports.undo=M3;exports.wrapIn=YJ;exports.wrapInList=eY;exports.x=Aoe;
8114
+ */const eG=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],rnt=d("zoom-out",eG),int=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:eG,default:rnt},Symbol.toStringTag,{value:"Module"}));exports.AllSelection=qt;exports.CellSelection=Ke;exports.DOMParser=Mr;exports.DOMSerializer=Wo;exports.Decoration=yt;exports.DecorationSet=Je;exports.DynamicIcon=Roe;exports.EditorState=pr;exports.EditorView=jJ;exports.Fragment=ye;exports.Node=rn;exports.NodeRange=_i;exports.NodeSelection=Ne;exports.Plugin=Vo;exports.PluginKey=zr;exports.ReplaceAroundStep=ct;exports.ReplaceStep=at;exports.Schema=vG;exports.Selection=Ce;exports.SelectionRange=sh;exports.Slice=Se;exports.TableMap=Ye;exports.TextSelection=qe;exports.Transform=lh;exports.Tweet=H1e;exports.VisibilitySensor=Kle;exports.addColumnAfter=Rre;exports.addColumnBefore=$re;exports.addRowAfter=Vre;exports.addRowBefore=Wre;exports.canJoin=Cr;exports.canSplit=gr;exports.clamp=ite;exports.clsx=yn;exports.columnResizing=fie;exports.createParagraphNear=bk;exports.cva=Eoe;exports.d=zoe;exports.debounce=Gk;exports.deepEqual=wae;exports.deleteColumn=Lre;exports.deleteRow=Xre;exports.deleteSelection=kh;exports.deleteTable=oie;exports.differenceBy=bne;exports.dropCursor=yre;exports.exitCode=VJ;exports.find=ire;exports.findWrapping=ah;exports.fixTables=N3;exports.gapCursor=bre;exports.goToNextCell=nie;exports.history=pre;exports.i=tse;exports.isNumber=kne;exports.joinBackward=hk;exports.joinDown=IJ;exports.joinForward=gk;exports.joinPoint=ch;exports.joinTextblockBackward=RJ;exports.joinTextblockForward=BJ;exports.joinUp=LJ;exports.keymap=$J;exports.lift=WJ;exports.liftEmptyBlock=vk;exports.liftListItem=oY;exports.liftTarget=Pr;exports.mammoth=Hle;exports.mergeCells=Gre;exports.newlineInCode=mk;exports.redo=S3;exports.registerCustomProtocol=ore;exports.reset=nre;exports.selectNodeBackward=pk;exports.selectNodeForward=_k;exports.selectParentNode=ZJ;exports.selectTextblockEnd=JJ;exports.selectTextblockStart=KJ;exports.setBlockType=QJ;exports.setCellAttr=Yre;exports.sinkListItem=aY;exports.splitCell=Kre;exports.tableEditing=Mie;exports.throttle=Rne;exports.toggleHeader=el;exports.toggleHeaderCell=eie;exports.tokenize=Vh;exports.truncate=Wne;exports.twMerge=xoe;exports.undo=M3;exports.wrapIn=YJ;exports.wrapInList=eY;exports.x=Aoe;