@nocobase/app 2.0.2 → 2.0.3

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5189],{31842:function(en,Je,D){D.d(Je,{Xy:function(){return _t}});var p=D(47421),u=D(78120),d=D(59119),J=D(41113);const we=e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=W(e.state,r.from);return n.line?We(e):n.block?Ke(e):!1};function w(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let l=e(t,r);return l?(n(r.update(l)),!0):!1}}const We=w(Qe,0),tn=null,nn=null,He=w(te,0),rn=null,on=null,Ke=w((e,t)=>te(e,t,qe(t)),0);function W(e,t){let r=e.languageDataAt("commentTokens",t,1);return r.length?r[0]:{}}const O=50;function $e(e,{open:t,close:r},n,l){let o=e.sliceDoc(n-O,n),c=e.sliceDoc(l,l+O),s=/\s*$/.exec(o)[0].length,i=/^\s*/.exec(c)[0].length,a=o.length-s;if(o.slice(a-t.length,a)==t&&c.slice(i,i+r.length)==r)return{open:{pos:n-s,margin:s&&1},close:{pos:l+i,margin:i&&1}};let f,h;l-n<=2*O?f=h=e.sliceDoc(n,l):(f=e.sliceDoc(n,n+O),h=e.sliceDoc(l-O,l));let m=/^\s*/.exec(f)[0].length,C=/\s*$/.exec(h)[0].length,B=h.length-C-r.length;return f.slice(m,m+t.length)==t&&h.slice(B,B+r.length)==r?{open:{pos:n+m+t.length,margin:/\s/.test(f.charAt(m+t.length))?1:0},close:{pos:l-C-r.length,margin:/\s/.test(h.charAt(B-1))?1:0}}:null}function qe(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),l=r.to<=n.to?n:e.doc.lineAt(r.to);l.from>n.from&&l.from==r.to&&(l=r.to==n.to+1?n:e.doc.lineAt(r.to-1));let o=t.length-1;o>=0&&t[o].to>n.from?t[o].to=l.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:l.to})}return t}function te(e,t,r=t.selection.ranges){let n=r.map(o=>W(t,o.from).block);if(!n.every(o=>o))return null;let l=r.map((o,c)=>$e(t,n[c],o.from,o.to));if(e!=2&&!l.every(o=>o))return{changes:t.changes(r.map((o,c)=>l[c]?[]:[{from:o.from,insert:n[c].open+" "},{from:o.to,insert:" "+n[c].close}]))};if(e!=1&&l.some(o=>o)){let o=[];for(let c=0,s;c<l.length;c++)if(s=l[c]){let i=n[c],{open:a,close:f}=s;o.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:f.pos-f.margin,to:f.pos+i.close.length})}return{changes:o}}return null}function Qe(e,t,r=t.selection.ranges){let n=[],l=-1;for(let{from:o,to:c}of r){let s=n.length,i=1e9,a=W(t,o).line;if(a){for(let f=o;f<=c;){let h=t.doc.lineAt(f);if(h.from>l&&(o==c||c>h.from)){l=h.from;let m=/^\s*/.exec(h.text)[0].length,C=m==h.length,B=h.text.slice(m,m+a.length)==a?m:-1;m<h.text.length&&m<i&&(i=m),n.push({line:h,comment:B,token:a,indent:m,empty:C,single:!1})}f=h.to+1}if(i<1e9)for(let f=s;f<n.length;f++)n[f].indent<n[f].line.text.length&&(n[f].indent=i);n.length==s+1&&(n[s].single=!0)}}if(e!=2&&n.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:i,indent:a,empty:f,single:h}of n)(h||!f)&&o.push({from:s.from+a,insert:i+" "});let c=t.changes(o);return{changes:c,selection:t.selection.map(c,1)}}else if(e!=1&&n.some(o=>o.comment>=0)){let o=[];for(let{line:c,comment:s,token:i}of n)if(s>=0){let a=c.from+s,f=a+i.length;c.text[f-c.from]==" "&&f++,o.push({from:a,to:f})}return{changes:o}}return null}const H=u.q6.define(),Ye=u.q6.define(),Ze=u.r$.define(),ne=u.r$.define({combine(e){return(0,u.BO)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,r)=>r},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,r)=>(n,l)=>t(n,l)||r(n,l)})}}),K=u.QQ.define({create(){return L.empty},update(e,t){let r=t.state.facet(ne),n=t.annotation(H);if(n){let i=k.fromTransaction(t,n.selection),a=n.side,f=a==0?e.undone:e.done;return i?f=I(f,f.length,r.minDepth,i):f=le(f,t.startState.selection),new L(a==0?n.rest:f,a==0?f:n.rest)}let l=t.annotation(Ye);if((l=="full"||l=="before")&&(e=e.isolate()),t.annotation(u.YW.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let o=k.fromTransaction(t),c=t.annotation(u.YW.time),s=t.annotation(u.YW.userEvent);return o?e=e.addChanges(o,c,s,r,t):t.selection&&(e=e.addSelection(t.startState.selection,c,s,r.newGroupDelay)),(l=="full"||l=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new L(e.done.map(k.fromJSON),e.undone.map(k.fromJSON))}});function Xe(e={}){return[K,ne.of(e),p.tk.domEventHandlers({beforeinput(t,r){let n=t.inputType=="historyUndo"?re:t.inputType=="historyRedo"?$:null;return n?(t.preventDefault(),n(r)):!1}})]}const ln=null;function v(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let l=r.field(K,!1);if(!l)return!1;let o=l.pop(e,r,t);return o?(n(o),!0):!1}}const re=v(0,!1),$=v(1,!1),_e=v(0,!0),et=v(1,!0);function cn(e){return function(t){let r=t.field(K,!1);if(!r)return 0;let n=e==0?r.done:r.undone;return n.length-(n.length&&!n[0].changes?1:0)}}const sn=null,un=null;class k{constructor(t,r,n,l,o){this.changes=t,this.effects=r,this.mapped=n,this.startSelection=l,this.selectionsAfter=o}setSelAfter(t){return new k(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,r,n;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(r=this.mapped)===null||r===void 0?void 0:r.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(l=>l.toJSON())}}static fromJSON(t){return new k(t.changes&&u.as.fromJSON(t.changes),[],t.mapped&&u.n0.fromJSON(t.mapped),t.startSelection&&u.jT.fromJSON(t.startSelection),t.selectionsAfter.map(u.jT.fromJSON))}static fromTransaction(t,r){let n=A;for(let l of t.startState.facet(Ze)){let o=l(t);o.length&&(n=n.concat(o))}return!n.length&&t.changes.empty?null:new k(t.changes.invert(t.startState.doc),n,void 0,r||t.startState.selection,A)}static selection(t){return new k(void 0,A,void 0,void 0,t)}}function I(e,t,r,n){let l=t+1>r+20?t-r-1:0,o=e.slice(l,t);return o.push(n),o}function tt(e,t){let r=[],n=!1;return e.iterChangedRanges((l,o)=>r.push(l,o)),t.iterChangedRanges((l,o,c,s)=>{for(let i=0;i<r.length;){let a=r[i++],f=r[i++];s>=a&&c<=f&&(n=!0)}}),n}function nt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((r,n)=>r.empty!=t.ranges[n].empty).length===0}function oe(e,t){return e.length?t.length?e.concat(t):e:t}const A=[],rt=200;function le(e,t){if(e.length){let r=e[e.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-rt));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),I(e,e.length-1,1e9,r.setSelAfter(n)))}else return[k.selection([t])]}function ot(e){let t=e[e.length-1],r=e.slice();return r[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),r}function q(e,t){if(!e.length)return e;let r=e.length,n=A;for(;r;){let l=lt(e[r-1],t,n);if(l.changes&&!l.changes.empty||l.effects.length){let o=e.slice(0,r);return o[r-1]=l,o}else t=l.mapped,r--,n=l.selectionsAfter}return n.length?[k.selection(n)]:A}function lt(e,t,r){let n=oe(e.selectionsAfter.length?e.selectionsAfter.map(s=>s.map(t)):A,r);if(!e.changes)return k.selection(n);let l=e.changes.map(t),o=t.mapDesc(e.changes,!0),c=e.mapped?e.mapped.composeDesc(o):o;return new k(l,u.Py.mapEffects(e.effects,t),c,e.startSelection.map(o),n)}const ct=/^(input\.type|delete)($|\.)/;class L{constructor(t,r,n=0,l=void 0){this.done=t,this.undone=r,this.prevTime=n,this.prevUserEvent=l}isolate(){return this.prevTime?new L(this.done,this.undone):this}addChanges(t,r,n,l,o){let c=this.done,s=c[c.length-1];return s&&s.changes&&!s.changes.empty&&t.changes&&(!n||ct.test(n))&&(!s.selectionsAfter.length&&r-this.prevTime<l.newGroupDelay&&l.joinToEvent(o,tt(s.changes,t.changes))||n=="input.type.compose")?c=I(c,c.length-1,l.minDepth,new k(t.changes.compose(s.changes),oe(u.Py.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,A)):c=I(c,c.length,l.minDepth,t),new L(c,A,r,n)}addSelection(t,r,n,l){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:A;return o.length>0&&r-this.prevTime<l&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&nt(o[o.length-1],t)?this:new L(le(this.done,t),this.undone,r,n)}addMapping(t){return new L(q(this.done,t),q(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,r,n){let l=t==0?this.done:this.undone;if(l.length==0)return null;let o=l[l.length-1],c=o.selectionsAfter[0]||r.selection;if(n&&o.selectionsAfter.length)return r.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:H.of({side:t,rest:ot(l),selection:c}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=l.length==1?A:l.slice(0,l.length-1);return o.mapped&&(s=q(s,o.mapped)),r.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:H.of({side:t,rest:s,selection:c}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}}L.empty=new L(A,A);const st=[{key:"Mod-z",run:re,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:$,preventDefault:!0},{linux:"Ctrl-Shift-z",run:$,preventDefault:!0},{key:"Mod-u",run:_e,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:et,preventDefault:!0}];function b(e,t){return u.jT.create(e.ranges.map(t),e.mainIndex)}function x(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function S({state:e,dispatch:t},r){let n=b(e.selection,r);return n.eq(e.selection,!0)?!1:(t(x(e,n)),!0)}function T(e,t){return u.jT.cursor(t?e.to:e.from)}function R(e,t){return S(e,r=>r.empty?e.moveByChar(r,t):T(r,t))}function g(e){return e.textDirectionAt(e.state.selection.main.head)==p.Nm.LTR}const ce=e=>R(e,!g(e)),se=e=>R(e,g(e)),fn=e=>R(e,!0),an=e=>R(e,!1);function Q(e,t,r){let n=t.head,l=e.doc.lineAt(n);return n==(r?l.to:l.from)?n=r?Math.min(e.doc.length,l.to+1):Math.max(0,l.from-1):n=l.from+findClusterBreak(l.text,n-l.from,r),EditorSelection.cursor(n,r?-1:1)}function ie(e,t){return S(e,r=>r.empty?Q(e.state,r,t):T(r,t))}const hn=e=>ie(e,!0),dn=e=>ie(e,!1);function U(e,t){return S(e,r=>r.empty?e.moveByGroup(r,t):T(r,t))}const it=e=>U(e,!g(e)),ut=e=>U(e,g(e)),mn=e=>U(e,!0),pn=e=>U(e,!1);function ue(e,t,r){let n=e.state.charCategorizer(t),l=n(r),o=l!=CharCategory.Space;return c=>{let s=n(c);return s!=CharCategory.Space?o&&s==l:(o=!1,!0)}}const gn=e=>S(e,t=>t.empty?e.moveByChar(t,!0,r=>ue(e,t.head,r)):T(t,!0)),fe=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function ae(e,t,r){let n=e.state.charCategorizer(t.from),l=CharCategory.Space,o=t.from,c=0,s=!1,i=!1,a=!1,f=m=>{if(s)return!1;o+=r?m.length:-m.length;let C=n(m),B;if(C==CharCategory.Word&&m.charCodeAt(0)<128&&/[\W_]/.test(m)&&(C=-1),l==CharCategory.Space&&(l=C),l!=C)return!1;if(l==CharCategory.Word)if(m.toLowerCase()==m){if(!r&&i)return!1;a=!0}else if(a){if(r)return!1;s=!0}else{if(i&&r&&n(B=e.state.sliceDoc(o,o+1))==CharCategory.Word&&B.toLowerCase()==B)return!1;i=!0}return c++,!0},h=e.moveByChar(t,r,m=>(f(m),f));if(fe&&l==CharCategory.Word&&h.from==t.from+c*(r?1:-1)){let m=Math.min(t.head,h.head),C=Math.max(t.head,h.head),B=e.state.sliceDoc(m,C);if(B.length>1&&/[\u4E00-\uffff]/.test(B)){let z=Array.from(fe.segment(B));if(z.length>1)return r?EditorSelection.cursor(t.head+z[1].index,-1):EditorSelection.cursor(h.head+z[z.length-1].index,1)}}return h}function he(e,t){return S(e,r=>r.empty?ae(e,r,t):T(r,t))}const yn=e=>he(e,!0),kn=e=>he(e,!1);function ft(e,t,r){if(t.type.prop(r))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function j(e,t,r){let n=(0,d.qz)(e).resolveInner(t.head),l=r?J.md.closedBy:J.md.openedBy;for(let i=t.head;;){let a=r?n.childAfter(i):n.childBefore(i);if(!a)break;ft(e,a,l)?n=a:i=r?a.to:a.from}let o=n.type.prop(l),c,s;return o&&(c=r?(0,d.Um)(e,n.from,1):(0,d.Um)(e,n.to,-1))&&c.matched?s=r?c.end.to:c.end.from:s=r?n.to:n.from,u.jT.cursor(s,r?-1:1)}const at=e=>S(e,t=>j(e.state,t,!g(e))),ht=e=>S(e,t=>j(e.state,t,g(e)));function de(e,t){return S(e,r=>{if(!r.empty)return T(r,t);let n=e.moveVertically(r,t);return n.head!=r.head?n:e.moveToLineBoundary(r,t)})}const me=e=>de(e,!1),pe=e=>de(e,!0);function ge(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,n=0,l;if(t){for(let o of e.state.facet(p.tk.scrollMargins)){let c=o(e);c!=null&&c.top&&(r=Math.max(c==null?void 0:c.top,r)),c!=null&&c.bottom&&(n=Math.max(c==null?void 0:c.bottom,n))}l=e.scrollDOM.clientHeight-r-n}else l=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:n,selfScroll:t,height:Math.max(e.defaultLineHeight,l-5)}}function ye(e,t){let r=ge(e),{state:n}=e,l=b(n.selection,c=>c.empty?e.moveVertically(c,t,r.height):T(c,t));if(l.eq(n.selection))return!1;let o;if(r.selfScroll){let c=e.coordsAtPos(n.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),i=s.top+r.marginTop,a=s.bottom-r.marginBottom;c&&c.top>i&&c.bottom<a&&(o=p.tk.scrollIntoView(l.main.head,{y:"start",yMargin:c.top-i}))}return e.dispatch(x(n,l),{effects:o}),!0}const ke=e=>ye(e,!1),Y=e=>ye(e,!0);function M(e,t,r){let n=e.lineBlockAt(t.head),l=e.moveToLineBoundary(t,r);if(l.head==t.head&&l.head!=(r?n.to:n.from)&&(l=e.moveToLineBoundary(t,r,!1)),!r&&l.head==n.from&&n.length){let o=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;o&&t.head!=n.from+o&&(l=u.jT.cursor(n.from+o))}return l}const dt=e=>S(e,t=>M(e,t,!0)),mt=e=>S(e,t=>M(e,t,!1)),pt=e=>S(e,t=>M(e,t,!g(e))),gt=e=>S(e,t=>M(e,t,g(e))),yt=e=>S(e,t=>u.jT.cursor(e.lineBlockAt(t.head).from,1)),kt=e=>S(e,t=>u.jT.cursor(e.lineBlockAt(t.head).to,-1));function Se(e,t,r){let n=!1,l=b(e.selection,o=>{let c=(0,d.Um)(e,o.head,-1)||(0,d.Um)(e,o.head,1)||o.head>0&&(0,d.Um)(e,o.head-1,1)||o.head<e.doc.length&&(0,d.Um)(e,o.head+1,-1);if(!c||!c.end)return o;n=!0;let s=c.start.from==o.head?c.end.to:c.end.from;return r?u.jT.range(o.anchor,s):u.jT.cursor(s)});return n?(t(x(e,l)),!0):!1}const St=({state:e,dispatch:t})=>Se(e,t,!1),Sn=({state:e,dispatch:t})=>Se(e,t,!0);function y(e,t){let r=b(e.state.selection,n=>{let l=t(n);return u.jT.range(n.anchor,l.head,l.goalColumn,l.bidiLevel||void 0)});return r.eq(e.state.selection)?!1:(e.dispatch(x(e.state,r)),!0)}function G(e,t){return y(e,r=>e.moveByChar(r,t))}const Be=e=>G(e,!g(e)),Ae=e=>G(e,g(e)),Bn=e=>G(e,!0),An=e=>G(e,!1),Cn=e=>y(e,t=>Q(e.state,t,!0)),Ln=e=>y(e,t=>Q(e.state,t,!1));function F(e,t){return y(e,r=>e.moveByGroup(r,t))}const Bt=e=>F(e,!g(e)),At=e=>F(e,g(e)),xn=e=>F(e,!0),Dn=e=>F(e,!1),Mn=e=>y(e,t=>e.moveByChar(t,!0,r=>ue(e,t.head,r)));function Ce(e,t){return y(e,r=>ae(e,r,t))}const Tn=e=>Ce(e,!0),bn=e=>Ce(e,!1),Ct=e=>y(e,t=>j(e.state,t,!g(e))),Lt=e=>y(e,t=>j(e.state,t,g(e)));function Le(e,t){return y(e,r=>e.moveVertically(r,t))}const xe=e=>Le(e,!1),De=e=>Le(e,!0);function Me(e,t){return y(e,r=>e.moveVertically(r,t,ge(e).height))}const Te=e=>Me(e,!1),be=e=>Me(e,!0),xt=e=>y(e,t=>M(e,t,!0)),Dt=e=>y(e,t=>M(e,t,!1)),Mt=e=>y(e,t=>M(e,t,!g(e))),Tt=e=>y(e,t=>M(e,t,g(e))),bt=e=>y(e,t=>u.jT.cursor(e.lineBlockAt(t.head).from)),Et=e=>y(e,t=>u.jT.cursor(e.lineBlockAt(t.head).to)),Ee=({state:e,dispatch:t})=>(t(x(e,{anchor:0})),!0),Oe=({state:e,dispatch:t})=>(t(x(e,{anchor:e.doc.length})),!0),ve=({state:e,dispatch:t})=>(t(x(e,{anchor:e.selection.main.anchor,head:0})),!0),Ie=({state:e,dispatch:t})=>(t(x(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Ot=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),vt=({state:e,dispatch:t})=>{let r=P(e).map(({from:n,to:l})=>u.jT.range(n,Math.min(l+1,e.doc.length)));return t(e.update({selection:u.jT.create(r),userEvent:"select"})),!0},It=({state:e,dispatch:t})=>{let r=b(e.selection,n=>{let l=(0,d.qz)(e),o=l.resolveStack(n.from,1);if(n.empty){let c=l.resolveStack(n.from,-1);c.node.from>=o.node.from&&c.node.to<=o.node.to&&(o=c)}for(let c=o;c;c=c.next){let{node:s}=c;if((s.from<n.from&&s.to>=n.to||s.to>n.to&&s.from<=n.from)&&c.next)return u.jT.range(s.to,s.from)}return n});return r.eq(e.selection)?!1:(t(x(e,r)),!0)},Rt=({state:e,dispatch:t})=>{let r=e.selection,n=null;return r.ranges.length>1?n=u.jT.create([r.main]):r.main.empty||(n=u.jT.create([u.jT.cursor(r.main.head)])),n?(t(x(e,n)),!0):!1};function E(e,t){if(e.state.readOnly)return!1;let r="delete.selection",{state:n}=e,l=n.changeByRange(o=>{let{from:c,to:s}=o;if(c==s){let i=t(o);i<c?(r="delete.backward",i=N(e,i,!1)):i>c&&(r="delete.forward",i=N(e,i,!0)),c=Math.min(c,i),s=Math.max(s,i)}else c=N(e,c,!1),s=N(e,s,!0);return c==s?{range:o}:{changes:{from:c,to:s},range:u.jT.cursor(c,c<o.head?-1:1)}});return l.changes.empty?!1:(e.dispatch(n.update(l,{scrollIntoView:!0,userEvent:r,effects:r=="delete.selection"?p.tk.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function N(e,t,r){if(e instanceof p.tk)for(let n of e.state.facet(p.tk.atomicRanges).map(l=>l(e)))n.between(t,t,(l,o)=>{l<t&&o>t&&(t=r?o:l)});return t}const Z=(e,t,r)=>E(e,n=>{let l=n.from,{state:o}=e,c=o.doc.lineAt(l),s,i;if(r&&!t&&l>c.from&&l<c.from+200&&!/[^ \t]/.test(s=c.text.slice(0,l-c.from))){if(s[s.length-1]==" ")return l-1;let a=(0,u.IS)(s,o.tabSize),f=a%(0,d.y1)(o)||(0,d.y1)(o);for(let h=0;h<f&&s[s.length-1-h]==" ";h++)l--;i=l}else i=(0,u.cp)(c.text,l-c.from,t,t)+c.from,i==l&&c.number!=(t?o.doc.lines:1)?i+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(c.text.slice(i-c.from,l-c.from))&&(i=(0,u.cp)(c.text,i-c.from,!1,!1)+c.from);return i}),X=e=>Z(e,!1,!0),En=e=>Z(e,!1,!1),Re=e=>Z(e,!0,!1),Ue=(e,t)=>E(e,r=>{let n=r.head,{state:l}=e,o=l.doc.lineAt(n),c=l.charCategorizer(n);for(let s=null;;){if(n==(t?o.to:o.from)){n==r.head&&o.number!=(t?l.doc.lines:1)&&(n+=t?1:-1);break}let i=(0,u.cp)(o.text,n-o.from,t)+o.from,a=o.text.slice(Math.min(n,i)-o.from,Math.max(n,i)-o.from),f=c(a);if(s!=null&&f!=s)break;(a!=" "||n!=r.head)&&(s=f),n=i}return n}),je=e=>Ue(e,!1),Ut=e=>Ue(e,!0),jt=e=>E(e,t=>{let r=e.lineBlockAt(t.head).to;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),On=e=>E(e,t=>{let r=e.lineBlockAt(t.head).from;return t.head>r?r:Math.max(0,t.head-1)}),Gt=e=>E(e,t=>{let r=e.moveToLineBoundary(t,!1).head;return t.head>r?r:Math.max(0,t.head-1)}),Ft=e=>E(e,t=>{let r=e.moveToLineBoundary(t,!0).head;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),vn=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=[];for(let n=0,l="",o=e.doc.iter();;){if(o.next(),o.lineBreak||o.done){let c=l.search(/\s+$/);if(c>-1&&r.push({from:n-(l.length-c),to:n}),o.done)break;l=""}else l=o.value;n+=o.value.length}return r.length?(t(e.update({changes:r,userEvent:"delete"})),!0):!1},Nt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:u.xv.of(["",""])},range:u.jT.cursor(n.from)}));return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0},Pt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let l=n.from,o=e.doc.lineAt(l),c=l==o.from?l-1:(0,u.cp)(o.text,l-o.from,!1)+o.from,s=l==o.to?l+1:(0,u.cp)(o.text,l-o.from,!0)+o.from;return{changes:{from:c,to:s,insert:e.doc.slice(l,s).append(e.doc.slice(c,l))},range:u.jT.cursor(s)}});return r.changes.empty?!1:(t(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function P(e){let t=[],r=-1;for(let n of e.selection.ranges){let l=e.doc.lineAt(n.from),o=e.doc.lineAt(n.to);if(!n.empty&&n.to==o.from&&(o=e.doc.lineAt(n.to-1)),r>=l.number){let c=t[t.length-1];c.to=o.to,c.ranges.push(n)}else t.push({from:l.from,to:o.to,ranges:[n]});r=o.number+1}return t}function Ge(e,t,r){if(e.readOnly)return!1;let n=[],l=[];for(let o of P(e)){if(r?o.to==e.doc.length:o.from==0)continue;let c=e.doc.lineAt(r?o.to+1:o.from-1),s=c.length+1;if(r){n.push({from:o.to,to:c.to},{from:o.from,insert:c.text+e.lineBreak});for(let i of o.ranges)l.push(u.jT.range(Math.min(e.doc.length,i.anchor+s),Math.min(e.doc.length,i.head+s)))}else{n.push({from:c.from,to:o.from},{from:o.to,insert:e.lineBreak+c.text});for(let i of o.ranges)l.push(u.jT.range(i.anchor-s,i.head-s))}}return n.length?(t(e.update({changes:n,scrollIntoView:!0,selection:u.jT.create(l,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Vt=({state:e,dispatch:t})=>Ge(e,t,!1),zt=({state:e,dispatch:t})=>Ge(e,t,!0);function Fe(e,t,r){if(e.readOnly)return!1;let n=[];for(let l of P(e))r?n.push({from:l.from,insert:e.doc.slice(l.from,l.to)+e.lineBreak}):n.push({from:l.to,insert:e.lineBreak+e.doc.slice(l.from,l.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Jt=({state:e,dispatch:t})=>Fe(e,t,!1),wt=({state:e,dispatch:t})=>Fe(e,t,!0),Wt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,r=t.changes(P(t).map(({from:l,to:o})=>(l>0?l--:o<t.doc.length&&o++,{from:l,to:o}))),n=b(t.selection,l=>{let o;if(e.lineWrapping){let c=e.lineBlockAt(l.head),s=e.coordsAtPos(l.head,l.assoc||1);s&&(o=c.bottom+e.documentTop-s.bottom+e.defaultLineHeight/2)}return e.moveVertically(l,!0,o)}).map(r);return e.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0},In=({state:e,dispatch:t})=>(t(e.update(e.replaceSelection(e.lineBreak),{scrollIntoView:!0,userEvent:"input"})),!0),Rn=({state:e,dispatch:t})=>(t(e.update(e.changeByRange(r=>{let n=/^\s*/.exec(e.doc.lineAt(r.from).text)[0];return{changes:{from:r.from,to:r.to,insert:e.lineBreak+n},range:EditorSelection.cursor(r.from+n.length+1)}}),{scrollIntoView:!0,userEvent:"input"})),!0);function Ht(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let r=(0,d.qz)(e).resolveInner(t),n=r.childBefore(t),l=r.childAfter(t),o;return n&&l&&n.to<=t&&l.from>=t&&(o=n.type.prop(J.md.closedBy))&&o.indexOf(l.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(l.from).from&&!/\S/.test(e.sliceDoc(n.to,l.from))?{from:n.to,to:l.from}:null}const Ne=Pe(!1),Kt=Pe(!0);function Pe(e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let n=t.changeByRange(l=>{let{from:o,to:c}=l,s=t.doc.lineAt(o),i=!e&&o==c&&Ht(t,o);e&&(o=c=(c<=s.to?s:t.doc.lineAt(c)).to);let a=new d.Gn(t,{simulateBreak:o,simulateDoubleBreak:!!i}),f=(0,d.K0)(a,o);for(f==null&&(f=(0,u.IS)(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));c<s.to&&/\s/.test(s.text[c-s.from]);)c++;i?{from:o,to:c}=i:o>s.from&&o<s.from+100&&!/\S/.test(s.text.slice(0,o))&&(o=s.from);let h=["",(0,d.SS)(t,f)];return i&&h.push((0,d.SS)(t,a.lineIndent(s.from,-1))),{changes:{from:o,to:c,insert:u.xv.of(h)},range:u.jT.cursor(o+1+h[1].length)}});return r(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function _(e,t){let r=-1;return e.changeByRange(n=>{let l=[];for(let c=n.from;c<=n.to;){let s=e.doc.lineAt(c);s.number>r&&(n.empty||n.to>s.from)&&(t(s,l,n),r=s.number),c=s.to+1}let o=e.changes(l);return{changes:l,range:u.jT.range(o.mapPos(n.anchor,1),o.mapPos(n.head,1))}})}const $t=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Object.create(null),n=new d.Gn(e,{overrideIndentation:o=>{let c=r[o];return c??-1}}),l=_(e,(o,c,s)=>{let i=(0,d.K0)(n,o.from);if(i==null)return;/\S/.test(o.text)||(i=0);let a=/^\s*/.exec(o.text)[0],f=(0,d.SS)(e,i);(a!=f||s.from<o.from+a.length)&&(r[o.from]=i,c.push({from:o.from,to:o.from+a.length,insert:f}))});return l.changes.empty||t(e.update(l,{userEvent:"indent"})),!0},ee=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(_(e,(r,n)=>{n.push({from:r.from,insert:e.facet(d.c)})}),{userEvent:"input.indent"})),!0),Ve=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(_(e,(r,n)=>{let l=/^\s*/.exec(r.text)[0];if(!l)return;let o=(0,u.IS)(l,e.tabSize),c=0,s=(0,d.SS)(e,Math.max(0,o-(0,d.y1)(e)));for(;c<l.length&&c<s.length&&l.charCodeAt(c)==s.charCodeAt(c);)c++;n.push({from:r.from+c,to:r.from+l.length,insert:s.slice(c)})}),{userEvent:"delete.dedent"})),!0),qt=e=>(e.setTabFocusMode(),!0),Un=e=>(e.setTabFocusMode(2e3),!0),jn=({state:e,dispatch:t})=>e.selection.ranges.some(r=>!r.empty)?ee({state:e,dispatch:t}):(t(e.update(e.replaceSelection(" "),{scrollIntoView:!0,userEvent:"input"})),!0),Qt=[{key:"Ctrl-b",run:ce,shift:Be,preventDefault:!0},{key:"Ctrl-f",run:se,shift:Ae},{key:"Ctrl-p",run:me,shift:xe},{key:"Ctrl-n",run:pe,shift:De},{key:"Ctrl-a",run:yt,shift:bt},{key:"Ctrl-e",run:kt,shift:Et},{key:"Ctrl-d",run:Re},{key:"Ctrl-h",run:X},{key:"Ctrl-k",run:jt},{key:"Ctrl-Alt-h",run:je},{key:"Ctrl-o",run:Nt},{key:"Ctrl-t",run:Pt},{key:"Ctrl-v",run:Y}],Yt=[{key:"ArrowLeft",run:ce,shift:Be,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:it,shift:Bt,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:pt,shift:Mt,preventDefault:!0},{key:"ArrowRight",run:se,shift:Ae,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ut,shift:At,preventDefault:!0},{mac:"Cmd-ArrowRight",run:gt,shift:Tt,preventDefault:!0},{key:"ArrowUp",run:me,shift:xe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Ee,shift:ve},{mac:"Ctrl-ArrowUp",run:ke,shift:Te},{key:"ArrowDown",run:pe,shift:De,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Oe,shift:Ie},{mac:"Ctrl-ArrowDown",run:Y,shift:be},{key:"PageUp",run:ke,shift:Te},{key:"PageDown",run:Y,shift:be},{key:"Home",run:mt,shift:Dt,preventDefault:!0},{key:"Mod-Home",run:Ee,shift:ve},{key:"End",run:dt,shift:xt,preventDefault:!0},{key:"Mod-End",run:Oe,shift:Ie},{key:"Enter",run:Ne,shift:Ne},{key:"Mod-a",run:Ot},{key:"Backspace",run:X,shift:X},{key:"Delete",run:Re},{key:"Mod-Backspace",mac:"Alt-Backspace",run:je},{key:"Mod-Delete",mac:"Alt-Delete",run:Ut},{mac:"Mod-Backspace",run:Gt},{mac:"Mod-Delete",run:Ft}].concat(Qt.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Zt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:at,shift:Ct},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:ht,shift:Lt},{key:"Alt-ArrowUp",run:Vt},{key:"Shift-Alt-ArrowUp",run:Jt},{key:"Alt-ArrowDown",run:zt},{key:"Shift-Alt-ArrowDown",run:wt},{key:"Escape",run:Rt},{key:"Mod-Enter",run:Kt},{key:"Alt-l",mac:"Ctrl-l",run:vt},{key:"Mod-i",run:It,preventDefault:!0},{key:"Mod-[",run:Ve},{key:"Mod-]",run:ee},{key:"Mod-Alt-\\",run:$t},{key:"Shift-Mod-k",run:Wt},{key:"Shift-Mod-\\",run:St},{key:"Mod-/",run:we},{key:"Alt-A",run:He},{key:"Ctrl-m",mac:"Shift-Alt-m",run:qt}].concat(Yt),Gn={key:"Tab",run:ee,shift:Ve};var ze=D(49892),V=D(34790),Xt=D(28519);const _t=(()=>[(0,p.Eu)(),(0,p.HQ)(),(0,p.AE)(),Xe(),(0,d.mi)(),(0,p.Uw)(),(0,p.qr)(),u.yy.allowMultipleSelections.of(!0),(0,d.nY)(),(0,d.nF)(d.R_,{fallback:!0}),(0,d.n$)(),(0,V.vQ)(),(0,V.ys)(),(0,p.Zs)(),(0,p.S2)(),(0,p.ZO)(),(0,ze.sW)(),p.$f.of([...V.GA,...Zt,...ze.Lp,...st,...d.e7,...V.B1,...Xt.Fv])])(),Fn=null}}]);
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7513],{50763:function(w,n,y){var I=this&&this.__createBinding||(Object.create?function(d,r,u,c){c===void 0&&(c=u);var s=Object.getOwnPropertyDescriptor(r,u);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[u]}}),Object.defineProperty(d,c,s)}:function(d,r,u,c){c===void 0&&(c=u),d[c]=r[u]}),l=this&&this.__setModuleDefault||(Object.create?function(d,r){Object.defineProperty(d,"default",{enumerable:!0,value:r})}:function(d,r){d.default=r}),i=this&&this.__importStar||function(d){if(d&&d.__esModule)return d;var r={};if(d!=null)for(var u in d)u!=="default"&&Object.prototype.hasOwnProperty.call(d,u)&&I(r,d,u);return l(r,d),r};Object.defineProperty(n,"__esModule",{value:!0}),n.Parser=void 0;var E=i(y(39889)),x=y(52194),f=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),m=new Set(["thead","tbody"]),p=new Set(["dd","dt"]),a=new Set(["rt","rp"]),v=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",o],["h1",o],["h2",o],["h3",o],["h4",o],["h5",o],["h6",o],["select",f],["input",f],["output",f],["button",f],["datalist",f],["textarea",f],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",p],["dt",p],["address",o],["article",o],["aside",o],["blockquote",o],["details",o],["div",o],["dl",o],["fieldset",o],["figcaption",o],["figure",o],["footer",o],["form",o],["header",o],["hr",o],["main",o],["nav",o],["ol",o],["pre",o],["section",o],["table",o],["ul",o],["rt",a],["rp",a],["tbody",m],["tfoot",m]]),t=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),e=new Set(["math","svg"]),h=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),b=/\s|\//,N=function(){function d(r,u){u===void 0&&(u={});var c,s,g,T,S;this.options=u,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=r??{},this.lowerCaseTagNames=(c=u.lowerCaseTags)!==null&&c!==void 0?c:!u.xmlMode,this.lowerCaseAttributeNames=(s=u.lowerCaseAttributeNames)!==null&&s!==void 0?s:!u.xmlMode,this.tokenizer=new((g=u.Tokenizer)!==null&&g!==void 0?g:E.default)(this.options,this),(S=(T=this.cbs).onparserinit)===null||S===void 0||S.call(T,this)}return d.prototype.ontext=function(r,u){var c,s,g=this.getSlice(r,u);this.endIndex=u-1,(s=(c=this.cbs).ontext)===null||s===void 0||s.call(c,g),this.startIndex=u},d.prototype.ontextentity=function(r){var u,c,s=this.tokenizer.getSectionStart();this.endIndex=s-1,(c=(u=this.cbs).ontext)===null||c===void 0||c.call(u,(0,x.fromCodePoint)(r)),this.startIndex=s},d.prototype.isVoidElement=function(r){return!this.options.xmlMode&&t.has(r)},d.prototype.onopentagname=function(r,u){this.endIndex=u;var c=this.getSlice(r,u);this.lowerCaseTagNames&&(c=c.toLowerCase()),this.emitOpenTag(c)},d.prototype.emitOpenTag=function(r){var u,c,s,g;this.openTagStart=this.startIndex,this.tagname=r;var T=!this.options.xmlMode&&v.get(r);if(T)for(;this.stack.length>0&&T.has(this.stack[this.stack.length-1]);){var S=this.stack.pop();(c=(u=this.cbs).onclosetag)===null||c===void 0||c.call(u,S,!0)}this.isVoidElement(r)||(this.stack.push(r),e.has(r)?this.foreignContext.push(!0):h.has(r)&&this.foreignContext.push(!1)),(g=(s=this.cbs).onopentagname)===null||g===void 0||g.call(s,r),this.cbs.onopentag&&(this.attribs={})},d.prototype.endOpenTag=function(r){var u,c;this.startIndex=this.openTagStart,this.attribs&&((c=(u=this.cbs).onopentag)===null||c===void 0||c.call(u,this.tagname,this.attribs,r),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},d.prototype.onopentagend=function(r){this.endIndex=r,this.endOpenTag(!1),this.startIndex=r+1},d.prototype.onclosetag=function(r,u){var c,s,g,T,S,A;this.endIndex=u;var _=this.getSlice(r,u);if(this.lowerCaseTagNames&&(_=_.toLowerCase()),(e.has(_)||h.has(_))&&this.foreignContext.pop(),this.isVoidElement(_))!this.options.xmlMode&&_==="br"&&((s=(c=this.cbs).onopentagname)===null||s===void 0||s.call(c,"br"),(T=(g=this.cbs).onopentag)===null||T===void 0||T.call(g,"br",{},!0),(A=(S=this.cbs).onclosetag)===null||A===void 0||A.call(S,"br",!1));else{var O=this.stack.lastIndexOf(_);if(O!==-1)if(this.cbs.onclosetag)for(var D=this.stack.length-O;D--;)this.cbs.onclosetag(this.stack.pop(),D!==0);else this.stack.length=O;else!this.options.xmlMode&&_==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=u+1},d.prototype.onselfclosingtag=function(r){this.endIndex=r,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=r+1):this.onopentagend(r)},d.prototype.closeCurrentTag=function(r){var u,c,s=this.tagname;this.endOpenTag(r),this.stack[this.stack.length-1]===s&&((c=(u=this.cbs).onclosetag)===null||c===void 0||c.call(u,s,!r),this.stack.pop())},d.prototype.onattribname=function(r,u){this.startIndex=r;var c=this.getSlice(r,u);this.attribname=this.lowerCaseAttributeNames?c.toLowerCase():c},d.prototype.onattribdata=function(r,u){this.attribvalue+=this.getSlice(r,u)},d.prototype.onattribentity=function(r){this.attribvalue+=(0,x.fromCodePoint)(r)},d.prototype.onattribend=function(r,u){var c,s;this.endIndex=u,(s=(c=this.cbs).onattribute)===null||s===void 0||s.call(c,this.attribname,this.attribvalue,r===E.QuoteType.Double?'"':r===E.QuoteType.Single?"'":r===E.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},d.prototype.getInstructionName=function(r){var u=r.search(b),c=u<0?r:r.substr(0,u);return this.lowerCaseTagNames&&(c=c.toLowerCase()),c},d.prototype.ondeclaration=function(r,u){this.endIndex=u;var c=this.getSlice(r,u);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(c);this.cbs.onprocessinginstruction("!".concat(s),"!".concat(c))}this.startIndex=u+1},d.prototype.onprocessinginstruction=function(r,u){this.endIndex=u;var c=this.getSlice(r,u);if(this.cbs.onprocessinginstruction){var s=this.getInstructionName(c);this.cbs.onprocessinginstruction("?".concat(s),"?".concat(c))}this.startIndex=u+1},d.prototype.oncomment=function(r,u,c){var s,g,T,S;this.endIndex=u,(g=(s=this.cbs).oncomment)===null||g===void 0||g.call(s,this.getSlice(r,u-c)),(S=(T=this.cbs).oncommentend)===null||S===void 0||S.call(T),this.startIndex=u+1},d.prototype.oncdata=function(r,u,c){var s,g,T,S,A,_,O,D,C,B;this.endIndex=u;var P=this.getSlice(r,u-c);this.options.xmlMode||this.options.recognizeCDATA?((g=(s=this.cbs).oncdatastart)===null||g===void 0||g.call(s),(S=(T=this.cbs).ontext)===null||S===void 0||S.call(T,P),(_=(A=this.cbs).oncdataend)===null||_===void 0||_.call(A)):((D=(O=this.cbs).oncomment)===null||D===void 0||D.call(O,"[CDATA[".concat(P,"]]")),(B=(C=this.cbs).oncommentend)===null||B===void 0||B.call(C)),this.startIndex=u+1},d.prototype.onend=function(){var r,u;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var c=this.stack.length;c>0;this.cbs.onclosetag(this.stack[--c],!0));}(u=(r=this.cbs).onend)===null||u===void 0||u.call(r)},d.prototype.reset=function(){var r,u,c,s;(u=(r=this.cbs).onreset)===null||u===void 0||u.call(r),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(c=this.cbs).onparserinit)===null||s===void 0||s.call(c,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},d.prototype.parseComplete=function(r){this.reset(),this.end(r)},d.prototype.getSlice=function(r,u){for(;r-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var c=this.buffers[0].slice(r-this.bufferOffset,u-this.bufferOffset);u-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),c+=this.buffers[0].slice(0,u-this.bufferOffset);return c},d.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},d.prototype.write=function(r){var u,c;if(this.ended){(c=(u=this.cbs).onerror)===null||c===void 0||c.call(u,new Error(".write() after done!"));return}this.buffers.push(r),this.tokenizer.running&&(this.tokenizer.write(r),this.writeIndex++)},d.prototype.end=function(r){var u,c;if(this.ended){(c=(u=this.cbs).onerror)===null||c===void 0||c.call(u,new Error(".end() after done!"));return}r&&this.write(r),this.ended=!0,this.tokenizer.end()},d.prototype.pause=function(){this.tokenizer.pause()},d.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},d.prototype.parseChunk=function(r){this.write(r)},d.prototype.done=function(r){this.end(r)},d}();n.Parser=N},39889:function(w,n,y){Object.defineProperty(n,"__esModule",{value:!0}),n.QuoteType=void 0;var I=y(52194),l;(function(t){t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.ExclamationMark=33]="ExclamationMark",t[t.Number=35]="Number",t[t.Amp=38]="Amp",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Dash=45]="Dash",t[t.Slash=47]="Slash",t[t.Zero=48]="Zero",t[t.Nine=57]="Nine",t[t.Semi=59]="Semi",t[t.Lt=60]="Lt",t[t.Eq=61]="Eq",t[t.Gt=62]="Gt",t[t.Questionmark=63]="Questionmark",t[t.UpperA=65]="UpperA",t[t.LowerA=97]="LowerA",t[t.UpperF=70]="UpperF",t[t.LowerF=102]="LowerF",t[t.UpperZ=90]="UpperZ",t[t.LowerZ=122]="LowerZ",t[t.LowerX=120]="LowerX",t[t.OpeningSquareBracket=91]="OpeningSquareBracket"})(l||(l={}));var i;(function(t){t[t.Text=1]="Text",t[t.BeforeTagName=2]="BeforeTagName",t[t.InTagName=3]="InTagName",t[t.InSelfClosingTag=4]="InSelfClosingTag",t[t.BeforeClosingTagName=5]="BeforeClosingTagName",t[t.InClosingTagName=6]="InClosingTagName",t[t.AfterClosingTagName=7]="AfterClosingTagName",t[t.BeforeAttributeName=8]="BeforeAttributeName",t[t.InAttributeName=9]="InAttributeName",t[t.AfterAttributeName=10]="AfterAttributeName",t[t.BeforeAttributeValue=11]="BeforeAttributeValue",t[t.InAttributeValueDq=12]="InAttributeValueDq",t[t.InAttributeValueSq=13]="InAttributeValueSq",t[t.InAttributeValueNq=14]="InAttributeValueNq",t[t.BeforeDeclaration=15]="BeforeDeclaration",t[t.InDeclaration=16]="InDeclaration",t[t.InProcessingInstruction=17]="InProcessingInstruction",t[t.BeforeComment=18]="BeforeComment",t[t.CDATASequence=19]="CDATASequence",t[t.InSpecialComment=20]="InSpecialComment",t[t.InCommentLike=21]="InCommentLike",t[t.BeforeSpecialS=22]="BeforeSpecialS",t[t.SpecialStartSequence=23]="SpecialStartSequence",t[t.InSpecialTag=24]="InSpecialTag",t[t.BeforeEntity=25]="BeforeEntity",t[t.BeforeNumericEntity=26]="BeforeNumericEntity",t[t.InNamedEntity=27]="InNamedEntity",t[t.InNumericEntity=28]="InNumericEntity",t[t.InHexEntity=29]="InHexEntity"})(i||(i={}));function E(t){return t===l.Space||t===l.NewLine||t===l.Tab||t===l.FormFeed||t===l.CarriageReturn}function x(t){return t===l.Slash||t===l.Gt||E(t)}function f(t){return t>=l.Zero&&t<=l.Nine}function o(t){return t>=l.LowerA&&t<=l.LowerZ||t>=l.UpperA&&t<=l.UpperZ}function m(t){return t>=l.UpperA&&t<=l.UpperF||t>=l.LowerA&&t<=l.LowerF}var p;(function(t){t[t.NoValue=0]="NoValue",t[t.Unquoted=1]="Unquoted",t[t.Single=2]="Single",t[t.Double=3]="Double"})(p=n.QuoteType||(n.QuoteType={}));var a={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},v=function(){function t(e,h){var b=e.xmlMode,N=b===void 0?!1:b,d=e.decodeEntities,r=d===void 0?!0:d;this.cbs=h,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=N,this.decodeEntities=r,this.entityTrie=N?I.xmlDecodeTree:I.htmlDecodeTree}return t.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},t.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},t.prototype.end=function(){this.running&&this.finish()},t.prototype.pause=function(){this.running=!1},t.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},t.prototype.getIndex=function(){return this.index},t.prototype.getSectionStart=function(){return this.sectionStart},t.prototype.stateText=function(e){e===l.Lt||!this.decodeEntities&&this.fastForwardTo(l.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===l.Amp&&(this.state=i.BeforeEntity)},t.prototype.stateSpecialStartSequence=function(e){var h=this.sequenceIndex===this.currentSequence.length,b=h?x(e):(e|32)===this.currentSequence[this.sequenceIndex];if(!b)this.isSpecial=!1;else if(!h){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},t.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===l.Gt||E(e)){var h=this.index-this.currentSequence.length;if(this.sectionStart<h){var b=this.index;this.index=h,this.cbs.ontext(this.sectionStart,h),this.index=b}this.isSpecial=!1,this.sectionStart=h+2,this.stateInClosingTagName(e);return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===a.TitleEnd?this.decodeEntities&&e===l.Amp&&(this.state=i.BeforeEntity):this.fastForwardTo(l.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===l.Lt)},t.prototype.stateCDATASequence=function(e){e===a.Cdata[this.sequenceIndex]?++this.sequenceIndex===a.Cdata.length&&(this.state=i.InCommentLike,this.currentSequence=a.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=i.InDeclaration,this.stateInDeclaration(e))},t.prototype.fastForwardTo=function(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1},t.prototype.stateInCommentLike=function(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===a.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=i.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},t.prototype.isTagStartChar=function(e){return this.xmlMode?!x(e):o(e)},t.prototype.startSpecial=function(e,h){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=h,this.state=i.SpecialStartSequence},t.prototype.stateBeforeTagName=function(e){if(e===l.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===l.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var h=e|32;this.sectionStart=this.index,!this.xmlMode&&h===a.TitleEnd[2]?this.startSpecial(a.TitleEnd,3):this.state=!this.xmlMode&&h===a.ScriptEnd[2]?i.BeforeSpecialS:i.InTagName}else e===l.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},t.prototype.stateInTagName=function(e){x(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},t.prototype.stateBeforeClosingTagName=function(e){E(e)||(e===l.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},t.prototype.stateInClosingTagName=function(e){(e===l.Gt||E(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},t.prototype.stateAfterClosingTagName=function(e){(e===l.Gt||this.fastForwardTo(l.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},t.prototype.stateBeforeAttributeName=function(e){e===l.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===l.Slash?this.state=i.InSelfClosingTag:E(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},t.prototype.stateInSelfClosingTag=function(e){e===l.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):E(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},t.prototype.stateInAttributeName=function(e){(e===l.Eq||x(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},t.prototype.stateAfterAttributeName=function(e){e===l.Eq?this.state=i.BeforeAttributeValue:e===l.Slash||e===l.Gt?(this.cbs.onattribend(p.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):E(e)||(this.cbs.onattribend(p.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},t.prototype.stateBeforeAttributeValue=function(e){e===l.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===l.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):E(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},t.prototype.handleInAttributeValue=function(e,h){e===h||!this.decodeEntities&&this.fastForwardTo(h)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(h===l.DoubleQuote?p.Double:p.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===l.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},t.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,l.DoubleQuote)},t.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,l.SingleQuote)},t.prototype.stateInAttributeValueNoQuotes=function(e){E(e)||e===l.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(p.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===l.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},t.prototype.stateBeforeDeclaration=function(e){e===l.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===l.Dash?i.BeforeComment:i.InDeclaration},t.prototype.stateInDeclaration=function(e){(e===l.Gt||this.fastForwardTo(l.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},t.prototype.stateInProcessingInstruction=function(e){(e===l.Gt||this.fastForwardTo(l.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},t.prototype.stateBeforeComment=function(e){e===l.Dash?(this.state=i.InCommentLike,this.currentSequence=a.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},t.prototype.stateInSpecialComment=function(e){(e===l.Gt||this.fastForwardTo(l.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},t.prototype.stateBeforeSpecialS=function(e){var h=e|32;h===a.ScriptEnd[3]?this.startSpecial(a.ScriptEnd,4):h===a.StyleEnd[3]?this.startSpecial(a.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},t.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===l.Number?this.state=i.BeforeNumericEntity:e===l.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},t.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,I.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var h=this.trieCurrent&I.BinTrieFlags.VALUE_LENGTH;if(h){var b=(h>>14)-1;if(!this.allowLegacyEntity()&&e!==l.Semi)this.trieIndex+=b;else{var N=this.index-this.entityExcess+1;N>this.sectionStart&&this.emitPartial(this.sectionStart,N),this.entityResult=this.trieIndex,this.trieIndex+=b,this.entityExcess=0,this.sectionStart=this.index+1,b===0&&this.emitNamedEntity()}}},t.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var e=(this.entityTrie[this.entityResult]&I.BinTrieFlags.VALUE_LENGTH)>>14;switch(e){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~I.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},t.prototype.stateBeforeNumericEntity=function(e){(e|32)===l.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},t.prototype.emitNumericEntity=function(e){var h=this.index-this.entityExcess-1,b=h+2+ +(this.state===i.InHexEntity);b!==this.index&&(h>this.sectionStart&&this.emitPartial(this.sectionStart,h),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,I.replaceCodePoint)(this.entityResult))),this.state=this.baseState},t.prototype.stateInNumericEntity=function(e){e===l.Semi?this.emitNumericEntity(!0):f(e)?(this.entityResult=this.entityResult*10+(e-l.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},t.prototype.stateInHexEntity=function(e){e===l.Semi?this.emitNumericEntity(!0):f(e)?(this.entityResult=this.entityResult*16+(e-l.Zero),this.entityExcess++):m(e)?(this.entityResult=this.entityResult*16+((e|32)-l.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},t.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},t.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===i.InAttributeValueDq||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},t.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},t.prototype.parse=function(){for(;this.shouldContinue();){var e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case i.Text:{this.stateText(e);break}case i.SpecialStartSequence:{this.stateSpecialStartSequence(e);break}case i.InSpecialTag:{this.stateInSpecialTag(e);break}case i.CDATASequence:{this.stateCDATASequence(e);break}case i.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(e);break}case i.InAttributeName:{this.stateInAttributeName(e);break}case i.InCommentLike:{this.stateInCommentLike(e);break}case i.InSpecialComment:{this.stateInSpecialComment(e);break}case i.BeforeAttributeName:{this.stateBeforeAttributeName(e);break}case i.InTagName:{this.stateInTagName(e);break}case i.InClosingTagName:{this.stateInClosingTagName(e);break}case i.BeforeTagName:{this.stateBeforeTagName(e);break}case i.AfterAttributeName:{this.stateAfterAttributeName(e);break}case i.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(e);break}case i.BeforeAttributeValue:{this.stateBeforeAttributeValue(e);break}case i.BeforeClosingTagName:{this.stateBeforeClosingTagName(e);break}case i.AfterClosingTagName:{this.stateAfterClosingTagName(e);break}case i.BeforeSpecialS:{this.stateBeforeSpecialS(e);break}case i.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(e);break}case i.InSelfClosingTag:{this.stateInSelfClosingTag(e);break}case i.InDeclaration:{this.stateInDeclaration(e);break}case i.BeforeDeclaration:{this.stateBeforeDeclaration(e);break}case i.BeforeComment:{this.stateBeforeComment(e);break}case i.InProcessingInstruction:{this.stateInProcessingInstruction(e);break}case i.InNamedEntity:{this.stateInNamedEntity(e);break}case i.BeforeEntity:{this.stateBeforeEntity(e);break}case i.InHexEntity:{this.stateInHexEntity(e);break}case i.InNumericEntity:{this.stateInNumericEntity(e);break}default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()},t.prototype.finish=function(){this.state===i.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},t.prototype.handleTrailingData=function(){var e=this.buffer.length+this.offset;this.state===i.InCommentLike?this.currentSequence===a.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===i.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,e)},t.prototype.emitPartial=function(e,h){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribdata(e,h):this.cbs.ontext(e,h)},t.prototype.emitCodePoint=function(e){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)},t}();n.default=v},23719:function(w,n,y){var I=this&&this.__createBinding||(Object.create?function(d,r,u,c){c===void 0&&(c=u);var s=Object.getOwnPropertyDescriptor(r,u);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[u]}}),Object.defineProperty(d,c,s)}:function(d,r,u,c){c===void 0&&(c=u),d[c]=r[u]}),l=this&&this.__setModuleDefault||(Object.create?function(d,r){Object.defineProperty(d,"default",{enumerable:!0,value:r})}:function(d,r){d.default=r}),i=this&&this.__importStar||function(d){if(d&&d.__esModule)return d;var r={};if(d!=null)for(var u in d)u!=="default"&&Object.prototype.hasOwnProperty.call(d,u)&&I(r,d,u);return l(r,d),r},E=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomUtils=n.parseFeed=n.getFeed=n.ElementType=n.Tokenizer=n.createDomStream=n.parseDOM=n.parseDocument=n.DefaultHandler=n.DomHandler=n.Parser=void 0;var x=y(50763),f=y(50763);Object.defineProperty(n,"Parser",{enumerable:!0,get:function(){return f.Parser}});var o=y(47915),m=y(47915);Object.defineProperty(n,"DomHandler",{enumerable:!0,get:function(){return m.DomHandler}}),Object.defineProperty(n,"DefaultHandler",{enumerable:!0,get:function(){return m.DomHandler}});function p(d,r){var u=new o.DomHandler(void 0,r);return new x.Parser(u,r).end(d),u.root}n.parseDocument=p;function a(d,r){return p(d,r).children}n.parseDOM=a;function v(d,r,u){var c=new o.DomHandler(d,r,u);return new x.Parser(c,r)}n.createDomStream=v;var t=y(39889);Object.defineProperty(n,"Tokenizer",{enumerable:!0,get:function(){return E(t).default}}),n.ElementType=i(y(99960));var e=y(40998),h=y(40998);Object.defineProperty(n,"getFeed",{enumerable:!0,get:function(){return h.getFeed}});var b={xmlMode:!0};function N(d,r){return r===void 0&&(r=b),(0,e.getFeed)(a(d,r))}n.parseFeed=N,n.DomUtils=i(y(40998))},34028:function(w,n){Object.defineProperty(n,"__esModule",{value:!0}),n.attributeNames=n.elementNames=void 0,n.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(y){return[y.toLowerCase(),y]})),n.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(y){return[y.toLowerCase(),y]}))},91203:function(w,n,y){var I=this&&this.__assign||function(){return I=Object.assign||function(s){for(var g,T=1,S=arguments.length;T<S;T++){g=arguments[T];for(var A in g)Object.prototype.hasOwnProperty.call(g,A)&&(s[A]=g[A])}return s},I.apply(this,arguments)},l=this&&this.__createBinding||(Object.create?function(s,g,T,S){S===void 0&&(S=T);var A=Object.getOwnPropertyDescriptor(g,T);(!A||("get"in A?!g.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return g[T]}}),Object.defineProperty(s,S,A)}:function(s,g,T,S){S===void 0&&(S=T),s[S]=g[T]}),i=this&&this.__setModuleDefault||(Object.create?function(s,g){Object.defineProperty(s,"default",{enumerable:!0,value:g})}:function(s,g){s.default=g}),E=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var g={};if(s!=null)for(var T in s)T!=="default"&&Object.prototype.hasOwnProperty.call(s,T)&&l(g,s,T);return i(g,s),g};Object.defineProperty(n,"__esModule",{value:!0}),n.render=void 0;var x=E(y(99960)),f=y(45863),o=y(34028),m=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function p(s){return s.replace(/"/g,"&quot;")}function a(s,g){var T;if(s){var S=((T=g.encodeEntities)!==null&&T!==void 0?T:g.decodeEntities)===!1?p:g.xmlMode||g.encodeEntities!=="utf8"?f.encodeXML:f.escapeAttribute;return Object.keys(s).map(function(A){var _,O,D=(_=s[A])!==null&&_!==void 0?_:"";return g.xmlMode==="foreign"&&(A=(O=o.attributeNames.get(A))!==null&&O!==void 0?O:A),!g.emptyAttrs&&!g.xmlMode&&D===""?A:"".concat(A,'="').concat(S(D),'"')}).join(" ")}}var v=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function t(s,g){g===void 0&&(g={});for(var T=("length"in s)?s:[s],S="",A=0;A<T.length;A++)S+=e(T[A],g);return S}n.render=t,n.default=t;function e(s,g){switch(s.type){case x.Root:return t(s.children,g);case x.Doctype:case x.Directive:return d(s);case x.Comment:return c(s);case x.CDATA:return u(s);case x.Script:case x.Style:case x.Tag:return N(s,g);case x.Text:return r(s,g)}}var h=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),b=new Set(["svg","math"]);function N(s,g){var T;g.xmlMode==="foreign"&&(s.name=(T=o.elementNames.get(s.name))!==null&&T!==void 0?T:s.name,s.parent&&h.has(s.parent.name)&&(g=I(I({},g),{xmlMode:!1}))),!g.xmlMode&&b.has(s.name)&&(g=I(I({},g),{xmlMode:"foreign"}));var S="<".concat(s.name),A=a(s.attribs,g);return A&&(S+=" ".concat(A)),s.children.length===0&&(g.xmlMode?g.selfClosingTags!==!1:g.selfClosingTags&&v.has(s.name))?(g.xmlMode||(S+=" "),S+="/>"):(S+=">",s.children.length>0&&(S+=t(s.children,g)),(g.xmlMode||!v.has(s.name))&&(S+="</".concat(s.name,">"))),S}function d(s){return"<".concat(s.data,">")}function r(s,g){var T,S=s.data||"";return((T=g.encodeEntities)!==null&&T!==void 0?T:g.decodeEntities)!==!1&&!(!g.xmlMode&&s.parent&&m.has(s.parent.name))&&(S=g.xmlMode||g.encodeEntities!=="utf8"?(0,f.encodeXML)(S):(0,f.escapeText)(S)),S}function u(s){return"<![CDATA[".concat(s.children[0].data,"]]>")}function c(s){return"<!--".concat(s.data,"-->")}},34921:function(w,n,y){Object.defineProperty(n,"__esModule",{value:!0}),n.getFeed=void 0;var I=y(72178),l=y(55355);function i(e){var h=p(t,e);return h?h.name==="feed"?E(h):x(h):null}n.getFeed=i;function E(e){var h,b=e.children,N={type:"atom",items:(0,l.getElementsByTagName)("entry",b).map(function(u){var c,s=u.children,g={media:m(s)};v(g,"id","id",s),v(g,"title","title",s);var T=(c=p("link",s))===null||c===void 0?void 0:c.attribs.href;T&&(g.link=T);var S=a("summary",s)||a("content",s);S&&(g.description=S);var A=a("updated",s);return A&&(g.pubDate=new Date(A)),g})};v(N,"id","id",b),v(N,"title","title",b);var d=(h=p("link",b))===null||h===void 0?void 0:h.attribs.href;d&&(N.link=d),v(N,"description","subtitle",b);var r=a("updated",b);return r&&(N.updated=new Date(r)),v(N,"author","email",b,!0),N}function x(e){var h,b,N=(b=(h=p("channel",e.children))===null||h===void 0?void 0:h.children)!==null&&b!==void 0?b:[],d={type:e.name.substr(0,3),id:"",items:(0,l.getElementsByTagName)("item",e.children).map(function(u){var c=u.children,s={media:m(c)};v(s,"id","guid",c),v(s,"title","title",c),v(s,"link","link",c),v(s,"description","description",c);var g=a("pubDate",c)||a("dc:date",c);return g&&(s.pubDate=new Date(g)),s})};v(d,"title","title",N),v(d,"link","link",N),v(d,"description","description",N);var r=a("lastBuildDate",N);return r&&(d.updated=new Date(r)),v(d,"author","managingEditor",N,!0),d}var f=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function m(e){return(0,l.getElementsByTagName)("media:content",e).map(function(h){for(var b=h.attribs,N={medium:b.medium,isDefault:!!b.isDefault},d=0,r=f;d<r.length;d++){var u=r[d];b[u]&&(N[u]=b[u])}for(var c=0,s=o;c<s.length;c++){var u=s[c];b[u]&&(N[u]=parseInt(b[u],10))}return b.expression&&(N.expression=b.expression),N})}function p(e,h){return(0,l.getElementsByTagName)(e,h,!0,1)[0]}function a(e,h,b){return b===void 0&&(b=!1),(0,I.textContent)((0,l.getElementsByTagName)(e,h,b,1)).trim()}function v(e,h,b,N,d){d===void 0&&(d=!1);var r=a(b,N,d);r&&(e[h]=r)}function t(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}},99256:function(w,n,y){Object.defineProperty(n,"__esModule",{value:!0}),n.uniqueSort=n.compareDocumentPosition=n.DocumentPosition=n.removeSubsets=void 0;var I=y(47915);function l(f){for(var o=f.length;--o>=0;){var m=f[o];if(o>0&&f.lastIndexOf(m,o-1)>=0){f.splice(o,1);continue}for(var p=m.parent;p;p=p.parent)if(f.includes(p)){f.splice(o,1);break}}return f}n.removeSubsets=l;var i;(function(f){f[f.DISCONNECTED=1]="DISCONNECTED",f[f.PRECEDING=2]="PRECEDING",f[f.FOLLOWING=4]="FOLLOWING",f[f.CONTAINS=8]="CONTAINS",f[f.CONTAINED_BY=16]="CONTAINED_BY"})(i=n.DocumentPosition||(n.DocumentPosition={}));function E(f,o){var m=[],p=[];if(f===o)return 0;for(var a=(0,I.hasChildren)(f)?f:f.parent;a;)m.unshift(a),a=a.parent;for(a=(0,I.hasChildren)(o)?o:o.parent;a;)p.unshift(a),a=a.parent;for(var v=Math.min(m.length,p.length),t=0;t<v&&m[t]===p[t];)t++;if(t===0)return i.DISCONNECTED;var e=m[t-1],h=e.children,b=m[t],N=p[t];return h.indexOf(b)>h.indexOf(N)?e===o?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:e===f?i.PRECEDING|i.CONTAINS:i.PRECEDING}n.compareDocumentPosition=E;function x(f){return f=f.filter(function(o,m,p){return!p.includes(o,m+1)}),f.sort(function(o,m){var p=E(o,m);return p&i.PRECEDING?-1:p&i.FOLLOWING?1:0}),f}n.uniqueSort=x},40998:function(w,n,y){var I=this&&this.__createBinding||(Object.create?function(E,x,f,o){o===void 0&&(o=f);var m=Object.getOwnPropertyDescriptor(x,f);(!m||("get"in m?!x.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return x[f]}}),Object.defineProperty(E,o,m)}:function(E,x,f,o){o===void 0&&(o=f),E[o]=x[f]}),l=this&&this.__exportStar||function(E,x){for(var f in E)f!=="default"&&!Object.prototype.hasOwnProperty.call(x,f)&&I(x,E,f)};Object.defineProperty(n,"__esModule",{value:!0}),n.hasChildren=n.isDocument=n.isComment=n.isText=n.isCDATA=n.isTag=void 0,l(y(72178),n),l(y(61699),n),l(y(26167),n),l(y(46754),n),l(y(55355),n),l(y(99256),n),l(y(34921),n);var i=y(47915);Object.defineProperty(n,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(n,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(n,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(n,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(n,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(n,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})},55355:function(w,n,y){Object.defineProperty(n,"__esModule",{value:!0}),n.getElementsByTagType=n.getElementsByTagName=n.getElementById=n.getElements=n.testElement=void 0;var I=y(47915),l=y(46754),i={tag_name:function(t){return typeof t=="function"?function(e){return(0,I.isTag)(e)&&t(e.name)}:t==="*"?I.isTag:function(e){return(0,I.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,I.isText)(e)&&t(e.data)}:function(e){return(0,I.isText)(e)&&e.data===t}}};function E(t,e){return typeof e=="function"?function(h){return(0,I.isTag)(h)&&e(h.attribs[t])}:function(h){return(0,I.isTag)(h)&&h.attribs[t]===e}}function x(t,e){return function(h){return t(h)||e(h)}}function f(t){var e=Object.keys(t).map(function(h){var b=t[h];return Object.prototype.hasOwnProperty.call(i,h)?i[h](b):E(h,b)});return e.length===0?null:e.reduce(x)}function o(t,e){var h=f(t);return h?h(e):!0}n.testElement=o;function m(t,e,h,b){b===void 0&&(b=1/0);var N=f(t);return N?(0,l.filter)(N,e,h,b):[]}n.getElements=m;function p(t,e,h){return h===void 0&&(h=!0),Array.isArray(e)||(e=[e]),(0,l.findOne)(E("id",t),e,h)}n.getElementById=p;function a(t,e,h,b){return h===void 0&&(h=!0),b===void 0&&(b=1/0),(0,l.filter)(i.tag_name(t),e,h,b)}n.getElementsByTagName=a;function v(t,e,h,b){return h===void 0&&(h=!0),b===void 0&&(b=1/0),(0,l.filter)(i.tag_type(t),e,h,b)}n.getElementsByTagType=v},26167:function(w,n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=n.prependChild=n.append=n.appendChild=n.replaceElement=n.removeElement=void 0;function y(f){if(f.prev&&(f.prev.next=f.next),f.next&&(f.next.prev=f.prev),f.parent){var o=f.parent.children,m=o.lastIndexOf(f);m>=0&&o.splice(m,1)}f.next=null,f.prev=null,f.parent=null}n.removeElement=y;function I(f,o){var m=o.prev=f.prev;m&&(m.next=o);var p=o.next=f.next;p&&(p.prev=o);var a=o.parent=f.parent;if(a){var v=a.children;v[v.lastIndexOf(f)]=o,f.parent=null}}n.replaceElement=I;function l(f,o){if(y(o),o.next=null,o.parent=f,f.children.push(o)>1){var m=f.children[f.children.length-2];m.next=o,o.prev=m}else o.prev=null}n.appendChild=l;function i(f,o){y(o);var m=f.parent,p=f.next;if(o.next=p,o.prev=f,f.next=o,o.parent=m,p){if(p.prev=o,m){var a=m.children;a.splice(a.lastIndexOf(p),0,o)}}else m&&m.children.push(o)}n.append=i;function E(f,o){if(y(o),o.parent=f,o.prev=null,f.children.unshift(o)!==1){var m=f.children[1];m.prev=o,o.next=m}else o.next=null}n.prependChild=E;function x(f,o){y(o);var m=f.parent;if(m){var p=m.children;p.splice(p.indexOf(f),0,o)}f.prev&&(f.prev.next=o),o.parent=m,o.prev=f.prev,o.next=f,f.prev=o}n.prepend=x},46754:function(w,n,y){Object.defineProperty(n,"__esModule",{value:!0}),n.findAll=n.existsOne=n.findOne=n.findOneChild=n.find=n.filter=void 0;var I=y(47915);function l(m,p,a,v){return a===void 0&&(a=!0),v===void 0&&(v=1/0),i(m,Array.isArray(p)?p:[p],a,v)}n.filter=l;function i(m,p,a,v){for(var t=[],e=[p],h=[0];;){if(h[0]>=e[0].length){if(h.length===1)return t;e.shift(),h.shift();continue}var b=e[0][h[0]++];if(m(b)&&(t.push(b),--v<=0))return t;a&&(0,I.hasChildren)(b)&&b.children.length>0&&(h.unshift(0),e.unshift(b.children))}}n.find=i;function E(m,p){return p.find(m)}n.findOneChild=E;function x(m,p,a){a===void 0&&(a=!0);for(var v=null,t=0;t<p.length&&!v;t++){var e=p[t];if((0,I.isTag)(e))m(e)?v=e:a&&e.children.length>0&&(v=x(m,e.children,!0));else continue}return v}n.findOne=x;function f(m,p){return p.some(function(a){return(0,I.isTag)(a)&&(m(a)||f(m,a.children))})}n.existsOne=f;function o(m,p){for(var a=[],v=[p],t=[0];;){if(t[0]>=v[0].length){if(v.length===1)return a;v.shift(),t.shift();continue}var e=v[0][t[0]++];(0,I.isTag)(e)&&(m(e)&&a.push(e),e.children.length>0&&(t.unshift(0),v.unshift(e.children)))}}n.findAll=o},72178:function(w,n,y){var I=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(n,"__esModule",{value:!0}),n.innerText=n.textContent=n.getText=n.getInnerHTML=n.getOuterHTML=void 0;var l=y(47915),i=I(y(91203)),E=y(99960);function x(a,v){return(0,i.default)(a,v)}n.getOuterHTML=x;function f(a,v){return(0,l.hasChildren)(a)?a.children.map(function(t){return x(t,v)}).join(""):""}n.getInnerHTML=f;function o(a){return Array.isArray(a)?a.map(o).join(""):(0,l.isTag)(a)?a.name==="br"?`
2
+ `:o(a.children):(0,l.isCDATA)(a)?o(a.children):(0,l.isText)(a)?a.data:""}n.getText=o;function m(a){return Array.isArray(a)?a.map(m).join(""):(0,l.hasChildren)(a)&&!(0,l.isComment)(a)?m(a.children):(0,l.isText)(a)?a.data:""}n.textContent=m;function p(a){return Array.isArray(a)?a.map(p).join(""):(0,l.hasChildren)(a)&&(a.type===E.ElementType.Tag||(0,l.isCDATA)(a))?p(a.children):(0,l.isText)(a)?a.data:""}n.innerText=p},61699:function(w,n,y){Object.defineProperty(n,"__esModule",{value:!0}),n.prevElementSibling=n.nextElementSibling=n.getName=n.hasAttrib=n.getAttributeValue=n.getSiblings=n.getParent=n.getChildren=void 0;var I=y(47915);function l(a){return(0,I.hasChildren)(a)?a.children:[]}n.getChildren=l;function i(a){return a.parent||null}n.getParent=i;function E(a){var v,t,e=i(a);if(e!=null)return l(e);for(var h=[a],b=a.prev,N=a.next;b!=null;)h.unshift(b),v=b,b=v.prev;for(;N!=null;)h.push(N),t=N,N=t.next;return h}n.getSiblings=E;function x(a,v){var t;return(t=a.attribs)===null||t===void 0?void 0:t[v]}n.getAttributeValue=x;function f(a,v){return a.attribs!=null&&Object.prototype.hasOwnProperty.call(a.attribs,v)&&a.attribs[v]!=null}n.hasAttrib=f;function o(a){return a.name}n.getName=o;function m(a){for(var v,t=a.next;t!==null&&!(0,I.isTag)(t);)v=t,t=v.next;return t}n.nextElementSibling=m;function p(a){for(var v,t=a.prev;t!==null&&!(0,I.isTag)(t);)v=t,t=v.prev;return t}n.prevElementSibling=p}}]);