(e)
| 30 | `:`; |
| 31 | `)+pe+`return __p |
| 32 | }`;var Je=b(function(){return ot(R,$e+"return "+pe).apply(t,E)});if(Je.source=pe,an(Je))throw Je;return Je}function rO(c){return pt(c).toLowerCase()}function Pf(c){return pt(c).toUpperCase()}function Nm(c,d,y){if(c=pt(c),c&&(y||d===t))return Np(c);if(!c||!(d=Kn(d)))return c;var x=Ci(c),T=Ci(d),R=ha(x,T),E=da(x,T)+1;return xl(x,R,E).join("")}function W1(c,d,y){if(c=pt(c),c&&(y||d===t))return c.slice(0,qh(c)+1);if(!c||!(d=Kn(d)))return c;var x=Ci(c),T=da(x,Ci(d))+1;return xl(x,0,T).join("")}function _f(c,d,y){if(c=pt(c),c&&(y||d===t))return c.replace(ol,"");if(!c||!(d=Kn(d)))return c;var x=Ci(c),T=ha(x,Ci(d));return xl(x,T).join("")}function l(c,d){var y=de,x=ae;if(Bt(d)){var T="separator"in d?d.separator:T;y="length"in d?Ue(d.length):y,x="omission"in d?Kn(d.omission):x}c=pt(c);var R=c.length;if(dl(c)){var E=Ci(c);R=E.length}if(y>=R)return c;var B=y-gr(x);if(B<1)return x;var W=E?xl(E,0,B).join(""):c.slice(0,B);if(T===t)return W+x;if(E&&(B+=W.length-B),gf(T)){if(c.slice(B).search(T)){var ce,he=W;for(T.global||(T=yc(T.source,pt(ea.exec(T))+"g")),T.lastIndex=0;ce=T.exec(he);)var pe=ce.index;W=W.slice(0,pe===t?B:pe)}}else if(c.indexOf(Kn(T),B)!=B){var Qe=W.lastIndexOf(T);Qe>-1&&(W=W.slice(0,Qe))}return W+x}function a(c){return c=pt(c),c&&Ly.test(c)?c.replace(Hu,Ip):c}var u=En(function(c,d,y){return c+(y?" ":"")+d.toUpperCase()}),O=mi("toUpperCase");function m(c,d,y){return c=pt(c),d=y?t:d,d===t?Wp(c)?l1(c):e1(c):c.match(d)||[]}var b=je(function(c,d){try{return Un(c,t,d)}catch(y){return an(y)?y:new Ye(y)}}),w=At(function(c,d){return _i(d,function(y){y=mt(y),Ki(c,y,$l(c[y],c))}),c});function _(c){var d=c==null?0:c.length,y=Ze();return c=d?Zt(c,function(x){if(typeof x[1]!="function")throw new Oi(o);return[y(x[0]),x[1]]}):[],je(function(x){for(var T=-1;++T<d;){var R=c[T];if(Un(R[0],this,x))return Un(R[1],this,x)}})}function Z(c){return cg(wn(c,S))}function H(c){return function(){return c}}function le(c,d){return c==null||c!==c?d:c}var fe=Sr(),F=Sr(!0);function K(c){return c}function ze(c){return nd(typeof c=="function"?c:wn(c,S))}function qe(c){return rd(wn(c,S))}function kt(c,d){return Ec(c,wn(d,S))}var G=je(function(c,d){return function(y){return vs(y,c,d)}}),L=je(function(c,d){return function(y){return vs(c,y,d)}});function j(c,d,y){var x=on(d),T=vl(d,x);y==null&&!(Bt(d)&&(T.length||!x.length))&&(y=d,d=c,c=this,T=vl(d,on(d)));var R=!(Bt(y)&&"chain"in y)||!!y.chain,E=tr(c);return _i(T,function(B){var W=d[B];c[B]=W,E&&(c.prototype[B]=function(){var ce=this.__chain__;if(R||ce){var he=c(this.__wrapped__),pe=he.__actions__=rn(this.__actions__);return pe.push({func:W,args:arguments,thisArg:c}),he.__chain__=ce,he}return W.apply(c,Xr([this.value()],arguments))})}),c}function se(){return It._===this&&(It._=ga),this}function Pe(){}function Fe(c){return c=Ue(c),je(function(d){return ld(d,c)})}var Me=Jo(Zt),Be=Jo(Bp),yn=Jo(Eh);function ct(c){return Kc(c)?fc(mt(c)):gg(c)}function ql(c){return function(d){return c==null?t:Xi(c,d)}}var j1=Ql(),IC=Ql(!0);function H1(){return[]}function I1(){return!1}function KC(){return{}}function FC(){return""}function JC(){return!0}function eR(c,d){if(c=Ue(c),c<1||c>ge)return[];var y=ie,x=Dt(c,ie);d=Ze(d),c-=ie;for(var T=hl(x,d);++y<c;)d(y);return T}function tR(c){return Ne(c)?Zt(c,mt):Zn(c)?[c]:rn(xr(pt(c)))}function nR(c){var d=++ji;return pt(c)+d}var iR=Pa(function(c,d){return c+d},0),rR=Nc("ceil"),lR=Pa(function(c,d){return c/d},1),sR=Nc("floor");function aR(c){return c&&c.length?Ji(c,K,zo):t}function oR(c,d){return c&&c.length?Ji(c,Ze(d,2),zo):t}function uR(c){return Lp(c,K)}function cR(c,d){return Lp(c,Ze(d,2))}function fR(c){return c&&c.length?Ji(c,K,Mc):t}function hR(c,d){return c&&c.length?Ji(c,Ze(d,2),Mc):t}var dR=Pa(function(c,d){return c*d},1),OR=Nc("round"),pR=Pa(function(c,d){return c-d},0);function gR(c){return c&&c.length?dc(c,K):0}function mR(c,d){return c&&c.length?dc(c,Ze(d,2)):0}return P.after=b1,P.ary=Om,P.assign=A1,P.assignIn=Rm,P.assignInWith=yf,P.assignWith=$1,P.at=M1,P.before=Ou,P.bind=$l,P.bindAll=w,P.bindKey=uf,P.castArray=w1,P.chain=za,P.chunk=d1,P.compact=Yg,P.concat=Lg,P.cond=_,P.conforms=Z,P.constant=H,P.countBy=Ba,P.create=E1,P.curry=pu,P.curryRight=cf,P.debounce=Ml,P.defaults=X1,P.defaultsDeep=Am,P.defer=wr,P.delay=gu,P.difference=zt,P.differenceBy=Jn,P.differenceWith=Wr,P.drop=Vg,P.dropRight=Ng,P.dropRightWhile=O1,P.dropWhile=wd,P.fill=yi,P.filter=nm,P.flatMap=qd,P.flatMapDeep=m1,P.flatMapDepth=y1,P.flatten=ei,P.flattenDeep=Ug,P.flattenDepth=Tl,P.flip=v1,P.flow=fe,P.flowRight=F,P.fromPairs=Cs,P.functions=Mm,P.functionsIn=Sf,P.groupBy=lm,P.initial=Pd,P.intersection=Qr,P.intersectionBy=Gg,P.intersectionWith=Aa,P.invert=Em,P.invertBy=Xm,P.invokeMap=sf,P.iteratee=ze,P.keyBy=sm,P.keys=on,P.keysIn=mn,P.map=du,P.mapKeys=q1,P.mapValues=z1,P.matches=qe,P.matchesProperty=kt,P.memoize=mu,P.merge=B1,P.mergeWith=wu,P.method=G,P.methodOf=L,P.mixin=j,P.negate=yu,P.nthArg=Fe,P.omit=bf,P.omitBy=Kd,P.once=pm,P.orderBy=am,P.over=Me,P.overArgs=gm,P.overEvery=Be,P.overSome=yn,P.partial=Yd,P.partialRight=ff,P.partition=om,P.pick=Y1,P.pickBy=Wa,P.property=ct,P.propertyOf=ql,P.pull=jg,P.pullAll=Ma,P.pullAllBy=Hg,P.pullAllWith=rf,P.pullAt=Ig,P.range=j1,P.rangeRight=IC,P.rearg=mm,P.reject=af,P.remove=p1,P.rest=ym,P.reverse=_d,P.sampleSize=hm,P.set=Zm,P.setWith=Dm,P.shuffle=_t,P.slice=vt,P.sortBy=dm,P.sortedUniq=Ea,P.sortedUniqBy=Cd,P.split=kf,P.spread=x1,P.tail=Hr,P.take=Wt,P.takeRight=_l,P.takeRightWhile=Rs,P.takeWhile=Rd,P.tap=Xd,P.throttle=Ld,P.thru=Pn,P.toArray=vi,P.toPairs=Fd,P.toPairsIn=Jd,P.toPath=tR,P.toPlainObject=Cm,P.transform=eO,P.unary=Vd,P.union=qi,P.unionBy=Xa,P.unionWith=fu,P.uniq=ti,P.uniqBy=Ad,P.uniqWith=$d,P.unset=qm,P.unzip=Za,P.unzipWith=hu,P.update=vf,P.updateWith=V1,P.values=ja,P.valuesIn=tO,P.without=Cl,P.words=m,P.wrap=Q1,P.xor=xn,P.xorBy=Rl,P.xorWith=Da,P.zip=qa,P.zipObject=Md,P.zipObjectDeep=Ed,P.zipWith=Kg,P.entries=Fd,P.entriesIn=Jd,P.extend=Rm,P.extendWith=yf,j(P,P),P.add=iR,P.attempt=b,P.camelCase=zm,P.capitalize=Qf,P.ceil=rR,P.clamp=nO,P.clone=Su,P.cloneDeep=Sm,P.cloneDeepWith=nt,P.cloneWith=k1,P.conformsTo=Nd,P.deburr=Kr,P.defaultTo=le,P.divide=lR,P.endsWith=Xl,P.eq=ni,P.escape=Zl,P.escapeRegExp=ku,P.every=tm,P.find=im,P.findIndex=Di,P.findKey=Na,P.findLast=Dd,P.findLastIndex=kd,P.findLastKey=vu,P.floor=sR,P.forEach=rm,P.forEachRight=zd,P.forIn=$m,P.forInRight=Z1,P.forOwn=Ua,P.forOwnRight=xu,P.get=Qu,P.gt=Ud,P.gte=bm,P.has=Id,P.hasIn=Ga,P.head=jr,P.identity=K,P.includes=Ya,P.indexOf=Td,P.inRange=xf,P.invoke=D1,P.isArguments=Ir,P.isArray=Ne,P.isArrayBuffer=hf,P.isArrayLike=sn,P.isArrayLikeObject=jt,P.isBoolean=T1,P.isBuffer=El,P.isDate=vm,P.isElement=xm,P.isEmpty=df,P.isEqual=wt,P.isEqualWith=Gd,P.isError=an,P.isFinite=P1,P.isFunction=tr,P.isInteger=Of,P.isLength=As,P.isMap=pf,P.isMatch=Wd,P.isMatchWith=_1,P.isNaN=Qm,P.isNative=C1,P.isNil=R1,P.isNull=wm,P.isNumber=km,P.isObject=Bt,P.isObjectLike=Lt,P.isPlainObject=zi,P.isRegExp=gf,P.isSafeInteger=jd,P.isSet=Tm,P.isString=mf,P.isSymbol=Zn,P.isTypedArray=La,P.isUndefined=nr,P.isWeakMap=Hd,P.isWeakSet=Pm,P.join=cu,P.kebabCase=Tu,P.last=Tn,P.lastIndexOf=$a,P.lowerCase=Dl,P.lowerFirst=N1,P.lt=_m,P.lte=bu,P.max=aR,P.maxBy=oR,P.mean=uR,P.meanBy=cR,P.min=fR,P.minBy=hR,P.stubArray=H1,P.stubFalse=I1,P.stubObject=KC,P.stubString=FC,P.stubTrue=JC,P.multiply=dR,P.nth=Wg,P.noConflict=se,P.noop=Pe,P.now=of,P.pad=Bm,P.padEnd=Pu,P.padStart=U1,P.parseInt=Ym,P.random=iO,P.reduce=um,P.reduceRight=cm,P.repeat=wf,P.replace=Lm,P.result=L1,P.round=OR,P.runInContext=U,P.sample=fm,P.size=Bd,P.snakeCase=G1,P.some=S1,P.sortedIndex=Ct,P.sortedIndexBy=tt,P.sortedIndexOf=at,P.sortedLastIndex=xt,P.sortedLastIndexBy=Si,P.sortedLastIndexOf=Pl,P.startCase=Tf,P.startsWith=Vm,P.subtract=pR,P.sum=gR,P.sumBy=mR,P.template=_u,P.times=eR,P.toFinite=kr,P.toInteger=Ue,P.toLength=Tr,P.toLower=rO,P.toNumber=Bi,P.toSafeInteger=Va,P.toString=pt,P.toUpper=Pf,P.trim=Nm,P.trimEnd=W1,P.trimStart=_f,P.truncate=l,P.unescape=a,P.uniqueId=nR,P.upperCase=u,P.upperFirst=O,P.each=rm,P.eachRight=zd,P.first=jr,j(P,function(){var c={};return kn(P,function(d,y){Ot.call(P.prototype,y)||(c[y]=d)}),c}(),{chain:!1}),P.VERSION=i,_i(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){P[c].placeholder=P}),_i(["drop","take"],function(c,d){Ke.prototype[c]=function(y){y=y===t?1:Rt(Ue(y),0);var x=this.__filtered__&&!d?new Ke(this):this.clone();return x.__filtered__?x.__takeCount__=Dt(y,x.__takeCount__):x.__views__.push({size:Dt(y,ie),type:c+(x.__dir__<0?"Right":"")}),x},Ke.prototype[c+"Right"]=function(y){return this.reverse()[c](y).reverse()}}),_i(["filter","map","takeWhile"],function(c,d){var y=d+1,x=y==ye||y==I;Ke.prototype[c]=function(T){var R=this.clone();return R.__iteratees__.push({iteratee:Ze(T,3),type:y}),R.__filtered__=R.__filtered__||x,R}}),_i(["head","last"],function(c,d){var y="take"+(d?"Right":"");Ke.prototype[c]=function(){return this[y](1).value()[0]}}),_i(["initial","tail"],function(c,d){var y="drop"+(d?"":"Right");Ke.prototype[c]=function(){return this.__filtered__?new Ke(this):this[y](1)}}),Ke.prototype.compact=function(){return this.filter(K)},Ke.prototype.find=function(c){return this.filter(c).head()},Ke.prototype.findLast=function(c){return this.reverse().find(c)},Ke.prototype.invokeMap=je(function(c,d){return typeof c=="function"?new Ke(this):this.map(function(y){return vs(y,c,d)})}),Ke.prototype.reject=function(c){return this.filter(yu(Ze(c)))},Ke.prototype.slice=function(c,d){c=Ue(c);var y=this;return y.__filtered__&&(c>0||d<0)?new Ke(y):(c<0?y=y.takeRight(-c):c&&(y=y.drop(c)),d!==t&&(d=Ue(d),y=d<0?y.dropRight(-d):y.take(d-c)),y)},Ke.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ke.prototype.toArray=function(){return this.take(ie)},kn(Ke.prototype,function(c,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),x=/^(?:head|last)$/.test(d),T=P[x?"take"+(d=="last"?"Right":""):d],R=x||/^find/.test(d);T&&(P.prototype[d]=function(){var E=this.__wrapped__,B=x?[1]:arguments,W=E instanceof Ke,ce=B[0],he=W||Ne(E),pe=function(st){var ft=T.apply(P,Xr([st],B));return x&&Qe?ft[0]:ft};he&&y&&typeof ce=="function"&&ce.length!=1&&(W=he=!1);var Qe=this.__chain__,$e=!!this.__actions__.length,Le=R&&!Qe,Je=W&&!$e;if(!R&&he){E=Je?E:new Ke(this);var Ve=c.apply(E,B);return Ve.__actions__.push({func:Pn,args:[pe],thisArg:t}),new jn(Ve,Qe)}return Le&&Je?c.apply(this,B):(Ve=this.thru(pe),Le?x?Ve.value()[0]:Ve.value():Ve)})}),_i(["pop","push","shift","sort","splice","unshift"],function(c){var d=Sc[c],y=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",x=/^(?:pop|shift)$/.test(c);P.prototype[c]=function(){var T=arguments;if(x&&!this.__chain__){var R=this.value();return d.apply(Ne(R)?R:[],T)}return this[y](function(E){return d.apply(Ne(E)?E:[],T)})}}),kn(Ke.prototype,function(c,d){var y=P[d];if(y){var x=y.name+"";Ot.call(Mi,x)||(Mi[x]=[]),Mi[x].push({name:d,func:y})}}),Mi[Gt(t,$).name]=[{name:"wrapper",func:t}],Ke.prototype.clone=Eo,Ke.prototype.reverse=Qc,Ke.prototype.value=gs,P.prototype.at=Fg,P.prototype.chain=bi,P.prototype.commit=Jg,P.prototype.next=em,P.prototype.plant=Al,P.prototype.reverse=lf,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=Zd,P.prototype.first=P.prototype.head,hs&&(P.prototype[hs]=g1),P},pl=Oa();fl?((fl.exports=pl)._=pl,oa._=pl):It._=pl}).call(A$)}(mO,mO.exports)),mO.exports}var IB=$$(),cS={exports:{}},fS={};var pQ;function M$(){if(pQ)return fS;pQ=1;var n=tp().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return fS.c=function(e){return n.H.useMemoCache(e)},fS}var gQ;function E$(){return gQ||(gQ=1,cS.exports=M$()),cS.exports}var KB=E$(),hS={exports:{}};var mQ;function X$(){return mQ||(mQ=1,function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",o=0;o<arguments.length;o++){var f=arguments[o];f&&(s=r(s,i(f)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var f in s)e.call(s,f)&&s[f]&&(o=r(o,f));return o}function r(s,o){return o?s?s+" "+o:s+o:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()}(hS)),hS.exports}var Z$=X$();const FB=Xv(Z$);function _b(){return _b=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},_b.apply(null,arguments)}function D$(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let Cb=[],GT=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?GT:Cb).push(t=t+n[e])})();function q$(n){if(n<768)return!1;for(let e=0,t=Cb.length;;){let i=e+t>>1;if(n<Cb[i])t=i;else if(n>=GT[i])e=i+1;else return!0;if(e==t)return!1}}function yQ(n){return n>=127462&&n<=127487}const SQ=8205;function z$(n,e,t=!0,i=!0){return(t?WT:B$)(n,e,i)}function WT(n,e,t){if(e==n.length)return e;e&&jT(n.charCodeAt(e))&&HT(n.charCodeAt(e-1))&&e--;let i=dS(n,e);for(e+=bQ(i);e<n.length;){let r=dS(n,e);if(i==SQ||r==SQ||t&&q$(r))e+=bQ(r),i=r;else if(yQ(r)){let s=0,o=e-2;for(;o>=0&&yQ(dS(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function B$(n,e,t){for(;e>0;){let i=WT(n,e-2,t);if(i<e)return i;e--}return 0}function dS(n,e){let t=n.charCodeAt(e);if(!HT(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return jT(i)?(t-55296<<10)+(i-56320)+65536:t}function jT(n){return n>=56320&&n<57344}function HT(n){return n>=55296&&n<56320}function bQ(n){return n<65536?1:2}class dt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Uf(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),Nl.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Uf(this,e,t);let i=[];return this.decompose(e,t,i,0),Nl.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new kO(this),s=new kO(e);for(let o=t,f=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(f+=r.value.length,r.done||f>=i)return!0}}iter(e=1){return new kO(this,e)}iterRange(e,t=this.length){return new IT(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new KT(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?dt.empty:e.length<=32?new cn(e):Nl.from(cn.split(e,[]))}}class cn extends dt{constructor(e,t=Y$(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],f=r+o.length;if((t?i:f)>=e)return new L$(r,f,i,o);r=f+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new cn(vQ(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),f=S0(s.text,o.text.slice(),0,s.length);if(f.length<=32)i.push(new cn(f,o.length+s.length));else{let h=f.length>>1;i.push(new cn(f.slice(0,h)),new cn(f.slice(h)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof cn))return super.replace(e,t,i);[e,t]=Uf(this,e,t);let r=S0(this.text,S0(i.text,vQ(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new cn(r,s):Nl.from(cn.split(r,[]),s)}sliceString(e,t=this.length,i=` |
| 33 | `){[e,t]=Uf(this,e,t);let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let f=this.text[o],h=s+f.length;s>e&&o&&(r+=i),e<h&&t>s&&(r+=f.slice(Math.max(0,e-s),t-s)),s=h+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new cn(i,r)),i=[],r=-1);return r>-1&&t.push(new cn(i,r)),t}}class Nl extends dt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],f=r+o.length,h=i+o.lines-1;if((t?h:f)>=e)return o.lineInner(e,t,i,r);r=f+1,i=h+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let f=this.children[s],h=o+f.length;if(e<=h&&t>=o){let p=r&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!p?i.push(f):f.decompose(e-o,t-o,i,p)}o=h+1}}replace(e,t,i){if([e,t]=Uf(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],f=s+o.length;if(e>=s&&t<=f){let h=o.replace(e-s,t-s,i),p=this.lines-o.lines+h.lines;if(h.lines<p>>4&&h.lines>p>>6){let g=this.children.slice();return g[r]=h,new Nl(g,this.length-(t-e)+i.length)}return super.replace(s,f,h)}s=f+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` |
| 34 | `){[e,t]=Uf(this,e,t);let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let f=this.children[s],h=o+f.length;o>e&&s&&(r+=i),e<h&&t>o&&(r+=f.sliceString(e-o,t-o,i)),o=h+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Nl))return 0;let i=0,[r,s,o,f]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==f)return i;let h=this.children[r],p=e.children[s];if(h!=p)return i+h.scanIdentical(p,t);i+=h.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let Q of e)i+=Q.lines;if(i<32){let Q=[];for(let k of e)k.flatten(Q);return new cn(Q,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,f=[],h=0,p=-1,g=[];function S(Q){let k;if(Q.lines>s&&Q instanceof Nl)for(let C of Q.children)S(C);else Q.lines>o&&(h>o||!h)?(v(),f.push(Q)):Q instanceof cn&&h&&(k=g[g.length-1])instanceof cn&&Q.lines+k.lines<=32?(h+=Q.lines,p+=Q.length+1,g[g.length-1]=new cn(k.text.concat(Q.text),k.length+1+Q.length)):(h+Q.lines>r&&v(),h+=Q.lines,p+=Q.length+1,g.push(Q))}function v(){h!=0&&(f.push(g.length==1?g[0]:Nl.from(g,p)),p=-1,h=g.length=0)}for(let Q of e)S(Q);return v(),f.length==1?f[0]:new Nl(f,t)}}dt.empty=new cn([""],0);function Y$(n){let e=-1;for(let t of n)e+=t.length+1;return e}function S0(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let f=n[s],h=r+f.length;h>=t&&(h>i&&(f=f.slice(0,i-r)),r<t&&(f=f.slice(t-r)),o?(e[e.length-1]+=f,o=!1):e.push(f)),r=h+1}return e}function vQ(n,e,t){return S0(n,[""],e,t)}class kO{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof cn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,f=r instanceof cn?r.text.length:r.children.length;if(o==(t>0?f:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` |
| 35 | `,this;e--}else if(r instanceof cn){let h=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=r.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof cn?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class IT{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new kO(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class KT{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(dt.prototype[Symbol.iterator]=function(){return this.iter()},kO.prototype[Symbol.iterator]=IT.prototype[Symbol.iterator]=KT.prototype[Symbol.iterator]=function(){return this});class L${constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}function Uf(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Yn(n,e,t=!0,i=!0){return z$(n,e,t,i)}function V$(n){return n>=56320&&n<57344}function N$(n){return n>=55296&&n<56320}function Li(n,e){let t=n.charCodeAt(e);if(!N$(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return V$(i)?(t-55296<<10)+(i-56320)+65536:t}function Lv(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ul(n){return n<65536?1:2}const Rb=/\r\n?|\n/;var Bn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Bn||(Bn={}));class Il{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){Ab(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new Il(e)}composeDesc(e){return this.empty?e:e.empty?this:FT(this,e)}mapDesc(e,t=!1){return e.empty?this:$b(this,e,t)}mapPos(e,t=-1,i=Bn.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let f=this.sections[o++],h=this.sections[o++],p=r+f;if(h<0){if(p>e)return s+(e-r);s+=f}else{if(i!=Bn.Simple&&p>=e&&(i==Bn.TrackDel&&r<e&&p>e||i==Bn.TrackBefore&&r<e||i==Bn.TrackAfter&&p>e))return null;if(p>e||p==e&&t<0&&!f)return e==r||t<0?s:s+h;s+=h}r=p}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],f=r+s;if(o>=0&&r<=t&&f>=e)return r<e&&f>t?"cover":!0;r=f}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Il(e)}static create(e){return new Il(e)}}class Qn extends Il{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ab(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return $b(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],f=t[r+1];if(f>=0){t[r]=f,t[r+1]=o;let h=r>>1;for(;i.length<h;)i.push(dt.empty);i.push(o?e.slice(s,s+o):dt.empty)}s+=o}return new Qn(t,i)}compose(e){return this.empty?e:e.empty?this:FT(this,e,!0)}map(e,t=!1){return e.empty?this:$b(this,e,t,!0)}iterChanges(e,t=!1){Ab(this,e,t)}get desc(){return Il.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new XO(this);e:for(let o=0,f=0;;){let h=o==e.length?1e9:e[o++];for(;f<h||f==h&&s.len==0;){if(s.done)break e;let g=Math.min(s.len,h-f);ri(r,g,-1);let S=s.ins==-1?-1:s.off==0?s.ins:0;ri(t,g,S),S>0&&Ja(i,t,s.text),s.forward(g),f+=g}let p=e[o++];for(;f<p;){if(s.done)break e;let g=Math.min(s.len,p-f);ri(t,g,-1),ri(r,g,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(g),f+=g}}return{changes:new Qn(t,i),filtered:Il.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,f=null;function h(g=!1){if(!g&&!r.length)return;o<t&&ri(r,t-o,-1);let S=new Qn(r,s);f=f?f.compose(S.map(f)):S,r=[],s=[],o=0}function p(g){if(Array.isArray(g))for(let S of g)p(S);else if(g instanceof Qn){if(g.length!=t)throw new RangeError(`Mismatched change set length (got ${g.length}, expected ${t})`);h(),f=f?f.compose(g.map(f)):g}else{let{from:S,to:v=S,insert:Q}=g;if(S>v||S<0||v>t)throw new RangeError(`Invalid change range ${S} to ${v} (in doc of length ${t})`);let k=Q?typeof Q=="string"?dt.of(Q.split(i||Rb)):Q:dt.empty,C=k.length;if(S==v&&C==0)return;S<o&&h(),S>o&&ri(r,S-o,-1),ri(r,v-S,C),Ja(s,r,k),o=v}}return p(e),h(!f),f}static empty(e){return new Qn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,f)=>f&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(dt.empty);i[r]=dt.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new Qn(t,i)}static createSet(e,t){return new Qn(e,t)}}function ri(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function Ja(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(dt.empty);n.push(t)}}function Ab(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let f=n.sections[o++],h=n.sections[o++];if(h<0)r+=f,s+=f;else{let p=r,g=s,S=dt.empty;for(;p+=f,g+=h,h&&i&&(S=S.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)f=n.sections[o++],h=n.sections[o++];e(r,p,s,g,S),r=p,s=g}}}function $b(n,e,t,i=!1){let r=[],s=i?[]:null,o=new XO(n),f=new XO(e);for(let h=-1;;){if(o.done&&f.len||f.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&f.ins==-1){let p=Math.min(o.len,f.len);ri(r,p,-1),o.forward(p),f.forward(p)}else if(f.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(f.len<o.len||f.len==o.len&&!t))){let p=f.len;for(ri(r,f.ins,-1);p;){let g=Math.min(o.len,p);o.ins>=0&&h<o.i&&o.len<=g&&(ri(r,0,o.ins),s&&Ja(s,r,o.text),h=o.i),o.forward(g),p-=g}f.next()}else if(o.ins>=0){let p=0,g=o.len;for(;g;)if(f.ins==-1){let S=Math.min(g,f.len);p+=S,g-=S,f.forward(S)}else if(f.ins==0&&f.len<g)g-=f.len,f.next();else break;ri(r,p,h<o.i?o.ins:0),s&&h<o.i&&Ja(s,r,o.text),h=o.i,o.forward(o.len-g)}else{if(o.done&&f.done)return s?Qn.createSet(r,s):Il.create(r);throw new Error("Mismatched change set lengths")}}}function FT(n,e,t=!1){let i=[],r=t?[]:null,s=new XO(n),o=new XO(e);for(let f=!1;;){if(s.done&&o.done)return r?Qn.createSet(i,r):Il.create(i);if(s.ins==0)ri(i,s.len,0,f),s.next();else if(o.len==0&&!o.done)ri(i,0,o.ins,f),r&&Ja(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let h=Math.min(s.len2,o.len),p=i.length;if(s.ins==-1){let g=o.ins==-1?-1:o.off?0:o.ins;ri(i,h,g,f),r&&g&&Ja(r,i,o.text)}else o.ins==-1?(ri(i,s.off?0:s.len,h,f),r&&Ja(r,i,s.textBit(h))):(ri(i,s.off?0:s.len,o.off?0:o.ins,f),r&&!o.off&&Ja(r,i,o.text));f=(s.ins>h||o.ins>=0&&o.len>h)&&(f||i.length>p),s.forward2(h),o.forward(h)}}}}class XO{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?dt.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?dt.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Eu{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Eu(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return ue.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ue.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ue.range(e.anchor,e.head)}static create(e,t,i){return new Eu(e,t,i)}}class ue{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ue.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ue([this.main],0)}addRange(e,t=!0){return ue.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,ue.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ue(e.ranges.map(t=>Eu.fromJSON(t)),e.main)}static single(e,t=e){return new ue([ue.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return ue.normalized(e.slice(),t);i=s.to}return new ue(e,t)}static cursor(e,t=0,i,r){return Eu.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,t,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?Eu.create(t,e,48|s):Eu.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let f=o.from,h=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?ue.range(h,f):ue.range(f,h))}}return new ue(e,t)}}function JT(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Vv=0;class ke{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Vv++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new ke(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Nv),!!e.static,e.enables)}of(e){return new b0([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new b0(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new b0(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Nv(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class b0{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Vv++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,f=this.type==2,h=!1,p=!1,g=[];for(let S of this.dependencies)S=="doc"?h=!0:S=="selection"?p=!0:(((t=e[S.id])!==null&&t!==void 0?t:1)&1)==0&&g.push(e[S.id]);return{create(S){return S.values[o]=i(S),1},update(S,v){if(h&&v.docChanged||p&&(v.docChanged||v.selection)||Mb(S,g)){let Q=i(S);if(f?!xQ(Q,S.values[o],r):!r(Q,S.values[o]))return S.values[o]=Q,1}return 0},reconfigure:(S,v)=>{let Q,k=v.config.address[s];if(k!=null){let C=L0(v,k);if(this.dependencies.every(A=>A instanceof ke?v.facet(A)===S.facet(A):A instanceof Cn?v.field(A,!1)==S.field(A,!1):!0)||(f?xQ(Q=i(S),C,r):r(Q=i(S),C)))return S.values[o]=C,0}else Q=i(S);return S.values[o]=Q,1}}}}function xQ(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Mb(n,e){let t=!1;for(let i of e)TO(n,i)&1&&(t=!0);return t}function U$(n,e,t){let i=t.map(h=>n[h.id]),r=t.map(h=>h.type),s=i.filter(h=>!(h&1)),o=n[e.id]>>1;function f(h){let p=[];for(let g=0;g<i.length;g++){let S=L0(h,i[g]);if(r[g]==2)for(let v of S)p.push(v);else p.push(S)}return e.combine(p)}return{create(h){for(let p of i)TO(h,p);return h.values[o]=f(h),1},update(h,p){if(!Mb(h,s))return 0;let g=f(h);return e.compare(g,h.values[o])?0:(h.values[o]=g,1)},reconfigure(h,p){let g=Mb(h,i),S=p.config.facets[e.id],v=p.facet(e);if(S&&!g&&Nv(t,S))return h.values[o]=v,0;let Q=f(h);return e.compare(Q,v)?(h.values[o]=v,0):(h.values[o]=Q,1)}}}const Hm=ke.define({static:!0});class Cn{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new Cn(Vv++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Hm).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>{let s=i.facet(Hm),o=r.facet(Hm),f;return(f=s.find(h=>h.field==this))&&f!=o.find(h=>h.field==this)?(i.values[t]=f.create(i),1):r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,Hm.of({field:this,create:e})]}get extension(){return this}}const Au={lowest:4,low:3,default:2,high:1,highest:0};function aO(n){return e=>new eP(e,n)}const uo={highest:aO(Au.highest),high:aO(Au.high),default:aO(Au.default),low:aO(Au.low),lowest:aO(Au.lowest)};class eP{constructor(e,t){this.inner=e,this.prec=t}}class wy{of(e){return new Eb(this,e)}reconfigure(e){return wy.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Eb{constructor(e,t){this.compartment=e,this.inner=t}}class Y0{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let v of G$(e,t,o))v instanceof Cn?r.push(v):(s[v.facet.id]||(s[v.facet.id]=[])).push(v);let f=Object.create(null),h=[],p=[];for(let v of r)f[v.id]=p.length<<1,p.push(Q=>v.slot(Q));let g=i?.config.facets;for(let v in s){let Q=s[v],k=Q[0].facet,C=g&&g[v]||[];if(Q.every(A=>A.type==0))if(f[k.id]=h.length<<1|1,Nv(C,Q))h.push(i.facet(k));else{let A=k.combine(Q.map($=>$.value));h.push(i&&k.compare(A,i.facet(k))?i.facet(k):A)}else{for(let A of Q)A.type==0?(f[A.id]=h.length<<1|1,h.push(A.value)):(f[A.id]=p.length<<1,p.push($=>A.dynamicSlot($)));f[k.id]=p.length<<1,p.push(A=>U$(A,k,Q))}}let S=p.map(v=>v(f));return new Y0(e,o,S,f,h,s)}}function G$(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,f){let h=r.get(o);if(h!=null){if(h<=f)return;let p=i[h].indexOf(o);p>-1&&i[h].splice(p,1),o instanceof Eb&&t.delete(o.compartment)}if(r.set(o,f),Array.isArray(o))for(let p of o)s(p,f);else if(o instanceof Eb){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let p=e.get(o.compartment)||o.inner;t.set(o.compartment,p),s(p,f)}else if(o instanceof eP)s(o.inner,o.prec);else if(o instanceof Cn)i[f].push(o),o.provides&&s(o.provides,f);else if(o instanceof b0)i[f].push(o),o.facet.extensions&&s(o.facet.extensions,Au.default);else{let p=o.extension;if(!p)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(p,f)}}return s(n,Au.default),i.reduce((o,f)=>o.concat(f))}function TO(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function L0(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const tP=ke.define(),Xb=ke.define({combine:n=>n.some(e=>e),static:!0}),nP=ke.define({combine:n=>n.length?n[0]:void 0,static:!0}),iP=ke.define(),rP=ke.define(),lP=ke.define(),sP=ke.define({combine:n=>n.length?n[0]:!1});class ts{constructor(e,t){this.type=e,this.value=t}static define(){return new W$}}class W${of(e){return new ts(this,e)}}class j${constructor(e){this.map=e}of(e){return new Ge(this,e)}}class Ge{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Ge(this.type,t)}is(e){return this.type==e}static define(e={}){return new j$(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}Ge.reconfigure=Ge.define();Ge.appendConfig=Ge.define();class bn{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&JT(i,t.newLength),s.some(f=>f.type==bn.time)||(this.annotations=s.concat(bn.time.of(Date.now())))}static create(e,t,i,r,s,o){return new bn(e,t,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(bn.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}bn.time=ts.define();bn.userEvent=ts.define();bn.addToHistory=ts.define();bn.remote=ts.define();function H$(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function aP(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=Qn.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:Ge.mapEffects(n.effects,r).concat(Ge.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Zb(n,e,t){let i=e.selection,r=Df(e.annotations);return e.userEvent&&(r=r.concat(bn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Qn?e.changes:Qn.of(e.changes||[],t,n.facet(nP)),selection:i&&(i instanceof ue?i:ue.single(i.anchor,i.head)),effects:Df(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function oP(n,e,t){let i=Zb(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=aP(i,Zb(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=bn.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return K$(t?I$(r):r)}function I$(n){let e=n.startState,t=!0;for(let r of e.facet(iP)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:H$(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=Qn.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=bn.create(e,r,n.selection&&n.selection.map(s),Ge.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(rP);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof bn?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof bn?n=s[0]:n=oP(e,Df(s),!1)}return n}function K$(n){let e=n.startState,t=e.facet(lP),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=aP(i,Zb(e,s,n.changes.newLength),!0))}return i==n?n:bn.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const F$=[];function Df(n){return n==null?F$:Array.isArray(n)?n:[n]}var Ht=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Ht||(Ht={}));const J$=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Db;try{Db=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function eM(n){if(Db)return Db.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||J$.test(t)))return!0}return!1}function tM(n){return e=>{if(!/\S/.test(e))return Ht.Space;if(eM(e))return Ht.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Ht.Word;return Ht.Other}}class ht{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let f=0;f<this.config.dynamicSlots.length;f++)TO(this,f<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return TO(this,i),L0(this,i)}update(...e){return oP(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let f of e.effects)f.is(wy.reconfigure)?(t&&(r=new Map,t.compartments.forEach((h,p)=>r.set(p,h)),t=null),r.set(f.value.compartment,f.value.extension)):f.is(Ge.reconfigure)?(t=null,i=f.value):f.is(Ge.appendConfig)&&(t=null,i=Df(i).concat(f.value));let s;t?s=e.startState.values.slice():(t=Y0.resolve(i,r,this),s=new ht(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(h,p)=>p.reconfigure(h,this),null).values);let o=e.startState.facet(Xb)?e.newSelection:e.newSelection.asSingle();new ht(t,e.newDoc,o,s,(f,h)=>h.update(f,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:ue.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Df(i.effects);for(let f=1;f<t.ranges.length;f++){let h=e(t.ranges[f]),p=this.changes(h.changes),g=p.map(r);for(let v=0;v<f;v++)s[v]=s[v].map(g);let S=r.mapDesc(p,!0);s.push(h.range.map(S)),r=r.compose(g),o=Ge.mapEffects(o,g).concat(Ge.mapEffects(Df(h.effects),S))}return{changes:r,selection:ue.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof Qn?e:Qn.of(e,this.doc.length,this.facet(ht.lineSeparator))}toText(e){return dt.of(e.split(this.facet(ht.lineSeparator)||Rb))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(TO(this,t),L0(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof Cn&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],f=e[s];r.push(o.init(h=>o.spec.fromJSON(f,h)))}}return ht.create({doc:e.doc,selection:ue.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Y0.resolve(e.extensions||[],new Map),i=e.doc instanceof dt?e.doc:dt.of((e.doc||"").split(t.staticFacet(ht.lineSeparator)||Rb)),r=e.selection?e.selection instanceof ue?e.selection:ue.single(e.selection.anchor,e.selection.head):ue.single(0);return JT(r,i.length),t.staticFacet(Xb)||(r=r.asSingle()),new ht(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(ht.tabSize)}get lineBreak(){return this.facet(ht.lineSeparator)||` |
no test coverage detected