mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
3 lines
601 KiB
JavaScript
3 lines
601 KiB
JavaScript
/*! For license information please see extensionWeb.js.LICENSE.txt */
|
||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return(()=>{var e={"./node_modules/diff-match-patch/index.js":e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,r,n,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==r)throw new Error("Null input. (diff_main)");if(e==r)return e?[new t.Diff(0,e)]:[];void 0===n&&(n=!0);var s=n,a=this.diff_commonPrefix(e,r),c=e.substring(0,a);e=e.substring(a),r=r.substring(a),a=this.diff_commonSuffix(e,r);var u=e.substring(e.length-a);e=e.substring(0,e.length-a),r=r.substring(0,r.length-a);var d=this.diff_compute_(e,r,s,i);return c&&d.unshift(new t.Diff(0,c)),u&&d.push(new t.Diff(0,u)),this.diff_cleanupMerge(d),d},t.prototype.diff_compute_=function(e,n,o,i){var s;if(!e)return[new t.Diff(1,n)];if(!n)return[new t.Diff(r,e)];var a=e.length>n.length?e:n,c=e.length>n.length?n:e,u=a.indexOf(c);if(-1!=u)return s=[new t.Diff(1,a.substring(0,u)),new t.Diff(0,c),new t.Diff(1,a.substring(u+c.length))],e.length>n.length&&(s[0][0]=s[2][0]=r),s;if(1==c.length)return[new t.Diff(r,e),new t.Diff(1,n)];var d=this.diff_halfMatch_(e,n);if(d){var l=d[0],h=d[1],m=d[2],p=d[3],g=d[4],f=this.diff_main(l,m,o,i),v=this.diff_main(h,p,o,i);return f.concat([new t.Diff(0,g)],v)}return o&&e.length>100&&n.length>100?this.diff_lineMode_(e,n,i):this.diff_bisect_(e,n,i)},t.prototype.diff_lineMode_=function(e,n,o){var i=this.diff_linesToChars_(e,n);e=i.chars1,n=i.chars2;var s=i.lineArray,a=this.diff_main(e,n,!1,o);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var c=0,u=0,d=0,l="",h="";c<a.length;){switch(a[c][0]){case 1:d++,h+=a[c][1];break;case r:u++,l+=a[c][1];break;case 0:if(u>=1&&d>=1){a.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(l,h,!1,o),p=m.length-1;p>=0;p--)a.splice(c,0,m[p]);c+=m.length}d=0,u=0,l="",h=""}c++}return a.pop(),a},t.prototype.diff_bisect_=function(e,n,o){for(var i=e.length,s=n.length,a=Math.ceil((i+s)/2),c=a,u=2*a,d=new Array(u),l=new Array(u),h=0;h<u;h++)d[h]=-1,l[h]=-1;d[c+1]=0,l[c+1]=0;for(var m=i-s,p=m%2!=0,g=0,f=0,v=0,y=0,w=0;w<a&&!((new Date).getTime()>o);w++){for(var x=-w+g;x<=w-f;x+=2){for(var S=c+x,C=(P=x==-w||x!=w&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1)-x;P<i&&C<s&&e.charAt(P)==n.charAt(C);)P++,C++;if(d[S]=P,P>i)f+=2;else if(C>s)g+=2;else if(p&&(k=c+m-x)>=0&&k<u&&-1!=l[k]&&P>=(b=i-l[k]))return this.diff_bisectSplit_(e,n,P,C,o)}for(var M=-w+v;M<=w-y;M+=2){for(var b,k=c+M,R=(b=M==-w||M!=w&&l[k-1]<l[k+1]?l[k+1]:l[k-1]+1)-M;b<i&&R<s&&e.charAt(i-b-1)==n.charAt(s-R-1);)b++,R++;if(l[k]=b,b>i)y+=2;else if(R>s)v+=2;else if(!p){var P;if((S=c+m-M)>=0&&S<u&&-1!=d[S])if(C=c+(P=d[S])-S,P>=(b=i-b))return this.diff_bisectSplit_(e,n,P,C,o)}}}return[new t.Diff(r,e),new t.Diff(1,n)]},t.prototype.diff_bisectSplit_=function(e,t,r,n,o){var i=e.substring(0,r),s=t.substring(0,n),a=e.substring(r),c=t.substring(n),u=this.diff_main(i,s,!1,o),d=this.diff_main(a,c,!1,o);return u.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var r=[],n={};function o(e){for(var t="",o=0,s=-1,a=r.length;s<e.length-1;){-1==(s=e.indexOf("\n",o))&&(s=e.length-1);var c=e.substring(o,s+1);(n.hasOwnProperty?n.hasOwnProperty(c):void 0!==n[c])?t+=String.fromCharCode(n[c]):(a==i&&(c=e.substring(o),s=e.length),t+=String.fromCharCode(a),n[c]=a,r[a++]=c),o=s+1}return t}r[0]="";var i=4e4,s=o(e);return i=65535,{chars1:s,chars2:o(t),lineArray:r}},t.prototype.diff_charsToLines_=function(e,t){for(var r=0;r<e.length;r++){for(var n=e[r][1],o=[],i=0;i<n.length;i++)o[i]=t[n.charCodeAt(i)];e[r][1]=o.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var r=0,n=Math.min(e.length,t.length),o=n,i=0;r<o;)e.substring(i,o)==t.substring(i,o)?i=r=o:n=o,o=Math.floor((n-r)/2+r);return o},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var r=0,n=Math.min(e.length,t.length),o=n,i=0;r<o;)e.substring(e.length-o,e.length-i)==t.substring(t.length-o,t.length-i)?i=r=o:n=o,o=Math.floor((n-r)/2+r);return o},t.prototype.diff_commonOverlap_=function(e,t){var r=e.length,n=t.length;if(0==r||0==n)return 0;r>n?e=e.substring(r-n):r<n&&(t=t.substring(0,r));var o=Math.min(r,n);if(e==t)return o;for(var i=0,s=1;;){var a=e.substring(o-s),c=t.indexOf(a);if(-1==c)return i;s+=c,0!=c&&e.substring(o-s)!=t.substring(0,s)||(i=s,s++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var r=e.length>t.length?e:t,n=e.length>t.length?t:e;if(r.length<4||2*n.length<r.length)return null;var o=this;function i(e,t,r){for(var n,i,s,a,c=e.substring(r,r+Math.floor(e.length/4)),u=-1,d="";-1!=(u=t.indexOf(c,u+1));){var l=o.diff_commonPrefix(e.substring(r),t.substring(u)),h=o.diff_commonSuffix(e.substring(0,r),t.substring(0,u));d.length<h+l&&(d=t.substring(u-h,u)+t.substring(u,u+l),n=e.substring(0,r-h),i=e.substring(r+l),s=t.substring(0,u-h),a=t.substring(u+l))}return 2*d.length>=e.length?[n,i,s,a,d]:null}var s,a,c,u,d,l=i(r,n,Math.ceil(r.length/4)),h=i(r,n,Math.ceil(r.length/2));return l||h?(s=h?l&&l[4].length>h[4].length?l:h:l,e.length>t.length?(a=s[0],c=s[1],u=s[2],d=s[3]):(u=s[0],d=s[1],a=s[2],c=s[3]),[a,c,u,d,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var n=!1,o=[],i=0,s=null,a=0,c=0,u=0,d=0,l=0;a<e.length;)0==e[a][0]?(o[i++]=a,c=d,u=l,d=0,l=0,s=e[a][1]):(1==e[a][0]?d+=e[a][1].length:l+=e[a][1].length,s&&s.length<=Math.max(c,u)&&s.length<=Math.max(d,l)&&(e.splice(o[i-1],0,new t.Diff(r,s)),e[o[i-1]+1][0]=1,i--,a=--i>0?o[i-1]:-1,c=0,u=0,d=0,l=0,s=null,n=!0)),a++;for(n&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(e[a-1][0]==r&&1==e[a][0]){var h=e[a-1][1],m=e[a][1],p=this.diff_commonOverlap_(h,m),g=this.diff_commonOverlap_(m,h);p>=g?(p>=h.length/2||p>=m.length/2)&&(e.splice(a,0,new t.Diff(0,m.substring(0,p))),e[a-1][1]=h.substring(0,h.length-p),e[a+1][1]=m.substring(p),a++):(g>=h.length/2||g>=m.length/2)&&(e.splice(a,0,new t.Diff(0,h.substring(0,g))),e[a-1][0]=1,e[a-1][1]=m.substring(0,m.length-g),e[a+1][0]=r,e[a+1][1]=h.substring(g),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function r(e,r){if(!e||!r)return 6;var n=e.charAt(e.length-1),o=r.charAt(0),i=n.match(t.nonAlphaNumericRegex_),s=o.match(t.nonAlphaNumericRegex_),a=i&&n.match(t.whitespaceRegex_),c=s&&o.match(t.whitespaceRegex_),u=a&&n.match(t.linebreakRegex_),d=c&&o.match(t.linebreakRegex_),l=u&&e.match(t.blanklineEndRegex_),h=d&&r.match(t.blanklineStartRegex_);return l||h?5:u||d?4:i&&!a&&c?3:a||c?2:i||s?1:0}for(var n=1;n<e.length-1;){if(0==e[n-1][0]&&0==e[n+1][0]){var o=e[n-1][1],i=e[n][1],s=e[n+1][1],a=this.diff_commonSuffix(o,i);if(a){var c=i.substring(i.length-a);o=o.substring(0,o.length-a),i=c+i.substring(0,i.length-a),s=c+s}for(var u=o,d=i,l=s,h=r(o,i)+r(i,s);i.charAt(0)===s.charAt(0);){o+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var m=r(o,i)+r(i,s);m>=h&&(h=m,u=o,d=i,l=s)}e[n-1][1]!=u&&(u?e[n-1][1]=u:(e.splice(n-1,1),n--),e[n][1]=d,l?e[n+1][1]=l:(e.splice(n+1,1),n--))}n++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var n=!1,o=[],i=0,s=null,a=0,c=!1,u=!1,d=!1,l=!1;a<e.length;)0==e[a][0]?(e[a][1].length<this.Diff_EditCost&&(d||l)?(o[i++]=a,c=d,u=l,s=e[a][1]):(i=0,s=null),d=l=!1):(e[a][0]==r?l=!0:d=!0,s&&(c&&u&&d&&l||s.length<this.Diff_EditCost/2&&c+u+d+l==3)&&(e.splice(o[i-1],0,new t.Diff(r,s)),e[o[i-1]+1][0]=1,i--,s=null,c&&u?(d=l=!0,i=0):(a=--i>0?o[i-1]:-1,d=l=!1),n=!0)),a++;n&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var n,o=0,i=0,s=0,a="",c="";o<e.length;)switch(e[o][0]){case 1:s++,c+=e[o][1],o++;break;case r:i++,a+=e[o][1],o++;break;case 0:i+s>1?(0!==i&&0!==s&&(0!==(n=this.diff_commonPrefix(c,a))&&(o-i-s>0&&0==e[o-i-s-1][0]?e[o-i-s-1][1]+=c.substring(0,n):(e.splice(0,0,new t.Diff(0,c.substring(0,n))),o++),c=c.substring(n),a=a.substring(n)),0!==(n=this.diff_commonSuffix(c,a))&&(e[o][1]=c.substring(c.length-n)+e[o][1],c=c.substring(0,c.length-n),a=a.substring(0,a.length-n))),o-=i+s,e.splice(o,i+s),a.length&&(e.splice(o,0,new t.Diff(r,a)),o++),c.length&&(e.splice(o,0,new t.Diff(1,c)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,s=0,i=0,a="",c=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(o=1;o<e.length-1;)0==e[o-1][0]&&0==e[o+1][0]&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)==e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),u=!0):e[o][1].substring(0,e[o+1][1].length)==e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),u=!0)),o++;u&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var n,o=0,i=0,s=0,a=0;for(n=0;n<e.length&&(1!==e[n][0]&&(o+=e[n][1].length),e[n][0]!==r&&(i+=e[n][1].length),!(o>t));n++)s=o,a=i;return e.length!=n&&e[n][0]===r?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,i=/>/g,s=/\n/g,a=0;a<e.length;a++){var c=e[a][0],u=e[a][1].replace(n,"&").replace(o,"<").replace(i,">").replace(s,"¶<br>");switch(c){case 1:t[a]='<ins style="background:#e6ffe6;">'+u+"</ins>";break;case r:t[a]='<del style="background:#ffe6e6;">'+u+"</del>";break;case 0:t[a]="<span>"+u+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],r=0;r<e.length;r++)1!==e[r][0]&&(t[r]=e[r][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,i=0;i<e.length;i++){var s=e[i][0],a=e[i][1];switch(s){case 1:n+=a.length;break;case r:o+=a.length;break;case 0:t+=Math.max(n,o),n=0,o=0}}return t+Math.max(n,o)},t.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]="+"+encodeURI(e[n][1]);break;case r:t[n]="-"+e[n][1].length;break;case 0:t[n]="="+e[n][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,n){for(var o=[],i=0,s=0,a=n.split(/\t/g),c=0;c<a.length;c++){var u=a[c].substring(1);switch(a[c].charAt(0)){case"+":try{o[i++]=new t.Diff(1,decodeURI(u))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+u)}break;case"-":case"=":var d=parseInt(u,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+u);var l=e.substring(s,s+=d);"="==a[c].charAt(0)?o[i++]=new t.Diff(0,l):o[i++]=new t.Diff(r,l);break;default:if(a[c])throw new Error("Invalid diff operation in diff_fromDelta: "+a[c])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return o},t.prototype.match_main=function(e,t,r){if(null==e||null==t||null==r)throw new Error("Null input. (match_main)");return r=Math.max(0,Math.min(r,e.length)),e==t?0:e.length?e.substring(r,r+t.length)==t?r:this.match_bitap_(e,t,r):-1},t.prototype.match_bitap_=function(e,t,r){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var n=this.match_alphabet_(t),o=this;function i(e,n){var i=e/t.length,s=Math.abs(r-n);return o.Match_Distance?i+s/o.Match_Distance:s?1:i}var s=this.Match_Threshold,a=e.indexOf(t,r);-1!=a&&(s=Math.min(i(0,a),s),-1!=(a=e.lastIndexOf(t,r+t.length))&&(s=Math.min(i(0,a),s)));var c,u,d=1<<t.length-1;a=-1;for(var l,h=t.length+e.length,m=0;m<t.length;m++){for(c=0,u=h;c<u;)i(m,r+u)<=s?c=u:h=u,u=Math.floor((h-c)/2+c);h=u;var p=Math.max(1,r-u+1),g=Math.min(r+u,e.length)+t.length,f=Array(g+2);f[g+1]=(1<<m)-1;for(var v=g;v>=p;v--){var y=n[e.charAt(v-1)];if(f[v]=0===m?(f[v+1]<<1|1)&y:(f[v+1]<<1|1)&y|(l[v+1]|l[v])<<1|1|l[v+1],f[v]&d){var w=i(m,v-1);if(w<=s){if(s=w,!((a=v-1)>r))break;p=Math.max(1,2*r-a)}}}if(i(m+1,r)>s)break;l=f}return a},t.prototype.match_alphabet_=function(e){for(var t={},r=0;r<e.length;r++)t[e.charAt(r)]=0;for(r=0;r<e.length;r++)t[e.charAt(r)]|=1<<e.length-r-1;return t},t.prototype.patch_addContext_=function(e,r){if(0!=r.length){if(null===e.start2)throw Error("patch not initialized");for(var n=r.substring(e.start2,e.start2+e.length1),o=0;r.indexOf(n)!=r.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)o+=this.Patch_Margin,n=r.substring(e.start2-o,e.start2+e.length1+o);o+=this.Patch_Margin;var i=r.substring(e.start2-o,e.start2);i&&e.diffs.unshift(new t.Diff(0,i));var s=r.substring(e.start2+e.length1,e.start2+e.length1+o);s&&e.diffs.push(new t.Diff(0,s)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+s.length,e.length2+=i.length+s.length}},t.prototype.patch_make=function(e,n,o){var i,s;if("string"==typeof e&&"string"==typeof n&&void 0===o)i=e,(s=this.diff_main(i,n,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===n&&void 0===o)s=e,i=this.diff_text1(s);else if("string"==typeof e&&n&&"object"==typeof n&&void 0===o)i=e,s=n;else{if("string"!=typeof e||"string"!=typeof n||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");i=e,s=o}if(0===s.length)return[];for(var a=[],c=new t.patch_obj,u=0,d=0,l=0,h=i,m=i,p=0;p<s.length;p++){var g=s[p][0],f=s[p][1];switch(u||0===g||(c.start1=d,c.start2=l),g){case 1:c.diffs[u++]=s[p],c.length2+=f.length,m=m.substring(0,l)+f+m.substring(l);break;case r:c.length1+=f.length,c.diffs[u++]=s[p],m=m.substring(0,l)+m.substring(l+f.length);break;case 0:f.length<=2*this.Patch_Margin&&u&&s.length!=p+1?(c.diffs[u++]=s[p],c.length1+=f.length,c.length2+=f.length):f.length>=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,h),a.push(c),c=new t.patch_obj,u=0,h=m,d=l)}1!==g&&(d+=f.length),g!==r&&(l+=f.length)}return u&&(this.patch_addContext_(c,h),a.push(c)),a},t.prototype.patch_deepCopy=function(e){for(var r=[],n=0;n<e.length;n++){var o=e[n],i=new t.patch_obj;i.diffs=[];for(var s=0;s<o.diffs.length;s++)i.diffs[s]=new t.Diff(o.diffs[s][0],o.diffs[s][1]);i.start1=o.start1,i.start2=o.start2,i.length1=o.length1,i.length2=o.length2,r[n]=i}return r},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,i=[],s=0;s<e.length;s++){var a,c,u=e[s].start2+o,d=this.diff_text1(e[s].diffs),l=-1;if(d.length>this.Match_MaxBits?-1!=(a=this.match_main(t,d.substring(0,this.Match_MaxBits),u))&&(-1==(l=this.match_main(t,d.substring(d.length-this.Match_MaxBits),u+d.length-this.Match_MaxBits))||a>=l)&&(a=-1):a=this.match_main(t,d,u),-1==a)i[s]=!1,o-=e[s].length2-e[s].length1;else if(i[s]=!0,o=a-u,d==(c=-1==l?t.substring(a,a+d.length):t.substring(a,l+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+d.length);else{var h=this.diff_main(d,c,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(h)/d.length>this.Patch_DeleteThreshold)i[s]=!1;else{this.diff_cleanupSemanticLossless(h);for(var m,p=0,g=0;g<e[s].diffs.length;g++){var f=e[s].diffs[g];0!==f[0]&&(m=this.diff_xIndex(h,p)),1===f[0]?t=t.substring(0,a+m)+f[1]+t.substring(a+m):f[0]===r&&(t=t.substring(0,a+m)+t.substring(a+this.diff_xIndex(h,p+f[1].length))),f[0]!==r&&(p+=f[1].length)}}}}return[t=t.substring(n.length,t.length-n.length),i]},t.prototype.patch_addPadding=function(e){for(var r=this.Patch_Margin,n="",o=1;o<=r;o++)n+=String.fromCharCode(o);for(o=0;o<e.length;o++)e[o].start1+=r,e[o].start2+=r;var i=e[0],s=i.diffs;if(0==s.length||0!=s[0][0])s.unshift(new t.Diff(0,n)),i.start1-=r,i.start2-=r,i.length1+=r,i.length2+=r;else if(r>s[0][1].length){var a=r-s[0][1].length;s[0][1]=n.substring(s[0][1].length)+s[0][1],i.start1-=a,i.start2-=a,i.length1+=a,i.length2+=a}return 0==(s=(i=e[e.length-1]).diffs).length||0!=s[s.length-1][0]?(s.push(new t.Diff(0,n)),i.length1+=r,i.length2+=r):r>s[s.length-1][1].length&&(a=r-s[s.length-1][1].length,s[s.length-1][1]+=n.substring(0,a),i.length1+=a,i.length2+=a),n},t.prototype.patch_splitMax=function(e){for(var n=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=n)){var i=e[o];e.splice(o--,1);for(var s=i.start1,a=i.start2,c="";0!==i.diffs.length;){var u=new t.patch_obj,d=!0;for(u.start1=s-c.length,u.start2=a-c.length,""!==c&&(u.length1=u.length2=c.length,u.diffs.push(new t.Diff(0,c)));0!==i.diffs.length&&u.length1<n-this.Patch_Margin;){var l=i.diffs[0][0],h=i.diffs[0][1];1===l?(u.length2+=h.length,a+=h.length,u.diffs.push(i.diffs.shift()),d=!1):l===r&&1==u.diffs.length&&0==u.diffs[0][0]&&h.length>2*n?(u.length1+=h.length,s+=h.length,d=!1,u.diffs.push(new t.Diff(l,h)),i.diffs.shift()):(h=h.substring(0,n-u.length1-this.Patch_Margin),u.length1+=h.length,s+=h.length,0===l?(u.length2+=h.length,a+=h.length):d=!1,u.diffs.push(new t.Diff(l,h)),h==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(h.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==m&&(u.length1+=m.length,u.length2+=m.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new t.Diff(0,m))),d||e.splice(++o,0,u)}}},t.prototype.patch_toText=function(e){for(var t=[],r=0;r<e.length;r++)t[r]=e[r];return t.join("")},t.prototype.patch_fromText=function(e){var n=[];if(!e)return n;for(var o=e.split("\n"),i=0,s=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<o.length;){var a=o[i].match(s);if(!a)throw new Error("Invalid patch string: "+o[i]);var c=new t.patch_obj;for(n.push(c),c.start1=parseInt(a[1],10),""===a[2]?(c.start1--,c.length1=1):"0"==a[2]?c.length1=0:(c.start1--,c.length1=parseInt(a[2],10)),c.start2=parseInt(a[3],10),""===a[4]?(c.start2--,c.length2=1):"0"==a[4]?c.length2=0:(c.start2--,c.length2=parseInt(a[4],10)),i++;i<o.length;){var u=o[i].charAt(0);try{var d=decodeURI(o[i].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+d)}if("-"==u)c.diffs.push(new t.Diff(r,d));else if("+"==u)c.diffs.push(new t.Diff(1,d));else if(" "==u)c.diffs.push(new t.Diff(0,d));else{if("@"==u)break;if(""!==u)throw new Error('Invalid patch mode "'+u+'" in: '+d)}i++}}return n},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],n=0;n<this.diffs.length;n++){switch(this.diffs[n][0]){case 1:e="+";break;case r:e="-";break;case 0:e=" "}t[n+1]=e+encodeURI(this.diffs[n][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=r,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},"./node_modules/events/events.js":e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(){void 0!==i&&e.removeListener("error",i),r([].slice.call(arguments))}var i;"error"!==t&&(i=function(r){e.removeListener(t,o),n(r)},e.once("error",i)),e.once(t,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var o,i,s,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,u=d,console&&console.warn&&console.warn(u)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=d.bind(n);return o.listener=r,n.wrapFn=o,o}function h(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):p(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,d=p(c,u);for(r=0;r<u;++r)n(d[r],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},i.prototype.listenerCount=m,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},"./node_modules/inherits/inherits_browser.js":e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},"./node_modules/lodash/lodash.js":function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,d=1/0,l=9007199254740991,h=NaN,m=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],g="[object Arguments]",f="[object Array]",v="[object Boolean]",y="[object Date]",w="[object Error]",x="[object Function]",S="[object GeneratorFunction]",C="[object Map]",M="[object Number]",b="[object Object]",k="[object Promise]",R="[object RegExp]",P="[object Set]",_="[object String]",E="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",L="[object DataView]",$="[object Float32Array]",B="[object Float64Array]",I="[object Int8Array]",N="[object Int16Array]",O="[object Int32Array]",V="[object Uint8Array]",D="[object Uint8ClampedArray]",F="[object Uint16Array]",j="[object Uint32Array]",W=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,J=RegExp(H.source),z=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,fe=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",be="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="["+be+"]",Re="["+Se+"]",Pe="\\d+",_e="["+Ce+"]",Ee="[^\\ud800-\\udfff"+be+Pe+"\\u2700-\\u27bf"+Ce+Me+"]",Ae="\\ud83c[\\udffb-\\udfff]",Te="[^\\ud800-\\udfff]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Me+"]",Ie="(?:"+_e+"|"+Ee+")",Ne="(?:"+Be+"|"+Ee+")",Oe="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",De="(?:"+Re+"|"+Ae+")?",Fe="[\\ufe0e\\ufe0f]?",je=Fe+De+"(?:\\u200d(?:"+[Te,Le,$e].join("|")+")"+Fe+De+")*",We="(?:"+["[\\u2700-\\u27bf]",Le,$e].join("|")+")"+je,Ue="(?:"+[Te+Re+"?",Re,Le,$e,"[\\ud800-\\udfff]"].join("|")+")",Ke=RegExp("['’]","g"),He=RegExp(Re,"g"),qe=RegExp(Ae+"(?="+Ae+")|"+Ue+je,"g"),Je=RegExp([Be+"?"+_e+"+"+Oe+"(?="+[ke,Be,"$"].join("|")+")",Ne+"+"+Ve+"(?="+[ke,Be+Ie,"$"].join("|")+")",Be+"?"+Ie+"+"+Oe,Be+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,We].join("|"),"g"),ze=RegExp("[\\u200d\\ud800-\\udfff"+Se+"\\ufe0e\\ufe0f]"),Ge=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ye=-1,Ze={};Ze[$]=Ze[B]=Ze[I]=Ze[N]=Ze[O]=Ze[V]=Ze[D]=Ze[F]=Ze[j]=!0,Ze[g]=Ze[f]=Ze[T]=Ze[v]=Ze[L]=Ze[y]=Ze[w]=Ze[x]=Ze[C]=Ze[M]=Ze[b]=Ze[R]=Ze[P]=Ze[_]=Ze[A]=!1;var Xe={};Xe[g]=Xe[f]=Xe[T]=Xe[L]=Xe[v]=Xe[y]=Xe[$]=Xe[B]=Xe[I]=Xe[N]=Xe[O]=Xe[C]=Xe[M]=Xe[b]=Xe[R]=Xe[P]=Xe[_]=Xe[E]=Xe[V]=Xe[D]=Xe[F]=Xe[j]=!0,Xe[w]=Xe[x]=Xe[A]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=nt||ot||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ct=at&&at.exports===st,ut=ct&&nt.process,dt=function(){try{return at&&at.require&&at.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),lt=dt&&dt.isArrayBuffer,ht=dt&&dt.isDate,mt=dt&&dt.isMap,pt=dt&&dt.isRegExp,gt=dt&&dt.isSet,ft=dt&&dt.isTypedArray;function vt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function yt(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(n,s,r(s),e)}return n}function wt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function xt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function St(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Ct(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Mt(e,t){return!(null==e||!e.length)&&$t(e,t,0)>-1}function bt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function kt(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Rt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Pt(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function _t(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Et(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var At=Ot("length");function Tt(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Lt(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function $t(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Lt(e,It,r)}function Bt(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return-1}function It(e){return e!=e}function Nt(e,t){var r=null==e?0:e.length;return r?Ft(e,t)/r:h}function Ot(e){return function(t){return null==t?o:t[e]}}function Vt(e){return function(t){return null==e?o:e[t]}}function Dt(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r}function Ft(e,t){for(var r,n=-1,i=e.length;++n<i;){var s=t(e[n]);s!==o&&(r=r===o?s:r+s)}return r}function jt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Wt(e){return e?e.slice(0,sr(e)+1).replace(ne,""):e}function Ut(e){return function(t){return e(t)}}function Kt(e,t){return kt(t,(function(t){return e[t]}))}function Ht(e,t){return e.has(t)}function qt(e,t){for(var r=-1,n=e.length;++r<n&&$t(t,e[r],0)>-1;);return r}function Jt(e,t){for(var r=e.length;r--&&$t(t,e[r],0)>-1;);return r}function zt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Gt=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Qt=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Yt(e){return"\\"+et[e]}function Zt(e){return ze.test(e)}function Xt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,i[o++]=r)}return i}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function nr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function or(e){return Zt(e)?function(e){for(var t=qe.lastIndex=0;qe.test(e);)++t;return t}(e):At(e)}function ir(e){return Zt(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.split("")}(e)}function sr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var ar=Vt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cr=function e(t){var r,n=(t=null==t?it:cr.defaults(it.Object(),t,cr.pick(it,Qe))).Array,oe=t.Date,Se=t.Error,Ce=t.Function,Me=t.Math,be=t.Object,ke=t.RegExp,Re=t.String,Pe=t.TypeError,_e=n.prototype,Ee=Ce.prototype,Ae=be.prototype,Te=t["__core-js_shared__"],Le=Ee.toString,$e=Ae.hasOwnProperty,Be=0,Ie=(r=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ne=Ae.toString,Oe=Le.call(be),Ve=it._,De=ke("^"+Le.call($e).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ct?t.Buffer:o,je=t.Symbol,We=t.Uint8Array,Ue=Fe?Fe.allocUnsafe:o,qe=er(be.getPrototypeOf,be),ze=be.create,et=Ae.propertyIsEnumerable,nt=_e.splice,ot=je?je.isConcatSpreadable:o,st=je?je.iterator:o,at=je?je.toStringTag:o,ut=function(){try{var e=di(be,"defineProperty");return e({},"",{}),e}catch(e){}}(),dt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,At=oe&&oe.now!==it.Date.now&&oe.now,Vt=t.setTimeout!==it.setTimeout&&t.setTimeout,ur=Me.ceil,dr=Me.floor,lr=be.getOwnPropertySymbols,hr=Fe?Fe.isBuffer:o,mr=t.isFinite,pr=_e.join,gr=er(be.keys,be),fr=Me.max,vr=Me.min,yr=oe.now,wr=t.parseInt,xr=Me.random,Sr=_e.reverse,Cr=di(t,"DataView"),Mr=di(t,"Map"),br=di(t,"Promise"),kr=di(t,"Set"),Rr=di(t,"WeakMap"),Pr=di(be,"create"),_r=Rr&&new Rr,Er={},Ar=Di(Cr),Tr=Di(Mr),Lr=Di(br),$r=Di(kr),Br=Di(Rr),Ir=je?je.prototype:o,Nr=Ir?Ir.valueOf:o,Or=Ir?Ir.toString:o;function Vr(e){if(ra(e)&&!Hs(e)&&!(e instanceof Wr)){if(e instanceof jr)return e;if($e.call(e,"__wrapped__"))return Fi(e)}return new jr(e)}var Dr=function(){function e(){}return function(t){if(!ta(t))return{};if(ze)return ze(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Fr(){}function jr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Wr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Hr;++t<r;)this.add(e[t])}function Jr(e){var t=this.__data__=new Kr(e);this.size=t.size}function zr(e,t){var r=Hs(e),n=!r&&Ks(e),o=!r&&!n&&Gs(e),i=!r&&!n&&!o&&da(e),s=r||n||o||i,a=s?jt(e.length,Re):[],c=a.length;for(var u in e)!t&&!$e.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vi(u,c))||a.push(u);return a}function Gr(e){var t=e.length;return t?e[qn(0,t-1)]:o}function Qr(e,t){return Bi(_o(e),sn(t,0,e.length))}function Yr(e){return Bi(_o(e))}function Zr(e,t,r){(r!==o&&!js(e[t],r)||r===o&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];$e.call(e,t)&&js(n,r)&&(r!==o||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(js(e[r][0],t))return r;return-1}function tn(e,t,r,n){return ln(e,(function(e,o,i){t(n,e,r(e),i)})),n}function rn(e,t){return e&&Eo(t,La(t),e)}function nn(e,t,r){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,i=t.length,s=n(i),a=null==e;++r<i;)s[r]=a?o:Pa(e,t[r]);return s}function sn(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function an(e,t,r,n,i,s){var a,c=1&t,u=2&t,d=4&t;if(r&&(a=i?r(e,n,i,s):r(e)),a!==o)return a;if(!ta(e))return e;var l=Hs(e);if(l){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&$e.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return _o(e,a)}else{var h=mi(e),m=h==x||h==S;if(Gs(e))return Co(e,c);if(h==b||h==g||m&&!i){if(a=u||m?{}:gi(e),!c)return u?function(e,t){return Eo(e,hi(e),t)}(e,function(e,t){return e&&Eo(t,$a(t),e)}(a,e)):function(e,t){return Eo(e,li(e),t)}(e,rn(a,e))}else{if(!Xe[h])return i?e:{};a=function(e,t,r){var n,o=e.constructor;switch(t){case T:return Mo(e);case v:case y:return new o(+e);case L:return function(e,t){var r=t?Mo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case $:case B:case I:case N:case O:case V:case D:case F:case j:return bo(e,r);case C:return new o;case M:case _:return new o(e);case R:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new o;case E:return n=e,Nr?be(Nr.call(n)):{}}}(e,h,c)}}s||(s=new Jr);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,o){a.set(o,an(n,t,r,o,e,s))}));var f=l?o:(d?u?ni:ri:u?$a:La)(e);return wt(f||e,(function(n,o){f&&(n=e[o=n]),Xr(a,o,an(n,t,r,o,e,s))})),a}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=be(e);n--;){var i=r[n],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new Pe(i);return Ai((function(){e.apply(o,r)}),t)}function dn(e,t,r,n){var o=-1,i=Mt,s=!0,a=e.length,c=[],u=t.length;if(!a)return c;r&&(t=kt(t,Ut(r))),n?(i=bt,s=!1):t.length>=200&&(i=Ht,s=!1,t=new qr(t));e:for(;++o<a;){var d=e[o],l=null==r?d:r(d);if(d=n||0!==d?d:0,s&&l==l){for(var h=u;h--;)if(t[h]===l)continue e;c.push(d)}else i(t,l,n)||c.push(d)}return c}Vr.templateSettings={escape:G,evaluate:Q,interpolate:Y,variable:"",imports:{_:Vr}},Vr.prototype=Fr.prototype,Vr.prototype.constructor=Vr,jr.prototype=Dr(Fr.prototype),jr.prototype.constructor=jr,Wr.prototype=Dr(Fr.prototype),Wr.prototype.constructor=Wr,Ur.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},Ur.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ur.prototype.get=function(e){var t=this.__data__;if(Pr){var r=t[e];return r===s?o:r}return $e.call(t,e)?t[e]:o},Ur.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==o:$e.call(t,e)},Ur.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===o?s:t,this},Kr.prototype.clear=function(){this.__data__=[],this.size=0},Kr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():nt.call(t,r,1),--this.size,0))},Kr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?o:t[r][1]},Kr.prototype.has=function(e){return en(this.__data__,e)>-1},Kr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(Mr||Kr),string:new Ur}},Hr.prototype.delete=function(e){var t=ci(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return ci(this,e).get(e)},Hr.prototype.has=function(e){return ci(this,e).has(e)},Hr.prototype.set=function(e,t){var r=ci(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},qr.prototype.add=qr.prototype.push=function(e){return this.__data__.set(e,s),this},qr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.clear=function(){this.__data__=new Kr,this.size=0},Jr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Jr.prototype.get=function(e){return this.__data__.get(e)},Jr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Kr){var n=r.__data__;if(!Mr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var ln=Lo(wn),hn=Lo(xn,!0);function mn(e,t){var r=!0;return ln(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function pn(e,t,r){for(var n=-1,i=e.length;++n<i;){var s=e[n],a=t(s);if(null!=a&&(c===o?a==a&&!ua(a):r(a,c)))var c=a,u=s}return u}function gn(e,t){var r=[];return ln(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function fn(e,t,r,n,o){var i=-1,s=e.length;for(r||(r=fi),o||(o=[]);++i<s;){var a=e[i];t>0&&r(a)?t>1?fn(a,t-1,r,n,o):Rt(o,a):n||(o[o.length]=a)}return o}var vn=$o(),yn=$o(!0);function wn(e,t){return e&&vn(e,t,La)}function xn(e,t){return e&&yn(e,t,La)}function Sn(e,t){return Ct(t,(function(t){return Zs(e[t])}))}function Cn(e,t){for(var r=0,n=(t=yo(t,e)).length;null!=e&&r<n;)e=e[Vi(t[r++])];return r&&r==n?e:o}function Mn(e,t,r){var n=t(e);return Hs(e)?n:Rt(n,r(e))}function bn(e){return null==e?e===o?"[object Undefined]":"[object Null]":at&&at in be(e)?function(e){var t=$e.call(e,at),r=e[at];try{e[at]=o;var n=!0}catch(e){}var i=Ne.call(e);return n&&(t?e[at]=r:delete e[at]),i}(e):function(e){return Ne.call(e)}(e)}function kn(e,t){return e>t}function Rn(e,t){return null!=e&&$e.call(e,t)}function Pn(e,t){return null!=e&&t in be(e)}function _n(e,t,r){for(var i=r?bt:Mt,s=e[0].length,a=e.length,c=a,u=n(a),d=1/0,l=[];c--;){var h=e[c];c&&t&&(h=kt(h,Ut(t))),d=vr(h.length,d),u[c]=!r&&(t||s>=120&&h.length>=120)?new qr(c&&h):o}h=e[0];var m=-1,p=u[0];e:for(;++m<s&&l.length<d;){var g=h[m],f=t?t(g):g;if(g=r||0!==g?g:0,!(p?Ht(p,f):i(l,f,r))){for(c=a;--c;){var v=u[c];if(!(v?Ht(v,f):i(e[c],f,r)))continue e}p&&p.push(f),l.push(g)}}return l}function En(e,t,r){var n=null==(e=Ri(e,t=yo(t,e)))?e:e[Vi(Yi(t))];return null==n?o:vt(n,e,r)}function An(e){return ra(e)&&bn(e)==g}function Tn(e,t,r,n,i){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,i,s){var a=Hs(e),c=Hs(t),u=a?f:mi(e),d=c?f:mi(t),l=(u=u==g?b:u)==b,h=(d=d==g?b:d)==b,m=u==d;if(m&&Gs(e)){if(!Gs(t))return!1;a=!0,l=!1}if(m&&!l)return s||(s=new Jr),a||da(e)?ei(e,t,r,n,i,s):function(e,t,r,n,o,i,s){switch(r){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case v:case y:case M:return js(+e,+t);case w:return e.name==t.name&&e.message==t.message;case R:case _:return e==t+"";case C:var a=Xt;case P:var c=1&n;if(a||(a=rr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var d=ei(a(e),a(t),n,o,i,s);return s.delete(e),d;case E:if(Nr)return Nr.call(e)==Nr.call(t)}return!1}(e,t,u,r,n,i,s);if(!(1&r)){var p=l&&$e.call(e,"__wrapped__"),x=h&&$e.call(t,"__wrapped__");if(p||x){var S=p?e.value():e,k=x?t.value():t;return s||(s=new Jr),i(S,k,r,n,s)}}return!!m&&(s||(s=new Jr),function(e,t,r,n,i,s){var a=1&r,c=ri(e),u=c.length;if(u!=ri(t).length&&!a)return!1;for(var d=u;d--;){var l=c[d];if(!(a?l in t:$e.call(t,l)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var p=!0;s.set(e,t),s.set(t,e);for(var g=a;++d<u;){var f=e[l=c[d]],v=t[l];if(n)var y=a?n(v,f,l,t,e,s):n(f,v,l,e,t,s);if(!(y===o?f===v||i(f,v,r,n,s):y)){p=!1;break}g||(g="constructor"==l)}if(p&&!g){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,i,s))}(e,t,r,n,Tn,i))}function Ln(e,t,r,n){var i=r.length,s=i,a=!n;if(null==e)return!s;for(e=be(e);i--;){var c=r[i];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<s;){var u=(c=r[i])[0],d=e[u],l=c[1];if(a&&c[2]){if(d===o&&!(u in e))return!1}else{var h=new Jr;if(n)var m=n(d,l,u,e,t,h);if(!(m===o?Tn(l,d,3,n,h):m))return!1}}return!0}function $n(e){return!(!ta(e)||(t=e,Ie&&Ie in t))&&(Zs(e)?De:ge).test(Di(e));var t}function Bn(e){return"function"==typeof e?e:null==e?oc:"object"==typeof e?Hs(e)?Dn(e[0],e[1]):Vn(e):mc(e)}function In(e){if(!Ci(e))return gr(e);var t=[];for(var r in be(e))$e.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Nn(e,t){return e<t}function On(e,t){var r=-1,o=Js(e)?n(e.length):[];return ln(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function Vn(e){var t=ui(e);return 1==t.length&&t[0][2]?bi(t[0][0],t[0][1]):function(r){return r===e||Ln(r,e,t)}}function Dn(e,t){return wi(e)&&Mi(t)?bi(Vi(e),t):function(r){var n=Pa(r,e);return n===o&&n===t?_a(r,e):Tn(t,n,3)}}function Fn(e,t,r,n,i){e!==t&&vn(t,(function(s,a){if(i||(i=new Jr),ta(s))!function(e,t,r,n,i,s,a){var c=_i(e,r),u=_i(t,r),d=a.get(u);if(d)Zr(e,r,d);else{var l=s?s(c,u,r+"",e,t,a):o,h=l===o;if(h){var m=Hs(u),p=!m&&Gs(u),g=!m&&!p&&da(u);l=u,m||p||g?Hs(c)?l=c:zs(c)?l=_o(c):p?(h=!1,l=Co(u,!0)):g?(h=!1,l=bo(u,!0)):l=[]:ia(u)||Ks(u)?(l=c,Ks(c)?l=ya(c):ta(c)&&!Zs(c)||(l=gi(u))):h=!1}h&&(a.set(u,l),i(l,u,n,s,a),a.delete(u)),Zr(e,r,l)}}(e,t,a,r,Fn,n,i);else{var c=n?n(_i(e,a),s,a+"",e,t,i):o;c===o&&(c=s),Zr(e,a,c)}}),$a)}function jn(e,t){var r=e.length;if(r)return vi(t+=t<0?r:0,r)?e[t]:o}function Wn(e,t,r){t=t.length?kt(t,(function(e){return Hs(e)?function(t){return Cn(t,1===e.length?e[0]:e)}:e})):[oc];var n=-1;return t=kt(t,Ut(ai())),function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,s=o.length,a=r.length;++n<s;){var c=ko(o[n],i[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(On(e,(function(e,r,o){return{criteria:kt(t,(function(t){return t(e)})),index:++n,value:e}})))}function Un(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var s=t[n],a=Cn(e,s);r(a,s)&&Yn(i,yo(s,e),a)}return i}function Kn(e,t,r,n){var o=n?Bt:$t,i=-1,s=t.length,a=e;for(e===t&&(t=_o(t)),r&&(a=kt(e,Ut(r)));++i<s;)for(var c=0,u=t[i],d=r?r(u):u;(c=o(a,d,c,n))>-1;)a!==e&&nt.call(a,c,1),nt.call(e,c,1);return e}function Hn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;vi(o)?nt.call(e,o,1):uo(e,o)}}return e}function qn(e,t){return e+dr(xr()*(t-e+1))}function Jn(e,t){var r="";if(!e||t<1||t>l)return r;do{t%2&&(r+=e),(t=dr(t/2))&&(e+=e)}while(t);return r}function zn(e,t){return Ti(ki(e,t,oc),e+"")}function Gn(e){return Gr(ja(e))}function Qn(e,t){var r=ja(e);return Bi(r,sn(t,0,r.length))}function Yn(e,t,r,n){if(!ta(e))return e;for(var i=-1,s=(t=yo(t,e)).length,a=s-1,c=e;null!=c&&++i<s;){var u=Vi(t[i]),d=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=a){var l=c[u];(d=n?n(l,u,c):o)===o&&(d=ta(l)?l:vi(t[i+1])?[]:{})}Xr(c,u,d),c=c[u]}return e}var Zn=_r?function(e,t){return _r.set(e,t),e}:oc,Xn=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:oc;function eo(e){return Bi(ja(e))}function to(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=n(i);++o<i;)s[o]=e[o+t];return s}function ro(e,t){var r;return ln(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function no(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var i=n+o>>>1,s=e[i];null!==s&&!ua(s)&&(r?s<=t:s<t)?n=i+1:o=i}return o}return oo(e,t,oc,r)}function oo(e,t,r,n){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,c=null===t,u=ua(t),d=t===o;i<s;){var l=dr((i+s)/2),h=r(e[l]),m=h!==o,p=null===h,g=h==h,f=ua(h);if(a)var v=n||g;else v=d?g&&(n||m):c?g&&m&&(n||!p):u?g&&m&&!p&&(n||!f):!p&&!f&&(n?h<=t:h<t);v?i=l+1:s=l}return vr(s,4294967294)}function io(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!js(a,c)){var c=a;i[o++]=0===s?0:s}}return i}function so(e){return"number"==typeof e?e:ua(e)?h:+e}function ao(e){if("string"==typeof e)return e;if(Hs(e))return kt(e,ao)+"";if(ua(e))return Or?Or.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function co(e,t,r){var n=-1,o=Mt,i=e.length,s=!0,a=[],c=a;if(r)s=!1,o=bt;else if(i>=200){var u=t?null:zo(e);if(u)return rr(u);s=!1,o=Ht,c=new qr}else c=t?[]:a;e:for(;++n<i;){var d=e[n],l=t?t(d):d;if(d=r||0!==d?d:0,s&&l==l){for(var h=c.length;h--;)if(c[h]===l)continue e;t&&c.push(l),a.push(d)}else o(c,l,r)||(c!==a&&c.push(l),a.push(d))}return a}function uo(e,t){return null==(e=Ri(e,t=yo(t,e)))||delete e[Vi(Yi(t))]}function lo(e,t,r,n){return Yn(e,t,r(Cn(e,t)),n)}function ho(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?to(e,n?0:i,n?i+1:o):to(e,n?i+1:0,n?o:i)}function mo(e,t){var r=e;return r instanceof Wr&&(r=r.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))}),r)}function po(e,t,r){var o=e.length;if(o<2)return o?co(e[0]):[];for(var i=-1,s=n(o);++i<o;)for(var a=e[i],c=-1;++c<o;)c!=i&&(s[i]=dn(s[i]||a,e[c],t,r));return co(fn(s,1),t,r)}function go(e,t,r){for(var n=-1,i=e.length,s=t.length,a={};++n<i;){var c=n<s?t[n]:o;r(a,e[n],c)}return a}function fo(e){return zs(e)?e:[]}function vo(e){return"function"==typeof e?e:oc}function yo(e,t){return Hs(e)?e:wi(e,t)?[e]:Oi(wa(e))}var wo=zn;function xo(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:to(e,t,r)}var So=dt||function(e){return it.clearTimeout(e)};function Co(e,t){if(t)return e.slice();var r=e.length,n=Ue?Ue(r):new e.constructor(r);return e.copy(n),n}function Mo(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function bo(e,t){var r=t?Mo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ko(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,s=ua(e),a=t!==o,c=null===t,u=t==t,d=ua(t);if(!c&&!d&&!s&&e>t||s&&a&&u&&!c&&!d||n&&a&&u||!r&&u||!i)return 1;if(!n&&!s&&!d&&e<t||d&&r&&i&&!n&&!s||c&&r&&i||!a&&i||!u)return-1}return 0}function Ro(e,t,r,o){for(var i=-1,s=e.length,a=r.length,c=-1,u=t.length,d=fr(s-a,0),l=n(u+d),h=!o;++c<u;)l[c]=t[c];for(;++i<a;)(h||i<s)&&(l[r[i]]=e[i]);for(;d--;)l[c++]=e[i++];return l}function Po(e,t,r,o){for(var i=-1,s=e.length,a=-1,c=r.length,u=-1,d=t.length,l=fr(s-c,0),h=n(l+d),m=!o;++i<l;)h[i]=e[i];for(var p=i;++u<d;)h[p+u]=t[u];for(;++a<c;)(m||i<s)&&(h[p+r[a]]=e[i++]);return h}function _o(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Eo(e,t,r,n){var i=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var c=t[s],u=n?n(r[c],e[c],c,r,e):o;u===o&&(u=e[c]),i?nn(r,c,u):Xr(r,c,u)}return r}function Ao(e,t){return function(r,n){var o=Hs(r)?yt:tn,i=t?t():{};return o(r,e,ai(n,2),i)}}function To(e){return zn((function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:o,a=i>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&yi(r[0],r[1],a)&&(s=i<3?o:s,i=1),t=be(t);++n<i;){var c=r[n];c&&e(t,c,n,s)}return t}))}function Lo(e,t){return function(r,n){if(null==r)return r;if(!Js(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=be(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}function $o(e){return function(t,r,n){for(var o=-1,i=be(t),s=n(t),a=s.length;a--;){var c=s[e?a:++o];if(!1===r(i[c],c,i))break}return t}}function Bo(e){return function(t){var r=Zt(t=wa(t))?ir(t):o,n=r?r[0]:t.charAt(0),i=r?xo(r,1).join(""):t.slice(1);return n[e]()+i}}function Io(e){return function(t){return Pt(Za(Ka(t).replace(Ke,"")),e,"")}}function No(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Dr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Oo(e){return function(t,r,n){var i=be(t);if(!Js(t)){var s=ai(r,3);t=La(t),r=function(e){return s(i[e],e,i)}}var a=e(t,r,n);return a>-1?i[s?t[a]:a]:o}}function Vo(e){return ti((function(t){var r=t.length,n=r,s=jr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Pe(i);if(s&&!c&&"wrapper"==ii(a))var c=new jr([],!0)}for(n=c?n:r;++n<r;){var u=ii(a=t[n]),d="wrapper"==u?oi(a):o;c=d&&xi(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?c[ii(d[0])].apply(c,d[3]):1==a.length&&xi(a)?c[u]():c.thru(a)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Hs(n))return c.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function Do(e,t,r,i,s,a,c,d,l,h){var m=t&u,p=1&t,g=2&t,f=24&t,v=512&t,y=g?o:No(e);return function o(){for(var u=arguments.length,w=n(u),x=u;x--;)w[x]=arguments[x];if(f)var S=si(o),C=zt(w,S);if(i&&(w=Ro(w,i,s,f)),a&&(w=Po(w,a,c,f)),u-=C,f&&u<h){var M=tr(w,S);return qo(e,t,Do,o.placeholder,r,w,M,d,l,h-u)}var b=p?r:this,k=g?b[e]:e;return u=w.length,d?w=Pi(w,d):v&&u>1&&w.reverse(),m&&l<u&&(w.length=l),this&&this!==it&&this instanceof o&&(k=y||No(k)),k.apply(b,w)}}function Fo(e,t){return function(r,n){return function(e,t,r,n){return wn(e,(function(e,o,i){t(n,r(e),o,i)})),n}(r,e,t(n),{})}}function jo(e,t){return function(r,n){var i;if(r===o&&n===o)return t;if(r!==o&&(i=r),n!==o){if(i===o)return n;"string"==typeof r||"string"==typeof n?(r=ao(r),n=ao(n)):(r=so(r),n=so(n)),i=e(r,n)}return i}}function Wo(e){return ti((function(t){return t=kt(t,Ut(ai())),zn((function(r){var n=this;return e(t,(function(e){return vt(e,n,r)}))}))}))}function Uo(e,t){var r=(t=t===o?" ":ao(t)).length;if(r<2)return r?Jn(t,e):t;var n=Jn(t,ur(e/or(t)));return Zt(t)?xo(ir(n),0,e).join(""):n.slice(0,e)}function Ko(e){return function(t,r,i){return i&&"number"!=typeof i&&yi(t,r,i)&&(r=i=o),t=pa(t),r===o?(r=t,t=0):r=pa(r),function(e,t,r,o){for(var i=-1,s=fr(ur((t-e)/(r||1)),0),a=n(s);s--;)a[o?s:++i]=e,e+=r;return a}(t,r,i=i===o?t<r?1:-1:pa(i),e)}}function Ho(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=va(t),r=va(r)),e(t,r)}}function qo(e,t,r,n,i,s,a,u,d,l){var h=8&t;t|=h?c:64,4&(t&=~(h?64:c))||(t&=-4);var m=[e,t,i,h?s:o,h?a:o,h?o:s,h?o:a,u,d,l],p=r.apply(o,m);return xi(e)&&Ei(p,m),p.placeholder=n,Li(p,e,t)}function Jo(e){var t=Me[e];return function(e,r){if(e=va(e),(r=null==r?0:vr(ga(r),292))&&mr(e)){var n=(wa(e)+"e").split("e");return+((n=(wa(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var zo=kr&&1/rr(new kr([,-0]))[1]==d?function(e){return new kr(e)}:uc;function Go(e){return function(t){var r=mi(t);return r==C?Xt(t):r==P?nr(t):function(e,t){return kt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qo(e,t,r,s,d,l,h,m){var p=2&t;if(!p&&"function"!=typeof e)throw new Pe(i);var g=s?s.length:0;if(g||(t&=-97,s=d=o),h=h===o?h:fr(ga(h),0),m=m===o?m:ga(m),g-=d?d.length:0,64&t){var f=s,v=d;s=d=o}var y=p?o:oi(e),w=[e,t,r,s,d,f,v,l,h,m];if(y&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,s=n==u&&8==r||n==u&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!s)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var c=t[3];if(c){var d=e[3];e[3]=d?Ro(d,c,t[4]):c,e[4]=d?tr(e[3],a):t[4]}(c=t[5])&&(d=e[5],e[5]=d?Po(d,c,t[6]):c,e[6]=d?tr(e[5],a):t[6]),(c=t[7])&&(e[7]=c),n&u&&(e[8]=null==e[8]?t[8]:vr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(w,y),e=w[0],t=w[1],r=w[2],s=w[3],d=w[4],!(m=w[9]=w[9]===o?p?0:e.length:fr(w[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,r){var i=No(e);return function s(){for(var a=arguments.length,c=n(a),u=a,d=si(s);u--;)c[u]=arguments[u];var l=a<3&&c[0]!==d&&c[a-1]!==d?[]:tr(c,d);return(a-=l.length)<r?qo(e,t,Do,s.placeholder,o,c,l,o,o,r-a):vt(this&&this!==it&&this instanceof s?i:e,this,c)}}(e,t,m):t!=c&&33!=t||d.length?Do.apply(o,w):function(e,t,r,o){var i=1&t,s=No(e);return function t(){for(var a=-1,c=arguments.length,u=-1,d=o.length,l=n(d+c),h=this&&this!==it&&this instanceof t?s:e;++u<d;)l[u]=o[u];for(;c--;)l[u++]=arguments[++a];return vt(h,i?r:this,l)}}(e,t,r,s);else var x=function(e,t,r){var n=1&t,o=No(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Li((y?Zn:Ei)(x,w),e,t)}function Yo(e,t,r,n){return e===o||js(e,Ae[r])&&!$e.call(n,r)?t:e}function Zo(e,t,r,n,i,s){return ta(e)&&ta(t)&&(s.set(t,e),Fn(e,t,o,Zo,s),s.delete(t)),e}function Xo(e){return ia(e)?o:e}function ei(e,t,r,n,i,s){var a=1&r,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var d=s.get(e),l=s.get(t);if(d&&l)return d==t&&l==e;var h=-1,m=!0,p=2&r?new qr:o;for(s.set(e,t),s.set(t,e);++h<c;){var g=e[h],f=t[h];if(n)var v=a?n(f,g,h,t,e,s):n(g,f,h,e,t,s);if(v!==o){if(v)continue;m=!1;break}if(p){if(!Et(t,(function(e,t){if(!Ht(p,t)&&(g===e||i(g,e,r,n,s)))return p.push(t)}))){m=!1;break}}else if(g!==f&&!i(g,f,r,n,s)){m=!1;break}}return s.delete(e),s.delete(t),m}function ti(e){return Ti(ki(e,o,qi),e+"")}function ri(e){return Mn(e,La,li)}function ni(e){return Mn(e,$a,hi)}var oi=_r?function(e){return _r.get(e)}:uc;function ii(e){for(var t=e.name+"",r=Er[t],n=$e.call(Er,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function si(e){return($e.call(Vr,"placeholder")?Vr:e).placeholder}function ai(){var e=Vr.iteratee||ic;return e=e===ic?Bn:e,arguments.length?e(arguments[0],arguments[1]):e}function ci(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ui(e){for(var t=La(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Mi(o)]}return t}function di(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return $n(r)?r:o}var li=lr?function(e){return null==e?[]:(e=be(e),Ct(lr(e),(function(t){return et.call(e,t)})))}:fc,hi=lr?function(e){for(var t=[];e;)Rt(t,li(e)),e=qe(e);return t}:fc,mi=bn;function pi(e,t,r){for(var n=-1,o=(t=yo(t,e)).length,i=!1;++n<o;){var s=Vi(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&ea(o)&&vi(s,o)&&(Hs(e)||Ks(e))}function gi(e){return"function"!=typeof e.constructor||Ci(e)?{}:Dr(qe(e))}function fi(e){return Hs(e)||Ks(e)||!!(ot&&e&&e[ot])}function vi(e,t){var r=typeof e;return!!(t=null==t?l:t)&&("number"==r||"symbol"!=r&&ve.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?Js(r)&&vi(t,r.length):"string"==n&&t in r)&&js(r[t],e)}function wi(e,t){if(Hs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ua(e))||X.test(e)||!Z.test(e)||null!=t&&e in be(t)}function xi(e){var t=ii(e),r=Vr[t];if("function"!=typeof r||!(t in Wr.prototype))return!1;if(e===r)return!0;var n=oi(r);return!!n&&e===n[0]}(Cr&&mi(new Cr(new ArrayBuffer(1)))!=L||Mr&&mi(new Mr)!=C||br&&mi(br.resolve())!=k||kr&&mi(new kr)!=P||Rr&&mi(new Rr)!=A)&&(mi=function(e){var t=bn(e),r=t==b?e.constructor:o,n=r?Di(r):"";if(n)switch(n){case Ar:return L;case Tr:return C;case Lr:return k;case $r:return P;case Br:return A}return t});var Si=Te?Zs:vc;function Ci(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Mi(e){return e==e&&!ta(e)}function bi(e,t){return function(r){return null!=r&&r[e]===t&&(t!==o||e in be(r))}}function ki(e,t,r){return t=fr(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=fr(o.length-t,0),a=n(s);++i<s;)a[i]=o[t+i];i=-1;for(var c=n(t+1);++i<t;)c[i]=o[i];return c[t]=r(a),vt(e,this,c)}}function Ri(e,t){return t.length<2?e:Cn(e,to(t,0,-1))}function Pi(e,t){for(var r=e.length,n=vr(t.length,r),i=_o(e);n--;){var s=t[n];e[n]=vi(s,r)?i[s]:o}return e}function _i(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ei=$i(Zn),Ai=Vt||function(e,t){return it.setTimeout(e,t)},Ti=$i(Xn);function Li(e,t,r){var n=t+"";return Ti(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return wt(p,(function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function $i(e){var t=0,r=0;return function(){var n=yr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Bi(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r<t;){var s=qn(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Ii,Ni,Oi=(Ii=Is((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,o){t.push(n?o.replace(de,"$1"):r||e)})),t}),(function(e){return 500===Ni.size&&Ni.clear(),e})),Ni=Ii.cache,Ii);function Vi(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Di(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Wr)return e.clone();var t=new jr(e.__wrapped__,e.__chain__);return t.__actions__=_o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ji=zn((function(e,t){return zs(e)?dn(e,fn(t,1,zs,!0)):[]})),Wi=zn((function(e,t){var r=Yi(t);return zs(r)&&(r=o),zs(e)?dn(e,fn(t,1,zs,!0),ai(r,2)):[]})),Ui=zn((function(e,t){var r=Yi(t);return zs(r)&&(r=o),zs(e)?dn(e,fn(t,1,zs,!0),o,r):[]}));function Ki(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=fr(n+o,0)),Lt(e,ai(t,3),o)}function Hi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==o&&(i=ga(r),i=r<0?fr(n+i,0):vr(i,n-1)),Lt(e,ai(t,3),i,!0)}function qi(e){return null!=e&&e.length?fn(e,1):[]}function Ji(e){return e&&e.length?e[0]:o}var zi=zn((function(e){var t=kt(e,fo);return t.length&&t[0]===e[0]?_n(t):[]})),Gi=zn((function(e){var t=Yi(e),r=kt(e,fo);return t===Yi(r)?t=o:r.pop(),r.length&&r[0]===e[0]?_n(r,ai(t,2)):[]})),Qi=zn((function(e){var t=Yi(e),r=kt(e,fo);return(t="function"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?_n(r,o,t):[]}));function Yi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Zi=zn(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Kn(e,t):e}var es=ti((function(e,t){var r=null==e?0:e.length,n=on(e,t);return Hn(e,kt(t,(function(e){return vi(e,r)?+e:e})).sort(ko)),n}));function ts(e){return null==e?e:Sr.call(e)}var rs=zn((function(e){return co(fn(e,1,zs,!0))})),ns=zn((function(e){var t=Yi(e);return zs(t)&&(t=o),co(fn(e,1,zs,!0),ai(t,2))})),os=zn((function(e){var t=Yi(e);return t="function"==typeof t?t:o,co(fn(e,1,zs,!0),o,t)}));function is(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(zs(e))return t=fr(e.length,t),!0})),jt(t,(function(t){return kt(e,Ot(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=is(e);return null==t?r:kt(r,(function(e){return vt(t,o,e)}))}var as=zn((function(e,t){return zs(e)?dn(e,t):[]})),cs=zn((function(e){return po(Ct(e,zs))})),us=zn((function(e){var t=Yi(e);return zs(t)&&(t=o),po(Ct(e,zs),ai(t,2))})),ds=zn((function(e){var t=Yi(e);return t="function"==typeof t?t:o,po(Ct(e,zs),o,t)})),ls=zn(is),hs=zn((function(e){var t=e.length,r=t>1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,ss(e,r)}));function ms(e){var t=Vr(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var gs=ti((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Wr&&vi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[i],thisArg:o}),new jr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),fs=Ao((function(e,t,r){$e.call(e,r)?++e[r]:nn(e,r,1)})),vs=Oo(Ki),ys=Oo(Hi);function ws(e,t){return(Hs(e)?wt:ln)(e,ai(t,3))}function xs(e,t){return(Hs(e)?xt:hn)(e,ai(t,3))}var Ss=Ao((function(e,t,r){$e.call(e,r)?e[r].push(t):nn(e,r,[t])})),Cs=zn((function(e,t,r){var o=-1,i="function"==typeof t,s=Js(e)?n(e.length):[];return ln(e,(function(e){s[++o]=i?vt(t,e,r):En(e,t,r)})),s})),Ms=Ao((function(e,t,r){nn(e,r,t)}));function bs(e,t){return(Hs(e)?kt:On)(e,ai(t,3))}var ks=Ao((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Rs=zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&yi(e,t[0],t[1])?t=[]:r>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Wn(e,fn(t,1),[])})),Ps=At||function(){return it.Date.now()};function _s(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Qo(e,u,o,o,o,o,t)}function Es(e,t){var r;if("function"!=typeof t)throw new Pe(i);return e=ga(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var As=zn((function(e,t,r){var n=1;if(r.length){var o=tr(r,si(As));n|=c}return Qo(e,n,t,r,o)})),Ts=zn((function(e,t,r){var n=3;if(r.length){var o=tr(r,si(Ts));n|=c}return Qo(t,n,e,r,o)}));function Ls(e,t,r){var n,s,a,c,u,d,l=0,h=!1,m=!1,p=!0;if("function"!=typeof e)throw new Pe(i);function g(t){var r=n,i=s;return n=s=o,l=t,c=e.apply(i,r)}function f(e){return l=e,u=Ai(y,t),h?g(e):c}function v(e){var r=e-d;return d===o||r>=t||r<0||m&&e-l>=a}function y(){var e=Ps();if(v(e))return w(e);u=Ai(y,function(e){var r=t-(e-d);return m?vr(r,a-(e-l)):r}(e))}function w(e){return u=o,p&&n?g(e):(n=s=o,c)}function x(){var e=Ps(),r=v(e);if(n=arguments,s=this,d=e,r){if(u===o)return f(d);if(m)return So(u),u=Ai(y,t),g(d)}return u===o&&(u=Ai(y,t)),c}return t=va(t)||0,ta(r)&&(h=!!r.leading,a=(m="maxWait"in r)?fr(va(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),x.cancel=function(){u!==o&&So(u),l=0,n=d=s=u=o},x.flush=function(){return u===o?c:w(Ps())},x}var $s=zn((function(e,t){return un(e,1,t)})),Bs=zn((function(e,t,r){return un(e,va(t)||0,r)}));function Is(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Is.Cache||Hr),r}function Ns(e){if("function"!=typeof e)throw new Pe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Is.Cache=Hr;var Os=wo((function(e,t){var r=(t=1==t.length&&Hs(t[0])?kt(t[0],Ut(ai())):kt(fn(t,1),Ut(ai()))).length;return zn((function(n){for(var o=-1,i=vr(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return vt(e,this,n)}))})),Vs=zn((function(e,t){var r=tr(t,si(Vs));return Qo(e,c,o,t,r)})),Ds=zn((function(e,t){var r=tr(t,si(Ds));return Qo(e,64,o,t,r)})),Fs=ti((function(e,t){return Qo(e,256,o,o,o,t)}));function js(e,t){return e===t||e!=e&&t!=t}var Ws=Ho(kn),Us=Ho((function(e,t){return e>=t})),Ks=An(function(){return arguments}())?An:function(e){return ra(e)&&$e.call(e,"callee")&&!et.call(e,"callee")},Hs=n.isArray,qs=lt?Ut(lt):function(e){return ra(e)&&bn(e)==T};function Js(e){return null!=e&&ea(e.length)&&!Zs(e)}function zs(e){return ra(e)&&Js(e)}var Gs=hr||vc,Qs=ht?Ut(ht):function(e){return ra(e)&&bn(e)==y};function Ys(e){if(!ra(e))return!1;var t=bn(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ia(e)}function Zs(e){if(!ta(e))return!1;var t=bn(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ga(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=mt?Ut(mt):function(e){return ra(e)&&mi(e)==C};function oa(e){return"number"==typeof e||ra(e)&&bn(e)==M}function ia(e){if(!ra(e)||bn(e)!=b)return!1;var t=qe(e);if(null===t)return!0;var r=$e.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Le.call(r)==Oe}var sa=pt?Ut(pt):function(e){return ra(e)&&bn(e)==R},aa=gt?Ut(gt):function(e){return ra(e)&&mi(e)==P};function ca(e){return"string"==typeof e||!Hs(e)&&ra(e)&&bn(e)==_}function ua(e){return"symbol"==typeof e||ra(e)&&bn(e)==E}var da=ft?Ut(ft):function(e){return ra(e)&&ea(e.length)&&!!Ze[bn(e)]},la=Ho(Nn),ha=Ho((function(e,t){return e<=t}));function ma(e){if(!e)return[];if(Js(e))return ca(e)?ir(e):_o(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=mi(e);return(t==C?Xt:t==P?rr:ja)(e)}function pa(e){return e?(e=va(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function fa(e){return e?sn(ga(e),0,m):0}function va(e){if("number"==typeof e)return e;if(ua(e))return h;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Wt(e);var r=pe.test(e);return r||fe.test(e)?rt(e.slice(2),r?2:8):me.test(e)?h:+e}function ya(e){return Eo(e,$a(e))}function wa(e){return null==e?"":ao(e)}var xa=To((function(e,t){if(Ci(t)||Js(t))Eo(t,La(t),e);else for(var r in t)$e.call(t,r)&&Xr(e,r,t[r])})),Sa=To((function(e,t){Eo(t,$a(t),e)})),Ca=To((function(e,t,r,n){Eo(t,$a(t),e,n)})),Ma=To((function(e,t,r,n){Eo(t,La(t),e,n)})),ba=ti(on),ka=zn((function(e,t){e=be(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(n=1);++r<n;)for(var s=t[r],a=$a(s),c=-1,u=a.length;++c<u;){var d=a[c],l=e[d];(l===o||js(l,Ae[d])&&!$e.call(e,d))&&(e[d]=s[d])}return e})),Ra=zn((function(e){return e.push(o,Zo),vt(Ia,o,e)}));function Pa(e,t,r){var n=null==e?o:Cn(e,t);return n===o?r:n}function _a(e,t){return null!=e&&pi(e,t,Pn)}var Ea=Fo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=r}),tc(oc)),Aa=Fo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),$e.call(e,t)?e[t].push(r):e[t]=[r]}),ai),Ta=zn(En);function La(e){return Js(e)?zr(e):In(e)}function $a(e){return Js(e)?zr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in be(e))t.push(r);return t}(e);var t=Ci(e),r=[];for(var n in e)("constructor"!=n||!t&&$e.call(e,n))&&r.push(n);return r}(e)}var Ba=To((function(e,t,r){Fn(e,t,r)})),Ia=To((function(e,t,r,n){Fn(e,t,r,n)})),Na=ti((function(e,t){var r={};if(null==e)return r;var n=!1;t=kt(t,(function(t){return t=yo(t,e),n||(n=t.length>1),t})),Eo(e,ni(e),r),n&&(r=an(r,7,Xo));for(var o=t.length;o--;)uo(r,t[o]);return r})),Oa=ti((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return _a(e,r)}))}(e,t)}));function Va(e,t){if(null==e)return{};var r=kt(ni(e),(function(e){return[e]}));return t=ai(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var Da=Go(La),Fa=Go($a);function ja(e){return null==e?[]:Kt(e,La(e))}var Wa=Io((function(e,t,r){return t=t.toLowerCase(),e+(r?Ua(t):t)}));function Ua(e){return Ya(wa(e).toLowerCase())}function Ka(e){return(e=wa(e))&&e.replace(ye,Gt).replace(He,"")}var Ha=Io((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),qa=Io((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ja=Bo("toLowerCase"),za=Io((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ga=Io((function(e,t,r){return e+(r?" ":"")+Ya(t)})),Qa=Io((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ya=Bo("toUpperCase");function Za(e,t,r){return e=wa(e),(t=r?o:t)===o?function(e){return Ge.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xa=zn((function(e,t){try{return vt(e,o,t)}catch(e){return Ys(e)?e:new Se(e)}})),ec=ti((function(e,t){return wt(t,(function(t){t=Vi(t),nn(e,t,As(e[t],e))})),e}));function tc(e){return function(){return e}}var rc=Vo(),nc=Vo(!0);function oc(e){return e}function ic(e){return Bn("function"==typeof e?e:an(e,1))}var sc=zn((function(e,t){return function(r){return En(r,e,t)}})),ac=zn((function(e,t){return function(r){return En(e,r,t)}}));function cc(e,t,r){var n=La(t),o=Sn(t,n);null!=r||ta(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Sn(t,La(t)));var i=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return wt(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__),o=r.__actions__=_o(this.__actions__);return o.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Rt([this.value()],arguments))})})),e}function uc(){}var dc=Wo(kt),lc=Wo(St),hc=Wo(Et);function mc(e){return wi(e)?Ot(Vi(e)):function(e){return function(t){return Cn(t,e)}}(e)}var pc=Ko(),gc=Ko(!0);function fc(){return[]}function vc(){return!1}var yc,wc=jo((function(e,t){return e+t}),0),xc=Jo("ceil"),Sc=jo((function(e,t){return e/t}),1),Cc=Jo("floor"),Mc=jo((function(e,t){return e*t}),1),bc=Jo("round"),kc=jo((function(e,t){return e-t}),0);return Vr.after=function(e,t){if("function"!=typeof t)throw new Pe(i);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},Vr.ary=_s,Vr.assign=xa,Vr.assignIn=Sa,Vr.assignInWith=Ca,Vr.assignWith=Ma,Vr.at=ba,Vr.before=Es,Vr.bind=As,Vr.bindAll=ec,Vr.bindKey=Ts,Vr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Vr.chain=ms,Vr.chunk=function(e,t,r){t=(r?yi(e,t,r):t===o)?1:fr(ga(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,c=n(ur(i/t));s<i;)c[a++]=to(e,s,s+=t);return c},Vr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},Vr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Rt(Hs(r)?_o(r):[r],fn(t,1))},Vr.cond=function(e){var t=null==e?0:e.length,r=ai();return e=t?kt(e,(function(e){if("function"!=typeof e[1])throw new Pe(i);return[r(e[0]),e[1]]})):[],zn((function(r){for(var n=-1;++n<t;){var o=e[n];if(vt(o[0],this,r))return vt(o[1],this,r)}}))},Vr.conforms=function(e){return function(e){var t=La(e);return function(r){return cn(r,e,t)}}(an(e,1))},Vr.constant=tc,Vr.countBy=fs,Vr.create=function(e,t){var r=Dr(e);return null==t?r:rn(r,t)},Vr.curry=function e(t,r,n){var i=Qo(t,8,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},Vr.curryRight=function e(t,r,n){var i=Qo(t,16,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},Vr.debounce=Ls,Vr.defaults=ka,Vr.defaultsDeep=Ra,Vr.defer=$s,Vr.delay=Bs,Vr.difference=ji,Vr.differenceBy=Wi,Vr.differenceWith=Ui,Vr.drop=function(e,t,r){var n=null==e?0:e.length;return n?to(e,(t=r||t===o?1:ga(t))<0?0:t,n):[]},Vr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?to(e,0,(t=n-(t=r||t===o?1:ga(t)))<0?0:t):[]},Vr.dropRightWhile=function(e,t){return e&&e.length?ho(e,ai(t,3),!0,!0):[]},Vr.dropWhile=function(e,t){return e&&e.length?ho(e,ai(t,3),!0):[]},Vr.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yi(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=ga(r))<0&&(r=-r>i?0:i+r),(n=n===o||n>i?i:ga(n))<0&&(n+=i),n=r>n?0:fa(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Vr.filter=function(e,t){return(Hs(e)?Ct:gn)(e,ai(t,3))},Vr.flatMap=function(e,t){return fn(bs(e,t),1)},Vr.flatMapDeep=function(e,t){return fn(bs(e,t),d)},Vr.flatMapDepth=function(e,t,r){return r=r===o?1:ga(r),fn(bs(e,t),r)},Vr.flatten=qi,Vr.flattenDeep=function(e){return null!=e&&e.length?fn(e,d):[]},Vr.flattenDepth=function(e,t){return null!=e&&e.length?fn(e,t=t===o?1:ga(t)):[]},Vr.flip=function(e){return Qo(e,512)},Vr.flow=rc,Vr.flowRight=nc,Vr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Vr.functions=function(e){return null==e?[]:Sn(e,La(e))},Vr.functionsIn=function(e){return null==e?[]:Sn(e,$a(e))},Vr.groupBy=Ss,Vr.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},Vr.intersection=zi,Vr.intersectionBy=Gi,Vr.intersectionWith=Qi,Vr.invert=Ea,Vr.invertBy=Aa,Vr.invokeMap=Cs,Vr.iteratee=ic,Vr.keyBy=Ms,Vr.keys=La,Vr.keysIn=$a,Vr.map=bs,Vr.mapKeys=function(e,t){var r={};return t=ai(t,3),wn(e,(function(e,n,o){nn(r,t(e,n,o),e)})),r},Vr.mapValues=function(e,t){var r={};return t=ai(t,3),wn(e,(function(e,n,o){nn(r,n,t(e,n,o))})),r},Vr.matches=function(e){return Vn(an(e,1))},Vr.matchesProperty=function(e,t){return Dn(e,an(t,1))},Vr.memoize=Is,Vr.merge=Ba,Vr.mergeWith=Ia,Vr.method=sc,Vr.methodOf=ac,Vr.mixin=cc,Vr.negate=Ns,Vr.nthArg=function(e){return e=ga(e),zn((function(t){return jn(t,e)}))},Vr.omit=Na,Vr.omitBy=function(e,t){return Va(e,Ns(ai(t)))},Vr.once=function(e){return Es(2,e)},Vr.orderBy=function(e,t,r,n){return null==e?[]:(Hs(t)||(t=null==t?[]:[t]),Hs(r=n?o:r)||(r=null==r?[]:[r]),Wn(e,t,r))},Vr.over=dc,Vr.overArgs=Os,Vr.overEvery=lc,Vr.overSome=hc,Vr.partial=Vs,Vr.partialRight=Ds,Vr.partition=ks,Vr.pick=Oa,Vr.pickBy=Va,Vr.property=mc,Vr.propertyOf=function(e){return function(t){return null==e?o:Cn(e,t)}},Vr.pull=Zi,Vr.pullAll=Xi,Vr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,ai(r,2)):e},Vr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,o,r):e},Vr.pullAt=es,Vr.range=pc,Vr.rangeRight=gc,Vr.rearg=Fs,Vr.reject=function(e,t){return(Hs(e)?Ct:gn)(e,Ns(ai(t,3)))},Vr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=ai(t,3);++n<i;){var s=e[n];t(s,n,e)&&(r.push(s),o.push(n))}return Hn(e,o),r},Vr.rest=function(e,t){if("function"!=typeof e)throw new Pe(i);return zn(e,t=t===o?t:ga(t))},Vr.reverse=ts,Vr.sampleSize=function(e,t,r){return t=(r?yi(e,t,r):t===o)?1:ga(t),(Hs(e)?Qr:Qn)(e,t)},Vr.set=function(e,t,r){return null==e?e:Yn(e,t,r)},Vr.setWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:Yn(e,t,r,n)},Vr.shuffle=function(e){return(Hs(e)?Yr:eo)(e)},Vr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&yi(e,t,r)?(t=0,r=n):(t=null==t?0:ga(t),r=r===o?n:ga(r)),to(e,t,r)):[]},Vr.sortBy=Rs,Vr.sortedUniq=function(e){return e&&e.length?io(e):[]},Vr.sortedUniqBy=function(e,t){return e&&e.length?io(e,ai(t,2)):[]},Vr.split=function(e,t,r){return r&&"number"!=typeof r&&yi(e,t,r)&&(t=r=o),(r=r===o?m:r>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ao(t))&&Zt(e)?xo(ir(e),0,r):e.split(t,r):[]},Vr.spread=function(e,t){if("function"!=typeof e)throw new Pe(i);return t=null==t?0:fr(ga(t),0),zn((function(r){var n=r[t],o=xo(r,0,t);return n&&Rt(o,n),vt(e,this,o)}))},Vr.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},Vr.take=function(e,t,r){return e&&e.length?to(e,0,(t=r||t===o?1:ga(t))<0?0:t):[]},Vr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?to(e,(t=n-(t=r||t===o?1:ga(t)))<0?0:t,n):[]},Vr.takeRightWhile=function(e,t){return e&&e.length?ho(e,ai(t,3),!1,!0):[]},Vr.takeWhile=function(e,t){return e&&e.length?ho(e,ai(t,3)):[]},Vr.tap=function(e,t){return t(e),e},Vr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Pe(i);return ta(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ls(e,t,{leading:n,maxWait:t,trailing:o})},Vr.thru=ps,Vr.toArray=ma,Vr.toPairs=Da,Vr.toPairsIn=Fa,Vr.toPath=function(e){return Hs(e)?kt(e,Vi):ua(e)?[e]:_o(Oi(wa(e)))},Vr.toPlainObject=ya,Vr.transform=function(e,t,r){var n=Hs(e),o=n||Gs(e)||da(e);if(t=ai(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:ta(e)&&Zs(i)?Dr(qe(e)):{}}return(o?wt:wn)(e,(function(e,n,o){return t(r,e,n,o)})),r},Vr.unary=function(e){return _s(e,1)},Vr.union=rs,Vr.unionBy=ns,Vr.unionWith=os,Vr.uniq=function(e){return e&&e.length?co(e):[]},Vr.uniqBy=function(e,t){return e&&e.length?co(e,ai(t,2)):[]},Vr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?co(e,o,t):[]},Vr.unset=function(e,t){return null==e||uo(e,t)},Vr.unzip=is,Vr.unzipWith=ss,Vr.update=function(e,t,r){return null==e?e:lo(e,t,vo(r))},Vr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:lo(e,t,vo(r),n)},Vr.values=ja,Vr.valuesIn=function(e){return null==e?[]:Kt(e,$a(e))},Vr.without=as,Vr.words=Za,Vr.wrap=function(e,t){return Vs(vo(t),e)},Vr.xor=cs,Vr.xorBy=us,Vr.xorWith=ds,Vr.zip=ls,Vr.zipObject=function(e,t){return go(e||[],t||[],Xr)},Vr.zipObjectDeep=function(e,t){return go(e||[],t||[],Yn)},Vr.zipWith=hs,Vr.entries=Da,Vr.entriesIn=Fa,Vr.extend=Sa,Vr.extendWith=Ca,cc(Vr,Vr),Vr.add=wc,Vr.attempt=Xa,Vr.camelCase=Wa,Vr.capitalize=Ua,Vr.ceil=xc,Vr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=va(r))==r?r:0),t!==o&&(t=(t=va(t))==t?t:0),sn(va(e),t,r)},Vr.clone=function(e){return an(e,4)},Vr.cloneDeep=function(e){return an(e,5)},Vr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:o)},Vr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:o)},Vr.conformsTo=function(e,t){return null==t||cn(e,t,La(t))},Vr.deburr=Ka,Vr.defaultTo=function(e,t){return null==e||e!=e?t:e},Vr.divide=Sc,Vr.endsWith=function(e,t,r){e=wa(e),t=ao(t);var n=e.length,i=r=r===o?n:sn(ga(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Vr.eq=js,Vr.escape=function(e){return(e=wa(e))&&z.test(e)?e.replace(q,Qt):e},Vr.escapeRegExp=function(e){return(e=wa(e))&&re.test(e)?e.replace(te,"\\$&"):e},Vr.every=function(e,t,r){var n=Hs(e)?St:mn;return r&&yi(e,t,r)&&(t=o),n(e,ai(t,3))},Vr.find=vs,Vr.findIndex=Ki,Vr.findKey=function(e,t){return Tt(e,ai(t,3),wn)},Vr.findLast=ys,Vr.findLastIndex=Hi,Vr.findLastKey=function(e,t){return Tt(e,ai(t,3),xn)},Vr.floor=Cc,Vr.forEach=ws,Vr.forEachRight=xs,Vr.forIn=function(e,t){return null==e?e:vn(e,ai(t,3),$a)},Vr.forInRight=function(e,t){return null==e?e:yn(e,ai(t,3),$a)},Vr.forOwn=function(e,t){return e&&wn(e,ai(t,3))},Vr.forOwnRight=function(e,t){return e&&xn(e,ai(t,3))},Vr.get=Pa,Vr.gt=Ws,Vr.gte=Us,Vr.has=function(e,t){return null!=e&&pi(e,t,Rn)},Vr.hasIn=_a,Vr.head=Ji,Vr.identity=oc,Vr.includes=function(e,t,r,n){e=Js(e)?e:ja(e),r=r&&!n?ga(r):0;var o=e.length;return r<0&&(r=fr(o+r,0)),ca(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&$t(e,t,r)>-1},Vr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=fr(n+o,0)),$t(e,t,o)},Vr.inRange=function(e,t,r){return t=pa(t),r===o?(r=t,t=0):r=pa(r),function(e,t,r){return e>=vr(t,r)&&e<fr(t,r)}(e=va(e),t,r)},Vr.invoke=Ta,Vr.isArguments=Ks,Vr.isArray=Hs,Vr.isArrayBuffer=qs,Vr.isArrayLike=Js,Vr.isArrayLikeObject=zs,Vr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&bn(e)==v},Vr.isBuffer=Gs,Vr.isDate=Qs,Vr.isElement=function(e){return ra(e)&&1===e.nodeType&&!ia(e)},Vr.isEmpty=function(e){if(null==e)return!0;if(Js(e)&&(Hs(e)||"string"==typeof e||"function"==typeof e.splice||Gs(e)||da(e)||Ks(e)))return!e.length;var t=mi(e);if(t==C||t==P)return!e.size;if(Ci(e))return!In(e).length;for(var r in e)if($e.call(e,r))return!1;return!0},Vr.isEqual=function(e,t){return Tn(e,t)},Vr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:o)?r(e,t):o;return n===o?Tn(e,t,o,r):!!n},Vr.isError=Ys,Vr.isFinite=function(e){return"number"==typeof e&&mr(e)},Vr.isFunction=Zs,Vr.isInteger=Xs,Vr.isLength=ea,Vr.isMap=na,Vr.isMatch=function(e,t){return e===t||Ln(e,t,ui(t))},Vr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:o,Ln(e,t,ui(t),r)},Vr.isNaN=function(e){return oa(e)&&e!=+e},Vr.isNative=function(e){if(Si(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $n(e)},Vr.isNil=function(e){return null==e},Vr.isNull=function(e){return null===e},Vr.isNumber=oa,Vr.isObject=ta,Vr.isObjectLike=ra,Vr.isPlainObject=ia,Vr.isRegExp=sa,Vr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=l},Vr.isSet=aa,Vr.isString=ca,Vr.isSymbol=ua,Vr.isTypedArray=da,Vr.isUndefined=function(e){return e===o},Vr.isWeakMap=function(e){return ra(e)&&mi(e)==A},Vr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==bn(e)},Vr.join=function(e,t){return null==e?"":pr.call(e,t)},Vr.kebabCase=Ha,Vr.last=Yi,Vr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ga(r))<0?fr(n+i,0):vr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Lt(e,It,i,!0)},Vr.lowerCase=qa,Vr.lowerFirst=Ja,Vr.lt=la,Vr.lte=ha,Vr.max=function(e){return e&&e.length?pn(e,oc,kn):o},Vr.maxBy=function(e,t){return e&&e.length?pn(e,ai(t,2),kn):o},Vr.mean=function(e){return Nt(e,oc)},Vr.meanBy=function(e,t){return Nt(e,ai(t,2))},Vr.min=function(e){return e&&e.length?pn(e,oc,Nn):o},Vr.minBy=function(e,t){return e&&e.length?pn(e,ai(t,2),Nn):o},Vr.stubArray=fc,Vr.stubFalse=vc,Vr.stubObject=function(){return{}},Vr.stubString=function(){return""},Vr.stubTrue=function(){return!0},Vr.multiply=Mc,Vr.nth=function(e,t){return e&&e.length?jn(e,ga(t)):o},Vr.noConflict=function(){return it._===this&&(it._=Ve),this},Vr.noop=uc,Vr.now=Ps,Vr.pad=function(e,t,r){e=wa(e);var n=(t=ga(t))?or(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Uo(dr(o),r)+e+Uo(ur(o),r)},Vr.padEnd=function(e,t,r){e=wa(e);var n=(t=ga(t))?or(e):0;return t&&n<t?e+Uo(t-n,r):e},Vr.padStart=function(e,t,r){e=wa(e);var n=(t=ga(t))?or(e):0;return t&&n<t?Uo(t-n,r)+e:e},Vr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),wr(wa(e).replace(ne,""),t||0)},Vr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yi(e,t,r)&&(t=r=o),r===o&&("boolean"==typeof t?(r=t,t=o):"boolean"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=pa(e),t===o?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=xr();return vr(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return qn(e,t)},Vr.reduce=function(e,t,r){var n=Hs(e)?Pt:Dt,o=arguments.length<3;return n(e,ai(t,4),r,o,ln)},Vr.reduceRight=function(e,t,r){var n=Hs(e)?_t:Dt,o=arguments.length<3;return n(e,ai(t,4),r,o,hn)},Vr.repeat=function(e,t,r){return t=(r?yi(e,t,r):t===o)?1:ga(t),Jn(wa(e),t)},Vr.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Vr.result=function(e,t,r){var n=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++n<i;){var s=null==e?o:e[Vi(t[n])];s===o&&(n=i,s=r),e=Zs(s)?s.call(e):s}return e},Vr.round=bc,Vr.runInContext=e,Vr.sample=function(e){return(Hs(e)?Gr:Gn)(e)},Vr.size=function(e){if(null==e)return 0;if(Js(e))return ca(e)?or(e):e.length;var t=mi(e);return t==C||t==P?e.size:In(e).length},Vr.snakeCase=za,Vr.some=function(e,t,r){var n=Hs(e)?Et:ro;return r&&yi(e,t,r)&&(t=o),n(e,ai(t,3))},Vr.sortedIndex=function(e,t){return no(e,t)},Vr.sortedIndexBy=function(e,t,r){return oo(e,t,ai(r,2))},Vr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=no(e,t);if(n<r&&js(e[n],t))return n}return-1},Vr.sortedLastIndex=function(e,t){return no(e,t,!0)},Vr.sortedLastIndexBy=function(e,t,r){return oo(e,t,ai(r,2),!0)},Vr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=no(e,t,!0)-1;if(js(e[r],t))return r}return-1},Vr.startCase=Ga,Vr.startsWith=function(e,t,r){return e=wa(e),r=null==r?0:sn(ga(r),0,e.length),t=ao(t),e.slice(r,r+t.length)==t},Vr.subtract=kc,Vr.sum=function(e){return e&&e.length?Ft(e,oc):0},Vr.sumBy=function(e,t){return e&&e.length?Ft(e,ai(t,2)):0},Vr.template=function(e,t,r){var n=Vr.templateSettings;r&&yi(e,t,r)&&(t=o),e=wa(e),t=Ca({},t,n,Yo);var i,s,a=Ca({},t.imports,n.imports,Yo),c=La(a),u=Kt(a,c),d=0,l=t.interpolate||we,h="__p += '",m=ke((t.escape||we).source+"|"+l.source+"|"+(l===Y?le:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+($e.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ye+"]")+"\n";e.replace(m,(function(t,r,n,o,a,c){return n||(n=o),h+=e.slice(d,c).replace(xe,Yt),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=c+t.length,t})),h+="';\n";var g=$e.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(W,""):h).replace(U,"$1").replace(K,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var f=Xa((function(){return Ce(c,p+"return "+h).apply(o,u)}));if(f.source=h,Ys(f))throw f;return f},Vr.times=function(e,t){if((e=ga(e))<1||e>l)return[];var r=m,n=vr(e,m);t=ai(t),e-=m;for(var o=jt(n,t);++r<e;)t(r);return o},Vr.toFinite=pa,Vr.toInteger=ga,Vr.toLength=fa,Vr.toLower=function(e){return wa(e).toLowerCase()},Vr.toNumber=va,Vr.toSafeInteger=function(e){return e?sn(ga(e),-9007199254740991,l):0===e?e:0},Vr.toString=wa,Vr.toUpper=function(e){return wa(e).toUpperCase()},Vr.trim=function(e,t,r){if((e=wa(e))&&(r||t===o))return Wt(e);if(!e||!(t=ao(t)))return e;var n=ir(e),i=ir(t);return xo(n,qt(n,i),Jt(n,i)+1).join("")},Vr.trimEnd=function(e,t,r){if((e=wa(e))&&(r||t===o))return e.slice(0,sr(e)+1);if(!e||!(t=ao(t)))return e;var n=ir(e);return xo(n,0,Jt(n,ir(t))+1).join("")},Vr.trimStart=function(e,t,r){if((e=wa(e))&&(r||t===o))return e.replace(ne,"");if(!e||!(t=ao(t)))return e;var n=ir(e);return xo(n,qt(n,ir(t))).join("")},Vr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var i="separator"in t?t.separator:i;r="length"in t?ga(t.length):r,n="omission"in t?ao(t.omission):n}var s=(e=wa(e)).length;if(Zt(e)){var a=ir(e);s=a.length}if(r>=s)return e;var c=r-or(n);if(c<1)return n;var u=a?xo(a,0,c).join(""):e.slice(0,c);if(i===o)return u+n;if(a&&(c+=u.length-c),sa(i)){if(e.slice(c).search(i)){var d,l=u;for(i.global||(i=ke(i.source,wa(he.exec(i))+"g")),i.lastIndex=0;d=i.exec(l);)var h=d.index;u=u.slice(0,h===o?c:h)}}else if(e.indexOf(ao(i),c)!=c){var m=u.lastIndexOf(i);m>-1&&(u=u.slice(0,m))}return u+n},Vr.unescape=function(e){return(e=wa(e))&&J.test(e)?e.replace(H,ar):e},Vr.uniqueId=function(e){var t=++Be;return wa(e)+t},Vr.upperCase=Qa,Vr.upperFirst=Ya,Vr.each=ws,Vr.eachRight=xs,Vr.first=Ji,cc(Vr,(yc={},wn(Vr,(function(e,t){$e.call(Vr.prototype,t)||(yc[t]=e)})),yc),{chain:!1}),Vr.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Vr[e].placeholder=Vr})),wt(["drop","take"],(function(e,t){Wr.prototype[e]=function(r){r=r===o?1:fr(ga(r),0);var n=this.__filtered__&&!t?new Wr(this):this.clone();return n.__filtered__?n.__takeCount__=vr(r,n.__takeCount__):n.__views__.push({size:vr(r,m),type:e+(n.__dir__<0?"Right":"")}),n},Wr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Wr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),wt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Wr.prototype[e]=function(){return this[r](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Wr.prototype[e]=function(){return this.__filtered__?new Wr(this):this[r](1)}})),Wr.prototype.compact=function(){return this.filter(oc)},Wr.prototype.find=function(e){return this.filter(e).head()},Wr.prototype.findLast=function(e){return this.reverse().find(e)},Wr.prototype.invokeMap=zn((function(e,t){return"function"==typeof e?new Wr(this):this.map((function(r){return En(r,e,t)}))})),Wr.prototype.reject=function(e){return this.filter(Ns(ai(e)))},Wr.prototype.slice=function(e,t){e=ga(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Wr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ga(t))<0?r.dropRight(-t):r.take(t-e)),r)},Wr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wr.prototype.toArray=function(){return this.take(m)},wn(Wr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Vr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);i&&(Vr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof Wr,u=a[0],d=c||Hs(t),l=function(e){var t=i.apply(Vr,Rt([e],a));return n&&h?t[0]:t};d&&r&&"function"==typeof u&&1!=u.length&&(c=d=!1);var h=this.__chain__,m=!!this.__actions__.length,p=s&&!h,g=c&&!m;if(!s&&d){t=g?t:new Wr(this);var f=e.apply(t,a);return f.__actions__.push({func:ps,args:[l],thisArg:o}),new jr(f,h)}return p&&g?e.apply(this,a):(f=this.thru(l),p?n?f.value()[0]:f.value():f)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=_e[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Vr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Hs(o)?o:[],e)}return this[r]((function(r){return t.apply(Hs(r)?r:[],e)}))}})),wn(Wr.prototype,(function(e,t){var r=Vr[t];if(r){var n=r.name+"";$e.call(Er,n)||(Er[n]=[]),Er[n].push({name:t,func:r})}})),Er[Do(o,2).name]=[{name:"wrapper",func:o}],Wr.prototype.clone=function(){var e=new Wr(this.__wrapped__);return e.__actions__=_o(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_o(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_o(this.__views__),e},Wr.prototype.reverse=function(){if(this.__filtered__){var e=new Wr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Hs(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n<o;){var i=r[n],s=i.size;switch(i.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vr(t,e+s);break;case"takeRight":e=fr(e,t-s)}}return{start:e,end:t}}(0,o,this.__views__),s=i.start,a=i.end,c=a-s,u=n?a:s-1,d=this.__iteratees__,l=d.length,h=0,m=vr(c,this.__takeCount__);if(!r||!n&&o==c&&m==c)return mo(e,this.__actions__);var p=[];e:for(;c--&&h<m;){for(var g=-1,f=e[u+=t];++g<l;){var v=d[g],y=v.iteratee,w=v.type,x=y(f);if(2==w)f=x;else if(!x){if(1==w)continue e;break e}}p[h++]=f}return p},Vr.prototype.at=gs,Vr.prototype.chain=function(){return ms(this)},Vr.prototype.commit=function(){return new jr(this.value(),this.__chain__)},Vr.prototype.next=function(){this.__values__===o&&(this.__values__=ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Vr.prototype.plant=function(e){for(var t,r=this;r instanceof Fr;){var n=Fi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Vr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wr){var t=e;return this.__actions__.length&&(t=new Wr(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:o}),new jr(t,this.__chain__)}return this.thru(ts)},Vr.prototype.toJSON=Vr.prototype.valueOf=Vr.prototype.value=function(){return mo(this.__wrapped__,this.__actions__)},Vr.prototype.first=Vr.prototype.head,st&&(Vr.prototype[st]=function(){return this}),Vr}();it._=cr,(n=function(){return cr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},"./node_modules/os-browserify/browser.js":(e,t)=>{t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},"./node_modules/parsimmon/build/parsimmon.umd.min.js":function(e){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this._=e}var o=n.prototype;function i(e,t){for(var r=0;r<e;r++)t(r)}function s(e,t,r){return function(e,t){i(t.length,(function(r){e(t[r],r,t)}))}((function(r,n,o){t=e(t,r,n,o)}),r),t}function a(e,t){return s((function(t,r,n,o){return t.concat([e(r,n,o)])}),[],t)}function c(e,t){var r={v:0,buf:t};return i(e,(function(){var e;r={v:r.v<<1|(e=r.buf,e[0]>>7),buf:function(e){var t=s((function(e,t,r,n){return e.concat(r===n.length-1?Buffer.from([t,0]).readUInt16BE(0):n.readUInt16BE(r))}),[],e);return Buffer.from(a((function(e){return(e<<1&65535)>>8}),t))}(r.buf)}})),r}function u(){return"undefined"!=typeof Buffer}function d(){if(!u())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function l(e){d();var t=s((function(e,t){return e+t}),0,e);if(t%8!=0)throw new Error("The bits ["+e.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var r,o=t/8,i=(r=function(e){return e>48},s((function(e,t){return e||(r(t)?t:e)}),null,e));if(i)throw new Error(i+" bit range requested exceeds 48 bit (6 byte) Number max.");return new n((function(t,r){var n=o+r;return n>t.length?C(r,o.toString()+" bytes"):S(n,s((function(e,t){var r=c(t,e.buf);return{coll:e.coll.concat(r.v),buf:r.buf}}),{coll:[],buf:t.slice(r,n)},e).coll)}))}function h(e,t){return new n((function(r,n){return d(),n+t>r.length?C(n,t+" bytes for "+e):S(n+t,r.slice(n,n+t))}))}function m(e,t){if("number"!=typeof(r=t)||Math.floor(r)!==r||t<0||t>6)throw new Error(e+" requires integer length in range [0, 6].");var r}function p(e){return m("uintBE",e),h("uintBE("+e+")",e).map((function(t){return t.readUIntBE(0,e)}))}function g(e){return m("uintLE",e),h("uintLE("+e+")",e).map((function(t){return t.readUIntLE(0,e)}))}function f(e){return m("intBE",e),h("intBE("+e+")",e).map((function(t){return t.readIntBE(0,e)}))}function v(e){return m("intLE",e),h("intLE("+e+")",e).map((function(t){return t.readIntLE(0,e)}))}function y(e){return e instanceof n}function w(e){return"[object Array]"==={}.toString.call(e)}function x(e){return u()&&Buffer.isBuffer(e)}function S(e,t){return{status:!0,index:e,value:t,furthest:-1,expected:[]}}function C(e,t){return w(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:e,expected:t}}function M(e,t){if(!t)return e;if(e.furthest>t.furthest)return e;var r=e.furthest===t.furthest?function(e,t){if(function(){if(void 0!==n._supportsSet)return n._supportsSet;var e="undefined"!=typeof Set;return n._supportsSet=e,e}()&&Array.from){for(var r=new Set(e),o=0;o<t.length;o++)r.add(t[o]);var i=Array.from(r);return i.sort(),i}for(var s={},a=0;a<e.length;a++)s[e[a]]=!0;for(var c=0;c<t.length;c++)s[t[c]]=!0;var u=[];for(var d in s)({}).hasOwnProperty.call(s,d)&&u.push(d);return u.sort(),u}(e.expected,t.expected):t.expected;return{status:e.status,index:e.index,value:e.value,furthest:t.furthest,expected:r}}var b={};function k(e,t){if(x(e))return{offset:t,line:-1,column:-1};e in b||(b[e]={});for(var r=b[e],n=0,o=0,i=0,s=t;s>=0;){if(s in r){n=r[s].line,0===i&&(i=r[s].lineStart);break}"\n"===e.charAt(s)&&(o++,0===i&&(i=s+1)),s--}var a=n+o,c=t-i;return r[t]={line:a,lineStart:i},{offset:t,line:a+1,column:c+1}}function R(e){if(!y(e))throw new Error("not a parser: "+e)}function P(e,t){return"string"==typeof e?e.charAt(t):e[t]}function _(e){if("number"!=typeof e)throw new Error("not a number: "+e)}function E(e){if("function"!=typeof e)throw new Error("not a function: "+e)}function A(e){if("string"!=typeof e)throw new Error("not a string: "+e)}function T(e,t){return new Array(t+1).join(e)}function L(e,t,r){var n=t-e.length;return n<=0?e:T(r,n)+e}function $(e,t,r,n){return{from:e-t>0?e-t:0,to:e+r>n?n:e+r}}function B(e,t){var r,n,o,i,c,u=t.index,d=u.offset,l=1;if(d===e.length)return"Got the end of the input";if(x(e)){var h=d-d%8,m=d-h,p=$(h,40,40,e.length),g=a((function(e){return a((function(e){return L(e.toString(16),2,"0")}),e)}),function(e,t){var r=e.length,n=[],o=0;if(r<=8)return[e.slice()];for(var i=0;i<r;i++)n[o]||n.push([]),n[o].push(e[i]),(i+1)%8==0&&o++;return n}(e.slice(p.from,p.to).toJSON().data));i=function(e){return 0===e.from&&1===e.to?{from:e.from,to:e.to}:{from:e.from/8,to:Math.floor(e.to/8)}}(p),n=h/8,r=3*m,m>=4&&(r+=1),l=2,o=a((function(e){return e.length<=4?e.join(" "):e.slice(0,4).join(" ")+" "+e.slice(4).join(" ")}),g),(c=(8*(i.to>0?i.to-1:i.to)).toString(16).length)<2&&(c=2)}else{var f=e.split(/\r\n|[\n\r\u2028\u2029]/);r=u.column-1,n=u.line-1,i=$(n,2,3,f.length),o=f.slice(i.from,i.to),c=i.to.toString().length}var v=n-i.from;return x(e)&&(c=(8*(i.to>0?i.to-1:i.to)).toString(16).length)<2&&(c=2),s((function(t,n,o){var s,a=o===v,u=a?"> ":" ";return s=x(e)?L((8*(i.from+o)).toString(16),c,"0"):L((i.from+o+1).toString(),c," "),[].concat(t,[u+s+" | "+n],a?[" "+T(" ",c)+" | "+L("",r," ")+T("^",l)]:[])}),[],o).join("\n")}function I(e,t){return["\n","-- PARSING FAILED "+T("-",50),"\n\n",B(e,t),"\n\n",(r=t.expected,1===r.length?"Expected:\n\n"+r[0]:"Expected one of the following: \n\n"+r.join(", ")),"\n"].join("");var r}function N(e){return void 0!==e.flags?e.flags:[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.unicode?"u":"",e.sticky?"y":""].join("")}function O(){for(var e=[].slice.call(arguments),t=e.length,r=0;r<t;r+=1)R(e[r]);return n((function(r,n){for(var o,i=new Array(t),s=0;s<t;s+=1){if(!(o=M(e[s]._(r,n),o)).status)return o;i[s]=o.value,n=o.index}return M(S(n,i),o)}))}function V(){var e=[].slice.call(arguments);if(0===e.length)throw new Error("seqMap needs at least one argument");var t=e.pop();return E(t),O.apply(null,e).map((function(e){return t.apply(null,e)}))}function D(){var e=[].slice.call(arguments),t=e.length;if(0===t)return H("zero alternates");for(var r=0;r<t;r+=1)R(e[r]);return n((function(t,r){for(var n,o=0;o<e.length;o+=1)if((n=M(e[o]._(t,r),n)).status)return n;return n}))}function F(e,t){return j(e,t).or(K([]))}function j(e,t){return R(e),R(t),V(e,t.then(e).many(),(function(e,t){return[e].concat(t)}))}function W(e){A(e);var t="'"+e+"'";return n((function(r,n){var o=n+e.length,i=r.slice(n,o);return i===e?S(o,i):C(n,t)}))}function U(e,t){!function(e){if(!(e instanceof RegExp))throw new Error("not a regexp: "+e);for(var t=N(e),r=0;r<t.length;r++){var n=t.charAt(r);if("i"!==n&&"m"!==n&&"u"!==n&&"s"!==n)throw new Error('unsupported regexp flag "'+n+'": '+e)}}(e),arguments.length>=2?_(t):t=0;var r=function(e){return RegExp("^(?:"+e.source+")",N(e))}(e),o=""+e;return n((function(e,n){var i=r.exec(e.slice(n));if(i){if(0<=t&&t<=i.length){var s=i[0],a=i[t];return S(n+s.length,a)}return C(n,"valid match group (0 to "+i.length+") in "+o)}return C(n,o)}))}function K(e){return n((function(t,r){return S(r,e)}))}function H(e){return n((function(t,r){return C(r,e)}))}function q(e){if(y(e))return n((function(t,r){var n=e._(t,r);return n.index=r,n.value="",n}));if("string"==typeof e)return q(W(e));if(e instanceof RegExp)return q(U(e));throw new Error("not a string, regexp, or parser: "+e)}function J(e){return R(e),n((function(t,r){var n=e._(t,r),o=t.slice(r,n.index);return n.status?C(r,'not "'+o+'"'):S(r,null)}))}function z(e){return E(e),n((function(t,r){var n=P(t,r);return r<t.length&&e(n)?S(r+1,n):C(r,"a character/byte matching "+e)}))}function G(e,t){arguments.length<2&&(t=e,e=void 0);var r=n((function(e,n){return r._=t()._,r._(e,n)}));return e?r.desc(e):r}function Q(){return H("fantasy-land/empty")}o.parse=function(e){if("string"!=typeof e&&!x(e))throw new Error(".parse must be called with a string or Buffer as its argument");var t,r=this.skip(ee)._(e,0);return t=r.status?{status:!0,value:r.value}:{status:!1,index:k(e,r.furthest),expected:r.expected},delete b[e],t},o.tryParse=function(e){var t=this.parse(e);if(t.status)return t.value;var r=I(e,t),n=new Error(r);throw n.type="ParsimmonError",n.result=t,n},o.assert=function(e,t){return this.chain((function(r){return e(r)?K(r):H(t)}))},o.or=function(e){return D(this,e)},o.trim=function(e){return this.wrap(e,e)},o.wrap=function(e,t){return V(e,this,t,(function(e,t){return t}))},o.thru=function(e){return e(this)},o.then=function(e){return R(e),O(this,e).map((function(e){return e[1]}))},o.many=function(){var e=this;return n((function(t,r){for(var n=[],o=void 0;;){if(!(o=M(e._(t,r),o)).status)return M(S(r,n),o);if(r===o.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");r=o.index,n.push(o.value)}}))},o.tieWith=function(e){return A(e),this.map((function(t){if(function(e){if(!w(e))throw new Error("not an array: "+e)}(t),t.length){A(t[0]);for(var r=t[0],n=1;n<t.length;n++)A(t[n]),r+=e+t[n];return r}return""}))},o.tie=function(){return this.tieWith("")},o.times=function(e,t){var r=this;return arguments.length<2&&(t=e),_(e),_(t),n((function(n,o){for(var i=[],s=void 0,a=void 0,c=0;c<e;c+=1){if(a=M(s=r._(n,o),a),!s.status)return a;o=s.index,i.push(s.value)}for(;c<t&&(a=M(s=r._(n,o),a),s.status);c+=1)o=s.index,i.push(s.value);return M(S(o,i),a)}))},o.result=function(e){return this.map((function(){return e}))},o.atMost=function(e){return this.times(0,e)},o.atLeast=function(e){return V(this.times(e),this.many(),(function(e,t){return e.concat(t)}))},o.map=function(e){E(e);var t=this;return n((function(r,n){var o=t._(r,n);return o.status?M(S(o.index,e(o.value)),o):o}))},o.contramap=function(e){E(e);var t=this;return n((function(r,n){var o=t.parse(e(r.slice(n)));return o.status?S(n+r.length,o.value):o}))},o.promap=function(e,t){return E(e),E(t),this.contramap(e).map(t)},o.skip=function(e){return O(this,e).map((function(e){return e[0]}))},o.mark=function(){return V(Y,this,Y,(function(e,t,r){return{start:e,value:t,end:r}}))},o.node=function(e){return V(Y,this,Y,(function(t,r,n){return{name:e,value:r,start:t,end:n}}))},o.sepBy=function(e){return F(this,e)},o.sepBy1=function(e){return j(this,e)},o.lookahead=function(e){return this.skip(q(e))},o.notFollowedBy=function(e){return this.skip(J(e))},o.desc=function(e){w(e)||(e=[e]);var t=this;return n((function(r,n){var o=t._(r,n);return o.status||(o.expected=e),o}))},o.fallback=function(e){return this.or(K(e))},o.ap=function(e){return V(e,this,(function(e,t){return e(t)}))},o.chain=function(e){var t=this;return n((function(r,n){var o=t._(r,n);return o.status?M(e(o.value)._(r,o.index),o):o}))},o.concat=o.or,o.empty=Q,o.of=K,o["fantasy-land/ap"]=o.ap,o["fantasy-land/chain"]=o.chain,o["fantasy-land/concat"]=o.concat,o["fantasy-land/empty"]=o.empty,o["fantasy-land/of"]=o.of,o["fantasy-land/map"]=o.map;var Y=n((function(e,t){return S(t,k(e,t))})),Z=n((function(e,t){return t>=e.length?C(t,"any character/byte"):S(t+1,P(e,t))})),X=n((function(e,t){return S(e.length,e.slice(t))})),ee=n((function(e,t){return t<e.length?C(t,"EOF"):S(t,null)})),te=U(/[0-9]/).desc("a digit"),re=U(/[0-9]*/).desc("optional digits"),ne=U(/[a-z]/i).desc("a letter"),oe=U(/[a-z]*/i).desc("optional letters"),ie=U(/\s*/).desc("optional whitespace"),se=U(/\s+/).desc("whitespace"),ae=W("\r"),ce=W("\n"),ue=W("\r\n"),de=D(ue,ce,ae).desc("newline"),le=D(de,ee);n.all=X,n.alt=D,n.any=Z,n.cr=ae,n.createLanguage=function(e){var t={};for(var r in e)({}).hasOwnProperty.call(e,r)&&function(r){t[r]=G((function(){return e[r](t)}))}(r);return t},n.crlf=ue,n.custom=function(e){return n(e(S,C))},n.digit=te,n.digits=re,n.empty=Q,n.end=le,n.eof=ee,n.fail=H,n.formatError=I,n.index=Y,n.isParser=y,n.lazy=G,n.letter=ne,n.letters=oe,n.lf=ce,n.lookahead=q,n.makeFailure=C,n.makeSuccess=S,n.newline=de,n.noneOf=function(e){return z((function(t){return e.indexOf(t)<0})).desc("none of '"+e+"'")},n.notFollowedBy=J,n.of=K,n.oneOf=function(e){for(var t=e.split(""),r=0;r<t.length;r++)t[r]="'"+t[r]+"'";return z((function(t){return e.indexOf(t)>=0})).desc(t)},n.optWhitespace=ie,n.Parser=n,n.range=function(e,t){return z((function(r){return e<=r&&r<=t})).desc(e+"-"+t)},n.regex=U,n.regexp=U,n.sepBy=F,n.sepBy1=j,n.seq=O,n.seqMap=V,n.seqObj=function(){for(var e,t={},r=0,o=(e=arguments,Array.prototype.slice.call(e)),i=o.length,s=0;s<i;s+=1){var a=o[s];if(!y(a)){if(w(a)&&2===a.length&&"string"==typeof a[0]&&y(a[1])){var c=a[0];if(Object.prototype.hasOwnProperty.call(t,c))throw new Error("seqObj: duplicate key "+c);t[c]=!0,r++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===r)throw new Error("seqObj expects at least one named parser, found zero");return n((function(e,t){for(var r,n={},s=0;s<i;s+=1){var a,c;if(w(o[s])?(a=o[s][0],c=o[s][1]):(a=null,c=o[s]),!(r=M(c._(e,t),r)).status)return r;a&&(n[a]=r.value),t=r.index}return M(S(t,n),r)}))},n.string=W,n.succeed=K,n.takeWhile=function(e){return E(e),n((function(t,r){for(var n=r;n<t.length&&e(P(t,n));)n++;return S(n,t.slice(r,n))}))},n.test=z,n.whitespace=se,n["fantasy-land/empty"]=Q,n["fantasy-land/of"]=K,n.Binary={bitSeq:l,bitSeqObj:function(e){d();var t={},r=0,n=a((function(e){if(w(e)){var n=e;if(2!==n.length)throw new Error("["+n.join(", ")+"] should be length 2, got length "+n.length);if(A(n[0]),_(n[1]),Object.prototype.hasOwnProperty.call(t,n[0]))throw new Error("duplicate key in bitSeqObj: "+n[0]);return t[n[0]]=!0,r++,n}return _(e),[null,e]}),e);if(r<1)throw new Error("bitSeqObj expects at least one named pair, got ["+e.join(", ")+"]");var o=a((function(e){return e[0]}),n);return l(a((function(e){return e[1]}),n)).map((function(e){return s((function(e,t){return null!==t[0]&&(e[t[0]]=t[1]),e}),{},a((function(t,r){return[t,e[r]]}),o))}))},byte:function(e){if(d(),_(e),e>255)throw new Error("Value specified to byte constructor ("+e+"=0x"+e.toString(16)+") is larger in value than a single byte.");var t=(e>15?"0x":"0x0")+e.toString(16);return n((function(r,n){var o=P(r,n);return o===e?S(n+1,o):C(n,t)}))},buffer:function(e){return h("buffer",e).map((function(e){return Buffer.from(e)}))},encodedString:function(e,t){return h("string",t).map((function(t){return t.toString(e)}))},uintBE:p,uint8BE:p(1),uint16BE:p(2),uint32BE:p(4),uintLE:g,uint8LE:g(1),uint16LE:g(2),uint32LE:g(4),intBE:f,int8BE:f(1),int16BE:f(2),int32BE:f(4),intLE:v,int8LE:v(1),int16LE:v(2),int32LE:v(4),floatBE:h("floatBE",4).map((function(e){return e.readFloatBE(0)})),floatLE:h("floatLE",4).map((function(e){return e.readFloatLE(0)})),doubleBE:h("doubleBE",8).map((function(e){return e.readDoubleBE(0)})),doubleLE:h("doubleLE",8).map((function(e){return e.readDoubleLE(0)}))},e.exports=n}])},"./node_modules/path-browserify/index.js":(e,t,r)=>{"use strict";var n=r("./node_modules/process/browser.js");function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var r,n="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",o=0):o=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var s={resolve:function(){for(var e,t="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=n.cwd()),a=e),o(a),0!==a.length&&(t=a+"/"+t,r=47===a.charCodeAt(0))}return t=i(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];o(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var c=t.length-a,u=i<c?i:c,d=-1,l=0;l<=u;++l){if(l===u){if(c>u){if(47===t.charCodeAt(a+l))return t.slice(a+l+1);if(0===l)return t.slice(a+l)}else i>u&&(47===e.charCodeAt(r+l)?d=l:0===l&&(d=0));break}var h=e.charCodeAt(r+l);if(h!==t.charCodeAt(a+l))break;47===h&&(d=l)}var m="";for(l=r+d+1;l<=n;++l)l!==n&&47!==e.charCodeAt(l)||(0===m.length?m+="..":m+="/..");return m.length>0?m+t.slice(a+d):(a+=d,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!i){n=s;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var r,n=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){n=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===t.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return n===i?i=c:-1===i&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){n=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(n,i)},extname:function(e){o(e);for(var t=-1,r=0,n=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===n&&(i=!1,n=a+1),46===c?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),i=47===n;i?(t.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,d=e.length-1,l=0;d>=r;--d)if(47!==(n=e.charCodeAt(d)))-1===c&&(u=!1,c=d+1),46===n?-1===s?s=d:1!==l&&(l=1):-1!==s&&(l=-1);else if(!u){a=d+1;break}return-1===s||-1===c||0===l||1===l&&s===c-1&&s===a+1?-1!==c&&(t.base=t.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(t.name=e.slice(1,s),t.base=e.slice(1,c)):(t.name=e.slice(a,s),t.base=e.slice(a,c)),t.ext=e.slice(s,c)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s},"./node_modules/process/browser.js":e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,c=[],u=!1,d=-1;function l(){u&&a&&(u=!1,a.length?c=a.concat(c):d=-1,c.length&&h())}function h(){if(!u){var e=s(l);u=!0;for(var t=c.length;t;){for(a=c,c=[];++d<t;)a&&a[d].run();d=-1,t=c.length}a=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),1!==c.length||u||s(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},"./node_modules/queue/index.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/events/events.js").EventEmitter;function i(e){if(!(this instanceof i))return new i(e);o.call(this),e=e||{},this.concurrency=e.concurrency||1/0,this.timeout=e.timeout||0,this.autostart=e.autostart||!1,this.results=e.results||null,this.pending=0,this.session=0,this.running=!1,this.jobs=[],this.timers={}}function s(){for(var e in this.timers){var t=this.timers[e];delete this.timers[e],clearTimeout(t)}}function a(e){var t=this;function r(e){t.end(e)}this.on("error",r),this.on("end",(function n(o){t.removeListener("error",r),t.removeListener("end",n),e(o,this.results)}))}function c(e){this.session++,this.running=!1,this.emit("end",e)}e.exports=i,e.exports.default=i,n(i,o),["pop","shift","indexOf","lastIndexOf"].forEach((function(e){i.prototype[e]=function(){return Array.prototype[e].apply(this.jobs,arguments)}})),i.prototype.slice=function(e,t){return this.jobs=this.jobs.slice(e,t),this},i.prototype.reverse=function(){return this.jobs.reverse(),this},["push","unshift","splice"].forEach((function(e){i.prototype[e]=function(){var t=Array.prototype[e].apply(this.jobs,arguments);return this.autostart&&this.start(),t}})),Object.defineProperty(i.prototype,"length",{get:function(){return this.pending+this.jobs.length}}),i.prototype.start=function(e){if(e&&a.call(this,e),this.running=!0,!(this.pending>=this.concurrency))if(0!==this.jobs.length){var t=this,r=this.jobs.shift(),n=!0,o=this.session,i=null,s=!1,u=null,d=r.hasOwnProperty("timeout")?r.timeout:this.timeout;d&&(i=setTimeout((function(){s=!0,t.listeners("timeout").length>0?t.emit("timeout",h,r):h()}),d),this.timers[i]=i),this.results&&(u=this.results.length,this.results[u]=null),this.pending++,t.emit("start",r);var l=r(h);l&&l.then&&"function"==typeof l.then&&l.then((function(e){return h(null,e)})).catch((function(e){return h(e||!0)})),this.running&&this.jobs.length>0&&this.start()}else 0===this.pending&&c.call(this);function h(e,a){n&&t.session===o&&(n=!1,t.pending--,null!==i&&(delete t.timers[i],clearTimeout(i)),e?t.emit("error",e,r):!1===s&&(null!==u&&(t.results[u]=Array.prototype.slice.call(arguments,1)),t.emit("success",a,r)),t.session===o&&(0===t.pending&&0===t.jobs.length?c.call(t):t.running&&t.start()))}},i.prototype.stop=function(){this.running=!1},i.prototype.end=function(e){s.call(this),this.jobs.length=0,this.pending=0,c.call(this,e)}},"./node_modules/setimmediate/setImmediate.js":function(e,t,r){var n=r("./node_modules/process/browser.js");!function(e,t){"use strict";if(!e.setImmediate){var r,o,i,s,a,c=1,u={},d=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){n.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,r=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(p,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},h.clearImmediate=m}function m(e){delete u[e]}function p(e){if(d)setTimeout(p,0,e);else{var t=u[e];if(t){d=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{m(e),d=!1}}}}}("undefined"==typeof self?void 0===r.g?this:r.g:self)},"./extensionBase.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerEventListener=t.registerCommand=t.activate=t.getAndUpdateModeHandler=void 0;const n=r("vscode"),o=r("./src/state/compositionState.ts"),i=r("./src/globals.ts"),s=r("./src/jumps/jump.ts"),a=r("./src/mode/modeHandlerMap.ts"),c=r("./src/mode/mode.ts"),u=r("./src/configuration/notation.ts"),d=r("./src/util/logger.ts"),l=r("./src/statusBar.ts"),h=r("./src/util/vscodeContext.ts"),m=r("./src/cmd_line/commandLine.ts"),p=r("./src/configuration/configuration.ts"),g=r("./src/state/globalState.ts"),f=r("./src/taskQueue.ts"),v=r("./src/register/register.ts"),y=r("./src/util/specialKeys.ts"),w=r("./src/history/historyTracker.ts");let x,S,C=null;async function M(e=!1){const t=n.window.activeTextEditor;if(void 0===t||t.document.isClosed)return;const r=t.document.uri,[o,i]=await a.ModeHandlerMap.getOrCreate(r);return i&&x.subscriptions.push(o),o.vimState.editor=t,!e&&S&&S===r||(o.syncCursors(),await o.updateView({drawSelection:!1,revealRange:!1})),S=r,o.focusChanged&&(o.focusChanged=!1,S)&&(a.ModeHandlerMap.get(S).focusChanged=!0),o}async function b(){const e=await p.configuration.load();d.Logger.configChanged(p.configuration);const t=d.Logger.get("Configuration");if(t.debug(`${e.numErrors} errors found with vim configuration`),e.numErrors>0)for(const r of e.get())switch(r.level){case"error":t.error(r.message);break;case"warning":t.warn(r.message)}}async function k(e,t){await h.VSCodeContext.set("vim.active",!e);const r=await M();r&&(e?(await r.handleKeyEvent(y.SpecialKeys.ExtensionDisable),t.reset(),a.ModeHandlerMap.clear()):await r.handleKeyEvent(y.SpecialKeys.ExtensionEnable))}function R(e,t,r){const o=n.commands.registerCommand(t,(async e=>p.configuration.disableExtension?n.commands.executeCommand("default:"+t,e):n.window.activeTextEditor?n.window.activeTextEditor.document&&"debug:input"===n.window.activeTextEditor.document.uri.toString()?n.commands.executeCommand("default:"+t,e):r(e):void 0));e.subscriptions.push(o)}function P(e,t,r,o=!0){const i=n.commands.registerCommand(t,(async e=>{o&&!n.window.activeTextEditor||r(e)}));e.subscriptions.push(i)}function _(e,t,r,n=!0,o=!1){const s=t((async e=>{n&&p.configuration.disableExtension||o&&i.Globals.isTesting||r(e)}));e.subscriptions.push(s)}async function E(e){return!!e.remapState.isCurrentlyPerformingRecursiveRemapping&&(e.remapState.forceStopRecursiveRemapping=!0,!0)}t.getAndUpdateModeHandler=M,t.activate=async function(e,t=!0){await b();const r=d.Logger.get("Extension Startup");if(r.debug("Start"),x=e,x.subscriptions.push(l.StatusBar),v.Register.loadFromDisk(t),await Promise.all([m.ExCommandLine.loadHistory(e),m.SearchCommandLine.loadHistory(e)]),n.window.activeTextEditor){const e=n.window.activeTextEditor.document.fileName.split(/\\|\//);v.Register.setReadonlyRegister("%",e[e.length-1])}_(e,n.workspace.onDidChangeConfiguration,(async()=>{await b()}),!1),_(e,n.workspace.onDidChangeTextDocument,(async e=>{var r;1===(r=e).contentChanges.length&&""===r.contentChanges[0].text&&r.contentChanges[0].range.start.line!==r.contentChanges[0].range.end.line?g.globalState.jumpTracker.handleTextDeleted(e.document,e.contentChanges[0].range):(e=>1===e.contentChanges.length&&("\n"===e.contentChanges[0].text||"\r\n"===e.contentChanges[0].text)&&e.contentChanges[0].range.start.line===e.contentChanges[0].range.end.line)(e)&&g.globalState.jumpTracker.handleTextAdded(e.document,e.contentChanges[0].range,e.contentChanges[0].text),a.ModeHandlerMap.getAll().filter((t=>t.vimState.documentUri===e.document.uri)).forEach((t=>{(t=>{t.vimState.currentMode===c.Mode.Insert&&(void 0===t.vimState.historyTracker.currentContentChanges&&(t.vimState.historyTracker.currentContentChanges=[]),t.vimState.historyTracker.currentContentChanges=t.vimState.historyTracker.currentContentChanges.concat(e.contentChanges))})(t)})),t&&setTimeout((()=>{var t;e.document.isDirty||e.document.isUntitled||"vscode-notebook-cell"===e.document.uri.scheme||!e.contentChanges.length||(t=e.document,a.ModeHandlerMap.getAll().filter((e=>e.vimState.documentUri===t.uri)).forEach((e=>{e.vimState.historyTracker=new w.HistoryTracker(e.vimState)})))}),0)})),_(e,n.workspace.onDidCloseTextDocument,(async e=>{const t=n.workspace.textDocuments;for(const r of a.ModeHandlerMap.keys()){const n=a.ModeHandlerMap.get(r);let o=!1;if(null==n||void 0===n.vimState.editor)o=!0;else{const r=n.vimState.document;t.includes(r)||(o=!0,e===r&&(C=n))}o&&a.ModeHandlerMap.delete(r)}}),!1),_(e,n.window.onDidChangeActiveTextEditor,(async()=>{var e;const t=S?a.ModeHandlerMap.get(S):void 0;if(C=t||C,void 0===n.window.activeTextEditor)return void v.Register.setReadonlyRegister("%","");const r=null===(e=await v.Register.get("%"))||void 0===e?void 0:e.text,o=n.workspace.asRelativePath(n.window.activeTextEditor.document.uri,!1);o!==r&&(r&&""!==r&&v.Register.setReadonlyRegister("#",r),v.Register.setReadonlyRegister("%",o)),f.taskQueue.enqueueTask((async()=>{const e=await M(!0);e&&g.globalState.jumpTracker.handleFileJump(C?s.Jump.fromStateNow(C.vimState):null,s.Jump.fromStateNow(e.vimState))}))}),!0,!0),_(e,n.window.onDidChangeTextEditorSelection,(async e=>{if(void 0===n.window.activeTextEditor||e.textEditor.document!==n.window.activeTextEditor.document)return;const t=a.ModeHandlerMap.get(n.window.activeTextEditor.document.uri);if(void 0!==t){if(e.kind!==n.TextEditorSelectionChangeKind.Mouse){const n=e.selections.reduce(((e,t)=>e+`[${t.anchor.line}, ${t.anchor.character}; ${t.active.line}, ${t.active.character}]`),""),o=t.vimState.selectionsChanged.ourSelections.indexOf(n);if(o>-1)return t.vimState.selectionsChanged.ourSelections.splice(o,1),void r.debug(`Selections: Ignoring selection: ${n}, Count left: ${t.vimState.selectionsChanged.ourSelections.length}`);if(t.vimState.selectionsChanged.ignoreIntermediateSelections)return void r.debug(`Selections: ignoring intermediate selection change: ${n}`);if(t.vimState.selectionsChanged.ourSelections.length>0)return void r.debug(`Selections: Ignoring slipped selection: ${n}`)}e.textEditor===t.vimState.editor&&(t.focusChanged?t.focusChanged=!1:t.currentMode!==c.Mode.EasyMotionMode&&f.taskQueue.enqueueTask((()=>t.handleSelectionChange(e))))}}),!0,!1),_(e,n.window.onDidChangeTextEditorVisibleRanges,(async e=>{f.taskQueue.enqueueTask((async()=>{const e=await M();e&&l.StatusBar.lastMessageTime&&Number(new Date)-Number(l.StatusBar.lastMessageTime)>100&&l.StatusBar.clear(e.vimState,!0)}))}));const i=new o.CompositionState;R(e,"type",(async e=>{f.taskQueue.enqueueTask((async()=>{const t=await M();t&&(i.isInComposition?(i.composingText+=e.text,t.vimState.currentMode===c.Mode.Insert&&(i.insertedText=!0,n.commands.executeCommand("default:type",{text:e.text}))):await t.handleKeyEvent(e.text))}))})),R(e,"replacePreviousChar",(async e=>{f.taskQueue.enqueueTask((async()=>{const t=await M();t?(i.isInComposition&&(i.composingText=i.composingText.substr(0,i.composingText.length-e.replaceCharCnt)+e.text),i.insertedText&&(await n.commands.executeCommand("default:replacePreviousChar",{text:e.text,replaceCharCnt:e.replaceCharCnt}),t.vimState.cursorStopPosition=t.vimState.editor.selection.start,t.vimState.cursorStartPosition=t.vimState.editor.selection.start)):await n.commands.executeCommand("default:replacePreviousChar",{text:e.text,replaceCharCnt:e.replaceCharCnt})}))})),R(e,"compositionStart",(async()=>{f.taskQueue.enqueueTask((async()=>{i.isInComposition=!0}))})),R(e,"compositionEnd",(async()=>{f.taskQueue.enqueueTask((async()=>{const e=await M();if(e){i.insertedText&&(e.vimState.selectionsChanged.ignoreIntermediateSelections=!0,await n.commands.executeCommand("default:replacePreviousChar",{text:"",replaceCharCnt:i.composingText.length}),e.vimState.cursorStopPosition=e.vimState.editor.selection.active,e.vimState.cursorStartPosition=e.vimState.editor.selection.active,e.vimState.selectionsChanged.ignoreIntermediateSelections=!1);const t=i.composingText;await e.handleMultipleKeyEvents(t.split(""))}i.reset()}))})),P(e,"vim.showQuickpickCmdLine",(async()=>{const e=await M();if(e){const t=await n.window.showInputBox({prompt:"Vim command line",value:"",ignoreFocusOut:!1,valueSelection:[0,0]});t&&await new m.ExCommandLine(t,e.vimState.currentMode).run(e.vimState),e.updateView()}})),P(e,"vim.remap",(async e=>{f.taskQueue.enqueueTask((async()=>{const t=await M();if(void 0!==t){if(!e)throw new Error("'args' is undefined. For this remap to work it needs to have 'args' with an '\"after\": string[]' and/or a '\"commands\": { command: string; args: any[] }[]'");if(e.after)for(const r of e.after)await t.handleKeyEvent(u.Notation.NormalizeKey(r,p.configuration.leader));if(e.commands)for(const r of e.commands)r.command.startsWith(":")?(await new m.ExCommandLine(r.command.slice(1,r.command.length),t.vimState.currentMode).run(t.vimState),t.updateView()):n.commands.executeCommand(r.command,r.args)}}))})),P(e,"toggleVim",(async()=>{p.configuration.disableExtension=!p.configuration.disableExtension,k(p.configuration.disableExtension,i)}));for(const t of p.configuration.boundKeyCombinations){const r=["<Esc>","<C-c>"].includes(t.key)?async()=>{const e=await M();e&&!await E(e)&&await e.handleKeyEvent(`${t.key}`)}:async()=>{const e=await M();e&&await e.handleKeyEvent(`${t.key}`)};P(e,t.command,(async()=>{f.taskQueue.enqueueTask(r)}))}{const e=await M();if(e){if(!p.configuration.startInInsertMode){const t=e.vimState;t.cursors=t.cursors.map((e=>{const r=t.document.lineAt(e.stop).text.length;if(e.stop.character>=r){const t=Math.max(r-1,0);return e.withNewStop(e.stop.with({character:t}))}return e}))}e.updateView({drawSelection:!0,revealRange:!1})}}await h.VSCodeContext.set("listAutomaticKeyboardNavigation",!1),await k(p.configuration.disableExtension,i),r.debug("Finish.")},t.registerCommand=P,t.registerEventListener=_},"./src/actions/base.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterAction=t.getRelevantAction=t.KeypressState=t.BaseCommand=t.BaseAction=void 0;const n=r("./src/common/motion/cursor.ts"),o=r("./src/configuration/notation.ts"),i=r("./src/transformations/transformations.ts"),s=r("./src/configuration/configuration.ts"),a=r("./src/mode/mode.ts");class c{constructor(){this.isMotion=!1,this.isOperator=!1,this.isCommand=!1,this.isNumber=!1,this.isJump=!1,this.createsUndoPoint=!1,this.preservesDesiredColumn=!1,this.keysPressed=[]}doesActionApply(e,t){return!!(e.currentModeIncludingPseudoModes!==a.Mode.OperatorPendingMode||this.isMotion||this.isOperator||this.isNumber)&&this.modes.includes(e.currentMode)&&c.CompareKeypressSequence(this.keys,t)}couldActionApply(e,t){if(e.currentModeIncludingPseudoModes===a.Mode.OperatorPendingMode&&!this.isMotion&&!this.isOperator&&!this.isNumber)return!1;if(!this.modes.includes(e.currentMode))return!1;const r=(c.is2DArray(this.keys)?this.keys:[this.keys]).map((e=>e.slice(0,t.length)));return!!c.CompareKeypressSequence(r,t)}static CompareKeypressSequence(e,t){if(c.is2DArray(e)){for(const r of e)if(c.CompareKeypressSequence(r,t))return!0;return!1}if(e.length!==t.length)return!1;for(let r=0,n=0;r<e.length;r++,n++){const i=e[r],a=t[n];if((i!==a||a===s.configuration.leader)&&"<any>"!==i&&("<leader>"!==i||a!==s.configuration.leader)&&("<number>"!==i||!this.isSingleNumber.test(a))&&("<alpha>"!==i||!this.isSingleAlpha.test(a))&&("<character>"!==i||o.Notation.IsControlKey(a)))return!1}return!0}toString(){return this.keys.join("")}static is2DArray(e){return Array.isArray(e[0])}}var u;t.BaseAction=c,c.isSingleNumber=/^[0-9]$/,c.isSingleAlpha=/^[a-zA-Z]$/,t.BaseCommand=class extends c{constructor(){super(...arguments),this.isCommand=!0,this.isCompleteAction=!0,this.runsOnceForEachCountPrefix=!1}runsOnceForEveryCursor(){return!0}async exec(e,t){throw new Error("Not implemented!")}async execCount(e,t){const r=this.runsOnceForEachCountPrefix&&t.recordedState.count||1;if(!this.runsOnceForEveryCursor()){for(let n=0;n<r;n++)await this.exec(e,t);for(const e of t.recordedState.transformer.transformations)(0,i.isTextTransformation)(e)&&void 0===e.cursorIndex&&(e.cursorIndex=0);return}const o=[],s=t.cursors.map((e=>new n.Cursor(e.start,e.stop))).sort(((e,t)=>e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>t.start.character?1:-1));let a=0;for(const{start:e,stop:c}of s){this.multicursorIndex=a++,t.cursorStopPosition=c,t.cursorStartPosition=e;for(let e=0;e<r;e++)await this.exec(c,t);o.push(new n.Cursor(t.cursorStartPosition,t.cursorStopPosition));for(const e of t.recordedState.transformer.transformations)(0,i.isTextTransformation)(e)&&void 0===e.cursorIndex&&(e.cursorIndex=this.multicursorIndex)}t.cursors=o}},function(e){e[e.WaitingOnKeys=0]="WaitingOnKeys",e[e.NoPossibleMatch=1]="NoPossibleMatch"}(u=t.KeypressState||(t.KeypressState={}));const d=new Map;t.getRelevantAction=function(e,t){var r;const n=null!==(r=d.get(t.currentMode))&&void 0!==r?r:[];let o=!1;for(const r of n){const n=new r;if(n.doesActionApply(t,e))return n.keysPressed=t.recordedState.actionKeys.slice(0),n;o||(o=n.couldActionApply(t,e))}return o?u.WaitingOnKeys:u.NoPossibleMatch},t.RegisterAction=function(e){const t=new e;for(const r of t.modes){let n=d.get(r);n||(n=[],d.set(r,n)),void 0!==t.keys&&n.push(e)}}},"./src/actions/baseMotion.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMovement=t.failedMovement=t.SelectionType=t.isIMovement=void 0;const n=r("./src/actions/base.ts"),o=r("./src/mode/mode.ts"),i=r("./src/util/util.ts"),s=r("vscode");function a(e){return void 0!==e.start&&void 0!==e.stop}var c;function u(e){return{start:e.cursorStartPosition,stop:e.cursorStopPosition,failed:!0}}t.isIMovement=a,function(e){e[e.Concatenating=0]="Concatenating",e[e.Expanding=1]="Expanding"}(c=t.SelectionType||(t.SelectionType={})),t.failedMovement=u;class d extends n.BaseAction{constructor(e,t){super(),this.modes=[o.Mode.Normal,o.Mode.Visual,o.Mode.VisualLine,o.Mode.VisualBlock],this.isMotion=!0,this.isRepeat=!1,this.setsDesiredColumnToEOL=!1,this.minCount=1,this.maxCount=99999,this.selectionType=c.Concatenating,e&&(this.keysPressed=e),t&&(this.isRepeat=t)}async execAction(e,t,r,n){throw new Error("Not implemented!")}async execActionForOperator(e,t,r,n){return this.execAction(e,t,r,n)}async execActionWithCount(e,t,r){let n,o=u(t),d=e;r=(0,i.clamp)(r,this.minCount,this.maxCount);for(let i=0;i<r;i++){const a=0===i,c=i===r-1;if(n=await this.createMovementResult(e,t,a,c),n instanceof s.Position)e=n;else{if(n.failed)return o;a&&(d=n.start),e=this.adjustPosition(e,n,c),o=n}}return this.selectionType===c.Concatenating&&a(n)&&(n.start=d),n}async createMovementResult(e,t,r,n){return t.recordedState.operator&&n?await this.execActionForOperator(e,t,r,n):await this.execAction(e,t,r,n)}adjustPosition(e,t,r){return r||(e=t.stop.getRightThroughLineBreaks()),e}}t.BaseMovement=d},"./src/actions/commands/actions.ts":function(e,t,r){"use strict";var n,o=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionOverrideCmdD=t.CommandUnicodeName=t.ActionDeleteLastChar=t.ActionDeleteCharWithDeleteKey=t.ActionDeleteChar=t.CommandInsertNewLineBefore=t.CommandInsertNewLineAbove=t.CommandInsertAtLineEnd=t.CommandInsertAfterCursor=t.CommandInsertAtLineBegin=t.CommandInsertAtFirstCharacter=t.CommandInsertAtLastChange=t.CommandYankFullLine=t.CommandUndo=t.CommandShowSearchHistory=t.CommandShowCommandHistory=t.CommandReplaceAtCursorFromNormalMode=t.CommandInsertAtCursor=t.CommandQuitRecordMacro=t.CommandRegister=t.CommandNumber=t.DocumentContentChangeAction=void 0;const i=r("vscode"),s=r("./src/state/recordedState.ts"),a=r("./src/state/replaceState.ts"),c=r("./src/util/util.ts"),u=r("./src/util/clipboard.ts"),d=r("./src/cmd_line/commands/file.ts"),l=r("./src/cmd_line/commands/only.ts"),h=r("./src/cmd_line/commands/quit.ts"),m=r("./src/cmd_line/commands/tab.ts"),p=r("./src/common/motion/position.ts"),g=r("./src/common/motion/cursor.ts"),f=r("./src/common/number/numericString.ts"),v=r("./src/configuration/configuration.ts"),y=r("./src/mode/mode.ts"),w=r("./src/register/register.ts"),x=r("./src/textEditor.ts"),S=r("./src/transformations/transformations.ts"),C=r("./src/actions/base.ts"),M=r("./src/cmd_line/commandLine.ts"),b=r("./src/actions/operator.ts"),k=r("./src/statusBar.ts"),R=r("./src/util/statusBarTextUtils.ts"),P=r("./src/state/globalState.ts"),_=r("./src/util/specialKeys.ts"),E=r("./src/textobject/word.ts"),A=r("vscode"),T=r("./src/cmd_line/commands/writequit.ts"),L=r("./src/actions/wrapping.ts"),$=r("./src/error.ts"),B=r("./src/vimscript/pattern.ts"),I=r("./src/platform/browser/fs.ts"),N=r("./src/vimscript/exCommandParser.ts");class O extends C.BaseCommand{constructor(e){super(),this.modes=[],this.keys=[],this.contentChanges=[],this.cursorStart=e,this.cursorEnd=e}addChanges(e,t){this.contentChanges=[...this.contentChanges,...e],this.compressChanges(),this.cursorEnd=t}getTransformation(e){return{type:"contentChange",changes:this.contentChanges,diff:e}}async exec(e,t){if(0===this.contentChanges.length)return;let r=this.cursorStart,n=e;for(const o of this.contentChanges){if(o.range.start.line<r.line){const e=o.range.end.line-o.range.start.line+1,t=o.text.split("\n").length;r=r.with(Math.max(0,r.line+t-e));continue}const s=t=>{const n=t.line-r.line,o=0===n?e.character+t.character-r.character:t.character;return new A.Position(Math.max(e.line+n,0),Math.max(o,0))},a=new i.Range(s(o.range.start),s(o.range.end));if(a.start.isAfter(n))continue;const c=o.text.split("\n"),u=c.length-1,d=0===u?new A.Position(a.start.line,a.start.character+o.text.length):new A.Position(a.start.line+u,c.pop().length);n=(0,p.laterOf)(n,d),a.start.isEqual(a.end)?t.recordedState.transformer.insert(a.start,o.text,p.PositionDiff.exactPosition(s(this.cursorEnd))):t.recordedState.transformer.replace(a,o.text,p.PositionDiff.exactPosition(s(this.cursorEnd)))}}compressChanges(){function e(e,t){if(e.rangeOffset+e.text.length===t.rangeOffset)return{text:e.text+t.text,range:e.range,rangeOffset:e.rangeOffset,rangeLength:e.rangeLength};if(e.rangeOffset<=t.rangeOffset&&e.text.length>=t.rangeLength){const r=t.rangeOffset-e.rangeOffset,n=r+t.rangeLength;return{text:e.text.slice(0,r)+t.text+e.text.slice(n),range:e.range,rangeOffset:e.rangeOffset,rangeLength:e.rangeLength}}}const t=[];let r;for(const n of this.contentChanges)if(void 0===r)r=n;else{const o=e(r,n);o?r=o:(t.push(r),r=n)}void 0!==r&&t.push(r),this.contentChanges=t}}t.DocumentContentChangeAction=O;let V=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Insert,y.Mode.Visual,y.Mode.VisualBlock,y.Mode.VisualLine,y.Mode.SearchInProgressMode,y.Mode.CommandlineInProgress,y.Mode.Replace,y.Mode.EasyMotionMode,y.Mode.EasyMotionInputMode,y.Mode.SurroundInputMode],this.keys=[_.SpecialKeys.ExtensionDisable]}async exec(e,t){await t.setCurrentMode(y.Mode.Disabled)}};V=o([C.RegisterAction],V);let D=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Disabled],this.keys=[_.SpecialKeys.ExtensionEnable]}async exec(e,t){await t.setCurrentMode(y.Mode.Normal)}};D=o([C.RegisterAction],D);let F=n=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["<number>"],this.isCompleteAction=!1,this.isNumber=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=parseInt(this.keysPressed[0],10),o=t.recordedState.operatorCount;if(o>0){const e=t.recordedState.actionsRun[t.recordedState.actionsRun.length-2];t.recordedState.count=e instanceof n?10*t.recordedState.count+r*o:o*r}else t.recordedState.count=10*t.recordedState.count+r}doesActionApply(e,t){const r="0"===t[0];return super.doesActionApply(e,t)&&(r&&e.recordedState.count>0||!r)}couldActionApply(e,t){const r="0"===t[0];return super.couldActionApply(e,t)&&(r&&e.recordedState.count>0||!r)}};F=n=o([C.RegisterAction],F),t.CommandNumber=F;let j=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=['"',"<character>"],this.isCompleteAction=!1}async exec(e,t){const r=this.keysPressed[1];w.Register.isValidRegister(r)?t.recordedState.registerName=r:this.isCompleteAction=!0}};j=o([C.RegisterAction],j),t.CommandRegister=j;let W=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["q","<alpha>"],["q","<number>"],["q",'"']]}async exec(e,t){const r=this.keysPressed[1],n=r.toLocaleLowerCase();if(t.macro=new s.RecordedState,t.macro.registerKey=r,t.macro.registerName=n,!w.Register.isValidUppercaseRegister(r)||!w.Register.has(n)){const e=new s.RecordedState;e.registerName=n,t.recordedState.registerName=n,w.Register.put(t,e)}}};W=o([C.RegisterAction],W);let U=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["q"]}async exec(e,t){var r;const n=t.macro,o=null===(r=await w.Register.get(n.registerName))||void 0===r?void 0:r.text;o instanceof s.RecordedState&&(w.Register.isValidUppercaseRegister(n.registerKey)?o.actionsRun=o.actionsRun.concat(n.actionsRun):o.actionsRun=n.actionsRun),t.macro=void 0}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0!==e.macro}couldActionApply(e,t){return super.couldActionApply(e,t)&&void 0!==e.macro}};U=o([C.RegisterAction],U),t.CommandQuitRecordMacro=U;let K=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["@","@"],this.runsOnceForEachCountPrefix=!0,this.createsUndoPoint=!0,this.isJump=!0}async exec(e,t){const{lastInvokedMacro:r}=t;r?t.recordedState.transformer.addTransformation({type:"macro",register:r.registerName,replay:"contentChange"}):k.StatusBar.displayError(t,$.VimError.fromCode($.ErrorCode.NoPreviouslyUsedRegister))}};K=o([C.RegisterAction],K);let H=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["@","<character>"],this.runsOnceForEachCountPrefix=!0,this.createsUndoPoint=!0}async exec(e,t){const r=this.keysPressed[1].toLocaleLowerCase();w.Register.isValidRegister(r)||k.StatusBar.displayError(t,$.VimError.fromCode($.ErrorCode.InvalidRegisterName,`'${r}'`)),w.Register.has(r)&&t.recordedState.transformer.addTransformation({type:"macro",register:r,replay:"contentChange"})}};H=o([C.RegisterAction],H);let q=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock,y.Mode.Normal,y.Mode.SurroundInputMode,y.Mode.EasyMotionMode,y.Mode.EasyMotionInputMode],this.keys=[["<Esc>"],["<C-c>"],["<C-[>"]],this.preservesDesiredColumn=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){t.currentMode===y.Mode.Normal?(t.surround=void 0,t.isMultiCursor?t.cursors=[t.cursors[0]]:await Promise.allSettled([i.commands.executeCommand("closeReferenceSearchEditor"),i.commands.executeCommand("closeMarkersNavigation"),i.commands.executeCommand("closeDirtyDiff")])):(t.currentMode===y.Mode.EasyMotionMode?t.easyMotion.clearDecorations(t.editor):t.currentMode===y.Mode.SurroundInputMode&&(t.surround=void 0),await t.setCurrentMode(y.Mode.Normal))}};q=o([C.RegisterAction],q);class J extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.runsOnceForEachCountPrefix=!1}async exec(e,t){const r=t.recordedState.count||1,n=v.configuration.getConfiguration("editor").get("cursorSurroundingLines",0),o=t.editor.visibleRanges[0];if(void 0===o)return;const i=o.end.line-t.cursorStopPosition.line-r,s=t.cursorStopPosition.line-o.start.line-r;"up"===this.to&&n>i?t.cursorStopPosition=t.cursorStopPosition.getUp(n-i).withColumn(t.desiredColumn):"down"===this.to&&n>s&&(t.cursorStopPosition=t.cursorStopPosition.getDown(n-s).withColumn(t.desiredColumn)),t.postponedCodeViewChanges.push({command:"editorScroll",args:{to:this.to,by:this.by,value:r,revealCursor:!0,select:(0,y.isVisualMode)(t.currentMode)}})}}let z=class extends J{constructor(){super(...arguments),this.keys=["<C-e>"],this.preservesDesiredColumn=!0,this.to="down",this.by="line"}};z=o([C.RegisterAction],z);let G=class extends J{constructor(){super(...arguments),this.keys=["<C-y>"],this.preservesDesiredColumn=!0,this.to="up",this.by="line"}};G=o([C.RegisterAction],G);class Q extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.runsOnceForEachCountPrefix=!1}async exec(e,t){const{visibleRanges:r}=t.editor;if(0===r.length)return;const n=v.configuration.getConfiguration("editor").get("smoothScrolling",!1),o=(t.actionCount||1)*this.getNumLines(r);let s=o;if("down"===this.to&&(s=Math.min(o,t.document.lineCount-1-r[r.length-1].end.line)),s>0){const e={to:this.to,by:"line",value:s,revealCursor:n,select:(0,y.isVisualMode)(t.currentMode)};n?await i.commands.executeCommand("editorScroll",e):t.postponedCodeViewChanges.push({command:"editorScroll",args:e})}const a=(0,c.clamp)(e.line+("down"===this.to?o:-o),0,t.document.lineCount-1);t.cursorStopPosition=new A.Position(a,t.desiredColumn).obeyStartOfLine(t.document)}}let Y=class extends Q{constructor(){super(...arguments),this.keys=["<C-b>"],this.to="up"}getNumLines(e){return e[0].end.line-e[0].start.line}};Y=o([C.RegisterAction],Y);let Z=class extends Q{constructor(){super(...arguments),this.keys=["<C-f>"],this.to="down"}getNumLines(e){return e[0].end.line-e[0].start.line}};Z=o([C.RegisterAction],Z);let X=class extends Q{constructor(){super(...arguments),this.keys=["<C-d>"],this.to="down"}getNumLines(e){return v.configuration.getScrollLines(e)}};X=o([C.RegisterAction],X);let ee=class extends Q{constructor(){super(...arguments),this.keys=["<C-u>"],this.to="up"}getNumLines(e){return v.configuration.getScrollLines(e)}};ee=o([C.RegisterAction],ee);let te=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["i"],["<Insert>"]]}async exec(e,t){await t.setCurrentMode(y.Mode.Insert)}doesActionApply(e,t){let r=!0;for(const t of e.recordedState.actionsRun)if(!(t instanceof F)){r=!1;break}return!(0!==e.recordedState.actionsRun.length&&!r)&&super.couldActionApply(e,t)}};te=o([C.RegisterAction],te),t.CommandInsertAtCursor=te;let re=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["R"]}async exec(e,t){const r=t.recordedState.count||1;await t.setCurrentMode(y.Mode.Replace),t.replaceState=new a.ReplaceState(t,e,r)}};re=o([C.RegisterAction],re),t.CommandReplaceAtCursorFromNormalMode=re;let ne=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock,y.Mode.Insert,y.Mode.Normal],this.keys=["<copy>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){let r="";if(t.currentMode===y.Mode.Visual)r=t.cursors.map((e=>{const[r,n]=(0,p.sorted)(e.start,e.stop);return t.document.getText(new i.Range(r,n.getRight()))})).join("\n");else if(t.currentMode===y.Mode.VisualLine)r=t.cursors.map((e=>t.document.getText(new i.Range((0,p.earlierOf)(e.start.getLineBegin(),e.stop.getLineBegin()),(0,p.laterOf)(e.start.getLineEnd(),e.stop.getLineEnd()))))).join("\n");else if(t.currentMode===y.Mode.VisualBlock)for(const{line:e}of x.TextEditor.iterateLinesInBlock(t))r+=e+"\n";else t.currentMode!==y.Mode.Insert&&t.currentMode!==y.Mode.Normal||(r=t.editor.selections.map((e=>t.document.getText(new i.Range(e.start,e.end)))).join("\n"));const n=t.editor.selection;!n.active.isEqual(n.anchor)&&await u.Clipboard.Copy(r),await t.setCurrentMode(y.Mode.Normal)}};ne=o([C.RegisterAction],ne);let oe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["<D-a>"]}async exec(e,t){t.cursorStartPosition=new A.Position(0,t.desiredColumn),t.cursorStopPosition=new A.Position(t.document.lineCount-1,t.desiredColumn),await t.setCurrentMode(y.Mode.VisualLine)}};oe=o([C.RegisterAction],oe);let ie=class extends C.BaseCommand{constructor(){super(...arguments),this.keys=["m","<character>"],this.modes=[y.Mode.Normal]}async exec(e,t){const r=this.keysPressed[1];t.historyTracker.addMark(e,r)}};ie=o([C.RegisterAction],ie);let se=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=[":"]}runsOnceForEveryCursor(){return!1}async exec(e,t){let r;r=t.currentMode===y.Mode.Normal?t.recordedState.count?".,.+"+(t.recordedState.count-1):"":"'<,'>",t.commandLine=new M.ExCommandLine(r,t.currentMode),await t.setCurrentMode(y.Mode.CommandlineInProgress)}};se=o([C.RegisterAction],se);let ae=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["q",":"]}runsOnceForEveryCursor(){return!1}async exec(e,t){t.recordedState.transformer.addTransformation({type:"showCommandHistory"}),await t.setCurrentMode(y.Mode.Normal)}};ae=o([C.RegisterAction],ae),t.CommandShowCommandHistory=ae;let ce=class extends C.BaseCommand{constructor(e=B.SearchDirection.Forward){super(),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=[["q","/"],["q","?"]],this.direction=B.SearchDirection.Forward,this.direction=e}runsOnceForEveryCursor(){return!1}async exec(e,t){this.keysPressed.includes("?")&&(this.direction=B.SearchDirection.Backward),t.recordedState.transformer.addTransformation({type:"showSearchHistory",direction:this.direction}),await t.setCurrentMode(y.Mode.Normal)}};ce=o([C.RegisterAction],ce),t.CommandShowSearchHistory=ce;let ue=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["."]}async execCount(e,t){if(P.globalState.previousFullAction){const e=t.recordedState.count||1;for(let r=0;r<e;r++)t.recordedState.transformer.addTransformation({type:"replayRecordedState",recordedState:P.globalState.previousFullAction})}}};ue=o([C.RegisterAction],ue);let de=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["&"],this.createsUndoPoint=!0}async exec(e,t){await N.exCommandParser.tryParse("s").command.execute(t)}};de=o([C.RegisterAction],de);class le extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine]}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){const r=t.recordedState.count||1,n=void 0!==this.direction?{levels:r,direction:this.direction}:void 0;await i.commands.executeCommand(this.commandName,n),t.cursors=(0,c.getCursorsAfterSync)(t.editor),await t.setCurrentMode(y.Mode.Normal)}}let he=class extends le{constructor(){super(...arguments),this.keys=["z","a"],this.commandName="editor.toggleFold"}};he=o([C.RegisterAction],he);let me=class extends le{constructor(){super(...arguments),this.keys=["z","c"],this.commandName="editor.fold",this.direction="up"}};me=o([C.RegisterAction],me);let pe=class extends le{constructor(){super(...arguments),this.keys=["z","M"],this.commandName="editor.foldAll"}};pe=o([C.RegisterAction],pe);let ge=class extends le{constructor(){super(...arguments),this.keys=["z","o"],this.commandName="editor.unfold",this.direction="down"}};ge=o([C.RegisterAction],ge);let fe=class extends le{constructor(){super(...arguments),this.keys=["z","R"],this.commandName="editor.unfoldAll"}};fe=o([C.RegisterAction],fe);let ve=class extends le{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["z","C"],this.commandName="editor.foldRecursively"}};ve=o([C.RegisterAction],ve);let ye=class extends le{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["z","O"],this.commandName="editor.unfoldRecursively"}};ye=o([C.RegisterAction],ye);let we=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["z","z"],this.preservesDesiredColumn=!0}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){t.editor.revealRange(new i.Range(t.cursorStopPosition,t.cursorStopPosition),i.TextEditorRevealType.InCenter)}};we=o([C.RegisterAction],we);let xe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["z","."]}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){t.editor.revealRange(new i.Range(t.cursorStopPosition,t.cursorStopPosition),i.TextEditorRevealType.InCenter),t.cursorStopPosition=x.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,t.cursorStopPosition.line)}};xe=o([C.RegisterAction],xe);let Se=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["z","t"],this.preservesDesiredColumn=!0}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){t.postponedCodeViewChanges.push({command:"revealLine",args:{lineNumber:e.line,at:"top"}})}};Se=o([C.RegisterAction],Se);let Ce=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["z","\n"]}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){t.postponedCodeViewChanges.push({command:"revealLine",args:{lineNumber:e.line,at:"top"}}),t.cursorStopPosition=x.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,t.cursorStopPosition.line)}};Ce=o([C.RegisterAction],Ce);let Me=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["z","b"],this.preservesDesiredColumn=!0}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){t.postponedCodeViewChanges.push({command:"revealLine",args:{lineNumber:e.line,at:"bottom"}})}};Me=o([C.RegisterAction],Me);let be=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["z","-"]}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}async exec(e,t){t.postponedCodeViewChanges.push({command:"revealLine",args:{lineNumber:e.line,at:"bottom"}}),t.cursorStopPosition=x.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,t.cursorStopPosition.line)}};be=o([C.RegisterAction],be);let ke=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["o"],this.isJump=!0}async exec(e,t){[t.cursorStartPosition,t.cursorStopPosition]=[t.cursorStopPosition,t.cursorStartPosition]}};ke=o([C.RegisterAction],ke);let Re=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["O"],this.isJump=!0}async exec(e,t){if(t.currentMode!==y.Mode.VisualBlock)return(new ke).exec(e,t);[t.cursorStartPosition,t.cursorStopPosition]=[new i.Position(t.cursorStartPosition.line,t.cursorStopPosition.character),new i.Position(t.cursorStopPosition.line,t.cursorStartPosition.character)]}};Re=o([C.RegisterAction],Re);let Pe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["u"],this.runsOnceForEachCountPrefix=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=await t.historyTracker.goBackHistoryStep();void 0===r?k.StatusBar.setText(t,"Already at oldest change"):t.cursors=[new g.Cursor(r,r)]}};Pe=o([C.RegisterAction],Pe),t.CommandUndo=Pe;let _e=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["U"]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=await t.historyTracker.goBackHistoryStepsOnLine();void 0!==r&&(t.cursors=[new g.Cursor(r,r)])}};_e=o([C.RegisterAction],_e);let Ee=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["<C-r>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=await t.historyTracker.goForwardHistoryStep();void 0===r?k.StatusBar.setText(t,"Already at newest change"):t.cursors=[new g.Cursor(r,r)]}};Ee=o([C.RegisterAction],Ee);let Ae=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["D"],this.createsUndoPoint=!0}runsOnceForEveryCursor(){return!0}async exec(e,t){if(e.isLineEnd())return;const r=(t.recordedState.count||1)-1,n=e,o=e.getDown(r).getLineEnd().getLeftThroughLineBreaks();await new b.DeleteOperator(this.multicursorIndex).run(t,n,o)}};Ae=o([C.RegisterAction],Ae);let Te=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["Y"]}async exec(e,t){const r=(t.recordedState.count||1)-1,n=e.getLineBegin(),o=e.getDown(r).getLeft();t.currentRegisterMode=w.RegisterMode.LineWise,await new b.YankOperator(this.multicursorIndex).run(t,n,o)}};Te=o([C.RegisterAction],Te),t.CommandYankFullLine=Te;let Le=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["C"],this.runsOnceForEachCountPrefix=!1}async exec(e,t){const r=t.recordedState.count||1;await new b.ChangeOperator(this.multicursorIndex).run(t,e,e.getDown(Math.max(0,r-1)).getLineEnd().getLeft())}};Le=o([C.RegisterAction],Le);let $e=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["S"],this.runsOnceForEachCountPrefix=!1}async exec(e,t){await new b.ChangeOperator(this.multicursorIndex).runRepeat(t,e,t.recordedState.count||1)}doesActionApply(e,t){return super.doesActionApply(e,t)&&!v.configuration.sneak}couldActionApply(e,t){return super.couldActionApply(e,t)&&!v.configuration.sneak}};$e=o([C.RegisterAction],$e);let Be=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual],this.keys=["v"]}async exec(e,t){await t.setCurrentMode(y.Mode.Normal)}};Be=o([C.RegisterAction],Be);let Ie=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["v"],this.isCompleteAction=!1}async exec(e,t){t.currentMode===y.Mode.Normal&&t.recordedState.count>1&&(t.cursorStopPosition=e.getRight(t.recordedState.count-1)),await t.setCurrentMode(y.Mode.Visual)}};Ie=o([C.RegisterAction],Ie);let Ne=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","v"]}async exec(e,t){void 0!==t.lastVisualSelection&&t.lastVisualSelection.end.line<=t.document.lineCount-1&&(await t.setCurrentMode(t.lastVisualSelection.mode),t.cursorStartPosition=t.lastVisualSelection.start,t.cursorStopPosition=t.lastVisualSelection.end.getLeft())}};Ne=o([C.RegisterAction],Ne);let Oe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-v>"],["<C-q>"]]}async exec(e,t){t.currentMode===y.Mode.Normal&&t.recordedState.count>1&&(t.cursorStopPosition=e.getRight(t.recordedState.count-1)),await t.setCurrentMode(y.Mode.VisualBlock)}};Oe=o([C.RegisterAction],Oe);let Ve=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=[["<C-v>"],["<C-q>"]]}async exec(e,t){await t.setCurrentMode(y.Mode.Normal)}};Ve=o([C.RegisterAction],Ve);let De=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualBlock],this.keys=["V"]}async exec(e,t){t.currentMode===y.Mode.Normal&&t.recordedState.count>1&&(t.cursorStopPosition=e.getDown(t.recordedState.count-1)),await t.setCurrentMode(y.Mode.VisualLine)}};De=o([C.RegisterAction],De);let Fe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualLine],this.keys=["V"]}async exec(e,t){await t.setCurrentMode(y.Mode.Normal)}};Fe=o([C.RegisterAction],Fe);let je=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual],this.keys=["g","f"],this.isJump=!0}async exec(e,t){let r;if(t.currentMode===y.Mode.Visual)r=t.document.getText(t.editor.selection);else{const n=new i.Range(e.prevWordStart(t.document,{wordType:E.WordType.FileName,inclusive:!0}),e.nextWordStart(t.document,{wordType:E.WordType.FileName}));r=t.document.getText(n).trim()}const n=r.match(/(.*?(?=:[0-9]+)|.*):?([0-9]*)$/);if(n){const e=n[1],r=parseInt(n[2],10);new d.FileCommand({name:"edit",bang:!1,opt:[],file:e,cmd:isNaN(r)?void 0:{type:"line_number",line:r},createFileIfNotExists:!1}).execute(t)}}};je=o([C.RegisterAction],je);let We=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["g","d"],["<C-]>"]],this.isJump=!0}async exec(e,t){await i.commands.executeCommand("editor.action.goToDeclaration"),t.editor===i.window.activeTextEditor&&(t.cursorStopPosition=t.editor.selection.start)}};We=o([C.RegisterAction],We);let Ue=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["g","x"]}async exec(e,t){i.commands.executeCommand("editor.action.openLink")}};Ue=o([C.RegisterAction],Ue);let Ke=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g",";"],this.isJump=!0}async exec(e,t){const r=t.historyTracker.prevChangeInChangeList();r instanceof $.VimError?k.StatusBar.displayError(t,r):t.cursorStopPosition=r}};Ke=o([C.RegisterAction],Ke);let He=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g",","],this.isJump=!0}async exec(e,t){const r=t.historyTracker.nextChangeInChangeList();r instanceof $.VimError?k.StatusBar.displayError(t,r):t.cursorStopPosition=r}};He=o([C.RegisterAction],He);let qe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","i"]}async exec(e,t){var r;t.cursorStopPosition=t.cursorStartPosition=null!==(r=t.historyTracker.getLastChangeEndPosition())&&void 0!==r?r:new A.Position(0,0),await t.setCurrentMode(y.Mode.Insert)}};qe=o([C.RegisterAction],qe),t.CommandInsertAtLastChange=qe;let Je=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["I"]}async exec(e,t){await t.setCurrentMode(y.Mode.Insert),t.cursorStopPosition=t.cursorStartPosition=x.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,e.line)}};Je=o([C.RegisterAction],Je),t.CommandInsertAtFirstCharacter=Je;let ze=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","I"]}async exec(e,t){await t.setCurrentMode(y.Mode.Insert),t.cursorStopPosition=t.cursorStartPosition=e.getLineBegin()}};ze=o([C.RegisterAction],ze),t.CommandInsertAtLineBegin=ze;let Ge=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["a"]}async exec(e,t){await t.setCurrentMode(y.Mode.Insert),t.cursorStopPosition=t.cursorStartPosition=e.getRight()}doesActionApply(e,t){return!!e.recordedState.actionsRun.every((e=>e instanceof F))&&super.couldActionApply(e,t)}};Ge=o([C.RegisterAction],Ge),t.CommandInsertAfterCursor=Ge;let Qe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["A"]}async exec(e,t){await t.setCurrentMode(y.Mode.Insert),t.cursorStopPosition=t.cursorStartPosition=e.getLineEnd()}};Qe=o([C.RegisterAction],Qe),t.CommandInsertAtLineEnd=Qe;let Ye=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["O"]}runsOnceForEveryCursor(){return!1}async execCount(e,t){await t.setCurrentMode(y.Mode.Insert);const r=t.recordedState.count||1,n=e.getLineBeginRespectingIndent(t.document).character;for(let e=0;e<r;e++)await i.commands.executeCommand("editor.action.insertLineBefore");t.cursors=(0,c.getCursorsAfterSync)(t.editor);const o=t.cursors[0].start.character,s=n-o;for(let e=0;e<r;e++){const r=new A.Position(t.cursors[0].start.line+e,n);0===e?t.cursors[0]=new g.Cursor(r,r):t.cursors.push(new g.Cursor(r,r)),s>=0?t.recordedState.transformer.addTransformation({type:"insertText",text:x.TextEditor.setIndentationLevel("",s),position:r,cursorIndex:e,manuallySetCursorPositions:!0}):t.recordedState.transformer.addTransformation({type:"deleteRange",cursorIndex:e,range:new i.Range(r,new A.Position(r.line,o)),manuallySetCursorPositions:!0})}t.cursors=t.cursors.reverse(),t.isFakeMultiCursor=!0}};Ye=o([C.RegisterAction],Ye),t.CommandInsertNewLineAbove=Ye;let Ze=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["o"]}runsOnceForEveryCursor(){return!1}async execCount(e,t){await t.setCurrentMode(y.Mode.Insert);const r=t.recordedState.count||1;for(let e=0;e<r;e++)await i.commands.executeCommand("editor.action.insertLineAfter");t.cursors=(0,c.getCursorsAfterSync)(t.editor);for(let e=1;e<r;e++){const r=new A.Position(t.cursorStartPosition.line-e,t.cursorStartPosition.character);t.cursors.push(new g.Cursor(r,r)),t.recordedState.transformer.addTransformation({type:"insertText",text:x.TextEditor.setIndentationLevel("",r.character),position:r,cursorIndex:e,manuallySetCursorPositions:!0})}t.cursors=t.cursors.reverse(),t.isFakeMultiCursor=!0}};Ze=o([C.RegisterAction],Ze),t.CommandInsertNewLineBefore=Ze;let Xe=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["<C-o>"],["<C-t>"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){await P.globalState.jumpTracker.jumpBack(e,t)}};Xe=o([C.RegisterAction],Xe);let et=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["<C-i>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){await P.globalState.jumpTracker.jumpForward(e,t)}};et=o([C.RegisterAction],et);let tt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["<C-w>","q"],["<C-w>","<C-q>"],["<C-w>","c"],["<C-w>","<C-c>"]]}async exec(e,t){new h.QuitCommand({}).execute(t)}};tt=o([C.RegisterAction],tt);let rt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["<C-w>","o"],["<C-w>","<C-o>"]]}async exec(e,t){(new l.OnlyCommand).execute(t)}};rt=o([C.RegisterAction],rt);let nt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","l"],["<C-w>","<right>"],["<C-w>","<C-l>"]],this.isJump=!0}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.navigateRight",args:{}})}};nt=o([C.RegisterAction],nt);let ot=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","j"],["<C-w>","<down>"],["<C-w>","<C-j>"]],this.isJump=!0}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.navigateDown",args:{}})}};ot=o([C.RegisterAction],ot);let it=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","k"],["<C-w>","<up>"],["<C-w>","<C-k>"]],this.isJump=!0}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.navigateUp",args:{}})}};it=o([C.RegisterAction],it);let st=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","h"],["<C-w>","<left>"],["<C-w>","<C-h>"]],this.isJump=!0}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.navigateLeft",args:{}})}};st=o([C.RegisterAction],st);let at=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","<C-w>"],["<C-w>","w"]],this.isJump=!0}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.navigateEditorGroups",args:{}})}};at=o([C.RegisterAction],at);let ct=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","v"],["<C-w>","<C-v>"]]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.splitEditor",args:{}})}};ct=o([C.RegisterAction],ct);let ut=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["<C-w>","s"],["<C-w>","<C-s>"]]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.splitEditorOrthogonal",args:{}})}};ut=o([C.RegisterAction],ut);let dt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["<C-w>","="]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.evenEditorWidths",args:{}})}};dt=o([C.RegisterAction],dt);let lt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["<C-w>",">"]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.increaseViewWidth",args:{}})}};lt=o([C.RegisterAction],lt);let ht=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["<C-w>","<"]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.decreaseViewWidth",args:{}})}};ht=o([C.RegisterAction],ht);let mt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["<C-w>","+"]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.increaseViewHeight",args:{}})}};mt=o([C.RegisterAction],mt);let pt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=["<C-w>","-"]}async exec(e,t){t.postponedCodeViewChanges.push({command:"workbench.action.decreaseViewHeight",args:{}})}};pt=o([C.RegisterAction],pt);let gt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["g","t"],["<C-pagedown>"]],this.runsOnceForEachCountPrefix=!1}async exec(e,t){t.recordedState.count>0?new m.TabCommand({type:m.TabCommandType.Absolute,count:t.recordedState.count-1}).execute(t):new m.TabCommand({type:m.TabCommandType.Next,bang:!1,count:1}).execute(t)}};gt=o([C.RegisterAction],gt);let ft=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine],this.keys=[["g","T"],["<C-pageup>"]],this.runsOnceForEachCountPrefix=!0}async exec(e,t){new m.TabCommand({type:m.TabCommandType.Previous,bang:!1,count:1}).execute(t)}};ft=o([C.RegisterAction],ft);let vt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["x"],this.createsUndoPoint=!0}async exec(e,t){if(0===t.document.lineAt(e).text.length)return;const r=t.recordedState.count||1;await new b.DeleteOperator(this.multicursorIndex).run(t,e,e.getRight(r-1).getLeftIfEOL()),await t.setCurrentMode(y.Mode.Normal)}};vt=o([C.RegisterAction],vt),t.ActionDeleteChar=vt;let yt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["<Del>"],this.runsOnceForEachCountPrefix=!0,this.createsUndoPoint=!0}async execCount(e,t){0!==t.recordedState.count?(t.recordedState.count=Math.floor(t.recordedState.count/10),t.recordedState.actionsRunPressedKeys=t.recordedState.count>0?t.recordedState.count.toString().split(""):[],this.isCompleteAction=!1):await(new vt).execCount(e,t)}};yt=o([C.RegisterAction],yt),t.ActionDeleteCharWithDeleteKey=yt;let wt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["X"],this.createsUndoPoint=!0}async exec(e,t){if(0===e.character)return;const r=t.recordedState.count||1;await new b.DeleteOperator(this.multicursorIndex).run(t,e.getLeft(r),e.getLeft())}};wt=o([C.RegisterAction],wt),t.ActionDeleteLastChar=wt;let xt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["J"],this.createsUndoPoint=!0,this.runsOnceForEachCountPrefix=!1}firstNonWhitespaceIndex(e){for(let t=0,r=e.length;t<r;t++){const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1}async execJoinLines(e,t,r,n){n=n-1||1;const o=v.configuration.joinspaces;let s,a,c,u,d=0;e.isEqual(t)||e.line===t.line?t.line+1<r.document.lineCount?(s=t.line,a=0,c=t.getDown(n).line,u=x.TextEditor.getLineLength(c)):(s=t.line,a=0,c=t.line,u=x.TextEditor.getLineLength(c)):(s=e.line,a=0,c=t.line,u=x.TextEditor.getLineLength(c));let l=r.document.lineAt(e).text;for(let e=s+1;e<=c;e++){const t=r.document.lineAt(e).text,n=this.firstNonWhitespaceIndex(t);if(n>=0){let e=" ";""===l||l.endsWith("\t")?e="":o&&(l.endsWith(".")||l.endsWith("!")||l.endsWith("?"))?e=" ":o&&(l.endsWith(". ")||l.endsWith("! ")||l.endsWith("? "))?e=" ":l.endsWith(" ")&&(e="");const r=t.substr(n);")"===r.charAt(0)&&(e=""),l+=e+r,d=r.length+e.length}}const h=new A.Position(s,a),m=new A.Position(c,u);h.isEqual(m)||(e.isEqual(t)?r.recordedState.transformer.addTransformation({type:"replaceText",text:l,range:new i.Range(h,m),diff:p.PositionDiff.offset({character:l.length-d-t.character})}):(r.recordedState.transformer.addTransformation({type:"replaceText",text:l,range:new i.Range(h,m),manuallySetCursorPositions:!0}),r.cursorStartPosition=r.cursorStopPosition=new A.Position(e.line,l.length-d),await r.setCurrentMode(y.Mode.Normal)))}async execCount(e,t){const r=t.cursors.map((e=>new g.Cursor(e.start,e.stop))).sort(((e,t)=>e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>t.start.character?1:-1)),n=[];for(const[e,{start:o,stop:i}]of r.entries()){this.multicursorIndex=e,t.cursorStopPosition=i,t.cursorStartPosition=o,await this.execJoinLines(o,i,t,t.recordedState.count||1),n.push(new g.Cursor(t.cursorStartPosition,t.cursorStopPosition));for(const e of t.recordedState.transformer.transformations)(0,S.isTextTransformation)(e)&&void 0===e.cursorIndex&&(e.cursorIndex=this.multicursorIndex)}t.cursors=n}};xt=o([C.RegisterAction],xt);let St=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine],this.keys=["J"]}async exec(e,t){const[r,n]=(0,p.sorted)(t.editor.selection.start,t.editor.selection.end);t.currentRegisterMode=w.RegisterMode.CharacterWise,await(new xt).execJoinLines(r,n,t,1)}};St=o([C.RegisterAction],St);let Ct=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=["J"]}async exec(e,t){const[r,n]=(0,p.sorted)(t.cursorStartPosition,t.cursorStopPosition);t.currentRegisterMode=w.RegisterMode.CharacterWise,await(new xt).execJoinLines(r,n,t,1)}};Ct=o([C.RegisterAction],Ct);let Mt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","J"],this.createsUndoPoint=!0}async exec(e,t){if(e.line===t.document.lineCount-1)return;const r=t.recordedState.count>2?t.recordedState.count-1:1;await this.execJoin(r,e,t)}async execJoin(e,t,r){const n=new i.Range(new A.Position(t.line,0),new A.Position(Math.min(t.line+e,r.document.lineCount-1),0).getLineEnd()),o=r.document.getText(n).replace(/\r?\n/g,""),s=o.length-r.document.lineAt(n.end).text.length;r.recordedState.transformer.addTransformation({type:"replaceText",range:n,text:o,diff:p.PositionDiff.exactCharacter({character:s})})}};Mt=o([C.RegisterAction],Mt);let bt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.keys=["g","J"]}async exec(e,t){const[r,n]=(0,p.sorted)(t.cursorStartPosition,t.cursorStopPosition),o=r.line===n.line?1:n.line-r.line;await(new Mt).execJoin(o,r,t),await t.setCurrentMode(y.Mode.Normal)}};bt=o([C.RegisterAction],bt);let kt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["r","<character>"],this.createsUndoPoint=!0,this.runsOnceForEachCountPrefix=!1}async exec(e,t){const r=t.recordedState.count||1,n=this.keysPressed[1];if(["<BS>","<S-BS>"].includes(n.toUpperCase()))return;if(e.character+r>e.getLineEnd().character)return;let o=new A.Position(e.line,e.character+r);o.character>t.document.lineAt(o).text.length||(o.character>t.document.lineAt(o).text.length&&(o=new A.Position(o.line,o.character+1)),"<tab>"===n?(t.recordedState.transformer.delete(new i.Range(e,o)),t.recordedState.transformer.addTransformation({type:"tab",cursorIndex:this.multicursorIndex,diff:p.PositionDiff.offset({character:-1})})):"\n"===n?(t.recordedState.transformer.delete(new i.Range(e,o)),t.recordedState.transformer.addTransformation({type:"insertTextVSCode",text:"\n"})):t.recordedState.transformer.addTransformation({type:"replaceText",text:n.repeat(r),range:new i.Range(e,o),diff:p.PositionDiff.offset({character:r-1})}))}};kt=o([C.RegisterAction],kt);let Rt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine],this.keys=["r","<character>"],this.createsUndoPoint=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){let r=this.keysPressed[1];"<tab>"===r&&(r=x.TextEditor.getTabCharacter(t.editor));let n=1,[o,s]=(0,p.sorted)(t.cursorStartPosition,t.cursorStopPosition);t.currentMode===y.Mode.VisualLine&&([o,s]=[o.getLineBegin(),s.getLineEnd()]);const a=t.document.lineAt(s).text.length;a<=0&&(n=0),s=new A.Position(s.line,Math.min(s.character,a>0?a-1:0));for(let e=o.line;e<=s.line;e++){const a=t.document.lineAt(e).text;o.line===s.line?t.recordedState.transformer.addTransformation({type:"replaceText",text:Array(s.character-o.character+2).join(r),range:new i.Range(o,new A.Position(s.line,s.character+1)),manuallySetCursorPositions:!0}):e===o.line?t.recordedState.transformer.addTransformation({type:"replaceText",text:Array(a.length-o.character+1).join(r),range:new i.Range(o,new A.Position(o.line,a.length)),manuallySetCursorPositions:!0}):e===s.line?t.recordedState.transformer.addTransformation({type:"replaceText",text:Array(s.character+1+n).join(r),range:new i.Range(new A.Position(s.line,0),new A.Position(s.line,s.character+n)),manuallySetCursorPositions:!0}):t.recordedState.transformer.addTransformation({type:"replaceText",text:Array(a.length+1).join(r),range:new i.Range(new A.Position(e,0),new A.Position(e,a.length)),manuallySetCursorPositions:!0})}t.cursorStopPosition=o,t.cursorStartPosition=o,await t.setCurrentMode(y.Mode.Normal)}};Rt=o([C.RegisterAction],Rt);let Pt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=["r","<character>"],this.createsUndoPoint=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){let r=this.keysPressed[1];"<tab>"===r&&(r=x.TextEditor.getTabCharacter(t.editor));for(const{start:e,end:n}of x.TextEditor.iterateLinesInBlock(t))n.isBeforeOrEqual(e)||t.recordedState.transformer.addTransformation({type:"replaceText",text:Array(n.character-e.character+1).join(r),range:new i.Range(e,n),manuallySetCursorPositions:!0});const n=(0,y.visualBlockGetTopLeftPosition)(t.cursorStopPosition,t.cursorStartPosition);t.cursors=[new g.Cursor(n,n)],await t.setCurrentMode(y.Mode.Normal)}};Pt=o([C.RegisterAction],Pt);let _t=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=[["d"],["x"],["X"]],this.createsUndoPoint=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=[];for(const{line:e,start:n,end:o}of x.TextEditor.iterateLinesInBlock(t))r.push(e),t.recordedState.transformer.addTransformation({type:"deleteRange",range:new i.Range(n,o),manuallySetCursorPositions:!0});const n=1===r.length?r[0]:r.join("\n");t.currentRegisterMode=w.RegisterMode.BlockWise,w.Register.put(t,n,this.multicursorIndex,!0);const o=(0,y.visualBlockGetTopLeftPosition)(t.cursorStopPosition,t.cursorStartPosition);t.cursors=[new g.Cursor(o,o)],await t.setCurrentMode(y.Mode.Normal)}};_t=o([C.RegisterAction],_t);let Et=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=["D"],this.createsUndoPoint=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){for(const{start:e}of x.TextEditor.iterateLinesInBlock(t))t.recordedState.transformer.addTransformation({type:"deleteRange",range:new i.Range(e,e.getLineEnd()),manuallySetCursorPositions:!0});const r=(0,y.visualBlockGetTopLeftPosition)(t.cursorStopPosition,t.cursorStartPosition);t.cursors=[new g.Cursor(r,r)],await t.setCurrentMode(y.Mode.Normal)}};Et=o([C.RegisterAction],Et);let At=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=["I"]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=[];for(const e of t.cursors)for(const{line:n,start:o}of x.TextEditor.iterateLinesInBlock(t,e))""===n&&0!==o.character||r.push(new g.Cursor(o,o));t.cursors=r,await t.setCurrentMode(y.Mode.Insert),t.isFakeMultiCursor=!0}};At=o([C.RegisterAction],At);let Tt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=[["c"],["s"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=[];for(const e of t.cursors)for(const{start:n,end:o}of x.TextEditor.iterateLinesInBlock(t,e))t.recordedState.transformer.addTransformation({type:"deleteRange",range:new i.Range(n,o),manuallySetCursorPositions:!0}),r.push(new g.Cursor(n,n));t.cursors=r,await t.setCurrentMode(y.Mode.Insert),t.isFakeMultiCursor=!0}};Tt=o([C.RegisterAction],Tt);let Lt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=["C"]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=[];for(const e of t.cursors)for(const{start:n,end:o}of x.TextEditor.iterateLinesInBlock(t,e))t.recordedState.transformer.delete(new i.Range(n,n.getLineEnd())),r.push(new g.Cursor(o,o));t.cursors=r,await t.setCurrentMode(y.Mode.Insert),t.isFakeMultiCursor=!0}};Lt=o([C.RegisterAction],Lt);class $t extends C.BaseCommand{runsOnceForEveryCursor(){return!1}async exec(e,t){await t.setCurrentMode(y.Mode.Insert),t.isFakeMultiCursor=!0;const r=[],n=[];for(const e of t.editor.selections){const{start:o,end:i}=e;for(let e=o.line;e<=i.line;e++){const s=t.document.lineAt(e),a=this.getCursorRangeForLine(s,o,i);s.isEmptyOrWhitespace?n.push(a):r.push(a)}}r.length>0?t.cursors=r:t.cursors=n}}let Bt=class extends $t{constructor(){super(...arguments),this.modes=[y.Mode.VisualLine],this.keys=["I"]}getCursorRangeForLine(e){const t=new A.Position(e.lineNumber,e.firstNonWhitespaceCharacterIndex);return new g.Cursor(t,t)}};Bt=o([C.RegisterAction],Bt);let It=class extends $t{constructor(){super(...arguments),this.modes=[y.Mode.VisualLine],this.keys=["A"]}getCursorRangeForLine(e){const t=new A.Position(e.lineNumber,e.range.end.character);return new g.Cursor(t,t)}};It=o([C.RegisterAction],It);let Nt=class extends $t{constructor(){super(...arguments),this.modes=[y.Mode.Visual],this.keys=["I"]}getCursorRangeForLine(e,t,r){const n=e.lineNumber===t.line?t:new A.Position(e.lineNumber,e.firstNonWhitespaceCharacterIndex);return new g.Cursor(n,n)}};Nt=o([C.RegisterAction],Nt);let Ot=class extends $t{constructor(){super(...arguments),this.modes=[y.Mode.Visual],this.keys=["A"]}getCursorRangeForLine(e,t,r){const n=e.lineNumber===r.line?r:new A.Position(e.lineNumber,e.range.end.character);return new g.Cursor(n,n)}};Ot=o([C.RegisterAction],Ot);let Vt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=["A"]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=[];for(const e of t.cursors){const[n,o]=(0,p.sorted)(e.start,e.stop);for(let i=n.line;i<=o.line;i++){const n=t.document.lineAt(i),o=t.desiredColumn===Number.POSITIVE_INFINITY?n.text.length:Math.max(e.start.character,e.stop.character)+1;n.text.length<o&&await x.TextEditor.insert(t.editor," ".repeat(o-n.text.length),n.range.end,!1);const s=new A.Position(i,o);r.push(new g.Cursor(s,s))}}t.cursors=r,await t.setCurrentMode(y.Mode.Insert),t.isFakeMultiCursor=!0}};Vt=o([C.RegisterAction],Vt);let Dt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine],this.keys=["X"]}async exec(e,t){const[r,n]=(0,p.sorted)(t.cursorStartPosition,t.cursorStopPosition);await new b.DeleteOperator(this.multicursorIndex).run(t,r.getLineBegin(),n.getLineEnd())}};Dt=o([C.RegisterAction],Dt);let Ft=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine],this.keys=["S"]}doesActionApply(e,t){return!v.configuration.surround&&super.doesActionApply(e,t)}async exec(e,t){return(new jt).exec(e,t)}};Ft=o([C.RegisterAction],Ft);let jt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Visual,y.Mode.VisualLine],this.keys=[["C"],["R"]]}async exec(e,t){const[r,n]=(0,p.sorted)(t.cursorStartPosition,t.cursorStopPosition);await new b.ChangeOperator(this.multicursorIndex).run(t,r.getLineBegin(),n.getLineEnd().getLeftIfEOL())}};jt=o([C.RegisterAction],jt);let Wt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.VisualBlock],this.keys=[["R"],["S"]]}async exec(e,t){return(new jt).exec(e,t)}};Wt=o([C.RegisterAction],Wt);let Ut=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["s"]}async exec(e,t){await new b.ChangeOperator(this.multicursorIndex).run(t,e,e.getRight((t.recordedState.count||1)-1))}doesActionApply(e,t){return super.doesActionApply(e,t)&&!v.configuration.sneak&&!e.recordedState.operator}couldActionApply(e,t){return super.couldActionApply(e,t)&&!v.configuration.sneak&&!e.recordedState.operator}};Ut=o([C.RegisterAction],Ut);let Kt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["~"],this.createsUndoPoint=!0}toggleCase(e){let t="";for(const r of e){let e=r.toLocaleLowerCase();e===r&&(e=r.toLocaleUpperCase()),t+=e}return t}async exec(e,t){const r=t.recordedState.count||1,n=new i.Range(e,(0,L.shouldWrapKey)(t.currentMode,"~")?e.getOffsetThroughLineBreaks(r):e.getRight(r));t.recordedState.transformer.addTransformation({type:"replaceText",range:n,text:this.toggleCase(t.document.getText(n)),diff:p.PositionDiff.exactPosition(n.end)})}};Kt=o([C.RegisterAction],Kt);class Ht extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual,y.Mode.VisualLine,y.Mode.VisualBlock],this.createsUndoPoint=!0}async exec(e,t){const r=this.getSearchRanges(t);let n=1;for(const[o,i]of r.entries()){e=i.start;const r=t.document.lineAt(e).text;if(r.length<=e.character)continue;const o=r[e.character].match(/\s/)?e:e.prevWordStart(t.document,{inclusive:!0});e:for(let{start:s,end:a,word:c}of x.TextEditor.iterateWords(t.document,o)){if(s.isAfter(i.stop))break;for("-"===r[s.character-1]&&/\d/.test(r[s.character])&&(s=s.getLeft(),c=r[s.character]+c);;){const r=f.NumericString.parse(c);if(void 0===r)break;const{num:o,suffixOffset:i}=r;if(e.character<s.character+i){const e=await this.replaceNum(t,o,this.offset*n*(t.recordedState.count||1),s,a);this.staircase&&n++,t.currentMode===y.Mode.Normal&&t.recordedState.transformer.addTransformation({type:"moveCursor",diff:p.PositionDiff.exactPosition(e.getLeft(o.suffix.length))});break e}c=c.slice(i),s=new A.Position(s.line,s.character+i)}}}(0,y.isVisualMode)(t.currentMode)&&t.recordedState.transformer.addTransformation({type:"moveCursor",diff:p.PositionDiff.exactPosition(r[0].start)}),t.setCurrentMode(y.Mode.Normal)}async replaceNum(e,t,r,n,o){const s=o.character+1-n.character;t.value+=r;const a=t.toString(),c=new i.Range(n,o.getRight());return e.recordedState.transformer.replace(c,a),s!==a.length&&(o=new A.Position(o.line,n.character+a.length-1)),o}getSearchRanges(e){const t=[],[r,n]=(0,p.sorted)(e.cursorStartPosition,e.cursorStopPosition);switch(e.currentMode){case y.Mode.Normal:t.push(new g.Cursor(e.cursorStopPosition,e.cursorStopPosition.getLineEnd()));break;case y.Mode.Visual:t.push(new g.Cursor(r,r.getLineEnd()));for(let e=r.line+1;e<n.line;e++){const r=new A.Position(e,0);t.push(new g.Cursor(r,r.getLineEnd()))}t.push(new g.Cursor(n.getLineBegin(),n));break;case y.Mode.VisualLine:for(let e=r.line;e<=n.line;e++){const r=new A.Position(e,0);t.push(new g.Cursor(r,r.getLineEnd()))}break;case y.Mode.VisualBlock:{const e=(0,y.visualBlockGetTopLeftPosition)(r,n),o=(0,y.visualBlockGetBottomRightPosition)(r,n);for(let r=e.line;r<=o.line;r++)t.push(new g.Cursor(new A.Position(r,e.character),new A.Position(r,o.character)));break}default:throw new Error(`Unexpected mode ${e.currentMode} in IncrementDecrementNumberAction.getPositions()`)}return t}}let qt=class extends Ht{constructor(){super(...arguments),this.keys=["<C-a>"],this.offset=1,this.staircase=!1}};qt=o([C.RegisterAction],qt);let Jt=class extends Ht{constructor(){super(...arguments),this.keys=["<C-x>"],this.offset=-1,this.staircase=!1}};Jt=o([C.RegisterAction],Jt);let zt=class extends Ht{constructor(){super(...arguments),this.keys=["g","<C-a>"],this.offset=1,this.staircase=!0}};zt=o([C.RegisterAction],zt);let Gt=class extends Ht{constructor(){super(...arguments),this.keys=["g","<C-x>"],this.offset=-1,this.staircase=!0}};Gt=o([C.RegisterAction],Gt);let Qt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","a"]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=t.document.getText(new i.Range(e,e.getRight())),n=r.charCodeAt(0);k.StatusBar.setText(t,`<${r}> ${n}, Hex ${n.toString(16)}, Octal ${n.toString(8)}`)}};Qt=o([C.RegisterAction],Qt),t.CommandUnicodeName=Qt;let Yt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","h"]}runsOnceForEveryCursor(){return!1}async exec(e,t){await i.commands.executeCommand("editor.action.showHover")}};Yt=o([C.RegisterAction],Yt);let Zt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual],this.keys=[["<D-d>"],["g","b"]],this.runsOnceForEachCountPrefix=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){await i.commands.executeCommand("editor.action.addSelectionToNextFindMatch"),t.cursors=(0,c.getCursorsAfterSync)(t.editor),t.cursors=t.cursors.map((e=>e.withNewStop(e.stop.getLeft()))),await t.setCurrentMode(y.Mode.Visual)}};Zt=o([C.RegisterAction],Zt),t.ActionOverrideCmdD=Zt;let Xt=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Insert],this.keys=["<D-d>"],this.runsOnceForEachCountPrefix=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){t.editor.selections=t.editor.selections.map(((e,r)=>{const n=e.active;if(0===r)return new i.Selection(n.prevWordStart(t.document),n.getLeft().nextWordEnd(t.document,{inclusive:!0}).getRight());{const e=t.editor.selections[0].active,r=e.getLeft().nextWordEnd(t.document,{inclusive:!0}).getRight().character-e.prevWordStart(t.document).character,o=n.getLeft(r);return new i.Selection(o,n)}})),await i.commands.executeCommand("editor.action.addSelectionToNextFindMatch"),t.cursors=(0,c.getCursorsAfterSync)(t.editor)}};Xt=o([C.RegisterAction],Xt);let er=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual],this.keys=[["<D-alt+down>"],["<C-alt+down>"]],this.runsOnceForEachCountPrefix=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){await i.commands.executeCommand("editor.action.insertCursorBelow"),t.cursors=(0,c.getCursorsAfterSync)(t.editor)}};er=o([C.RegisterAction],er);let tr=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal,y.Mode.Visual],this.keys=[["<D-alt+up>"],["<C-alt+up>"]],this.runsOnceForEachCountPrefix=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){await i.commands.executeCommand("editor.action.insertCursorAbove"),t.cursors=(0,c.getCursorsAfterSync)(t.editor)}};tr=o([C.RegisterAction],tr);let rr=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["<C-g>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){(0,R.reportFileInfo)(e,t)}};rr=o([C.RegisterAction],rr);let nr=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["Z","Z"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){await new T.WriteQuitCommand({bang:!1,opt:[]}).execute(t)}};nr=o([C.RegisterAction],nr);let or=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["Z","Q"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){await new h.QuitCommand({bang:!0}).execute(t)}};or=o([C.RegisterAction],or);let ir=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=[["<C-6>"],["<C-^>"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){const r=await w.Register.get("#");if((null==r?void 0:r.text)instanceof s.RecordedState)throw new Error("# register unexpectedly contained a RecordedState");if(void 0===r||""===r.text)k.StatusBar.displayError(t,$.VimError.fromCode($.ErrorCode.NoAlternateFile));else{let e;if(e=await(0,I.doesFileExist)(i.Uri.file(r.text))?[i.Uri.file(r.text)]:await i.workspace.findFiles(r.text),e.length>0){const t=await i.workspace.openTextDocument(e[0]);await i.window.showTextDocument(t)}}}};ir=o([C.RegisterAction],ir);let sr=class extends C.BaseCommand{constructor(){super(...arguments),this.modes=[y.Mode.Normal],this.keys=["g","O"]}runsOnceForEveryCursor(){return!1}async exec(e,t){await i.commands.executeCommand("outline.focus")}};sr=o([C.RegisterAction],sr)},"./src/actions/commands/commandLine.ts":function(e,t,r){"use strict";var n,o=r("./node_modules/process/browser.js"),i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0});const s=r("vscode"),a=r("./src/actions/base.ts"),c=r("./src/mode/mode.ts"),u=r("./src/cmd_line/commandLine.ts"),d=r("./src/register/register.ts"),l=r("./src/state/recordedState.ts"),h=r("./src/textEditor.ts"),m=r("./src/statusBar.ts"),p=r("./src/util/path.ts"),g=r("./src/util/clipboard.ts"),f=r("./src/error.ts"),v=r("./src/util/util.ts"),y=r("./src/vimscript/exCommandParser.ts"),w=r("./src/vimscript/pattern.ts");class x extends a.BaseCommand{constructor(){super(...arguments),this.modes=[c.Mode.CommandlineInProgress,c.Mode.SearchInProgressMode]}runsOnceForEveryCursor(){return!1}async exec(e,t){(0,v.assertDefined)(t.commandLine,"vimState.commandLine unexpectedly undefined"),await this.run(t,t.commandLine)}}let S=n=class extends x{constructor(){super(...arguments),this.modes=[c.Mode.CommandlineInProgress],this.keys=[["<tab>"],["<S-tab>"]]}cycleCompletion(e,t){const r=t.autoCompleteItems;if(0===r.length)return;t.autoCompleteIndex=e?(t.autoCompleteIndex+1)%r.length:(t.autoCompleteIndex-1+r.length)%r.length;const n=t.preCompleteCharacterPos,o=t.preCompleteCommand,i=o.slice(0,n),s=o.slice(n);t.text=i+r[t.autoCompleteIndex]+s,t.cursorIndex=t.text.length-s.length}async run(e,t){if(!(t instanceof u.ExCommandLine))throw new Error("Expected ExCommandLine in CommandLineTab::run()");const r="<tab>"===this.keysPressed[0];if(0!==t.autoCompleteItems.length&&e.recordedState.actionsRun[e.recordedState.actionsRun.length-2]instanceof n)return void this.cycleCompletion(r,t);let i=[],a=t.text.slice(0,t.cursorIndex);const c=t.text.slice(t.cursorIndex),d=/^\s*\w+\s+/g;if(/^\s*\w+$/.test(a))i=y.builtinExCommands.map((e=>e[0][0]+e[0][1])).filter((e=>e.startsWith(a))).map((e=>e.slice(e.search(a)+a.length))).sort();else if(d.exec(a)){const t=a.substring(d.lastIndex),r=e.document.uri,n=!!s.env.remoteName,{fullDirPath:c,baseName:u,partialPath:l,path:h}=(0,p.getPathDetails)(t,r,n);a=a.slice(0,d.lastIndex)+l;const m=/^\.\.?$/g.test(u),g=await(0,p.readDirectory)(c,h.sep,r,n,m),f=new RegExp(`^${u}`,"win32"===o.platform?"i":"");i=g.map((e=>[f.exec(e),e])).filter((([e])=>null!==e)).map((([e,t])=>t.slice(e[0].length))).sort()}const l=r?0:i.length-1;t.autoCompleteIndex=l,t.autoCompleteItems=i.length<=1?[]:i,t.preCompleteCharacterPos=t.cursorIndex,t.preCompleteCommand=a+c;const h=0===i.length?"":i[l];t.text=a+h+c,t.cursorIndex=t.text.length-c.length}};S=n=i([a.RegisterAction],S);let C=class extends x{constructor(){super(...arguments),this.modes=[c.Mode.CommandlineInProgress],this.keys=[["\n"],["<C-m>"]]}async run(e,t){await t.run(e)}};C=i([a.RegisterAction],C);let M=class extends x{constructor(){super(...arguments),this.modes=[c.Mode.SearchInProgressMode],this.keys=[["\n"],["<C-m>"]],this.isJump=!0}runsOnceForEveryCursor(){return!0}async run(e,t){await t.run(e)}};M=i([a.RegisterAction],M);let b=class extends x{constructor(){super(...arguments),this.keys=[["<Esc>"],["<C-c>"],["<C-[>"]]}async run(e,t){await t.escape(e)}};b=i([a.RegisterAction],b);let k=class extends x{constructor(){super(...arguments),this.keys=[["<BS>"],["<S-BS>"],["<C-h>"]]}async run(e,t){await t.backspace(e)}};k=i([a.RegisterAction],k);let R=class extends x{constructor(){super(...arguments),this.keys=["<Del>"]}async run(e,t){await t.delete(e)}};R=i([a.RegisterAction],R);let P=class extends x{constructor(){super(...arguments),this.keys=[["<Home>"],["<C-b>"]]}async run(e,t){await t.home()}};P=i([a.RegisterAction],P);let _=class extends x{constructor(){super(...arguments),this.keys=[["<End>"],["<C-e>"]]}async run(e,t){await t.end()}};_=i([a.RegisterAction],_);let E=class extends x{constructor(){super(...arguments),this.keys=[["<C-w>"],["<C-BS>"]]}async run(e,t){await t.deleteWord()}};E=i([a.RegisterAction],E);let A=class extends x{constructor(){super(...arguments),this.keys=["<C-u>"]}async run(e,t){await t.deleteToBeginning()}};A=i([a.RegisterAction],A);let T=class extends x{constructor(){super(...arguments),this.keys=["<C-left>"]}async run(e,t){await t.wordLeft()}};T=i([a.RegisterAction],T);let L=class extends x{constructor(){super(...arguments),this.keys=["<C-right>"]}async run(e,t){await t.wordRight()}};L=i([a.RegisterAction],L);let $=class extends x{constructor(){super(...arguments),this.keys=[["<up>"],["<C-p>"]]}async run(e,t){await t.historyBack()}};$=i([a.RegisterAction],$);let B=class extends x{constructor(){super(...arguments),this.keys=[["<down>"],["<C-n>"]]}async run(e,t){await t.historyForward()}};B=i([a.RegisterAction],B);let I=class extends x{constructor(){super(...arguments),this.keys=["<C-r>","<character>"],this.isCompleteAction=!1}async run(e,t){if(!d.Register.isValidRegister(this.keysPressed[1]))return;e.recordedState.registerName=this.keysPressed[1];const r=await d.Register.get(e.recordedState.registerName,this.multicursorIndex);if(void 0===r)return void m.StatusBar.displayError(e,f.VimError.fromCode(f.ErrorCode.NothingInRegister,e.recordedState.registerName));let n;if(r.text instanceof Array)n=r.text.join("\n");else if(r.text instanceof l.RecordedState){let e=[];for(const t of r.text.actionsRun)e=e.concat(t.keysPressed);n=e.join("\n")}else n=r.text;r.registerMode===d.RegisterMode.LineWise&&(n+="\n"),t.text+=n,t.cursorIndex+=n.length}};I=i([a.RegisterAction],I);let N=class extends x{constructor(){super(...arguments),this.keys=["<C-r>","<C-w>"]}async run(e,t){const r=h.TextEditor.getWord(e.document,e.cursorStopPosition.getLeftIfEOL());void 0!==r&&(t.text+=r,t.cursorIndex+=r.length)}};N=i([a.RegisterAction],N);let O=class extends x{constructor(){super(...arguments),this.keys=[["<left>"],["<right>"]]}getTrimmedStatusBarText(){return m.StatusBar.getText().replace(/^(?:\/|\:)(.*)(?:\|)(.*)/,"$1$2").replace(/(.*) $/,"$1")}async run(e,t){const r=this.keysPressed[0],n=this.getTrimmedStatusBarText();"<right>"===r?t.cursorIndex=Math.min(t.cursorIndex+1,n.length):"<left>"===r&&(t.cursorIndex=Math.max(t.cursorIndex-1,0))}};O=i([a.RegisterAction],O);let V=class extends x{constructor(){super(...arguments),this.keys=[["<C-v>"],["<D-v>"]]}async run(e,t){const r=await g.Clipboard.Paste();t.text=t.text.substring(0,t.cursorIndex).concat(r).concat(t.text.slice(t.cursorIndex)),t.cursorIndex+=r.length}};V=i([a.RegisterAction],V);let D=class extends x{constructor(){super(...arguments),this.modes=[c.Mode.SearchInProgressMode],this.keys=["<C-l>"]}async run(e,t){if(t instanceof u.SearchCommandLine){const r=t.getCurrentMatchRange(e);if(r){const n=e.document.lineAt(r.range.end).text;r.range.end.character<n.length&&(t.getSearchState().searchString+=n[r.range.end.character],t.cursorIndex++)}}}};D=i([a.RegisterAction],D);let F=class extends x{constructor(){super(...arguments),this.modes=[c.Mode.SearchInProgressMode],this.keys=[["<C-g>"],["<C-t>"]]}async run(e,t){const r=this.keysPressed[0],n="<C-g>"===r?w.SearchDirection.Forward:"<C-t>"===r?w.SearchDirection.Backward:void 0;t instanceof u.SearchCommandLine&&void 0!==n&&t.advanceCurrentMatch(e,n)}};F=i([a.RegisterAction],F);let j=class extends x{constructor(){super(...arguments),this.keys=[["<character>"]]}async run(e,t){t.typeCharacter(this.keysPressed[0])}};j=i([a.RegisterAction],j)},"./src/actions/commands/digraphs.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDigraphs=void 0,t.DefaultDigraphs={SH:["^A",1],SX:["^B",2],EX:["^C",3],ET:["^D",4],EQ:["^E",5],AK:["^F",6],BL:["^G",7],BS:["^H",8],HT:["^I",9],LF:["^@",10],NU:["^@",10],VT:["^K",11],FF:["^L",12],CR:["^M",13],SO:["^N",14],SI:["^O",15],DL:["^P",16],D1:["^Q",17],D2:["^R",18],D3:["^S",19],D4:["^T",20],NK:["^U",21],SY:["^V",22],EB:["^W",23],CN:["^X",24],EM:["^Y",25],SB:["^Z",26],EC:["^[",27],FS:["^\\",28],GS:["^]",29],RS:["^^",30],US:["^_",31],SP:[" ",32],Nb:["#",35],DO:["$",36],At:["@",64],"<(":["[",91],"//":["\\",92],")>":["]",93],"'>":["^",94],"'!":["`",96],"(!":["{",123],"!!":["|",124],"!)":["}",125],"'?":["~",126],DT:["^?",127],PA:["<80>",128],HO:["<81>",129],BH:["<82>",130],NH:["<83>",131],IN:["<84>",132],NL:["<85>",133],SA:["<86>",134],ES:["<87>",135],HS:["<88>",136],HJ:["<89>",137],VS:["<8a>",138],PD:["<8b>",139],PU:["<8c>",140],RI:["<8d>",141],S2:["<8e>",142],S3:["<8f>",143],DC:["<90>",144],P1:["<91>",145],P2:["<92>",146],TS:["<93>",147],CC:["<94>",148],MW:["<95>",149],SG:["<96>",150],EG:["<97>",151],SS:["<98>",152],GC:["<99>",153],SC:["<9a>",154],CI:["<9b>",155],ST:["<9c>",156],OC:["<9d>",157],PM:["<9e>",158],AC:["<9f>",159],NS:[" ",160],"~!":["¡",161],"!I":["¡",161],Ct:["¢",162],"c|":["¢",162],Pd:["£",163],$$:["£",163],Cu:["¤",164],ox:["¤",164],Ye:["¥",165],"Y-":["¥",165],BB:["¦",166],"||":["¦",166],SE:["§",167],"':":["¨",168],Co:["©",169],cO:["©",169],"-a":["ª",170],"<<":["«",171],NO:["¬",172],"-,":["¬",172],"--":["",173],Rg:["®",174],"'m":["¯",175],"-=":["¯",175],DG:["°",176],"~o":["°",176],"+-":["±",177],"2S":["²",178],22:["²",178],"3S":["³",179],33:["³",179],"''":["´",180],My:["µ",181],PI:["¶",182],pp:["¶",182],".M":["·",183],"~.":["·",183],"',":["¸",184],"1S":["¹",185],11:["¹",185],"-o":["º",186],">>":["»",187],14:["¼",188],12:["½",189],34:["¾",190],"?I":["¿",191],"~?":["¿",191],"A!":["À",192],"A`":["À",192],"A'":["Á",193],"A>":["Â",194],"A^":["Â",194],"A?":["Ã",195],"A~":["Ã",195],"A:":["Ä",196],'A"':["Ä",196],AA:["Å",197],"A@":["Å",197],AE:["Æ",198],"C,":["Ç",199],"E!":["È",200],"E`":["È",200],"E'":["É",201],"E>":["Ê",202],"E^":["Ê",202],"E:":["Ë",203],'E"':["Ë",203],"I!":["Ì",204],"I`":["Ì",204],"I'":["Í",205],"I>":["Î",206],"I^":["Î",206],"I:":["Ï",207],'I"':["Ï",207],"D-":["Ð",208],"N?":["Ñ",209],"N~":["Ñ",209],"O!":["Ò",210],"O`":["Ò",210],"O'":["Ó",211],"O>":["Ô",212],"O^":["Ô",212],"O?":["Õ",213],"O~":["Õ",213],"O:":["Ö",214],"*X":["×",215],"/\\":["×",215],"O/":["Ø",216],"U!":["Ù",217],"U`":["Ù",217],"U'":["Ú",218],"U>":["Û",219],"U^":["Û",219],"U:":["Ü",220],"Y'":["Ý",221],TH:["Þ",222],Ip:["Þ",222],ss:["ß",223],"a!":["à",224],"a`":["à",224],"a'":["á",225],"a>":["â",226],"a^":["â",226],"a?":["ã",227],"a~":["ã",227],"a:":["ä",228],'a"':["ä",228],aa:["å",229],"a@":["å",229],ae:["æ",230],"c,":["ç",231],"e!":["è",232],"e`":["è",232],"e'":["é",233],"e>":["ê",234],"e^":["ê",234],"e:":["ë",235],'e"':["ë",235],"i!":["ì",236],"i`":["ì",236],"i'":["í",237],"i>":["î",238],"i^":["î",238],"i:":["ï",239],"d-":["ð",240],"n?":["ñ",241],"n~":["ñ",241],"o!":["ò",242],"o`":["ò",242],"o'":["ó",243],"o>":["ô",244],"o^":["ô",244],"o?":["õ",245],"o~":["õ",245],"o:":["ö",246],"-:":["÷",247],"o/":["ø",248],"u!":["ù",249],"u`":["ù",249],"u'":["ú",250],"u>":["û",251],"u^":["û",251],"u:":["ü",252],"y'":["ý",253],th:["þ",254],"y:":["ÿ",255],'y"':["ÿ",255],"A-":["Ā",256],"a-":["ā",257],"A(":["Ă",258],"a(":["ă",259],"A;":["Ą",260],"a;":["ą",261],"C'":["Ć",262],"c'":["ć",263],"C>":["Ĉ",264],"c>":["ĉ",265],"C.":["Ċ",266],"c.":["ċ",267],"C<":["Č",268],"c<":["č",269],"D<":["Ď",270],"d<":["ď",271],"D/":["Đ",272],"d/":["đ",273],"E-":["Ē",274],"e-":["ē",275],"E(":["Ĕ",276],"e(":["ĕ",277],"E.":["Ė",278],"e.":["ė",279],"E;":["Ę",280],"e;":["ę",281],"E<":["Ě",282],"e<":["ě",283],"G>":["Ĝ",284],"g>":["ĝ",285],"G(":["Ğ",286],"g(":["ğ",287],"G.":["Ġ",288],"g.":["ġ",289],"G,":["Ģ",290],"g,":["ģ",291],"H>":["Ĥ",292],"h>":["ĥ",293],"H/":["Ħ",294],"h/":["ħ",295],"I?":["Ĩ",296],"i?":["ĩ",297],"I-":["Ī",298],"i-":["ī",299],"I(":["Ĭ",300],"i(":["ĭ",301],"I;":["Į",302],"i;":["į",303],"I.":["İ",304],"i.":["ı",305],IJ:["IJ",306],ij:["ij",307],"J>":["Ĵ",308],"j>":["ĵ",309],"K,":["Ķ",310],"k,":["ķ",311],kk:["ĸ",312],"L'":["Ĺ",313],"l'":["ĺ",314],"L,":["Ļ",315],"l,":["ļ",316],"L<":["Ľ",317],"l<":["ľ",318],"L.":["Ŀ",319],"l.":["ŀ",320],"L/":["Ł",321],"l/":["ł",322],"N'":["Ń",323],"n'":["ń",324],"N,":["Ņ",325],"n,":["ņ",326],"N<":["Ň",327],"n<":["ň",328],"'n":["ʼn",329],NG:["Ŋ",330],ng:["ŋ",331],"O-":["Ō",332],"o-":["ō",333],"O(":["Ŏ",334],"o(":["ŏ",335],'O"':["Ő",336],'o"':["ő",337],OE:["Œ",338],oe:["œ",339],"R'":["Ŕ",340],"r'":["ŕ",341],"R,":["Ŗ",342],"r,":["ŗ",343],"R<":["Ř",344],"r<":["ř",345],"S'":["Ś",346],"s'":["ś",347],"S>":["Ŝ",348],"s>":["ŝ",349],"S,":["Ş",350],"s,":["ş",351],"S<":["Š",352],"s<":["š",353],"T,":["Ţ",354],"t,":["ţ",355],"T<":["Ť",356],"t<":["ť",357],"T/":["Ŧ",358],"t/":["ŧ",359],"U?":["Ũ",360],"u?":["ũ",361],"U-":["Ū",362],"u-":["ū",363],"U(":["Ŭ",364],"u(":["ŭ",365],U0:["Ů",366],u0:["ů",367],'U"':["Ű",368],'u"':["ű",369],"U;":["Ų",370],"u;":["ų",371],"W>":["Ŵ",372],"w>":["ŵ",373],"Y>":["Ŷ",374],"y>":["ŷ",375],"Y:":["Ÿ",376],"Z'":["Ź",377],"z'":["ź",378],"Z.":["Ż",379],"z.":["ż",380],"Z<":["Ž",381],"z<":["ž",382],fs:["ſ",383],O9:["Ơ",416],o9:["ơ",417],OI:["Ƣ",418],oi:["ƣ",419],yr:["Ʀ",422],U9:["Ư",431],u9:["ư",432],"Z/":["Ƶ",437],"z/":["ƶ",438],ED:["Ʒ",439],"A<":["Ǎ",461],"a<":["ǎ",462],"I<":["Ǐ",463],"i<":["ǐ",464],"O<":["Ǒ",465],"o<":["ǒ",466],"U<":["Ǔ",467],"u<":["ǔ",468],A1:["Ǟ",478],a1:["ǟ",479],A7:["Ǡ",480],a7:["ǡ",481],A3:["Ǣ",482],a3:["ǣ",483],"G/":["Ǥ",484],"g/":["ǥ",485],"G<":["Ǧ",486],"g<":["ǧ",487],"K<":["Ǩ",488],"k<":["ǩ",489],"O;":["Ǫ",490],"o;":["ǫ",491],O1:["Ǭ",492],o1:["ǭ",493],EZ:["Ǯ",494],ez:["ǯ",495],"j<":["ǰ",496],"G'":["Ǵ",500],"g'":["ǵ",501],";S":["ʿ",703],"'<":["ˇ",711],"'(":["˘",728],"'.":["˙",729],"'0":["˚",730],"';":["˛",731],"'\"":["˝",733],"A%":["Ά",902],"E%":["Έ",904],"Y%":["Ή",905],"I%":["Ί",906],"O%":["Ό",908],"U%":["Ύ",910],"W%":["Ώ",911],i3:["ΐ",912],"A*":["Α",913],"B*":["Β",914],"G*":["Γ",915],"D*":["Δ",916],"E*":["Ε",917],"Z*":["Ζ",918],"Y*":["Η",919],"H*":["Θ",920],"I*":["Ι",921],"K*":["Κ",922],"L*":["Λ",923],"M*":["Μ",924],"N*":["Ν",925],"C*":["Ξ",926],"O*":["Ο",927],"P*":["Π",928],"R*":["Ρ",929],"S*":["Σ",931],"T*":["Τ",932],"U*":["Υ",933],"F*":["Φ",934],"X*":["Χ",935],"Q*":["Ψ",936],"W*":["Ω",937],"J*":["Ϊ",938],"V*":["Ϋ",939],"a%":["ά",940],"e%":["έ",941],"y%":["ή",942],"i%":["ί",943],u3:["ΰ",944],"a*":["α",945],"b*":["β",946],"g*":["γ",947],"d*":["δ",948],"e*":["ε",949],"z*":["ζ",950],"y*":["η",951],"h*":["θ",952],"i*":["ι",953],"k*":["κ",954],"l*":["λ",955],"m*":["μ",956],"n*":["ν",957],"c*":["ξ",958],"o*":["ο",959],"p*":["π",960],"r*":["ρ",961],"*s":["ς",962],"s*":["σ",963],"t*":["τ",964],"u*":["υ",965],"f*":["φ",966],"x*":["χ",967],"q*":["ψ",968],"w*":["ω",969],"j*":["ϊ",970],"v*":["ϋ",971],"o%":["ό",972],"u%":["ύ",973],"w%":["ώ",974],"'G":["Ϙ",984],",G":["ϙ",985],T3:["Ϛ",986],t3:["ϛ",987],M3:["Ϝ",988],m3:["ϝ",989],K3:["Ϟ",990],k3:["ϟ",991],P3:["Ϡ",992],p3:["ϡ",993],"'%":["ϴ",1012],j3:["ϵ",1013],IO:["Ё",1025],"D%":["Ђ",1026],"G%":["Ѓ",1027],IE:["Є",1028],DS:["Ѕ",1029],II:["І",1030],YI:["Ї",1031],"J%":["Ј",1032],LJ:["Љ",1033],NJ:["Њ",1034],Ts:["Ћ",1035],KJ:["Ќ",1036],"V%":["Ў",1038],DZ:["Џ",1039],"A=":["А",1040],"B=":["Б",1041],"V=":["В",1042],"G=":["Г",1043],"D=":["Д",1044],"E=":["Е",1045],"Z%":["Ж",1046],"Z=":["З",1047],"I=":["И",1048],"J=":["Й",1049],"K=":["К",1050],"L=":["Л",1051],"M=":["М",1052],"N=":["Н",1053],"O=":["О",1054],"P=":["П",1055],"R=":["Р",1056],"S=":["С",1057],"T=":["Т",1058],"U=":["У",1059],"F=":["Ф",1060],"H=":["Х",1061],"C=":["Ц",1062],"C%":["Ч",1063],"S%":["Ш",1064],Sc:["Щ",1065],'="':["Ъ",1066],"Y=":["Ы",1067],'%"':["Ь",1068],JE:["Э",1069],JU:["Ю",1070],JA:["Я",1071],"a=":["а",1072],"b=":["б",1073],"v=":["в",1074],"g=":["г",1075],"d=":["д",1076],"e=":["е",1077],"z%":["ж",1078],"z=":["з",1079],"i=":["и",1080],"j=":["й",1081],"k=":["к",1082],"l=":["л",1083],"m=":["м",1084],"n=":["н",1085],"o=":["о",1086],"p=":["п",1087],"r=":["р",1088],"s=":["с",1089],"t=":["т",1090],"u=":["у",1091],"f=":["ф",1092],"h=":["х",1093],"c=":["ц",1094],"c%":["ч",1095],"s%":["ш",1096],sc:["щ",1097],"='":["ъ",1098],"y=":["ы",1099],"%'":["ь",1100],je:["э",1101],ju:["ю",1102],ja:["я",1103],io:["ё",1105],"d%":["ђ",1106],"g%":["ѓ",1107],ie:["є",1108],ds:["ѕ",1109],ii:["і",1110],yi:["ї",1111],"j%":["ј",1112],lj:["љ",1113],nj:["њ",1114],ts:["ћ",1115],kj:["ќ",1116],"v%":["ў",1118],dz:["џ",1119],Y3:["Ѣ",1122],y3:["ѣ",1123],O3:["Ѫ",1130],o3:["ѫ",1131],F3:["Ѳ",1138],f3:["ѳ",1139],V3:["Ѵ",1140],v3:["ѵ",1141],C3:["Ҁ",1152],c3:["ҁ",1153],G3:["Ґ",1168],g3:["ґ",1169],"A+":["א",1488],"B+":["ב",1489],"G+":["ג",1490],"D+":["ד",1491],"H+":["ה",1492],"W+":["ו",1493],"Z+":["ז",1494],"X+":["ח",1495],Tj:["ט",1496],"J+":["י",1497],"K%":["ך",1498],"K+":["כ",1499],"L+":["ל",1500],"M%":["ם",1501],"M+":["מ",1502],"N%":["ן",1503],"N+":["נ",1504],"S+":["ס",1505],"E+":["ע",1506],"P%":["ף",1507],"P+":["פ",1508],Zj:["ץ",1509],ZJ:["צ",1510],"Q+":["ק",1511],"R+":["ר",1512],Sh:["ש",1513],"T+":["ת",1514],",+":["،",1548],";+":["؛",1563],"?+":["؟",1567],"H'":["ء",1569],aM:["آ",1570],aH:["أ",1571],wH:["ؤ",1572],ah:["إ",1573],yH:["ئ",1574],"a+":["ا",1575],"b+":["ب",1576],tm:["ة",1577],"t+":["ت",1578],tk:["ث",1579],"g+":["ج",1580],hk:["ح",1581],"x+":["خ",1582],"d+":["د",1583],dk:["ذ",1584],"r+":["ر",1585],"z+":["ز",1586],"s+":["س",1587],sn:["ش",1588],"c+":["ص",1589],dd:["ض",1590],tj:["ط",1591],zH:["ظ",1592],"e+":["ع",1593],"i+":["غ",1594],"++":["ـ",1600],"f+":["ف",1601],"q+":["ق",1602],"k+":["ك",1603],"l+":["ل",1604],"m+":["م",1605],"n+":["ن",1606],"h+":["ه",1607],"w+":["و",1608],"j+":["ى",1609],"y+":["ي",1610],":+":["ً",1611],'"+':["ٌ",1612],"=+":["ٍ",1613],"/+":["َ",1614],"'+":["ُ",1615],"1+":["ِ",1616],"3+":["ّ",1617],"0+":["ْ",1618],aS:["ٰ",1648],"p+":["پ",1662],"v+":["ڤ",1700],gf:["گ",1711],"0a":["۰",1776],"1a":["۱",1777],"2a":["۲",1778],"3a":["۳",1779],"4a":["۴",1780],"5a":["۵",1781],"6a":["۶",1782],"7a":["۷",1783],"8a":["۸",1784],"9a":["۹",1785],"B.":["Ḃ",7682],"b.":["ḃ",7683],B_:["Ḇ",7686],b_:["ḇ",7687],"D.":["Ḋ",7690],"d.":["ḋ",7691],D_:["Ḏ",7694],d_:["ḏ",7695],"D,":["Ḑ",7696],"d,":["ḑ",7697],"F.":["Ḟ",7710],"f.":["ḟ",7711],"G-":["Ḡ",7712],"g-":["ḡ",7713],"H.":["Ḣ",7714],"h.":["ḣ",7715],"H:":["Ḧ",7718],"h:":["ḧ",7719],"H,":["Ḩ",7720],"h,":["ḩ",7721],"K'":["Ḱ",7728],"k'":["ḱ",7729],K_:["Ḵ",7732],k_:["ḵ",7733],L_:["Ḻ",7738],l_:["ḻ",7739],"M'":["Ḿ",7742],"m'":["ḿ",7743],"M.":["Ṁ",7744],"m.":["ṁ",7745],"N.":["Ṅ",7748],"n.":["ṅ",7749],N_:["Ṉ",7752],n_:["ṉ",7753],"P'":["Ṕ",7764],"p'":["ṕ",7765],"P.":["Ṗ",7766],"p.":["ṗ",7767],"R.":["Ṙ",7768],"r.":["ṙ",7769],R_:["Ṟ",7774],r_:["ṟ",7775],"S.":["Ṡ",7776],"s.":["ṡ",7777],"T.":["Ṫ",7786],"t.":["ṫ",7787],T_:["Ṯ",7790],t_:["ṯ",7791],"V?":["Ṽ",7804],"v?":["ṽ",7805],"W!":["Ẁ",7808],"w!":["ẁ",7809],"W'":["Ẃ",7810],"w'":["ẃ",7811],"W:":["Ẅ",7812],"w:":["ẅ",7813],"W.":["Ẇ",7814],"w.":["ẇ",7815],"X.":["Ẋ",7818],"x.":["ẋ",7819],"X:":["Ẍ",7820],"x:":["ẍ",7821],"Y.":["Ẏ",7822],"y.":["ẏ",7823],"Z>":["Ẑ",7824],"z>":["ẑ",7825],Z_:["Ẕ",7828],z_:["ẕ",7829],h_:["ẖ",7830],"t:":["ẗ",7831],w0:["ẘ",7832],y0:["ẙ",7833],A2:["Ả",7842],a2:["ả",7843],E2:["Ẻ",7866],e2:["ẻ",7867],"E?":["Ẽ",7868],"e?":["ẽ",7869],I2:["Ỉ",7880],i2:["ỉ",7881],O2:["Ỏ",7886],o2:["ỏ",7887],U2:["Ủ",7910],u2:["ủ",7911],"Y!":["Ỳ",7922],"y!":["ỳ",7923],Y2:["Ỷ",7926],y2:["ỷ",7927],"Y?":["Ỹ",7928],"y?":["ỹ",7929],";'":["ἀ",7936],",'":["ἁ",7937],";!":["ἂ",7938],",!":["ἃ",7939],"?;":["ἄ",7940],"?,":["ἅ",7941],"!:":["ἆ",7942],"?:":["ἇ",7943],"1N":[" ",8194],"1M":[" ",8195],"3M":[" ",8196],"4M":[" ",8197],"6M":[" ",8198],"1T":[" ",8201],"1H":[" ",8202],"-1":["‐",8208],"-N":["–",8211],"-M":["—",8212],"-3":["―",8213],"!2":["‖",8214],"=2":["‗",8215],"'6":["‘",8216],"'9":["’",8217],".9":["‚",8218],"9'":["‛",8219],'"6':["“",8220],'"9':["”",8221],":9":["„",8222],'9"':["‟",8223],"/-":["†",8224],"/=":["‡",8225],"..":["‥",8229],",.":["…",8230],"%0":["‰",8240],"1'":["′",8242],"2'":["″",8243],"3'":["‴",8244],'1"':["‵",8245],'2"':["‶",8246],'3"':["‷",8247],Ca:["‸",8248],"<1":["‹",8249],">1":["›",8250],":X":["※",8251],"'-":["‾",8254],"/f":["⁄",8260],"0S":["⁰",8304],"4S":["⁴",8308],"5S":["⁵",8309],"6S":["⁶",8310],"7S":["⁷",8311],"8S":["⁸",8312],"9S":["⁹",8313],"+S":["⁺",8314],"-S":["⁻",8315],"=S":["⁼",8316],"(S":["⁽",8317],")S":["⁾",8318],nS:["ⁿ",8319],"0s":["₀",8320],"1s":["₁",8321],"2s":["₂",8322],"3s":["₃",8323],"4s":["₄",8324],"5s":["₅",8325],"6s":["₆",8326],"7s":["₇",8327],"8s":["₈",8328],"9s":["₉",8329],"+s":["₊",8330],"-s":["₋",8331],"=s":["₌",8332],"(s":["₍",8333],")s":["₎",8334],Li:["₤",8356],Pt:["₧",8359],"W=":["₩",8361],"=e":["€",8364],Eu:["€",8364],"=R":["₽",8381],"=P":["₽",8381],oC:["℃",8451],co:["℅",8453],oF:["℉",8457],N0:["№",8470],PO:["℗",8471],Rx:["℞",8478],SM:["℠",8480],TM:["™",8482],Om:["Ω",8486],AO:["Å",8491],13:["⅓",8531],23:["⅔",8532],15:["⅕",8533],25:["⅖",8534],35:["⅗",8535],45:["⅘",8536],16:["⅙",8537],56:["⅚",8538],18:["⅛",8539],38:["⅜",8540],58:["⅝",8541],78:["⅞",8542],"1R":["Ⅰ",8544],"2R":["Ⅱ",8545],"3R":["Ⅲ",8546],"4R":["Ⅳ",8547],"5R":["Ⅴ",8548],"6R":["Ⅵ",8549],"7R":["Ⅶ",8550],"8R":["Ⅷ",8551],"9R":["Ⅸ",8552],aR:["Ⅹ",8553],bR:["Ⅺ",8554],cR:["Ⅻ",8555],"1r":["ⅰ",8560],"2r":["ⅱ",8561],"3r":["ⅲ",8562],"4r":["ⅳ",8563],"5r":["ⅴ",8564],"6r":["ⅵ",8565],"7r":["ⅶ",8566],"8r":["ⅷ",8567],"9r":["ⅸ",8568],ar:["ⅹ",8569],br:["ⅺ",8570],cr:["ⅻ",8571],"<-":["←",8592],"-!":["↑",8593],"->":["→",8594],"-v":["↓",8595],"<>":["↔",8596],UD:["↕",8597],"<=":["⇐",8656],"=>":["⇒",8658],"==":["⇔",8660],FA:["∀",8704],dP:["∂",8706],TE:["∃",8707],"/0":["∅",8709],DE:["∆",8710],NB:["∇",8711],"(-":["∈",8712],"-)":["∋",8715],"*P":["∏",8719],"+Z":["∑",8721],"-2":["−",8722],"-+":["∓",8723],"*-":["∗",8727],Ob:["∘",8728],Sb:["∙",8729],RT:["√",8730],"0(":["∝",8733],"00":["∞",8734],"-L":["∟",8735],"-V":["∠",8736],PP:["∥",8741],AN:["∧",8743],OR:["∨",8744],"(U":["∩",8745],")U":["∪",8746],In:["∫",8747],DI:["∬",8748],Io:["∮",8750],".:":["∴",8756],":.":["∵",8757],":R":["∶",8758],"::":["∷",8759],"?1":["∼",8764],CG:["∾",8766],"?-":["≃",8771],"?=":["≅",8773],"?2":["≈",8776],"=?":["≌",8780],HI:["≓",8787],"!=":["≠",8800],"=3":["≡",8801],"=<":["≤",8804],">=":["≥",8805],"<*":["≪",8810],"*>":["≫",8811],"!<":["≮",8814],"!>":["≯",8815],"(C":["⊂",8834],")C":["⊃",8835],"(_":["⊆",8838],")_":["⊇",8839],"0.":["⊙",8857],"02":["⊚",8858],"-T":["⊥",8869],".P":["⋅",8901],":3":["⋮",8942],".3":["⋯",8943],Eh:["⌂",8962],"<7":["⌈",8968],">7":["⌉",8969],"7<":["⌊",8970],"7>":["⌋",8971],NI:["⌐",8976],"(A":["⌒",8978],TR:["⌕",8981],Iu:["⌠",8992],Il:["⌡",8993],"</":["〈",9001],"/>":["〉",9002],Vs:["␣",9251],"1h":["⑀",9280],"3h":["⑁",9281],"2h":["⑂",9282],"4h":["⑃",9283],"1j":["⑆",9286],"2j":["⑇",9287],"3j":["⑈",9288],"4j":["⑉",9289],"1.":["⒈",9352],"2.":["⒉",9353],"3.":["⒊",9354],"4.":["⒋",9355],"5.":["⒌",9356],"6.":["⒍",9357],"7.":["⒎",9358],"8.":["⒏",9359],"9.":["⒐",9360],hh:["─",9472],HH:["━",9473],vv:["│",9474],VV:["┃",9475],"3-":["┄",9476],"3_":["┅",9477],"3!":["┆",9478],"3/":["┇",9479],"4-":["┈",9480],"4_":["┉",9481],"4!":["┊",9482],"4/":["┋",9483],dr:["┌",9484],dR:["┍",9485],Dr:["┎",9486],DR:["┏",9487],dl:["┐",9488],dL:["┑",9489],Dl:["┒",9490],LD:["┓",9491],ur:["└",9492],uR:["┕",9493],Ur:["┖",9494],UR:["┗",9495],ul:["┘",9496],uL:["┙",9497],Ul:["┚",9498],UL:["┛",9499],vr:["├",9500],vR:["┝",9501],Vr:["┠",9504],VR:["┣",9507],vl:["┤",9508],vL:["┥",9509],Vl:["┨",9512],VL:["┫",9515],dh:["┬",9516],dH:["┯",9519],Dh:["┰",9520],DH:["┳",9523],uh:["┴",9524],uH:["┷",9527],Uh:["┸",9528],UH:["┻",9531],vh:["┼",9532],vH:["┿",9535],Vh:["╂",9538],VH:["╋",9547],FD:["╱",9585],BD:["╲",9586],TB:["▀",9600],LB:["▄",9604],FB:["█",9608],lB:["▌",9612],RB:["▐",9616],".S":["░",9617],":S":["▒",9618],"?S":["▓",9619],fS:["■",9632],OS:["□",9633],RO:["▢",9634],Rr:["▣",9635],RF:["▤",9636],RY:["▥",9637],RH:["▦",9638],RZ:["▧",9639],RK:["▨",9640],RX:["▩",9641],sB:["▪",9642],SR:["▬",9644],Or:["▭",9645],UT:["▲",9650],uT:["△",9651],PR:["▶",9654],Tr:["▷",9655],Dt:["▼",9660],dT:["▽",9661],PL:["◀",9664],Tl:["◁",9665],Db:["◆",9670],Dw:["◇",9671],LZ:["◊",9674],"0m":["○",9675],"0o":["◎",9678],"0M":["●",9679],"0L":["◐",9680],"0R":["◑",9681],Sn:["◘",9688],Ic:["◙",9689],Fd:["◢",9698],Bd:["◣",9699],"*2":["★",9733],"*1":["☆",9734],"<H":["☜",9756],">H":["☞",9758],"0u":["☺",9786],"0U":["☻",9787],SU:["☼",9788],Fm:["♀",9792],Ml:["♂",9794],cS:["♠",9824],cH:["♡",9825],cD:["♢",9826],cC:["♣",9827],Md:["♩",9833],M8:["♪",9834],M2:["♫",9835],Mb:["♭",9837],Mx:["♮",9838],MX:["♯",9839],OK:["✓",10003],XX:["✗",10007],"-X":["✠",10016],IS:[" ",12288],",_":["、",12289],"._":["。",12290],'+"':["〃",12291],"+_":["〄",12292],"*_":["々",12293],";_":["〆",12294],"0_":["〇",12295],"<+":["《",12298],">+":["》",12299],"<'":["「",12300],">'":["」",12301],'<"':["『",12302],'>"':["』",12303],'("':["【",12304],')"':["】",12305],"=T":["〒",12306],"=_":["〓",12307],"('":["〔",12308],")'":["〕",12309],"(I":["〖",12310],")I":["〗",12311],"-?":["〜",12316],A5:["ぁ",12353],a5:["あ",12354],I5:["ぃ",12355],i5:["い",12356],U5:["ぅ",12357],u5:["う",12358],E5:["ぇ",12359],e5:["え",12360],O5:["ぉ",12361],o5:["お",12362],ka:["か",12363],ga:["が",12364],ki:["き",12365],gi:["ぎ",12366],ku:["く",12367],gu:["ぐ",12368],ke:["け",12369],ge:["げ",12370],ko:["こ",12371],go:["ご",12372],sa:["さ",12373],za:["ざ",12374],si:["し",12375],zi:["じ",12376],su:["す",12377],zu:["ず",12378],se:["せ",12379],ze:["ぜ",12380],so:["そ",12381],zo:["ぞ",12382],ta:["た",12383],da:["だ",12384],ti:["ち",12385],di:["ぢ",12386],tU:["っ",12387],tu:["つ",12388],du:["づ",12389],te:["て",12390],de:["で",12391],to:["と",12392],do:["ど",12393],na:["な",12394],ni:["に",12395],nu:["ぬ",12396],ne:["ね",12397],no:["の",12398],ha:["は",12399],ba:["ば",12400],pa:["ぱ",12401],hi:["ひ",12402],bi:["び",12403],pi:["ぴ",12404],hu:["ふ",12405],bu:["ぶ",12406],pu:["ぷ",12407],he:["へ",12408],be:["べ",12409],pe:["ぺ",12410],ho:["ほ",12411],bo:["ぼ",12412],po:["ぽ",12413],ma:["ま",12414],mi:["み",12415],mu:["む",12416],me:["め",12417],mo:["も",12418],yA:["ゃ",12419],ya:["や",12420],yU:["ゅ",12421],yu:["ゆ",12422],yO:["ょ",12423],yo:["よ",12424],ra:["ら",12425],ri:["り",12426],ru:["る",12427],re:["れ",12428],ro:["ろ",12429],wA:["ゎ",12430],wa:["わ",12431],wi:["ゐ",12432],we:["ゑ",12433],wo:["を",12434],n5:["ん",12435],vu:["ゔ",12436],'"5':["゛",12443],"05":["゜",12444],"*5":["ゝ",12445],"+5":["ゞ",12446],a6:["ァ",12449],A6:["ア",12450],i6:["ィ",12451],I6:["イ",12452],u6:["ゥ",12453],U6:["ウ",12454],e6:["ェ",12455],E6:["エ",12456],o6:["ォ",12457],O6:["オ",12458],Ka:["カ",12459],Ga:["ガ",12460],Ki:["キ",12461],Gi:["ギ",12462],Ku:["ク",12463],Gu:["グ",12464],Ke:["ケ",12465],Ge:["ゲ",12466],Ko:["コ",12467],Go:["ゴ",12468],Sa:["サ",12469],Za:["ザ",12470],Si:["シ",12471],Zi:["ジ",12472],Su:["ス",12473],Zu:["ズ",12474],Se:["セ",12475],Ze:["ゼ",12476],So:["ソ",12477],Zo:["ゾ",12478],Ta:["タ",12479],Da:["ダ",12480],Ti:["チ",12481],Di:["ヂ",12482],TU:["ッ",12483],Tu:["ツ",12484],Du:["ヅ",12485],Te:["テ",12486],De:["デ",12487],To:["ト",12488],Do:["ド",12489],Na:["ナ",12490],Ni:["ニ",12491],Nu:["ヌ",12492],Ne:["ネ",12493],No:["ノ",12494],Ha:["ハ",12495],Ba:["バ",12496],Pa:["パ",12497],Hi:["ヒ",12498],Bi:["ビ",12499],Pi:["ピ",12500],Hu:["フ",12501],Bu:["ブ",12502],Pu:["プ",12503],He:["ヘ",12504],Be:["ベ",12505],Pe:["ペ",12506],Ho:["ホ",12507],Bo:["ボ",12508],Po:["ポ",12509],Ma:["マ",12510],Mi:["ミ",12511],Mu:["ム",12512],Me:["メ",12513],Mo:["モ",12514],YA:["ャ",12515],Ya:["ヤ",12516],YU:["ュ",12517],Yu:["ユ",12518],YO:["ョ",12519],Yo:["ヨ",12520],Ra:["ラ",12521],Ri:["リ",12522],Ru:["ル",12523],Re:["レ",12524],Ro:["ロ",12525],WA:["ヮ",12526],Wa:["ワ",12527],Wi:["ヰ",12528],We:["ヱ",12529],Wo:["ヲ",12530],N6:["ン",12531],Vu:["ヴ",12532],KA:["ヵ",12533],KE:["ヶ",12534],Va:["ヷ",12535],Vi:["ヸ",12536],Ve:["ヹ",12537],Vo:["ヺ",12538],".6":["・",12539],"-6":["ー",12540],"*6":["ヽ",12541],"+6":["ヾ",12542],b4:["ㄅ",12549],p4:["ㄆ",12550],m4:["ㄇ",12551],f4:["ㄈ",12552],d4:["ㄉ",12553],t4:["ㄊ",12554],n4:["ㄋ",12555],l4:["ㄌ",12556],g4:["ㄍ",12557],k4:["ㄎ",12558],h4:["ㄏ",12559],j4:["ㄐ",12560],q4:["ㄑ",12561],x4:["ㄒ",12562],zh:["ㄓ",12563],ch:["ㄔ",12564],sh:["ㄕ",12565],r4:["ㄖ",12566],z4:["ㄗ",12567],c4:["ㄘ",12568],s4:["ㄙ",12569],a4:["ㄚ",12570],o4:["ㄛ",12571],e4:["ㄜ",12572],ai:["ㄞ",12574],ei:["ㄟ",12575],au:["ㄠ",12576],ou:["ㄡ",12577],an:["ㄢ",12578],en:["ㄣ",12579],aN:["ㄤ",12580],eN:["ㄥ",12581],er:["ㄦ",12582],i4:["ㄧ",12583],u4:["ㄨ",12584],iu:["ㄩ",12585],v4:["ㄪ",12586],nG:["ㄫ",12587],gn:["ㄬ",12588],"1c":["㈠",12832],"2c":["㈡",12833],"3c":["㈢",12834],"4c":["㈣",12835],"5c":["㈤",12836],"6c":["㈥",12837],"7c":["㈦",12838],"8c":["㈧",12839],"9c":["㈨",12840],ff:["ff",64256],fi:["fi",64257],fl:["fl",64258],ft:["ſt",64261],st:["st",64262],"W`":["Ẁ",7808],"w`":["ẁ",7809],"Y`":["Ỳ",7922],"y`":["ỳ",7923]}},"./src/actions/commands/insert.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.InsertCharBelow=t.InsertCharAbove=t.CommandInsertInInsertMode=t.CommandBackspaceInInsertMode=t.CommandInsertPreviousText=t.CommandEscInsertMode=void 0;const o=r("vscode"),i=r("./src/completion/lineCompletionProvider.ts"),s=r("./src/state/recordedState.ts"),a=r("./src/common/motion/position.ts"),c=r("./src/configuration/configuration.ts"),u=r("./src/mode/mode.ts"),d=r("./src/register/register.ts"),l=r("./src/textEditor.ts"),h=r("./src/actions/base.ts"),m=r("./src/actions/motion.ts"),p=r("./src/actions/commands/actions.ts"),g=r("./src/actions/commands/digraphs.ts"),f=r("./src/statusBar.ts"),v=r("./src/error.ts");let y=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=[["<Esc>"],["<C-c>"],["<C-[>"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){o.commands.executeCommand("closeParameterHints"),t.cursors=t.cursors.map((e=>e.withNewStop(e.stop.getLeft()))),t.returnToInsertAfterCommand&&0!==e.character&&(t.cursors=t.cursors.map((e=>e.withNewStop(e.stop.getRight()))));const r=t.recordedState.actionsRun[t.recordedState.actionsRun.length-2];if("plaintext"!==t.document.languageId&&(r instanceof p.CommandInsertNewLineBefore||r instanceof p.CommandInsertNewLineAbove||r instanceof p.DocumentContentChangeAction&&"\n"===r.keysPressed[r.keysPressed.length-1]))for(const e of t.cursors)/^\s+$/.test(t.document.lineAt(e.stop).text)&&t.recordedState.transformer.delete(new o.Range(e.stop.getLineBegin(),e.stop.getLineEnd()));if(await t.setCurrentMode(u.Mode.Normal),t.recordedState.count>1&&void 0!==t.recordedState.actionsRun.find((e=>e instanceof p.CommandInsertAtCursor||e instanceof p.CommandInsertAfterCursor||e instanceof p.CommandInsertAtLineBegin||e instanceof p.CommandInsertAtLineEnd||e instanceof p.CommandInsertAtFirstCharacter||e instanceof p.CommandInsertAtLastChange))){const e=t.recordedState.actionsRun.slice().reverse().find((e=>e instanceof p.DocumentContentChangeAction));if(e instanceof p.DocumentContentChangeAction)for(let r=0;r<t.recordedState.count-1;r++){const n=r===t.recordedState.count-2?a.PositionDiff.offset({character:-1}):a.PositionDiff.identity();t.recordedState.transformer.addTransformation(e.getTransformation(n))}}t.historyTracker.currentContentChanges.length>0&&(t.historyTracker.lastContentChanges=t.historyTracker.currentContentChanges,t.historyTracker.currentContentChanges=[]),t.isFakeMultiCursor&&(t.cursors=[t.cursors[0]],t.isFakeMultiCursor=!1)}};y=n([h.RegisterAction],y),t.CommandEscInsertMode=y;let w=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-a>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){var r;const n=await d.Register.get(".");if(!(void 0!==n&&n.text instanceof s.RecordedState&&n.text.actionsRun))throw v.VimError.fromCode(v.ErrorCode.NoInsertedTextYet);const o=n.text.clone();o.actionsRun.shift(),o.actionsRun.pop(),(null===(r=o.actionsRun)||void 0===r?void 0:r[0])instanceof m.ArrowsInInsertMode&&o.actionsRun.shift(),t.recordedState.transformer.addTransformation({type:"replayRecordedState",recordedState:o})}};w=n([h.RegisterAction],w),t.CommandInsertPreviousText=w;let x=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-shift+2>"]}async exec(e,t){await(new w).exec(e,t),await t.setCurrentMode(u.Mode.Normal)}};x=n([h.RegisterAction],x);let S=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-t>"]}async exec(e,t){const r=t.document.lineAt(e).text,n=l.TextEditor.getIndentationLevel(r),i=c.configuration.tabstop||Number(t.editor.options.tabSize),s=(Math.floor(n/i)+1)*i;t.recordedState.transformer.replace(new o.Range(e.getLineBegin(),e.with({character:n})),l.TextEditor.setIndentationLevel(r,s).match(/^(\s*)/)[1])}};S=n([h.RegisterAction],S);let C=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-d>"]}async exec(e,t){const r=t.document.lineAt(e).text,n=l.TextEditor.getIndentationLevel(r),i=c.configuration.tabstop||Number(t.editor.options.tabSize),s=(Math.floor(n/i)-1)*i;t.recordedState.transformer.replace(new o.Range(e.getLineBegin(),e.with({character:n})),l.TextEditor.setIndentationLevel(r,s).match(/^(\s*)/)[1])}};C=n([h.RegisterAction],C);let M=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=[["<BS>"],["<C-h>"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){t.recordedState.transformer.addTransformation({type:"deleteLeft"})}};M=n([h.RegisterAction],M),t.CommandBackspaceInInsertMode=M;let b=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<Del>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){t.recordedState.transformer.addTransformation({type:"deleteRight"})}};b=n([h.RegisterAction],b);let k=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<character>"]}async exec(e,t){const r=this.keysPressed[this.keysPressed.length-1];t.recordedState.transformer.addTransformation({type:"insertTextVSCode",text:r,isMultiCursor:t.isMultiCursor})}toString(){return this.keysPressed[this.keysPressed.length-1]}};k=n([h.RegisterAction],k),t.CommandInsertInInsertMode=k;let R=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-k>","<any>","<any>"],this.isCompleteAction=!1}async exec(e,t){const r=this.keysPressed.slice(1,3).join(""),n=r.split("").reverse().join("");let o=(g.DefaultDigraphs[r]||g.DefaultDigraphs[n]||c.configuration.digraphs[r]||c.configuration.digraphs[n])[1];o instanceof Array||(o=[o]);const i=String.fromCharCode(...o);t.recordedState.transformer.insert(e,i)}doesActionApply(e,t){if(!super.doesActionApply(e,t))return!1;const r=t.slice(1,3).join(""),n=r.split("").reverse().join("");return r in c.configuration.digraphs||n in c.configuration.digraphs||r in g.DefaultDigraphs||n in g.DefaultDigraphs}couldActionApply(e,t){if(!super.couldActionApply(e,t))return!1;const r=t.slice(1,t.length).join(""),n=r.split("").reverse().join("");if(r.length>0){const e=e=>{const t=e.substring(0,r.length);return r===t||n===t};return void 0!==(Object.keys(c.configuration.digraphs).find(e)||Object.keys(g.DefaultDigraphs).find(e))}return!0}};R=n([h.RegisterAction],R);let P=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-r>","<character>"],this.isCompleteAction=!1}async exec(e,t){if(!d.Register.isValidRegister(this.keysPressed[1]))return;const r=await d.Register.get(this.keysPressed[1],this.multicursorIndex);if(void 0===r)return void f.StatusBar.displayError(t,v.VimError.fromCode(v.ErrorCode.NothingInRegister,this.keysPressed[1]));if(r.text instanceof s.RecordedState)return void t.recordedState.transformer.addTransformation({type:"macro",register:t.recordedState.registerName,replay:"keystrokes"});let n=r.text;r.registerMode!==d.RegisterMode.LineWise||t.isMultiCursor||(n+="\n"),t.recordedState.transformer.insert(e,n)}};P=n([h.RegisterAction],P);let _=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-o>"]}async exec(e,t){t.returnToInsertAfterCommand=!0,t.actionCount=0,await(new y).exec(e,t)}};_=n([h.RegisterAction],_);let E=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-w>"]}async exec(e,t){if(e.isAtDocumentBegin())return;let r;r=e.isInLeadingWhitespace(t.document)?e.getLineBegin():e.isLineBeginning()?e.getUp().getLineEnd():e.prevWordStart(t.document),t.recordedState.transformer.delete(new o.Range(r,e)),t.cursorStopPosition=r}};E=n([h.RegisterAction],E);let A=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-y>"]}async exec(e,t){if(0===e.line)return;const r=e.getUp();if(r.isLineEnd())return;const n=t.document.getText(new o.Range(r,r.getRight()));t.recordedState.transformer.insert(e,n)}};A=n([h.RegisterAction],A),t.InsertCharAbove=A;let T=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-e>"]}async exec(e,t){if(e.line>=t.document.lineCount-1)return;const r=e.getDown();if(r.isLineEnd())return;const n=t.document.getText(new o.Range(r,r.getRight()));t.recordedState.transformer.insert(e,n)}};T=n([h.RegisterAction],T),t.InsertCharBelow=T;let L=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-u>"]}async exec(e,t){let r;r=0===e.character?e.getLeftThroughLineBreaks(!0):e.isInLeadingWhitespace(t.document)?e.getLineBegin():e.getLineBeginRespectingIndent(t.document),t.recordedState.transformer.delete(new o.Range(r,e)),t.cursorStopPosition=r,t.cursorStartPosition=r}};L=n([h.RegisterAction],L);let $=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=[["<C-n>"],["<C-j>"]]}runsOnceForEveryCursor(){return!1}async exec(e,t){await o.commands.executeCommand("selectNextSuggestion")}};$=n([h.RegisterAction],$);let B=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-p>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){await o.commands.executeCommand("selectPrevSuggestion")}};B=n([h.RegisterAction],B);let I=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-v>"]}async exec(e,t){const r=await d.Register.get("*",this.multicursorIndex),n=(null==r?void 0:r.text)instanceof s.RecordedState||null==r?void 0:r.text;n&&t.recordedState.transformer.insert(t.cursorStopPosition,n)}};I=n([h.RegisterAction],I);let N=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-x>","<C-l>"]}runsOnceForEveryCursor(){return!1}async exec(e,t){await i.lineCompletionProvider.showLineCompletionsQuickPick(e,t)}};N=n([h.RegisterAction],N);let O=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=[["<C-j>"],["<C-m>"]]}async exec(e,t){t.recordedState.transformer.addTransformation({type:"insertText",text:"\n",position:e,diff:a.PositionDiff.offset({character:-1})})}};O=n([h.RegisterAction],O);let V=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<Insert>"]}async exec(e,t){await(new p.CommandReplaceAtCursorFromNormalMode).exec(e,t)}};V=n([h.RegisterAction],V);let D=class extends h.BaseCommand{constructor(){super(...arguments),this.modes=[u.Mode.Insert],this.keys=["<C-g>","u"]}async exec(e,t){t.historyTracker.addChange(!0),t.historyTracker.finishCurrentStep()}};D=n([h.RegisterAction],D)},"./src/actions/commands/put.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.PutBeforeFromCmdLine=t.PutFromCmdLine=void 0;const o=r("vscode"),i=r("vscode"),s=r("./src/common/motion/position.ts"),a=r("./src/configuration/configuration.ts"),c=r("./src/mode/mode.ts"),u=r("./src/register/register.ts"),d=r("./src/state/recordedState.ts"),l=r("./src/textEditor.ts"),h=r("./src/util/statusBarTextUtils.ts"),m=r("./src/actions/base.ts"),p=r("./src/statusBar.ts"),g=r("./src/error.ts");function f(e){var t,r;return null!==(r=null===(t=e.match(/\S/))||void 0===t?void 0:t.index)&&void 0!==r?r:0}class v extends m.BaseCommand{constructor(){super(...arguments),this.modes=[c.Mode.Normal,c.Mode.Visual,c.Mode.VisualLine,c.Mode.VisualBlock],this.createsUndoPoint=!0}async exec(e,t){const r=await u.Register.get(t.recordedState.registerName,this.multicursorIndex);if(void 0===r)return void p.StatusBar.displayError(t,g.VimError.fromCode(g.ErrorCode.NothingInRegister,t.recordedState.registerName));const n=t.recordedState.count||1,o=t.currentMode===c.Mode.CommandlineInProgress?c.Mode.Normal:t.currentMode,i=this.getRegisterMode(r),d=this.getReplaceRange(o,t.cursors[0],i);let l=this.getRegisterText(o,r,n);if(this.shouldAdjustIndent(o,i)){let r;if(o===c.Mode.VisualLine){const[e,n]=(0,s.sorted)(t.cursorStartPosition,t.cursorStopPosition);n.line<t.document.lineCount-1?r=n.line+1:e.line>0&&(r=e.line-1)}else r=e.line;l=this.adjustIndent(void 0!==r?t.document.lineAt(r).text:"",l)}const m=this.getCursorPosition(t.document,o,d,i,n,l);for(let e=0;e<t.editor.selections.length;e++)t.recordedState.transformer.addTransformation({type:"moveCursor",diff:s.PositionDiff.exactPosition(m),cursorIndex:e});i===u.RegisterMode.LineWise&&(l=this.adjustLinewiseRegisterText(o,l));for(const e of this.getTransformations(t.document,o,d,i,l))t.recordedState.transformer.addTransformation(e);(0,c.isVisualMode)(o)&&(t.lastVisualSelection={mode:o,start:d.start,end:d.start.advancePositionByText(l)},t.recordedState.registerName=a.configuration.useSystemClipboard?"*":'"',u.Register.put(t,t.document.getText(d),this.multicursorIndex,!0));let f=l.split("\n").length;i===u.RegisterMode.LineWise&&f--,(0,h.reportLinesChanged)(f,t),await t.setCurrentMode(c.Mode.Normal)}getRegisterText(e,t,r){if(t.text instanceof d.RecordedState)return t.text.actionsRun.map((e=>e.keysPressed.join(""))).join("").repeat(r);if(t.registerMode===u.RegisterMode.CharacterWise)return e===c.Mode.VisualLine?Array(r).fill(t.text).join("\n"):t.text.repeat(r);if(t.registerMode===u.RegisterMode.LineWise||e===c.Mode.VisualLine)return Array(r).fill(t.text).join("\n");if(t.registerMode===u.RegisterMode.BlockWise)return t.text.split("\n").map((e=>e.repeat(r))).join("\n");throw new Error(`Unexpected RegisterMode ${t.registerMode}`)}adjustIndent(e,t){const r=t.split("\n"),n=l.TextEditor.getIndentationLevel(e),o=l.TextEditor.getIndentationLevel(r[0]);return r.map((e=>{const t=l.TextEditor.getIndentationLevel(e)-o+n;return l.TextEditor.setIndentationLevel(e,t)})).join("\n")}getTransformations(e,t,r,n,s){var a;if(n===u.RegisterMode.BlockWise&&t!==c.Mode.VisualLine){const n=[],i=s.split("\n"),u=Math.max(i.length,r.end.line-r.start.line+1);let d=0;for(let s=0;s<u;s++){const u=null!==(a=i[s])&&void 0!==a?a:"";let l;if(t===c.Mode.VisualBlock)if(r.start.line+s>r.end.line){const e=r.start.with({line:r.start.line+s});l=new o.Range(e,e)}else l=new o.Range(r.start.with({line:r.start.line+s}),r.end.with({line:r.start.line+s}));else if(s>0){const e=r.start.with({line:r.start.line+s+d});l=new o.Range(e,e)}else l=new o.Range(r.start,r.end),d=e.getText(l).split("\n").length-1;const h=r.start.line+s;if(h>e.lineCount-1)n.push({type:"replaceText",range:l,text:"\n"+" ".repeat(r.start.character)+u});else{const t=Math.max(r.start.character-e.lineAt(h).text.length,0);n.push({type:"replaceText",range:l,text:" ".repeat(t)+u})}}return n}if(t===c.Mode.Normal||t===c.Mode.Visual||t===c.Mode.VisualLine)return[{type:"replaceText",range:r,text:s}];if(t===c.Mode.VisualBlock){const e=[];if(n===u.RegisterMode.CharacterWise)for(let t=r.start.line;t<=r.end.line;t++){const n=new o.Range(new i.Position(t,r.start.character),new i.Position(t,r.end.character)),a=s.includes("\n")&&t!==r.start.line?"":s;e.push({type:"replaceText",range:n,text:a})}else{if(n!==u.RegisterMode.LineWise)throw new Error(`Unexpected RegisterMode ${n}`);{for(let t=r.start.line;t<=r.end.line;t++){const n=new o.Range(new i.Position(t,r.start.character),new i.Position(t,r.end.character));e.push({type:"replaceText",range:n,text:""})}const t=this.putBefore()?new i.Position(r.start.line,0):new i.Position(r.end.line,0).getLineEnd();e.push({type:"replaceText",range:new o.Range(t,t),text:s})}}return e}throw new Error(`Unexpected Mode ${t}`)}}let y=class extends v{constructor(){super(...arguments),this.keys=["p"]}putBefore(){return!1}getRegisterMode(e){return e.registerMode}getReplaceRange(e,t,r){if(e===c.Mode.Normal){let e;if(r===u.RegisterMode.CharacterWise||r===u.RegisterMode.BlockWise)e=t.stop.getRight();else{if(r!==u.RegisterMode.LineWise)throw new Error(`Unexpected RegisterMode ${r}`);e=t.stop.getLineEnd()}return new o.Range(e,e)}if(e===c.Mode.Visual){const[e,r]=(0,s.sorted)(t.start,t.stop);return new o.Range(e,r.getRight())}if(e===c.Mode.VisualLine){const[e,r]=(0,s.sorted)(t.start,t.stop);return new o.Range(e.getLineBegin(),r.getLineEnd())}{const[e,r]=(0,s.sorted)(t.start,t.stop);return new o.Range(e,r.getRight())}}adjustLinewiseRegisterText(e,t){return e===c.Mode.Normal||e===c.Mode.VisualBlock?"\n"+t:e===c.Mode.Visual?"\n"+t+"\n":t}shouldAdjustIndent(e,t){return!1}getCursorPosition(e,t,r,n,o,s){const a=r.start;if(t===c.Mode.Normal||t===c.Mode.Visual){if(n===u.RegisterMode.CharacterWise)return s.includes("\n")?a:a.advancePositionByText(s).getLeft();if(n===u.RegisterMode.LineWise)return new i.Position(a.line+1,f(s));if(n===u.RegisterMode.BlockWise)return a;throw new Error(`Unexpected RegisterMode ${n}`)}if(t===c.Mode.VisualLine)return a.with({character:f(s)});if(t===c.Mode.VisualBlock)return n===u.RegisterMode.LineWise?new i.Position(r.end.line+1,f(s)):n===u.RegisterMode.BlockWise?a:a.with({character:a.character+s.length-1});throw new Error(`Unexpected Mode ${t}`)}};y=n([m.RegisterAction],y);let w=class extends y{constructor(){super(...arguments),this.keys=["P"]}putBefore(){return!0}adjustLinewiseRegisterText(e,t){return e===c.Mode.Normal||e===c.Mode.VisualBlock?t+"\n":super.adjustLinewiseRegisterText(e,t)}getReplaceRange(e,t,r){if(e===c.Mode.Normal){if(r===u.RegisterMode.CharacterWise||r===u.RegisterMode.BlockWise){const e=t.stop;return new o.Range(e,e)}if(r===u.RegisterMode.LineWise){const e=t.stop.getLineBegin();return new o.Range(e,e)}}return super.getReplaceRange(e,t,r)}getCursorPosition(e,t,r,n,o,i){const s=r.start;return t!==c.Mode.Normal&&t!==c.Mode.VisualBlock||n!==u.RegisterMode.LineWise?super.getCursorPosition(e,t,r,n,o,i):s.with({character:f(i)})}};function x(e){return class extends e{getCursorPosition(e,t,r,n,o,s){const a=r.start;if(t===c.Mode.Normal||t===c.Mode.Visual){if(n===u.RegisterMode.CharacterWise)return s.includes("\n")&&(s=s.slice(0,s.length/o)),a.advancePositionByText(s);if(n===u.RegisterMode.LineWise){let r=a.line+s.split("\n").length;return(t===c.Mode.Visual||!this.putBefore()&&a.line<e.lineCount-1)&&r++,new i.Position(r,0)}if(n===u.RegisterMode.BlockWise){const e=s.split("\n");return new i.Position(a.line+e.length-1,a.character+e[0].length+(this.putBefore()&&t===c.Mode.Normal?1:0))}}else{if(t===c.Mode.VisualLine)return new i.Position(a.line+s.split("\n").length,0);if(t===c.Mode.VisualBlock){const e=s.split("\n");return n===u.RegisterMode.LineWise?this.putBefore()?new i.Position(a.line+e.length,0):new i.Position(r.end.line+e.length+1,0):n===u.RegisterMode.BlockWise?new i.Position(r.start.line+e.length-1,r.start.character+e[e.length-1].length):a.with({character:a.character+s.length})}}return super.getCursorPosition(e,t,r,n,o,s)}}}w=n([m.RegisterAction],w);let S=class extends y{constructor(){super(...arguments),this.keys=["g","p"]}};S=n([m.RegisterAction,x],S);let C=class extends w{constructor(){super(...arguments),this.keys=["g","P"]}};function M(e){return class extends e{shouldAdjustIndent(e,t){return(e===c.Mode.Normal||e===c.Mode.VisualLine)&&t===u.RegisterMode.LineWise}}}C=n([m.RegisterAction,x],C);let b=class extends y{constructor(){super(...arguments),this.keys=["]","p"]}};b=n([m.RegisterAction,M],b);let k=class extends w{constructor(){super(...arguments),this.keys=[["[","P"],["]","P"],["[","p"]]}};function R(e){return class extends e{setInsertionLine(e){this.insertLine=e}getRegisterMode(e){return u.RegisterMode.LineWise}getReplaceRange(e,t,r){var n;const a=null!==(n=this.insertLine)&&void 0!==n?n:(0,s.laterOf)(t.start,t.stop).line,c=this.putBefore()?new i.Position(a,0):new i.Position(a,0).getLineEnd();return new o.Range(c,c)}getCursorPosition(e,t,r,n,o,s){const a=s.split("\n");return new i.Position(r.start.line+a.length-(this.putBefore()?1:0),f(a[a.length-1]))}}}k=n([m.RegisterAction,M],k),t.PutFromCmdLine=R(y),t.PutBeforeFromCmdLine=R(w)},"./src/actions/commands/replace.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0});const o=r("vscode"),i=r("./src/common/motion/position.ts"),s=r("./src/mode/mode.ts"),a=r("./src/state/replaceState.ts"),c=r("./src/actions/base.ts");let u=class extends c.BaseCommand{constructor(){super(...arguments),this.modes=[s.Mode.Replace],this.keys=[["<Esc>"],["<C-c>"],["<C-[>"]]}async exec(e,t){const r=t.replaceState;if(r.timesToRepeat>1){const n=r.newChars.join("").repeat(r.timesToRepeat-1);t.recordedState.transformer.replace(new o.Range(e,e.getRight(n.length)),n)}else t.cursorStopPosition=t.cursorStopPosition.getLeft();await t.setCurrentMode(s.Mode.Normal)}};u=n([c.RegisterAction],u);let d=class extends c.BaseCommand{constructor(){super(...arguments),this.modes=[s.Mode.Replace],this.keys=["<Insert>"]}async exec(e,t){await t.setCurrentMode(s.Mode.Insert)}};d=n([c.RegisterAction],d);let l=class extends c.BaseCommand{constructor(){super(...arguments),this.modes=[s.Mode.Replace],this.keys=[["<BS>"],["<S-BS>"],["<C-BS>"],["<C-h>"]]}async exec(e,t){const r=t.replaceState;if(e.isBeforeOrEqual(r.replaceCursorStartPosition)){const n=e.getLeftThroughLineBreaks();n.line<r.replaceCursorStartPosition.line?t.replaceState=new a.ReplaceState(t,n):r.replaceCursorStartPosition=n,t.cursorStopPosition=n,t.cursorStartPosition=n}else e.line>r.replaceCursorStartPosition.line||e.character>r.originalChars.length?(t.recordedState.transformer.addTransformation({type:"deleteRange",range:new o.Range(e.getLeftThroughLineBreaks(),e)}),r.newChars.pop()):(t.recordedState.transformer.addTransformation({type:"replaceText",text:r.originalChars[e.character-1],range:new o.Range(e.getLeft(),e),diff:i.PositionDiff.offset({character:-1})}),r.newChars.pop())}};l=n([c.RegisterAction],l);let h=class extends c.BaseCommand{constructor(){super(...arguments),this.modes=[s.Mode.Replace],this.keys=["<character>"],this.createsUndoPoint=!0}async exec(e,t){const r=this.keysPressed[0],n=t.replaceState,s="\n"===r||"<tab>"===r;e.isLineEnd()||s?"<tab>"===r?(t.recordedState.transformer.delete(new o.Range(e,e.getRight())),t.recordedState.transformer.addTransformation({type:"tab",cursorIndex:this.multicursorIndex})):t.recordedState.transformer.insert(e,r):t.recordedState.transformer.addTransformation({type:"replaceText",text:r,range:new o.Range(e,e.getRight()),diff:i.PositionDiff.offset({character:1})}),n.newChars.push(r)}};h=n([c.RegisterAction],h);let m=class extends c.BaseCommand{constructor(){super(...arguments),this.modes=[s.Mode.Replace],this.keys=["<C-g>","u"]}async exec(e,t){t.historyTracker.addChange(!0),t.historyTracker.finishCurrentStep()}};m=n([c.RegisterAction],m)},"./src/actions/commands/search.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0});const o=r("./node_modules/lodash/lodash.js"),i=r("./node_modules/lodash/lodash.js"),s=r("vscode"),a=r("./src/cmd_line/commandLine.ts"),c=r("./src/common/motion/position.ts"),u=r("./src/configuration/configuration.ts"),d=r("./src/error.ts"),l=r("./src/mode/mode.ts"),h=r("./src/register/register.ts"),m=r("./src/state/globalState.ts"),p=r("./src/state/searchState.ts"),g=r("./src/statusBar.ts"),f=r("./src/textEditor.ts"),v=r("./src/textobject/textobject.ts"),y=r("./src/util/statusBarTextUtils.ts"),w=r("./src/vimscript/pattern.ts"),x=r("./src/actions/base.ts"),S=r("./src/actions/baseMotion.ts");async function C(e,t,r,n){let i=f.TextEditor.getWord(t.document,e);if(i){(/\W/.test(i[0])||/\W/.test(i[i.length-1]))&&(n=!1),n&&(i=o.escapeRegExp(i));const e=r===w.SearchDirection.Backward?t.cursorStopPosition.prevWordStart(t.document,{inclusive:!0}):t.cursorStopPosition;await b({needle:i,vimState:t,direction:r,isExact:n,searchStartCursorPosition:e})}else g.StatusBar.displayError(t,d.VimError.fromCode(d.ErrorCode.NoStringUnderCursor))}async function M(e,t){const r=e.document.getText(e.editor.selection);await e.setCurrentMode(l.Mode.Normal);const[n,o]=(0,c.sorted)(e.cursorStartPosition,e.cursorStopPosition),i=t===w.SearchDirection.Backward?n.getLeft():o.getRight();await b({needle:r,vimState:e,direction:t,isExact:!1,searchStartCursorPosition:i})}async function b(e){const{needle:t,vimState:r,isExact:n}=e;if(0===t.length)return;const o=n?`\\<${(0,i.escapeRegExp)(t)}\\>`:(0,i.escapeRegExp)(t);m.globalState.searchState=new p.SearchState(e.direction,r.cursorStopPosition,o,{ignoreSmartcase:!0}),h.Register.setReadonlyRegister("/",m.globalState.searchState.searchString),a.SearchCommandLine.addSearchStateToHistory(m.globalState.searchState),m.globalState.hl=!0;const s=m.globalState.searchState.getNextSearchMatchPosition(r,e.searchStartCursorPosition);s?(r.cursorStopPosition=s.pos,(0,y.reportSearch)(s.index,m.globalState.searchState.getMatchRanges(r).length,r)):g.StatusBar.displayError(r,d.VimError.fromCode(e.direction===w.SearchDirection.Forward?d.ErrorCode.SearchHitBottom:d.ErrorCode.SearchHitTop,m.globalState.searchState.searchString))}let k=class extends x.BaseCommand{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualLine],this.keys=["*"],this.isMotion=!0,this.runsOnceForEachCountPrefix=!0,this.isJump=!0}async exec(e,t){(0,l.isVisualMode)(t.currentMode)&&u.configuration.visualstar?await M(t,w.SearchDirection.Forward):await C(e,t,w.SearchDirection.Forward,!0)}};k=n([x.RegisterAction],k);let R=class extends x.BaseCommand{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualLine],this.keys=["g","*"],this.isMotion=!0,this.runsOnceForEachCountPrefix=!0,this.isJump=!0}async exec(e,t){await C(e,t,w.SearchDirection.Forward,!1)}};R=n([x.RegisterAction],R);let P=class extends x.BaseCommand{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualLine],this.keys=["#"],this.isMotion=!0,this.runsOnceForEachCountPrefix=!0,this.isJump=!0}async exec(e,t){(0,l.isVisualMode)(t.currentMode)&&u.configuration.visualstar?await M(t,w.SearchDirection.Backward):await C(e,t,w.SearchDirection.Backward,!0)}};P=n([x.RegisterAction],P);let _=class extends x.BaseCommand{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualLine],this.keys=["g","#"],this.isMotion=!0,this.runsOnceForEachCountPrefix=!0,this.isJump=!0}async exec(e,t){await C(e,t,w.SearchDirection.Backward,!1)}};_=n([x.RegisterAction],_);let E=class extends x.BaseCommand{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualLine,l.Mode.VisualBlock],this.keys=["/"],this.isMotion=!0,this.isJump=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){t.commandLine=new a.SearchCommandLine(t,"",w.SearchDirection.Forward),await t.setCurrentMode(l.Mode.SearchInProgressMode),m.globalState.searchState=t.commandLine.getSearchState()}};E=n([x.RegisterAction],E);let A=class extends x.BaseCommand{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualLine,l.Mode.VisualBlock],this.keys=["?"],this.isMotion=!0,this.isJump=!0}runsOnceForEveryCursor(){return!1}async exec(e,t){t.commandLine=new a.SearchCommandLine(t,"",w.SearchDirection.Backward),await t.setCurrentMode(l.Mode.SearchInProgressMode),m.globalState.searchState=t.commandLine.getSearchState()}};A=n([x.RegisterAction],A);class T extends v.TextObject{constructor(){super(...arguments),this.modes=[l.Mode.Normal,l.Mode.Visual,l.Mode.VisualBlock]}async execAction(e,t){const r=m.globalState.searchState;if(!r||""===r.searchString)return(0,S.failedMovement)(t);const n=new p.SearchState(this.direction,t.cursorStopPosition,r.searchString,{});let o=n.findContainingMatchRange(t,t.cursorStopPosition);if(o&&t.currentMode===l.Mode.Visual&&t.cursorStopPosition.isEqual(o.range.end.getLeftThroughLineBreaks())&&(o=void 0),void 0===o&&(o=n.getNextSearchMatchRange(t,t.cursorStopPosition),void 0===o))return(0,S.failedMovement)(t);(0,y.reportSearch)(o.index,r.getMatchRanges(t).length,t);const[i,a]=[t.currentMode===l.Mode.Normal?o.range.start:t.cursorStopPosition,o.range.end.getLeftThroughLineBreaks()];return t.cursorStartPosition=i,t.cursorStopPosition=a,t.editor.selection=new s.Selection(i,a),await t.setCurrentMode(l.Mode.Visual),{start:i,stop:a}}async execActionForOperator(e,t){return this.execAction(e,t)}}let L=class extends T{constructor(){super(...arguments),this.keys=["g","n"],this.direction=w.SearchDirection.Forward}};L=n([x.RegisterAction],L);let $=class extends T{constructor(){super(...arguments),this.keys=["g","N"],this.direction=w.SearchDirection.Backward}};$=n([x.RegisterAction],$)},"./src/actions/include-main.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r("./src/actions/base.ts"),r("./src/actions/operator.ts"),r("./src/actions/motion.ts"),r("./src/textobject/textobject.ts"),r("./src/actions/commands/insert.ts"),r("./src/actions/commands/replace.ts"),r("./src/actions/commands/actions.ts"),r("./src/actions/commands/commandLine.ts"),r("./src/actions/commands/search.ts"),r("./src/actions/commands/put.ts"),r("./src/actions/commands/digraphs.ts")},"./src/actions/languages/python/motion.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.PythonDocument=void 0;const o=r("./src/actions/base.ts"),i=r("./src/actions/baseMotion.ts"),s=r("vscode");let a=!0;try{new RegExp("(?<=x)")}catch{a=!1}class c{constructor(e){this._document=e;const t=c._parseLines(e);this.structure=c._parseStructure(t)}static*lines(e){for(let t=0;t<e.lineCount;t++)yield e.lineAt(t).text}static _indentation(e){const t=e.search(c.reOnlyWhitespace);if(-1!==t&&"#"!==e[t])return t}static _parseLine(e,t){const r=this._indentation(t);return void 0!==r?{line:e,indentation:r,text:t}:void 0}static _parseLines(e){return[...this.lines(e)].map(((e,t)=>this._parseLine(t,e))).filter((e=>e))}static _parseStructure(e){const t=e.length,r=[];for(let n=0;n<t;n++){const o=e[n],i=o.text.match(c.reDefOrClass);if(i){const a="def"===i[1]?"function":"class";let u=n+1;for(;u<t&&!(e[u].indentation<=o.indentation);u++);u--;const d=e[u];r.push({type:a,start:new s.Position(o.line,o.indentation),end:new s.Position(d.line,d.text.search(c.reLastNonWhiteSpaceCharacter)-1)})}}return r}find(e,t,r,n){const o="next"===t?"isAfter":"isBefore",i=this.structure.filter((t=>t.type===e)).filter((e=>e[r][o](n)));if("end"===r&&i.sort(((e,t)=>e.end.line-t.end.line)),i.length)return i["next"===t?0:i.length-1][r]}static moveClassBoundary(e,t,r,n,o){var s;const a=n?"next":"prev",u=o?"start":"end";return null!==(s=new c(e).find("class",a,u,t))&&void 0!==s?s:(0,i.failedMovement)(r)}}t.PythonDocument=c,c.reOnlyWhitespace=/\S/,c.reLastNonWhiteSpaceCharacter=a?new RegExp("(?<=\\S)\\s*$"):/(\S)\s*$/,c.reDefOrClass=/^\s*(def|class) /;class u extends i.BaseMovement{doesActionApply(e,t){return super.doesActionApply(e,t)&&"python"===e.document.languageId}async execAction(e,t){var r;const n=t.document;return null!==(r=new c(n).find(this.type,this.direction,this.edge,e))&&void 0!==r?r:(0,i.failedMovement)(t)}}let d=class extends u{constructor(){super(...arguments),this.keys=["]","m"],this.type="function",this.direction="next",this.edge="start"}};d=n([o.RegisterAction],d);let l=class extends u{constructor(){super(...arguments),this.keys=["[","m"],this.type="function",this.direction="prev",this.edge="start"}};l=n([o.RegisterAction],l);let h=class extends u{constructor(){super(...arguments),this.keys=["]","M"],this.type="function",this.direction="next",this.edge="end"}};h=n([o.RegisterAction],h);let m=class extends u{constructor(){super(...arguments),this.keys=["[","M"],this.type="function",this.direction="prev",this.edge="end"}};m=n([o.RegisterAction],m)},"./src/actions/motion.ts":function(e,t,r){"use strict";var n,o,i,s,a,c=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.MoveAroundTag=t.MoveInsideTag=t.MoveAroundBacktick=t.MoveAroundDoubleQuotes=t.MoveAroundSingleQuotes=t.MoveQuoteMatch=t.MoveAroundSquareBracket=t.MoveAroundCaret=t.MoveAroundCurlyBrace=t.MoveAroundParentheses=t.MoveInsideCharacter=t.MoveFullWordBegin=t.MoveWordBegin=t.ArrowsInInsertMode=t.ExpandingSelection=void 0;const u=r("vscode"),d=r("./src/actions/operator.ts"),l=r("./src/textEditor.ts"),h=r("./src/mode/mode.ts"),m=r("./src/common/matching/matcher.ts"),p=r("./src/common/matching/quoteMatcher.ts"),g=r("./src/actions/base.ts"),f=r("./src/register/register.ts"),v=r("./src/state/replaceState.ts"),y=r("./src/common/matching/tagMatcher.ts"),w=r("./src/configuration/configuration.ts"),x=r("./src/actions/wrapping.ts"),S=r("./src/error.ts"),C=r("./src/actions/baseMotion.ts"),M=r("./src/state/globalState.ts"),b=r("./src/util/statusBarTextUtils.ts"),k=r("./src/actions/plugins/sneak.ts"),R=r("./src/configuration/notation.ts"),P=r("./src/statusBar.ts"),_=r("./src/util/util.ts"),E=r("./src/textobject/paragraph.ts"),A=r("./src/actions/languages/python/motion.ts"),T=r("vscode"),L=r("./src/common/motion/position.ts"),$=r("./src/textobject/word.ts"),B=r("./src/actions/commands/actions.ts"),I=r("./src/vimscript/pattern.ts");class N extends C.BaseMovement{constructor(){super(...arguments),this.selectionType=C.SelectionType.Expanding}adjustPosition(e,t,r){return r||(e=t.stop),e}}t.ExpandingSelection=N;class O extends C.BaseMovement{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualLine,h.Mode.VisualBlock],this.value=1}async execAction(e,t){return this.execActionWithCount(e,t,1)}async execActionWithCount(e,t,r){var n;const o=null!==(n=this.multicursorIndex)&&void 0!==n?n:0;if(0===o){if(t.currentMode===h.Mode.Visual){const e=t.editor.selections;e.forEach(((e,r)=>{if(e.active.isAfter(e.anchor)){const n=e.active.getLeftThroughLineBreaks();t.editor.selections[r]=new u.Selection(e.anchor,n)}})),t.editor.selections=e}await u.commands.executeCommand("cursorMove",{to:this.movementType,select:t.currentMode!==h.Mode.Normal,by:this.by,value:this.value*r})}if(!t.editor.selections[o])return{start:t.cursorStartPosition,stop:t.cursorStopPosition,removed:!0};if(t.currentMode===h.Mode.Normal)return t.editor.selections[o].active;{let e=t.editor.selections[o].anchor;const r=t.editor.selections[o].active;return(e.isAfter(r)&&t.cursorStartPosition.isAfter(t.cursorStopPosition)||t.cursorStartPosition.isAfter(t.cursorStopPosition)&&e.isBeforeOrEqual(r))&&(e=e.getLeft()),{start:e,stop:r}}}async execActionForOperator(e,t){var r;const n=null!==(r=this.multicursorIndex)&&void 0!==r?r:0;return 0===n&&await u.commands.executeCommand("cursorMove",{to:this.movementType,select:!0,by:this.by,value:this.value}),t.editor.selections[n]?{start:t.editor.selections[n].start,stop:t.editor.selections[n].end}:{start:t.cursorStartPosition,stop:t.cursorStopPosition,removed:!0}}}class V extends O{constructor(){super(...arguments),this.keys=[],this.movementType="up",this.by="wrappedLine",this.value=1}}class D extends O{constructor(){super(...arguments),this.keys=[],this.movementType="down",this.by="wrappedLine",this.value=1}}class F extends O{constructor(){super(...arguments),this.preservesDesiredColumn=!0}async execAction(e,t){const r=t.desiredColumn,n=t.editor.selection.active.line;if(t.currentMode!==h.Mode.Normal){const r=t.editor.selection.start;("down"===this.movementType&&e.line>r.line||"up"===this.movementType&&e.line<n)&&await u.commands.executeCommand("cursorMove",{to:"left",select:!0,by:"character",value:1})}if(await u.commands.executeCommand("cursorMove",{to:this.movementType,select:t.currentMode!==h.Mode.Normal,by:this.by,value:this.value}),t.currentMode===h.Mode.Normal){let e=t.editor.selection.active;return n!==e.line&&(e=e.withColumn(r)),e}{let o=t.editor.selection.start,i=t.editor.selection.end;const s=t.editor.selection.active;return o.isEqual(s)&&!o.isEqual(i)&&([o,i]=[i,o],n!==o.line&&(o=o.getLeft())),e.line!==i.line&&(i=i.withColumn(r)),{start:o,stop:i}}}}class j extends F{constructor(){super(...arguments),this.keys=[],this.movementType="down",this.by="line",this.value=1}async execAction(e,t){if(e.line>=t.document.lineCount-1)return e;let r=e,n=e.line,o=e.character;const i=t.desiredColumn,s=new D;do{r=await s.execAction(r,t),r=r instanceof T.Position?r:r.stop;const e=n!==r.line,i=o!==r.character;if(e||!i)break;o=r.character,n=r.line}while(r.line===e.line);return r.character!==i&&(r=new T.Position(r.line,i)),r}}let W=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["j"],["<down>"],["<C-j>"],["<C-n>"]],this.preservesDesiredColumn=!0}async execAction(e,t){return t.currentMode===h.Mode.Insert&&"<down>"===this.keysPressed[0]&&"vscode-interactive-input"===t.editor.document.uri.scheme&&e.line===t.document.lineCount-1&&t.editor.selection.isEmpty?(await u.commands.executeCommand("interactive.history.next"),t.editor.selection.active):w.configuration.foldfix&&t.currentMode!==h.Mode.VisualBlock?(new j).execAction(e,t):e.line<t.document.lineCount-1?e.with({character:t.desiredColumn}).getDown():e}async execActionForOperator(e,t){return t.currentRegisterMode=f.RegisterMode.LineWise,e.getDown()}};W=c([g.RegisterAction],W);let U=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["k"],["<up>"],["<C-p>"]],this.preservesDesiredColumn=!0}async execAction(e,t){return t.currentMode===h.Mode.Insert&&"<up>"===this.keysPressed[0]&&"vscode-interactive-input"===t.editor.document.uri.scheme&&0===e.line&&t.editor.selection.isEmpty?(await u.commands.executeCommand("interactive.history.previous"),t.editor.selection.active):w.configuration.foldfix&&t.currentMode!==h.Mode.VisualBlock?(new K).execAction(e,t):e.line>0?e.with({character:t.desiredColumn}).getUp():e}async execActionForOperator(e,t){return t.currentRegisterMode=f.RegisterMode.LineWise,e.getUp()}};U=c([g.RegisterAction],U);let K=class extends F{constructor(){super(...arguments),this.keys=[],this.movementType="up",this.by="line",this.value=1}async execAction(e,t){if(0===e.line)return e;let r;const n=t.desiredColumn,o=new V;do{r=await o.execAction(e,t),r=r instanceof T.Position?r:r.stop}while(r.line===e.line);return r.character!==n&&(r=new T.Position(r.line,n)),r}};K=c([g.RegisterAction],K);let H=class extends C.BaseMovement{constructor(){super(...arguments),this.modes=[h.Mode.Insert],this.keys=[["<up>"],["<down>"],["<left>"],["<right>"]]}async execAction(e,t){let r;switch(t.recordedState.actionsRun=[new B.CommandInsertAtCursor],t.historyTracker.addChange(!0),t.historyTracker.finishCurrentStep(),this.keysPressed[0]){case"<up>":r=await new U(this.keysPressed).execAction(e,t);break;case"<down>":r=await new W(this.keysPressed).execAction(e,t);break;case"<left>":r=await new re(this.keysPressed).execAction(e,t);break;case"<right>":r=await new ne(this.keysPressed).execAction(e,t);break;default:throw new Error(`Unexpected 'arrow' key: ${this.keys[0]}`)}return t.replaceState=new v.ReplaceState(t,r),r}};H=c([g.RegisterAction],H),t.ArrowsInInsertMode=H;let q=class extends C.BaseMovement{constructor(){super(...arguments),this.modes=[h.Mode.Replace],this.keys=[["<up>"],["<down>"],["<left>"],["<right>"]]}async execAction(e,t){t.historyTracker.addChange(!0),t.historyTracker.finishCurrentStep();let r=e;switch(this.keysPressed[0]){case"<up>":r=await(new U).execAction(e,t);break;case"<down>":r=await(new W).execAction(e,t);break;case"<left>":r=await new re(this.keysPressed).execAction(e,t);break;case"<right>":r=await new ne(this.keysPressed).execAction(e,t);break;default:throw new Error(`Unexpected 'arrow' key: ${this.keys[0]}`)}return t.replaceState=new v.ReplaceState(t,r),r}};q=c([g.RegisterAction],q);let J=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["n"],this.isJump=!0}async execAction(e,t){const r=M.globalState.searchState;if(!r||""===r.searchString)return e;if(M.globalState.hl=!0,0===r.getMatchRanges(t).length)return P.StatusBar.displayError(t,S.VimError.fromCode(S.ErrorCode.PatternNotFound,r.searchString)),(0,C.failedMovement)(t);const n=r.direction===I.SearchDirection.Forward,o=e.getRight().isEqual(e.getLineEnd())&&n?r.getNextSearchMatchPosition(t,e.getRight()):r.getNextSearchMatchPosition(t,e);return o?((0,b.reportSearch)(o.index,r.getMatchRanges(t).length,t),o.pos):(P.StatusBar.displayError(t,S.VimError.fromCode(r.direction===I.SearchDirection.Forward?S.ErrorCode.SearchHitBottom:S.ErrorCode.SearchHitTop,r.searchString)),(0,C.failedMovement)(t))}};J=c([g.RegisterAction],J);let z=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["N"],this.isJump=!0}async execAction(e,t){const r=M.globalState.searchState;if(!r||""===r.searchString)return e;if(M.globalState.hl=!0,0===r.getMatchRanges(t).length)return P.StatusBar.displayError(t,S.VimError.fromCode(S.ErrorCode.PatternNotFound,r.searchString)),(0,C.failedMovement)(t);const n=r.direction===I.SearchDirection.Forward,o=e.getRight().isEqual(e.getLineEnd())&&!n?r.getNextSearchMatchPosition(t,e.getRight(),I.SearchDirection.Backward):r.getNextSearchMatchPosition(t,e,I.SearchDirection.Backward);return o?((0,b.reportSearch)(o.index,r.getMatchRanges(t).length,t),o.pos):(P.StatusBar.displayError(t,S.VimError.fromCode(r.direction===I.SearchDirection.Forward?S.ErrorCode.SearchHitTop:S.ErrorCode.SearchHitBottom,r.searchString)),(0,C.failedMovement)(t))}};z=c([g.RegisterAction],z);let G=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["'","<character>"],this.isJump=!0}async execAction(e,t){const r=this.keysPressed[1],n=t.historyTracker.getMark(r);if(void 0===n)throw S.VimError.fromCode(S.ErrorCode.MarkNotSet);if(t.currentRegisterMode=f.RegisterMode.LineWise,n.isUppercaseMark&&void 0!==n.document){if(t.recordedState.operator&&n.document!==t.document)throw S.VimError.fromCode(S.ErrorCode.MarkNotSet);await te(n.document)}return l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,n.position.line)}};G=c([g.RegisterAction],G);let Q=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["`","<character>"],this.isJump=!0}async execAction(e,t){const r=this.keysPressed[1],n=t.historyTracker.getMark(r);if(void 0===n)throw S.VimError.fromCode(S.ErrorCode.MarkNotSet);if(n.isUppercaseMark&&void 0!==n.document){if(t.recordedState.operator&&n.document!==t.document)throw S.VimError.fromCode(S.ErrorCode.MarkNotSet);await te(n.document)}return n.position}};Q=c([g.RegisterAction],Q);let Y=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["]","`"],this.isJump=!0}async execAction(e,t){const r=t.historyTracker.getLocalMarks().filter((t=>t.position.isAfter(e))).map((e=>e.position)).sort(((e,t)=>e.compareTo(t)));return 0===r.length?e:r[0]}};Y=c([g.RegisterAction],Y);let Z=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["[","`"],this.isJump=!0}async execAction(e,t){const r=t.historyTracker.getLocalMarks().filter((t=>t.position.isBefore(e))).map((e=>e.position)).sort(((e,t)=>t.compareTo(e)));return 0===r.length?e:r[0]}};Z=c([g.RegisterAction],Z);let X=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["]","'"],this.isJump=!0}async execAction(e,t){t.currentRegisterMode=f.RegisterMode.LineWise;const r=t.historyTracker.getLocalMarks().filter((t=>t.position.line>e.line)).map((e=>e.position.line)),n=0===r.length?e.line:Math.min(...r);return new T.Position(n,0).getLineBeginRespectingIndent(t.document)}};X=c([g.RegisterAction],X);let ee=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["[","'"],this.isJump=!0}async execAction(e,t){t.currentRegisterMode=f.RegisterMode.LineWise;const r=t.historyTracker.getLocalMarks().filter((t=>t.position.line<e.line)).map((e=>e.position.line)),n=0===r.length?e.line:Math.max(...r);return new T.Position(n,0).getLineBeginRespectingIndent(t.document)}};async function te(e){var t;e!==(null===(t=u.window.activeTextEditor)||void 0===t?void 0:t.document)&&await u.window.showTextDocument(e)}ee=c([g.RegisterAction],ee);let re=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["h"],["<left>"],["<BS>"],["<C-BS>"],["<S-BS>"]]}async execAction(e,t){return(0,x.shouldWrapKey)(t.currentMode,this.keysPressed[0])?e.getLeftThroughLineBreaks([h.Mode.Insert,h.Mode.Replace].includes(t.currentMode)):e.getLeft()}};re=c([g.RegisterAction],re);let ne=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["l"],["<right>"],[" "]]}async execAction(e,t){return(0,x.shouldWrapKey)(t.currentMode,this.keysPressed[0])?e.getRightThroughLineBreaks([h.Mode.Insert,h.Mode.Replace].includes(t.currentMode)):e.getRight()}};ne=c([g.RegisterAction],ne);let oe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["+"],["\n"],["<C-m>"]]}async execActionWithCount(e,t,r){return t.currentRegisterMode=f.RegisterMode.LineWise,l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,e.getDown(Math.max(r,1)).line)}};oe=c([g.RegisterAction],oe);let ie=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["-"]}async execActionWithCount(e,t,r){return t.currentRegisterMode=f.RegisterMode.LineWise,l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,e.getUp(Math.max(r,1)).line)}};ie=c([g.RegisterAction],ie);let se=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["_"]}async execActionWithCount(e,t,r){t.currentRegisterMode=f.RegisterMode.LineWise;const n=e.getDown(Math.max(r-1,0));return t.recordedState.operator?n:l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,n.line)}};se=c([g.RegisterAction],se);let ae=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["|"]}async execActionWithCount(e,t,r){return new T.Position(e.line,Math.max(0,r-1))}};function ce(e,t,r,n,o){const i=e.document.lineAt(t);let s=t.character;for(;n>0&&s>=0;)s="forward"===o?i.text.indexOf(r,s+1):i.text.lastIndexOf(r,s-1),n--;if(s>=0)return new T.Position(t.line,s)}ae=c([g.RegisterAction],ae);let ue=n=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["f","<character>"]}async execActionWithCount(e,t,r){if(w.configuration.sneakReplacesF){const n=await new k.SneakForward(this.keysPressed.concat("\n"),this.isRepeat).execActionWithCount(e,t,r);return t.recordedState.operator&&!(0,C.isIMovement)(n)?n.getRight():n}r||(r=1);let o=ce(t,e,R.Notation.ToControlCharacter(this.keysPressed[1]),r,"forward");return t.lastSemicolonRepeatableMovement=new n(this.keysPressed,!0),t.lastCommaRepeatableMovement=new de(this.keysPressed,!0),o?(t.recordedState.operator&&(o=o.getRight()),o):(0,C.failedMovement)(t)}};ue=n=c([g.RegisterAction],ue);let de=o=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["F","<character>"]}async execActionWithCount(e,t,r){if(w.configuration.sneakReplacesF)return new k.SneakBackward(this.keysPressed.concat("\n"),this.isRepeat).execActionWithCount(e,t,r);r||(r=1);const n=ce(t,e,R.Notation.ToControlCharacter(this.keysPressed[1]),r,"backward");return t.lastSemicolonRepeatableMovement=new o(this.keysPressed,!0),t.lastCommaRepeatableMovement=new ue(this.keysPressed,!0),n||(0,C.failedMovement)(t)}};function le(e,t,r,n,o){const i=ce(e,t,r,n,o);return"forward"===o?null==i?void 0:i.getLeft():null==i?void 0:i.getRight()}de=o=c([g.RegisterAction],de);let he=i=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["t","<character>"]}async execActionWithCount(e,t,r){r||(r=1);const n=R.Notation.ToControlCharacter(this.keysPressed[1]);let o=le(t,e,n,r,"forward");return o&&this.isRepeat&&e.isEqual(o)&&1===r&&(o=le(t,e,n,2,"forward")),t.lastSemicolonRepeatableMovement=new i(this.keysPressed,!0),t.lastCommaRepeatableMovement=new me(this.keysPressed,!0),o?(t.recordedState.operator&&(o=o.getRight()),o):(0,C.failedMovement)(t)}};he=i=c([g.RegisterAction],he);let me=s=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["T","<character>"]}async execActionWithCount(e,t,r){r||(r=1);const n=R.Notation.ToControlCharacter(this.keysPressed[1]);let o=le(t,e,n,r,"backward");return o&&this.isRepeat&&e.isEqual(o)&&1===r&&(o=le(t,e,n,2,"backward")),t.lastSemicolonRepeatableMovement=new s(this.keysPressed,!0),t.lastCommaRepeatableMovement=new he(this.keysPressed,!0),o||(0,C.failedMovement)(t)}};me=s=c([g.RegisterAction],me);let pe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[";"]}async execActionWithCount(e,t,r){const n=t.lastSemicolonRepeatableMovement;return n?n.execActionWithCount(e,t,r):e}};pe=c([g.RegisterAction],pe);let ge=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[","]}async execActionWithCount(e,t,r){const n=t.lastSemicolonRepeatableMovement,o=t.lastCommaRepeatableMovement;if(o){const i=o.execActionWithCount(e,t,r);return t.lastSemicolonRepeatableMovement=n,t.lastCommaRepeatableMovement=o,i}return e}};ge=c([g.RegisterAction],ge);let fe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["$"],["<End>"],["<D-right>"]],this.setsDesiredColumnToEOL=!0}async execActionWithCount(e,t,r){return e.getDown(Math.max(r-1,0)).getLineEnd()}};fe=c([g.RegisterAction],fe);let ve=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["0"],["<Home>"],["<D-left>"]]}async execAction(e,t){return e.getLineBegin()}doesActionApply(e,t){return super.doesActionApply(e,t)&&0===e.recordedState.count}couldActionApply(e,t){return super.couldActionApply(e,t)&&0===e.recordedState.count}};ve=c([g.RegisterAction],ve);let ye=class extends O{constructor(){super(...arguments),this.keys=["g","0"],this.movementType="wrappedLineStart"}};ye=c([g.RegisterAction],ye);let we=class extends O{constructor(){super(...arguments),this.keys=["g","^"],this.movementType="wrappedLineFirstNonWhitespaceCharacter"}};we=c([g.RegisterAction],we);let xe=class extends O{constructor(){super(...arguments),this.keys=["g","$"],this.movementType="wrappedLineEnd"}};xe=c([g.RegisterAction],xe);let Se=class extends O{constructor(){super(...arguments),this.keys=["g","_"],this.movementType="wrappedLineLastNonWhitespaceCharacter"}async execActionWithCount(e,t,r){r||(r=1);const n=await super.execActionWithCount(e,t,r);return n instanceof T.Position?n.getDown(r-1):{start:n.start,stop:n.stop.getDown(r-1).getLeftThroughLineBreaks()}}};Se=c([g.RegisterAction],Se);let Ce=class extends O{constructor(){super(...arguments),this.keys=["g","m"],this.movementType="wrappedLineColumnCenter"}};Ce=c([g.RegisterAction],Ce);let Me=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual],this.keys=[["g","k"],["g","<up>"]],this.movementType="up",this.by="wrappedLine",this.value=1}};Me=c([g.RegisterAction],Me);let be=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual],this.keys=[["g","j"],["g","<down>"]],this.movementType="down",this.by="wrappedLine",this.value=1}};be=c([g.RegisterAction],be);let ke=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.VisualLine],this.keys=[["g","k"],["g","<up>"]],this.movementType="up",this.by="line",this.value=1}};ke=c([g.RegisterAction],ke);let Re=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.VisualLine],this.keys=[["g","j"],["g","<down>"]],this.movementType="down",this.by="line",this.value=1}};Re=c([g.RegisterAction],Re);let Pe=class extends C.BaseMovement{constructor(){super(...arguments),this.modes=[h.Mode.VisualBlock],this.keys=[["g","k"],["g","<up>"]],this.preservesDesiredColumn=!0}async execAction(e,t){return e.line>0?e.with({character:t.desiredColumn}).getUp():e}async execActionForOperator(e,t){return t.currentRegisterMode=f.RegisterMode.LineWise,e.getUp()}};Pe=c([g.RegisterAction],Pe);let _e=class extends C.BaseMovement{constructor(){super(...arguments),this.modes=[h.Mode.VisualBlock],this.keys=[["g","j"],["g","<down>"]],this.preservesDesiredColumn=!0}async execAction(e,t){return e.line<t.document.lineCount-1?e.with({character:t.desiredColumn}).getDown():e}async execActionForOperator(e,t){return t.currentRegisterMode=f.RegisterMode.LineWise,e.getDown()}};_e=c([g.RegisterAction],_e);let Ee=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualLine,h.Mode.VisualBlock],this.keys=["z","h"],this.movementType="right",this.by="character",this.value=1}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}};Ee=c([g.RegisterAction],Ee);let Ae=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualLine,h.Mode.VisualBlock],this.keys=["z","l"],this.movementType="left",this.by="character",this.value=1}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}};Ae=c([g.RegisterAction],Ae);let Te=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualLine,h.Mode.VisualBlock],this.keys=["z","H"],this.movementType="right",this.by="halfLine",this.value=1}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}};Te=c([g.RegisterAction],Te);let Le=class extends O{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualLine,h.Mode.VisualBlock],this.keys=["z","L"],this.movementType="left",this.by="halfLine",this.value=1,this.isJump=!0}doesActionApply(e,t){return super.doesActionApply(e,t)&&void 0===e.recordedState.operator}};Le=c([g.RegisterAction],Le);let $e=class extends O{constructor(){super(...arguments),this.keys=["H"],this.movementType="viewPortTop",this.by="line",this.value=1,this.isJump=!0}};$e=c([g.RegisterAction],$e);let Be=class extends O{constructor(){super(...arguments),this.keys=["L"],this.movementType="viewPortBottom",this.by="line",this.value=1,this.isJump=!0}};Be=c([g.RegisterAction],Be);let Ie=class extends O{constructor(){super(...arguments),this.keys=["M"],this.movementType="viewPortCenter",this.by="line",this.isJump=!0}};Ie=c([g.RegisterAction],Ie);let Ne=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["^"]}async execAction(e,t){return l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,e.line)}};Ne=c([g.RegisterAction],Ne);let Oe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["g","g"],["<C-Home>"]],this.isJump=!0}async execActionWithCount(e,t,r){t.currentRegisterMode=f.RegisterMode.LineWise;const n=(0,_.clamp)(r,1,t.document.lineCount)-1;return{start:t.cursorStartPosition,stop:e.with({line:n}).obeyStartOfLine(t.document)}}};Oe=c([g.RegisterAction],Oe);let Ve=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["G"],this.isJump=!0}async execActionWithCount(e,t,r){let n;return t.currentRegisterMode=f.RegisterMode.LineWise,n=0===r?new T.Position(t.document.lineCount-1,e.character).obeyStartOfLine(t.document):new T.Position(Math.min(r,t.document.lineCount)-1,e.character).obeyStartOfLine(t.document),{start:t.cursorStartPosition,stop:n}}};Ve=c([g.RegisterAction],Ve);let De=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["<C-End>"]}async execActionWithCount(e,t,r){const n=r?(0,_.clamp)(r-1,0,t.document.lineCount-1):t.document.lineCount-1;return new T.Position(n,0).getLineEnd()}};De=c([g.RegisterAction],De);let Fe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["w"]}async execAction(e,t,r,n){if(n&&!w.configuration.changeWordIncludesWhitespace&&t.recordedState.operator instanceof d.ChangeOperator){const r=t.document.lineAt(e);if(0===r.text.length)return e;const n=r.text[e.character];return" \t".includes(n)?e.nextWordStart(t.document):e.nextWordEnd(t.document,{inclusive:!0}).getRight()}return e.nextWordStart(t.document)}async execActionForOperator(e,t,r,n){const o=await this.execAction(e,t,r,n);return o.line>e.line+1||o.line===e.line+1&&o.isFirstWordOfLine(t.document)?e.getLineEnd():o.isLineEnd()?new T.Position(o.line,o.character+1):o}};Fe=c([g.RegisterAction],Fe),t.MoveWordBegin=Fe;let je=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["W"],["<C-right>"]]}async execAction(e,t){return!w.configuration.changeWordIncludesWhitespace&&t.recordedState.operator instanceof d.ChangeOperator?e.nextWordEnd(t.document,{wordType:$.WordType.Big}).getRight():e.nextWordStart(t.document,{wordType:$.WordType.Big})}};je=c([g.RegisterAction],je),t.MoveFullWordBegin=je;let We=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["e"]}async execAction(e,t){return e.nextWordEnd(t.document)}async execActionForOperator(e,t){const r=e.nextWordEnd(t.document);return new T.Position(r.line,r.character+1)}};We=c([g.RegisterAction],We);let Ue=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["E"]}async execAction(e,t){return e.nextWordEnd(t.document,{wordType:$.WordType.Big})}async execActionForOperator(e,t){return e.nextWordEnd(t.document,{wordType:$.WordType.Big}).getRight()}};Ue=c([g.RegisterAction],Ue);let Ke=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["g","e"]}async execAction(e,t){return e.prevWordEnd(t.document)}};Ke=c([g.RegisterAction],Ke);let He=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["g","E"]}async execAction(e,t){return e.prevWordEnd(t.document,{wordType:$.WordType.Big})}};He=c([g.RegisterAction],He);let qe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[["b"],["<C-left>"]]}async execAction(e,t){return e.prevWordStart(t.document)}};qe=c([g.RegisterAction],qe);let Je=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["B"]}async execAction(e,t){return e.prevWordStart(t.document,{wordType:$.WordType.Big})}};Je=c([g.RegisterAction],Je);let ze=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["("],this.isJump=!0}async execAction(e,t){return e.getSentenceBegin({forward:!1})}};ze=c([g.RegisterAction],ze);let Ge=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["g","o"],this.isJump=!0}async execActionWithCount(e,t,r){return t.currentRegisterMode=f.RegisterMode.LineWise,t.document.positionAt((r||1)-1)}};Ge=c([g.RegisterAction],Ge);let Qe=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=[")"],this.isJump=!0}async execAction(e,t){return e.getSentenceBegin({forward:!0})}};Qe=c([g.RegisterAction],Qe);let Ye=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["}"],this.isJump=!0,this.iteration=0,this.isFirstLineWise=!1}async execAction(e,t){const r=t.recordedState.operator,n=(0,E.getCurrentParagraphEnd)(e);if(r){this.iteration++;const r=e.isLineBeginning()&&t.currentMode===h.Mode.Normal,o=!t.recordedState.count||t.recordedState.count===this.iteration;return this.isFirstLineWise=1===this.iteration?r:this.isFirstLineWise,t.currentRegisterMode=this.isFirstLineWise?f.RegisterMode.LineWise:void 0,o&&!n.isAtDocumentEnd()?n.getLeftThroughLineBreaks(!0):n}return n}};Ye=c([g.RegisterAction],Ye);let Ze=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["{"],this.isJump=!0}async execAction(e,t){return(0,E.getCurrentParagraphBeginning)(e)}};Ze=c([g.RegisterAction],Ze);class Xe extends C.BaseMovement{constructor(){super(...arguments),this.isJump=!0}async execAction(e,t){const r=t.document;switch(r.languageId){case"python":return A.PythonDocument.moveClassBoundary(r,e,t,this.forward,this.begin)}const n=this.begin?"{":"}";let o=e.line;if(this.forward&&o===t.document.lineCount-1||!this.forward&&0===o)return l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,o);for(o=this.forward?o+1:o-1;!t.document.lineAt(o).text.startsWith(n);)if(this.forward){if(o===t.document.lineCount-1)break;o++}else{if(0===o)break;o--}return l.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,o)}}let et=class extends Xe{constructor(){super(...arguments),this.keys=["]","]"],this.begin=!0,this.forward=!0}};et=c([g.RegisterAction],et);let tt=class extends Xe{constructor(){super(...arguments),this.keys=["]","["],this.begin=!1,this.forward=!0}};tt=c([g.RegisterAction],tt);let rt=class extends Xe{constructor(){super(...arguments),this.keys=["[","["],this.begin=!0,this.forward=!1}};rt=c([g.RegisterAction],rt);let nt=class extends Xe{constructor(){super(...arguments),this.keys=["[","]"],this.begin=!1,this.forward=!1}};nt=c([g.RegisterAction],nt);let ot=a=class extends C.BaseMovement{constructor(){super(...arguments),this.keys=["%"],this.isJump=!0}async execAction(e,t){e=e.getLeftIfEOL();const r=t.document.lineAt(e).text,n=(0,C.failedMovement)(t);for(let o=e.character;o<r.length;o++){const i=r[o];if(m.PairMatcher.getPercentPairing(i))return m.PairMatcher.nextPairedChar(new T.Position(e.line,o),r[o],t,!1)||n}return n}async execActionForOperator(e,t){const r=await this.execAction(e,t);if((0,C.isIMovement)(r)){if(r.failed)return r;throw new Error("Did not ever handle this case!")}return e.isAfter(r)?{start:r,stop:e.getRight()}:r.getRight()}async execActionWithCount(e,t,r){if(Object.getPrototypeOf(this)===a.prototype){if(0===r)return t.recordedState.operator?this.execActionForOperator(e,t):this.execAction(e,t);if(r<0||r>100)return(0,C.failedMovement)(t);const n=Math.trunc((r*t.document.lineCount+99)/100)-1;return e.with({line:n}).obeyStartOfLine(t.document)}return super.execActionWithCount(e,t,r)}};ot=a=c([g.RegisterAction],ot);class it extends N{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualLine,h.Mode.VisualBlock],this.includeSurrounding=!1,this.isJump=!0}async execAction(e,t,r,n){const o=m.PairMatcher.pairings[this.charToMatch].match,[i,s]=(0,L.sorted)(t.cursorStartPosition,e);let a=m.PairMatcher.nextPairedChar(i,o,t,!0);if(void 0===a)return(0,C.failedMovement)(t);let c=m.PairMatcher.nextPairedChar(a,this.charToMatch,t,!0);if(void 0===c)return(0,C.failedMovement)(t);if(!this.includeSurrounding&&((0,h.isVisualMode)(t.currentMode)||!r)&&i.getLeftThroughLineBreaks(!1).isBeforeOrEqual(a)&&s.getRightThroughLineBreaks(!1).isAfterOrEqual(c)){const e=m.PairMatcher.nextPairedChar(a,o,t,!1),r=e?m.PairMatcher.nextPairedChar(e,this.charToMatch,t,!1):void 0;e&&r&&(a=e,c=r)}return this.includeSurrounding?t.currentMode!==h.Mode.Visual&&(c=new T.Position(c.line,c.character+1)):(a=a.getRightThroughLineBreaks(),c.isInLeadingWhitespace(t.document)&&(c=c.getLineBegin()),t.currentMode===h.Mode.Visual&&(c=c.getLeftThroughLineBreaks())),n&&!(0,h.isVisualMode)(t.currentMode)&&i.isBefore(a)&&(t.recordedState.operatorPositionDiff=a.subtract(i)),t.cursorStartPosition=a,{start:a,stop:c}}}t.MoveInsideCharacter=it;let st=class extends it{constructor(){super(...arguments),this.keys=[["i","("],["i",")"],["i","b"]],this.charToMatch="("}};st=c([g.RegisterAction],st);let at=class extends it{constructor(){super(...arguments),this.keys=[["a","("],["a",")"],["a","b"]],this.charToMatch="(",this.includeSurrounding=!0}};at=c([g.RegisterAction],at),t.MoveAroundParentheses=at;let ct=class extends it{constructor(){super(...arguments),this.keys=[["i","{"],["i","}"],["i","B"]],this.charToMatch="{"}};ct=c([g.RegisterAction],ct);let ut=class extends it{constructor(){super(...arguments),this.keys=[["a","{"],["a","}"],["a","B"]],this.charToMatch="{",this.includeSurrounding=!0}};ut=c([g.RegisterAction],ut),t.MoveAroundCurlyBrace=ut;let dt=class extends it{constructor(){super(...arguments),this.keys=[["i","<"],["i",">"]],this.charToMatch="<"}};dt=c([g.RegisterAction],dt);let lt=class extends it{constructor(){super(...arguments),this.keys=[["a","<"],["a",">"]],this.charToMatch="<",this.includeSurrounding=!0}};lt=c([g.RegisterAction],lt),t.MoveAroundCaret=lt;let ht=class extends it{constructor(){super(...arguments),this.keys=[["i","["],["i","]"]],this.charToMatch="["}};ht=c([g.RegisterAction],ht);let mt=class extends it{constructor(){super(...arguments),this.keys=[["a","["],["a","]"]],this.charToMatch="[",this.includeSurrounding=!0}};mt=c([g.RegisterAction],mt),t.MoveAroundSquareBracket=mt;class pt extends C.BaseMovement{constructor(e=!0){super(),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualBlock],this.includeQuotes=!1,this.isJump=!0,this.adjustForTrailingWhitespace=!0,this.adjustForTrailingWhitespace=e}async execActionWithCount(e,t,r){return await super.execActionWithCount(e,t,1)}async execAction(e,t){!this.includeQuotes&&(t.recordedState.count>1||t.recordedState.operatorCount>1)&&(this.includeQuotes=!0,this.adjustForTrailingWhitespace=!1);const r=t.document.lineAt(e).text,n=new p.QuoteMatcher(this.charToMatch,r).surroundingQuotes(e.character);if(void 0===n)return(0,C.failedMovement)(t);let[o,i]=n;if(this.includeQuotes){if(this.adjustForTrailingWhitespace){const e=r.substring(i+1).search(/\S|$/);e>0?i+=e:o=r.substring(0,o).search(/\s*$/)}}else o++,i--;const s=new T.Position(e.line,o),a=new T.Position(e.line,i);return!(0,h.isVisualMode)(t.currentMode)&&e.isBefore(s)&&(t.recordedState.operatorPositionDiff=s.subtract(e)),{start:s,stop:a}}async execActionForOperator(e,t){const r=await this.execAction(e,t);return(0,C.isIMovement)(r)&&(r.failed?(t.recordedState.hasRunOperator=!1,t.recordedState.actionsRun=[]):r.stop=r.stop.getRight()),r}}t.MoveQuoteMatch=pt;let gt=class extends pt{constructor(){super(...arguments),this.keys=["i","'"],this.charToMatch="'",this.includeQuotes=!1}};gt=c([g.RegisterAction],gt);let ft=class extends pt{constructor(){super(...arguments),this.keys=["a","'"],this.charToMatch="'",this.includeQuotes=!0}};ft=c([g.RegisterAction],ft),t.MoveAroundSingleQuotes=ft;let vt=class extends pt{constructor(){super(...arguments),this.keys=["i",'"'],this.charToMatch='"',this.includeQuotes=!1}};vt=c([g.RegisterAction],vt);let yt=class extends pt{constructor(){super(...arguments),this.keys=["a",'"'],this.charToMatch='"',this.includeQuotes=!0}};yt=c([g.RegisterAction],yt),t.MoveAroundDoubleQuotes=yt;let wt=class extends pt{constructor(){super(...arguments),this.keys=["i","`"],this.charToMatch="`",this.includeQuotes=!1}};wt=c([g.RegisterAction],wt);let xt=class extends pt{constructor(){super(...arguments),this.keys=["a","`"],this.charToMatch="`",this.includeQuotes=!0}};xt=c([g.RegisterAction],xt),t.MoveAroundBacktick=xt;let St=class extends ot{constructor(){super(...arguments),this.keys=["[","("]}async execAction(e,t){return m.PairMatcher.nextPairedChar(e,")",t,!1)||(0,C.failedMovement)(t)}};St=c([g.RegisterAction],St);let Ct=class extends ot{constructor(){super(...arguments),this.keys=["]",")"]}async execAction(e,t){const r=m.PairMatcher.nextPairedChar(e,"(",t,!1);return r?t.recordedState.operator instanceof d.ChangeOperator||t.recordedState.operator instanceof d.DeleteOperator||t.recordedState.operator instanceof d.YankOperator?r.getLeftThroughLineBreaks():r:(0,C.failedMovement)(t)}};Ct=c([g.RegisterAction],Ct);let Mt=class extends ot{constructor(){super(...arguments),this.keys=["[","{"]}async execAction(e,t){return m.PairMatcher.nextPairedChar(e,"}",t,!1)||(0,C.failedMovement)(t)}};Mt=c([g.RegisterAction],Mt);let bt=class extends ot{constructor(){super(...arguments),this.keys=["]","}"]}async execAction(e,t){const r=m.PairMatcher.nextPairedChar(e,"{",t,!1);return r?t.recordedState.operator instanceof d.ChangeOperator||t.recordedState.operator instanceof d.DeleteOperator||t.recordedState.operator instanceof d.YankOperator?r.getLeftThroughLineBreaks():r:(0,C.failedMovement)(t)}};bt=c([g.RegisterAction],bt);class kt extends N{constructor(){super(...arguments),this.modes=[h.Mode.Normal,h.Mode.Visual,h.Mode.VisualBlock],this.includeTag=!1,this.isJump=!0}async execAction(e,t){const r=t.document.getText(),n=t.document.offsetAt(e),o=new y.TagMatcher(r,n,t),i=o.findOpening(this.includeTag),s=o.findClosing(this.includeTag);if(void 0===i||void 0===s)return(0,C.failedMovement)(t);const a=i>=0?t.document.positionAt(i):t.cursorStartPosition;let c=s>=0?t.document.positionAt(s):e;return t.currentMode!==h.Mode.Visual&&t.currentMode!==h.Mode.SurroundInputMode||(c=c.getLeftThroughLineBreaks()),e.isAfter(c)?t.recordedState.transformer.addTransformation({type:"moveCursor",diff:c.subtract(e)}):e.isBefore(a)&&t.recordedState.transformer.addTransformation({type:"moveCursor",diff:a.subtract(e)}),t.cursorStartPosition=a,{start:a,stop:c}}}let Rt=class extends kt{constructor(){super(...arguments),this.keys=["i","t"],this.includeTag=!1}};Rt=c([g.RegisterAction],Rt),t.MoveInsideTag=Rt;let Pt=class extends kt{constructor(){super(...arguments),this.keys=["a","t"],this.includeTag=!0}};Pt=c([g.RegisterAction],Pt),t.MoveAroundTag=Pt},"./src/actions/operator.ts":function(e,t,r){"use strict";var n,o,i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.ROT13Operator=t.ChangeOperator=t.YankOperator=t.DeleteOperator=t.BaseOperator=void 0;const s=r("vscode"),a=r("./src/common/motion/position.ts"),c=r("./src/configuration/configuration.ts"),u=r("./src/mode/mode.ts"),d=r("./src/register/register.ts"),l=r("./src/textEditor.ts"),h=r("./src/actions/base.ts"),m=r("./src/actions/commands/actions.ts"),p=r("./src/util/statusBarTextUtils.ts"),g=r("./src/cmd_line/commandLine.ts"),f=r("vscode");class v extends h.BaseAction{constructor(e){super(),this.isOperator=!0,this.createsUndoPoint=!0,this.multicursorIndex=e}doesActionApply(e,t){return!(!this.doesRepeatedOperatorApply(e,t)&&(!this.modes.includes(e.currentMode)||!h.BaseAction.CompareKeypressSequence(this.keys,t)||this instanceof v&&e.recordedState.operator))}couldActionApply(e,t){return!(!this.modes.includes(e.currentMode)||!h.BaseAction.CompareKeypressSequence(this.keys.slice(0,t.length),t)||this instanceof v&&e.recordedState.operator)}doesRepeatedOperatorApply(e,t){const r=e.recordedState.actionsRun.filter((e=>!(e instanceof m.CommandNumber))),n=r[r.length-1];return 1===t.length&&n&&this.modes.includes(e.currentMode)&&n.constructor===this.constructor&&h.BaseAction.CompareKeypressSequence(n.keysPressed.slice(-1),t)}async runRepeat(e,t,r){e.currentRegisterMode=d.RegisterMode.LineWise,await this.run(e,t.getLineBegin(),t.getDown(Math.max(0,r-1)).getLineEnd())}highlightYankedRanges(e,t){if(!c.configuration.highlightedyank.enable)return;const r=s.window.createTextEditorDecorationType({backgroundColor:c.configuration.highlightedyank.color,color:c.configuration.highlightedyank.textColor});e.editor.setDecorations(r,t),setTimeout((()=>r.dispose()),c.configuration.highlightedyank.duration)}}t.BaseOperator=v;let y=class extends v{constructor(){super(...arguments),this.keys=["d"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine]}async run(e,t,r){const n=Math.abs(t.line-r.line)+1;e.currentRegisterMode===d.RegisterMode.LineWise&&(t=t.getLineBegin(),r=r.getLineEnd());const o=(r=new f.Position(r.line,r.character+1)).line===e.document.lineCount-1;e.currentMode===u.Mode.VisualBlock||o||r.character!==e.document.lineAt(r).text.length+1||(r=new f.Position(r.line+1,0));let i,c=e.document.getText(new s.Range(t,r));e.currentRegisterMode===d.RegisterMode.LineWise&&(c=c.endsWith("\r\n")?c.slice(0,-2):c.endsWith("\n")?c.slice(0,-1):c),d.Register.put(e,c,this.multicursorIndex,!0),o&&0!==t.line&&e.currentRegisterMode===d.RegisterMode.LineWise&&(t=t.getUp().getLineEnd()),e.currentRegisterMode===d.RegisterMode.LineWise?i=a.PositionDiff.startOfLine():t.character>e.document.lineAt(t).text.length&&(i=a.PositionDiff.offset({character:-1})),e.recordedState.transformer.addTransformation({type:"deleteRange",range:new s.Range(t,r),diff:i}),await e.setCurrentMode(u.Mode.Normal),(0,p.reportLinesChanged)(-n,e)}};y=i([h.RegisterAction],y),t.DeleteOperator=y;let w=class extends v{constructor(){super(...arguments),this.keys=["D"],this.modes=[u.Mode.Visual,u.Mode.VisualLine]}async run(e,t,r){e.currentRegisterMode=d.RegisterMode.LineWise,await new y(this.multicursorIndex).run(e,t,r)}};w=i([h.RegisterAction],w);let x=class extends v{constructor(){super(...arguments),this.keys=["y"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine],this.createsUndoPoint=!1}async run(e,t,r){[t,r]=(0,a.sorted)(t,r);let n=new f.Position(r.line,r.character+1);e.currentRegisterMode===d.RegisterMode.LineWise&&(t=t.getLineBegin(),n=n.getLineEnd());const o=new s.Range(t,n);let i=e.document.getText(o);e.currentMode===u.Mode.Visual&&n.character===e.document.lineAt(n).text.length+1&&(i+="\n"),this.highlightYankedRanges(e,[o]),d.Register.put(e,i,this.multicursorIndex,!0),e.cursorStopPosition=e.currentMode===u.Mode.Normal&&e.currentRegisterMode===d.RegisterMode.LineWise?t.with({character:e.cursorStopPosition.character}):t,await e.setCurrentMode(u.Mode.Normal);const c=i.split("\n").length;(0,p.reportLinesYanked)(c,e)}};x=i([h.RegisterAction],x),t.YankOperator=x;let S=class extends v{constructor(){super(...arguments),this.keys=["!"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock]}async run(e,t,r){let n;[t,r]=(0,a.sorted)(t,r),n=e.currentMode===u.Mode.Normal&&t.line===r.line?".!":e.currentMode===u.Mode.Normal&&t.line!==r.line?`.,.+${r.line-t.line}!`:"'<,'>!",e.cursorStartPosition=t,e.currentMode===u.Mode.Normal?e.cursorStopPosition=t:e.cursors=e.cursorsInitialState,e.commandLine=new g.ExCommandLine(n,e.currentMode),await e.setCurrentMode(u.Mode.CommandlineInProgress)}};S=i([h.RegisterAction],S);let C=class extends v{constructor(){super(...arguments),this.keys=["Y"],this.modes=[u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock]}async run(e,t,r){e.currentRegisterMode=d.RegisterMode.LineWise,await new x(this.multicursorIndex).run(e,t,r)}};C=i([h.RegisterAction],C);let M=class extends v{constructor(){super(...arguments),this.keys=[["x"],["<Del>"]],this.modes=[u.Mode.Visual,u.Mode.VisualLine]}async run(e,t,r){await new y(this.multicursorIndex).run(e,t,r)}};M=i([h.RegisterAction],M);let b=class extends v{constructor(){super(...arguments),this.keys=["s"],this.modes=[u.Mode.Visual,u.Mode.VisualLine]}doesActionApply(e,t){return super.doesActionApply(e,t)&&!c.configuration.sneak}async run(e,t,r){await new O(this.multicursorIndex).run(e,t,r)}};b=i([h.RegisterAction],b);let k=class extends v{constructor(){super(...arguments),this.keys=["="],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock]}async run(e,t,r){e.editor.selection=new s.Selection(t.getLineBegin(),r.getLineEnd()),await s.commands.executeCommand("editor.action.formatSelection");let n=e.cursorStartPosition.line;e.cursorStartPosition.isAfter(e.cursorStopPosition)&&(n=e.cursorStopPosition.line);const o=l.TextEditor.getFirstNonWhitespaceCharOnLine(e.document,n);e.cursorStopPosition=o,e.cursorStartPosition=o,await e.setCurrentMode(u.Mode.Normal)}};k=i([h.RegisterAction],k);class R extends v{constructor(){super(...arguments),this.modes=[u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock]}async run(e,t,r){if(e.currentMode===u.Mode.VisualBlock){for(const{start:t,end:r}of l.TextEditor.iterateLinesInBlock(e)){const n=new s.Range(t,r);e.recordedState.transformer.replace(n,this.transformText(e.document.getText(n)))}for(let n=0;n<e.editor.selections.length;n++)e.recordedState.transformer.addTransformation({type:"moveCursor",diff:a.PositionDiff.exactPosition((0,a.earlierOf)(t,r)),cursorIndex:n})}else{e.currentRegisterMode===d.RegisterMode.LineWise&&(t=t.getLineBegin(),r=r.getLineEnd());const n=new s.Range(t,new f.Position(r.line,r.character+1));e.recordedState.transformer.addTransformation({type:"replaceText",range:n,text:this.transformText(e.document.getText(n)),diff:a.PositionDiff.exactPosition(t)})}await e.setCurrentMode(u.Mode.Normal)}}let P=class extends R{constructor(){super(...arguments),this.keys=[["g","U"],["U"]]}transformText(e){return e.toUpperCase()}};P=i([h.RegisterAction],P);let _=class extends P{constructor(){super(...arguments),this.keys=[["g","U"]],this.modes=[u.Mode.Normal]}};_=i([h.RegisterAction],_);let E=class extends R{constructor(){super(...arguments),this.keys=[["g","u"],["u"]]}transformText(e){return e.toLowerCase()}};E=i([h.RegisterAction],E);let A=class extends E{constructor(){super(...arguments),this.keys=[["g","u"]],this.modes=[u.Mode.Normal]}};A=i([h.RegisterAction],A);let T=class extends R{constructor(){super(...arguments),this.keys=[["g","~"],["~"]]}transformText(e){let t="";for(const r of e){let e=r.toLocaleLowerCase();e===r&&(e=r.toLocaleUpperCase()),t+=e}return t}};T=i([h.RegisterAction],T);let L=class extends T{constructor(){super(...arguments),this.keys=[["g","~"]],this.modes=[u.Mode.Normal]}};L=i([h.RegisterAction],L);let $=class extends v{constructor(){super(...arguments),this.modes=[u.Mode.Normal],this.keys=[">"]}async run(e,t,r){e.editor.selection=new s.Selection(t.getLineBegin(),r.getLineEnd()),await s.commands.executeCommand("editor.action.indentLines"),await e.setCurrentMode(u.Mode.Normal),e.cursorStopPosition=t.obeyStartOfLine(e.document)}};$=i([h.RegisterAction],$);let B=class extends v{constructor(){super(...arguments),this.modes=[u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock],this.keys=[">"]}async run(e,t,r){if(e.isRunningDotCommand&&e.dotCommandPreviousVisualSelection&&e.cursorStartPosition.isAfter(e.cursorStopPosition)){const r=e.dotCommandPreviousVisualSelection.end.line-e.dotCommandPreviousVisualSelection.start.line;t=e.cursorStartPosition;const n=e.cursorStartPosition.getDown(r);e.editor.selection=new s.Selection(t,n)}for(let t=0;t<(e.recordedState.count||1);t++)await s.commands.executeCommand("editor.action.indentLines");await e.setCurrentMode(u.Mode.Normal),e.cursorStopPosition=t.obeyStartOfLine(e.document)}};B=i([h.RegisterAction],B);let I=class extends v{constructor(){super(...arguments),this.modes=[u.Mode.Normal],this.keys=["<"]}async run(e,t,r){e.editor.selection=new s.Selection(t,r.getLineEnd()),await s.commands.executeCommand("editor.action.outdentLines"),await e.setCurrentMode(u.Mode.Normal),e.cursorStopPosition=l.TextEditor.getFirstNonWhitespaceCharOnLine(e.document,t.line)}};I=i([h.RegisterAction],I);let N=class extends v{constructor(){super(...arguments),this.modes=[u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock],this.keys=["<"]}async run(e,t,r){if(e.isRunningDotCommand&&e.dotCommandPreviousVisualSelection&&e.cursorStartPosition.isAfter(e.cursorStopPosition)){const r=e.dotCommandPreviousVisualSelection.end.line-e.dotCommandPreviousVisualSelection.start.line;t=e.cursorStartPosition;const n=e.cursorStartPosition.getDown(r);e.editor.selection=new s.Selection(t,n)}for(let t=0;t<(e.recordedState.count||1);t++)await s.commands.executeCommand("editor.action.outdentLines");await e.setCurrentMode(u.Mode.Normal),e.cursorStopPosition=l.TextEditor.getFirstNonWhitespaceCharOnLine(e.document,t.line)}};N=i([h.RegisterAction],N);let O=class extends v{constructor(){super(...arguments),this.keys=["c"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine]}async run(e,t,r){e.currentRegisterMode===d.RegisterMode.LineWise?(t=t.getLineBegin(),r=r.getLineEnd()):r=e.currentMode===u.Mode.Visual&&r.isLineEnd()?r.getRightThroughLineBreaks():r.getRight();const n=new s.Range(t,r);if(d.Register.put(e,e.document.getText(n),this.multicursorIndex,!0),e.currentRegisterMode===d.RegisterMode.LineWise&&c.configuration.autoindent){const t=e.document.getText(new s.Range(n.start.getLineBegin(),n.start.getLineBeginRespectingIndent(e.document)));e.recordedState.transformer.replace(n,t,a.PositionDiff.exactPosition(new f.Position(n.start.line,t.length))),"plaintext"!==e.document.languageId&&e.recordedState.transformer.addTransformation({type:"reindent",cursorIndex:this.multicursorIndex,diff:a.PositionDiff.endOfLine()})}else e.recordedState.transformer.delete(n);e.setCurrentMode(u.Mode.Insert)}};O=i([h.RegisterAction],O),t.ChangeOperator=O;let V=class extends v{constructor(){super(...arguments),this.keys=["y"],this.modes=[u.Mode.VisualBlock],this.createsUndoPoint=!1}runsOnceForEveryCursor(){return!1}async run(e,t,r){const n=[],o=[];for(const{line:t,start:r,end:i}of l.TextEditor.iterateLinesInBlock(e))o.push(t),n.push(new s.Range(r,i));e.currentRegisterMode=d.RegisterMode.BlockWise,this.highlightYankedRanges(e,n),d.Register.put(e,o.join("\n"),this.multicursorIndex,!0),e.historyTracker.addMark(t,"<"),e.historyTracker.addMark(r,">");const i=o.length;(0,p.reportLinesYanked)(i,e),await e.setCurrentMode(u.Mode.Normal),e.cursorStopPosition=t}};V=i([h.RegisterAction],V);let D=class extends v{constructor(){super(...arguments),this.keys=["g","c"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock]}async run(e,t,r){e.editor.selection=new s.Selection(t.getLineBegin(),r.getLineEnd()),await s.commands.executeCommand("editor.action.commentLine"),e.cursorStopPosition=new f.Position(t.line,0),await e.setCurrentMode(u.Mode.Normal)}};D=i([h.RegisterAction],D);let F=n=class extends v{constructor(){super(...arguments),this.keys=["g","?"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine,u.Mode.VisualBlock]}async run(e,t,r){let o;o=(0,u.isVisualMode)(e.currentMode)?e.editor.selections:e.currentRegisterMode===d.RegisterMode.LineWise?[new s.Selection(t.getLineBegin(),r.getLineEnd())]:[new s.Selection(t,r.getRight())];for(const t of o){const r=e.document.getText(t);e.recordedState.transformer.replace(t,n.rot13(r))}}static rot13(e){return e.split("").map((e=>{let t=e.charCodeAt(0);if(e>="a"&&e<="z"){const e="a".charCodeAt(0);t=(t-e+13)%26+e}if(e>="A"&&e<="Z"){const e="A".charCodeAt(0);t=(t-e+13)%26+e}return String.fromCharCode(t)})).join("")}};F=n=i([h.RegisterAction],F),t.ROT13Operator=F;let j=class extends v{constructor(){super(...arguments),this.keys=["g","C"],this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine]}async run(e,t,r){if(e.currentMode===u.Mode.Normal){const n=r.getRight();e.editor.selection=new s.Selection(t,n)}await s.commands.executeCommand("editor.action.blockComment"),e.cursorStopPosition=t,await e.setCurrentMode(u.Mode.Normal)}};j=i([h.RegisterAction],j);let W=o=class extends v{constructor(){super(...arguments),this.modes=[u.Mode.Normal,u.Mode.Visual,u.Mode.VisualLine],this.keys=["g","q"]}getIndentation(e){for(const t of e.split("\n")){const e=t.match(/^\s+/g),r=e?e[0]:"";if(r!==t)return r}return""}reflowParagraph(e){const t=this.getIndentation(e);let r=0;for(const e of t)r+="\t"===e?c.configuration.tabstop:1;const n=c.configuration.textwidth-r,i=[];for(const t of e.split("\n")){let e=i[i.length-1];const r=t.trimStart();let n;for(const t of o.CommentTypes){if(r.startsWith(t.start)){n=t;break}if(e&&!e.final&&t.start===e.commentType.start&&!t.singleLine){if(r.startsWith(t.inner)){n=t;break}if(r.endsWith(t.final)){n=t;break}}}if(!n)break;if(e&&!e.final&&n.start===e.commentType.start){if(e=i[i.length-1],e.commentType.singleLine)e.content+=`\n${r.substr(e.commentType.start.length).trimStart()}`;else if(!e.final)if(r.endsWith(e.commentType.final)){e.final=!0;const t=r.startsWith(e.commentType.inner)?e.commentType.inner.length:0;e.content+=`\n${r.substr(t,r.length-e.commentType.final.length-t).trim()}`}else r.startsWith(e.commentType.inner)?e.content+=`\n${r.substr(e.commentType.inner.length).trimStart()}`:r.startsWith(e.commentType.start)&&(e.content+=`\n${r.substr(e.commentType.start.length).trimStart()}`)}else{const e={commentType:n,content:`${r.substr(n.start.length).trimStart()}`,indentLevelAfterComment:0,final:!1};n.singleLine?e.indentLevelAfterComment=r.substr(n.start.length).length-e.content.length:e.content.endsWith(n.final)&&(e.content=e.content.substr(0,e.content.length-n.final.length).trim(),e.final=!0),i.push(e)}}const s=[];for(const{commentType:e,content:r,indentLevelAfterComment:o}of i){let i;const a=Array(o+1).join(" "),u=e.start.length+a.length;i=[""];for(let e of r.split("\n"))if(""!==e.trim())for(;e;){const t=i[i.length-1];let r;r=t?c.configuration.joinspaces&&(t.endsWith(".")||t.endsWith("?")||t.endsWith("!"))?" ":t.endsWith(" ")?c.configuration.joinspaces&&(t.endsWith(". ")||t.endsWith("? ")||t.endsWith("! "))?" ":"":" ":"";const o=n-r.length-t.length-u,s=e.trimStart();if(s.length<=o){i[i.length-1]+=`${r}${s}`;break}{let n=Math.max(s.lastIndexOf(" ",o),s.lastIndexOf("\t",o));if(n<0){if(t){i.push("");continue}n=s.search(/[ \t]/),n<0&&(n=e.length)}i[i.length-1]+=`${r}${s.slice(0,n).trimEnd()}`,e=e.slice(n+1),i.push("")}}else""===i[i.length-1]&&i.pop(),i.push(e),i.push("");""===i[i.length-1]&&i.pop();for(let r=0;r<i.length;r++)e.singleLine?i[r]=`${t}${e.start}${a}${i[r]}`:0===r?(""===i[r]?i[r]=`${t}${e.start}`:i[r]=`${t}${e.start} ${i[r]}`,r===i.length-1&&(i[r]+=` ${e.final}`)):r===i.length-1?""===i[r]?i[r]=`${t} ${e.final}`:i[r]=`${t} ${e.inner} ${i[r]} ${e.final}`:""===i[r]?i[r]=`${t} ${e.inner}`:i[r]=`${t} ${e.inner} ${i[r]}`;s.push(...i)}return s.join("\n")}async run(e,t,r){[t,r]=(0,a.sorted)(t,r),t=t.getLineBegin(),r=r.getLineEnd();let n=e.document.getText(new s.Range(t,r));n=this.reflowParagraph(n),e.recordedState.transformer.addTransformation({type:"replaceText",text:n,range:new s.Range(t,r),diff:a.PositionDiff.exactCharacter({character:0})}),await e.setCurrentMode(u.Mode.Normal)}};W.CommentTypes=[{singleLine:!1,start:"/**",inner:"*",final:"*/"},{singleLine:!1,start:"/*",inner:"*",final:"*/"},{singleLine:!1,start:"{-",inner:"-",final:"-}"},{singleLine:!0,start:"///"},{singleLine:!0,start:"//!"},{singleLine:!0,start:"//"},{singleLine:!0,start:"--"},{singleLine:!0,start:"#"},{singleLine:!0,start:";"},{singleLine:!0,start:"*"},{singleLine:!0,start:"%"},{singleLine:!0,start:""}],W=o=i([h.RegisterAction],W)},"./src/actions/plugins/easymotion/easymotion.cmd.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.EasyMotionLineMoveCommandBase=t.EasyMotionWordMoveCommandBase=t.EasyMotionCharMoveCommandBase=t.SearchByNCharCommand=t.SearchByCharCommand=t.buildTriggerKeys=void 0;const o=r("./src/configuration/configuration.ts"),i=r("./src/mode/mode.ts"),s=r("./src/actions/base.ts"),a=r("./src/actions/plugins/easymotion/easymotion.ts"),c=r("./src/state/globalState.ts"),u=r("./src/textEditor.ts"),d=r("./src/actions/plugins/easymotion/markerGenerator.ts"),l=r("vscode");t.buildTriggerKeys=function(e){return[...Array.from({length:e.leaderCount||2},(()=>"<leader>")),...e.key.split("")]};class h extends s.BaseCommand{constructor(e){super(),this.modes=[i.Mode.Normal,i.Mode.Visual,i.Mode.VisualLine,i.Mode.VisualBlock],this._baseOptions=e}processMarkers(e,t,r){r.easyMotion.clearMarkers();let n=0;const o=new d.MarkerGenerator(e.length);for(const i of e){const e=this.resolveMatchPosition(i);if(!e.isEqual(t)){const t=o.generateMarker(n++,e);t&&r.easyMotion.addMarker(t)}}}searchOptions(e){switch(this._baseOptions.searchOptions){case"min":return{min:e};case"max":return{max:e};default:return{}}}async exec(e,t){if(o.configuration.easymotion){const r=this.getMatches(e,t);if((0,i.isVisualMode)(t.easyMotion.previousMode)&&(t.cursorStartPosition=t.lastVisualSelection.start,t.cursorStopPosition=t.lastVisualSelection.end),r.length>0)if(t.easyMotion=new a.EasyMotion,this.processMarkers(r,e,t),1===r.length){const e=t.easyMotion.markers[0];t.cursorStopPosition=e.position,t.easyMotion.clearDecorations(t.editor)}else t.easyMotion.previousMode=t.currentMode,await t.setCurrentMode(i.Mode.EasyMotionMode)}}}function m(e,t,r,n){switch(r){case"":return[];case" ":return t.easyMotion.sortedSearch(t.document,e,new RegExp(" {1,}","g"),n);default:if(!/[a-zA-Z]/.test(r))return t.easyMotion.sortedSearch(t.document,e,r,n);const i=!o.configuration.ignorecase||o.configuration.smartcase&&/[A-Z]/.test(r)?"g":"gi";return t.easyMotion.sortedSearch(t.document,e,new RegExp(r,i),n)}}t.SearchByCharCommand=class extends h{constructor(e){super(e),this.keys=[],this.searchString="",this._options=e}get searchCharCount(){return this._options.charCount}getMatches(e,t){return m(e,t,this.searchString,this.searchOptions(e))}shouldFire(){const e=this._options.charCount;return!e||this.searchString.length>=e}async fire(e,t){await this.exec(e,t)}resolveMatchPosition(e){const{line:t,character:r}=e.position;switch(this._options.labelPosition){case"after":return new l.Position(t,r+this._options.charCount);case"before":return new l.Position(t,Math.max(0,r-1));default:return e.position}}},t.SearchByNCharCommand=class extends h{constructor(){super({}),this.keys=[],this.searchString=""}get searchCharCount(){return-1}resolveMatchPosition(e){return e.position}getMatches(e,t){return m(e,t,this.removeTrailingLineBreak(this.searchString),{})}removeTrailingLineBreak(e){return e.replace(new RegExp("\n+$","g"),"")}shouldFire(){return this.searchString.endsWith("\n")}async fire(e,t){""!==this.removeTrailingLineBreak(this.searchString)&&await this.exec(e,t)}};class p extends s.BaseCommand{constructor(e){super(),this.modes=[i.Mode.Normal,i.Mode.Visual,i.Mode.VisualLine,i.Mode.VisualBlock],this._action=e}async exec(e,t){o.configuration.easymotion&&(t.easyMotion=new a.EasyMotion,t.easyMotion.previousMode=t.currentMode,t.easyMotion.searchAction=this._action,c.globalState.hl=!0,await t.setCurrentMode(i.Mode.EasyMotionInputMode))}}t.EasyMotionCharMoveCommandBase=p,t.EasyMotionWordMoveCommandBase=class extends h{constructor(e={}){super(e),this._options=e}getMatches(e,t){return this.getMatchesForWord(e,t,this.searchOptions(e))}resolveMatchPosition(e){const{line:t,character:r}=e.position;switch(this._options.labelPosition){case"after":return new l.Position(t,r+e.text.length-1);default:return e.position}}getMatchesForWord(e,t,r){const n=this._options.jumpToAnywhere?new RegExp(o.configuration.easymotionJumpToAnywhereRegex,"g"):new RegExp("\\w{1,}","g");return t.easyMotion.sortedSearch(t.document,e,n,r)}},t.EasyMotionLineMoveCommandBase=class extends h{constructor(e={}){super(e),this._options=e}resolveMatchPosition(e){return e.position}getMatches(e,t){return this.getMatchesForLineStart(e,t,this.searchOptions(e))}getMatchesForLineStart(e,t,r){const n=t.easyMotion.sortedSearch(t.document,e,new RegExp("^.","gm"),r);for(const e of n)e.position=u.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,e.position.line);return n}};let g=class extends s.BaseCommand{constructor(){super(...arguments),this.modes=[i.Mode.EasyMotionInputMode],this.keys=["<character>"]}async exec(e,t){const r=this.keysPressed[0],n=t.easyMotion.searchAction;n.searchString="<BS>"===r||"<S-BS>"===r?n.searchString.slice(0,-1):n.searchString+r,n.shouldFire()&&(await t.setCurrentMode(t.easyMotion.previousMode),await n.fire(t.cursorStopPosition,t))}};g=n([s.RegisterAction],g);let f=class extends s.BaseCommand{constructor(){super(...arguments),this.modes=[i.Mode.EasyMotionInputMode],this.keys=["<Esc>"]}async exec(e,t){await t.setCurrentMode(i.Mode.Normal)}};f=n([s.RegisterAction],f);let v=class extends s.BaseCommand{constructor(){super(...arguments),this.modes=[i.Mode.EasyMotionMode],this.keys=["<character>"],this.isJump=!0}async exec(e,t){const r=this.keysPressed[0];if(r){const e=t.easyMotion.accumulation+r;t.easyMotion.accumulation=e;const n=t.easyMotion.findMarkers(e,!0);if((0,i.isVisualMode)(t.easyMotion.previousMode)&&(t.cursorStartPosition=t.lastVisualSelection.start,t.cursorStopPosition=t.lastVisualSelection.end),1===n.length){const e=n[0];t.easyMotion.clearDecorations(t.editor),await t.setCurrentMode(t.easyMotion.previousMode),t.cursorStopPosition=e.position}else 0===n.length&&(t.easyMotion.clearDecorations(t.editor),await t.setCurrentMode(t.easyMotion.previousMode))}}};v=n([s.RegisterAction],v)},"./src/actions/plugins/easymotion/easymotion.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EasyMotion=void 0;const n=r("vscode"),o=r("./src/configuration/configuration.ts"),i=r("./src/textEditor.ts"),s=r("./src/actions/plugins/easymotion/types.ts"),a=r("vscode");class c{constructor(){this.accumulation="",this.markers=[],this.visibleMarkers=[],this.decorations=[]}static getDecorationType(e,t){const r=this.decorationTypeCache[e];if(r)return r;{const r=n.window.createTextEditorDecorationType(t||{});return this.decorationTypeCache[e]=r,r}}clearDecorations(e){for(let t=1;t<=this.decorations.length;t++)e.setDecorations(c.getDecorationType(t),[]);e.setDecorations(c.fade,[]),e.setDecorations(c.hide,[])}clearMarkers(){for(;this.markers.length;)this.markers.pop();this.visibleMarkers=[]}addMarker(e){this.markers.push(e)}findMarkers(e,t){return(t?this.visibleMarkers:this.markers).filter((t=>t.name.startsWith(e)))}sortedSearch(e,t,r="",n={}){const o="string"==typeof r?new RegExp(r.replace(c.specialCharactersRegex,"\\$&"),"g"):r,i=[];let u,d=t.character;const l=e.lineCount,h=n.min?Math.max(n.min.line,0):0,m=n.max?Math.min(n.max.line+1,l):l;e:for(let r=h;r<m;r++){const c=e.lineAt(r).text;let l=o.exec(c);for(;l;){if(i.length>=1e3)break e;{const e=new a.Position(r,l.index);n.min&&e.isBefore(n.min)||n.max&&e.isAfter(n.max)||Math.abs(e.line-t.line)>100||(u&&!u.position.isBefore(t)||(d=i.length),e.isEqual(t)||(u=new s.Match(e,l[0],i.length),i.push(u))),l=o.exec(c)}}}return i.sort(((e,t)=>{return r(e.index)-r(t.index);function r(e){const t=Math.abs(d-e);return e<d?t-.5:t}})),i}getMarkerColor(e,t){return e||(t.startsWith("#")?t:new n.ThemeColor(t))}getEasymotionMarkerBackgroundColor(){return this.getMarkerColor(o.configuration.easymotionMarkerBackgroundColor,"#0000")}getEasymotionMarkerForegroundColorOneChar(){return this.getMarkerColor(o.configuration.easymotionMarkerForegroundColorOneChar,"#ff0000")}getEasymotionMarkerForegroundColorTwoCharFirst(){return this.getMarkerColor(o.configuration.easymotionMarkerForegroundColorTwoCharFirst,"#ffb400")}getEasymotionMarkerForegroundColorTwoCharSecond(){return this.getMarkerColor(o.configuration.easymotionMarkerForegroundColorTwoCharSecond,"#b98300")}getEasymotionDimColor(){return this.getMarkerColor(o.configuration.easymotionDimColor,"#777777")}updateDecorations(e){this.clearDecorations(e),this.visibleMarkers=[],this.decorations=[];const t=[],r={color:this.getEasymotionDimColor()},s=[],u=this.markers.filter((e=>e.name.startsWith(this.accumulation))).sort(((e,t)=>e.position.isBefore(t.position)?-1:1));for(const e of u){const i=e.position,a=e.name.substr(this.accumulation.length);this.decorations[a.length]||(this.decorations[a.length]=[]);let c=0;const d=u[u.indexOf(e)+1];if(d&&d.position.character-i.character==1&&d.position.line===i.line){const e=d.name.substr(this.accumulation.length);a.length>1&&e.length>1&&(c=-1)}const l=a.length>1?this.getEasymotionMarkerForegroundColorTwoCharFirst():this.getEasymotionMarkerForegroundColorOneChar(),h=this.getEasymotionMarkerBackgroundColor(),m=new n.Range(i.line,i.character,i.line,i.character),p={before:{contentText:a.substring(0,1),backgroundColor:h,color:l,margin:`0 -1ch 0 0;\n position: absolute;\n font-weight: ${o.configuration.easymotionMarkerFontWeight};`,height:"100%"}};if(this.decorations[a.length].push({range:m,renderOptions:{dark:p,light:p}}),a.length+c>1){const e=this.getEasymotionMarkerForegroundColorTwoCharSecond(),t=new n.Range(i.line,i.character+1,i.line,i.character+1),r={before:{contentText:a.slice(1),backgroundColor:h,color:e,margin:`0 -1ch 0 0;\n position: absolute;\n font-weight: ${o.configuration.easymotionMarkerFontWeight};`,height:"100%"}};this.decorations[a.length].push({range:t,renderOptions:{dark:r,light:r}})}if(s.push(new n.Range(i.line,i.character,i.line,i.character+a.length+c)),o.configuration.easymotionDimBackground)if(0===t.length)t.push({range:new n.Range(0,0,i.line,i.character),renderOptions:r});else{const o=u[u.indexOf(e)-1],s=o.name.substr(this.accumulation.length),a=o.position,c=a.withColumn(a.character+s.length);c.isAfterOrEqual(i)||t.push({range:new n.Range(c.line,c.character,i.line,i.character),renderOptions:r})}this.visibleMarkers.push(e)}if(o.configuration.easymotionDimBackground){const o=u[u.length-1].name.substr(this.accumulation.length),s=t[t.length-1].range.end,c=s.withColumn(s.character+o.length);c.isEqual(i.TextEditor.getDocumentEnd(e.document))||t.push({range:new n.Range(c,new a.Position(e.document.lineCount,Number.MAX_VALUE)),renderOptions:r})}for(let t=1;t<this.decorations.length;t++)this.decorations[t]&&e.setDecorations(c.getDecorationType(t),this.decorations[t]);e.setDecorations(c.hide,s),o.configuration.easymotionDimBackground&&e.setDecorations(c.fade,t)}}t.EasyMotion=c,c.fade=n.window.createTextEditorDecorationType({color:o.configuration.easymotionDimColor}),c.hide=n.window.createTextEditorDecorationType({color:"transparent"}),c.specialCharactersRegex=/[\-\[\]{}()*+?.,\\\^$|#\s]/g,c.decorationTypeCache=[]},"./src/actions/plugins/easymotion/markerGenerator.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerGenerator=void 0;const n=r("./src/configuration/configuration.ts");t.MarkerGenerator=class{constructor(e){this.matchesCount=e,this.keyTable=this.getKeyTable(),this.prefixKeyTable=this.createPrefixKeyTable()}generateMarker(e,t){const{keyTable:r,prefixKeyTable:n}=this;if(e>=r.length-n.length){const o=e-(r.length-n.length),i=Math.floor(o/r.length)+1;return i>n.length?null:{name:n[i-1]+r[o%r.length],position:t}}return{name:r[e],position:t}}createPrefixKeyTable(){const e=Math.max(this.matchesCount-this.keyTable.length,0),t=Math.ceil(e/this.keyTable.length),r=this.keyTable.slice().reverse(),n=Math.min(t,r.length);return r.slice(0,n)}getKeyTable(){return n.configuration.easymotionKeys?n.configuration.easymotionKeys.split(""):"hklyuiopnm,qwertzxcvbasdgjf;".split("")}}},"./src/actions/plugins/easymotion/types.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Match=void 0;const n=r("vscode");t.Match=class{constructor(e,t,r){this.position=e,this.text=t,this.index=r}toRange(){return new n.Range(this.position,this.position.translate(0,this.text.length))}}},"./src/actions/plugins/pluginDefaultMappings.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PluginDefaultMappings=void 0;class r{static getPluginDefaultMappings(e,t){return this.defaultMappings.filter((r=>r.mode===e&&t[r.configSwitch])).map((e=>e.mapping))}}t.PluginDefaultMappings=r,r.defaultMappings=[{mode:"normalModeKeyBindingsNonRecursive",configSwitch:"surround",mapping:{before:["y","s"],after:["<plugys>"]}},{mode:"normalModeKeyBindingsNonRecursive",configSwitch:"surround",mapping:{before:["y","s","s"],after:["<plugys>","<plugys>"]}},{mode:"normalModeKeyBindingsNonRecursive",configSwitch:"surround",mapping:{before:["c","s"],after:["<plugcs>"]}},{mode:"normalModeKeyBindingsNonRecursive",configSwitch:"surround",mapping:{before:["d","s"],after:["<plugds>"]}}]},"./src/actions/plugins/sneak.ts":function(e,t,r){"use strict";var n,o,i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.SneakBackward=t.SneakForward=void 0;const s=r("./src/configuration/configuration.ts"),a=r("./src/actions/base.ts"),c=r("./src/actions/baseMotion.ts"),u=r("vscode");let d=n=class extends c.BaseMovement{constructor(){super(...arguments),this.keys=[["s","<character>","<character>"],["z","<character>","<character>"]],this.isJump=!0}couldActionApply(e,t){const r=void 0===e.recordedState.operator?"s":"z";return s.configuration.sneak&&super.couldActionApply(e,t)&&t[0]===r}async execAction(e,t){this.isRepeat||(t.lastSemicolonRepeatableMovement=new n(this.keysPressed,!0),t.lastCommaRepeatableMovement=new l(this.keysPressed,!0)),"\n"===this.keysPressed[2]&&(this.keysPressed[2]="");const r=this.keysPressed[1]+this.keysPressed[2],o=t.document,i=o.lineCount;for(let t=e.line;t<i;++t){const n=o.lineAt(t).text,i=t===e.line?e.character+1:0;let a=-1;if(a=!s.configuration.sneakUseIgnorecaseAndSmartcase||!s.configuration.ignorecase||s.configuration.smartcase&&/[A-Z]/.test(r)?n.indexOf(r,i):n.toLocaleLowerCase().indexOf(r.toLocaleLowerCase(),i),a>=0)return new u.Position(t,a)}return e}};d=n=i([a.RegisterAction],d),t.SneakForward=d;let l=o=class extends c.BaseMovement{constructor(){super(...arguments),this.keys=[["S","<character>","<character>"],["Z","<character>","<character>"]],this.isJump=!0}couldActionApply(e,t){const r=void 0===e.recordedState.operator?"S":"Z";return s.configuration.sneak&&super.couldActionApply(e,t)&&t[0]===r}async execAction(e,t){this.isRepeat||(t.lastSemicolonRepeatableMovement=new o(this.keysPressed,!0),t.lastCommaRepeatableMovement=new d(this.keysPressed,!0)),"\n"===this.keysPressed[2]&&(this.keysPressed[2]="");const r=this.keysPressed[1]+this.keysPressed[2],n=t.document;for(let t=e.line;t>=0;--t){const o=n.lineAt(t).text,i=t===e.line?e.character-1:1/0;let a=-1;if(a=!s.configuration.sneakUseIgnorecaseAndSmartcase||!s.configuration.ignorecase||s.configuration.smartcase&&/[A-Z]/.test(r)?o.lastIndexOf(r,i):o.toLocaleLowerCase().lastIndexOf(r.toLocaleLowerCase(),i),a>=0)return new u.Position(t,a)}return e}};l=o=i([a.RegisterAction],l),t.SneakBackward=l},"./src/actions/wrapping.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldWrapKey=void 0;const n=r("./src/configuration/configuration.ts"),o=r("./src/mode/mode.ts");t.shouldWrapKey=(e,t)=>{let r;if("<left>"===t)r=[o.Mode.Insert,o.Mode.Replace].includes(e)?"[":"<";else if("<right>"===t)r=[o.Mode.Insert,o.Mode.Replace].includes(e)?"]":">";else if(["<BS>","<C-BS>","<S-BS>"].includes(t))r="b";else if(" "===t)r="s";else{if(!["h","l","~"].includes(t))throw new Error(`shouldWrapKey called with unexpected key='${t}'`);r=t}return n.configuration.whichwrap.split(",").includes(r)}},"./src/cmd_line/commandLine.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchCommandLine=t.ExCommandLine=t.CommandLine=void 0;const n=r("./src/history/historyFile.ts"),o=r("./src/mode/mode.ts"),i=r("./src/util/logger.ts"),s=r("./src/statusBar.ts"),a=r("./src/error.ts"),c=r("./src/configuration/configuration.ts"),u=r("./src/register/register.ts"),d=r("./src/state/recordedState.ts"),l=r("./src/vimscript/exCommandParser.ts"),h=r("./src/state/searchState.ts"),m=r("./src/textobject/word.ts"),p=r("./src/actions/commands/actions.ts"),g=r("./src/vimscript/pattern.ts"),f=r("./src/util/statusBarTextUtils.ts"),v=r("./src/util/decorationUtils.ts"),y=r("vscode"),w=r("./src/state/globalState.ts"),x=r("./src/util/util.ts"),S=r("./src/cmd_line/commands/register.ts"),C=r("./src/cmd_line/commands/substitute.ts");class M{constructor(e,t){this.cursorIndex=e.length,this.historyIndex=this.getHistory().get().length,this.previousMode=t,this.savedText=e}async historyBack(){if(0===this.historyIndex)return;const e=this.getHistory().get();void 0===this.historyIndex?(this.historyIndex=e.length-1,this.savedText=this.text):this.historyIndex>0&&this.historyIndex--,this.text=e[this.historyIndex],this.cursorIndex=this.text.length}async historyForward(){if(void 0===this.historyIndex)return;const e=this.getHistory().get();this.historyIndex===e.length-1?(this.historyIndex=void 0,this.text=this.savedText):this.historyIndex<e.length-1&&(this.historyIndex++,this.text=e[this.historyIndex]),this.cursorIndex=this.text.length}async backspace(e){if(0===this.cursorIndex)return this.escape(e);this.text=this.text.slice(0,this.cursorIndex-1)+this.text.slice(this.cursorIndex),this.cursorIndex=Math.max(this.cursorIndex-1,0)}async delete(e){return 0===this.cursorIndex?this.escape(e):this.cursorIndex===this.text.length?this.backspace(e):void(this.text=this.text.slice(0,this.cursorIndex)+this.text.slice(this.cursorIndex+1))}async home(){this.cursorIndex=0}async end(){this.cursorIndex=this.text.length}async wordLeft(){var e;this.cursorIndex=null!==(e=(0,m.getWordLeftInText)(this.text,this.cursorIndex,m.WordType.Big))&&void 0!==e?e:0}async wordRight(){var e;this.cursorIndex=null!==(e=(0,m.getWordRightInText)(this.text,this.cursorIndex,m.WordType.Big))&&void 0!==e?e:this.text.length}async deleteWord(){const e=(0,m.getWordLeftInText)(this.text,this.cursorIndex,m.WordType.Normal);void 0!==e&&(this.text=this.text.substring(0,e).concat(this.text.slice(this.cursorIndex)),this.cursorIndex=this.cursorIndex-(this.cursorIndex-e))}async deleteToBeginning(){this.text=this.text.slice(this.cursorIndex),this.cursorIndex=0}async typeCharacter(e){const t=this.text.split("");t.splice(this.cursorIndex,0,e),this.text=t.join(""),this.cursorIndex+=e.length}}t.CommandLine=M;class b extends M{constructor(e,t){super(e,t),this.autoCompleteIndex=0,this.autoCompleteItems=[],this.preCompleteCharacterPos=0,this.preCompleteCommand="",this.commandText=e,this.text=e,this.previousMode=t}static async loadHistory(e){b.history=new n.CommandLineHistory(e),await b.history.load()}display(e){return(0,f.escapeCSSIcons)(`:${this.text.substring(0,this.cursorIndex)}${e}${this.text.substring(this.cursorIndex)}`)}get text(){return this.commandText}set text(e){this.commandText=e;try{const{lineRange:e,command:t}=l.exCommandParser.tryParse(this.commandText);this.lineRange=e,this.command=t}catch(e){this.lineRange=void 0,this.command=void 0}}getSearchState(){}getDecorations(e){return this.command instanceof C.SubstituteCommand&&e.currentMode===o.Mode.CommandlineInProgress?this.command.getSubstitutionDecorations(e,this.lineRange):void 0}getHistory(){return b.history}async run(e){var t,r;if(b.history.add(this.text),this.historyIndex=b.history.get().length,!(this.command instanceof S.RegisterCommand)){const e=new d.RecordedState;e.registerName=":",e.commandList=this.text.split(""),u.Register.setReadonlyRegister(":",e)}try{if(void 0===this.command)throw l.exCommandParser.tryParse(this.text),new Error(`Expected parsing ExCommand '${this.text}' to fail`);if(c.configuration.enableNeovim&&this.command.neovimCapable()&&e.nvim){const{statusBarText:t,error:r}=await e.nvim.run(e,this.text);s.StatusBar.setText(e,t,r)}else this.lineRange?await this.command.executeWithRange(e,this.lineRange):await this.command.execute(e)}catch(t){if(t instanceof a.VimError)if(t.code===a.ErrorCode.NotAnEditorCommand&&c.configuration.enableNeovim&&e.nvim){const{statusBarText:t}=await e.nvim.run(e,this.text);s.StatusBar.setText(e,t,!0)}else s.StatusBar.setText(e,t.toString(),!0);else b.logger.error(`Error executing cmd=${this.text}. err=${t}.`)}e.lastCommandDotRepeatable=null!==(r=null===(t=this.command)||void 0===t?void 0:t.isRepeatableWithDot)&&void 0!==r&&r,await e.setCurrentMode(o.Mode.Normal)}async escape(e){await e.setCurrentMode(o.Mode.Normal),this.text.length>0&&b.history.add(this.text)}async ctrlF(e){(new p.CommandShowCommandHistory).exec(e.cursorStopPosition,e)}}t.ExCommandLine=b,b.logger=i.Logger.get("CommandLine");class k extends M{constructor(e,t,r){super(t,e.currentMode),this.currentMatchDisplacement=0,this.searchState=new h.SearchState(r,e.cursorStopPosition,t)}static async showSearchHistory(){const e=k.previousSearchStates.slice().reverse().map((e=>({label:e.searchString,searchState:e}))),t=await y.window.showQuickPick(e,{placeHolder:"Vim search history",ignoreFocusOut:!1});return null==t?void 0:t.searchState}static async loadHistory(e){k.history=new n.SearchHistory(e),k.history.get().forEach((e=>k.previousSearchStates.push(new h.SearchState(g.SearchDirection.Forward,new y.Position(0,0),e,void 0))))}static async addSearchStateToHistory(e){const t=0===k.previousSearchStates.length?void 0:k.previousSearchStates[k.previousSearchStates.length-1].searchString;e.searchString!==t&&(k.previousSearchStates.push(e),void 0!==k.history&&await k.history.add(e.searchString)),k.previousSearchStates.length>c.configuration.history&&k.previousSearchStates.splice(0,1)}display(e){return(0,f.escapeCSSIcons)(`${this.searchState.direction===g.SearchDirection.Forward?"/":"?"}${this.text.substring(0,this.cursorIndex)}${e}${this.text.substring(this.cursorIndex)}`)}get text(){return this.searchState.searchString}set text(e){this.searchState.searchString=e,""===e&&(this.currentMatchDisplacement=0)}getSearchState(){return this.searchState}getHistory(){return k.history}getCurrentMatchRelativeIndex(e){const t=e.recordedState.count||1;return t-1+this.currentMatchDisplacement*t}getCurrentMatchPosition(e){return this.searchState.getNextSearchMatchPosition(e,e.cursorStopPosition,g.SearchDirection.Forward,this.getCurrentMatchRelativeIndex(e))}getCurrentMatchRange(e){return this.searchState.getNextSearchMatchRange(e,e.cursorStopPosition,g.SearchDirection.Forward,this.getCurrentMatchRelativeIndex(e))}getDecorations(e){var t;return(0,v.getDecorationsForSearchMatchRanges)(this.searchState.getMatchRanges(e),c.configuration.incsearch&&e.currentMode===o.Mode.SearchInProgressMode?null===(t=this.getCurrentMatchRange(e))||void 0===t?void 0:t.index:void 0)}async run(e){if(await e.setCurrentMode(this.previousMode),""===this.text&&k.previousSearchStates.length>0&&(this.text=k.previousSearchStates[k.previousSearchStates.length-1].searchString),this.cursorIndex=0,u.Register.setReadonlyRegister("/",this.text),k.addSearchStateToHistory(this.searchState),w.globalState.hl=!0,0===this.searchState.getMatchRanges(e).length)return void s.StatusBar.displayError(e,a.VimError.fromCode(a.ErrorCode.PatternNotFound,this.text));const t=this.getCurrentMatchPosition(e);void 0!==t?(e.cursorStopPosition=t.pos,(0,f.reportSearch)(t.index,this.searchState.getMatchRanges(e).length,e)):s.StatusBar.displayError(e,a.VimError.fromCode(this.searchState.direction===g.SearchDirection.Backward?a.ErrorCode.SearchHitTop:a.ErrorCode.SearchHitBottom,this.text))}async escape(e){e.cursorStopPosition=this.searchState.cursorStartPosition;const t=k.previousSearchStates;if(w.globalState.searchState=t?t[t.length-1]:void 0,void 0!==e.firstVisibleLineBeforeSearch){const t=e.editor.visibleRanges[0].start.line-e.firstVisibleLineBeforeSearch;(0,x.scrollView)(e,t)}await e.setCurrentMode(this.previousMode),this.text.length>0&&k.addSearchStateToHistory(this.searchState)}async ctrlF(e){await new p.CommandShowSearchHistory(this.searchState.direction).exec(e.cursorStopPosition,e)}async advanceCurrentMatch(e,t){this.currentMatchDisplacement+=this.searchState.direction*t,c.configuration.wrapscan||this.getCurrentMatchRange(e)||(this.currentMatchDisplacement-=this.searchState.direction*t)}}t.SearchCommandLine=k,k.previousSearchStates=[]},"./src/cmd_line/commands/ascii.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsciiCommand=void 0;const n=r("./src/actions/commands/actions.ts"),o=r("./src/vimscript/exCommand.ts");class i extends o.ExCommand{async execute(e){await(new n.CommandUnicodeName).exec(e.cursorStopPosition,e)}}t.AsciiCommand=i},"./src/cmd_line/commands/bang.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BangCommand=void 0;const n=r("./src/common/motion/position.ts"),o=r("./src/util/externalCommand.ts"),i=r("./src/vimscript/exCommand.ts"),s=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");class a extends i.ExCommand{constructor(e){super(),this._arguments=e}neovimCapable(){return!0}getReplaceDiff(e){const t=e.split("\n"),r=t.length-1,o=t[0].match(/^\s*/),i=o?o[0].length:0;return n.PositionDiff.exactCharacter({lineOffset:-r,character:i})}async execute(e){await o.externalCommand.run(this._arguments.command)}async executeWithRange(e,t){const r=t.resolveToRange(e),n=e.document.getText(r),i=await o.externalCommand.run(this._arguments.command,n),s=this.getReplaceDiff(i);e.recordedState.transformer.addTransformation({type:"replaceText",text:i,range:r,diff:s})}}t.BangCommand=a,a.argParser=s.all.map((e=>new a({command:e})))},"./src/cmd_line/commands/bufferDelete.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDeleteCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/error.ts"),s=r("./src/statusBar.ts"),a=r("./src/vimscript/exCommand.ts"),c=r("./src/vimscript/parserUtils.ts");class u extends a.ExCommand{constructor(e){super(),this.arguments=e}async execute(e){if(e.document.isDirty&&!this.arguments.bang)throw i.VimError.fromCode(i.ErrorCode.NoWriteSinceLastChange);if(0===this.arguments.buffers.length)await o.commands.executeCommand("workbench.action.closeActiveEditor");else for(const t of this.arguments.buffers)if("string"!=typeof t){try{await o.commands.executeCommand(`workbench.action.openEditorAtIndex${t}`)}catch(e){throw i.VimError.fromCode(i.ErrorCode.NoBuffersDeleted)}await o.commands.executeCommand("workbench.action.closeActiveEditor")}else s.StatusBar.setText(e,":bd[elete][!] {bufname} is not yet implemented (PRs are welcome!)",!0)}}t.BufferDeleteCommand=u,u.argParser=(0,n.seq)(c.bangParser.skip(n.optWhitespace),(0,n.alt)(c.numberParser,(0,n.regexp)(/\S+/)).sepBy(n.whitespace)).map((([e,t])=>new u({bang:e,buffers:t})))},"./src/cmd_line/commands/close.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseCommand=void 0;const n=r("vscode"),o=r("./src/error.ts"),i=r("./src/vimscript/exCommand.ts"),s=r("./src/vimscript/parserUtils.ts");class a extends i.ExCommand{constructor(e){super(),this.bang=e}async execute(e){if(e.document.isDirty&&!this.bang)throw o.VimError.fromCode(o.ErrorCode.NoWriteSinceLastChange);if(1===n.window.visibleTextEditors.length)throw o.VimError.fromCode(o.ErrorCode.CannotCloseLastWindow);const t=e.editor.viewColumn;await n.commands.executeCommand("workbench.action.closeActiveEditor"),void 0!==n.window.activeTextEditor&&n.window.activeTextEditor.viewColumn===t&&await n.commands.executeCommand("workbench.action.previousEditor")}}t.CloseCommand=a,a.argParser=s.bangParser.map((e=>new a(e)))},"./src/cmd_line/commands/copy.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/common/motion/position.ts"),s=r("./src/error.ts"),a=r("./src/statusBar.ts"),c=r("./src/vimscript/exCommand.ts"),u=r("./src/vimscript/lineRange.ts");class d extends c.ExCommand{constructor(e){super(),this.address=e}neovimCapable(){return!0}copyLines(e,t,r){var n,c,u;const d=null===(n=this.address)||void 0===n?void 0:n.resolve(e,"left",!1);if(void 0===d||d<-1||d>e.document.lineCount)return void a.StatusBar.displayError(e,s.VimError.fromCode(s.ErrorCode.InvalidAddress));r<t&&([t,r]=[r,t]);const l=e.document.getText(new o.Range(new o.Position(t,0),new o.Position(r,0).getLineEnd()));let h,m;-1===d?(h=l+"\n",m=new o.Position(0,0)):(h="\n"+l,m=new o.Position(d,0).getLineEnd());const p=l.split("\n"),g=new o.Position(Math.max(d+p.length,0),null!==(u=null===(c=p[p.length-1].match(/\S/))||void 0===c?void 0:c.index)&&void 0!==u?u:0);e.recordedState.transformer.addTransformation({type:"insertText",position:m,text:h,diff:i.PositionDiff.exactPosition(g)})}async execute(e){const t=e.cursors[0].stop.line;this.copyLines(e,t,t)}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e);this.copyLines(e,r,n)}}t.CopyCommand=d,d.argParser=n.optWhitespace.then(u.Address.parser.fallback(void 0)).map((e=>new d(e)))},"./src/cmd_line/commands/delete.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteCommand=void 0;const n=r("vscode"),o=r("./src/register/register.ts"),i=r("vscode"),s=r("./src/vimscript/exCommand.ts"),a=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),c=r("./src/vimscript/parserUtils.ts");class u extends s.ExCommand{constructor(e){super(),this.arguments=e}neovimCapable(){return!0}deleteRange(e,t,r){let s=new i.Position(e,0),a=new i.Position(t,0).getLineEndIncludingEOL();t<r.document.lineCount-1?a=a.getRightThroughLineBreaks():e>0&&(s=s.getLeftThroughLineBreaks());const c=new n.Range(s,a),u=r.document.getText(c).replace(/^\r?\n/,"").replace(/\r?\n$/,"");r.recordedState.transformer.addTransformation({type:"deleteRange",range:new n.Range(s,a),manuallySetCursorPositions:!0}),r.cursorStopPosition=s.getLineBegin(),this.arguments.register&&(r.recordedState.registerName=this.arguments.register),r.currentRegisterMode=o.RegisterMode.LineWise,o.Register.put(r,u,0,!0)}async execute(e){var t;const r=null!==(t=this.arguments.count)&&void 0!==t?t:1,n=e.cursorStartPosition.line,o=n+(r-1);this.deleteRange(n,o,e)}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e);if(this.arguments.count)return e.cursorStartPosition=new i.Position(n,0),void await this.execute(e);this.deleteRange(r,n,e)}}t.DeleteCommand=u,u.argParser=a.optWhitespace.then((0,a.alt)(c.numberParser.map((e=>({register:void 0,count:e}))),(0,a.seq)(a.any.fallback(void 0),a.whitespace.then(c.numberParser).fallback(void 0)).map((([e,t])=>({register:e,count:t})))).map((({register:e,count:t})=>new u({register:e,count:t}))))},"./src/cmd_line/commands/digraph.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DigraphsCommand=void 0;const n=r("vscode"),o=r("./src/configuration/configuration.ts"),i=r("./src/actions/commands/digraphs.ts"),s=r("./src/textEditor.ts"),a=r("./src/vimscript/exCommand.ts"),c=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),u=r("./src/vimscript/parserUtils.ts");class d extends a.ExCommand{constructor(e){super(),this.arguments=e}makeQuickPicks(e){const t=new Array;for(const r of Object.keys(e)){const[n,o]=e[r];t.push({label:r,description:`${n} (user)`,charCodes:o})}return t}async execute(e){const t=this.makeQuickPicks(o.configuration.digraphs).concat(this.makeQuickPicks(i.DefaultDigraphs));n.window.showQuickPick(t).then((async t=>{if(t){const r=String.fromCharCode(...t.charCodes);await s.TextEditor.insert(e.editor,r)}}))}}t.DigraphsCommand=d,d.argParser=(0,c.seq)(u.bangParser,c.whitespace.then((0,c.seq)(c.any,c.any,c.whitespace.then(u.numberParser))).many()).map((([e,t])=>new d({bang:e,newDigraphs:t})))},"./src/cmd_line/commands/file.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileCommand=t.FilePosition=void 0;const n=r("vscode"),o=r("./src/util/logger.ts"),i=r("./src/util/path.ts"),s=r("./src/platform/browser/fs.ts"),a=r("./node_modules/untildify/index.js"),c=r("./src/vimscript/exCommand.ts"),u=r("./src/vimscript/parserUtils.ts"),d=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");var l;!function(e){e[e.NewWindowVerticalSplit=0]="NewWindowVerticalSplit",e[e.NewWindowHorizontalSplit=1]="NewWindowHorizontalSplit"}(l=t.FilePosition||(t.FilePosition={}));class h extends c.ExCommand{constructor(e){super(),this.logger=o.Logger.get("File"),this.arguments=e}async execute(e){var t,r;const o=function(e){if("edit"===e.name)return{file:e.file,bang:e.bang,createFileIfNotExists:!0};if("enew"===e.name)return{bang:e.bang,createFileIfNotExists:!0};if("new"===e.name)return{file:e.file,position:l.NewWindowHorizontalSplit,createFileIfNotExists:!0};if("vnew"===e.name)return{file:e.file,position:l.NewWindowVerticalSplit,createFileIfNotExists:!0};if("split"===e.name)return{file:e.file,position:l.NewWindowHorizontalSplit};if("vsplit"===e.name)return{file:e.file,position:l.NewWindowVerticalSplit};throw new Error(`Unexpected FileCommand.arguments.name: ${e.name}`)}(this.arguments);if(o.bang)return void await n.commands.executeCommand("workbench.action.files.revert");const c=n.window.activeTextEditor.document.uri,u=c.fsPath;let d=!1;o.position===l.NewWindowVerticalSplit&&(await n.commands.executeCommand("workbench.action.splitEditorRight"),d=!0),o.position===l.NewWindowHorizontalSplit&&(await n.commands.executeCommand("workbench.action.splitEditorDown"),d=!0);const h=async()=>{!0===d&&(await n.commands.executeCommand("workbench.action.previousEditor"),await n.commands.executeCommand("workbench.action.closeActiveEditor"))};if(void 0===o.file)return void(!0===o.createFileIfNotExists&&(await n.commands.executeCommand("workbench.action.files.newUntitledFile"),await h()));o.file&&"file"===c.scheme&&(o.file=a(o.file));let m=c;if(""===o.file){if(!0===d)return;const e=await n.window.showOpenDialog({});e&&e.length>0&&(m=e[0])}else{o.file=o.file.replace(/^file:\/\//,"");const e=!!n.env.remoteName,{fullPath:t,path:r}=(0,i.getPathDetails)(o.file,c,e);if(t!==u){const n=(0,i.resolveUri)(t,r.sep,c,e);if(null===n)return;let a=await(0,s.doesFileExist)(n);if(a)m=n;else{const n=t+r.extname(u),o=(0,i.resolveUri)(n,r.sep,c,e);null!==o&&(a=await(0,s.doesFileExist)(o),a&&(m=o))}if(!a){if(!o.createFileIfNotExists)return void this.logger.error(`${o.file} does not exist.`);m=n.with({scheme:"untitled"})}}}const p=await n.workspace.openTextDocument(m);n.window.showTextDocument(p);const g="line_number"===(null===(t=o.cmd)||void 0===t?void 0:t.type)?o.cmd.line:"last_line"===(null===(r=o.cmd)||void 0===r?void 0:r.type)?n.window.activeTextEditor.document.lineCount-1:void 0;void 0!==g&&g>=0&&n.window.activeTextEditor.revealRange(new n.Range(new n.Position(g,0),new n.Position(g,0))),await h()}}t.FileCommand=h,h.argParsers={edit:(0,d.seq)(u.bangParser,d.optWhitespace.then(u.fileOptParser).fallback([]),d.optWhitespace.then(u.fileCmdParser).fallback(void 0),d.optWhitespace.then((0,d.regexp)(/\S+/)).fallback(void 0)).map((([e,t,r,n])=>new h({name:"edit",bang:e,opt:t,cmd:r,file:n}))),enew:u.bangParser.map((e=>new h({name:"enew",bang:e}))),new:(0,d.seq)(d.optWhitespace.then(u.fileOptParser).fallback([]),d.optWhitespace.then(u.fileCmdParser).fallback(void 0),d.optWhitespace.then((0,d.regexp)(/\S+/)).fallback(void 0)).map((([e,t,r])=>new h({name:"new",opt:e,cmd:t,file:r}))),split:(0,d.seq)(d.optWhitespace.then(u.fileOptParser).fallback([]),d.optWhitespace.then(u.fileCmdParser).fallback(void 0),d.optWhitespace.then((0,d.regexp)(/\S+/)).fallback(void 0)).map((([e,t,r])=>new h({name:"split",opt:e,cmd:t,file:r}))),vnew:(0,d.seq)(d.optWhitespace.then(u.fileOptParser).fallback([]),d.optWhitespace.then(u.fileCmdParser).fallback(void 0),d.optWhitespace.then((0,d.regexp)(/\S+/)).fallback(void 0)).map((([e,t,r])=>new h({name:"vnew",opt:e,cmd:t,file:r}))),vsplit:(0,d.seq)(d.optWhitespace.then(u.fileOptParser).fallback([]),d.optWhitespace.then(u.fileCmdParser).fallback(void 0),d.optWhitespace.then((0,d.regexp)(/\S+/)).fallback(void 0)).map((([e,t,r])=>new h({name:"vsplit",opt:e,cmd:t,file:r})))}},"./src/cmd_line/commands/fileInfo.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileInfoCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/util/statusBarTextUtils.ts"),i=r("./src/vimscript/exCommand.ts"),s=r("./src/vimscript/parserUtils.ts");class a extends i.ExCommand{constructor(e){super(),this.args=e}async execute(e){(0,o.reportFileInfo)(e.cursors[0].start,e)}}t.FileInfoCommand=a,a.argParser=(0,n.seq)(s.bangParser,n.optWhitespace.then(n.all)).map((([e,t])=>new a({bang:e,fileName:t})))},"./src/cmd_line/commands/goto.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GotoCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/vimscript/exCommand.ts"),i=r("./src/vimscript/parserUtils.ts");class s extends o.ExCommand{constructor(e){super(),this.offset=e}gotoOffset(e,t){e.cursorStopPosition=e.document.positionAt(t)}async execute(e){var t;this.gotoOffset(e,null!==(t=this.offset)&&void 0!==t?t:0)}async executeWithRange(e,t){var r,n;void 0===this.offset&&(this.offset=null!==(n=null===(r=t.resolve(e))||void 0===r?void 0:r.end)&&void 0!==n?n:0),this.gotoOffset(e,this.offset)}}t.GotoCommand=s,s.argParser=n.optWhitespace.then(i.numberParser.fallback(void 0)).map((e=>new s(e)))},"./src/cmd_line/commands/gotoLine.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GotoLineCommand=void 0;const n=r("./src/vimscript/exCommand.ts");class o extends n.ExCommand{async execute(e){}async executeWithRange(e,t){e.cursorStartPosition=e.cursorStopPosition=e.cursorStopPosition.with({line:t.resolve(e).end}).obeyStartOfLine(e.document)}}t.GotoLineCommand=o},"./src/cmd_line/commands/history.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryCommand=t.HistoryCommandType=void 0;const n=r("./src/actions/commands/actions.ts"),o=r("./src/vimscript/exCommand.ts"),i=r("./src/vimscript/pattern.ts"),s=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),a=r("./src/vimscript/parserUtils.ts");var c;!function(e){e[e.Cmd=0]="Cmd",e[e.Search=1]="Search",e[e.Expr=2]="Expr",e[e.Input=3]="Input",e[e.Debug=4]="Debug",e[e.All=5]="All"}(c=t.HistoryCommandType||(t.HistoryCommandType={}));const u=(0,s.alt)((0,s.alt)((0,a.nameAbbrevParser)("c","md"),(0,s.string)(":")).result(c.Cmd),(0,s.alt)((0,a.nameAbbrevParser)("s","earch"),(0,s.string)("/")).result(c.Search),(0,s.alt)((0,a.nameAbbrevParser)("e","xpr"),(0,s.string)("=")).result(c.Expr),(0,s.alt)((0,a.nameAbbrevParser)("i","nput"),(0,s.string)("@")).result(c.Input),(0,s.alt)((0,a.nameAbbrevParser)("d","ebug"),(0,s.string)(">")).result(c.Debug),(0,a.nameAbbrevParser)("a","ll").result(c.All));class d extends o.ExCommand{constructor(e){super(),this.arguments=e}async execute(e){switch(this.arguments.type){case c.Cmd:await(new n.CommandShowCommandHistory).exec(e.cursorStopPosition,e);break;case c.Search:await new n.CommandShowSearchHistory(i.SearchDirection.Forward).exec(e.cursorStopPosition,e);break;case c.Expr:case c.Input:case c.Debug:case c.All:throw new Error("Not implemented")}}}t.HistoryCommand=d,d.argParser=s.optWhitespace.then(u.fallback(c.Cmd)).map((e=>new d({type:e})))},"./src/cmd_line/commands/jumps.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClearJumpsCommand=t.JumpsCommand=void 0;const n=r("vscode"),o=r("./src/state/globalState.ts"),i=r("./src/common/motion/cursor.ts"),s=r("./src/vimscript/exCommand.ts");class a{constructor(e,t){this.jump=e,this.label=e.fileName,this.detail=`jump ${t} line ${e.position.line+1} col ${e.position.character}`;try{this.description=e.document.lineAt(e.position).text}catch(e){this.description=void 0}}}class c extends s.ExCommand{async execute(e){const t=o.globalState.jumpTracker;if(t.hasJumps){const r=t.jumps.map(((e,t)=>new a(e,t))),o=await n.window.showQuickPick(r,{canPickMany:!1});o&&void 0!==o.jump.document&&(n.window.showTextDocument(o.jump.document),e.cursors=[new i.Cursor(o.jump.position,o.jump.position)])}else n.window.showInformationMessage("No jumps available")}}t.JumpsCommand=c;class u extends s.ExCommand{async execute(e){o.globalState.jumpTracker.clearJumps()}}t.ClearJumpsCommand=u},"./src/cmd_line/commands/leftRightCenter.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CenterCommand=t.RightCommand=t.LeftCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/configuration/configuration.ts"),s=r("./src/vimscript/exCommand.ts"),a=r("./src/vimscript/lineRange.ts"),c=r("./src/vimscript/parserUtils.ts");class u extends s.ExCommand{constructor(e){super(),this.args=e}async execute(e){this.executeWithRange(e,new a.LineRange(new a.Address({type:"current_line"})))}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e),i=[];for(let t=r;t<=n;t++)i.push(e.document.lineAt(t));e.recordedState.transformer.replace(new o.Range(i[0].range.start,i[i.length-1].range.end),i.map((e=>" ".repeat(this.args.indent)+e.text.slice(e.firstNonWhitespaceCharacterIndex))).join("\n"))}}t.LeftCommand=u,u.argParser=n.optWhitespace.then(c.numberParser.fallback(0)).map((e=>new u({indent:e})));class d extends s.ExCommand{constructor(e){super(),this.args=e}async execute(e){this.executeWithRange(e,new a.LineRange(new a.Address({type:"current_line"})))}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e),i=[];for(let t=r;t<=n;t++)i.push(e.document.lineAt(t));e.recordedState.transformer.replace(new o.Range(i[0].range.start,i[i.length-1].range.end),i.map((e=>" ".repeat(Math.max(0,this.args.width-(e.text.length-e.firstNonWhitespaceCharacterIndex)))+e.text.slice(e.firstNonWhitespaceCharacterIndex))).join("\n"))}}t.RightCommand=d,d.argParser=n.optWhitespace.then(c.numberParser.fallback(void 0)).map((e=>new d({width:null!=e?e:i.configuration.textwidth})));class l extends s.ExCommand{constructor(e){super(),this.args=e}async execute(e){this.executeWithRange(e,new a.LineRange(new a.Address({type:"current_line"})))}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e),i=[];for(let t=r;t<=n;t++)i.push(e.document.lineAt(t));e.recordedState.transformer.replace(new o.Range(i[0].range.start,i[i.length-1].range.end),i.map((e=>" ".repeat(Math.max(0,this.args.width-(e.text.length-e.firstNonWhitespaceCharacterIndex))/2)+e.text.slice(e.firstNonWhitespaceCharacterIndex))).join("\n"))}}t.CenterCommand=l,l.argParser=n.optWhitespace.then(c.numberParser.fallback(void 0)).map((e=>new l({width:null!=e?e:i.configuration.textwidth})))},"./src/cmd_line/commands/marks.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteMarksCommand=t.MarksCommand=void 0;const n=r("vscode"),o=r("./src/common/motion/cursor.ts"),i=r("./src/error.ts"),s=r("./src/vimscript/exCommand.ts"),a=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");class c{constructor(e,t){this.picked=!1,this.alwaysShow=!1,this.mark=t,this.label=t.name,t.document&&t.document!==e.document?this.description=t.document.fileName:this.description=e.document.lineAt(t.position).text.trim(),this.detail=`line ${t.position.line} col ${t.position.character}`}}class u extends s.ExCommand{constructor(e){super(),this.marksFilter=e}async execute(e){const t=e.historyTracker.getMarks().filter((e=>0===this.marksFilter.length||this.marksFilter.includes(e.name))).map((t=>new c(e,t)));if(t.length>0){const r=await n.window.showQuickPick(t,{canPickMany:!1});r&&(e.cursors=[new o.Cursor(r.mark.position,r.mark.position)])}else n.window.showInformationMessage("No marks set")}}t.MarksCommand=u,u.argParser=a.optWhitespace.then((0,a.noneOf)("|")).many().map((e=>new u(e)));class d extends s.ExCommand{constructor(e){super(),this.args=e}static resolveMarkList(e,t){const r=(e,t)=>{if(e>t)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument);const[r,n]=[e.charCodeAt(0),t.charCodeAt(0)],o=[];for(let e=r;e<=n;e++)o.push(String.fromCharCode(e));return o};if("!"===t)return r("a","z");const n=[];for(const e of t)if("string"==typeof e)n.push(e);else{if(void 0===r(e.start,e.end))throw i.VimError.fromCode(i.ErrorCode.InvalidArgument);n.concat()}return n}async execute(e){const t=d.resolveMarkList(e,this.args);e.historyTracker.removeMarks(t)}}t.DeleteMarksCommand=d,d.argParser=(0,a.alt)((0,a.string)("!"),a.whitespace.then(a.optWhitespace.then((0,a.alt)((0,a.seq)((0,a.regexp)(/[a-z]/).skip((0,a.string)("-")),(0,a.regexp)(/[a-z]/)).map((([e,t])=>({start:e,end:t}))),(0,a.seq)((0,a.regexp)(/[A-Z]/).skip((0,a.string)("-")),(0,a.regexp)(/[A-Z]/)).map((([e,t])=>({start:e,end:t}))),(0,a.seq)((0,a.regexp)(/[0-9]/).skip((0,a.string)("-")),(0,a.regexp)(/[0-9]/)).map((([e,t])=>({start:e,end:t}))),(0,a.noneOf)("-"))).many())).map((e=>new d(e)))},"./src/cmd_line/commands/nohl.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NohlCommand=void 0;const n=r("./src/state/globalState.ts"),o=r("./src/statusBar.ts"),i=r("./src/vimscript/exCommand.ts");class s extends i.ExCommand{async execute(e){n.globalState.hl=!1,o.StatusBar.clear(e)}}t.NohlCommand=s},"./src/cmd_line/commands/only.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnlyCommand=void 0;const n=r("vscode"),o=r("./src/vimscript/exCommand.ts");class i extends o.ExCommand{async execute(e){await Promise.allSettled([n.commands.executeCommand("workbench.action.closeEditorsInOtherGroups"),n.commands.executeCommand("workbench.action.maximizeEditor"),n.commands.executeCommand("workbench.action.closePanel")])}}t.OnlyCommand=i},"./src/cmd_line/commands/print.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrintCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/statusBar.ts"),i=r("./src/vimscript/exCommand.ts"),s=r("./src/vimscript/lineRange.ts");class a extends i.ExCommand{constructor(e){super(),this.args=e}async execute(e){this.executeWithRange(e,new s.LineRange(new s.Address({type:"current_line"})))}async executeWithRange(e,t){const{end:r}=t.resolve(e),n=e.document.lineAt(r);let i;i=this.args.printNumbers?this.args.printText?`${n.lineNumber+1} ${n.text}`:`${n.lineNumber+1}`:this.args.printText?`${n.text}`:"",o.StatusBar.setText(e,i)}}t.PrintCommand=a,a.argParser=e=>(0,n.succeed)(new a(e))},"./src/cmd_line/commands/put.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PutExCommand=void 0;const n=r("./src/configuration/configuration.ts"),o=r("./src/register/register.ts"),i=r("./src/statusBar.ts"),s=r("./src/error.ts"),a=r("vscode"),c=r("./src/actions/commands/put.ts"),u=r("./src/vimscript/exCommand.ts"),d=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),l=r("./src/vimscript/parserUtils.ts");class h extends u.ExCommand{constructor(e){super(),this.arguments=e}neovimCapable(){return!0}async doPut(e,t){const r=this.arguments.register||(n.configuration.useSystemClipboard?"*":'"');if(!o.Register.isValidRegister(r))return void i.StatusBar.displayError(e,s.VimError.fromCode(s.ErrorCode.TrailingCharacters));e.recordedState.registerName=r;const a=this.arguments.bang?new c.PutBeforeFromCmdLine:new c.PutFromCmdLine;a.setInsertionLine(t.line),await a.exec(t,e)}async execute(e){await this.doPut(e,e.cursorStopPosition)}async executeWithRange(e,t){const{end:r}=t.resolve(e);await this.doPut(e,new a.Position(r,0).getLineEnd())}}t.PutExCommand=h,h.argParser=(0,d.seq)(l.bangParser,d.optWhitespace.then(d.any).fallback(void 0)).map((([e,t])=>new h({bang:e,register:t})))},"./src/cmd_line/commands/quit.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuitCommand=void 0;const n=r("vscode"),o=r("./src/error.ts"),i=r("./src/vimscript/exCommand.ts"),s=r("./src/vimscript/parserUtils.ts");class a extends i.ExCommand{constructor(e){super(),this.isRepeatableWithDot=!1,this.arguments=e}async execute(e){const t=n.window.visibleTextEditors.filter((t=>t.document===e.document)).length>1;if(e.document.isDirty&&!this.arguments.bang&&(!t||this.arguments.quitAll))throw o.VimError.fromCode(o.ErrorCode.NoWriteSinceLastChange);this.arguments.quitAll?await n.commands.executeCommand("workbench.action.closeAllEditors"):this.arguments.bang?await n.commands.executeCommand("workbench.action.revertAndCloseActiveEditor"):await n.commands.executeCommand("workbench.action.closeActiveEditor")}}t.QuitCommand=a,a.argParser=e=>s.bangParser.map((t=>new a({bang:t,quitAll:e})))},"./src/cmd_line/commands/read.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadCommand=void 0;const n=r("./src/textEditor.ts"),o=r("./src/platform/browser/fs.ts"),i=r("./src/platform/browser/constants.ts"),s=r("./src/vimscript/exCommand.ts"),a=r("./src/vimscript/parserUtils.ts"),c=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");class u extends s.ExCommand{constructor(e){super(),this.arguments=e}neovimCapable(){return!0}async execute(e){const t=await this.getTextToInsert();t&&await n.TextEditor.insert(e.editor,t)}async getTextToInsert(){if("file"in this.arguments&&this.arguments.file.length>0)return(0,o.readFileAsync)(this.arguments.file,"utf8");if("cmd"in this.arguments&&this.arguments.cmd.length>0){if(i.SUPPORT_READ_COMMAND){const e=this.arguments.cmd;return new Promise((async(t,n)=>{const{exec:o}=await Promise.resolve().then((()=>r(Object(function(){var e=new Error("Cannot find module 'child_process'");throw e.code="MODULE_NOT_FOUND",e}()))));o(e,((e,r,o)=>{e?n(e):t(r)}))}))}return""}throw Error("Invalid arguments")}}t.ReadCommand=u,u.argParser=(0,c.seq)(c.whitespace.then(a.fileOptParser).fallback([]),c.optWhitespace.then((0,c.alt)((0,c.string)("!").then(c.all).map((e=>({cmd:e}))),(0,c.regexp)(/\S+/).map((e=>({file:e}))))).fallback(void 0)).map((([e,t])=>new u({opt:e,...t})))},"./src/cmd_line/commands/register.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterCommand=void 0;const n=r("vscode"),o=r("./src/register/register.ts"),i=r("./src/state/recordedState.ts"),s=r("./src/statusBar.ts"),a=r("./src/error.ts"),c=r("./src/vimscript/exCommand.ts"),u=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");class d extends c.ExCommand{constructor(e){super(),this.registers=e}async getRegisterDisplayValue(e){var t;let r=null===(t=await o.Register.get(e))||void 0===t?void 0:t.text;return r instanceof Array?r=r.join("\n").substr(0,100):r instanceof i.RecordedState&&(r=r.actionsRun.map((e=>e.keysPressed.join(""))).join("")),r}async displayRegisterValue(e,t){let r=await this.getRegisterDisplayValue(t);void 0===r?s.StatusBar.displayError(e,a.VimError.fromCode(a.ErrorCode.NothingInRegister,t)):(r=r.replace(/\n/g,"\\n"),n.window.showInformationMessage(`${t} ${r}`))}regSortOrder(e){const t=["-","*","+",".",":","%","#","/","="];if('"'===e)return 0;if(e>="0"&&e<="9")return 10+parseInt(e,10);if(e>="a"&&e<="z")return e.charCodeAt(0)-"a".charCodeAt(0)+100;if(t.includes(e))return 1e3+t.indexOf(e);throw new Error(`Unexpected register ${e}`)}async execute(e){if(1===this.registers.length)await this.displayRegisterValue(e,this.registers[0]);else{const e=o.Register.getKeys().filter((e=>"_"!==e&&(0===this.registers.length||this.registers.includes(e)))).sort(((e,t)=>this.regSortOrder(e)-this.regSortOrder(t))),t=new Array;for(const r of e)t.push({label:r,description:await this.getRegisterDisplayValue(r)});n.window.showQuickPick(t).then((async e=>{if(e){const t=e.description;n.window.showInformationMessage(`${e.label} ${t}`)}}))}}}t.RegisterCommand=d,d.argParser=u.optWhitespace.then(u.any.sepBy(u.optWhitespace).map((e=>new d(e))))},"./src/cmd_line/commands/set.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/configuration/configuration.ts"),i=r("./src/error.ts"),s=r("./src/statusBar.ts"),a=r("./src/vimscript/exCommand.ts"),c=(0,n.regexp)(/[a-z]+/),u=(0,n.regexp)(/\S*/),d=n.whitespace.then((0,n.alt)((0,n.string)("no").then(c).map((e=>({type:"unset",option:e}))),(0,n.string)("inv").then(c).map((e=>({type:"invert",option:e}))),c.skip((0,n.string)("!")).map((e=>({type:"invert",option:e}))),c.skip((0,n.string)("?")).map((e=>({type:"show",option:e}))),(0,n.seq)(c.skip((0,n.string)("&")),(0,n.alt)((0,n.string)("vim"),(0,n.string)("vi"),(0,n.string)(""))).map((([e,t])=>({type:"default",option:e,source:t}))),(0,n.seq)(c.skip((0,n.oneOf)("=:")),u).map((([e,t])=>({type:"equal",option:e,value:t}))),(0,n.seq)(c.skip((0,n.string)("+=")),u).map((([e,t])=>({type:"add",option:e,value:t}))),(0,n.seq)(c.skip((0,n.string)("^=")),u).map((([e,t])=>({type:"multiply",option:e,value:t}))),(0,n.seq)(c.skip((0,n.string)("-=")),u).map((([e,t])=>({type:"subtract",option:e,value:t}))),c.map((e=>({type:"show_or_set",option:e}))))).fallback({type:"show_or_set",option:void 0});class l extends a.ExCommand{constructor(e){super(),this.operation=e}async execute(e){var t;if(void 0===this.operation.option)return;const r=null!==(t=o.optionAliases.get(this.operation.option))&&void 0!==t?t:this.operation.option,n=o.configuration[r];if(void 0===n)throw i.VimError.fromCode(i.ErrorCode.UnknownOption,r);const s="boolean"==typeof n?"boolean":"string"==typeof n?"string":"number";switch(this.operation.type){case"show_or_set":"all"===this.operation.option||("boolean"===s?o.configuration[r]=!0:this.showOption(e,r,n));break;case"show":this.showOption(e,r,n);break;case"unset":if("boolean"!==s)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument,`no${r}`);o.configuration[r]=!1;break;case"invert":if("boolean"!==s)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument,`inv${r}`);o.configuration[r]=!n;break;case"default":this.operation.option;break;case"equal":if("boolean"===s)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument,`${r}=${this.operation.value}`);if("string"===s)o.configuration[r]=this.operation.value;else{const e=Number.parseInt(this.operation.value,10);if(isNaN(e))throw i.VimError.fromCode(i.ErrorCode.NumberRequiredAfterEqual,`${r}=${this.operation.value}`);o.configuration[r]=e}break;case"add":if("boolean"===s)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument,`${r}+=${this.operation.value}`);if("string"===s)o.configuration[r]=n+this.operation.value;else{const e=Number.parseInt(this.operation.value,10);if(isNaN(e))throw i.VimError.fromCode(i.ErrorCode.NumberRequiredAfterEqual,`${r}+=${this.operation.value}`);o.configuration[r]=n+e}break;case"multiply":if("boolean"===s)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument,`${r}^=${this.operation.value}`);if("string"===s)o.configuration[r]=this.operation.value+n;else{const e=Number.parseInt(this.operation.value,10);if(isNaN(e))throw i.VimError.fromCode(i.ErrorCode.NumberRequiredAfterEqual,`${r}^=${this.operation.value}`);o.configuration[r]=n*e}break;case"subtract":if("boolean"===s)throw i.VimError.fromCode(i.ErrorCode.InvalidArgument,`${r}-=${this.operation.value}`);if("string"===s)o.configuration[r]=n.split(this.operation.value).join("");else{const e=Number.parseInt(this.operation.value,10);if(isNaN(e))throw i.VimError.fromCode(i.ErrorCode.NumberRequiredAfterEqual,`${r}-=${this.operation.value}`);o.configuration[r]=n-e}break;default:throw this.operation,new Error("Got unexpected SetOperation.type")}}showOption(e,t,r){"boolean"==typeof r?s.StatusBar.setText(e,r?t:`no${t}`):s.StatusBar.setText(e,`${t}=${r}`)}}t.SetCommand=l,l.argParser=d.map((e=>new l(e)))},"./src/cmd_line/commands/sh.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShCommand=void 0;const n=r("vscode"),o=r("./src/vimscript/exCommand.ts");class i extends o.ExCommand{async execute(e){n.window.createTerminal().show()}}t.ShCommand=i},"./src/cmd_line/commands/smile.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmileCommand=void 0;const n=r("vscode"),o=r("./src/textEditor.ts"),i=r("./src/vimscript/exCommand.ts");class s extends i.ExCommand{constructor(){super()}async execute(e){await n.commands.executeCommand("workbench.action.files.newUntitledFile"),await o.TextEditor.insert(n.window.activeTextEditor,s.smileText)}}t.SmileCommand=s,s.smileText='\n oooo$$$$$$$$$$$$oooo\n oo$$$$$$$$$$$$$$$$$$$$$$$$o\n oo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o o$ $$ o$\n o $ oo o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o $$ $$ $$o$\n oo $ $ "$ o$$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$$$o $$$o$$o$\n "$$$$$$o$ o$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$o $$$$$$$$\n $$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$$$$$$$$ """$$$\n "$$$""""$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ "$$$\n $$$ o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ "$$$o\n o$$" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$o\n $$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" "$$$$$$ooooo$$$$o\n o$$$oooo$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ o$$$$$$$$$$$$$$$$$\n $$$$$$$$"$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$""""""""\n """" $$$$ "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" o$$$\n "$$$o """$$$$$$$$$$$$$$$$$$"$$" $$$\n $$$o "$$""$$$$$$"""" o$$$\n $$$$o o$$$"\n "$$$$o o$$$$$$o"$$$$o o$$$$\n "$$$$$oo ""$$$$o$$$$$o o$$$$""\n ""$$$$$oooo "$$$o$$$$$$$$$"""\n ""$$$$$$$oo $$$$$$$$$$\n """"$$$$$$$$$$$\n $$$$$$$$$$$$\n $$$$$$$$$$"\n "$$$""""'},"./src/cmd_line/commands/sort.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/common/motion/position.ts"),s=r("./src/mode/mode.ts"),a=r("./src/vimscript/exCommand.ts"),c=r("./src/vimscript/parserUtils.ts");class u extends a.ExCommand{constructor(e){super(),this.arguments=e}neovimCapable(){return!0}async execute(e){if((0,s.isVisualMode)(e.currentMode)){const{start:t,end:r}=e.editor.selection;await this.sortLines(e,t.line,r.line)}else await this.sortLines(e,0,e.document.lineCount-1)}async sortLines(e,t,r){var n,s;let a=[];for(let n=t;n<=r&&n<e.document.lineCount;n++)a.push(e.document.lineAt(n).text);const c=a[a.length-1].length;if(this.arguments.unique){const e=new Set,t=[];for(const r of a){const n=this.arguments.ignoreCase?r.toLowerCase():r;e.has(n)||(e.add(n),t.push(r))}a=t}const u=this.arguments.ignoreCase?a.sort(((e,t)=>e.localeCompare(t))):a.sort();this.arguments.reverse&&u.reverse();const d=u.join("\n");e.recordedState.transformer.addTransformation({type:"replaceText",range:new o.Range(t,0,r,c),text:d,diff:i.PositionDiff.exactPosition(new o.Position(t,null!==(s=null===(n=u[0].match(/\S/))||void 0===n?void 0:n.index)&&void 0!==s?s:0))})}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e);await this.sortLines(e,r,n)}}t.SortCommand=u,u.argParser=(0,n.seq)(c.bangParser,n.optWhitespace.then((0,n.oneOf)("bfilnorux").many())).map((([e,t])=>new u({reverse:e,ignoreCase:t.includes("i"),unique:t.includes("u")})))},"./src/cmd_line/commands/substitute.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubstituteCommand=t.ReplaceString=void 0;const n=r("vscode"),o=r("./src/jumps/jump.ts"),i=r("./src/state/searchState.ts"),s=r("./src/state/substituteState.ts"),a=r("./src/error.ts"),c=r("./src/configuration/configuration.ts"),u=r("./src/configuration/decoration.ts"),d=r("./src/state/globalState.ts"),l=r("./src/statusBar.ts"),h=r("./src/vimscript/lineRange.ts"),m=r("./src/vimscript/exCommand.ts"),p=r("./src/vimscript/pattern.ts"),g=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),f=r("./src/vimscript/parserUtils.ts"),v=r("./src/common/motion/position.ts"),y=r("./src/util/statusBarTextUtils.ts"),w=r("./src/util/decorationUtils.ts");class x{constructor(e){this.components=e}resolve(e){return this.components.map((t=>{var r;return"string"===t.type?t.value:"capture_group"===t.type&&null!==(r=null==e?void 0:e[t.group])&&void 0!==r?r:""})).join("")}}t.ReplaceString=x;const S=(0,g.seq)((0,g.string)("&").fallback(void 0),(0,g.oneOf)("cegiInp#lr").many()).map((([e,t])=>{const r={};"&"===e&&(r.keepPreviousFlags=!0);for(const e of t)switch(e){case"c":r.confirmEach=!0;break;case"e":r.suppressError=!0;break;case"g":r.replaceAll=!0;break;case"i":r.ignoreCase=!0;break;case"I":r.noIgnoreCase=!0;break;case"n":r.printCount=!0;break;case"p":r.printLastMatchedLine=!0;break;case"#":r.printLastMatchedLineWithNumber=!0;break;case"l":r.printLastMatchedLineWithList=!0;break;case"r":r.usePreviousPattern=!0}return r})),C=g.optWhitespace.then(f.numberParser).fallback(void 0);class M extends m.ExCommand{constructor(e){super(),this.arguments=e,this.abort=!1}neovimCapable(){return!this.arguments.flags.confirmEach}getSubstitutionDecorations(e,t=new h.LineRange(new h.Address({type:"current_line"}))){var r,n,o;const i=[],s=[],a=[],u="replace"===c.configuration.inccommand?s:i,{pattern:d,replace:l}=this.resolvePatterns(e,!1),m=(null===(r=this.arguments.pattern)||void 0===r?void 0:r.closed)&&c.configuration.inccommand,p=null!==(n=null==d?void 0:d.allMatches(e,{lineRange:t}))&&void 0!==n?n:[],g=(c.configuration.gdefault||c.configuration.substituteGlobalFlag)!==(null!==(o=this.arguments.flags.replaceAll)&&void 0!==o&&o),f=new Set;for(const t of p)if(g||!f.has(t.range.start.line))if(f.add(t.range.start.line),m){const r=(0,w.formatDecorationText)(l.resolve(t.groups),e.editor.options.tabSize);u.push({range:t.range,renderOptions:{["append"===c.configuration.inccommand?"after":"before"]:{contentText:r}}})}else a.push((0,w.ensureVisible)(t.range));return{substitutionAppend:i,substitutionReplace:s,searchHighlight:a}}async replaceMatchRange(e,t){if(this.arguments.flags.printCount)return 0;const r=this.arguments.replace.resolve(t.groups);if(this.arguments.flags.confirmEach){if(!await this.confirmReplacement(e,t,r))return;e.recordedState.transformer.replace(t.range,r)}else e.recordedState.transformer.replace(t.range,r);return r.split("\n").length-1-(t.groups[0].split("\n").length-1)}async confirmReplacement(e,t,r){var o,i,s,a;const c=new n.CancellationTokenSource,d=["y","n","a","q","l"];let l="";const h=(0,y.escapeCSSIcons)(`Replace with ${(0,w.formatDecorationText)(r,e.editor.options.tabSize,"\\n")} (${d.join("/")})?`),m=null!==(i=null===(o=this.cSearchHighlights)||void 0===o?void 0:o.filter((e=>!e.range.isEqual(t.range))))&&void 0!==i?i:[];return e.editor.revealRange(new n.Range(t.range.start.line,0,t.range.start.line,0)),e.editor.setDecorations(u.decoration.searchHighlight,m),e.editor.setDecorations(u.decoration.searchMatch,[(0,w.ensureVisible)(t.range)]),e.editor.setDecorations(u.decoration.confirmedSubstitution,null!==(s=this.confirmedSubstitutions)&&void 0!==s?s:[]),await n.window.showInputBox({ignoreFocusOut:!0,prompt:h,placeHolder:d.join("/"),validateInput:e=>(d.includes(e)&&(l=e,c.cancel()),h)},c.token),"q"!==l&&"l"!==l&&l?"a"===l&&(this.arguments.flags.confirmEach=void 0):this.abort=!0,("y"===l||"a"===l||"l"===l)&&(this.cSearchHighlights&&(this.cSearchHighlights=m),null===(a=this.confirmedSubstitutions)||void 0===a||a.push({range:t.range,renderOptions:{before:{contentText:(0,w.formatDecorationText)(r,e.editor.options.tabSize)}}}),!0)}resolvePatterns(e,t=!0){let{pattern:r,replace:n}=this.arguments;if(void 0===r){const e=d.globalState.substituteState;if(void 0===(null==e?void 0:e.searchPattern)||""===e.searchPattern.patternString){if(t)throw a.VimError.fromCode(a.ErrorCode.NoPreviousSubstituteRegularExpression)}else r=e.searchPattern,n=e.replaceString}else{if(""===r.patternString){const e=d.globalState.searchState;if(void 0===e||""===e.searchString){if(t)throw a.VimError.fromCode(a.ErrorCode.NoPreviousRegularExpression)}else r=e.pattern}t&&(d.globalState.substituteState=new s.SubstituteState(r,n),d.globalState.searchState=new i.SearchState(p.SearchDirection.Forward,e.cursorStopPosition,null==r?void 0:r.patternString,{}))}return{pattern:r,replace:n}}async execute(e){await this.executeWithRange(e,new h.LineRange(new h.Address({type:"current_line"})))}async executeWithRange(e,t){var r,i,s;let{start:a,end:l}=t.resolve(e);this.arguments.count&&this.arguments.count>=0&&(a=l,l=l+this.arguments.count-1),({pattern:this.arguments.pattern,replace:this.arguments.replace}=this.resolvePatterns(e));const m=(c.configuration.gdefault||c.configuration.substituteGlobalFlag)!==(null!==(r=this.arguments.flags.replaceAll)&&void 0!==r&&r),p=null!==(s=null===(i=this.arguments.pattern)||void 0===i?void 0:i.allMatches(e,{lineRange:new h.LineRange(new h.Address({type:"number",num:a+1}),",",new h.Address({type:"number",num:l+1}))}))&&void 0!==s?s:[];let g;if(m)g=p;else{const e=new Set;g=p.filter((t=>!e.has(t.range.start.line)&&(e.add(t.range.start.line),!0)))}this.arguments.flags.confirmEach&&(e.editor.setDecorations(u.decoration.substitutionAppend,[]),e.editor.setDecorations(u.decoration.substitutionReplace,[]),c.configuration.inccommand&&(this.confirmedSubstitutions=[]),c.configuration.incsearch&&(this.cSearchHighlights=g.map((e=>(0,w.ensureVisible)(e.range)))));const f=new Set;let y=0,x=0;for(const t of g){if(this.abort)break;const r=await this.replaceMatchRange(e,t);void 0!==r&&(y++,f.add(t.range.start.line),x+=r)}if(y>0){const t=Math.max(...f.values())+x,r=new n.Position(Math.max(0,t),0);d.globalState.jumpTracker.recordJump(new o.Jump({document:e.document,position:r}),o.Jump.fromStateNow(e)),e.recordedState.transformer.addTransformation({type:"moveCursor",diff:v.PositionDiff.exactPosition(r),cursorIndex:0})}this.confirmedSubstitutions=void 0,this.cSearchHighlights=void 0,e.editor.setDecorations(u.decoration.confirmedSubstitution,[]),this.setStatusBarText(e,y,f.size)}setStatusBarText(e,t,r){var n;0===t?l.StatusBar.displayError(e,a.VimError.fromCode(a.ErrorCode.PatternNotFound,null===(n=this.arguments.pattern)||void 0===n?void 0:n.patternString)):this.arguments.flags.printCount?l.StatusBar.setText(e,`${t} match${t>1?"es":""} on ${r} line${r>1?"s":""}`):t>c.configuration.report&&l.StatusBar.setText(e,`${t} substitution${t>1?"s":""} on ${r} line${r>1?"s":""}`)}}t.SubstituteCommand=M,M.argParser=g.optWhitespace.then((0,g.alt)((0,g.regexp)(/[^\w\s\\|"]{1}/).chain((e=>(0,g.seq)(p.Pattern.parser({direction:p.SearchDirection.Forward,delimiter:e}),(e=>(0,g.alt)((0,g.string)("\\").then(g.any.fallback(void 0).map((e=>void 0===e||"\\"===e?{type:"string",value:"\\"}:"/"===e?{type:"string",value:"/"}:"b"===e?{type:"string",value:"\b"}:"r"===e?{type:"string",value:"\r"}:"n"===e?{type:"string",value:"\n"}:"t"===e?{type:"string",value:"\t"}:"&"===e?{type:"capture_group",group:0}:/[0-9]/.test(e)?{type:"capture_group",group:Number.parseInt(e,10)}:{type:"string",value:`\\${e}`}))),(0,g.noneOf)(e).map((e=>({type:"string",value:e})))).many().map((e=>new x(e))))(e),(0,g.string)(e).then(S).fallback({}),C).map((([e,t,r,n])=>new M({pattern:e,replace:t,flags:r,count:n}))))),(0,g.seq)(S,C).map((([e,t])=>new M({pattern:void 0,replace:new x([]),flags:e,count:t})))))},"./src/cmd_line/commands/tab.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabCommand=t.TabCommandType=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./node_modules/path-browserify/index.js"),i=r("vscode"),s=r("./src/vimscript/exCommand.ts"),a=r("./src/vimscript/parserUtils.ts");var c;!function(e){e[e.Next=0]="Next",e[e.Previous=1]="Previous",e[e.First=2]="First",e[e.Last=3]="Last",e[e.Absolute=4]="Absolute",e[e.New=5]="New",e[e.Close=6]="Close",e[e.Only=7]="Only",e[e.Move=8]="Move"}(c=t.TabCommandType||(t.TabCommandType={}));class u extends s.ExCommand{constructor(e){super(),this.arguments=e}async executeCommandWithCount(e,t){for(let r=0;r<e;r++)await i.commands.executeCommand(t)}async execute(e){switch(this.arguments.type){case c.Absolute:void 0!==this.arguments.count&&this.arguments.count>=0&&await i.commands.executeCommand("workbench.action.openEditorAtIndex",this.arguments.count);break;case c.Next:if(void 0!==this.arguments.count&&this.arguments.count<=0)break;await this.executeCommandWithCount(this.arguments.count||1,"workbench.action.nextEditorInGroup");break;case c.Previous:if(void 0!==this.arguments.count&&this.arguments.count<=0)break;await this.executeCommandWithCount(this.arguments.count||1,"workbench.action.previousEditorInGroup");break;case c.First:await i.commands.executeCommand("workbench.action.openEditorAtIndex1");break;case c.Last:await i.commands.executeCommand("workbench.action.lastEditorInGroup");break;case c.New:if(void 0!==this.arguments.file&&""!==this.arguments.file){const e=o.isAbsolute(this.arguments.file),t=void 0!==i.workspace.workspaceFolders&&i.workspace.workspaceFolders.length>0,r=i.window.activeTextEditor.document.uri.fsPath;let n;if(e)n=this.arguments.file;else if(t){const e=i.workspace.workspaceFolders[0].uri.path;n=o.join(e,this.arguments.file)}else n=o.join(o.dirname(r),this.arguments.file);n!==r&&await i.commands.executeCommand("vscode.open",i.Uri.file(n))}else await i.commands.executeCommand("workbench.action.files.newUntitledFile");break;case c.Close:if(void 0===this.arguments.count){await i.commands.executeCommand("workbench.action.closeActiveEditor");break}if(0===this.arguments.count)break;break;case c.Only:await i.commands.executeCommand("workbench.action.closeOtherEditors");break;case c.Move:{const{count:e,direction:t}=this.arguments;let r;r=void 0!==t?{to:t,by:"tab",value:null!=e?e:1}:0===e?{to:"first"}:void 0===e?{to:"last"}:{to:"position",by:"tab",value:e+1},await i.commands.executeCommand("moveActiveEditor",r);break}}}}t.TabCommand=u,u.argParsers={bfirst:n.whitespace.then(a.fileCmdParser).fallback(void 0).map((e=>new u({type:c.First,cmd:e}))),blast:n.whitespace.then(a.fileCmdParser).fallback(void 0).map((e=>new u({type:c.Last,cmd:e}))),bnext:(0,n.seq)(a.bangParser,n.optWhitespace.then(a.fileCmdParser).fallback(void 0),n.optWhitespace.then(a.numberParser).fallback(void 0)).map((([e,t,r])=>new u({type:c.Next,bang:e,cmd:t,count:r}))),bprev:(0,n.seq)(a.bangParser,n.optWhitespace.then(a.fileCmdParser).fallback(void 0),n.optWhitespace.then(a.numberParser).fallback(void 0)).map((([e,t,r])=>new u({type:c.Previous,bang:e,cmd:t,count:r}))),tabclose:(0,n.seq)(a.bangParser,n.optWhitespace.then(a.numberParser).fallback(void 0)).map((([e,t])=>new u({type:c.Close,bang:e,count:t}))),tabonly:(0,n.seq)(a.bangParser,n.optWhitespace.then(a.numberParser).fallback(void 0)).map((([e,t])=>new u({type:c.Only,bang:e,count:t}))),tabnew:(0,n.seq)(n.optWhitespace.then(a.fileOptParser).fallback([]),n.optWhitespace.then(a.fileCmdParser).fallback(void 0),(0,n.regexp)(/\S+/).fallback(void 0)).map((([e,t,r])=>new u({type:c.New,opt:e,cmd:t,file:r}))),tabmove:n.optWhitespace.then((0,n.seq)((0,n.alt)((0,n.string)("+").result("right"),(0,n.string)("-").result("left")).fallback(void 0),a.numberParser.fallback(void 0))).map((([e,t])=>new u({type:c.Move,direction:e,count:t})))}},"./src/cmd_line/commands/terminal.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/vimscript/exCommand.ts");class s extends i.ExCommand{async execute(e){await o.commands.executeCommand("workbench.action.createTerminalEditor")}}t.TerminalCommand=s,s.argParser=(0,n.succeed)(new s)},"./src/cmd_line/commands/undo.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndoCommand=void 0;const n=r("./src/actions/commands/actions.ts"),o=r("vscode"),i=r("./src/vimscript/exCommand.ts"),s=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),a=r("./src/vimscript/parserUtils.ts");class c extends i.ExCommand{constructor(e){super(),this.count=e}async execute(e){await(new n.CommandUndo).exec(new o.Position(0,0),e)}}t.UndoCommand=c,c.argParser=s.optWhitespace.then(a.numberParser).fallback(void 0).map((e=>new c(e)))},"./src/cmd_line/commands/vscode.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VsCodeCommand=void 0;const n=r("./src/error.ts"),o=r("./src/statusBar.ts"),i=r("vscode"),s=r("./src/vimscript/exCommand.ts"),a=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");class c extends s.ExCommand{constructor(e){super(),this.command=e}async execute(e){this.command?await i.commands.executeCommand(this.command):o.StatusBar.displayError(e,n.VimError.fromCode(n.ErrorCode.ArgumentRequired))}}t.VsCodeCommand=c,c.argParser=a.whitespace.then(a.all).map((e=>new c(e)))},"./src/cmd_line/commands/wall.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WallCommand=void 0;const n=r("vscode"),o=r("./src/vimscript/exCommand.ts"),i=r("./src/vimscript/parserUtils.ts");class s extends o.ExCommand{constructor(e){super(),this.bang=null!=e&&e}async execute(e){await n.workspace.saveAll(!1)}}t.WallCommand=s,s.argParser=i.bangParser.map((e=>new s(e)))},"./src/cmd_line/commands/write.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteCommand=void 0;const n=r("./src/platform/browser/fs.ts"),o=r("./node_modules/path-browserify/index.js"),i=r("vscode"),s=r("./src/util/logger.ts"),a=r("./src/statusBar.ts"),c=r("./src/vimscript/exCommand.ts"),u=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),d=r("./src/vimscript/parserUtils.ts");class l extends c.ExCommand{constructor(e){super(),this.isRepeatableWithDot=!1,this.logger=s.Logger.get("Write"),this.arguments=e}async execute(e){if(e.document.isUntitled||"file"!==e.document.uri.scheme)await this.background(i.commands.executeCommand("workbench.action.files.save"));else try{await n.accessAsync(e.document.fileName,n.constants.W_OK),await this.save(e)}catch(t){if(this.arguments.bang)try{const t=await n.getMode(e.document.fileName);await n.chmodAsync(e.document.fileName,438),this.arguments.bgWrite=!1,await this.save(e),await n.chmodAsync(e.document.fileName,t)}catch(t){a.StatusBar.setText(e,t.message)}else a.StatusBar.setText(e,t.message)}}async save(e){await this.background(e.document.save().then((t=>{t?a.StatusBar.setText(e,`"${o.basename(e.document.fileName)}" ${e.document.lineCount}L ${e.document.getText().length}C written`):this.logger.warn(":w failed")})))}async background(e){this.arguments.bgWrite||await e}}t.WriteCommand=l,l.argParser=(0,u.seq)(d.bangParser.skip(u.optWhitespace),d.fileOptParser.skip(u.optWhitespace),(0,u.alt)((0,u.string)("!").then(u.all).map((e=>({cmd:e}))),(0,u.regexp)(/\S+/).map((e=>({file:e})))).fallback({})).map((([e,t,r])=>new l({bang:e,opt:t,bgWrite:!0,...r})))},"./src/cmd_line/commands/writequit.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteQuitCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/vimscript/exCommand.ts"),i=r("./src/vimscript/parserUtils.ts"),s=r("./src/cmd_line/commands/quit.ts"),a=r("./src/cmd_line/commands/write.ts");class c extends o.ExCommand{constructor(e){super(),this.isRepeatableWithDot=!1,this.args=e}async execute(e){await new a.WriteCommand({bgWrite:!1,...this.args}).execute(e),await new s.QuitCommand({bang:!1}).execute(e)}}t.WriteQuitCommand=c,c.argParser=(0,n.seq)(i.bangParser.skip(n.optWhitespace),i.fileOptParser.skip(n.optWhitespace),(0,n.regexp)(/\S+/).fallback(void 0)).map((([e,t,r])=>new c(r?{bang:e,opt:t,file:r}:{bang:e,opt:t})))},"./src/cmd_line/commands/writequitall.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteQuitAllCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/vimscript/exCommand.ts"),i=r("./src/vimscript/parserUtils.ts"),s=r("./src/cmd_line/commands/wall.ts"),a=r("./src/cmd_line/commands/quit.ts");class c extends o.ExCommand{constructor(e){super(),this.isRepeatableWithDot=!1,this.arguments=e}async execute(e){const t={bang:!1},r=new s.WallCommand(this.arguments.bang);await r.execute(e),t.quitAll=!0;const n=new a.QuitCommand(t);await n.execute(e)}}t.WriteQuitAllCommand=c,c.argParser=(0,n.seq)(i.bangParser,n.whitespace.then(i.fileOptParser).fallback([])).map((([e,t])=>new c({bang:e,fileOpt:t})))},"./src/cmd_line/commands/yank.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YankCommand=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/actions/operator.ts"),s=r("./src/register/register.ts"),a=r("./src/vimscript/exCommand.ts"),c=r("./src/vimscript/parserUtils.ts");class u extends a.ExCommand{constructor(e){super(),this.arguments=e}async yank(e,t,r){e.currentRegisterMode=s.RegisterMode.LineWise,this.arguments.register&&(e.recordedState.registerName=this.arguments.register);const n=e.cursorStopPosition;await(new i.YankOperator).run(e,t.getLineBegin(),r.getLineEnd()),e.cursorStopPosition=n}async execute(e){var t;const r=null!==(t=this.arguments.count)&&void 0!==t?t:1,n=e.cursorStartPosition,o=r?n.getDown(r-1).getLineEnd():e.cursorStopPosition;await this.yank(e,n,o)}async executeWithRange(e,t){const{start:r,end:n}=t.resolve(e);if(this.arguments.count)return e.cursorStartPosition=new o.Position(n,0),void await this.execute(e);await this.yank(e,new o.Position(r,0),new o.Position(n,0))}}t.YankCommand=u,u.argParser=n.optWhitespace.then((0,n.alt)(c.numberParser.map((e=>({register:void 0,count:e}))),(0,n.seq)(n.any.fallback(void 0),n.whitespace.then(c.numberParser).fallback(void 0)).map((([e,t])=>({register:e,count:t})))).map((({register:e,count:t})=>new u({register:e,count:t}))))},"./src/common/matching/matcher.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PairMatcher=void 0;const n=r("vscode"),o=r("./src/configuration/configuration.ts");class i{static findPairedChar(e,t,r,o,s,a,c){let u=e.line;const d=e.character,l=a.document.lineCount,h=a.document.lineAt(e).text[e.character];if(c&&a.cursorStartPosition.isEqual(a.cursorStopPosition)&&h===t)return e;for(;i.keepSearching(u,l,s);){let i=a.document.lineAt(u).text.split("");const c=i.length;for(u===e.line&&(i=s?i.slice(d+1,c):i.slice(0,d));!(i.length<=0||o<=-1);){let e;if(e=s?i.shift():i.pop(),e===r)o++;else{if(e!==t)continue;o--}}if(o<=-1){let e;return e=s?Math.max(0,c-i.length-1):i.length,new n.Position(u,e)}s?u++:u--}}static keepSearching(e,t,r){return r?e<=t-1:e>=0}static getPercentPairing(e){for(const t of o.configuration.matchpairs.split(",")){const r=t.split(":");if(2===r.length){if(r[0]===e)return{match:r[1],isNextMatchForward:!0};if(r[1]===e)return{match:r[0],isNextMatchForward:!1}}}}static nextPairedChar(e,t,r,n){const o=this.pairings[t];if(void 0===o||o.directionless)return;const s=o.match,a=t;return i.findPairedChar(e,s,a,0,o.isNextMatchForward,r,n)}}t.PairMatcher=i,i.pairings={"(":{match:")",isNextMatchForward:!0},"{":{match:"}",isNextMatchForward:!0},"[":{match:"]",isNextMatchForward:!0},")":{match:"(",isNextMatchForward:!1},"}":{match:"{",isNextMatchForward:!1},"]":{match:"[",isNextMatchForward:!1},"<":{match:">",isNextMatchForward:!0},">":{match:"<",isNextMatchForward:!1},'"':{match:'"',isNextMatchForward:!1,directionless:!0},"'":{match:"'",isNextMatchForward:!1,directionless:!0},"`":{match:"`",isNextMatchForward:!1,directionless:!0}}},"./src/common/matching/quoteMatcher.ts":(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteMatcher=void 0,function(e){e[e.Opening=0]="Opening",e[e.Closing=1]="Closing"}(r||(r={}));class n{constructor(e,t){this.quoteMap=[];let o=!0;for(let i=0;i<t.length;i++)t[i]!==n.escapeChar?t[i]===e&&(this.quoteMap[i]=o?r.Opening:r.Closing,o=!o):i+=1}surroundingQuotes(e){var t;const n=this.quoteMap[e];if(n===r.Opening){const t=this.getNextQuote(e);return void 0!==t?[e,t]:void 0}if(n===r.Closing)return[this.getPrevQuote(e),e];{const r=null!==(t=this.getPrevQuote(e))&&void 0!==t?t:this.getNextQuote(e);if(void 0!==r){const e=this.getNextQuote(r);if(void 0!==e)return[r,e]}}}getNextQuote(e){for(let t=e+1;t<this.quoteMap.length;t++)if(void 0!==this.quoteMap[t])return t}getPrevQuote(e){for(let t=e-1;t>=0;t--)if(void 0!==this.quoteMap[t])return t}}t.QuoteMatcher=n,n.escapeChar="\\"},"./src/common/matching/tagMatcher.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagMatcher=void 0;const n=r("./src/textEditor.ts");class o{constructor(e,t,r){let i=o.TAG_REGEX.exec(e);const s=[];for(;i;)i[o.CLOSE_FORWARD_SLASH]||s.push({name:i[o.TAG_NAME],type:i[o.OPEN_FORWARD_SLASH]?"close":"open",startPos:i.index,endPos:o.TAG_REGEX.lastIndex}),i=o.TAG_REGEX.exec(e);const a=[],c=[];for(const e of s)if("open"===e.type)a.push(e);else for(let t=a.length-1;t>=0;t--){const r=a[t];if("open"===r.type&&r.name===e.name){c.push({tag:r.name,openingTagStart:r.startPos,openingTagEnd:r.endPos,closingTagStart:e.startPos,closingTagEnd:e.endPos}),a.splice(t);break}}const u=n.TextEditor.getFirstNonWhitespaceCharOnLine(r.document,r.cursorStartPosition.line),d=r.cursorStartPosition.character<u.character?u:r.cursorStartPosition,l=r.document.offsetAt(d),h=t,m=c.filter((e=>l>=e.openingTagStart&&h<e.closingTagEnd));if(!m.length)return;const p=this.determineRelevantTag(m,l,0!==r.cursorStartPosition.compareTo(r.cursorStopPosition));p&&(this.openStart=p.openingTagStart,this.closeEnd=p.closingTagEnd,l===p.openingTagEnd&&h+1===p.closingTagStart?(this.openEnd=this.openStart,this.closeStart=this.closeEnd):(this.openEnd=p.openingTagEnd,this.closeStart=p.closingTagStart))}determineRelevantTag(e,t,r){const n=e[0];return r&&t===n.openingTagStart?e[1]:n}findOpening(e){return e?this.openStart:this.openEnd}findClosing(e){return e?this.closeEnd:this.closeStart}}t.TagMatcher=o,o.TAG_REGEX=/\<(\/)?([^\>\<\s\/]+)(?:[^\>\<]*?)(\/)?\>/g,o.OPEN_FORWARD_SLASH=1,o.TAG_NAME=2,o.CLOSE_FORWARD_SLASH=3},"./src/common/motion/cursor.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;class r{constructor(e,t){this.start=e,this.stop=t}isValid(e){return this.start.isValid(e)&&this.stop.isValid(e)}static FromVSCodeSelection(e){return new r(e.start,e.end)}equals(e){return this.start.isEqual(e.start)&&this.stop.isEqual(e.stop)}withNewStop(e){return new r(this.start,e)}withNewStart(e){return new r(e,this.stop)}toString(){return`[${this.start.toString()} | ${this.stop.toString()}]`}}t.Cursor=r},"./src/common/motion/position.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sorted=t.laterOf=t.earlierOf=t.PositionDiff=void 0;const n=r("vscode"),o=r("./src/configuration/configuration.ts"),i=r("./src/textEditor.ts"),s=r("./src/util/util.ts"),a=r("./src/textobject/sentence.ts"),c=r("./src/textobject/word.ts"),u=r("vscode");var d;!function(e){e[e.ExactPosition=0]="ExactPosition",e[e.Offset=1]="Offset",e[e.ExactCharacter=2]="ExactCharacter",e[e.ObeyStartOfLine=3]="ObeyStartOfLine",e[e.EndOfLine=4]="EndOfLine"}(d||(d={}));class l{constructor(e,t,r){this.type=e,this.line=t,this.character=r}static identity(){return l.offset({line:0,character:0})}static offset({line:e=0,character:t=0}){return new l(d.Offset,e,t)}static exactPosition(e){return new l(d.ExactPosition,e.line,e.character)}static startOfLine(){return new l(d.ObeyStartOfLine,0,0)}static endOfLine(){return new l(d.EndOfLine,0,0)}static exactCharacter({lineOffset:e,character:t}){return new l(d.ExactCharacter,null!=e?e:0,t)}toString(){switch(this.type){case d.Offset:return`[ Diff: Offset ${this.line} ${this.character} ]`;case d.ExactCharacter:return`[ Diff: ExactCharacter ${this.line} ${this.character} ]`;case d.ExactPosition:return`[ Diff: ExactPosition ${this.line} ${this.character} ]`;case d.ObeyStartOfLine:return`[ Diff: ObeyStartOfLine ${this.line} ]`;case d.EndOfLine:return`[ Diff: EndOfLine ${this.line} ]`;default:throw this.type,new Error(`Unknown PositionDiffType: ${this.type}`)}}}t.PositionDiff=l,t.earlierOf=function(e,t){return e.isBefore(t)?e:t},t.laterOf=function(e,t){return e.isBefore(t)?t:e},t.sorted=function(e,t){return e.isBefore(t)?[e,t]:[t,e]},u.Position.prototype.toString=function(){return`[${this.line}, ${this.character}]`},u.Position.prototype.add=function(e,t,r=!0){if(t.type===d.ExactPosition)return new u.Position(t.line,t.character);const n=(0,s.clamp)(this.line+t.line,0,e.lineCount-1);let o;if(t.type===d.Offset)o=this.character+t.character;else if(t.type===d.ExactCharacter)o=t.character;else if(t.type===d.ObeyStartOfLine)o=this.obeyStartOfLine(e).character;else{if(t.type!==d.EndOfLine)throw new Error(`Unknown PositionDiffType: ${t.type}`);o=this.getLineEnd().character}const i=new u.Position(n,Math.max(o,0));return r?e.validatePosition(i):i},u.Position.prototype.subtract=function(e){return l.offset({line:this.line-e.line,character:this.character-e.character})},u.Position.prototype.withColumn=function(e){return e=(0,s.clamp)(e,0,i.TextEditor.getLineLength(this.line)),new u.Position(this.line,e)},u.Position.prototype.getLeft=function(e=1){return new u.Position(this.line,Math.max(this.character-e,0))},u.Position.prototype.getRight=function(e=1){return new u.Position(this.line,Math.min(this.character+e,i.TextEditor.getLineLength(this.line)))},u.Position.prototype.getDown=function(e=1){if(n.window.activeTextEditor){const t=Math.min(this.line+e,i.TextEditor.getLineCount()-1);return new u.Position(t,Math.min(this.character,i.TextEditor.getLineLength(t)))}return this.translate({lineDelta:e})},u.Position.prototype.getUp=function(e=1){const t=Math.max(this.line-e,0);return new u.Position(t,Math.min(this.character,i.TextEditor.getLineLength(t)))},u.Position.prototype.getLeftThroughLineBreaks=function(e=!0){return this.isLineBeginning()?0===this.line?this:e?this.getUp().getLineEnd():this.getUp().getLineEnd().getLeft():this.getLeft()},u.Position.prototype.getRightThroughLineBreaks=function(e=!1){if(this.isAtDocumentEnd())return this;if(this.line<i.TextEditor.getLineCount()-1){if((e?this:this.getRight()).isLineEnd())return this.with({character:0}).getDown()}else if(!e&&this.character===i.TextEditor.getLineLength(this.line)-1)return this;return this.getRight()},u.Position.prototype.getOffsetThroughLineBreaks=function(e){let t=new u.Position(this.line,this.character);if(e<0)for(let r=0;r<-e;r++)t=t.getLeftThroughLineBreaks();else for(let r=0;r<e;r++)t=t.getRightThroughLineBreaks();return t},u.Position.prototype.prevWordStart=function(e,t){var r,n;return(0,c.prevWordStart)(e,this,null!==(r=null==t?void 0:t.wordType)&&void 0!==r?r:c.WordType.Normal,null!==(n=null==t?void 0:t.inclusive)&&void 0!==n&&n)},u.Position.prototype.nextWordStart=function(e,t){var r,n;return(0,c.nextWordStart)(e,this,null!==(r=null==t?void 0:t.wordType)&&void 0!==r?r:c.WordType.Normal,null!==(n=null==t?void 0:t.inclusive)&&void 0!==n&&n)},u.Position.prototype.prevWordEnd=function(e,t){var r;return(0,c.prevWordEnd)(e,this,null!==(r=null==t?void 0:t.wordType)&&void 0!==r?r:c.WordType.Normal)},u.Position.prototype.nextWordEnd=function(e,t){var r,n;return(0,c.nextWordEnd)(e,this,null!==(r=null==t?void 0:t.wordType)&&void 0!==r?r:c.WordType.Normal,null!==(n=null==t?void 0:t.inclusive)&&void 0!==n&&n)},u.Position.prototype.getSentenceBegin=function(e){return(0,a.getSentenceBegin)(this,e)},u.Position.prototype.getSentenceEnd=function(){return(0,a.getSentenceEnd)(this)},u.Position.prototype.getLineBegin=function(){return new u.Position(this.line,0)},u.Position.prototype.getLineBeginRespectingIndent=function(e){return o.configuration.autoindent?i.TextEditor.getFirstNonWhitespaceCharOnLine(e,this.line):this.getLineBegin()},u.Position.prototype.getLineEnd=function(){return new u.Position(this.line,i.TextEditor.getLineLength(this.line))},u.Position.prototype.getLineEndIncludingEOL=function(){return new u.Position(this.line,i.TextEditor.getLineLength(this.line)+1)},u.Position.prototype.getLeftIfEOL=function(){return this.character===i.TextEditor.getLineLength(this.line)?this.getLeft():this},u.Position.prototype.advancePositionByText=function(e){const t=[];let r=e.indexOf("\n",0);for(;r>=0;)t.push(r),r=e.indexOf("\n",r+1);return 0===t.length?new u.Position(this.line,this.character+e.length):new u.Position(this.line+t.length,e.length-(t[t.length-1]+1))},u.Position.prototype.isLineBeginning=function(){return 0===this.character},u.Position.prototype.isLineEnd=function(){return this.character>=i.TextEditor.getLineLength(this.line)},u.Position.prototype.isFirstWordOfLine=function(e){return i.TextEditor.getFirstNonWhitespaceCharOnLine(e,this.line).character===this.character},u.Position.prototype.isAtDocumentBegin=function(){return 0===this.line&&this.isLineBeginning()},u.Position.prototype.isAtDocumentEnd=function(){return this.line===i.TextEditor.getLineCount()-1&&this.isLineEnd()},u.Position.prototype.isInLeadingWhitespace=function(e){return/^\s+$/.test(e.getText(new n.Range(this.getLineBegin(),this)))},u.Position.prototype.obeyStartOfLine=function(e){return o.configuration.startofline?i.TextEditor.getFirstNonWhitespaceCharOnLine(e,this.line):this},u.Position.prototype.isValid=function(e){try{const t=i.TextEditor.getLineCount(e)||1;if(this.line>=t)return!1;const r=i.TextEditor.getLineLength(this.line);if(this.character>r+1)return!1}catch(e){return!1}return!0}},"./src/common/number/numericString.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericString=void 0;class r{constructor(e,t,r,n,o,i){this.value=e,this.radix=t,this.numLength=r,this.prefix=n,this.suffix=o,this.negative=i}static parse(e){let t=-1,n=-1,o=-1,i=!1;for(const{regex:s,radix:a}of r.matchings){const r=s.exec(e);null!=r&&(o<0||r.index<t||r.index===t&&r[0].length>n)&&(t=r.index,n=r[0].length,o=a,i="-"===r[1])}if(o<0)return;const s=t+n,a=e.slice(0,t),c=e.slice(t,s),u=e.slice(s,e.length);let d=parseInt(c,o);const l=n-r.numPrefix[o].length-(i?1:0);let h=!1;return 10!==o&&i&&(d=-d,h=!0),{num:new r(d,o,l,a,u,h),suffixOffset:s}}toString(){if(10!==this.radix){const e=4294967295;for(;this.value<0;)this.value=e+this.value+1}let e=Math.abs(this.value).toString(this.radix);if(10!==this.radix){const t=this.numLength-e.length;t>0&&(e="0".repeat(t)+e)}const t=(this.negative||this.value<0?"-":"")+r.numPrefix[this.radix]+e;return this.prefix+t+this.suffix}}t.NumericString=r,r.numPrefix={8:"0",10:"",16:"0x"},r.matchings=[{regex:/(-)?0[0-7]+/,radix:8},{regex:/(-)?\d+/,radix:10},{regex:/(-)?0x[\da-fA-F]+/,radix:16}]},"./src/completion/lineCompletionProvider.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lineCompletionProvider=t.getCompletionsForCurrentLine=void 0;const n=r("vscode"),o=r("./src/textEditor.ts"),i=(e,t,r)=>{const n=e=>{let n=r?t-e:e-t;return n<0&&(n=t+Math.abs(n)),n};return e.getText().split("\n").map(((e,t)=>({sortPriority:n(t),text:e.replace(/^[ \t]*/,"")}))).sort(((e,t)=>e.sortPriority>t.sortPriority?1:-1))};t.getCompletionsForCurrentLine=(e,t)=>((e,t,r)=>{const o=[];for(const s of(e=>[...n.workspace.textDocuments].sort(((t,r)=>t.fileName===e?-1:r.fileName===e?1:0)))(t)){let n=0,a=!1;s.fileName===t&&(n=r.line,a=!0);for(const t of i(s,n,a))!o.includes(t.text)&&t.text&&t.text.startsWith(e)&&t.text!==e&&o.push(t.text)}return o})(t.getText(new n.Range(o.TextEditor.getFirstNonWhitespaceCharOnLine(t,e.line),e)),t.fileName,e),t.lineCompletionProvider={showLineCompletionsQuickPick:async(e,r)=>{const i=(0,t.getCompletionsForCurrentLine)(e,r.document);if(!i)return;const s=await n.window.showQuickPick(i);s&&(r.recordedState.transformer.delete(new n.Range(o.TextEditor.getFirstNonWhitespaceCharOnLine(r.document,e.line),e.getLineEnd())),r.recordedState.transformer.addTransformation({type:"insertTextVSCode",text:s}))}}},"./src/configuration/configuration.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.configuration=t.optionAliases=t.extensionVersion=void 0;const o=r("vscode"),i=r("./src/globals.ts"),s=r("./src/configuration/notation.ts"),a=r("./src/util/vscodeContext.ts"),c=r("./src/configuration/configurationValidator.ts"),u=r("./src/configuration/decoration.ts"),d=r("./node_modules/process/browser.js"),l=r("./package.json"),h=r("./src/platform/browser/constants.ts");t.extensionVersion=l.version,t.optionAliases=new Map([["ai","autoindent"],["et","expandtab"],["gd","gdefault"],["hi","history"],["hls","hlsearch"],["ic","ignorecase"],["icm","inccommand"],["is","incsearch"],["isk","iskeyword"],["js","joinspaces"],["mmd","maxmapdepth"],["mps","matchpairs"],["nu","number"],["rnu","relativenumber"],["sc","showcmd"],["scr","scroll"],["scs","smartcase"],["smd","showmode"],["sol","startofline"],["to","timeout"],["ts","tabstop"],["tw","textwidth"],["ws","wrapscan"],["ww","whichwrap"]]);class m{constructor(){this.leaderDefault="\\",this.cursorTypeMap={line:o.TextEditorCursorStyle.Line,block:o.TextEditorCursorStyle.Block,underline:o.TextEditorCursorStyle.Underline,"line-thin":o.TextEditorCursorStyle.LineThin,"block-outline":o.TextEditorCursorStyle.BlockOutline,"underline-thin":o.TextEditorCursorStyle.UnderlineThin},this.handleKeys=[],this.useSystemClipboard=!1,this.shell="",this.useCtrlKeys=!1,this.overrideCopy=!0,this.textwidth=80,this.hlsearch=!1,this.ignorecase=!0,this.smartcase=!0,this.autoindent=!0,this.matchpairs="(:),{:},[:]",this.joinspaces=!0,this.camelCaseMotion={enable:!0},this.replaceWithRegister=!1,this.smartRelativeLine=!1,this.sneak=!1,this.sneakUseIgnorecaseAndSmartcase=!1,this.sneakReplacesF=!1,this.surround=!0,this.argumentObjectSeparators=[","],this.argumentObjectOpeningDelimiters=["(","["],this.argumentObjectClosingDelimiters=[")","]"],this.easymotion=!1,this.easymotionMarkerBackgroundColor="#0000",this.easymotionMarkerForegroundColorOneChar="#ff0000",this.easymotionMarkerForegroundColorTwoChar="#ffa500",this.easymotionMarkerForegroundColorTwoCharFirst="#ffb400",this.easymotionMarkerForegroundColorTwoCharSecond="#b98300",this.easymotionIncSearchForegroundColor="#7fbf00",this.easymotionDimColor="#777777",this.easymotionMarkerWidthPerChar=8,this.easymotionDimBackground=!0,this.easymotionMarkerFontFamily="Consolas",this.easymotionMarkerFontSize="14",this.easymotionMarkerFontWeight="bold",this.easymotionMarkerMargin=0,this.easymotionKeys="hklyuiopnm,qwertzxcvbasdgjf;",this.easymotionJumpToAnywhereRegex="\\b[A-Za-z0-9]|[A-Za-z0-9]\\b|_.|#.|[a-z][A-Z]",this.autoSwitchInputMethod={enable:!1,defaultIM:"",obtainIMCmd:"",switchIMCmd:""},this.timeout=1e3,this.maxmapdepth=1e3,this.showcmd=!0,this.showmodename=!0,this.leader=this.leaderDefault,this.history=50,this.inccommand="",this.incsearch=!0,this.startInInsertMode=!1,this.statusBarColorControl=!1,this.statusBarColors={normal:"#005f5f",insert:"#5f0000",visual:"#5f00af",visualline:"#005f87",visualblock:"#86592d",replace:"#000000"},this.debug={silent:!1,loggingLevelForAlert:"error",loggingLevelForConsole:"error"},this.searchHighlightColor="",this.searchHighlightTextColor="",this.searchMatchColor="",this.searchMatchTextColor="",this.substitutionColor="#50f01080",this.substitutionTextColor="",this.highlightedyank={enable:!1,color:"rgba(250, 240, 170, 0.5)",textColor:"",duration:200},this.boundKeyCombinations=[],this.visualstar=!1,this.mouseSelectionGoesIntoVisualMode=!0,this.changeWordIncludesWhitespace=!1,this.foldfix=!1,this.disableExtension=!1,this.enableNeovim=!1,this.neovimPath="",this.neovimUseConfigFile=!1,this.neovimConfigPath="",this.vimrc={enable:!1,path:""},this.digraphs={},this.gdefault=!1,this.substituteGlobalFlag=!1,this.whichwrap="b,s",this.startofline=!0,this.showMarksInGutter=!1,this.report=2,this.wrapscan=!0,this.scroll=0,this.cursorStylePerMode={normal:void 0,insert:void 0,visual:void 0,visualline:void 0,visualblock:void 0,replace:void 0},this.insertModeKeyBindings=[],this.insertModeKeyBindingsNonRecursive=[],this.normalModeKeyBindings=[],this.normalModeKeyBindingsNonRecursive=[],this.operatorPendingModeKeyBindings=[],this.operatorPendingModeKeyBindingsNonRecursive=[],this.visualModeKeyBindings=[],this.visualModeKeyBindingsNonRecursive=[],this.commandLineModeKeyBindings=[],this.commandLineModeKeyBindingsNonRecursive=[],this.insertModeKeyBindingsMap=new Map,this.normalModeKeyBindingsMap=new Map,this.operatorPendingModeKeyBindingsMap=new Map,this.visualModeKeyBindingsMap=new Map,this.commandLineModeKeyBindingsMap=new Map}async load(){const e=i.Globals.isTesting?i.Globals.mockConfiguration:this.getConfiguration("vim");for(const t in this){let r=e[t];null!=r&&(r.constructor.name===Object.name&&(r=m.unproxify(r)),this[t]=r)}h.SUPPORT_VIMRC&&this.vimrc.enable&&await Promise.resolve().then((()=>r(Object(function(){var e=new Error("Cannot find module './vimrc'");throw e.code="MODULE_NOT_FOUND",e}())))).then((e=>e.vimrc.load(this))),this.leader=s.Notation.NormalizeKey(this.leader,this.leaderDefault),this.clearKeyBindingsMaps();const n=await c.configurationValidator.validate(t.configuration);this.boundKeyCombinations=[];for(const e of l.contributes.keybindings){if(e.when.includes("listFocus"))continue;if(e.command.startsWith("notebook"))continue;let t=e.key;"darwin"===d.platform?t=e.mac||t:"linux"===d.platform&&(t=e.linux||t),this.boundKeyCombinations.push({key:s.Notation.NormalizeKey(t,this.leader),command:e.command})}u.decoration.load(this);for(const e of this.boundKeyCombinations){let t=!0;const r=this.handleKeys[e.key];void 0!==r?t=r:this.useCtrlKeys||"C-"!==e.key.slice(1,3)||(t=!("<C-c>"!==e.key||!this.overrideCopy)),a.VSCodeContext.set(`vim.use${e.key}`,t)}return a.VSCodeContext.set("vim.overrideCopy",this.overrideCopy),a.VSCodeContext.set("vim.overrideCtrlC",this.overrideCopy||this.useCtrlKeys),n}getConfiguration(e=""){var t;const r=null===(t=o.window.activeTextEditor)||void 0===t?void 0:t.document,n=r?{uri:r.uri,languageId:r.languageId}:void 0;return o.workspace.getConfiguration(e,n)}cursorStyleFromString(e){return this.cursorTypeMap[e]}clearKeyBindingsMaps(){this.normalModeKeyBindingsMap=new Map,this.insertModeKeyBindingsMap=new Map,this.visualModeKeyBindingsMap=new Map,this.commandLineModeKeyBindingsMap=new Map,this.operatorPendingModeKeyBindingsMap=new Map}get editorCursorStyle(){return this.cursorStyleFromString(this.editorCursorStyleRaw)}set editorCursorStyle(e){}getScrollLines(e){return 0===this.scroll?Math.ceil((e[0].end.line-e[0].start.line)/2):this.scroll}getCursorStyleForMode(e){const t=this.cursorStylePerMode[e.toLowerCase()];if(t)return this.cursorStyleFromString(t)}static unproxify(e){const t={};for(const r in e){const n=e[r];null!=n&&(t[r]=n)}return t}}function p(e){return(t,r)=>{Object.defineProperty(t,r,{get(){let t=this["_"+r];return void 0!==t&&""!==t||(t=this.getConfiguration("editor").get(e.settingName,e.defaultValue),e.map&&void 0!==t&&(t=e.map.get(t))),t},set(t){if(this["_"+r]=t,void 0!==t&&""!==t&&!i.Globals.isTesting){if(e.map)for(const[r,n]of e.map.entries())if(t===n){t=r;break}this.getConfiguration("editor").update(e.settingName,t,o.ConfigurationTarget.Global)}},enumerable:!0,configurable:!0})}}n([p({settingName:"tabSize",defaultValue:8})],m.prototype,"tabstop",void 0),n([p({settingName:"cursorStyle",defaultValue:"line"})],m.prototype,"editorCursorStyleRaw",void 0),n([p({settingName:"insertSpaces",defaultValue:!1})],m.prototype,"expandtab",void 0),n([p({settingName:"lineNumbers",defaultValue:!0,map:new Map([["on",!0],["off",!1],["relative",!1],["interval",!1]])})],m.prototype,"number",void 0),n([p({settingName:"lineNumbers",defaultValue:!1,map:new Map([["on",!1],["off",!1],["relative",!0],["interval",!1]])})],m.prototype,"relativenumber",void 0),n([p({settingName:"wordSeparators",defaultValue:"/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-"})],m.prototype,"iskeyword",void 0),n([p({settingName:"wordWrap",defaultValue:!1,map:new Map([["on",!0],["off",!1],["wordWrapColumn",!0],["bounded",!0]])})],m.prototype,"wrap",void 0),t.configuration=new m},"./src/configuration/configurationValidator.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.configurationValidator=void 0;const n=r("./src/configuration/iconfigurationValidator.ts");t.configurationValidator=new class{constructor(){this.validators=[]}registerValidator(e){this.validators.push(e)}async validate(e){const t=new n.ValidatorResults;for(const r of this.validators){const n=await r.validate(e);n.hasError&&r.disable(e),t.concat(n)}return t}}},"./src/configuration/decoration.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decoration=void 0;const n=r("vscode");t.decoration=new class{constructor(){this._markDecorationCache=new Map,this.confirmedSubstitution=n.window.createTextEditorDecorationType({letterSpacing:"-9999999px",opacity:"0"})}_createMarkDecoration(e){const t=['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">',"<style>text { font-family: sans-serif; font-size: 0.8em; }</style>",'<path fill="rgb(3,102,214)" d="M23,27l-8-7l-8,7V5c0-1.105,0.895-2,2-2h12c1.105,0,2,0.895,2,2V27z"/>',`<text x="50%" y="40%" fill="rgb(200,200,200)" text-anchor="middle" dominant-baseline="middle">${e}</text>`,"</svg>"].join(""),r=n.Uri.parse(`data:image/svg+xml;utf8,${encodeURI(t)}`,!0);return n.window.createTextEditorDecorationType({isWholeLine:!1,gutterIconPath:r,gutterIconSize:"cover"})}set default(e){this._default&&this._default.dispose(),this._default=e}get default(){return this._default}set searchHighlight(e){this._searchHighlight&&this._searchHighlight.dispose(),this._searchHighlight=e}get searchHighlight(){return this._searchHighlight}set searchMatch(e){this._searchMatch&&this._searchMatch.dispose(),this._searchMatch=e}get searchMatch(){return this._searchMatch}set substitutionAppend(e){this._substitutionAppend&&this._substitutionAppend.dispose(),this._substitutionAppend=e}get substitutionAppend(){return this._substitutionAppend}set substitutionReplace(e){this._substitutionReplace&&this._substitutionReplace.dispose(),this._substitutionReplace=e}get substitutionReplace(){return this._substitutionReplace}get easyMotionIncSearch(){return this._easyMotionIncSearch}set easyMotionIncSearch(e){this._easyMotionIncSearch&&this._easyMotionIncSearch.dispose(),this._easyMotionIncSearch=e}get easyMotionDimIncSearch(){return this._easyMotionDimIncSearch}set easyMotionDimIncSearch(e){this._easyMotionDimIncSearch&&this._easyMotionDimIncSearch.dispose(),this._easyMotionDimIncSearch=e}getOrCreateMarkDecoration(e){const t=this.getMarkDecoration(e);if(t)return t;{const t=this._createMarkDecoration(e);return this._markDecorationCache.set(e,t),t}}getMarkDecoration(e){return this._markDecorationCache.get(e)}allMarkDecorations(){return this._markDecorationCache.values()}set insertModeVirtualCharacter(e){this._insertModeVirtualCharacter&&this._insertModeVirtualCharacter.dispose(),this._insertModeVirtualCharacter=e}get insertModeVirtualCharacter(){return this._insertModeVirtualCharacter}set operatorPendingModeCursor(e){this._operatorPendingModeCursor&&this._operatorPendingModeCursor.dispose(),this._operatorPendingModeCursor=e}get operatorPendingModeCursor(){return this._operatorPendingModeCursor}set operatorPendingModeCursorChar(e){this._operatorPendingModeCursorChar&&this._operatorPendingModeCursorChar.dispose(),this._operatorPendingModeCursorChar=e}get operatorPendingModeCursorChar(){return this._operatorPendingModeCursorChar}load(e){this.default=n.window.createTextEditorDecorationType({backgroundColor:new n.ThemeColor("editorCursor.foreground"),borderColor:new n.ThemeColor("editorCursor.foreground"),dark:{color:"rgb(81,80,82)"},light:{color:"rgb(255, 255, 255)"},borderStyle:"solid",borderWidth:"1px"});const t=e.searchHighlightColor?e.searchHighlightColor:new n.ThemeColor("editor.findMatchHighlightBackground");this.searchHighlight=n.window.createTextEditorDecorationType({backgroundColor:t,color:e.searchHighlightTextColor,overviewRulerColor:new n.ThemeColor("editorOverviewRuler.findMatchForeground"),after:{color:"transparent",backgroundColor:t}});const r=e.searchMatchColor?e.searchMatchColor:new n.ThemeColor("editor.findMatchBackground");this.searchMatch=n.window.createTextEditorDecorationType({backgroundColor:r,color:e.searchMatchTextColor,overviewRulerColor:new n.ThemeColor("editorOverviewRuler.findMatchForeground"),after:{color:"transparent",backgroundColor:r}});const o=e.substitutionColor?e.substitutionColor:new n.ThemeColor("editor.findMatchBackground");this.substitutionAppend=n.window.createTextEditorDecorationType({backgroundColor:t,color:e.searchHighlightTextColor,overviewRulerColor:new n.ThemeColor("editorOverviewRuler.findMatchForeground"),after:{color:e.substitutionTextColor,backgroundColor:o}}),this.substitutionReplace=n.window.createTextEditorDecorationType({letterSpacing:"-9999999px",opacity:"0",overviewRulerColor:new n.ThemeColor("editorOverviewRuler.findMatchForeground"),before:{color:e.substitutionTextColor,backgroundColor:o}}),this.easyMotionIncSearch=n.window.createTextEditorDecorationType({color:e.easymotionIncSearchForegroundColor,fontWeight:e.easymotionMarkerFontWeight}),this.easyMotionDimIncSearch=n.window.createTextEditorDecorationType({color:e.easymotionDimColor}),this.insertModeVirtualCharacter=n.window.createTextEditorDecorationType({color:"transparent",before:{color:"currentColor",backgroundColor:new n.ThemeColor("editor.background"),borderColor:new n.ThemeColor("editor.background"),margin:"0 -1ch 0 0",height:"100%"}}),this.operatorPendingModeCursor=n.window.createTextEditorDecorationType({before:{color:"transparent",margin:"0 -1ch 0 0;\n position: absolute;\n bottom: 0;\n line-height: 0;",height:"50%",backgroundColor:new n.ThemeColor("editorCursor.foreground")}}),this.operatorPendingModeCursorChar=n.window.createTextEditorDecorationType({color:"black",before:{color:"currentcolor",margin:"0 -1ch 0 0;\n position: absolute;\n mix-blend-mode: exclusion;",height:"100%"}})}}},"./src/configuration/iconfigurationValidator.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorResults=void 0,t.ValidatorResults=class{constructor(){this.errors=new Array}append(e){this.errors.push(e)}concat(e){this.errors=this.errors.concat(e.get())}get(){return this.errors}get numErrors(){return this.errors.filter((e=>"error"===e.level)).length}get hasError(){return this.numErrors>0}get numWarnings(){return this.errors.filter((e=>"warning"===e.level)).length}get hasWarning(){return this.numWarnings>0}}},"./src/configuration/notation.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Notation=void 0;class r{static ToControlCharacter(e){return"<tab>"===e?"\t":e}static IsControlKey(e){return e=e.toLocaleUpperCase(),this.isSurroundedByAngleBrackets(e)&&"<BS>"!==e&&"<S-BS>"!==e&&"<TAB>"!==e}static NormalizeKey(e,t){if("string"!=typeof e)return e;if(1===e.length)return e;if(e=e.toLocaleLowerCase(),this.isSurroundedByAngleBrackets(e)||(e=`<${e}>`),"<leader>"===e)return t;if(["<up>","<down>","<left>","<right>"].includes(e))return e;for(const[t,r]of this.notationMap)e=e.replace(t,r);return this.shiftedLetterRegex.test(e)&&(e=e[3].toUpperCase()),e}static printableKey(e,t){const r=this.NormalizeKey(e,t);return" "===r?"<space>":"\n"===r?"<enter>":r}static isSurroundedByAngleBrackets(e){return e.startsWith("<")&&e.endsWith(">")}}t.Notation=r,r.notationMap=[[/ctrl\+|c\-/gi,"C-"],[/cmd\+|d\-/gi,"D-"],[/shift\+|s\-/gi,"S-"],[/escape|esc/gi,"Esc"],[/backspace|bs/gi,"BS"],[/delete|del/gi,"Del"],[/home/gi,"Home"],[/end/gi,"End"],[/insert/gi,"Insert"],[/<space>/gi," "],[/<cr>|<enter>|<return>/gi,"\n"]],r.shiftedLetterRegex=/<S-[a-zA-Z]>/},"./src/configuration/remapper.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Remapper=t.Remappers=void 0;const n=r("vscode"),o=r("./src/util/logger.ts"),i=r("./src/mode/mode.ts"),s=r("./src/configuration/configuration.ts"),a=r("./src/statusBar.ts"),c=r("./src/error.ts"),u=r("./src/util/specialKeys.ts"),d=r("./src/vimscript/exCommandParser.ts");t.Remappers=class{constructor(){this.remappers=[new m,new p,new f,new v,new g]}get isPotentialRemap(){return this.remappers.some((e=>e.isPotentialRemap))}async sendKey(e,t){for(const r of this.remappers)if(await r.sendKey(e,t))return!0;return!1}};class l{constructor(e,t){this.logger=o.Logger.get("Remapper"),this._isPotentialRemap=!1,this.hasPotentialRemap=!1,this.configKey=e,this.remappedModes=t}get isPotentialRemap(){return this._isPotentialRemap}async sendKey(e,t){var r,n,o;const{vimState:d,remapState:h}=t;this._isPotentialRemap=!1;const m=d.recordedState.allowPotentialRemapOnFirstKey;let p=[],g=!0;if(!this.remappedModes.includes(d.currentModeIncludingPseudoModes))return!1;const f=s.configuration[this.configKey];if(e[e.length-1]===u.SpecialKeys.TimeoutFinished&&(e=e.slice(0,e.length-1),g=!1),0===e.length)return!0;this.logger.debug(`trying to find matching remap. keys=${e}. mode=${i.Mode[d.currentMode]}. keybindings=${this.configKey}.`);let v=this.findMatchingRemap(f,e,d.currentMode),y=l.hasPotentialRemap(e,f);if(this._isPotentialRemap=y&&g&&m,!v&&(this.hasAmbiguousRemap||this.hasPotentialRemap)&&(!y||!g)&&e.length>1&&(this.hasAmbiguousRemap&&(v=this.hasAmbiguousRemap,y=!1,this._isPotentialRemap=!1,p=d.recordedState.commandList.slice(v.before.length),this.hasAmbiguousRemap=void 0),!v)){if(g||(e.push(u.SpecialKeys.TimeoutFinished),this.logger.debug(`${this.configKey}. timeout finished, handling timed out buffer keys without allowing a new timeout.`)),this.logger.debug(`${this.configKey}. potential remap broken. resending keys without allowing a potential remap on first key. keys=${e}`),this.hasPotentialRemap=!1,d.recordedState.allowPotentialRemapOnFirstKey=!1,d.recordedState.resetCommandList(),h.wasPerformingRemapThatFinishedWaitingForTimeout){const r=h.wasPerformingRemapThatFinishedWaitingForTimeout.after.length,n=e.slice(r);e=e.slice(0,r);try{h.isCurrentlyPerformingRecursiveRemapping=!0,await t.handleMultipleKeyEvents(e)}catch(e){e instanceof c.ForceStopRemappingError&&this.logger.debug(`${this.configKey}. Stopped the remapping in the middle, ignoring the rest. Reason: ${e.message}`)}finally{h.isCurrentlyPerformingRecursiveRemapping=!1,h.wasPerformingRemapThatFinishedWaitingForTimeout=!1,await t.handleMultipleKeyEvents(n)}}else await t.handleMultipleKeyEvents(e);return!0}if(y&&g&&m)return v?(this.hasAmbiguousRemap=v,this.logger.debug(`${this.configKey}. ambiguous match found. before=${v.before}. after=${v.after}. command=${v.commands}. waiting for other key or timeout to finish.`)):(this.hasPotentialRemap=!0,this.logger.debug(`${this.configKey}. potential remap found. waiting for other key or timeout to finish.`)),d.recordedState.bufferedKeys=[...e],d.recordedState.bufferedKeysTimeoutObj=setTimeout((()=>{t.handleKeyEvent(u.SpecialKeys.TimeoutFinished)}),s.configuration.timeout),!0;if(v){if(!g){const e={...v};e.after=null===(r=v.after)||void 0===r?void 0:r.slice(0),null===(n=e.after)||void 0===n||n.push(u.SpecialKeys.TimeoutFinished),v=e}this.hasAmbiguousRemap=void 0,this.hasPotentialRemap=!1;let e=!1;const i=h.isCurrentlyPerformingRemapping;i||(h.mapDepth=0),v.recursive?(h.isCurrentlyPerformingRecursiveRemapping=!0,(null===(o=v.after)||void 0===o?void 0:o.join("").startsWith(v.before.join("")))&&(e=!0)):h.isCurrentlyPerformingNonRecursiveRemapping=!0,h.mapDepth++,this.logger.debug(`${this.configKey}. match found. before=${v.before}. after=${v.after}. command=${v.commands}. remainingKeys=${p}. mapDepth=${h.mapDepth}.`);let l=!1;try{if(h.mapDepth>=s.configuration.maxmapdepth){const e=c.VimError.fromCode(c.ErrorCode.RecursiveMapping);throw a.StatusBar.displayError(d,e),c.ForceStopRemappingError.fromVimError(e)}if(h.mapDepth%10==0){const e=e=>new Promise((t=>setTimeout(t,e)));await e(0)}h.remapUsedACharacter=!1,await this.handleRemapping(v,t,e)}catch(e){if(!(e instanceof c.ForceStopRemappingError))throw this.logger.debug(`${this.configKey}. error found in the middle of remapping, ignoring the rest of the remap. error: ${e}`),e;if(l=!0,i)throw e;this.logger.debug(`${this.configKey}. Stopped the remapping in the middle, ignoring the rest. Reason: ${e.message}`)}finally{if(!i&&h.isCurrentlyPerformingRecursiveRemapping&&(void 0!==d.recordedState.bufferedKeysTimeoutObj&&(h.wasPerformingRemapThatFinishedWaitingForTimeout={...v}),h.isCurrentlyPerformingRecursiveRemapping=!1,h.forceStopRecursiveRemapping=!1),i||d.historyTracker.finishCurrentStep(),h.isCurrentlyPerformingNonRecursiveRemapping=!1,p.length>0&&(!l||!i))if(h.wasPerformingRemapThatFinishedWaitingForTimeout){let e="";p[p.length-1]===u.SpecialKeys.TimeoutFinished&&(e=p.pop());const r=h.wasPerformingRemapThatFinishedWaitingForTimeout.after.slice(v.before.length),n=p.slice(r.length);p=p.slice(0,p.length-n.length),e&&(p.push(e),0!==n.length&&n.push(e));try{h.isCurrentlyPerformingRecursiveRemapping=!0,await t.handleMultipleKeyEvents(p)}catch(e){this.logger.debug(`${this.configKey}. Stopped the remapping in the middle, ignoring the rest. Reason: ${e.message}`)}finally{h.isCurrentlyPerformingRecursiveRemapping=!1,h.wasPerformingRemapThatFinishedWaitingForTimeout=!1,n.length>0&&await t.handleMultipleKeyEvents(n)}}else await t.handleMultipleKeyEvents(p)}return!0}return this.hasPotentialRemap=!1,this.hasAmbiguousRemap=void 0,!1}async handleRemapping(e,t,r){const{vimState:o,remapState:i}=t;if(o.recordedState.resetCommandList(),e.after&&(r?(i.isCurrentlyPerformingNonRecursiveRemapping=!0,await t.handleKeyEvent(e.after[0]),i.isCurrentlyPerformingNonRecursiveRemapping=!1,await t.handleMultipleKeyEvents(e.after.slice(1))):await t.handleMultipleKeyEvents(e.after)),e.commands){const r=o.recordedState.count||1;o.recordedState.count=0;for(let i=0;i<r;i++)for(const r of e.commands){let i,s;if("string"==typeof r?(i=r,s=[]):(i=r.command,s=r.args),":"===i.slice(0,1)){const e=d.exCommandParser.parse(i);if(!e.status)throw c.VimError.fromCode(c.ErrorCode.NotAnEditorCommand,i);e.value.lineRange?await e.value.command.executeWithRange(o,e.value.lineRange):await e.value.command.execute(o),await t.updateView()}else s?await n.commands.executeCommand(i,s):await n.commands.executeCommand(i);e.silent||a.StatusBar.setText(o,`${i} ${null!=s?s:""}`)}}}findMatchingRemap(e,t,r){if(0===e.size)return;const n=l.getRemappedKeysLengthRange(e),o=t.length,i=t.join("");for(let r=o;r>=n[0];r--){const n=t.slice(-r).join("");if(this.logger.verbose(`key=${t}. keySlice=${n}.`),e.has(n)){const t=i.slice(0,i.length-n.length);if(t.length>0&&!/^[0-9]+$/.test(t)){this.logger.verbose(`key sequences need to match precisely. precedingKeys=${t}.`);break}return e.get(n)}}}static getRemappedKeysLengthRange(e){if(0===e.size)return[0,0];const t=Array.from(e.values()).map((e=>e.before.length));return[Math.min(...t),Math.max(...t)]}static hasPotentialRemap(e,t,r=!1){const n=e.join(""),o=/^<([^>]+)>/;if(""!==n)for(const e of t.keys())if(e.startsWith(n)&&(e!==n||r)){if(n.startsWith("<")&&!o.test(n)&&o.test(e))continue;return!0}return!1}}function h(e){return`${e}ModeKeyBindingsMap`}t.Remapper=l;class m extends l{constructor(){super(h("insert"),[i.Mode.Insert,i.Mode.Replace])}}class p extends l{constructor(){super(h("normal"),[i.Mode.Normal])}}class g extends l{constructor(){super(h("operatorPending"),[i.Mode.OperatorPendingMode])}}class f extends l{constructor(){super(h("visual"),[i.Mode.Visual,i.Mode.VisualLine,i.Mode.VisualBlock])}}class v extends l{constructor(){super(h("commandLine"),[i.Mode.CommandlineInProgress,i.Mode.SearchInProgressMode])}}},"./src/configuration/validators/inputMethodSwitcherValidator.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputMethodSwitcherConfigurationValidator=void 0;const n=r("./src/configuration/iconfigurationValidator.ts"),o=r("./src/platform/browser/fs.ts"),i=r("./src/globals.ts"),s=r("./src/configuration/configurationValidator.ts");class a{async validate(e){const t=new n.ValidatorResults,r=e.autoSwitchInputMethod;return!r.enable||i.Globals.isTesting||(r.switchIMCmd.includes("{im}")||t.append({level:"error",message:"vim.autoSwitchInputMethod.switchIMCmd is incorrect, it should contain the placeholder {im}."}),void 0===r.obtainIMCmd||""===r.obtainIMCmd?t.append({level:"error",message:"vim.autoSwitchInputMethod.obtainIMCmd is empty."}):await(0,o.existsAsync)(this.getRawCmd(r.obtainIMCmd))||t.append({level:"error",message:`Unable to find ${r.obtainIMCmd}. Check your 'vim.autoSwitchInputMethod.obtainIMCmd' in VSCode setting.`}),void 0===r.defaultIM||""===r.defaultIM?t.append({level:"error",message:"vim.autoSwitchInputMethod.defaultIM is empty."}):await(0,o.existsAsync)(this.getRawCmd(r.switchIMCmd))||t.append({level:"error",message:`Unable to find ${r.switchIMCmd}. Check your 'vim.autoSwitchInputMethod.switchIMCmd' in VSCode setting.`})),Promise.resolve(t)}disable(e){e.autoSwitchInputMethod.enable=!1}getRawCmd(e){return e.split(" ")[0]}}t.InputMethodSwitcherConfigurationValidator=a,s.configurationValidator.registerValidator(new a)},"./src/configuration/validators/remappingValidator.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemappingValidator=void 0;const n=r("vscode"),o=r("./src/configuration/notation.ts"),i=r("./src/configuration/iconfigurationValidator.ts"),s=r("./src/configuration/configurationValidator.ts"),a=r("./src/actions/plugins/pluginDefaultMappings.ts");class c{async validate(e){const t=new i.ValidatorResults,r=["insertModeKeyBindings","insertModeKeyBindingsNonRecursive","normalModeKeyBindings","normalModeKeyBindingsNonRecursive","operatorPendingModeKeyBindings","operatorPendingModeKeyBindingsNonRecursive","visualModeKeyBindings","visualModeKeyBindingsNonRecursive","commandLineModeKeyBindings","commandLineModeKeyBindingsNonRecursive"];for(const n of r){const r=e[n];for(const t of a.PluginDefaultMappings.getPluginDefaultMappings(n,e))r.push(t);const i=-1===n.indexOf("NonRecursive"),s=n.replace("NonRecursive","");let c=e[s+"Map"];c||(c=new Map);for(let n=r.length-1;n>=0;n--){const s=r[n];s.recursive=i;const a=await this.isRemappingValid(s);if(t.concat(a),a.hasError){r.splice(n,1);continue}s.before&&s.before.forEach(((t,r)=>s.before[r]=o.Notation.NormalizeKey(t,e.leader))),s.after&&s.after.forEach(((t,r)=>s.after[r]=o.Notation.NormalizeKey(t,e.leader)));const u=s.before.join("");c.has(u)?t.append({level:"warning",message:`${s.before}. Duplicate remapped key for ${u}.`}):c.set(u,s)}e[s+"Map"]=c}return t}disable(e){}async isRemappingValid(e){const t=new i.ValidatorResults;if(e.after||e.commands||t.append({level:"error",message:`${e.before} missing 'after' key or 'command'.`}),e.before instanceof Array||t.append({level:"error",message:`Remapping of '${e.before}' should be a string array.`}),void 0===e.recursive&&t.append({level:"error",message:`Remapping of '${e.before}' missing 'recursive' info.`}),!e.after||e.after instanceof Array||t.append({level:"error",message:`Remapping of '${e.after}' should be a string array.`}),e.commands)for(const r of e.commands){let n;"string"==typeof r?n=r:r.command?(n=r.command,await this.isCommandValid(n)||t.append({level:"warning",message:`${n} does not exist.`})):t.append({level:"error",message:`Remapping of '${e.before}' has wrong "commands" structure. Should be 'string[] | { "command": string, "args": any[] }[]'.`})}return t}async isCommandValid(e){return!!e.startsWith(":")||(await this.getCommandMap()).has(e)}async getCommandMap(){return null==this.commandMap&&(this.commandMap=new Map((await n.commands.getCommands(!0)).map((e=>[e,!0])))),this.commandMap}}t.RemappingValidator=c,s.configurationValidator.registerValidator(new c)},"./src/error.ts":(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ForceStopRemappingError=t.VimError=t.ErrorMessage=t.ErrorCode=void 0,function(e){e[e.InvalidAddress=14]="InvalidAddress",e[e.InvalidRange=16]="InvalidRange",e[e.MarkNotSet=20]="MarkNotSet",e[e.NoAlternateFile=23]="NoAlternateFile",e[e.NoInsertedTextYet=29]="NoInsertedTextYet",e[e.NoFileName=32]="NoFileName",e[e.NoPreviousSubstituteRegularExpression=33]="NoPreviousSubstituteRegularExpression",e[e.NoPreviousCommand=34]="NoPreviousCommand",e[e.NoPreviousRegularExpression=35]="NoPreviousRegularExpression",e[e.NoWriteSinceLastChange=37]="NoWriteSinceLastChange",e[e.ErrorWritingToFile=208]="ErrorWritingToFile",e[e.FileNoLongerAvailable=211]="FileNoLongerAvailable",e[e.RecursiveMapping=223]="RecursiveMapping",e[e.NoStringUnderCursor=348]="NoStringUnderCursor",e[e.NothingInRegister=353]="NothingInRegister",e[e.InvalidRegisterName=354]="InvalidRegisterName",e[e.SearchHitTop=384]="SearchHitTop",e[e.SearchHitBottom=385]="SearchHitBottom",e[e.CannotCloseLastWindow=444]="CannotCloseLastWindow",e[e.ArgumentRequired=471]="ArgumentRequired",e[e.InvalidArgument=474]="InvalidArgument",e[e.NoRangeAllowed=481]="NoRangeAllowed",e[e.PatternNotFound=486]="PatternNotFound",e[e.TrailingCharacters=488]="TrailingCharacters",e[e.NotAnEditorCommand=492]="NotAnEditorCommand",e[e.NoBuffersDeleted=516]="NoBuffersDeleted",e[e.UnknownOption=518]="UnknownOption",e[e.NumberRequiredAfterEqual=521]="NumberRequiredAfterEqual",e[e.AtStartOfChangeList=662]="AtStartOfChangeList",e[e.AtEndOfChangeList=663]="AtEndOfChangeList",e[e.ChangeListIsEmpty=664]="ChangeListIsEmpty",e[e.NoPreviouslyUsedRegister=748]="NoPreviouslyUsedRegister"}(r=t.ErrorCode||(t.ErrorCode={})),t.ErrorMessage={14:"Invalid address",16:"Invalid range",20:"Mark not set",23:"No alternate file",29:"No inserted text yet",32:"No file name",33:"No previous substitute regular expression",34:"No previous command",35:"No previous regular expression",37:"No write since last change (add ! to override)",208:"Error writing to file",211:"File no longer available",223:"Recursive mapping",348:"No string under cursor",353:"Nothing in register",354:"Invalid register name",384:"Search hit TOP without match for",385:"Search hit BOTTOM without match for",444:"Cannot close last window",471:"Argument required",474:"Invalid argument",481:"No range allowed",486:"Pattern not found",488:"Trailing characters",492:"Not an editor command",516:"No buffers were deleted",518:"Unknown option",521:"Number required after =",662:"At start of changelist",663:"At end of changelist",664:"changelist is empty",748:"No previously used register"};class n extends Error{constructor(e,t){super(),this.code=e,this.message=t}static fromCode(e,o){if(t.ErrorMessage[e])return o&&(o=e===r.NothingInRegister?` ${o}`:`: ${o}`),new n(e,t.ErrorMessage[e]+(null!=o?o:""));throw new Error("unknown error code: "+e)}toString(){return`E${this.code}: ${this.message}`}}t.VimError=n;class o extends Error{constructor(e="StopRemapping"){super(e)}static fromVimError(e){return new o(e.toString())}}t.ForceStopRemappingError=o},"./src/globals.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0;class r{}t.Globals=r,r.isTesting=!1},"./src/history/historyFile.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandLineHistory=t.SearchHistory=t.HistoryFile=void 0;const n=r("./src/util/logger.ts"),o=r("./src/configuration/configuration.ts"),i=r("./src/globals.ts"),s=r("./src/platform/browser/history.ts");class a{constructor(e,t){this.logger=n.Logger.get("HistoryFile"),this.base=new s.HistoryBase(e,t,i.Globals.extensionStoragePath,this.logger)}get historyFilePath(){return this.base.historyKey}async add(e){return this.base.add(e,o.configuration.history)}get(){return this.base.get(o.configuration.history)}clear(){this.base.clear()}async load(){await this.base.load()}}t.HistoryFile=a,t.SearchHistory=class extends a{constructor(e){super(e,".search_history")}},t.CommandLineHistory=class extends a{constructor(e){super(e,".cmdline_history")}}},"./src/history/historyTracker.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryTracker=void 0;const n=r("./node_modules/diff-match-patch/index.js"),o=r("vscode"),i=r("./src/textEditor.ts"),s=r("./src/statusBar.ts"),a=r("vscode"),c=r("./src/jumps/jump.ts"),u=r("./src/state/globalState.ts"),d=r("./src/mode/mode.ts"),l=r("./src/error.ts"),h=r("./src/util/logger.ts"),m=r("./src/common/motion/position.ts"),p=new n.diff_match_patch;p.Diff_Timeout=1;const g=h.Logger.get("HistoryTracker");class f{constructor(e,t,r){this.start=e,this.before=t,this.after=r}static insert(e,t){return new f(e,"",t)}static delete(e,t){return new f(e,t,"")}static replace(e,t,r){return new f(e,t,r)}reversed(){return f.replace(this.start,this.after,this.before)}async do(e){await i.TextEditor.replace(e,this.beforeRange,this.after)}async undo(e){await i.TextEditor.replace(e,this.afterRange,this.before)}get beforeRange(){return new o.Range(this.start,this.start.advancePositionByText(this.before))}get afterRange(){return new o.Range(this.start,this.start.advancePositionByText(this.after))}}class v{constructor(e){var t,r,n;this.isFinished=!1,this.marks=[],this.changes=null!==(t=e.changes)&&void 0!==t?t:[],this.marks=null!==(r=e.marks)&&void 0!==r?r:[],this.cameFromU=null!==(n=e.cameFromU)&&void 0!==n&&n,this.timestamp=new Date}merge(e){if(this.changes.length<2)return;const t=[];let r=this.changes[0];for(const n of this.changes.slice(1)){if(r.before.length+r.after.length===0){if(!(t.length>0)){r=n;continue}r=t.pop()}const o=r.afterRange.intersection(n.beforeRange);if(o){const[t,i]=r.start.isBeforeOrEqual(n.start)?[r,n]:[n,r],s=e.offsetAt(o.end)-e.offsetAt(o.start);r=f.replace(t.start,t.before+i.before.slice(s),t.after.slice(0,t.after.length-s)+i.after)}else t.push(r),r=n}t.push(r),this.changes=t}howLongAgo(){const e=(new Date).getTime()-this.timestamp.getTime(),t=Math.floor(e/1e3);return 1===t?"1 second ago":t>=100?`${this.timestamp.getHours()}:${this.timestamp.getMinutes().toString().padStart(2,"0")}:${this.timestamp.getSeconds().toString().padStart(2,"0")}`:`${t} seconds ago`}}v.globalMarks=[];class y{constructor(){this.historySteps=[],this.currentStepIndex=-1,this.initialMarks=[]}getHistoryStepAtIndex(e){return this.historySteps[e]}getCurrentHistoryStepIndex(){return this.currentStepIndex}getStackDepth(){return this.historySteps.length}getCurrentHistoryStep(){if(-1!==this.currentStepIndex)return this.historySteps[this.currentStepIndex]}stepForward(){if(this.currentStepIndex!==this.historySteps.length-1)return this.currentStepIndex++,this.getCurrentHistoryStep()}stepBackward(){const e=this.getCurrentHistoryStep();return e&&this.currentStepIndex--,e}pushChange(e){var t;let r=this.getCurrentHistoryStep();(void 0===r||r.isFinished)&&(this.currentStepIndex++,this.historySteps.splice(this.currentStepIndex),r=new v({marks:null!==(t=null==r?void 0:r.marks)&&void 0!==t?t:this.initialMarks}),this.historySteps.push(r)),r.changes.push(e)}pushHistoryStep(e){this.currentStepIndex++,this.historySteps.splice(this.currentStepIndex+1),this.historySteps.push(e)}getCurrentMarkList(){var e;const t=this.getCurrentHistoryStep();return null!==(e=null==t?void 0:t.marks)&&void 0!==e?e:this.initialMarks}removeMarks(e){const t=this.getCurrentHistoryStep();void 0===e?t?t.marks=[]:this.initialMarks=[]:t?t.marks=t.marks.filter((t=>!e.includes(t.name))):this.initialMarks=this.initialMarks.filter((t=>!e.includes(t.name)))}}class w{constructor(){this.changeLocations=[]}addChangePosition(e){this.changeLocations.length>0&&this.changeLocations[this.changeLocations.length-1].line===e.line?this.changeLocations[this.changeLocations.length-1]=e:this.changeLocations.push(e),this.index=void 0}nextChangePosition(){return void 0===this.index?0===this.changeLocations.length?l.VimError.fromCode(l.ErrorCode.ChangeListIsEmpty):(this.index=this.changeLocations.length-1,this.changeLocations[this.index]):this.index<this.changeLocations.length-1?(this.index++,this.changeLocations[this.index]):l.VimError.fromCode(l.ErrorCode.AtEndOfChangeList)}prevChangePosition(){return void 0===this.index?0===this.changeLocations.length?l.VimError.fromCode(l.ErrorCode.ChangeListIsEmpty):(this.index=this.changeLocations.length-1,this.changeLocations[this.index]):this.index>0?(this.index--,this.changeLocations[this.index]):l.VimError.fromCode(l.ErrorCode.AtStartOfChangeList)}}t.HistoryTracker=class{constructor(e){this.vimState=e,this.undoStack=new y,this.changeList=new w,this.previousDocumentState={text:this.getDocumentText(),versionNumber:this.getDocumentVersion()},this.lastContentChanges=[],this.currentContentChanges=[]}getDocumentText(){var e,t;return null!==(t=null===(e=this.vimState.editor)||void 0===e?void 0:e.document.getText())&&void 0!==t?t:""}getDocumentVersion(){var e,t;return null!==(t=null===(e=this.vimState.editor)||void 0===e?void 0:e.document.version)&&void 0!==t?t:-1}updateAndReturnMarks(){var e,t;const r=this.getAllCurrentDocumentMarks(),n=[];for(const e of r)n.push({...e});for(const r of null!==(t=null===(e=this.undoStack.getCurrentHistoryStep())||void 0===e?void 0:e.changes)&&void 0!==t?t:[])for(const e of n){let t=r.start;for(const n of r.before.replace(/\r/g,""))t.isBefore(e.position)&&("\n"===n?e.position=new a.Position(Math.max(e.position.line-1,0),e.position.character):t.line===e.position.line&&(e.position=new a.Position(e.position.line,Math.max(e.position.character-1,0)))),t="\n"===n?new a.Position(Math.max(t.line-1,0),99999):new a.Position(t.line,Math.max(t.character-1,0));t=r.start;for(const n of r.after.replace(/\r/g,""))t.isBeforeOrEqual(e.position)&&("\n"===n?e.position=new a.Position(e.position.line+1,e.position.character):t.line===e.position.line&&(e.position=new a.Position(e.position.line,e.position.character+1))),t="\n"===n?new a.Position(t.line+1,0):new a.Position(t.line,t.character+1)}const o=i.TextEditor.getDocumentEnd(this.vimState.document);for(const e of n)e.position.isAfter(o)&&(e.position=o);return n}getMarkList(e){return e?v.globalMarks:this.undoStack.getCurrentMarkList()}getAllCurrentDocumentMarks(){const e=v.globalMarks.filter((e=>{var t;return e.document===(null===(t=o.window.activeTextEditor)||void 0===t?void 0:t.document)}));return[...this.getLocalMarks(),...e]}addMark(e,t){var r;if("'"===t||"`"===t)return u.globalState.jumpTracker.recordJump(c.Jump.fromStateNow(this.vimState));const n=t.toUpperCase()===t,i={position:e,name:t,isUppercaseMark:n,document:n?null===(r=o.window.activeTextEditor)||void 0===r?void 0:r.document:void 0};this.putMarkInList(i)}putMarkInList(e){const t=this.getMarkList(e.isUppercaseMark),r=t.findIndex((t=>t.name===e.name));-1!==r?t[r]=e:t.push(e)}getMark(e){var t,r,n,o,i,s,a;let c;return"<"===e?c=(null===(t=this.vimState.lastVisualSelection)||void 0===t?void 0:t.mode)===d.Mode.VisualLine?null===(r=this.vimState.lastVisualSelection)||void 0===r?void 0:r.start.with({character:0}):null===(n=this.vimState.lastVisualSelection)||void 0===n?void 0:n.start:">"===e?c=(null===(o=this.vimState.lastVisualSelection)||void 0===o?void 0:o.mode)===d.Mode.VisualLine?null===(i=this.vimState.lastVisualSelection)||void 0===i?void 0:i.end.getLineEnd():null===(s=this.vimState.lastVisualSelection)||void 0===s?void 0:s.end.getLeft():"["===e?c=this.getLastChangeStartPosition():"]"===e?c=this.getLastChangeEndPosition():"."===e?c=this.getLastHistoryStartPosition():"'"!==e&&"`"!==e||(c=null===(a=u.globalState.jumpTracker.end)||void 0===a?void 0:a.position),c?{name:e,position:c,isUppercaseMark:!1}:this.getMarkList(e.toUpperCase()===e).find((t=>t.name===e))}removeLocalMarks(){this.undoStack.removeMarks()}removeMarks(e){0!==e.length&&(this.undoStack.removeMarks(e),v.globalMarks=v.globalMarks.filter((t=>""===t.name||!e.includes(t.name))))}getLocalMarks(){return[...this.undoStack.getCurrentMarkList()]}getGlobalMarks(){return[...v.globalMarks]}getMarks(){return[...this.getLocalMarks(),...v.globalMarks]}addChange(e=!1){if(this.getDocumentVersion()===this.previousDocumentState.versionNumber)return;if(void 0===this.nextStepStartPosition){const e=this.vimState.cursorsInitialState[0];this.nextStepStartPosition=(0,m.earlierOf)(e.start,e.stop),g.debug(`Set nextStepStartPosition to ${this.nextStepStartPosition}`)}if(!e&&(this.vimState.currentMode===d.Mode.Insert||this.vimState.currentMode===d.Mode.Replace))return;const t=this.getDocumentText();if(t===this.previousDocumentState.text)return;const r=p.diff_main(this.previousDocumentState.text,t);p.diff_cleanupEfficiency(r);let o=new a.Position(0,0);for(const e of r){const[t,r]=e,i=t===n.DIFF_INSERT,s=t===n.DIFF_DELETE;(i||s)&&this.undoStack.pushChange(i?f.insert(o,r):f.delete(o,r)),s||(o=o.advancePositionByText(r))}this.previousDocumentState={text:t,versionNumber:this.getDocumentVersion()}}ignoreChange(){this.previousDocumentState={text:this.getDocumentText(),versionNumber:this.getDocumentVersion()}}finishCurrentStep(){var e;const t=this.undoStack.getCurrentHistoryStep();if(t&&!t.isFinished){t.isFinished=!0,t.timestamp=new Date,null!==(e=t.cursorStart)&&void 0!==e||(t.cursorStart=this.nextStepStartPosition),this.nextStepStartPosition=void 0,t.merge(this.vimState.document),t.marks=this.updateAndReturnMarks();const r=t.changes;if(r){const e=r[0].after?r[0].afterRange.end.getLeft():r[0].start;this.changeList.addChangePosition(e)}g.debug(`Finished history step with ${r.length} change(s)`)}}async goBackHistoryStep(){const e=this.undoStack.stepBackward();if(void 0===e)return;for(const t of e.changes.slice(0).reverse())await t.undo(this.vimState.editor);this.ignoreChange();const t=1===e.changes.length?"1 change":`${e.changes.length} changes`;return s.StatusBar.setText(this.vimState,`${t}; before #${this.undoStack.getCurrentHistoryStepIndex()+1} ${e.howLongAgo()}`),e.cursorStart}async goForwardHistoryStep(){const e=this.undoStack.stepForward();if(void 0===e)return;for(const t of e.changes)await t.do(this.vimState.editor);this.ignoreChange();const t=1===e.changes.length?"1 change":`${e.changes.length} changes`;return s.StatusBar.setText(this.vimState,`${t}; after #${this.undoStack.getCurrentHistoryStepIndex()} ${e.howLongAgo()}`),e.cursorStart}async goBackHistoryStepsOnLine(){const e=this.undoStack.getCurrentHistoryStep();if(void 0===e)return;let t=!1;const r=[];let n=e.changes[e.changes.length-1];const o=n.afterRange.end.line;for(let e=this.undoStack.getCurrentHistoryStepIndex();e>=0;e--){const i=this.undoStack.getHistoryStepAtIndex(e);for(let e of[...i.changes].reverse()){const i=[...e.after.matchAll(/\n/g)];if(i.length>0&&e.start.line+i.length===o)e=f.insert(new a.Position(e.start.line+1,0),e.after.slice(e.after.lastIndexOf("\n"))),t=!0;else if(i.length>0||e.start.line!==o){t=!0;break}if(r.push(e),n=e,t)break}if(i.cameFromU&&(t=!0),t)break}if(r.length>0){for(const e of r)await e.undo(this.vimState.editor);const e=new v({marks:this.undoStack.getCurrentMarkList(),changes:r.map((e=>e.reversed())).reverse(),cameFromU:!0});this.nextStepStartPosition=n.start,this.undoStack.pushHistoryStep(e),this.finishCurrentStep()}return this.ignoreChange(),null==n?void 0:n.start}getLastChangeEndPosition(){const e=this.undoStack.getCurrentHistoryStep();if(void 0===e)return;const t=e.changes.length;return 0!==t?e.changes[t-1].afterRange.end:void 0}getLastHistoryStartPosition(){var e;return null===(e=this.undoStack.getCurrentHistoryStep())||void 0===e?void 0:e.cursorStart}getLastChangeStartPosition(){const e=this.undoStack.getCurrentHistoryStep();if(void 0===e)return;const t=e.changes;return 0!==t.length?t[t.length-1].start:void 0}nextChangeInChangeList(){return this.changeList.nextChangePosition()}prevChangeInChangeList(){return this.changeList.prevChangePosition()}toString(){let e="";for(let t=0;t<this.undoStack.getStackDepth();t++){const r=this.undoStack.getHistoryStepAtIndex(t);e+=r.changes.map((e=>`${e.before.replace(/\n/g,"\\n")} => ${e.after.replace(/\n/g,"\\n")}`)).join(""),t===this.undoStack.getCurrentHistoryStepIndex()&&(e+="+"),r.isFinished&&(e+="✓"),e+="| "}return e}}},"./src/jumps/jump.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Jump=void 0;class r{constructor({document:e,position:t}){this.document=e,this.position=t}get fileName(){return this.document.fileName}static fromStateNow(e){return new r({document:e.document,position:e.cursorStopPosition})}static fromStateBefore(e){return new r({document:e.document,position:e.cursorsInitialState[0].stop})}isSamePosition(e){return this.fileName===e.fileName&&this.position.isEqual(e.position)}}t.Jump=r},"./src/jumps/jumpTracker.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JumpTracker=void 0;const n=r("vscode"),o=r("./src/cmd_line/commands/file.ts"),i=r("./src/jumps/jump.ts"),s=r("./src/platform/browser/fs.ts"),a=r("vscode"),c=r("./src/error.ts");t.JumpTracker=class{constructor(){this._jumps=[],this._currentJumpNumber=0,this.isJumpingThroughHistory=!1}get jumps(){return this._jumps}get currentJumpNumber(){return this._currentJumpNumber}get currentJump(){return this._jumps[this._currentJumpNumber]||null}get hasJumps(){return this._jumps.length>0}get end(){return this._jumps[this._jumps.length-1]}recordJump(e,t){t&&e.isSamePosition(t)||this.pushJump(e,t)}handleFileJump(e,t){this.isJumpingThroughHistory?this.isJumpingThroughHistory=!1:t.document.isClosed||this.pushJump(e,t)}async performFileJump(e,t){if(this.isJumpingThroughHistory=!0,e.document)try{await n.window.showTextDocument(e.document)}catch(e){throw c.VimError.fromCode(c.ErrorCode.FileNoLongerAvailable)}else if(await(0,s.existsAsync)(e.fileName))await new o.FileCommand({name:"edit",bang:!1,opt:[],file:e.fileName,cmd:{type:"line_number",line:e.position.line},createFileIfNotExists:!1}).execute(t);else{const t=n.window.visibleTextEditors.filter((t=>t.document.fileName===e.fileName))[0];t&&await n.window.showTextDocument(t.document,e.position.character,!1)}}async jumpForward(e,t){await this.jumpThroughHistory(this.recordJumpForward.bind(this),e,t)}async jumpBack(e,t){await this.jumpThroughHistory(this.recordJumpBack.bind(this),e,t)}async jumpThroughHistory(e,t,r){let n=new i.Jump({document:r.document,position:t});const o=r.recordedState.count||1;for(let t=0;t<o;t++)n=e(i.Jump.fromStateNow(r));n&&(n.fileName!==r.document.fileName?await this.performFileJump(n,r):r.cursorStopPosition=n.position)}recordJumpBack(e){if(!this.hasJumps)return e;if(this._currentJumpNumber<=0)return this._jumps[0];const t=this._jumps[this._currentJumpNumber-1];return this._currentJumpNumber===this._jumps.length?(this.recordJump(e,t),this._currentJumpNumber=this._currentJumpNumber-2):this._currentJumpNumber=this._currentJumpNumber-1,t}recordJumpForward(e){return this.hasJumps?this._currentJumpNumber>=this._jumps.length?e:(this._currentJumpNumber=Math.min(this._currentJumpNumber+1,this._jumps.length-1),this._jumps[this._currentJumpNumber]):e}handleTextAdded(e,t,r){const n=r.split("").filter((e=>"\n"===e)).length;this._jumps.forEach(((r,o)=>{if(r.fileName===e.fileName&&r.position.line>t.start.line){const e=new a.Position(r.position.line+n,r.position.character);this.changePositionForJumpNumber(o,r,e)}}))}handleTextDeleted(e,t){const r=t.end.line-t.start.line;for(let n=this._jumps.length-1;n>=0;n--){const o=this._jumps[n];if(o.fileName===e.fileName&&o.position.line>t.start.line){const e=o.position.line-Math.min(o.position.line-t.start.line,r),i=new a.Position(e,o.position.character);this.changePositionForJumpNumber(n,o,i)}}this.removeDuplicateJumps()}clearJumps(){this._jumps.splice(0,this._jumps.length),this._currentJumpNumber=0}pushJump(e,t){e&&this.clearJumpsOnSameLine(e),!e||t&&e.isSamePosition(t)||(100===this._jumps.length&&this._jumps.splice(0,1),this._jumps.push(e)),this._currentJumpNumber=this._jumps.length}changePositionForJumpNumber(e,t,r){this._jumps.splice(e,1,new i.Jump({document:t.document,position:r}))}clearJumpsOnSameLine(e){this._jumps=this._jumps.filter((t=>t===e||!(t.fileName===e.fileName&&t.position.line===e.position.line)))}removeDuplicateJumps(){const e={};for(let t=this._jumps.length-1;t>=0;t--){const r=this._jumps[t];e[r.fileName]||(e[r.fileName]=[]),e[r.fileName].includes(r.position.line)?this._jumps.splice(t,1):e[r.fileName].push(r.position.line)}}}},"./src/mode/mode.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visualBlockGetBottomRightPosition=t.visualBlockGetTopLeftPosition=t.getCursorStyle=t.isStatusBarMode=t.isVisualMode=t.VSCodeVimCursorType=t.Mode=void 0;const n=r("vscode"),o=r("vscode");var i,s;!function(e){e[e.Normal=0]="Normal",e[e.Insert=1]="Insert",e[e.Visual=2]="Visual",e[e.VisualBlock=3]="VisualBlock",e[e.VisualLine=4]="VisualLine",e[e.SearchInProgressMode=5]="SearchInProgressMode",e[e.CommandlineInProgress=6]="CommandlineInProgress",e[e.Replace=7]="Replace",e[e.EasyMotionMode=8]="EasyMotionMode",e[e.EasyMotionInputMode=9]="EasyMotionInputMode",e[e.SurroundInputMode=10]="SurroundInputMode",e[e.OperatorPendingMode=11]="OperatorPendingMode",e[e.Disabled=12]="Disabled"}(i=t.Mode||(t.Mode={})),function(e){e[e.Block=0]="Block",e[e.Line=1]="Line",e[e.LineThin=2]="LineThin",e[e.Underline=3]="Underline",e[e.TextDecoration=4]="TextDecoration",e[e.Native=5]="Native",e[e.UnderlineThin=6]="UnderlineThin"}(s=t.VSCodeVimCursorType||(t.VSCodeVimCursorType={})),t.isVisualMode=function(e){return[i.Visual,i.VisualLine,i.VisualBlock].includes(e)},t.isStatusBarMode=function(e){return[i.SearchInProgressMode,i.CommandlineInProgress].includes(e)},t.getCursorStyle=function(e){switch(e){case s.Block:return n.TextEditorCursorStyle.Block;case s.Line:return n.TextEditorCursorStyle.Line;case s.LineThin:return n.TextEditorCursorStyle.LineThin;case s.Underline:return n.TextEditorCursorStyle.Underline;case s.UnderlineThin:return n.TextEditorCursorStyle.UnderlineThin;case s.TextDecoration:return n.TextEditorCursorStyle.LineThin;case s.Native:default:return n.TextEditorCursorStyle.Block}},t.visualBlockGetTopLeftPosition=function(e,t){return new o.Position(Math.min(e.line,t.line),Math.min(e.character,t.character))},t.visualBlockGetBottomRightPosition=function(e,t){return new o.Position(Math.max(e.line,t.line),Math.max(e.character,t.character))}},"./src/mode/modeHandler.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeHandler=void 0;const n=r("vscode"),o=r("./src/actions/base.ts"),i=r("./src/actions/baseMotion.ts"),s=r("./src/actions/commands/insert.ts"),a=r("./src/jumps/jump.ts"),c=r("./src/util/logger.ts"),u=r("./src/mode/mode.ts"),d=r("./src/common/matching/matcher.ts"),l=r("./src/common/motion/position.ts"),h=r("./src/common/motion/cursor.ts"),m=r("./src/state/recordedState.ts"),p=r("./src/register/register.ts"),g=r("./src/configuration/remapper.ts"),f=r("./src/statusBar.ts"),v=r("./src/textEditor.ts"),y=r("./src/error.ts"),w=r("./src/state/vimState.ts"),x=r("./src/util/vscodeContext.ts"),S=r("./src/cmd_line/commandLine.ts"),C=r("./src/configuration/configuration.ts"),M=r("./src/configuration/decoration.ts"),b=r("./src/util/util.ts"),k=r("./src/actions/commands/actions.ts"),R=r("./src/transformations/transformations.ts"),P=r("./src/transformations/execute.ts"),_=r("./src/state/globalState.ts"),E=r("./src/configuration/notation.ts"),A=r("./src/util/specialKeys.ts"),T=r("./src/util/decorationUtils.ts"),L=r("./src/actions/operator.ts"),$=r("./src/actions/plugins/easymotion/easymotion.cmd.ts"),B=r("vscode"),I=r("./src/state/remapState.ts"),N=r("./node_modules/process/browser.js"),O=r("./src/actions/plugins/easymotion/easymotion.ts");class V{constructor(e,t){this.focusChanged=!1,this.disposables=[],this.handlerMap=e,this.remappers=new g.Remappers,this.vimState=new w.VimState(t,new O.EasyMotion),this.remapState=new I.RemapState,this.disposables.push(this.vimState)}get currentMode(){return this._currentMode}async setCurrentMode(e){await this.vimState.setCurrentMode(e),this._currentMode=e}static async create(e,t=n.window.activeTextEditor){const r=new V(e,t);return await r.vimState.load(),await r.setCurrentMode(C.configuration.startInInsertMode?u.Mode.Insert:u.Mode.Normal),r.syncCursors(),r}syncCursors(){if(this.vimState.editor){const{selections:e}=this.vimState.editor;this.vimState.cursorStartPosition.isEqual(e[0].anchor)&&this.vimState.cursorStopPosition.isEqual(e[0].active)||(this.vimState.desiredColumn=e[0].active.character),this.vimState.cursors=e.map((({active:e,anchor:t})=>e.isBefore(t)?new h.Cursor(t.getLeft(),e):new h.Cursor(t,e)))}}async handleSelectionChange(e){if(void 0===n.window.activeTextEditor||e.textEditor.document!==n.window.activeTextEditor.document)return;const t=e.selections[0];V.logger.debug(`Selections: Handling Selection Change! Selection: ${t.anchor.toString()}, ${t.active}, SelectionsLength: ${e.selections.length}`);const r=()=>e.selections.every((e=>this.vimState.cursors.every((t=>!e.contains(new n.Range(t.start,t.stop))))));if((e.selections.length!==this.vimState.cursors.length||this.vimState.isMultiCursor)&&this.vimState.currentMode!==u.Mode.VisualBlock){const t=[u.Mode.Normal];return r()||t.push(u.Mode.Insert,u.Mode.Replace),this.vimState.cursors=e.textEditor.selections.map((e=>new h.Cursor(e.anchor.isAfter(e.active)?e.anchor.getLeft():e.anchor,e.active))),e.selections.some((e=>!e.anchor.isEqual(e.active)))&&t.includes(this.vimState.currentMode)&&await this.setCurrentMode(u.Mode.Visual),this.updateView({drawSelection:!1,revealRange:!1})}if(e.kind!==n.TextEditorSelectionChangeKind.Mouse){if(t){if(e.kind===n.TextEditorSelectionChangeKind.Command){const e=[u.Mode.Normal,u.Mode.Visual];if(r()||e.push(u.Mode.Insert,u.Mode.Replace),e.includes(this.vimState.currentMode)){if(this.vimState.currentMode===u.Mode.Visual)return V.logger.debug("Selections: Updating Visual Selection!"),this.vimState.cursorStopPosition=t.active,this.vimState.cursorStartPosition=t.anchor,void await this.updateView({drawSelection:!1,revealRange:!1});if(!t.active.isEqual(t.anchor))return V.logger.debug("Selections: Creating Visual Selection from command!"),this.vimState.cursorStopPosition=t.active,this.vimState.cursorStartPosition=t.anchor,await this.setCurrentMode(u.Mode.Visual),void await this.updateView({drawSelection:!1,revealRange:!1})}}if((0,u.isVisualMode)(this.vimState.currentMode))return;const o=(0,l.laterOf)(this.vimState.cursorStartPosition,this.vimState.cursorStopPosition);if(e.textEditor.document.validatePosition(o).isBefore(o));else if(e.kind===n.TextEditorSelectionChangeKind.Keyboard&&this.vimState.cursorStopPosition.isEqual(this.vimState.cursorStartPosition)&&this.vimState.cursorStopPosition.getRight().isLineEnd()&&this.vimState.cursorStopPosition.getLineEnd().isEqual(t.active))return;V.logger.debug(`Selections: Changing Cursors from selection handler... ${t.anchor.toString()}, ${t.active}`),this.vimState.cursorStopPosition=t.active,this.vimState.cursorStartPosition=t.anchor,await this.updateView({drawSelection:!1,revealRange:!1})}return}if((0,u.isStatusBarMode)(this.vimState.currentMode))return;let o=!1;if(t){let e=t.active;if(e.character>=e.getLineEnd().character&&t.isEmpty?this.vimState.currentMode!==u.Mode.Insert&&(this.vimState.lastClickWasPastEol=!0,e=e.withColumn(Math.max(e.getLineEnd().character-1,0)),await this.setCurrentMode(u.Mode.Normal),o=!0):t.isEmpty&&(this.vimState.lastClickWasPastEol=!1),this.vimState.cursorStopPosition=e,this.vimState.cursorStartPosition=e,this.vimState.desiredColumn=e.character,t.anchor.line===t.active.line&&t.anchor.character>=e.getLineEnd().character&&t.active.character>=e.getLineEnd().character);else if(t.anchor.isEqual(t.active))this.vimState.currentMode!==u.Mode.Insert&&await this.setCurrentMode(u.Mode.Normal);else{let r=new B.Position(t.anchor.line,t.anchor.character);if(r.character>r.getLineEnd().character&&(r=new B.Position(r.line,r.getLineEnd().character)),this.vimState.cursorStartPosition=r,r.isAfter(e)&&(this.vimState.cursorStartPosition=this.vimState.cursorStartPosition.getLeft()),this.vimState.lastClickWasPastEol){const e=new B.Position(t.anchor.line,t.anchor.character+1);this.vimState.editor.selection=new n.Selection(e,t.end),this.vimState.cursorStartPosition=r,this.vimState.lastClickWasPastEol=!1}C.configuration.mouseSelectionGoesIntoVisualMode&&!(0,u.isVisualMode)(this.vimState.currentMode)&&this.currentMode!==u.Mode.Insert&&await this.setCurrentMode(u.Mode.Visual)}this.updateView({drawSelection:o,revealRange:!1})}}async handleMultipleKeyEvents(e){for(const t of e)await this.handleKeyEvent(t)}async handleKeyEvent(e){const t=Number(new Date),r=E.Notation.printableKey(e,C.configuration.leader);if(this.remapState.forceStopRecursiveRemapping)return;V.logger.debug(`handling key=${r}.`),(e===A.SpecialKeys.TimeoutFinished||this.vimState.recordedState.bufferedKeys.length>0)&&this.vimState.recordedState.bufferedKeysTimeoutObj&&(clearTimeout(this.vimState.recordedState.bufferedKeysTimeoutObj),this.vimState.recordedState.bufferedKeysTimeoutObj=void 0,this.vimState.recordedState.commandList=[...this.vimState.recordedState.bufferedKeys],this.vimState.recordedState.bufferedKeys=[]),C.configuration.overrideCopy&&("<D-c>"===e&&(e="<copy>"),"<C-c>"===e&&"darwin"!==N.platform&&(C.configuration.useCtrlKeys&&this.vimState.currentMode!==u.Mode.Visual&&this.vimState.currentMode!==u.Mode.VisualBlock&&this.vimState.currentMode!==u.Mode.VisualLine||(e="<copy>"))),"<C-d>"===e&&!0!==C.configuration.handleKeys["<C-d>"]&&(e="<D-d>"),this.vimState.cursorsInitialState=this.vimState.cursors,this.vimState.recordedState.commandList.push(e);const n=this.vimState.currentMode,o=this.vimState.currentModeIncludingPseudoModes,i=f.StatusBar.getText(),s=this.vimState.recordedState.waitingForAnotherActionKey;let a=!1,c=!1;try{const t="0"===e&&this.vimState.recordedState.actionsRun[this.vimState.recordedState.actionsRun.length-1]instanceof k.CommandNumber;this.remapState.isCurrentlyPerformingNonRecursiveRemapping||t||this.vimState.recordedState.waitingForAnotherActionKey||(a=await this.remappers.sendKey(this.vimState.recordedState.commandList,this)),this.vimState.recordedState.allowPotentialRemapOnFirstKey=!0,a||(e===A.SpecialKeys.TimeoutFinished&&(this.vimState.recordedState.commandList.pop(),e=this.vimState.recordedState.commandList[this.vimState.recordedState.commandList.length-1]),void 0!==e&&(c=await this.handleKeyAsAnAction(e)))}catch(t){if(this.vimState.selectionsChanged.ignoreIntermediateSelections=!1,!(t instanceof y.VimError))throw t instanceof y.ForceStopRemappingError?t:t instanceof Error?(t.message=`Failed to handle key \`${e}\`: ${t.message}`,t):new Error(`Failed to handle key \`${e}\` due to an unknown error.`);if(f.StatusBar.displayError(this.vimState,t),this.vimState.recordedState=new m.RecordedState,this.remapState.isCurrentlyPerformingRemapping)throw y.ForceStopRemappingError.fromVimError(t)}if(this.remapState.lastKeyPressedTimestamp=t,f.StatusBar.updateShowCmd(this.vimState),f.StatusBar.getText()===i){const e=this.vimState.currentMode!==n&&this.vimState.currentMode!==u.Mode.Normal||void 0!==this.vimState.macro;f.StatusBar.clear(this.vimState,e)}if(this.vimState.recordedState.resetCommandList(),V.logger.debug(`handleKeyEvent('${r}') took ${Number(new Date)-t}ms`),this.remapState.isCurrentlyPerformingRemapping&&this.vimState.lastMovementFailed)throw this.vimState.lastMovementFailed=!1,new y.ForceStopRemappingError("Last movement failed");this.vimState.lastMovementFailed=!1,c||((this.vimState.currentMode===u.Mode.Insert||this.vimState.currentMode===u.Mode.Replace)&&(this.vimState.recordedState.bufferedKeys.length>0||this.vimState.recordedState.waitingForAnotherActionKey||this.vimState.recordedState.waitingForAnotherActionKey!==s)||this.vimState.currentModeIncludingPseudoModes!==o)&&await this.updateView({drawSelection:!1,revealRange:!1})}async handleKeyAsAnAction(e){if(n.window.activeTextEditor!==this.vimState.editor)return V.logger.warn("Current window is not active"),!1;this.vimState.historyTracker.addChange();const t=this.vimState.recordedState;t.actionKeys.push(e);const r=(0,o.getRelevantAction)(t.actionKeys,this.vimState);switch(r){case o.KeypressState.NoPossibleMatch:return this.vimState.currentMode===u.Mode.Insert?this.vimState.recordedState.actionKeys=[]:this.vimState.recordedState=new m.RecordedState,this.vimState.recordedState.waitingForAnotherActionKey=!1,!1;case o.KeypressState.WaitingOnKeys:return this.vimState.recordedState.waitingForAnotherActionKey=!0,!1}!this.remapState.remapUsedACharacter&&this.remapState.isCurrentlyPerformingRecursiveRemapping&&(this.remapState.remapUsedACharacter=!0,this.remapState.mapDepth=0),this.vimState.recordedState.waitingForAnotherActionKey=!1,t.actionsRunPressedKeys.push(...t.actionKeys);let i=r;if(0===t.actionsRun.length)t.actionsRun.push(r);else{const n=t.actionsRun[t.actionsRun.length-1],o=r instanceof s.CommandInsertInInsertMode||r instanceof s.CommandBackspaceInInsertMode||r instanceof s.CommandInsertPreviousText||r instanceof s.InsertCharAbove||r instanceof s.InsertCharBelow;if(n instanceof k.DocumentContentChangeAction)r instanceof s.CommandEscInsertMode||n.keysPressed.push(e),o?i=void 0:(n.addChanges(this.vimState.historyTracker.currentContentChanges,this.vimState.cursorStopPosition),this.vimState.historyTracker.currentContentChanges=[],t.actionsRun.push(r));else if(o){this.vimState.historyTracker.currentContentChanges=[];const r=new k.DocumentContentChangeAction(this.vimState.cursorStopPosition);r.keysPressed.push(e),t.actionsRun.push(r),i=r}else t.actionsRun.push(r)}return void 0===this.vimState.macro||!i||i instanceof k.CommandQuitRecordMacro||this.vimState.macro.actionsRun.push(i),await this.runAction(t,r),this.vimState.currentMode===u.Mode.Insert&&(t.isInsertion=!0),await this.updateView(),r.isJump&&_.globalState.jumpTracker.recordJump(a.Jump.fromStateBefore(this.vimState),a.Jump.fromStateNow(this.vimState)),!0}async runAction(e,t){this.vimState.selectionsChanged.ignoreIntermediateSelections=!0,this.vimState.currentMode===u.Mode.Visual&&(this.vimState.cursors=this.vimState.cursors.map((e=>e.start.isBefore(e.stop)?e.withNewStop(e.stop.getLeftThroughLineBreaks(!0)):e))),this.vimState.cursors=this.vimState.cursors.map((e=>new h.Cursor(this.vimState.document.validatePosition(e.start),this.vimState.document.validatePosition(e.stop))));let r=!1,s=!1;if(t instanceof i.BaseMovement)e=await this.executeMovement(t),s=!0;else if(t instanceof o.BaseCommand){await t.execCount(this.vimState.cursorStopPosition,this.vimState);const e=this.vimState.recordedState.transformer;await(0,P.executeTransformations)(this,e.transformations),t.isCompleteAction&&(s=!0),t.createsUndoPoint&&(r=!0)}else{if(!(t instanceof L.BaseOperator))throw new Error("Unknown action type");e.operatorCount=e.count}const a=this.currentMode;if(this.vimState.currentMode!==this.currentMode&&(await this.setCurrentMode(this.vimState.currentMode),this.vimState.currentMode===u.Mode.Normal&&a!==u.Mode.SearchInProgressMode&&a!==u.Mode.EasyMotionInputMode&&a!==u.Mode.EasyMotionMode&&(r=!0)),"ready"===e.getOperatorState(this.vimState.currentMode)){const e=this.vimState.recordedState.operator;e&&(await this.executeOperator(),this.vimState.recordedState.hasRunOperator=!0,r=e.createsUndoPoint,s=!0)}if(this.vimState.currentMode!==this.currentMode&&(await this.setCurrentMode(this.vimState.currentMode),this.vimState.currentMode===u.Mode.Normal&&(r=!0)),r=r&&this.vimState.currentMode===u.Mode.Normal||this.createUndoPointForBrackets(),r&&this.vimState.lastCommandDotRepeatable&&(_.globalState.previousFullAction=this.vimState.recordedState,e.isInsertion&&p.Register.setReadonlyRegister(".",e)),this.vimState.lastCommandDotRepeatable=!0,t instanceof L.BaseOperator&&!s||t.preservesDesiredColumn||(t instanceof i.BaseMovement?t.setsDesiredColumnToEOL&&!e.operator?this.vimState.desiredColumn=Number.POSITIVE_INFINITY:this.vimState.desiredColumn=this.vimState.cursorStopPosition.character:this.vimState.currentMode!==u.Mode.VisualBlock&&(this.vimState.desiredColumn=this.vimState.cursorStopPosition.character)),this.vimState.currentMode===u.Mode.Visual&&(this.vimState.cursors=this.vimState.cursors.map((e=>e.start.isBeforeOrEqual(e.stop)?e.withNewStop(e.stop.isLineEnd()?e.stop.getRightThroughLineBreaks():e.stop.getRight()):e))),s&&this.vimState.currentMode===u.Mode.Normal&&(this.vimState.recordedState=new m.RecordedState,this.vimState.returnToInsertAfterCommand&&(this.vimState.actionCount>0?await this.setCurrentMode(u.Mode.Insert):this.vimState.actionCount++)),this.focusChanged||this.vimState.historyTracker.addChange(),!r||this.vimState.isReplayingMacro||this.remapState.isCurrentlyPerformingRemapping||this.vimState.historyTracker.finishCurrentStep(),e.actionKeys=[],this.vimState.currentRegisterMode=void 0,this.currentMode===u.Mode.Normal&&(this.vimState.cursors=this.vimState.cursors.map((e=>new h.Cursor(e.stop,e.stop)))),!this.vimState.document.isClosed&&this.vimState.editor===n.window.activeTextEditor){const e=v.TextEditor.getDocumentEnd(this.vimState.document),t=this.vimState.document.lineCount;this.vimState.cursors=this.vimState.cursors.map((r=>{if(r.start.line>=t&&(r=r.withNewStart(e)),r.stop.line>=t&&(r=r.withNewStop(e)),this.vimState.currentMode===u.Mode.Normal||(0,u.isVisualMode)(this.vimState.currentMode)){const e=v.TextEditor.getLineLength(r.stop.line),t=v.TextEditor.getLineLength(r.start.line),n=(0,u.isVisualMode)(this.vimState.currentMode)&&e>0?1:0;r.start.character>=t&&(r=r.withNewStart(r.start.withColumn(Math.max(t-1,0)))),r.stop.character>=e+n&&(r=r.withNewStop(r.stop.withColumn(Math.max(e-1,0))))}return r}))}(0,u.isVisualMode)(this.vimState.currentMode)&&!this.vimState.isRunningDotCommand&&(this.vimState.lastVisualSelection={mode:this.vimState.currentMode,start:this.vimState.cursorStartPosition,end:this.vimState.cursorStopPosition}),this.vimState.selectionsChanged.ignoreIntermediateSelections=!1}async executeMovement(e){this.vimState.lastMovementFailed=!1;const t=this.vimState.recordedState,r=[];for(let n=0;n<this.vimState.cursors.length;n++){const o=this.vimState.cursorStartPosition,i=this.vimState.cursorStopPosition;e.multicursorIndex=n,this.vimState.cursorStartPosition=this.vimState.cursors[n].start;const s=this.vimState.cursors[n].stop;this.vimState.cursorStopPosition=s;const a=await e.execActionWithCount(s,this.vimState,t.count);this.vimState.cursors[n]=new h.Cursor(this.vimState.cursorStartPosition,this.vimState.cursorStopPosition),this.vimState.cursorStartPosition=o,this.vimState.cursorStopPosition=i,a instanceof B.Position?(this.vimState.cursors[n]=this.vimState.cursors[n].withNewStop(a),(0,u.isVisualMode)(this.currentMode)||this.vimState.recordedState.operator||(this.vimState.cursors[n]=this.vimState.cursors[n].withNewStart(a))):(a.failed&&(this.vimState.recordedState=new m.RecordedState,this.vimState.lastMovementFailed=!0),a.removed?r.push(n):this.vimState.cursors[n]=new h.Cursor(a.start,a.stop))}if(r.length>0)for(let e=r.length-1;e>=0;e--){const t=r[e];0!==t&&this.vimState.cursors.splice(t,1)}if(this.vimState.recordedState.count=0,this.vimState.currentMode!==u.Mode.Normal||t.operator){const e=this.vimState.cursorStopPosition;e.character>v.TextEditor.getLineLength(e.line)&&(this.vimState.cursorStopPosition=e.getLineEnd())}return t}async executeOperator(){const e=this.vimState.recordedState,t=e.operator,r=this.vimState.currentMode,n=this.vimState.currentRegisterMode,o=[];for(let[i,{start:s,stop:a}]of this.vimState.cursors.entries()){t.multicursorIndex=i,s.isAfter(a)&&([s,a]=[a,s]),(0,u.isVisualMode)(r)||n===p.RegisterMode.LineWise||(a=a.getLeftThroughLineBreaks(!0)),this.currentMode===u.Mode.VisualLine&&(s=s.getLineBegin(),a=a.getLineEnd(),this.vimState.currentRegisterMode=p.RegisterMode.LineWise),await this.vimState.setCurrentMode(r),e.operators.length>1&&e.operators.reverse()[0].constructor===e.operators.reverse()[1].constructor?await t.runRepeat(this.vimState,s,e.count):await t.run(this.vimState,s,a);for(const e of this.vimState.recordedState.transformer.transformations)(0,R.isTextTransformation)(e)&&void 0===e.cursorIndex&&(e.cursorIndex=t.multicursorIndex);const c=new h.Cursor(this.vimState.cursorStartPosition,this.vimState.cursorStopPosition);o.push(c)}if(this.vimState.recordedState.transformer.transformations.length>0){const e=this.vimState.recordedState.transformer;await(0,P.executeTransformations)(this,e.transformations)}else this.vimState.cursors=o}async rerunRecordedState(e){const t=[...e.actionsRun];this.vimState.isRunningDotCommand=!0,this.vimState.lastVisualSelection&&(this.vimState.dotCommandPreviousVisualSelection=new n.Selection(this.vimState.lastVisualSelection.start,this.vimState.lastVisualSelection.end)),e=new m.RecordedState,this.vimState.recordedState=e;for(const[r,n]of t.entries()){if(e.actionsRun=t.slice(0,r+1),await this.runAction(e,n),this.vimState.lastMovementFailed)return;await this.updateView()}e.actionsRun=t,this.vimState.isRunningDotCommand=!1}async runMacro(e){let t=new m.RecordedState;this.vimState.recordedState=t,this.vimState.isRunningDotCommand=!0;for(const r of e.actionsRun){const e=a.Jump.fromStateNow(this.vimState);if(this.vimState.cursorsInitialState=this.vimState.cursors,t.actionsRun.push(r),await this.runAction(t,r),0===this.vimState.recordedState.actionsRun.length&&(t=new m.RecordedState,this.vimState.recordedState=t),this.vimState.lastMovementFailed)break;await this.updateView(),r.isJump&&_.globalState.jumpTracker.recordJump(e,a.Jump.fromStateNow(this.vimState))}this.vimState.isRunningDotCommand=!1,this.vimState.cursorsInitialState=this.vimState.cursors}updateSearchHighlights(e){var t,r,n;const{searchHighlight:o=[],searchMatch:i=[],substitutionAppend:s=[],substitutionReplace:a=[]}=e?null!==(r=null===(t=this.vimState.commandLine)||void 0===t?void 0:t.getDecorations(this.vimState))&&void 0!==r?r:(0,T.getDecorationsForSearchMatchRanges)(null===(n=_.globalState.searchState)||void 0===n?void 0:n.getMatchRanges(this.vimState)):{};this.vimState.editor.setDecorations(M.decoration.searchHighlight,o),this.vimState.editor.setDecorations(M.decoration.searchMatch,i),this.vimState.editor.setDecorations(M.decoration.substitutionAppend,s),this.vimState.editor.setDecorations(M.decoration.substitutionReplace,a)}async updateView(e={drawSelection:!0,revealRange:!0}){var t;if(e.drawSelection){let e=this.vimState.currentMode;this.vimState.currentMode===u.Mode.SearchInProgressMode||this.vimState.currentMode===u.Mode.CommandlineInProgress?e=this.vimState.commandLine.previousMode:this.vimState.currentMode===u.Mode.SurroundInputMode&&(e=this.vimState.surround.previousMode);let t=[];for(const r of this.vimState.cursors){let{start:o,stop:i}=r;switch(e){case u.Mode.Visual:o.isAfterOrEqual(i)&&(o=o.getRight()),t.push(new n.Selection(o,i));break;case u.Mode.VisualLine:o.isBeforeOrEqual(i)?t.push(new n.Selection(o.getLineBegin(),i.getLineEnd())):t.push(new n.Selection(o.getLineEnd(),i.getLineBegin()));break;case u.Mode.VisualBlock:for(const e of v.TextEditor.iterateLinesInBlock(this.vimState,r))t.push(new n.Selection(e.start,e.end));break;default:t.push(new n.Selection(i,i))}}if(t=(e=>{const t=[];return e.forEach(((e,r)=>{if(r>0){const r=t[t.length-1];if(e.intersection(r)){let o,i;e.anchor.isBeforeOrEqual(e.active)?(o=e.anchor.isBeforeOrEqual(r.anchor)?e.anchor:r.anchor,i=e.active.isAfterOrEqual(r.active)?e.active:r.active):(o=e.anchor.isAfterOrEqual(r.anchor)?e.anchor:r.anchor,i=e.active.isBeforeOrEqual(r.active)?e.active:r.active),t[t.length-1]=new n.Selection(o,i)}else t.push(e)}else t.push(e)})),t})(t),t.length!==this.vimState.editor.selections.length||t.some(((e,t)=>!e.anchor.isEqual(this.vimState.editor.selections[t].anchor)||!e.active.isEqual(this.vimState.editor.selections[t].active)))){const e=t.reduce(((e,t)=>e+`[${t.anchor.line}, ${t.anchor.character}; ${t.active.line}, ${t.active.character}]`),"");this.vimState.selectionsChanged.ourSelections.push(e),V.logger.debug(`Selections: Adding Selection Change to be Ignored! Hash: ${e}, Selections: ${t[0].anchor.toString()}, ${t[0].active.toString()}`)}this.vimState.editor.selections=t}if(this.vimState.editor.visibleRanges.length>0&&!this.vimState.postponedCodeViewChanges.some((e=>"editorScroll"===e.command))){const t=this.vimState.recordedState.actionsRun[this.vimState.recordedState.actionsRun.length-1]instanceof k.ActionOverrideCmdD;let r;r=t?this.vimState.cursors[this.vimState.cursors.length-1]:this.vimState.cursors[0];const o=e=>e.start.line-r.stop.line>=15,i=e=>r.stop.line-e.end.line>=15,{visibleRanges:s}=this.vimState.editor,a=s.every(o)||s.every(i)?n.TextEditorRevealType.InCenter:n.TextEditorRevealType.Default;if(this.vimState.currentMode===u.Mode.SearchInProgressMode&&this.vimState.commandLine instanceof S.SearchCommandLine&&C.configuration.incsearch){const e=this.vimState.commandLine.getCurrentMatchRange(this.vimState);if(e)this.vimState.editor.revealRange(e.range,a);else if(void 0!==this.vimState.firstVisibleLineBeforeSearch){const e=this.vimState.editor.visibleRanges[0].start.line-this.vimState.firstVisibleLineBeforeSearch;(0,b.scrollView)(this.vimState,e)}}else e.revealRange&&(t&&this.vimState.cursorsInitialState.length===this.vimState.cursors.length||this.vimState.editor.revealRange(new n.Range(r.stop,r.stop),a))}let r=C.configuration.getCursorStyleForMode(u.Mode[this.currentMode]);if(!r){const e=D(this.vimState,this.vimState.currentModeIncludingPseudoModes);r=(0,u.getCursorStyle)(e),e===u.VSCodeVimCursorType.Native&&void 0!==C.configuration.editorCursorStyle&&(r=C.configuration.editorCursorStyle)}this.vimState.editor.options.cursorStyle=r;const o=[];if(D(this.vimState,this.currentMode)===u.VSCodeVimCursorType.TextDecoration&&this.currentMode!==u.Mode.Insert)if(this.currentMode===u.Mode.Visual)for(const{start:e,stop:t}of this.vimState.cursors)e.isBefore(t)?o.push(new n.Range(t.getLeft(),t)):o.push(new n.Range(t,t.getRight()));else for(const{stop:e}of this.vimState.cursors)o.push(new n.Range(e,e.getRight()));this.vimState.editor.setDecorations(M.decoration.default,o);const i=[];if(this.vimState.currentMode===u.Mode.Insert||this.vimState.currentMode===u.Mode.Replace){let e;if(this.vimState.recordedState.bufferedKeys.length>0?e=this.vimState.recordedState.bufferedKeys[this.vimState.recordedState.bufferedKeys.length-1]:this.vimState.recordedState.waitingForAnotherActionKey&&(e=this.vimState.recordedState.actionKeys[this.vimState.recordedState.actionKeys.length-1],"<C-r>"===e?e='"':"<C-k>"===e&&(e="?")),e=e&&/<[^>]+>/.test(e)?void 0:e,e){const t={before:{contentText:e}},r={before:{contentText:e,color:new n.ThemeColor("editor.foreground")}};for(const{stop:e}of this.vimState.cursors)e.isLineEnd()?i.push({range:new n.Range(e,e.getLineEndIncludingEOL()),renderOptions:r}):i.push({range:new n.Range(e,e.getRightThroughLineBreaks(!0)),renderOptions:t})}}this.vimState.editor.setDecorations(M.decoration.insertModeVirtualCharacter,i);const s=[],a=[];if(this.vimState.currentModeIncludingPseudoModes===u.Mode.OperatorPendingMode)for(const{stop:e}of this.vimState.cursors){let t=v.TextEditor.getCharAt(this.vimState.document,e);t=" "===t?" ":t;const r={before:{contentText:t}};s.push({range:new n.Range(e,e.getRight()),renderOptions:r}),a.push({range:new n.Range(e,e.getRight()),renderOptions:r})}this.vimState.editor.setDecorations(M.decoration.operatorPendingModeCursor,s),this.vimState.editor.setDecorations(M.decoration.operatorPendingModeCursorChar,a);for(const e of M.decoration.allMarkDecorations())this.vimState.editor.setDecorations(e,[]);if(C.configuration.showMarksInGutter)for(const e of this.vimState.historyTracker.getMarks()){if(e.isUppercaseMark&&e.document!==this.vimState.document)continue;const t=M.decoration.getOrCreateMarkDecoration(e.name),r=e.position.getLineBegin(),o=new n.Range(r,r);this.vimState.editor.setDecorations(t,[o])}const c=C.configuration.incsearch&&(this.currentMode===u.Mode.SearchInProgressMode||this.currentMode===u.Mode.CommandlineInProgress)||C.configuration.inccommand&&this.currentMode===u.Mode.CommandlineInProgress||C.configuration.hlsearch&&_.globalState.hl;for(const e of n.window.visibleTextEditors)null===(t=this.handlerMap.get(e.document.uri))||void 0===t||t.updateSearchHighlights(c);const d=this.currentMode===u.Mode.EasyMotionInputMode&&C.configuration.easymotionDimBackground&&this.vimState.easyMotion.searchAction instanceof $.SearchByNCharCommand?[new n.Range(v.TextEditor.getDocumentBegin(),v.TextEditor.getDocumentEnd(this.vimState.document))]:[],l=this.currentMode===u.Mode.EasyMotionInputMode&&this.vimState.easyMotion.searchAction instanceof $.SearchByNCharCommand?this.vimState.easyMotion.searchAction.getMatches(this.vimState.cursorStopPosition,this.vimState).map((e=>e.toRange())):[];this.vimState.editor.setDecorations(M.decoration.easyMotionDimIncSearch,d),this.vimState.editor.setDecorations(M.decoration.easyMotionIncSearch,l);for(const e of this.vimState.postponedCodeViewChanges)n.commands.executeCommand(e.command,e.args);this.vimState.postponedCodeViewChanges=[],this.currentMode===u.Mode.EasyMotionMode&&this.vimState.easyMotion.updateDecorations(this.vimState.editor),f.StatusBar.clear(this.vimState,!1),x.VSCodeContext.set("vim.mode",u.Mode[this.vimState.currentMode]);const h=new n.Range(this.vimState.cursorStartPosition,this.vimState.cursorStopPosition);/\s+/.test(this.vimState.document.getText(h))||n.commands.executeCommand("editor.action.wordHighlight.trigger")}createUndoPointForBrackets(){const e=this.vimState.recordedState.actionKeys[this.vimState.recordedState.actionKeys.length-1];if(void 0===e)return!1;if(this.vimState.currentMode===u.Mode.Insert){let t=d.PairMatcher.nextPairedChar(this.vimState.cursorStopPosition,e,this.vimState,!1);if(void 0!==t&&this.vimState.cursorStopPosition.isEqual(t))return!0;if(t=d.PairMatcher.nextPairedChar(this.vimState.cursorStopPosition.getLeft(),e,this.vimState,!1),void 0!==t&&this.vimState.cursorStopPosition.getLeft(2).isEqual(t))return!0}return!1}dispose(){this.disposables.map((e=>e.dispose()))}}function D(e,t){switch(t){case u.Mode.Normal:return u.VSCodeVimCursorType.Block;case u.Mode.Insert:return u.VSCodeVimCursorType.Native;case u.Mode.Visual:case u.Mode.VisualBlock:case u.Mode.VisualLine:return u.VSCodeVimCursorType.TextDecoration;case u.Mode.SearchInProgressMode:case u.Mode.CommandlineInProgress:return u.VSCodeVimCursorType.UnderlineThin;case u.Mode.Replace:return u.VSCodeVimCursorType.Underline;case u.Mode.EasyMotionMode:case u.Mode.EasyMotionInputMode:return u.VSCodeVimCursorType.Block;case u.Mode.SurroundInputMode:return D(e,e.surround.previousMode);case u.Mode.OperatorPendingMode:return u.VSCodeVimCursorType.UnderlineThin;case u.Mode.Disabled:default:return u.VSCodeVimCursorType.Line}}t.ModeHandler=V,V.logger=c.Logger.get("ModeHandler")},"./src/mode/modeHandlerMap.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeHandlerMap=void 0;const n=r("./src/mode/modeHandler.ts");t.ModeHandlerMap=new class{constructor(){this.modeHandlerMap=new Map}async getOrCreate(e){let t=!1,r=this.get(e);return r||(t=!0,r=await n.ModeHandler.create(this),this.modeHandlerMap.set(e,r)),[r,t]}get(e){return this.modeHandlerMap.get(e)}keys(){return this.modeHandlerMap.keys()}getAll(){return[...this.modeHandlerMap.values()]}delete(e){const t=this.modeHandlerMap.get(e);t&&(t.dispose(),this.modeHandlerMap.delete(e))}clear(){for(const e of this.modeHandlerMap.keys())this.delete(e)}}},"./src/platform/browser/constants.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORT_READ_COMMAND=t.SUPPORT_IME_SWITCHER=t.SUPPORT_NVIM=t.SUPPORT_VIMRC=void 0,t.SUPPORT_VIMRC=!1,t.SUPPORT_NVIM=!1,t.SUPPORT_IME_SWITCHER=!1,t.SUPPORT_READ_COMMAND=!1},"./src/platform/browser/fs.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unlinkSync=t.chmodAsync=t.accessAsync=t.writeFileAsync=t.mkdirAsync=t.readFileAsync=t.unlink=t.existsAsync=t.doesFileExist=t.constants=void 0;const n=r("vscode");t.constants={UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,O_RDONLY:0,O_WRONLY:1,O_RDWR:2,UV_DIRENT_UNKNOWN:0,UV_DIRENT_FILE:1,UV_DIRENT_DIR:2,UV_DIRENT_LINK:3,UV_DIRENT_FIFO:4,UV_DIRENT_SOCKET:5,UV_DIRENT_CHAR:6,UV_DIRENT_BLOCK:7,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,UV_FS_O_FILEMAP:0,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_DSYNC:4194304,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_COPYFILE_EXCL:1,COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_FICLONE_FORCE:4},t.doesFileExist=async function(e){try{return await n.workspace.fs.stat(e),!0}catch{return!1}},t.existsAsync=async function(e){try{return await n.workspace.fs.stat(n.Uri.parse(e)),!0}catch(e){return!1}},t.unlink=async function(e){await n.workspace.fs.delete(n.Uri.parse(e))},t.readFileAsync=async function(e,t){return(await n.workspace.fs.readFile(n.Uri.parse(e))).toString()},t.mkdirAsync=async function(e,t){return n.workspace.fs.createDirectory(n.Uri.parse(e))},t.writeFileAsync=async function(e,t,r){return n.workspace.fs.writeFile(n.Uri.parse(e),Buffer.from(t))},t.accessAsync=async function(e,t){},t.chmodAsync=async function(e,t){},t.unlinkSync=function(e){}},"./src/platform/browser/history.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryBase=void 0,t.HistoryBase=class{constructor(e,t,r,n){this.history=[],this.context=e,this.historyFileName=t}get historyKey(){return`vim.${this.historyFileName}`}async add(e,t){if(!e||0===e.length)return;const r=this.history.indexOf(e);return-1!==r&&this.history.splice(r,1),this.history.push(e),this.history.length>t&&(this.history=this.history.slice(this.history.length-t)),this.save()}get(e){return this.history.length>e&&(this.history=this.history.slice(this.history.length-e)),this.history}async clear(){this.context.workspaceState.update(this.historyKey,void 0),this.history=[]}async load(){const e=this.context.workspaceState.get(this.historyKey)||"";if(0===e.length)return;const t=JSON.parse(e);if(!Array.isArray(t))throw Error("Unexpected format in history. Expected JSON.");this.history=t}async save(){this.context.workspaceState.update(this.historyKey,JSON.stringify(this.history))}}},"./src/platform/browser/loggerImpl.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerImpl=t.VsCodeMessage=void 0;class r{constructor(e){this.actionMessages=["Dismiss","Suppress Errors"],this.prefix=e}error(e){this.log({level:"error",message:e})}debug(e){this.log({level:"debug",message:e})}warn(e){this.log({level:"warn",message:e})}verbose(e){this.log({level:"verbose",message:e})}async log(e){if(this.configuration&&this.configuration.debug.silent)return;let t;switch(e.level){case"error":t=console.error;break;case"warn":t=console.warn;break;case"info":case"verbose":case"debug":t=console.log;break;default:throw Error(`Unsupported log level ${e.level}`)}t(`${this.prefix}: ${e.message}`,...this.actionMessages)}configChanged(e){this.configuration=e}}t.VsCodeMessage=r,t.LoggerImpl=class{static get(e){return new r(e)}}},"./src/register/register.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Register=t.RegisterMode=void 0;const n=r("./src/util/clipboard.ts"),o=r("./src/actions/commands/actions.ts"),i=r("./src/actions/operator.ts"),s=r("./src/state/recordedState.ts"),a=r("./src/platform/browser/fs.ts"),c=r("./src/globals.ts");var u;!function(e){e[e.CharacterWise=0]="CharacterWise",e[e.LineWise=1]="LineWise",e[e.BlockWise=2]="BlockWise"}(u=t.RegisterMode||(t.RegisterMode={}));class d{static put(e,t,r,n){const o=e.recordedState.registerName;if(!d.isValidRegister(o))throw new Error(`Invalid register ${o}`);d.isBlackHoleRegister(o)||d.isReadOnlyRegister(o)||(d.isValidUppercaseRegister(o)?d.appendToRegister(e,o.toLowerCase(),t,null!=r?r:0):d.overwriteRegister(e,o,t,null!=r?r:0),n&&'"'!==o&&d.registers.set('"',d.registers.get(o)))}static isValidRegister(e){return d.isValidLowercaseRegister(e)||d.isValidUppercaseRegister(e)||/^[0-9]$/.test(e)||this.specialRegisters.includes(e)}static isValidRegisterForMacro(e){return/^[a-zA-Z0-9:]$/.test(e)}static isBlackHoleRegister(e){return"_"===e}static isClipboardRegister(e){return"*"===e||"+"===e}static isReadOnlyRegister(e){return[".","%",":","#","/"].includes(e)}static isValidLowercaseRegister(e){return/^[a-z]$/.test(e)}static isValidUppercaseRegister(e){return/^[A-Z]$/.test(e)}static overwriteRegister(e,t,r,o){0!==o&&d.registers.has(t)||d.registers.set(t,[]),d.registers.get(t)[o]={registerMode:e.currentRegisterMode,text:r},0!==o||!this.isClipboardRegister(t)||r instanceof s.RecordedState||n.Clipboard.Copy(r),this.processNumberedRegisters(e,r)}static appendToRegister(e,t,r,o){d.registers.has(t)||d.registers.set(t,[]);const i=d.registers.get(t),a=i[o];if(void 0===a)i[o]={registerMode:e.currentRegisterMode,text:r};else{const t=e.currentRegisterMode===u.LineWise?u.LineWise:a.registerMode;let n;n=a.text instanceof s.RecordedState||r instanceof s.RecordedState?a.text:a.text+(t===u.LineWise?"\n":"")+r,i[o]={registerMode:t,text:n}}if(0===o&&this.isClipboardRegister(t)){const e=i[o].text;e instanceof s.RecordedState||n.Clipboard.Copy(e)}}static putByKey(e,t,r=u.CharacterWise){if(!d.isValidRegister(e))throw new Error(`Invalid register ${e}`);d.isClipboardRegister(e)&&n.Clipboard.Copy(t.toString()),d.isBlackHoleRegister(e)||d.isReadOnlyRegister(e)||d.registers.set(e,[{text:t,registerMode:r}])}static setReadonlyRegister(e,t){d.registers.set(e,[{text:t,registerMode:u.CharacterWise}])}static processNumberedRegisters(e,t){const r=e.recordedState.operator||e.recordedState.command;if(r instanceof i.YankOperator||r instanceof o.CommandYankFullLine)e.recordedState.actionsRun.find((e=>e instanceof o.CommandRegister))||d.registers.set("0",[{text:t,registerMode:e.currentRegisterMode}]);else if((r instanceof i.DeleteOperator||r instanceof o.ActionDeleteChar||r instanceof o.ActionDeleteLastChar||r instanceof o.ActionDeleteCharWithDeleteKey)&&void 0===e.macro&&!e.isReplayingMacro)if(t.toString().match(/\n/g)||e.currentRegisterMode===u.LineWise){for(let e=9;e>1;e--){const t=d.registers.get(String(e-1));t&&d.registers.set(String(e),{...t})}d.registers.set("1",[{text:t,registerMode:e.currentRegisterMode}])}else d.registers.set("-",[{text:t,registerMode:u.CharacterWise}])}static async get(e,t=0){var r,o;if(!d.isValidRegister(e))throw new Error(`Invalid register ${e}`);e=e.toLowerCase();const i=d.registers.get(e);if(d.isClipboardRegister(e)){const t=(await n.Clipboard.Paste()).replace(/\r\n/g,"\n");if((null===(o=null===(r=null==i?void 0:i[0])||void 0===r?void 0:r.text)||void 0===o?void 0:o.replace(/\r\n/g,"\n"))!==t){const r={text:t,registerMode:u.CharacterWise};return d.registers.set(e,[r]),r}}return void 0===(null==i?void 0:i[t])&&(t=0),null==i?void 0:i[t]}static has(e){return d.registers.has(e)}static getKeys(){return[...d.registers.keys()]}static clearAllRegisters(){d.registers.clear()}static async saveToDisk(e){if(e){const e=new Array;for(const[t,r]of d.registers)r.some((e=>e instanceof s.RecordedState))||e.push([t,r]);return Promise.resolve().then((()=>r("./node_modules/path-browserify/index.js"))).then((t=>(0,a.writeFileAsync)(t.join(c.Globals.extensionStoragePath,".registers"),JSON.stringify({version:"1.0",registers:e}),"utf8")))}}static loadFromDisk(e){e?(d.registers=new Map,Promise.resolve().then((()=>r("./node_modules/path-browserify/index.js"))).then((e=>{(0,a.readFileAsync)(e.join(c.Globals.extensionStoragePath,".registers"),"utf8").then((e=>{const t=JSON.parse(e);"1.0"===t.version&&(d.registers=new Map(t.registers))}))}))):d.registers=new Map}}t.Register=d,d.specialRegisters=['"',"*","+",".","-","/",":","%","#","_"]},"./src/state/compositionState.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionState=void 0,t.CompositionState=class{constructor(){this.isInComposition=!1,this.insertedText=!1,this.composingText=""}reset(){this.isInComposition=!1,this.insertedText=!1,this.composingText=""}}},"./src/state/globalState.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalState=void 0;const n=r("./src/jumps/jumpTracker.ts");t.globalState=new class{constructor(){this.jumpTracker=new n.JumpTracker,this.previousFullAction=void 0,this.substituteState=void 0,this.searchState=void 0,this.hl=!0}}},"./src/state/recordedState.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecordedState=void 0;const n=r("./src/configuration/configuration.ts"),o=r("./src/mode/mode.ts"),i=r("./src/transformations/transformer.ts"),s=r("./src/util/specialKeys.ts");class a{constructor(){this.commandList=[],this.actionKeys=[],this.waitingForAnotherActionKey=!1,this.actionsRun=[],this.actionsRunPressedKeys=[],this.bufferedKeys=[],this.bufferedKeysTimeoutObj=void 0,this.allowPotentialRemapOnFirstKey=!0,this.hasRunOperator=!1,this.isInsertion=!1,this.transformer=new i.Transformer,this.count=0,this.operatorCount=0,this.registerKey="",this.registerName=n.configuration.useSystemClipboard?"*":'"'}get commandString(){let e="";this.actionsRun.length>0&&(e=this.actionsRunPressedKeys.join("")),this.actionKeys.length>0&&(e+=this.actionKeys.join("")),this.bufferedKeys.length>0&&(e+=this.bufferedKeys.join("")),0===this.actionsRun.length&&0===this.actionKeys.length&&0===this.bufferedKeys.length&&this.commandList.length>0&&(e=this.commandList.join(""));const t=new RegExp(/[|\\{}()[\]^$+*?.]/,"g"),r=new RegExp(n.configuration.leader.replace(t,"\\$&"),"g"),o=new RegExp(s.SpecialKeys.TimeoutFinished,"g");return e=e.replace(r,"<leader>").replace(o,""),e}get pendingCommandString(){let e="";this.actionKeys.length>0&&(e+=this.actionKeys.join("")),this.bufferedKeys.length>0&&(e+=this.bufferedKeys.join(""));const t=new RegExp(/[|\\{}()[\]^$+*?.]/,"g"),r=new RegExp(n.configuration.leader.replace(t,"\\$&"),"g"),o=new RegExp(s.SpecialKeys.TimeoutFinished,"g");return e=e.replace(r,"<leader>").replace(o,""),e}get commandWithoutCountPrefix(){return this.commandList.join("").replace(/^[0-9]+/g,"")}resetCommandList(){this.commandList=[]}get operator(){const e=this.operators;return e.length>0?e[0]:void 0}get operators(){return this.actionsRun.filter((e=>e.isOperator)).reverse()}get command(){return this.actionsRun.filter((e=>e.isCommand)).reverse()[0]}clone(){const e=new a;return e.actionKeys=this.actionKeys.slice(0),e.actionsRun=this.actionsRun.slice(0),e.hasRunOperator=this.hasRunOperator,e}getOperatorState(e){if(void 0!==this.operator&&!this.hasRunOperator&&e!==o.Mode.SearchInProgressMode&&e!==o.Mode.CommandlineInProgress)return this.actionsRun.some((e=>e.isMotion))||(0,o.isVisualMode)(e)||this.operators.length>1&&this.operators.reverse()[0].constructor===this.operators.reverse()[1].constructor?"ready":"pending"}}t.RecordedState=a},"./src/state/remapState.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemapState=void 0,t.RemapState=class{constructor(){this.lastKeyPressedTimestamp=0,this.isCurrentlyPerformingNonRecursiveRemapping=!1,this.isCurrentlyPerformingRecursiveRemapping=!1,this.wasPerformingRemapThatFinishedWaitingForTimeout=!1,this.mapDepth=0,this.remapUsedACharacter=!1,this.forceStopRecursiveRemapping=!1}get isCurrentlyPerformingRemapping(){return this.isCurrentlyPerformingNonRecursiveRemapping||this.isCurrentlyPerformingRecursiveRemapping}}},"./src/state/replaceState.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceState=void 0,t.ReplaceState=class{constructor(e,t,r=1){this.newChars=[],this.replaceCursorStartPosition=t,this.timesToRepeat=r,this.originalChars=e.document.lineAt(t).text.split("")}}},"./src/state/searchState.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchState=void 0;const n=r("./src/configuration/configuration.ts"),o=r("./src/vimscript/pattern.ts");t.SearchState=class{constructor(e,t,r="",{ignoreSmartcase:n=!1}={}){this.matchRanges=new Map,this._searchString=r;const i=(0,o.searchStringParser)({direction:e,ignoreSmartcase:n}).parse(r),{pattern:s,offset:a}=i.status?i.value:{pattern:void 0,offset:void 0};this.pattern=s,this.offset=a,this.cursorStartPosition=t,this.ignoreSmartcase=n}get searchString(){return this._searchString}set searchString(e){var t;this._searchString=e;const r=(0,o.searchStringParser)({direction:this.direction,ignoreSmartcase:this.ignoreSmartcase}).parse(e),{pattern:n,offset:i}=r.status?r.value:{pattern:void 0,offset:void 0};(null==n?void 0:n.patternString)!==(null===(t=this.pattern)||void 0===t?void 0:t.patternString)&&(this.pattern=n,this.matchRanges.clear()),this.offset=i}get direction(){var e,t;return null!==(t=null===(e=this.pattern)||void 0===e?void 0:e.direction)&&void 0!==t?t:o.SearchDirection.Forward}getMatchRanges(e){return this.recalculateSearchRanges(e)}recalculateSearchRanges(e){if(""===this.searchString||void 0===this.pattern)return[];const t=e.document,r=this.matchRanges.get(t.fileName);if((null==r?void 0:r.version)===t.version)return r.ranges;const n=this.pattern.allMatches(e,{fromPosition:e.editor.selection.active}).map((e=>e.range));return this.matchRanges.set(t.fileName,{version:t.version,ranges:n}),n}getNextSearchMatchPosition(e,t,r=o.SearchDirection.Forward,n=0){const i=this.getNextSearchMatchRange(e,t,r,n);if(void 0===i)return;const{range:s,index:a}=i;return{pos:this.offset?this.offset.apply(s):s.start,index:a}}getNextSearchMatchRange(e,t,r=o.SearchDirection.Forward,i=0){var s,a,c,u;const d=this.recalculateSearchRanges(e);if(0===d.length)return;const l=r*this.direction;let h;if(l===o.SearchDirection.Forward){for(let e=0;e<d.length;e++)if((null!==(a=null===(s=this.offset)||void 0===s?void 0:s.apply(d[e]))&&void 0!==a?a:d[e].start).compareTo(t)>0){h=e;break}}else for(let e=d.length-1;e>=0;e--)if((null!==(u=null===(c=this.offset)||void 0===c?void 0:c.apply(d[e]))&&void 0!==u?u:d[e].start).compareTo(t)<0){h=e;break}if(void 0===h){if(!n.configuration.wrapscan)return;h=l===o.SearchDirection.Forward?0:d.length-1}return h+=l*i,0<=h&&h<d.length?{index:h,range:d[h]}:n.configuration.wrapscan?(m=h,h=((p=d.length)+m%p)%p,{index:h,range:d[h]}):void 0;var m,p}findContainingMatchRange(e,t){const r=this.recalculateSearchRanges(e);if(0!==r.length)for(const[e,n]of r.entries())if(n.start.isBeforeOrEqual(t)&&n.end.isAfter(t))return{range:n,index:e}}}},"./src/state/substituteState.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubstituteState=void 0,t.SubstituteState=class{constructor(e,t){this.searchPattern=e,this.replaceString=t}}},"./src/state/vimState.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VimState=void 0;const n=r("vscode"),o=r("./src/configuration/configuration.ts"),i=r("./src/history/historyTracker.ts"),s=r("./src/util/logger.ts"),a=r("./src/mode/mode.ts"),c=r("./src/common/motion/cursor.ts"),u=r("./src/state/recordedState.ts"),d=r("./src/register/register.ts"),l=r("./src/platform/browser/constants.ts"),h=r("vscode");class m{constructor(e,t){var r;this.desiredColumn=0,this.isFakeMultiCursor=!1,this.lastSemicolonRepeatableMovement=void 0,this.lastCommaRepeatableMovement=void 0,this.lastMovementFailed=!1,this.lastCommandDotRepeatable=!0,this.isRunningDotCommand=!1,this.isReplayingMacro=!1,this.dotCommandPreviousVisualSelection=void 0,this.firstVisibleLineBeforeSearch=void 0,this.surround=void 0,this.returnToInsertAfterCommand=!1,this.actionCount=0,this.postponedCodeViewChanges=[],this._cursors=[new c.Cursor(new h.Position(0,0),new h.Position(0,0))],this.replaceState=void 0,this.lastVisualSelection=void 0,this.lastClickWasPastEol=!1,this.selectionsChanged={ignoreIntermediateSelections:!1,ourSelections:Array()},this._currentMode=a.Mode.Normal,this.recordedState=new u.RecordedState,this.editor=e,this.documentUri=null!==(r=null==e?void 0:e.document.uri)&&void 0!==r?r:n.Uri.file(""),this.historyTracker=new i.HistoryTracker(this),this.easyMotion=t}get document(){return this.editor.document}get isMultiCursor(){return this._cursors.length>1}get cursorStartPosition(){return this.cursors[0].start}set cursorStartPosition(e){e.isValid(this.editor)||m.logger.warn(`invalid cursor start position. ${e.toString()}.`),this.cursors[0]=this.cursors[0].withNewStart(e)}get cursorStopPosition(){return this.cursors[0].stop}set cursorStopPosition(e){e.isValid(this.editor)||m.logger.warn(`invalid cursor stop position. ${e.toString()}.`),this.cursors[0]=this.cursors[0].withNewStop(e)}get cursors(){return this._cursors}set cursors(e){if(0===e.length)return void m.logger.warn("Tried to set VimState.cursors to an empty array");const t=new Map;for(const r of e)r.isValid(this.editor)||m.logger.warn(`invalid cursor position. ${r.toString()}.`),t.set(r.toString(),r);this._cursors=[...t.values()]}get cursorsInitialState(){return this._cursorsInitialState}set cursorsInitialState(e){this._cursorsInitialState=[...e]}get currentMode(){return this._currentMode}get currentModeIncludingPseudoModes(){return"pending"===this.recordedState.getOperatorState(this._currentMode)?a.Mode.OperatorPendingMode:this._currentMode}async setCurrentMode(e){var t;if(void 0===e)throw new Error("Tried setting currentMode to undefined");await(null===(t=this.inputMethodSwitcher)||void 0===t?void 0:t.switchInputMethod(this._currentMode,e)),this.returnToInsertAfterCommand&&e===a.Mode.Insert&&(this.returnToInsertAfterCommand=!1),this._currentMode=e,o.configuration.smartRelativeLine&&(this.editor.options.lineNumbers=e===a.Mode.Insert?n.TextEditorLineNumbersStyle.On:n.TextEditorLineNumbersStyle.Relative),e===a.Mode.SearchInProgressMode?this.firstVisibleLineBeforeSearch=this.editor.visibleRanges[0].start.line:this.firstVisibleLineBeforeSearch=void 0,e===a.Mode.Normal&&(this.commandLine=void 0)}set currentRegisterMode(e){this._currentRegisterMode=e}get currentRegisterMode(){if(this._currentRegisterMode)return this._currentRegisterMode;switch(this.currentMode){case a.Mode.VisualLine:return d.RegisterMode.LineWise;case a.Mode.VisualBlock:return d.RegisterMode.BlockWise;default:return d.RegisterMode.CharacterWise}}async load(){if(l.SUPPORT_NVIM){const e=await Promise.resolve().then((()=>r(Object(function(){var e=new Error("Cannot find module '../neovim/neovim'");throw e.code="MODULE_NOT_FOUND",e}()))));this.nvim=new e.NeovimWrapper}if(l.SUPPORT_IME_SWITCHER){const e=await Promise.resolve().then((()=>r(Object(function(){var e=new Error("Cannot find module '../actions/plugins/imswitcher'");throw e.code="MODULE_NOT_FOUND",e}()))));this.inputMethodSwitcher=new e.InputMethodSwitcher}}dispose(){var e;null===(e=this.nvim)||void 0===e||e.dispose()}}t.VimState=m,m.logger=s.Logger.get("VimState")},"./src/statusBar.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statusBarCommandText=t.statusBarText=t.StatusBar=void 0;const n=r("vscode"),o=r("./src/mode/mode.ts"),i=r("./src/configuration/configuration.ts"),s=r("./src/util/logger.ts");function a(e){const t="<C-r>"===e.recordedState.actionKeys[e.recordedState.actionKeys.length-1]?'"':"|",r=s.Logger.get("StatusBar");switch(e.currentMode){case o.Mode.Normal:return"-- NORMAL --";case o.Mode.Insert:return"-- INSERT --";case o.Mode.Visual:return"-- VISUAL --";case o.Mode.VisualBlock:return"-- VISUAL BLOCK --";case o.Mode.VisualLine:return"-- VISUAL LINE --";case o.Mode.Replace:return"-- REPLACE --";case o.Mode.EasyMotionMode:return"-- EASYMOTION --";case o.Mode.EasyMotionInputMode:return"-- EASYMOTION INPUT --";case o.Mode.SurroundInputMode:return"-- SURROUND INPUT --";case o.Mode.Disabled:return"-- VIM: DISABLED --";case o.Mode.SearchInProgressMode:return void 0===e.commandLine?(r.warn("vimState.commandLine is undefined in SearchInProgressMode"),""):e.commandLine.display(t);case o.Mode.CommandlineInProgress:return void 0===e.commandLine?(r.warn("vimState.commandLine is undefined in CommandLineInProgress mode"),""):e.commandLine.display(t);default:return""}}function c(e){switch(e.currentMode){case o.Mode.SurroundInputMode:return e.surround&&e.surround.replacement?e.surround.replacement:"";case o.Mode.EasyMotionMode:return`Target key: ${e.easyMotion.accumulation}`;case o.Mode.EasyMotionInputMode:if(!e.easyMotion)return"";const t=e.easyMotion.searchAction.searchCharCount;return(t>0?`Search for ${t} character(s): `:"Search for characters: ")+e.easyMotion.searchAction.searchString;case o.Mode.Visual:{let[t,r]=[e.cursorStartPosition,e.cursorStopPosition],n=!1;t.isAfter(r)?(t=t.getRightThroughLineBreaks(),[t,r]=[r,t]):r.isAfter(t)&&0===r.character&&(r=r.getLeftThroughLineBreaks(!0),n=!0);const o=r.line-t.line+1;return o>1?`${o} ${e.recordedState.pendingCommandString}`:`${Math.max(r.character-t.character,1)+(n?1:0)} ${e.recordedState.pendingCommandString}`}case o.Mode.VisualLine:return`${Math.abs(e.cursorStopPosition.line-e.cursorStartPosition.line)+1} ${e.recordedState.pendingCommandString}`;case o.Mode.VisualBlock:return`${Math.abs(e.cursorStopPosition.line-e.cursorStartPosition.line)+1}x${Math.abs(e.cursorStopPosition.character-e.cursorStartPosition.character)+1} ${e.recordedState.pendingCommandString}`;case o.Mode.Insert:case o.Mode.Replace:return e.recordedState.pendingCommandString;case o.Mode.Normal:case o.Mode.Disabled:return e.recordedState.commandString;default:return""}}t.StatusBar=new class{constructor(){this.previousMode=void 0,this.showingDefaultMessage=!0,this.statusBarItem=n.window.createStatusBarItem("primary",n.StatusBarAlignment.Left,Number.MIN_SAFE_INTEGER),this.statusBarItem.name="Vim Command Line",this.statusBarItem.show(),this.recordedStateStatusBarItem=n.window.createStatusBarItem("showcmd",n.StatusBarAlignment.Right,Number.MAX_SAFE_INTEGER),this.recordedStateStatusBarItem.name="Vim Pending Command Keys",this.recordedStateStatusBarItem.show()}dispose(){this.statusBarItem.dispose(),this.recordedStateStatusBarItem.dispose()}updateShowCmd(e){this.recordedStateStatusBarItem.text=i.configuration.showcmd?c(e):""}setText(e,t,r=!1){const o=e.currentMode!==this.previousMode;this.updateText(t),i.configuration.statusBarColorControl||(this.statusBarItem.color=r?new n.ThemeColor("statusBarItem.errorForeground"):void 0,this.statusBarItem.backgroundColor=r?new n.ThemeColor("statusBarItem.errorBackground"):void 0),i.configuration.statusBarColorControl&&o&&this.updateColor(e.currentMode),this.previousMode=e.currentMode,this.showingDefaultMessage=!1,this.lastMessageTime=new Date}displayError(e,r){t.StatusBar.setText(e,r.toString(),!0)}getText(){return this.statusBarItem.text.replace(/\^M/g,"\n")}clear(e,r=!0){if(!this.showingDefaultMessage&&!r)return;const n=[];if((i.configuration.showmodename||e.currentMode===o.Mode.CommandlineInProgress||e.currentMode===o.Mode.SearchInProgressMode)&&(n.push(a(e)),e.isMultiCursor&&n.push(" MULTI CURSOR ")),e.macro){const t="Recording @"+e.macro.registerName;n.push(t)}t.StatusBar.setText(e,n.join(" ")),this.showingDefaultMessage=!0}updateText(e){const t=e.replace(/\n/g,"^M");this.statusBarItem.text=t||""}updateColor(e){var t;let r,n;const s=i.configuration.statusBarColors[o.Mode[e].toLowerCase()];void 0!==s&&("string"==typeof s?n=s:[n,r]=s);const a=i.configuration.getConfiguration("workbench"),c=null!==(t=a.get("colorCustomizations"))&&void 0!==t?t:{},u={...c};void 0!==n&&(u["statusBar.background"]=n,u["statusBar.noFolderBackground"]=n,u["statusBar.debuggingBackground"]=n),void 0!==r&&(u["statusBar.foreground"]=r,u["statusBar.debuggingForeground"]=r),c!==u&&a.update("colorCustomizations",u,!0)}},t.statusBarText=a,t.statusBarCommandText=c},"./src/taskQueue.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.taskQueue=void 0;const n=r("vscode"),o=r("./node_modules/queue/index.js"),i=r("./src/util/logger.ts"),s=r("./src/configuration/configuration.ts");t.taskQueue=new class{constructor(){this.logger=i.Logger.get("TaskQueue"),this.taskQueue=new o.default({autostart:!0,concurrency:1}),this.taskQueue.addListener("error",((e,t)=>{if(e instanceof Error){const t="Report bug",r=e.stack,o=e.context;n.window.showErrorMessage(e.message,t).then((i=>{if(i===t){let t=`**To Reproduce**\nSteps to reproduce the behavior:\n\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**VSCodeVim version**: ${s.extensionVersion}`;if(r&&(t+=`\n\n<details><summary>Stack trace</summary>\n\n\`\`\`\n${r}\n\`\`\`\n\n</details>`),o){t+="\n\n<details><summary>Additional context</summary>\n\n```";for(const e in o)o.hasOwnProperty(e)&&(t+=`\n${e}: ${JSON.stringify(o[e],void 0,2)}`);t+="\n```\n\n</details>"}n.commands.executeCommand("vscode.open",n.Uri.parse(`https://github.com/VSCodeVim/Vim/issues/new?title=${e.message}&body=${t}`))}}))}else this.logger.error(`Error running task due to an unknown error: ${e}.`)}))}enqueueTask(e){this.taskQueue.push(e)}}},"./src/textEditor.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextEditor=void 0;const n=r("vscode"),o=r("./src/configuration/configuration.ts"),i=r("./src/mode/mode.ts"),s=r("vscode"),a=r("./src/util/logger.ts"),c=r("./src/util/util.ts");class u{static async insert(e,t,r,o){null!=o||(o=1===t.length),o?await n.commands.executeCommand("default:type",{text:t}):await e.edit((n=>{r||(r=e.selection.active),n.insert(r,t)}))}static async replace(e,t,r){return e.edit((e=>{e.replace(t,r)}))}static getLineCount(e){var t;return null!=e||(e=n.window.activeTextEditor),null!==(t=null==e?void 0:e.document.lineCount)&&void 0!==t?t:-1}static getLineLength(e){return e<0||e>=u.getLineCount()?(this.logger.warn(`getLineLength() called with out-of-bounds line ${e}`),0):n.window.activeTextEditor.document.lineAt(e).text.length}static getLine(e){return n.window.activeTextEditor.document.lineAt(e)}static getCharAt(e,t){return t=e.validatePosition(t),e.lineAt(t).text[t.character]}static getWord(e,t){const r=e.lineAt(t).text;let n=t.character;for(;this.whitespaceRegExp.test(r[n]);)if(n++,n===r.length)return;let i=n;for(;o.configuration.iskeyword.includes(r[i])||this.whitespaceRegExp.test(r[i]);)if(i++,i===r.length){i=n;break}const s=!o.configuration.iskeyword.includes(r[i]),a=e=>!this.whitespaceRegExp.test(e)&&o.configuration.iskeyword.includes(e)!==s;let c=i;for(;i>0&&a(r[i-1]);)i--;for(;c<r.length&&a(r[c+1]);)c++;return r.substring(i,c+1)}static getTabCharacter(e){if(e.options.insertSpaces){const t=e.options.tabSize;return" ".repeat(t)}return"\t"}static getIndentationLevel(e){let t=0;for(const r of e)switch(r){case"\t":t+=o.configuration.tabstop;break;case" ":t+=1;break;default:return t}return t}static setIndentationLevel(e,t){const r=o.configuration.tabstop;t<0&&(t=0);const n=o.configuration.expandtab?" ".repeat(t):"\t".repeat(t/r)+" ".repeat(t%r);return e.replace(/^\s*/,n)}static getDocumentBegin(){return new s.Position(0,0)}static getDocumentEnd(e){const t=Math.max(e.lineCount,1)-1;return e.lineAt(t).range.end}static getFirstNonWhitespaceCharOnLine(e,t){return t=(0,c.clamp)(t,0,e.lineCount-1),new s.Position(t,e.lineAt(t).firstNonWhitespaceCharacterIndex)}static*iterateLinesInBlock(e,t,r={reverse:!1}){const{reverse:n}=r;null!=t||(t=e.cursors[0]);const o=(0,i.visualBlockGetTopLeftPosition)(t.start,t.stop),a=(0,i.visualBlockGetBottomRightPosition)(t.start,t.stop),[c,u]=n?[a.line,o.line]:[o.line,a.line],d=e.desiredColumn===Number.POSITIVE_INFINITY;for(let t=c;n?t>=u:t<=u;n?t--:t++){const r=e.document.lineAt(t).text,n=d?r.length+1:Math.min(r.length,a.character+1);yield{line:r.substring(o.character,n),start:new s.Position(t,o.character),end:new s.Position(t,n)}}}static*iterateWords(e,t){const r=e.lineAt(t).text;/\s/.test(r[t.character])&&(t=t.nextWordStart(e));let n=t.nextWordEnd(e,{inclusive:!0});for(;;){const o=r.substring(t.character,n.character+1);if(yield{start:t,end:n,word:o},n.getRight().isLineEnd())return;n=(t=t.nextWordStart(e)).nextWordEnd(e,{inclusive:!0})}}}t.TextEditor=u,u.whitespaceRegExp=new RegExp("\\s+"),u.logger=a.Logger.get("TextEditor")},"./src/textobject/paragraph.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentParagraphBeginning=t.getCurrentParagraphEnd=void 0;const n=r("vscode"),o=r("./src/textEditor.ts");function i(e,t=!1){const r=o.TextEditor.getLine(e).text;return""===(t?r.trim():r)}t.getCurrentParagraphEnd=function(e,t=!1){const r=o.TextEditor.getLineCount()-1;let n=e.line;for(;n<r&&i(n,t);)n++;for(;n<r&&!i(n,t);)n++;return e.with({line:n}).getLineEnd()},t.getCurrentParagraphBeginning=function(e,t=!1){let r=e.line;for(;r>0&&i(r,t);)r--;for(;r>0&&!i(r,t);)r--;return new n.Position(r,0)}},"./src/textobject/sentence.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSentenceEnd=t.getSentenceBegin=void 0;const n=r("vscode"),o=r("./src/textEditor.ts"),i=r("./src/textobject/paragraph.ts"),s=r("./src/textobject/util.ts"),a=/[\.!\?]{1}([ \n\t]+|$)/g;function c(e,t,r){if(o.TextEditor.getLine(e.line).text)return t;for(let i=e.line;i<=t.line;i++){const t=(0,s.getAllPositions)(o.TextEditor.getLine(i).text,/\S/g).find((t=>t>e.character&&!r||t>=e.character&&r||i!==e.line));if(void 0!==t)return new n.Position(i,t)}return e}t.getSentenceBegin=function(e,t){return t.forward?function(e){const t=(0,i.getCurrentParagraphEnd)(e);for(let r=e.line;r<=t.line;r++){const t=(0,s.getAllEndPositions)(o.TextEditor.getLine(r).text,a).find((t=>t>e.character||r!==e.line));if(void 0!==t)return new n.Position(r,t).getRightThroughLineBreaks()}return c(e,t,!1)}(e):function(e){const t=(0,i.getCurrentParagraphBeginning)(e);for(let r=e.line;r>=t.line;r--){const t=(0,s.getAllEndPositions)(o.TextEditor.getLine(r).text,a).reverse().find((t=>new n.Position(r,t).getRightThroughLineBreaks().compareTo(e)&&(t<e.character||r<e.line)));if(void 0!==t)return new n.Position(r,t).getRightThroughLineBreaks()}return t.line+1===e.line||t.line===e.line?t:new n.Position(t.line+1,0)}(e)},t.getSentenceEnd=function(e){const t=(0,i.getCurrentParagraphEnd)(e);for(let r=e.line;r<=t.line;r++){const t=(0,s.getAllPositions)(o.TextEditor.getLine(r).text,a).find((t=>t>e.character||r!==e.line));if(void 0!==t)return new n.Position(r,t)}return c(e,t,!1)}},"./src/textobject/textobject.ts":function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectAroundArgument=t.SelectInnerArgument=t.SelectEntireIgnoringLeadingTrailing=t.SelectEntire=t.SelectInnerParagraph=t.SelectParagraph=t.SelectInnerSentence=t.SelectSentence=t.SelectInnerBigWord=t.SelectInnerWord=t.SelectAnExpandingBlock=t.SelectABigWord=t.SelectWord=t.TextObject=void 0;const o=r("./src/common/motion/cursor.ts"),i=r("./src/mode/mode.ts"),s=r("./src/register/register.ts"),a=r("./src/textEditor.ts"),c=r("./src/actions/base.ts"),u=r("./src/actions/baseMotion.ts"),d=r("./src/actions/motion.ts"),l=r("./src/actions/operator.ts"),h=r("./src/configuration/configuration.ts"),m=r("./src/textobject/paragraph.ts"),p=r("vscode"),g=r("./src/textobject/word.ts");class f extends u.BaseMovement{constructor(){super(...arguments),this.modes=[i.Mode.Normal,i.Mode.Visual,i.Mode.VisualBlock]}async execActionForOperator(e,t){const r=await this.execAction(e,t);return r.stop=new p.Position(r.stop.line,r.stop.character+1),r}}t.TextObject=f;let v=class extends f{constructor(){super(...arguments),this.keys=["a","w"]}async execAction(e,t){let r,n;const o=a.TextEditor.getCharAt(t.document,e);return void 0===o?(r=e,n=e.nextWordEnd(t.document)):/\s/.test(o)?(r=e.prevWordEnd(t.document).getRight(),n=e.nextWordEnd(t.document)):(n=e.nextWordStart(t.document),n.isEqual(a.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,n.line))&&(n=n.getLineBegin()),n=n.getLeftThroughLineBreaks().getLeftIfEOL(),r=n.isEqual(e.nextWordEnd(t.document,{inclusive:!0}))&&!e.prevWordStart(t.document,{inclusive:!0}).isEqual(a.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,n.line))&&0===t.recordedState.count?e.prevWordEnd(t.document).getRight():e.prevWordStart(t.document,{inclusive:!0})),t.currentMode!==i.Mode.Visual||t.cursorStopPosition.isEqual(t.cursorStartPosition)||(r=t.cursorStartPosition,t.cursorStopPosition.isBefore(t.cursorStartPosition)&&(n=/\s/.test(o)?e.prevWordStart(t.document,{inclusive:!0}):e.prevWordEnd(t.document).getRight())),{start:r,stop:n}}};v=n([c.RegisterAction],v),t.SelectWord=v;let y=class extends f{constructor(){super(...arguments),this.keys=["a","W"]}async execAction(e,t){let r,n;const o=t.document.lineAt(e).text[e.character];if(void 0===o)r=e,n=e.nextWordEnd(t.document);else if(/\s/.test(o))r=e.prevWordEnd(t.document,{wordType:g.WordType.Big}).getRight(),n=e.nextWordEnd(t.document,{wordType:g.WordType.Big});else{const o=e.nextWordStart(t.document,{wordType:g.WordType.Big});(o.line>e.line||o.isAtDocumentEnd())&&0===t.recordedState.count?(r=e.prevWordEnd(t.document,{wordType:g.WordType.Big}).isLineBeginning()?e.prevWordEnd(t.document,{wordType:g.WordType.Big}):e.prevWordEnd(t.document,{wordType:g.WordType.Big}).getRight(),n=e.getLineEnd()):(o.isEqual(a.TextEditor.getFirstNonWhitespaceCharOnLine(t.document,o.line))||o.isLineEnd())&&0===t.recordedState.count?(r=e.prevWordEnd(t.document).getRight(),n=e.getLineEnd()):(r=e.prevWordStart(t.document,{wordType:g.WordType.Big,inclusive:!0}),n=e.nextWordStart(t.document,{wordType:g.WordType.Big}).getLeft())}return t.currentMode!==i.Mode.Visual||t.cursorStopPosition.isEqual(t.cursorStartPosition)||(r=t.cursorStartPosition,t.cursorStopPosition.isBefore(t.cursorStartPosition)&&(n=/\s/.test(o)?e.prevWordStart(t.document,{wordType:g.WordType.Big}):e.prevWordEnd(t.document,{wordType:g.WordType.Big}).getRight())),{start:r,stop:n}}};y=n([c.RegisterAction],y),t.SelectABigWord=y;let w=class extends d.ExpandingSelection{constructor(){super(...arguments),this.keys=["a","f"],this.modes=[i.Mode.Visual,i.Mode.VisualLine]}async execAction(e,t,r,n){const s=[new d.MoveAroundDoubleQuotes,new d.MoveAroundSingleQuotes,new d.MoveAroundBacktick,new d.MoveAroundCurlyBrace,new d.MoveAroundParentheses,new d.MoveAroundSquareBracket,new d.MoveAroundTag];let a,c=[];for(const o of s){const i=new p.Position(e.line,e.character),s=new p.Position(t.cursorStartPosition.line,t.cursorStartPosition.character);c.push(await o.execAction(i,t,r,n)),t.cursorStartPosition=s}c=c.filter((e=>!e.failed));for(const e of c){const r=new o.Cursor(t.cursorStartPosition,t.cursorStopPosition);if(e.failed)continue;const n=new o.Cursor(e.start,e.stop);let s;n.start.isBefore(r.start)&&n.stop.isAfter(r.stop)&&(a?n.start.isAfter(a.start)&&n.stop.isBefore(a.stop)&&(s=n):s=n),s&&(s.equals(new o.Cursor(t.cursorStartPosition,t.cursorStopPosition))||t.currentMode===i.Mode.VisualLine&&s.start.line===t.cursorStartPosition.line&&s.stop.line===t.cursorStopPosition.line||(a=s))}return a?(t.cursorStartPosition=new p.Position(a.start.line,a.start.character),t.cursorStopPosition=new p.Position(a.stop.line,a.stop.character),t.recordedState.operatorPositionDiff=void 0,{start:a.start,stop:a.stop}):{start:t.cursorStartPosition,stop:t.cursorStopPosition}}};w=n([c.RegisterAction],w),t.SelectAnExpandingBlock=w;let x=class extends f{constructor(){super(...arguments),this.modes=[i.Mode.Normal,i.Mode.Visual],this.keys=["i","w"]}async execAction(e,t){let r,n;const o=t.document.lineAt(e).text[e.character];return void 0===o?(r=e,n=e.nextWordStart(t.document).getLeftThroughLineBreaks()):/\s/.test(o)?(r=e.prevWordEnd(t.document).getRight(),n=e.nextWordStart(t.document).getLeftThroughLineBreaks()):(r=e.prevWordStart(t.document,{inclusive:!0}),n=e.nextWordEnd(t.document,{inclusive:!0})),t.currentMode!==i.Mode.Visual||t.cursorStopPosition.isEqual(t.cursorStartPosition)||(r=t.cursorStartPosition,t.cursorStopPosition.isBefore(t.cursorStartPosition)&&(n=/\s/.test(o)?e.prevWordEnd(t.document).getRight():e.prevWordStart(t.document,{inclusive:!0}))),{start:r,stop:n}}};x=n([c.RegisterAction],x),t.SelectInnerWord=x;let S=class extends f{constructor(){super(...arguments),this.modes=[i.Mode.Normal,i.Mode.Visual],this.keys=["i","W"]}async execAction(e,t){let r,n;const o=t.document.lineAt(e).text[e.character];return void 0===o?(r=e,n=e.nextWordStart(t.document).getLeftThroughLineBreaks()):/\s/.test(o)?(r=e.prevWordEnd(t.document,{wordType:g.WordType.Big}).getRight(),n=e.nextWordStart(t.document,{wordType:g.WordType.Big}).getLeft()):(r=e.prevWordStart(t.document,{wordType:g.WordType.Big,inclusive:!0}),n=e.nextWordEnd(t.document,{wordType:g.WordType.Big,inclusive:!0})),t.currentMode!==i.Mode.Visual||t.cursorStopPosition.isEqual(t.cursorStartPosition)||(r=t.cursorStartPosition,t.cursorStopPosition.isBefore(t.cursorStartPosition)&&(n=/\s/.test(o)?e.prevWordEnd(t.document,{wordType:g.WordType.Big}).getRight():e.prevWordStart(t.document,{wordType:g.WordType.Big}))),{start:r,stop:n}}};S=n([c.RegisterAction],S),t.SelectInnerBigWord=S;let C=class extends f{constructor(){super(...arguments),this.keys=["a","s"]}async execAction(e,t){let r,n;const o=e.getSentenceBegin({forward:!1}),s=o.getSentenceEnd();if(s.isBefore(e))r=s.getRight(),n=o.getSentenceBegin({forward:!0}).getSentenceEnd();else{const e=o.getSentenceBegin({forward:!0});e.isEqual(o.getSentenceEnd())?(r=o.getSentenceBegin({forward:!1}).getSentenceEnd().getRight(),n=e):(r=o,n=e.getLeft())}return t.currentMode!==i.Mode.Visual||t.cursorStopPosition.isEqual(t.cursorStartPosition)||(r=t.cursorStartPosition,t.cursorStopPosition.isBefore(t.cursorStartPosition)&&(n=s.isAfter(t.cursorStopPosition)?o.getSentenceBegin({forward:!1}).getSentenceEnd().getRight():o)),{start:r,stop:n}}};C=n([c.RegisterAction],C),t.SelectSentence=C;let M=class extends f{constructor(){super(...arguments),this.keys=["i","s"]}async execAction(e,t){let r,n;const o=e.getSentenceBegin({forward:!1}),s=o.getSentenceEnd();return s.isBefore(e)?(r=s.getRight(),n=o.getSentenceBegin({forward:!0}).getLeft()):(r=o,n=s),t.currentMode!==i.Mode.Visual||t.cursorStopPosition.isEqual(t.cursorStartPosition)||(r=t.cursorStartPosition,t.cursorStopPosition.isBefore(t.cursorStartPosition)&&(n=s.isAfter(t.cursorStopPosition)?o:s.getRight())),{start:r,stop:n}}};M=n([c.RegisterAction],M),t.SelectInnerSentence=M;let b=class extends f{constructor(){super(...arguments),this.keys=["a","p"]}async execAction(e,t){let r;t.currentRegisterMode=s.RegisterMode.LineWise;const n=(0,m.getCurrentParagraphBeginning)(e,!0);r=t.document.lineAt(e).isEmptyOrWhitespace?(0,m.getCurrentParagraphEnd)((0,m.getCurrentParagraphBeginning)(e,!0),!0):n.isLineBeginning()&&n.isLineEnd()?n.getRightThroughLineBreaks():n;let o=(0,m.getCurrentParagraphEnd)(e,!0);for(;o.line<t.document.lineCount-1&&t.document.lineAt(o.getDown()).isEmptyOrWhitespace;)o=o.with({character:0}).getDown();return{start:r,stop:o}}};b=n([c.RegisterAction],b),t.SelectParagraph=b;let k=class extends f{constructor(){super(...arguments),this.keys=["i","p"]}async execAction(e,t){let r,n;if(t.currentRegisterMode=s.RegisterMode.LineWise,t.document.lineAt(e).isEmptyOrWhitespace){for(r=e.getLineBegin(),n=e.getLineEnd();r.line>0&&t.document.lineAt(r.getUp()).isEmptyOrWhitespace;)r=r.getUp();for(;n.line<t.document.lineCount-1&&t.document.lineAt(n.getDown()).isEmptyOrWhitespace;)n=n.with({character:0}).getDown()}else{const o=(0,m.getCurrentParagraphBeginning)(e,!0);for(n=(0,m.getCurrentParagraphEnd)(e,!0),r=t.document.lineAt(o).isEmptyOrWhitespace?o.getRightThroughLineBreaks():o;n.line>0&&t.document.lineAt(n).isEmptyOrWhitespace;)n=n.getUp().getLineEnd()}return{start:r,stop:n}}};k=n([c.RegisterAction],k),t.SelectInnerParagraph=k;let R=class extends f{constructor(){super(...arguments),this.keys=["a","e"]}async execAction(e,t){return{start:a.TextEditor.getDocumentBegin(),stop:a.TextEditor.getDocumentEnd(t.document)}}};R=n([c.RegisterAction],R),t.SelectEntire=R;let P=class extends f{constructor(){super(...arguments),this.keys=["i","e"]}async execAction(e,t){let r=a.TextEditor.getDocumentBegin(),n=a.TextEditor.getDocumentEnd(t.document);for(;r.line<n.line&&t.document.lineAt(r).isEmptyOrWhitespace;)r=r.getDown();for(;n.line>r.line&&t.document.lineAt(n).isEmptyOrWhitespace;)n=n.getUp();return n=n.getLineEnd(),{start:r,stop:n}}};P=n([c.RegisterAction],P),t.SelectEntireIgnoringLeadingTrailing=P;class _ extends f{constructor(){super(...arguments),this.setsDesiredColumnToEOL=!0,this.includeLineAbove=!1,this.includeLineBelow=!1}async execAction(e,t){const r=t.recordedState.operator instanceof l.ChangeOperator,n=_.findFirstValidLine(t.document,e),o=t.document.lineAt(n).firstNonWhitespaceCharacterIndex;let s=_.findRangeStartOrEnd(t.document,n,o,-1),c=_.findRangeStartOrEnd(t.document,n,o,1);this.includeLineAbove&&(s-=1),s<0&&(s=0),this.includeLineBelow&&(c+=1),c>t.document.lineCount-1&&(c=t.document.lineCount-1);let u,d=0;return r&&(d=t.document.lineAt(s).firstNonWhitespaceCharacterIndex),c===t.document.lineCount-1||t.currentMode===i.Mode.Visual?u=a.TextEditor.getLineLength(c):(u=0,c++),{start:new p.Position(s,d),stop:new p.Position(c,u)}}async execActionForOperator(e,t){return this.execAction(e,t)}static findFirstValidLine(e,t){for(let r=t.line;r>=0;r--)if(!e.lineAt(r).isEmptyOrWhitespace)return r;return t.line}static findRangeStartOrEnd(e,t,r,n){let o=t,i=t;const s=1===n?e.lineCount:-1;for(;o!==s;o+=n){const t=e.lineAt(o);if(t.firstNonWhitespaceCharacterIndex<r&&!t.isEmptyOrWhitespace)break;i=o}return i}}let E=class extends _{constructor(){super(...arguments),this.keys=["i","i"]}};E=n([c.RegisterAction],E);let A=class extends _{constructor(){super(...arguments),this.keys=["a","i"],this.includeLineAbove=!0}};A=n([c.RegisterAction],A);let T=class extends _{constructor(){super(...arguments),this.keys=["a","I"],this.includeLineAbove=!0,this.includeLineBelow=!0}};T=n([c.RegisterAction],T);class L extends f{constructor(){super(...arguments),this.modes=[i.Mode.Normal,i.Mode.Visual],this.selectAround=!1}static openingDelimiterCharacters(){return h.configuration.argumentObjectOpeningDelimiters}static closingDelimiterCharacters(){return h.configuration.argumentObjectClosingDelimiters}static separatorCharacters(){return h.configuration.argumentObjectSeparators}async execAction(e,t){const r=(0,u.failedMovement)(t);let n=e,o=e;const i=a.TextEditor.getCharAt(t.document,e);if(L.separatorCharacters().includes(i)||L.openingDelimiterCharacters().includes(i)?o=e.getRightThroughLineBreaks(!0):L.closingDelimiterCharacters().includes(i)&&(n=e.getLeftThroughLineBreaks(!0)),void 0===$.findLeftArgumentBoundary(t.document,n,!0)||void 0===$.findRightArgumentBoundary(t.document,o,!0))return r;const s=$.findLeftArgumentBoundary(t.document,n);if(void 0===s)return r;const c=$.findRightArgumentBoundary(t.document,o);if(void 0===c)return r;let d,l;if(this.selectAround){const e=L.openingDelimiterCharacters().includes(a.TextEditor.getCharAt(t.document,s)),n=L.closingDelimiterCharacters().includes(a.TextEditor.getCharAt(t.document,c));if(s.getRight().isEqual(c)&&e&&n)return r;if(e&&!n)for(l=c.getRight();/\s/.test(a.TextEditor.getCharAt(t.document,l.getRight()));)l=l.getRight();else l=c.getLeftThroughLineBreaks(!0);d=e?s.getRightThroughLineBreaks(!0):s}else{for(d=s.getRightThroughLineBreaks(!1);/\s/.test(a.TextEditor.getCharAt(t.document,d));)d=d.getRightThroughLineBreaks(!1);for(l=c.getLeftThroughLineBreaks(!1);/\s/.test(a.TextEditor.getCharAt(t.document,l));)l=l.getLeftThroughLineBreaks(!1);l.isBeforeOrEqual(d)&&(d=s.getRightThroughLineBreaks(!0),l=c.getLeftThroughLineBreaks(!0))}return e.isBefore(d)&&(t.recordedState.operatorPositionDiff=d.subtract(e)),t.cursorStartPosition=d,{start:d,stop:l}}static findLeftArgumentBoundary(e,t,r=!1){let n,o=t,i=0;for(;;){const t=a.TextEditor.getCharAt(e,o);if(0===i){let e=L.openingDelimiterCharacters().includes(t);if(r||e||(e=L.separatorCharacters().includes(t)),e){n=o;break}}if(L.closingDelimiterCharacters().includes(t)&&i++,L.openingDelimiterCharacters().includes(t)&&i--,o.isAtDocumentBegin())break;o=o.getLeftThroughLineBreaks(!0)}return n}static findRightArgumentBoundary(e,t,r=!1){let n,o=t,i=0;for(;;){const t=a.TextEditor.getCharAt(e,o);if(0===i){let e=L.closingDelimiterCharacters().includes(t);if(r||e||(e=L.separatorCharacters().includes(t)),e){n=o;break}}if(L.openingDelimiterCharacters().includes(t)&&i++,L.closingDelimiterCharacters().includes(t)&&i--,o.isAtDocumentEnd())break;o=o.getRightThroughLineBreaks(!0)}return n}}let $=class extends L{constructor(){super(...arguments),this.modes=[i.Mode.Normal,i.Mode.Visual],this.keys=["i","a"]}};$=n([c.RegisterAction],$),t.SelectInnerArgument=$;let B=class extends L{constructor(){super(...arguments),this.modes=[i.Mode.Normal,i.Mode.Visual],this.keys=["a","a"],this.selectAround=!0}};B=n([c.RegisterAction],B),t.SelectAroundArgument=B},"./src/textobject/util.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllEndPositions=t.getAllPositions=void 0,t.getAllPositions=function(e,t){const r=[];let n=t.exec(e);for(;n;)r.push(n.index),n.index===t.lastIndex&&t.lastIndex++,n=t.exec(e);return r},t.getAllEndPositions=function(e,t){const r=[];let n=t.exec(e);for(;n;)n[0].length&&r.push(n.index+n[0].length-1),n.index===t.lastIndex&&t.lastIndex++,n=t.exec(e);return r}},"./src/textobject/word.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevWordEnd=t.nextWordEnd=t.nextWordStart=t.prevWordStart=t.getWordRightInText=t.getWordLeftInText=t.WordType=void 0;const n=r("./node_modules/lodash/lodash.js"),o=r("vscode"),i=r("./src/configuration/configuration.ts"),s=r("./src/textobject/util.ts");var a;!function(e){e[e.Normal=0]="Normal",e[e.Big=1]="Big",e[e.CamelCase=2]="CamelCase",e[e.FileName=3]="FileName"}(a=t.WordType||(t.WordType={}));const c=h(""),u=h("\"'`;<>{}[]()");function d(e){switch(e){case a.Normal:return function(e){let t;!function(e){e[e.Punctuation=0]="Punctuation",e[e.Superscript=1]="Superscript",e[e.Subscript=2]="Subscript",e[e.Braille=3]="Braille",e[e.Ideograph=4]="Ideograph",e[e.Hiragana=5]="Hiragana",e[e.Katakana=6]="Katakana",e[e.Hangul=7]="Hangul"}(t||(t={}));const r=[[[161,191],t.Punctuation],[[894,894],t.Punctuation],[[903,903],t.Punctuation],[[1370,1375],t.Punctuation],[[1417,1417],t.Punctuation],[[1470,1470],t.Punctuation],[[1472,1472],t.Punctuation],[[1475,1475],t.Punctuation],[[1523,1524],t.Punctuation],[[1548,1548],t.Punctuation],[[1563,1563],t.Punctuation],[[1567,1567],t.Punctuation],[[1642,1645],t.Punctuation],[[1748,1748],t.Punctuation],[[1792,1805],t.Punctuation],[[2404,2405],t.Punctuation],[[2416,2416],t.Punctuation],[[3572,3572],t.Punctuation],[[3663,3663],t.Punctuation],[[3674,3675],t.Punctuation],[[3844,3858],t.Punctuation],[[3898,3901],t.Punctuation],[[3973,3973],t.Punctuation],[[4170,4175],t.Punctuation],[[4347,4347],t.Punctuation],[[4961,4968],t.Punctuation],[[5741,5742],t.Punctuation],[[5787,5788],t.Punctuation],[[5867,5869],t.Punctuation],[[5941,5942],t.Punctuation],[[6100,6108],t.Punctuation],[[6144,6154],t.Punctuation],[[8204,8231],t.Punctuation],[[8234,8238],t.Punctuation],[[8240,8286],t.Punctuation],[[8288,10239],t.Punctuation],[[8304,8319],t.Superscript],[[8320,8340],t.Subscript],[[8352,10239],t.Punctuation],[[10240,10495],t.Braille],[[10496,10648],t.Punctuation],[[10712,10715],t.Punctuation],[[10748,10749],t.Punctuation],[[11776,11903],t.Punctuation],[[12289,12320],t.Punctuation],[[12336,12336],t.Punctuation],[[12349,12349],t.Punctuation],[[12352,12447],t.Hiragana],[[12448,12543],t.Katakana],[[13056,40959],t.Ideograph],[[44032,55203],t.Hangul],[[63744,64255],t.Ideograph],[[64830,64831],t.Punctuation],[[65072,65131],t.Punctuation],[[65280,65295],t.Punctuation],[[65306,65312],t.Punctuation],[[65339,65344],t.Punctuation],[[65371,65381],t.Punctuation],[[131072,173791],t.Ideograph],[[173824,177983],t.Ideograph],[[177984,178207],t.Ideograph],[[194560,195103],t.Ideograph]],o=[];for(const e in t)isNaN(Number(e))||(o[e]=[]);for(const[[e,t],n]of r)e===t?o[n].push(`\\u{${e.toString(16)}}`):o[n].push(`\\u{${e.toString(16)}}-\\u{${t.toString(16)}}`);const i=n.escapeRegExp(e).replace(/-/g,"\\-");o[Number(t.Punctuation)].push(i);const s=o.map((e=>e.join(""))),a=s.map((e=>`([${e}]+)`)),c=`([^\\s${s.join("")}]+)`,u=a.concat(c,"$^");return new RegExp(u.join("|"),"ug")}(i.configuration.iskeyword);case a.Big:return c;case a.CamelCase:return function(e){const t=e&&n.escapeRegExp(e).replace(/-/g,"\\-"),r=[];let o=!0;try{new RegExp("(?<=x)")}catch{o=!1}const i=`([^\\s${t}](?:(?:`+(o?"(?<=[A-Z_])":"")+`[A-Z](?=[\\sA-Z0-9${t}_]))+|(?:`+(o?"(?<=[0-9_])":"")+`[0-9](?=[\\sA-Z0-9${t}_]))+|(?:`+(o?"(?<=[_])":"")+`[_](?=[\\s${t}_]))+|`+`[^\\sA-Z0-9${t}_]*))`;return r.push(i),r.push(`[${t}]+`),r.push("$^"),new RegExp(r.join("|"),"g")}(i.configuration.iskeyword);case a.FileName:return u}}function l(e,t,r,n=!1,o=!1){return(0,s.getAllPositions)(e,d(r)).reverse().find((e=>e<t&&!o||e<=t&&o||n))}function h(e){const t=e&&n.escapeRegExp(e).replace(/-/g,"\\-");return new RegExp([`([^\\s${t}]+)`,`[${t}]+`,"$^"].join("|"),"g")}t.getWordLeftInText=function(e,t,r){return l(e,t,r)},t.getWordRightInText=function(e,t,r){return(0,s.getAllPositions)(e,d(r)).find((e=>e>t))},t.prevWordStart=function(e,t,r,n=!1){for(let i=t.line;i>=0;i--){const s=l(e.lineAt(i).text,t.character,r,i!==t.line,n);if(void 0!==s)return new o.Position(i,s)}return new o.Position(0,0)},t.nextWordStart=function(e,t,r,n=!1){for(let i=t.line;i<e.lineCount;i++){const a=(0,s.getAllPositions)(e.lineAt(i).text,d(r)).find((e=>e>t.character&&!n||e>=t.character&&n||i!==t.line));if(void 0!==a)return new o.Position(i,a)}return new o.Position(e.lineCount-1,0).getLineEnd()},t.nextWordEnd=function(e,t,r,n=!1){for(let i=t.line;i<e.lineCount;i++){const a=(0,s.getAllEndPositions)(e.lineAt(i).text,d(r)).find((e=>e>t.character&&!n||e>=t.character&&n||i!==t.line));if(void 0!==a)return new o.Position(i,a)}return new o.Position(e.lineCount-1,0).getLineEnd()},t.prevWordEnd=function(e,t,r){for(let n=t.line;n>-1;n--){let i=(0,s.getAllEndPositions)(e.lineAt(n).text,d(r));0===i.length&&i.push(0),i=i.reverse();const a=i.findIndex((e=>e<t.character||n!==t.line));let c=0;if(-1===a){if(n>-1)continue;c=i[i.length-1]}else c=i[a];if(void 0!==c)return new o.Position(n,c)}return new o.Position(0,0)}},"./src/transformations/execute.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeTransformations=void 0;const n=r("vscode"),o=r("./src/util/logger.ts"),i=r("./src/transformations/transformations.ts"),s=r("./src/cmd_line/commandLine.ts"),a=r("./src/error.ts"),c=r("./src/mode/mode.ts"),u=r("./src/register/register.ts"),d=r("./src/state/globalState.ts"),l=r("./src/state/recordedState.ts"),h=r("./src/textEditor.ts"),m=r("./src/util/statusBarTextUtils.ts"),p=r("./src/common/motion/cursor.ts"),g=r("./src/transformations/transformer.ts"),f=r("./src/globals.ts"),v=o.Logger.get("Parser");t.executeTransformations=async function e(t,r){var o,y;if(0===r.length)return;const w=t.vimState,x=r.filter((e=>(0,i.isTextTransformation)(e))),S=r.filter((e=>(0,i.isMultiCursorTextTransformation)(e))),C=r.filter((e=>!(0,i.isTextTransformation)(e)&&!(0,i.isMultiCursorTextTransformation)(e))),M={},b=(e,t)=>{switch(e.type){case"insertText":t.insert(e.position,e.text);break;case"replaceText":t.replace(e.range,e.text);break;case"deleteRange":t.delete(e.range);break;case"moveCursor":break;default:v.warn(`Unhandled text transformation type: ${e.type}.`)}if(e.diff){if(void 0===e.cursorIndex)throw new Error("No cursor index - this should never ever happen!");M[e.cursorIndex]||(M[e.cursorIndex]=[]),M[e.cursorIndex].push(e.diff)}};if(x.length>0){const e=(0,i.overlappingTransformations)(x);if(void 0!==e){const t=`Transformations overlapping: ${JSON.stringify(e)}`;if(v.warn(t),f.Globals.isTesting)throw new Error(t);for(const e of x)await w.editor.edit((t=>b(e,t)))}else try{await w.editor.edit((e=>{for(const t of x)b(t,e)}))}catch(e){if("DISPOSED"!==e.name)throw e.context={currentMode:c.Mode[w.currentMode],cursors:w.cursors.map((e=>e.toString())),actionsRunPressedKeys:w.recordedState.actionsRunPressedKeys,actionsRun:w.recordedState.actionsRun.map((e=>e.constructor.name)),textTransformations:x},e}}if(S.length>0)if((0,i.areAllSameTransformation)(S)){const{text:e}=S[0];await h.TextEditor.insert(w.editor,e)}else v.warn("Unhandled multicursor transformations. Not all transformations are the same!");for(const r of C)switch(r.type){case"insertTextVSCode":await h.TextEditor.insert(w.editor,r.text),w.cursors[0]=p.Cursor.FromVSCodeSelection(w.editor.selection);break;case"deleteLeft":await n.commands.executeCommand("deleteLeft");break;case"deleteRight":await n.commands.executeCommand("deleteRight");break;case"showCommandHistory":const i=await n.window.showQuickPick(s.ExCommandLine.history.get().slice().reverse(),{placeHolder:"Vim command history",ignoreFocusOut:!1});i&&0!==i.length&&(await new s.ExCommandLine(i,w.currentMode).run(w),t.updateView());break;case"showSearchHistory":const c=await s.SearchCommandLine.showSearchHistory();if(c){d.globalState.searchState=c;const e=c.getNextSearchMatchPosition(w,w.cursorStartPosition,r.direction);if(!e)throw a.VimError.fromCode(r.direction>0?a.ErrorCode.SearchHitBottom:a.ErrorCode.SearchHitTop,c.searchString);w.cursorStopPosition=e.pos,t.updateView(),(0,m.reportSearch)(e.index,c.getMatchRanges(w).length,w)}break;case"replayRecordedState":await t.rerunRecordedState(r.recordedState.clone());break;case"macro":const g=null===(o=await u.Register.get(r.register))||void 0===o?void 0:o.text;if(!(g instanceof l.RecordedState))return;if(w.isReplayingMacro=!0,w.recordedState=new l.RecordedState,":"===r.register)await new s.ExCommandLine(g.commandString,w.currentMode).run(w);else if("contentChange"===r.replay)await t.runMacro(g);else{let e=[];for(const t of g.actionsRun)e=e.concat(t.keysPressed);await t.handleMultipleKeyEvents(e)}if(await e(t,w.recordedState.transformer.transformations),w.isReplayingMacro=!1,w.lastInvokedMacro=g,w.lastMovementFailed)return void(w.lastMovementFailed=!1);break;case"contentChange":for(const e of r.changes)await h.TextEditor.insert(w.editor,e.text),w.cursorStopPosition=w.editor.selection.start;const f=w.cursorStopPosition.add(w.document,r.diff);w.editor.selection=new n.Selection(f,f);break;case"tab":if(await n.commands.executeCommand("tab"),r.diff){if(void 0===r.cursorIndex)throw new Error("No cursor index - this should never ever happen!");M[r.cursorIndex]||(M[r.cursorIndex]=[]),M[r.cursorIndex].push(r.diff)}break;case"reindent":if(await n.commands.executeCommand("editor.action.reindentselectedlines"),r.diff){if(void 0===r.cursorIndex)throw new Error("No cursor index - this should never ever happen!");M[r.cursorIndex]||(M[r.cursorIndex]=[]),M[r.cursorIndex].push(r.diff)}break;default:v.warn(`Unhandled text transformation type: ${r.type}.`)}const k=w.editor.selections.map((e=>{let t=p.Cursor.FromVSCodeSelection(e);return t.start.isBefore(t.stop)&&(t=t.withNewStop(t.stop.getLeftThroughLineBreaks(!0))),new n.Selection(t.start,t.stop)})),R=r[0],P=("deleteRange"===R.type||"replaceText"===R.type||"insertText"===R.type)&&R.manuallySetCursorPositions;if(w.currentMode===c.Mode.VisualBlock||P){if((null===(y=M[0])||void 0===y?void 0:y.length)>0){const e=M[0][0];w.cursorStopPosition=w.cursorStopPosition.add(w.document,e),w.cursorStartPosition=w.cursorStartPosition.add(w.document,e)}}else w.cursors=k.map(((e,t)=>{var r;const n=null!==(r=M[t])&&void 0!==r?r:[];return w.recordedState.operatorPositionDiff&&n.push(w.recordedState.operatorPositionDiff),n.reduce(((e,t)=>new p.Cursor(e.start.add(w.document,t),e.stop.add(w.document,t))),p.Cursor.FromVSCodeSelection(e))})),w.recordedState.operatorPositionDiff=void 0;w.recordedState.transformer=new g.Transformer}},"./src/transformations/transformations.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.areAllSameTransformation=t.overlappingTransformations=t.isMultiCursorTextTransformation=t.isTextTransformation=void 0;const n=r("vscode");t.isTextTransformation=e=>"insertText"===e.type||"replaceText"===e.type||"deleteRange"===e.type||"moveCursor"===e.type,t.isMultiCursorTextTransformation=e=>{var t;return null!==(t="insertTextVSCode"===e.type&&e.isMultiCursor)&&void 0!==t&&t};const o=e=>{switch(e.type){case"insertText":return new n.Range(e.position,e.position.advancePositionByText(e.text));case"replaceText":case"deleteRange":return e.range;case"moveCursor":return}throw new Error("Unhandled text transformation: "+e)};t.overlappingTransformations=function(e){for(let t=0;t<e.length;t++)for(let r=t+1;r<e.length;r++){const n=e[t],i=e[r],s=o(n),a=o(i);if(!s||!a)continue;const c=s.intersection(a);if(c&&!c.start.isEqual(c.end))return[n,i]}},t.areAllSameTransformation=e=>{const t=e[0];return e.every((e=>Object.entries(e).every((([e,r])=>t[e]===r))))},t.stringify=function(e){return"replayRecordedState"===e.type?`Replay: ${e.recordedState.actionsRun.map((e=>e.keysPressed.join(""))).join("")}`:JSON.stringify(e)}},"./src/transformations/transformer.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transformer=void 0;const n=r("./src/util/logger.ts"),o=r("./src/transformations/transformations.ts");t.Transformer=class{constructor(){this.transformations=[],this.logger=n.Logger.get("Transformer")}addTransformation(e){this.logger.debug(`Adding Transformation ${(0,o.stringify)(e)}`),this.transformations.push(e)}insert(e,t,r){this.addTransformation({type:"insertText",position:e,text:t,diff:r})}delete(e,t){this.addTransformation({type:"deleteRange",range:e,diff:t})}replace(e,t,r){this.addTransformation({type:"replaceText",range:e,text:t,diff:r})}}},"./src/util/clipboard.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Clipboard=void 0;const n=r("vscode"),o=r("./src/util/logger.ts");class i{static async Copy(e){try{await n.env.clipboard.writeText(e)}catch(e){this.logger.error(`Error copying to clipboard. err=${e}`)}}static async Paste(){return n.env.clipboard.readText()}}t.Clipboard=i,i.logger=o.Logger.get("Clipboard")},"./src/util/decorationUtils.ts":(e,t)=>{"use strict";function r(e){return e.start.isLineEnd()&&(e.isEmpty||e.end.isLineBeginning())?{range:e.with(void 0,e.start),renderOptions:{after:{color:"transparent",contentText:"$"}}}:e.isEmpty?{range:e.with(void 0,e.end.translate(0,1))}:{range:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getDecorationsForSearchMatchRanges=t.formatDecorationText=t.ensureVisible=void 0,t.ensureVisible=r,t.formatDecorationText=function(e,t,r="⏎"){return`${e.replace(/ /g," ").replace(/\t/g," ".repeat(t)).replace(/\r\n|[\r\n]/g,r)}`},t.getDecorationsForSearchMatchRanges=function(e,t){if(void 0===e)return{};const n=[],o=[];for(let i=0;i<e.length;i++)(i===t?o:n).push(r(e[i]));return{searchHighlight:n,searchMatch:o}}},"./src/util/externalCommand.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.externalCommand=void 0;const n=r("./src/error.ts"),o=r("./src/configuration/configuration.ts");t.externalCommand=new class{expandCommand(e){const t=[];for(let r=0;r<e.length;r++)if("!"===e[r])if(r>0&&"\\"===e[r-1])t.pop(),t.push("!");else{if(!this.previousExternalCommand)throw n.VimError.fromCode(n.ErrorCode.NoPreviousCommand);t.push(this.previousExternalCommand)}else t.push(e[r]);return t.join("")}async execute(e,t){const n=[],i={shell:o.configuration.shell||void 0};try{const o=(0,(await Promise.resolve().then((()=>r(Object(function(){var e=new Error("Cannot find module '../util/child_process'");throw e.code="MODULE_NOT_FOUND",e}()))))).exec)(e,i),s=o.child;null!==s.stdin&&(s.stdin.on("error",(()=>{})),s.stdin.write(t),s.stdin.end()),null!==s.stdout&&s.stdout.on("data",(e=>n.push(e))),null!==s.stderr&&s.stderr.on("data",(e=>n.push(e))),await o}catch(e){}return n.join("")}async run(e,t=""){e=this.expandCommand(e),this.previousExternalCommand=e,e+=" 2>&1";let r=await this.execute(e,t);return r.endsWith("\r\n")?r=r.slice(0,-2):r.endsWith("\n")&&(r=r.slice(0,-1)),r}}},"./src/util/logger.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const n=r("./src/platform/browser/loggerImpl.ts");class o{static get(e){let t=o.cache.get(e);return void 0===t&&(t=n.LoggerImpl.get(e),o.configuration&&t.configChanged(o.configuration),o.cache.set(e,t)),t}static configChanged(e){o.configuration=e;for(const t of this.cache.values())t.configChanged(e)}}t.Logger=o,o.cache=new Map,o.configuration=void 0},"./src/util/path.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.join=t.readDirectory=t.resolveUri=t.getPathDetails=t.separatePath=void 0;const n=r("vscode"),o=r("./node_modules/path-browserify/index.js"),i=r("./node_modules/untildify/index.js");function s(e,t){if(t===o.win32.sep&&e[0]===t&&e[1]===t&&-1===e.indexOf(t,2))return[e,""];const r=e.lastIndexOf(t)+1,n=e.slice(r);return[e.slice(0,r),n]}function a(e,t,r,i){const s=t===o.win32.sep;if(s&&!/^(\\\\.+\\)|([a-zA-Z]:\\)/.test(e))return null;if(!s&&e[0]!==t)return null;const a=!i&&"untitled"===r.scheme;return s?n.Uri.file(e):r.with({scheme:a?"file":r.scheme,path:e})}t.separatePath=s,t.getPathDetails=function(e,t,r){let n;n="untitled"===t.scheme?o===o.win32&&!r:"file"===t.scheme&&"/"!==t.fsPath[0];const a=n?o.win32:o.posix;n&&(e=e.replace(/\//g,"\\"));const c=e;("file"===t.scheme||"untitled"===t.scheme&&!r)&&(e=i(e));const[u,d]=s(e,a.sep);let l;return l=a.isAbsolute(u)?u:a.join(s(n?t.fsPath:t.path,a.sep)[0],u),{fullPath:a.join(l,d),fullDirPath:l,dirName:u,baseName:d,partialPath:c,path:a}},t.resolveUri=a,t.readDirectory=async function(e,t,r,o,i){try{const s=a(e,t,r,o);return null===s?[]:(await n.workspace.fs.readDirectory(s)).map((e=>e[0]+(e[1]===n.FileType.Directory?t:""))).concat(i?[`.${t}`,`..${t}`]:[])}catch{return[]}},t.join=function(...e){return o.join(...e)}},"./src/util/specialKeys.ts":(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialKeys=void 0,(r=t.SpecialKeys||(t.SpecialKeys={})).ExtensionEnable="<ExtensionEnable>",r.ExtensionDisable="<ExtensionDisable>",r.TimeoutFinished="<TimeoutFinished>"},"./src/util/statusBarTextUtils.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportSearch=t.reportFileInfo=t.reportLinesYanked=t.reportLinesChanged=t.escapeCSSIcons=void 0;const n=r("./src/mode/mode.ts"),o=r("./src/statusBar.ts"),i=r("./src/configuration/configuration.ts");t.escapeCSSIcons=function(e){return e.replace(/\\?\$\([A-Za-z0-9\-]+(?:~[A-Za-z]+)?\)/g,"\\$&")},t.reportLinesChanged=function(e,t){e>i.configuration.report?o.StatusBar.setText(t,`${e} more lines`):-e>i.configuration.report?o.StatusBar.setText(t,`${Math.abs(e)} fewer lines`):o.StatusBar.clear(t)},t.reportLinesYanked=function(e,t){e>i.configuration.report?t.currentMode===n.Mode.VisualBlock?o.StatusBar.setText(t,`block of ${e} lines yanked`):o.StatusBar.setText(t,`${e} lines yanked`):o.StatusBar.clear(t)},t.reportFileInfo=function(e,t){const r=t.document,n=r.isUntitled?"[No Name]":r.fileName,i=r.isDirty?" [Modified]":"";if(1===r.lineCount&&0===r.lineAt(0).text.length)o.StatusBar.setText(t,`"${n}"${i} --No lines in buffer--`);else{const s=Math.floor((e.line+1)/r.lineCount*100);o.StatusBar.setText(t,`"${n}"${i} ${r.lineCount} line${r.lineCount>1?"s":""} --${s}%--`)}},t.reportSearch=function(e,t,r){o.StatusBar.setText(r,`match ${e+1} of ${t}`)}},"./src/util/util.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertDefined=t.scrollView=t.clamp=t.getCursorsAfterSync=void 0;const n=r("./src/common/motion/cursor.ts");t.getCursorsAfterSync=function(e){return e.selections.map((e=>n.Cursor.FromVSCodeSelection(e)))},t.clamp=function(e,t,r){return Math.min(Math.max(e,t),r)},t.scrollView=function(e,t){0!==t&&e.postponedCodeViewChanges.push({command:"editorScroll",args:{to:t>0?"up":"down",by:"line",value:Math.abs(t),revealCursor:!1,select:!1}})},t.assertDefined=function(e,t){if(void 0===e)throw new Error(t)}},"./src/util/vscodeContext.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSCodeContext=void 0;const n=r("vscode"),o=r("./src/util/logger.ts");class i{static async set(e,t){this.get(e)!==t&&(o.Logger.get("vscode-context").debug(`Setting key='${e}' to value='${t}'`),this.cache.set(e,t),await n.commands.executeCommand("setContext",e,t))}static get(e){return this.cache.get(e)}}t.VSCodeContext=i,i.cache=new Map},"./src/vimscript/exCommand.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExCommand=void 0;const n=r("./src/error.ts");t.ExCommand=class{constructor(){this.isRepeatableWithDot=!0}neovimCapable(){return!1}async executeWithRange(e,t){throw n.VimError.fromCode(n.ErrorCode.NoRangeAllowed)}}},"./src/vimscript/exCommandParser.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exCommandParser=t.commandNameParser=t.builtinExCommands=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("./src/cmd_line/commands/ascii.ts"),i=r("./src/cmd_line/commands/bang.ts"),s=r("./src/cmd_line/commands/bufferDelete.ts"),a=r("./src/cmd_line/commands/close.ts"),c=r("./src/cmd_line/commands/copy.ts"),u=r("./src/cmd_line/commands/delete.ts"),d=r("./src/cmd_line/commands/digraph.ts"),l=r("./src/cmd_line/commands/file.ts"),h=r("./src/cmd_line/commands/fileInfo.ts"),m=r("./src/cmd_line/commands/goto.ts"),p=r("./src/cmd_line/commands/gotoLine.ts"),g=r("./src/cmd_line/commands/history.ts"),f=r("./src/cmd_line/commands/jumps.ts"),v=r("./src/cmd_line/commands/leftRightCenter.ts"),y=r("./src/cmd_line/commands/marks.ts"),w=r("./src/cmd_line/commands/nohl.ts"),x=r("./src/cmd_line/commands/only.ts"),S=r("./src/cmd_line/commands/print.ts"),C=r("./src/cmd_line/commands/put.ts"),M=r("./src/cmd_line/commands/quit.ts"),b=r("./src/cmd_line/commands/read.ts"),k=r("./src/cmd_line/commands/register.ts"),R=r("./src/cmd_line/commands/set.ts"),P=r("./src/cmd_line/commands/sh.ts"),_=r("./src/cmd_line/commands/smile.ts"),E=r("./src/cmd_line/commands/sort.ts"),A=r("./src/cmd_line/commands/substitute.ts"),T=r("./src/cmd_line/commands/tab.ts"),L=r("./src/cmd_line/commands/terminal.ts"),$=r("./src/cmd_line/commands/undo.ts"),B=r("./src/cmd_line/commands/vscode.ts"),I=r("./src/cmd_line/commands/wall.ts"),N=r("./src/cmd_line/commands/write.ts"),O=r("./src/cmd_line/commands/writequit.ts"),V=r("./src/cmd_line/commands/writequitall.ts"),D=r("./src/cmd_line/commands/yank.ts"),F=r("./src/error.ts"),j=r("./src/statusBar.ts"),W=r("./src/vimscript/exCommand.ts"),U=r("./src/vimscript/lineRange.ts"),K=r("./src/vimscript/parserUtils.ts");t.builtinExCommands=[[["",""],(0,n.succeed)(new p.GotoLineCommand)],[["!",""],i.BangCommand.argParser],[["#",""],S.PrintCommand.argParser({printNumbers:!0,printText:!0})],[["&",""],void 0],[["*",""],void 0],[["<",""],void 0],[["=",""],S.PrintCommand.argParser({printNumbers:!0,printText:!1})],[[">",""],void 0],[["@",""],void 0],[["@@",""],void 0],[["N","ext"],void 0],[["a","ppend"],void 0],[["ab","breviate"],void 0],[["abc","lear"],void 0],[["abo","veleft"],void 0],[["al","l"],void 0],[["am","enu"],void 0],[["an","oremenu"],void 0],[["ar","gs"],void 0],[["arga","dd"],void 0],[["argd","elete"],void 0],[["argdo",""],void 0],[["arge","dit"],void 0],[["argg","lobal"],void 0],[["argl","ocal"],void 0],[["argu","ment"],void 0],[["as","cii"],(0,n.succeed)(new o.AsciiCommand)],[["au","tocmd"],void 0],[["aug","roup"],void 0],[["aun","menu"],void 0],[["b","uffer"],void 0],[["bN","ext"],T.TabCommand.argParsers.bprev],[["ba","ll"],void 0],[["bad","d"],void 0],[["balt",""],void 0],[["bd","elete"],s.BufferDeleteCommand.argParser],[["be","have"],void 0],[["bel","owright"],void 0],[["bf","irst"],void 0],[["bl","ast"],void 0],[["bm","odified"],void 0],[["bn","ext"],T.TabCommand.argParsers.bnext],[["bo","tright"],void 0],[["bp","revious"],T.TabCommand.argParsers.bprev],[["br","ewind"],void 0],[["brea","k"],void 0],[["breaka","dd"],void 0],[["breakd","el"],void 0],[["breakl","ist"],void 0],[["bro","wse"],void 0],[["bufdo",""],void 0],[["buffers",""],void 0],[["bun","load"],void 0],[["bw","ipeout"],void 0],[["c","hange"],void 0],[["cN","ext"],void 0],[["cNf","ile"],void 0],[["ca","bbrev"],void 0],[["cabc","lear"],void 0],[["cabo","ve"],void 0],[["cad","dbuffer"],void 0],[["cadde","xpr"],void 0],[["caddf","ile"],void 0],[["caf","ter"],void 0],[["cal","l"],void 0],[["cat","ch"],void 0],[["cb","uffer"],void 0],[["cbef","ore"],void 0],[["cbel","ow"],void 0],[["cbo","ttom"],void 0],[["cc",""],void 0],[["ccl","ose"],void 0],[["cd",""],void 0],[["cdo",""],void 0],[["ce","nter"],v.CenterCommand.argParser],[["cex","pr"],void 0],[["cf","ile"],void 0],[["cfd","o"],void 0],[["cfir","st"],void 0],[["cg","etfile"],void 0],[["cgetb","uffer"],void 0],[["cgete","xpr"],void 0],[["changes",""],void 0],[["chd","ir"],void 0],[["che","ckpath"],void 0],[["checkh","ealth"],void 0],[["checkt","ime"],void 0],[["chi","story"],void 0],[["cl","ist"],void 0],[["cla","st"],void 0],[["cle","arjumps"],(0,n.succeed)(new f.ClearJumpsCommand)],[["clo","se"],a.CloseCommand.argParser],[["cm","ap"],void 0],[["cmapc","lear"],void 0],[["cme","nu"],void 0],[["cn","ext"],void 0],[["cnew","er"],void 0],[["cnf","ile"],void 0],[["cno","remap"],void 0],[["cnorea","bbrev"],void 0],[["cnoreme","nu"],void 0],[["co","py"],c.CopyCommand.argParser],[["col","der"],void 0],[["colo","rscheme"],void 0],[["com","mand"],void 0],[["comc","lear"],void 0],[["comp","iler"],void 0],[["con","tinue"],void 0],[["conf","irm"],void 0],[["cons","t"],void 0],[["cope","n"],void 0],[["cp","revious"],void 0],[["cpf","ile"],void 0],[["cq","uit"],void 0],[["cr","ewind"],void 0],[["cs","cope"],void 0],[["cst","ag"],void 0],[["cu","nmap"],void 0],[["cuna","bbrev"],void 0],[["cunme","nu"],void 0],[["cw","indow"],void 0],[["d","elete"],u.DeleteCommand.argParser],[["deb","ug"],void 0],[["debugg","reedy"],void 0],[["delc","ommand"],void 0],[["delf","unction"],void 0],[["delm","arks"],y.DeleteMarksCommand.argParser],[["di","splay"],k.RegisterCommand.argParser],[["dif","fupdate"],void 0],[["diffg","et"],void 0],[["diffo","ff"],void 0],[["diffp","atch"],void 0],[["diffpu","t"],void 0],[["diffs","plit"],void 0],[["diffthis",""],void 0],[["dig","raphs"],d.DigraphsCommand.argParser],[["dj","ump"],void 0],[["dl",""],void 0],[["dli","st"],void 0],[["do","autocmd"],void 0],[["doautoa","ll"],void 0],[["dr","op"],void 0],[["ds","earch"],void 0],[["dsp","lit"],void 0],[["e","dit"],l.FileCommand.argParsers.edit],[["ea","rlier"],void 0],[["ec","ho"],void 0],[["echoe","rr"],void 0],[["echoh","l"],void 0],[["echom","sg"],void 0],[["echon",""],void 0],[["el","se"],void 0],[["elsei","f"],void 0],[["em","enu"],void 0],[["en","dif"],void 0],[["endf","unction"],void 0],[["endfo","r"],void 0],[["endt","ry"],void 0],[["endw","hile"],void 0],[["ene","w"],l.FileCommand.argParsers.enew],[["ev","al"],void 0],[["ex",""],l.FileCommand.argParsers.edit],[["exe","cute"],void 0],[["exi","t"],O.WriteQuitCommand.argParser],[["exu","sage"],void 0],[["f","ile"],h.FileInfoCommand.argParser],[["files",""],void 0],[["filet","ype"],void 0],[["filt","er"],void 0],[["fin","d"],void 0],[["fina","lly"],void 0],[["fini","sh"],void 0],[["fir","st"],void 0],[["fo","ld"],void 0],[["foldc","lose"],void 0],[["foldd","oopen"],void 0],[["folddoc","losed"],void 0],[["foldo","pen"],void 0],[["for",""],void 0],[["fu","nction"],void 0],[["g","lobal"],void 0],[["go","to"],m.GotoCommand.argParser],[["gr","ep"],void 0],[["grepa","dd"],void 0],[["gu","i"],void 0],[["gv","im"],void 0],[["h","elp"],void 0],[["ha","rdcopy"],void 0],[["helpc","lose"],void 0],[["helpg","rep"],void 0],[["helpt","ags"],void 0],[["hi","ghlight"],void 0],[["hid","e"],void 0],[["his","tory"],g.HistoryCommand.argParser],[["i","nsert"],void 0],[["ia","bbrev"],void 0],[["iabc","lear"],void 0],[["if",""],void 0],[["ij","ump"],void 0],[["il","ist"],void 0],[["im","ap"],void 0],[["imapc","lear"],void 0],[["ime","nu"],void 0],[["ino","remap"],void 0],[["inorea","bbrev"],void 0],[["inoreme","nu"],void 0],[["int","ro"],void 0],[["is","earch"],void 0],[["isp","lit"],void 0],[["iu","nmap"],void 0],[["iuna","bbrev"],void 0],[["iunme","nu"],void 0],[["j","oin"],void 0],[["ju","mps"],(0,n.succeed)(new f.JumpsCommand)],[["k",""],void 0],[["kee","pmarks"],void 0],[["keepa","lt"],void 0],[["keepj","umps"],void 0],[["keepp","atterns"],void 0],[["l","ist"],S.PrintCommand.argParser({printNumbers:!1,printText:!0})],[["lN","ext"],void 0],[["lNf","ile"],void 0],[["la","st"],void 0],[["lab","ove"],void 0],[["lad","dexpr"],void 0],[["laddb","uffer"],void 0],[["laddf","ile"],void 0],[["laf","ter"],void 0],[["lan","guage"],void 0],[["lat","er"],void 0],[["lb","uffer"],void 0],[["lbef","ore"],void 0],[["lbel","ow"],void 0],[["lbo","ttom"],void 0],[["lc","d"],void 0],[["lch","dir"],void 0],[["lcl","ose"],void 0],[["lcs","cope"],void 0],[["ld","o"],void 0],[["le","ft"],v.LeftCommand.argParser],[["lefta","bove"],void 0],[["let",""],void 0],[["lex","pr"],void 0],[["lf","ile"],void 0],[["lfd","o"],void 0],[["lfir","st"],void 0],[["lg","etfile"],void 0],[["lgetb","uffer"],void 0],[["lgete","xpr"],void 0],[["lgr","ep"],void 0],[["lgrepa","dd"],void 0],[["lh","elpgrep"],void 0],[["lhi","story"],void 0],[["ll",""],void 0],[["lla","st"],void 0],[["lli","st"],void 0],[["lm","ap"],void 0],[["lmak","e"],void 0],[["lmapc","lear"],void 0],[["ln","oremap"],void 0],[["lne","xt"],void 0],[["lnew","er"],void 0],[["lnf","ile"],void 0],[["lo","adview"],void 0],[["loadk","eymap"],void 0],[["loc","kmarks"],void 0],[["lockv","ar"],void 0],[["lol","der"],void 0],[["lope","n"],void 0],[["lp","revious"],void 0],[["lpf","ile"],void 0],[["lr","ewind"],void 0],[["ls",""],void 0],[["lt","ag"],void 0],[["lu","nmap"],void 0],[["lua",""],void 0],[["luad","o"],void 0],[["luaf","ile"],void 0],[["lv","imgrep"],void 0],[["lvimgrepa","dd"],void 0],[["lw","indow"],void 0],[["m","ove"],void 0],[["ma","rk"],void 0],[["mak","e"],void 0],[["map",""],void 0],[["mapc","lear"],void 0],[["marks",""],y.MarksCommand.argParser],[["mat","ch"],void 0],[["me","nu"],void 0],[["menut","ranslate"],void 0],[["mes","sages"],void 0],[["mk","exrc"],void 0],[["mks","ession"],void 0],[["mksp","ell"],void 0],[["mkv","imrc"],void 0],[["mkvie","w"],void 0],[["mod","e"],void 0],[["n","ext"],void 0],[["new",""],l.FileCommand.argParsers.new],[["nm","ap"],void 0],[["nmapc","lear"],void 0],[["nme","nu"],void 0],[["nn","oremap"],void 0],[["nnoreme","nu"],void 0],[["no","remap"],void 0],[["noa","utocmd"],void 0],[["noh","lsearch"],(0,n.succeed)(new w.NohlCommand)],[["norea","bbrev"],void 0],[["noreme","nu"],void 0],[["norm","al"],void 0],[["nos","wapfile"],void 0],[["nu","mber"],S.PrintCommand.argParser({printNumbers:!0,printText:!0})],[["nun","map"],void 0],[["nunme","nu"],void 0],[["ol","dfiles"],void 0],[["om","ap"],void 0],[["omapc","lear"],void 0],[["ome","nu"],void 0],[["on","ly"],(0,n.succeed)(new x.OnlyCommand)],[["ono","remap"],void 0],[["onoreme","nu"],void 0],[["opt","ions"],void 0],[["ou","nmap"],void 0],[["ounme","nu"],void 0],[["ow","nsyntax"],void 0],[["p","rint"],S.PrintCommand.argParser({printNumbers:!1,printText:!0})],[["pa","ckadd"],void 0],[["packl","oadall"],void 0],[["pc","lose"],void 0],[["pe","rl"],void 0],[["ped","it"],void 0],[["perld","o"],void 0],[["perlf","ile"],void 0],[["po","p"],void 0],[["popu","p"],void 0],[["pp","op"],void 0],[["pre","serve"],void 0],[["prev","ious"],void 0],[["prof","ile"],void 0],[["profd","el"],void 0],[["ps","earch"],void 0],[["pt","ag"],void 0],[["ptN","ext"],void 0],[["ptf","irst"],void 0],[["ptj","ump"],void 0],[["ptl","ast"],void 0],[["ptn","ext"],void 0],[["ptp","revious"],void 0],[["ptr","ewind"],void 0],[["pts","elect"],void 0],[["pu","t"],C.PutExCommand.argParser],[["pw","d"],void 0],[["py","thon"],void 0],[["py3",""],void 0],[["py3d","o"],void 0],[["py3f","ile"],void 0],[["pyd","o"],void 0],[["pyf","ile"],void 0],[["python3",""],void 0],[["pythonx",""],void 0],[["pyx",""],void 0],[["pyxd","o"],void 0],[["pyxf","ile"],void 0],[["q","uit"],M.QuitCommand.argParser(!1)],[["qa","ll"],M.QuitCommand.argParser(!0)],[["quita","ll"],M.QuitCommand.argParser(!0)],[["r","ead"],b.ReadCommand.argParser],[["rec","over"],void 0],[["red","o"],void 0],[["redi","r"],void 0],[["redr","aw"],void 0],[["redraws","tatus"],void 0],[["redrawt","abline"],void 0],[["reg","isters"],k.RegisterCommand.argParser],[["res","ize"],void 0],[["ret","ab"],void 0],[["retu","rn"],void 0],[["rew","ind"],void 0],[["ri","ght"],v.RightCommand.argParser],[["rightb","elow"],void 0],[["rsh","ada"],void 0],[["ru","ntime"],void 0],[["rub","y"],void 0],[["rubyd","o"],void 0],[["rubyf","ile"],void 0],[["rund","o"],void 0],[["s","ubstitute"],A.SubstituteCommand.argParser],[["sN","ext"],void 0],[["sa","rgument"],void 0],[["sal","l"],void 0],[["san","dbox"],void 0],[["sav","eas"],void 0],[["sb","uffer"],void 0],[["sbN","ext"],void 0],[["sba","ll"],void 0],[["sbf","irst"],void 0],[["sbl","ast"],void 0],[["sbm","odified"],void 0],[["sbn","ext"],void 0],[["sbp","revious"],void 0],[["sbr","ewind"],void 0],[["scr","iptnames"],void 0],[["scripte","ncoding"],void 0],[["scs","cope"],void 0],[["se","t"],R.SetCommand.argParser],[["setf","iletype"],void 0],[["setg","lobal"],void 0],[["setl","ocal"],void 0],[["sf","ind"],void 0],[["sfir","st"],void 0],[["sh","ell"],(0,n.succeed)(new P.ShCommand)],[["sig","n"],void 0],[["sil","ent"],void 0],[["sl","eep"],void 0],[["sla","st"],void 0],[["sm","agic"],void 0],[["smap",""],void 0],[["smapc","lear"],void 0],[["sme","nu"],void 0],[["smile",""],(0,n.succeed)(new _.SmileCommand)],[["sn","ext"],void 0],[["sno","magic"],void 0],[["snor","emap"],void 0],[["snoreme","nu"],void 0],[["so","urce"],void 0],[["sor","t"],E.SortCommand.argParser],[["sp","lit"],l.FileCommand.argParsers.split],[["spe","llgood"],void 0],[["spelld","ump"],void 0],[["spelli","nfo"],void 0],[["spellr","epall"],void 0],[["spellra","re"],void 0],[["spellu","ndo"],void 0],[["spellw","rong"],void 0],[["spr","evious"],void 0],[["sre","wind"],void 0],[["st","op"],void 0],[["sta","g"],void 0],[["star","tinsert"],void 0],[["startg","replace"],void 0],[["startr","eplace"],void 0],[["stj","ump"],void 0],[["stopi","nsert"],void 0],[["sts","elect"],void 0],[["sun","hide"],void 0],[["sunm","ap"],void 0],[["sunme","nu"],void 0],[["sus","pend"],void 0],[["sv","iew"],void 0],[["sw","apname"],void 0],[["sy","ntax"],void 0],[["sync","bind"],void 0],[["synti","me"],void 0],[["t",""],c.CopyCommand.argParser],[["tN","ext"],void 0],[["ta","g"],void 0],[["tab",""],void 0],[["tabN","ext"],T.TabCommand.argParsers.bprev],[["tabc","lose"],T.TabCommand.argParsers.tabclose],[["tabdo",""],void 0],[["tabe","dit"],T.TabCommand.argParsers.tabnew],[["tabf","ind"],void 0],[["tabfir","st"],T.TabCommand.argParsers.bfirst],[["tabl","ast"],T.TabCommand.argParsers.blast],[["tabm","ove"],T.TabCommand.argParsers.tabmove],[["tabn","ext"],T.TabCommand.argParsers.bnext],[["tabnew",""],T.TabCommand.argParsers.tabnew],[["tabo","nly"],T.TabCommand.argParsers.tabonly],[["tabp","revious"],T.TabCommand.argParsers.bprev],[["tabr","ewind"],void 0],[["tabs",""],void 0],[["tags",""],void 0],[["tc","d"],void 0],[["tch","dir"],void 0],[["te","rminal"],L.TerminalCommand.argParser],[["tf","irst"],void 0],[["th","row"],void 0],[["tj","ump"],void 0],[["tl","ast"],void 0],[["tm","enu"],void 0],[["tma","p"],void 0],[["tmapc","lear"],void 0],[["tn","ext"],void 0],[["tno","remap"],void 0],[["to","pleft"],void 0],[["tp","revious"],void 0],[["tr","ewind"],void 0],[["try",""],void 0],[["ts","elect"],void 0],[["tu","nmenu"],void 0],[["tunma","p"],void 0],[["u","ndo"],$.UndoCommand.argParser],[["una","bbreviate"],void 0],[["undoj","oin"],void 0],[["undol","ist"],void 0],[["unh","ide"],void 0],[["unl","et"],void 0],[["unlo","ckvar"],void 0],[["unm","ap"],void 0],[["unme","nu"],void 0],[["uns","ilent"],void 0],[["up","date"],N.WriteCommand.argParser],[["v","global"],void 0],[["ve","rsion"],void 0],[["verb","ose"],void 0],[["vert","ical"],void 0],[["vi","sual"],void 0],[["vie","w"],void 0],[["vim","grep"],void 0],[["vimgrepa","dd"],void 0],[["viu","sage"],void 0],[["vm","ap"],void 0],[["vmapc","lear"],void 0],[["vme","nu"],void 0],[["vn","oremap"],void 0],[["vne","w"],l.FileCommand.argParsers.vnew],[["vnoreme","nu"],void 0],[["vs","plit"],l.FileCommand.argParsers.vsplit],[["vsc","ode"],B.VsCodeCommand.argParser],[["vu","nmap"],void 0],[["vunme","nu"],void 0],[["w","rite"],N.WriteCommand.argParser],[["wN","ext"],void 0],[["wa","ll"],I.WallCommand.argParser],[["wh","ile"],void 0],[["wi","nsize"],void 0],[["winc","md"],void 0],[["windo",""],void 0],[["winp","os"],void 0],[["wn","ext"],void 0],[["wp","revious"],void 0],[["wq",""],O.WriteQuitCommand.argParser],[["wqa","ll"],V.WriteQuitAllCommand.argParser],[["wsh","ada"],void 0],[["wu","ndo"],void 0],[["x","it"],O.WriteQuitCommand.argParser],[["xa","ll"],V.WriteQuitAllCommand.argParser],[["xm","ap"],void 0],[["xmapc","lear"],void 0],[["xme","nu"],void 0],[["xn","oremap"],void 0],[["xnoreme","nu"],void 0],[["xu","nmap"],void 0],[["xunme","nu"],void 0],[["y","ank"],D.YankCommand.argParser],[["z",""],void 0],[["~",""],void 0]];class H extends W.ExCommand{constructor(e){super(),this.name=e}neovimCapable(){return!0}async execute(e){j.StatusBar.setText(e,`Command :${this.name} is not yet implemented (PRs are welcome!)`,!0)}async executeWithRange(e,t){await this.execute(e)}}t.commandNameParser=(0,n.alt)(...[...t.builtinExCommands].reverse().map((([e,t])=>function(e,t){null!=t||(t=n.all.result(new H(e[1]?`${e[0]}[${e[1]}]`:e[0])));const r=e[0]+e[1],o=(0,K.nameAbbrevParser)(e[0],e[1]).result(t);return""===r||/[a-z]$/i.test(r)?o.notFollowedBy((0,n.regexp)(/[a-z]/i)):o}(e,null==t?void 0:t.skip(n.optWhitespace))))),t.exCommandParser=n.optWhitespace.then((0,n.string)(":").skip(n.optWhitespace).many()).then((0,n.seq)(U.LineRange.parser.fallback(void 0),n.optWhitespace,t.commandNameParser.fallback(void 0),n.all)).map((([e,t,r,o])=>{var i;if(void 0===r)throw F.VimError.fromCode(F.ErrorCode.NotAnEditorCommand,`${null!==(i=null==e?void 0:e.toString())&&void 0!==i?i:""}${t}${o}`);const s=(0,n.seq)(r,n.optWhitespace.then(n.all)).parse(o);if(!1===s.status||s.value[1])throw F.VimError.fromCode(F.ErrorCode.TrailingCharacters);return{lineRange:e,command:s.value[0]}}))},"./src/vimscript/lineRange.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineRange=t.Address=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),o=r("vscode"),i=r("./src/error.ts"),s=r("./src/state/globalState.ts"),a=r("./src/state/searchState.ts"),c=r("./src/vimscript/parserUtils.ts"),u=r("./src/vimscript/pattern.ts"),d=(0,n.alt)(c.numberParser.map((e=>({type:"number",num:e}))),(0,n.string)(".").result({type:"current_line"}),(0,n.string)("$").result({type:"last_line"}),(0,n.string)("%").result({type:"entire_file"}),(0,n.string)("*").result({type:"last_visual_range"}),(0,n.string)("'").then(n.any).map((e=>({type:"mark",mark:e}))),(0,n.string)("/").then(u.Pattern.parser({direction:u.SearchDirection.Forward})).map((e=>({type:"pattern_next",pattern:e}))),(0,n.string)("?").then(u.Pattern.parser({direction:u.SearchDirection.Backward})).map((e=>({type:"pattern_prev",pattern:e}))),(0,n.string)("\\/").result({type:"last_search_pattern_next"}),(0,n.string)("\\?").result({type:"last_search_pattern_prev"}),(0,n.string)("\\&").result({type:"last_substitute_pattern_next"})),l=(0,n.alt)((0,n.string)("+").then(c.numberParser.fallback(1)),(0,n.string)("-").then(c.numberParser.fallback(1)).map((e=>-e)),c.numberParser).skip(n.optWhitespace).atLeast(1).map((e=>e.reduce(((e,t)=>e+t),0)));class h{constructor(e,t){this.specifier=e,this.offset=null!=t?t:0}resolve(e,t,r=!0){const n=(()=>{var n,o;switch(this.specifier.type){case"number":return r?this.specifier.num?this.specifier.num-1:0:this.specifier.num-1;case"current_line":return e.cursorStopPosition.line;case"last_line":case"entire_file":return e.document.lineCount-1;case"last_visual_range":const c="left"===t?null===(n=e.lastVisualSelection)||void 0===n?void 0:n.start.line:null===(o=e.lastVisualSelection)||void 0===o?void 0:o.end.line;if(void 0===c)throw i.VimError.fromCode(i.ErrorCode.MarkNotSet);return c;case"mark":const d=e.historyTracker.getMark(this.specifier.mark);if(!d||d.document&&d.document!==e.document)throw i.VimError.fromCode(i.ErrorCode.MarkNotSet);return d.position.line;case"pattern_next":const l=this.specifier.pattern.nextMatch(e.document,e.cursorStopPosition);if(void 0===l)throw i.VimError.fromCode(i.ErrorCode.PatternNotFound,this.specifier.pattern.patternString);return l.start.line;case"pattern_prev":throw new Error("Using a backward pattern in a line range is not yet supported");case"last_search_pattern_next":if(!s.globalState.searchState)throw i.VimError.fromCode(i.ErrorCode.NoPreviousRegularExpression);const h=s.globalState.searchState.getNextSearchMatchPosition(e,e.cursorStopPosition,u.SearchDirection.Forward);if(void 0===h)throw i.VimError.fromCode(i.ErrorCode.PatternNotFound,s.globalState.searchState.searchString);return h.pos.line;case"last_search_pattern_prev":if(!s.globalState.searchState)throw i.VimError.fromCode(i.ErrorCode.NoPreviousRegularExpression);const m=s.globalState.searchState.getNextSearchMatchPosition(e,e.cursorStopPosition,u.SearchDirection.Backward);if(void 0===m)throw i.VimError.fromCode(i.ErrorCode.PatternNotFound,s.globalState.searchState.searchString);return m.pos.line;case"last_substitute_pattern_next":if(!s.globalState.substituteState)throw i.VimError.fromCode(i.ErrorCode.NoPreviousSubstituteRegularExpression);const p=s.globalState.substituteState.searchPattern?new a.SearchState(u.SearchDirection.Forward,e.cursorStopPosition,s.globalState.substituteState.searchPattern.patternString,{}):void 0,g=null==p?void 0:p.getNextSearchMatchPosition(e,e.cursorStopPosition);if(void 0===g)throw i.VimError.fromCode(i.ErrorCode.PatternNotFound,null==p?void 0:p.searchString);return g.pos.line;default:throw this.specifier,new Error("Got unexpected LineSpecifier.type")}})()+this.offset;if(r&&(n<0||n>e.document.lineCount))throw i.VimError.fromCode(i.ErrorCode.InvalidRange);return n}toString(){switch(this.specifier.type){case"number":return this.specifier.num.toString();case"current_line":return".";case"last_line":return"$";case"entire_file":return"%";case"last_visual_range":return"*";case"mark":return`'${this.specifier.mark}`;case"pattern_next":return`/${this.specifier.pattern}/`;case"pattern_prev":return`?${this.specifier.pattern}?`;case"last_search_pattern_next":return"\\/";case"last_search_pattern_prev":return"\\?";case"last_substitute_pattern_next":return"\\&";default:throw this.specifier,new Error("Got unexpected LineSpecifier.type")}}}t.Address=h,h.parser=(0,n.alt)((0,n.seq)(d.skip(n.optWhitespace),l.fallback(0)),(0,n.seq)((0,n.succeed)({type:"current_line"}),l)).map((([e,t])=>new h(e,t)));class m{constructor(e,t,r){this.start=e,this.end=r,this.separator=t}resolve(e){var t;const r=null!==(t=this.end)&&void 0!==t?t:this.start;if("entire_file"===r.specifier.type)return{start:0,end:e.document.lineCount-1};if("last_visual_range"===r.specifier.type){if(void 0===e.lastVisualSelection)throw i.VimError.fromCode(i.ErrorCode.MarkNotSet);return{start:e.lastVisualSelection.start.line,end:e.lastVisualSelection.end.line}}const n=this.start.resolve(e,"left");return";"===this.separator&&(e.cursorStartPosition=e.cursorStopPosition=new o.Position(n,0)),n>r.resolve(e,"right")?{start:r.resolve(e,"left"),end:this.start.resolve(e,"right")}:{start:n,end:r.resolve(e,"right")}}resolveToRange(e){const{start:t,end:r}=this.resolve(e);return new o.Range(new o.Position(t,0),new o.Position(r,0).getLineEnd())}toString(){var e,t,r;return`${this.start.toString()}${null!==(e=this.separator)&&void 0!==e?e:""}${null!==(r=null===(t=this.end)||void 0===t?void 0:t.toString())&&void 0!==r?r:""}`}}t.LineRange=m,m.parser=(0,n.seq)(h.parser.skip(n.optWhitespace),(0,n.seq)((0,n.alt)((0,n.string)(","),(0,n.string)(";")).skip(n.optWhitespace),h.parser.fallback(void 0)).fallback(void 0)).map((([e,t])=>{if(t){const[r,n]=t;return new m(e,r,n)}return new m(e)}))},"./src/vimscript/parserUtils.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileCmdParser=t.fileOptParser=t.nameAbbrevParser=t.bangParser=t.numberParser=void 0;const n=r("./node_modules/parsimmon/build/parsimmon.umd.min.js");t.numberParser=(0,n.regexp)(/\d+/).map((e=>Number.parseInt(e,10))),t.bangParser=(0,n.string)("!").fallback(void 0).map((e=>void 0!==e)),t.nameAbbrevParser=function(e,t){const r=[...Array(t.length+1).keys()].reverse().map((r=>e+t.substring(0,r)));return(0,n.alt)(...r.map(n.string))},t.fileOptParser=(0,n.string)("++").then((0,n.seq)((0,n.alt)((0,n.alt)((0,n.string)("ff"),(0,n.string)("fileformat")).result("ff"),(0,n.alt)((0,n.string)("enc"),(0,n.string)("encoding")).result("enc"),(0,n.alt)((0,n.string)("bin"),(0,n.string)("binary")).result("bin"),(0,n.alt)((0,n.string)("nobin"),(0,n.string)("nobinary")).result("nobin"),(0,n.string)("bad"),(0,n.string)("edit")),(0,n.string)("=").then((0,n.regexp)(/\S+/)).fallback(void 0))).sepBy(n.whitespace).desc("[++opt]"),t.fileCmdParser=(0,n.string)("+").then((0,n.alt)(t.numberParser.map((e=>({type:"line_number",line:e}))),(0,n.succeed)({type:"last_line"}))).fallback(void 0).desc("[+cmd]")},"./src/vimscript/pattern.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOffset=t.Pattern=t.SearchDirection=t.searchStringParser=void 0;const n=r("./node_modules/lodash/lodash.js"),o=r("./node_modules/parsimmon/build/parsimmon.umd.min.js"),i=r("vscode"),s=r("./src/configuration/configuration.ts"),a=r("./src/vimscript/parserUtils.ts");function c(e){return(0,o.seq)(d.parser(e),(0,o.lazy)((()=>h.parser.fallback(void 0)))).map((([e,t])=>({pattern:e,offset:t})))}var u;t.searchStringParser=c,function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(u=t.SearchDirection||(t.SearchDirection={}));class d{constructor(e,t,r,n=!1,o=!1){this.patternString=e,this.direction=t,this.regex=r,this.inSelection=n,this.closed=o}nextMatch(e,t){const r=e.getText();this.regex.lastIndex=e.offsetAt(t)+1;const n=this.regex.exec(r);return n?new i.Range(e.positionAt(n.index),e.positionAt(n.index+n.length)):void 0}allMatches(e,t){let r,n,o,s,a;if("lineRange"in t?(n=t.lineRange.resolve(e),r=new i.Position(n.start,0)):r=t.fromPosition,this.inSelection&&e.lastVisualSelection){const t=new i.Range(e.lastVisualSelection.start,e.lastVisualSelection.end);o=e.document.getText(t),s=e.document.offsetAt(e.lastVisualSelection.start),a=t.contains(r)?e.document.offsetAt(r)-s:0}else o=e.document.getText(),s=0,a=e.document.offsetAt(r)-s;this.regex.lastIndex=a;const c={beforeWrapping:[],afterWrapping:[]};let u=!1;for(;;){const t=this.regex.exec(o);if(t){if(u&&t.index>=a)break;const r=new i.Range(e.document.positionAt(s+t.index),e.document.positionAt(s+t.index+t[0].length));if(!this.inSelection&&n&&(r.start.line<n.start||r.end.line>n.end))break;if((u?c.afterWrapping:c.beforeWrapping).push({range:r,groups:t}),c.beforeWrapping.length+c.afterWrapping.length>=d.MAX_SEARCH_RANGES)break;r.start.isEqual(r.end)&&this.regex.lastIndex++}else{if(u)break;this.regex.lastIndex=0,u=!0}}return c.afterWrapping.concat(c.beforeWrapping)}static compileRegex(e,t){const r=(null!=t?t:s.configuration.ignorecase)?"gim":"gm";try{return new RegExp(e,r)}catch(t){return new RegExp(e.replace(d.SPECIAL_CHARS_REGEX,"\\$&"),r)}}static fromLiteralString(e,t,r){const o=e.replace((0,n.escapeRegExp)(e),"\\$&");return new d(r?`\\<${o}\\>`:o,t,d.compileRegex(o))}static parser(e){const t=e.delimiter?e.delimiter:e.direction===u.Forward?"/":"?";return(0,o.seqMap)((0,o.alt)((0,o.string)("\\%V").map((e=>({inSelection:!0}))),(0,o.string)("$").map((()=>"(?:$(?<!\\r))")),(0,o.string)("^").map((()=>"(?:^(?<!\\r))")),(0,o.string)("\\").then(o.any.fallback(void 0)).map((e=>void 0===e?"\\\\":e===t?t:"c"===e?{ignorecase:!0}:"C"===e?{ignorecase:!1}:"<"===e||">"===e?"\\b":"n"===e?"\\r?\\n":"\\"+e)),(0,o.alt)((0,o.string)("\\").then(o.any.fallback(void 0)).map((e=>"\\"+(null!=e?e:"\\"))),(0,o.noneOf)("]")).many().wrap((0,o.string)("["),(0,o.string)("]")).map((e=>"["+e.join("")+"]")),(0,o.noneOf)(t)).many(),(0,o.string)(t).fallback(void 0),((e,t)=>{let r,n,o="";for(const t of e)"string"==typeof t?o+=t:t.ignorecase?r=!0:t.inSelection?n=t.inSelection:void 0===r&&(r=!1);return{patternString:o,caseOverride:r,inSelection:n,closed:void 0!==t}})).map((({patternString:t,caseOverride:r,inSelection:n,closed:o})=>{var i;const s=d.getIgnoreCase(t,{caseOverride:r,ignoreSmartcase:null!==(i=e.ignoreSmartcase)&&void 0!==i&&i});return new d(t,e.direction,d.compileRegex(t,s),n,o)}))}static getIgnoreCase(e,t){return void 0!==t.caseOverride?t.caseOverride:!(s.configuration.smartcase&&!t.ignoreSmartcase&&/[A-Z]/.test(e))&&s.configuration.ignorecase}}t.Pattern=d,d.MAX_SEARCH_RANGES=1e3,d.SPECIAL_CHARS_REGEX=/[\-\[\]{}()*+?.,\\\^$|#\s]/g;const l=(0,o.oneOf)("esb").fallback(void 0).map((e=>void 0===e?"lines":"e"===e?"chars_from_end":"chars_from_start"));class h{constructor(e){this.data=e}apply(e){switch(this.data.type){case"lines":return 0===this.data.delta?e.start:new i.Position(e.end.line+this.data.delta,0);case"chars_from_start":return e.start.getOffsetThroughLineBreaks(this.data.delta);case"chars_from_end":return e.end.getOffsetThroughLineBreaks(this.data.delta-1);case"pattern":default:throw this.data,new Error("Unexpected SearchOffset type")}}}t.SearchOffset=h,h.parser=(0,o.alt)((0,o.seq)(l,(0,o.oneOf)("+-").fallback("+"),a.numberParser).map((([e,t,r])=>new h({type:e,delta:"-"===t?-r:r}))),(0,o.seq)(l,(0,o.oneOf)("+-")).map((([e,t])=>new h({type:e,delta:"-"===t?-1:1}))),(0,o.seq)(l).map((([e])=>new h({type:e,delta:0}))),(0,o.string)(";/").then(c({direction:u.Forward})).map((({pattern:e,offset:t})=>new h({type:"pattern",direction:u.Forward,pattern:e,offset:t}))),(0,o.string)(";?").then(c({direction:u.Backward})).map((({pattern:e,offset:t})=>new h({type:"pattern",direction:u.Backward,pattern:e,offset:t}))))},"./node_modules/untildify/index.js":(e,t,r)=>{"use strict";const n=r("./node_modules/os-browserify/browser.js").homedir();e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string, got "+typeof e);return n?e.replace(/^~(?=$|\/|\\)/,n):e}},vscode:e=>{"use strict";e.exports=require("vscode")},"./package.json":e=>{"use strict";e.exports=JSON.parse('{"name":"vim","displayName":"Vim","description":"Vim emulation for Visual Studio Code","icon":"images/icon.png","version":"1.22.2","publisher":"vscodevim","galleryBanner":{"color":"#e3f4ff","theme":"light"},"license":"MIT","keywords":["vim","vi","vscodevim"],"repository":{"type":"git","url":"https://github.com/VSCodeVim/Vim.git"},"homepage":"https://github.com/VSCodeVim/Vim","bugs":{"url":"https://github.com/VSCodeVim/Vim/issues"},"engines":{"vscode":"^1.57.0"},"categories":["Other","Keymaps"],"extensionKind":["ui"],"sideEffects":false,"activationEvents":["*","onCommand:type"],"qna":"https://vscodevim.herokuapp.com/","main":"./out/extension","browser":"./out/extensionWeb","capabilities":{"untrustedWorkspaces":{"supported":true},"virtualWorkspaces":true},"contributes":{"commands":[{"command":"toggleVim","title":"Vim: Toggle Vim Mode"},{"command":"vim.showQuickpickCmdLine","title":"Vim: Show Command Line"},{"command":"vim.editVimrc","enablement":"!isWeb","title":"Vim: Edit .vimrc"}],"keybindings":[{"key":"Escape","command":"extension.vim_escape","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"Escape","command":"notebook.cell.quitEdit","when":"inputFocus && notebookEditorFocused && !editorHasSelection && !editorHoverVisible && vim.active && vim.mode == \'Normal\'"},{"key":"Home","command":"extension.vim_home","when":"editorTextFocus && vim.active && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"ctrl+home","command":"extension.vim_ctrl+home","when":"editorTextFocus && vim.active && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"End","command":"extension.vim_end","when":"editorTextFocus && vim.active && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"ctrl+end","command":"extension.vim_ctrl+end","when":"editorTextFocus && vim.active && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"Insert","command":"extension.vim_insert","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"Backspace","command":"extension.vim_backspace","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"Delete","command":"extension.vim_delete","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"tab","command":"extension.vim_tab","when":"editorFocus && vim.active && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"shift+tab","command":"extension.vim_shift+tab","when":"editorFocus && vim.active && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"left","command":"extension.vim_left","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"right","command":"extension.vim_right","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"up","command":"extension.vim_up","when":"editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetVisible && !parameterHintsVisible"},{"key":"down","command":"extension.vim_down","when":"editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetVisible && !parameterHintsVisible"},{"key":"g g","command":"list.focusFirst","when":"listFocus && !inputFocus"},{"key":"h","command":"list.collapse","when":"listFocus && !inputFocus"},{"key":"j","command":"list.focusDown","when":"listFocus && !inputFocus"},{"key":"k","command":"list.focusUp","when":"listFocus && !inputFocus"},{"key":"l","command":"list.select","when":"listFocus && !inputFocus"},{"key":"o","command":"list.toggleExpand","when":"listFocus && !inputFocus"},{"key":"/","command":"list.toggleKeyboardNavigation","when":"listFocus && !inputFocus && listSupportsKeyboardNavigation"},{"key":"ctrl+a","command":"extension.vim_ctrl+a","when":"editorTextFocus && vim.active && vim.use<C-a> && !inDebugRepl"},{"key":"ctrl+b","command":"extension.vim_ctrl+b","when":"editorTextFocus && vim.active && vim.use<C-b> && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"ctrl+c","command":"extension.vim_ctrl+c","when":"editorTextFocus && vim.active && vim.use<C-c> && !inDebugRepl && vim.overrideCtrlC"},{"key":"ctrl+d","command":"extension.vim_ctrl+d","when":"editorTextFocus && vim.active && vim.use<C-d> && !inDebugRepl"},{"key":"ctrl+d","command":"list.focusPageDown","when":"listFocus && !inputFocus"},{"key":"ctrl+e","command":"extension.vim_ctrl+e","when":"editorTextFocus && vim.active && vim.use<C-e> && !inDebugRepl"},{"key":"ctrl+f","command":"extension.vim_ctrl+f","when":"editorTextFocus && vim.active && vim.use<C-f> && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"ctrl+g","command":"extension.vim_ctrl+g","when":"editorTextFocus && vim.active && vim.use<C-g> && !inDebugRepl"},{"key":"ctrl+h","command":"extension.vim_ctrl+h","when":"editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"},{"key":"ctrl+i","command":"extension.vim_ctrl+i","when":"editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl"},{"key":"ctrl+j","command":"extension.vim_ctrl+j","when":"editorTextFocus && vim.active && vim.use<C-j> && !inDebugRepl"},{"key":"ctrl+k","command":"extension.vim_ctrl+k","when":"editorTextFocus && vim.active && vim.use<C-k> && !inDebugRepl"},{"key":"ctrl+l","command":"extension.vim_navigateCtrlL","when":"editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"},{"key":"ctrl+m","command":"extension.vim_ctrl+m","when":"editorTextFocus && vim.active && vim.use<C-m> && !inDebugRepl || vim.mode == \'CommandlineInProgress\' && vim.active && vim.use<C-m> && !inDebugRepl || vim.mode == \'SearchInProgressMode\' && vim.active && vim.use<C-m> && !inDebugRepl"},{"key":"ctrl+n","command":"extension.vim_ctrl+n","when":"editorTextFocus && vim.active && vim.use<C-n> && !inDebugRepl || vim.mode == \'CommandlineInProgress\' && vim.active && vim.use<C-n> && !inDebugRepl || vim.mode == \'SearchInProgressMode\' && vim.active && vim.use<C-n> && !inDebugRepl"},{"key":"ctrl+o","command":"extension.vim_ctrl+o","when":"editorTextFocus && vim.active && vim.use<C-o> && !inDebugRepl"},{"key":"ctrl+p","command":"extension.vim_ctrl+p","when":"suggestWidgetVisible && vim.active && vim.use<C-p> && !inDebugRepl || vim.mode == \'CommandlineInProgress\' && vim.active && vim.use<C-p> && !inDebugRepl || vim.mode == \'SearchInProgressMode\' && vim.active && vim.use<C-p> && !inDebugRepl"},{"key":"ctrl+q","command":"extension.vim_winCtrlQ","when":"editorTextFocus && vim.active && vim.use<C-q> && !inDebugRepl"},{"key":"ctrl+r","command":"extension.vim_ctrl+r","when":"editorTextFocus && vim.active && vim.use<C-r> && !inDebugRepl"},{"key":"ctrl+t","command":"extension.vim_ctrl+t","when":"editorTextFocus && vim.active && vim.use<C-t> && !inDebugRepl"},{"key":"ctrl+u","command":"extension.vim_ctrl+u","when":"editorTextFocus && vim.active && vim.use<C-u> && !inDebugRepl"},{"key":"ctrl+u","command":"list.focusPageUp","when":"listFocus && !inputFocus"},{"key":"ctrl+v","command":"extension.vim_ctrl+v","when":"editorTextFocus && vim.active && vim.use<C-v> && !inDebugRepl"},{"key":"ctrl+w","command":"extension.vim_ctrl+w","when":"editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"},{"key":"ctrl+x","command":"extension.vim_ctrl+x","when":"editorTextFocus && vim.active && vim.use<C-x> && !inDebugRepl"},{"key":"ctrl+y","command":"extension.vim_ctrl+y","when":"editorTextFocus && vim.active && vim.use<C-y> && !inDebugRepl"},{"key":"ctrl+6","command":"extension.vim_ctrl+6","when":"editorTextFocus && vim.active && vim.use<C-6> && !inDebugRepl"},{"key":"ctrl+^","command":"extension.vim_ctrl+^","when":"editorTextFocus && vim.active && vim.use<C-^> && !inDebugRepl"},{"key":"ctrl+[","command":"extension.vim_ctrl+[","when":"editorTextFocus && vim.active && vim.use<C-[> && !inDebugRepl"},{"key":"ctrl+]","command":"extension.vim_ctrl+]","when":"editorTextFocus && vim.active && vim.use<C-]> && !inDebugRepl"},{"key":"ctrl+shift+2","command":"extension.vim_ctrl+shift+2","when":"editorTextFocus && vim.active && vim.use<C-shift+2>"},{"key":"ctrl+up","command":"extension.vim_ctrl+up","when":"editorTextFocus && vim.active && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"ctrl+down","command":"extension.vim_ctrl+down","when":"editorTextFocus && vim.active && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"ctrl+left","command":"extension.vim_ctrl+left","when":"editorTextFocus && vim.active && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"ctrl+right","command":"extension.vim_ctrl+right","when":"editorTextFocus && vim.active && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"ctrl+pagedown","command":"extension.vim_ctrl+pagedown","when":"editorTextFocus && vim.active && vim.use<C-pagedown> && !inDebugRepl"},{"key":"ctrl+pageup","command":"extension.vim_ctrl+pageup","when":"editorTextFocus && vim.active && vim.use<C-pageup> && !inDebugRepl"},{"key":"ctrl+space","command":"extension.vim_ctrl+space","when":"editorTextFocus && vim.active && vim.use<C-space> && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"shift+G","command":"list.focusLast","when":"listFocus && !inputFocus"},{"key":"ctrl+backspace","command":"extension.vim_ctrl+backspace","when":"editorTextFocus && vim.active && vim.use<C-BS> && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"shift+backspace","command":"extension.vim_shift+backspace","when":"editorTextFocus && vim.active && vim.use<S-BS> && vim.mode != \'Insert\' && !inDebugRepl"},{"key":"cmd+left","command":"extension.vim_cmd+left","when":"editorTextFocus && vim.active && vim.use<D-left> && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"cmd+right","command":"extension.vim_cmd+right","when":"editorTextFocus && vim.active && vim.use<D-right> && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"cmd+a","command":"extension.vim_cmd+a","when":"editorTextFocus && vim.active && vim.use<D-a> && !inDebugRepl && vim.mode != \'Insert\'"},{"key":"cmd+c","command":"extension.vim_cmd+c","when":"editorTextFocus && vim.active && vim.use<D-c> && vim.overrideCopy && !inDebugRepl"},{"key":"cmd+d","command":"extension.vim_cmd+d","when":"editorTextFocus && vim.active && vim.use<D-d> && !inDebugRepl"},{"key":"cmd+v","command":"extension.vim_cmd+v","when":"editorTextFocus && vim.active && vim.use<D-v> && vim.mode == \'CommandlineInProgress\' && !inDebugRepl || editorTextFocus && vim.active && vim.use<D-v> && vim.mode == \'SearchInProgressMode\' && !inDebugRepl"},{"key":"ctrl+alt+down","linux":"shift+alt+down","mac":"cmd+alt+down","command":"extension.vim_cmd+alt+down","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"ctrl+alt+up","linux":"shift+alt+up","mac":"cmd+alt+up","command":"extension.vim_cmd+alt+up","when":"editorTextFocus && vim.active && !inDebugRepl"},{"key":"j","command":"notebook.focusNextEditor","when":"vim.mode == \'Normal\' && editorTextFocus && inputFocus && notebookEditorFocused && notebookEditorCursorAtBoundary != \'none\' && notebookEditorCursorAtBoundary != \'top\'"},{"key":"k","command":"notebook.focusPreviousEditor","when":"vim.mode == \'Normal\' && editorTextFocus && inputFocus && notebookEditorFocused && notebookEditorCursorAtBoundary != \'bottom\' && notebookEditorCursorAtBoundary != \'none\'"}],"configuration":{"title":"Vim","type":"object","properties":{"vim.debug.silent":{"type":"boolean","description":"If true, all logs are suppressed.","default":false},"vim.debug.loggingLevelForAlert":{"type":"string","description":"Maximum level of messages to present as VS Code information window.","default":"error","enum":["error","warn","info","verbose","debug"]},"vim.debug.loggingLevelForConsole":{"type":"string","description":"Maximum level of messages to log to console. Logs are visible in developer tools.","default":"error","enum":["error","warn","info","verbose","debug"]},"vim.normalModeKeyBindings":{"type":"array","markdownDescription":"Remapped keys in Normal mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.normalModeKeyBindingsNonRecursive":{"type":"array","markdownDescription":"Non-recursive remapped keys in Normal mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.operatorPendingModeKeyBindings":{"type":"array","markdownDescription":"Remapped keys in OperatorPending mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.operatorPendingModeKeyBindingsNonRecursive":{"type":"array","markdownDescription":"Non-recursive remapped keys in OperatorPending mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.useCtrlKeys":{"type":"boolean","markdownDescription":"Enable some Vim Ctrl key commands that override otherwise common operations, like `Ctrl+C`.","default":true},"vim.leader":{"type":"string","markdownDescription":"What key should `<leader>` map to in remappings?","default":"\\\\"},"vim.searchHighlightColor":{"type":"string","markdownDescription":"Background color of non-current search matches. The color must not be opaque so as not to hide underlying decorations. Uses `#editor.findMatchHighlightColor#` from current theme if undefined."},"vim.searchHighlightTextColor":{"type":"string","markdownDescription":"Foreground color of non-current search matches."},"vim.searchMatchColor":{"type":"string","markdownDescription":"Background color of the current match. Uses `#editor.findMatchColor#` from current theme if undefined."},"vim.searchMatchTextColor":{"type":"string","markdownDescription":"Foreground color of the current match."},"vim.substitutionColor":{"type":"string","markdownDescription":"Background color of substituted text when `#editor.inccommand#` is enabled. Uses `#editor.findMatchColor#` from current theme if undefined."},"vim.substitutionTextColor":{"type":"string","markdownDescription":"Foreground color of substituted text when `#editor.inccommand#` is enabled."},"vim.highlightedyank.enable":{"type":"boolean","description":"Enable highlighting when yanking.","default":false},"vim.highlightedyank.color":{"type":"string","description":"Background color of yanked text. The color must not be opaque so as not to hide underlying decorations.","default":"rgba(250, 240, 170, 0.5)"},"vim.highlightedyank.textColor":{"type":"string","description":"Foreground color of yanked text."},"vim.highlightedyank.duration":{"type":"number","description":"Duration in milliseconds of the yank highlight.","default":200,"minimum":1},"vim.useSystemClipboard":{"type":"boolean","description":"Use system clipboard for unnamed register.","default":false},"vim.overrideCopy":{"type":"boolean","description":"Override VS Code\'s copy command with our own copy command, which works better with VSCodeVim. Turn this off if copying is not working.","default":true},"vim.insertModeKeyBindings":{"type":"array","markdownDescription":"Remapped keys in Insert mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.insertModeKeyBindingsNonRecursive":{"type":"array","markdownDescription":"Non-recursive keybinding overrides to use for Insert mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.visualModeKeyBindings":{"type":"array","markdownDescription":"Remapped keys in Visual mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.visualModeKeyBindingsNonRecursive":{"type":"array","markdownDescription":"Non-recursive keybinding overrides to use for Visual mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.commandLineModeKeyBindings":{"type":"array","markdownDescription":"Remapped keys in command line mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.commandLineModeKeyBindingsNonRecursive":{"type":"array","markdownDescription":"Non-recursive keybinding overrides to use for command line mode. Allows mapping to Vim commands or VS Code actions. See [README](https://github.com/VSCodeVim/Vim/#key-remapping) for details.","scope":"application"},"vim.textwidth":{"type":"number","markdownDescription":"Width to word-wrap to when using `gq`.","default":80,"minimum":1},"vim.timeout":{"type":"number","description":"Timeout in milliseconds for remapped commands.","default":1000,"minimum":0},"vim.maxmapdepth":{"type":"number","description":"Maximum number of times a mapping is done without resulting in a character to be used.","default":1000,"minimum":0},"vim.scroll":{"type":"number","markdownDescription":"Number of lines to scroll with `Ctrl-U` and `Ctrl-D` commands. Set to 0 to use a half page scroll.","default":0,"minimum":0},"vim.showcmd":{"type":"boolean","description":"Show the text of any command you are in the middle of writing.","default":true},"vim.showmodename":{"type":"boolean","description":"Show the name of the current mode in the statusbar.","default":true},"vim.iskeyword":{"type":"string","markdownDescription":"Keywords contain alphanumeric characters and \'_\'. If not configured, `#editor.wordSeparators#` is used."},"vim.ignorecase":{"type":"boolean","description":"Ignore case in search patterns.","default":true},"vim.smartcase":{"type":"boolean","markdownDescription":"Override the `ignorecase` option if the search pattern contains upper case characters.","default":true},"vim.matchpairs":{"type":"string","markdownDescription":"Characters that form pairs. The % command jumps from one to the other. Only character pairs are allowed that are different, thus you cannot jump between two double quotes. The characters must be separated by a colon. The pairs must be separated by a comma.","default":"(:),{:},[:]"},"vim.camelCaseMotion.enable":{"type":"boolean","markdownDescription":"Enable the [CamelCaseMotion](https://github.com/bkad/CamelCaseMotion) plugin for Vim.","default":false},"vim.easymotion":{"type":"boolean","markdownDescription":"Enable the [EasyMotion](https://github.com/easymotion/vim-easymotion) plugin for Vim.","default":false},"vim.easymotionMarkerBackgroundColor":{"type":"string","default":"#0000","description":"Set a custom background color for EasyMotion markers."},"vim.easymotionMarkerForegroundColorOneChar":{"type":"string","default":"#ff0000","description":"Set a custom color for the text on one character long markers."},"vim.easymotionMarkerForegroundColorTwoChar":{"type":"string","description":"Set a custom color for the text on two character long markers.","markdownDeprecationMessage":"**Deprecated**: Please don\'t use this setting, use `#vim.easymotionMarkerForegroundColorTwoCharFirst#` and `#vim.easymotionMarkerForegroundColorTwoCharSecond#` instead.","deprecationMessage":"Deprecated: Please don\'t use this setting, use `#vim.easymotionMarkerForegroundColorTwoCharFirst#` and `#vim.easymotionMarkerForegroundColorTwoCharSecond#` instead."},"vim.easymotionMarkerForegroundColorTwoCharFirst":{"type":"string","default":"#ffb400","description":"Set a custom color for the first character on two character long markers."},"vim.easymotionMarkerForegroundColorTwoCharSecond":{"type":"string","default":"#b98300","description":"Set a custom color for the second character on two character long markers."},"vim.easymotionIncSearchForegroundColor":{"type":"string","default":"#7fbf00","markdownDescription":"Set a custom color for the easymotion search n-character (default `<leader><leader>/`)."},"vim.easymotionDimColor":{"type":"string","default":"#777777","markdownDescription":"Set a custom color for the easymotion dimmed characters when `#vim.easymotionDimBackground#` is set to true."},"vim.easymotionMarkerWidthPerChar":{"type":"number","description":"Set the width (in pixels) allocated to each character in the match.","default":8,"minimum":1,"markdownDeprecationMessage":"**Deprecated**: Please don\'t use this setting; the extension now lets vscode calculate the correct width.","deprecationMessage":"Deprecated: Please don\'t use this setting; the extension now lets vscode calculate the correct width."},"vim.easymotionDimBackground":{"type":"boolean","description":"Whether to dim other text while markers are visible.","default":true},"vim.easymotionMarkerFontFamily":{"type":"string","description":"Set the font family of the marker text.","default":"","markdownDeprecationMessage":"**Deprecated**: Please don\'t use this setting; the extension now uses `#editor.fontFamily#` instead.","deprecationMessage":"Deprecated: Please don\'t use this setting; the extension now uses editor.fontFamily instead."},"vim.easymotionMarkerFontSize":{"type":"string","description":"Set the font size of the marker text.","default":"","markdownDeprecationMessage":"**Deprecated**: Please don\'t use this setting; the extension now uses `#editor.fontSize#` instead.","deprecationMessage":"Deprecated: Please don\'t use this setting; the extension now uses editor.fontSize instead."},"vim.easymotionMarkerFontWeight":{"type":"string","description":"Set the font weight of the marker text.","default":"bold"},"vim.easymotionMarkerMargin":{"type":"number","description":"Set the margin around each marker, in pixels.","default":0,"markdownDeprecationMessage":"**Deprecated**: Please don\'t use this setting, it is no longer required.","deprecationMessage":"Deprecated: Please don\'t use this setting, it is no longer required."},"vim.easymotionKeys":{"type":"string","description":"Set the characters used for jump marker name.","default":"hklyuiopnm,qwertzxcvbasdgjf;"},"vim.easymotionJumpToAnywhereRegex":{"type":"string","description":"Regex matches for JumpToAnywhere motion.","default":"\\\\b[A-Za-z0-9]|[A-Za-z0-9]\\\\b|_.|#.|[a-z][A-Z]"},"vim.replaceWithRegister":{"type":"boolean","markdownDescription":"Enable the [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister) plugin for Vim.","default":false},"vim.smartRelativeLine":{"type":"boolean","markdownDescription":"`#editor.lineNumbers#` is determined by the active Vim mode, absolute when in insert mode, relative otherwise.","default":false},"vim.sneak":{"type":"boolean","markdownDescription":"Enable the [Sneak](https://github.com/justinmk/vim-sneak) plugin for Vim.","default":false},"vim.sneakUseIgnorecaseAndSmartcase":{"type":"boolean","markdownDescription":"Case sensitivity is determined by `#vim.ignorecase#` and `#vim.smartcase#`.","default":false},"vim.sneakReplacesF":{"type":"boolean","markdownDescription":"Use single-character [Sneak](https://github.com/justinmk/vim-sneak) instead of Vim\'s native `f`.","default":false},"vim.surround":{"type":"boolean","markdownDescription":"Enable the [Surround](https://github.com/tpope/vim-surround) plugin for Vim.","default":true},"vim.argumentObjectSeparators":{"type":"array","items":{"type":"string"},"markdownDescription":"Set separators for the argument text object.","default":[","]},"vim.argumentObjectOpeningDelimiters":{"type":"array","items":{"type":"string"},"markdownDescription":"Set opening delimiters for the argument text object.","default":["(","["]},"vim.argumentObjectClosingDelimiters":{"type":"array","items":{"type":"string"},"markdownDescription":"Set closing delimiters for the argument text object.","default":[")","]"]},"vim.hlsearch":{"type":"boolean","description":"Show all matches of the most recent search pattern.","default":false},"vim.inccommand":{"type":"string","markdownDescription":"Show the effects of the `:substitute` command as you type.","default":"replace","enum":["","append","replace"],"enumDescriptions":["Don\'t show substitutions","Show substitutions after matched text","Replace matched text with substitutions"]},"vim.incsearch":{"type":"boolean","markdownDescription":"Show where a `/` or `?` search matches as you type it.","default":true},"vim.history":{"type":"number","description":"How much search or command history should be remembered.","default":50,"minimum":1},"vim.autoindent":{"type":"boolean","description":"Indent code automatically.","default":true},"vim.joinspaces":{"type":"boolean","description":"Add two spaces after \'.\', \'?\', and \'!\' when joining or reformatting.","default":true},"vim.startInInsertMode":{"type":"boolean","description":"Start in Insert mode."},"vim.handleKeys":{"type":"object","description":"Delegate certain key combinations back to VSCode to be handled natively.","default":{"<C-d>":true}},"vim.statusBarColorControl":{"type":"boolean","markdownDescription":"Allow VSCodeVim to change status bar color based on mode. **NOTE:** Using this feature will have a negative impact on performance.","default":false},"vim.statusBarColors.normal":{"type":["string","array"],"description":"Status bar color when in Normal mode.","default":"#005f5f"},"vim.statusBarColors.insert":{"type":["string","array"],"description":"Status bar color when in Insert mode.","default":"#5f0000"},"vim.statusBarColors.visual":{"type":["string","array"],"description":"Status bar color when in Visual mode.","default":"#5f00af"},"vim.statusBarColors.visualline":{"type":["string","array"],"description":"Status bar color when in VisualLine mode.","default":"#005f5f"},"vim.statusBarColors.visualblock":{"type":["string","array"],"description":"Status bar color when in VisualBlock mode.","default":"#86592d"},"vim.statusBarColors.replace":{"type":["string","array"],"description":"Status bar color when in Replace mode.","default":"#00000"},"vim.statusBarColors.commandlineinprogress":{"type":["string","array"],"description":"Status bar color when in CommandLineInProgress mode.","default":"#007acc"},"vim.statusBarColors.searchinprogressmode":{"type":["string","array"],"description":"Status bar color when in SearchInProgress mode.","default":"#007acc"},"vim.statusBarColors.easymotionmode":{"type":["string","array"],"description":"Status bar color when in EasyMotion mode.","default":"#007acc"},"vim.statusBarColors.easymotioninputmode":{"type":["string","array"],"description":"Status bar color when in EasyMotionInput mode.","default":"#007acc"},"vim.statusBarColors.surroundinputmode":{"type":["string","array"],"description":"Status bar color when in SurroundInput mode.","default":"#007acc"},"vim.visualstar":{"type":"boolean","markdownDescription":"In Visual mode, start a search with `*` or `#` using the current selection.","default":false},"vim.changeWordIncludesWhitespace":{"type":"boolean","description":"Includes trailing whitespace when changing word.","default":false},"vim.foldfix":{"type":"boolean","description":"Uses a hack to move around folds properly.","default":false},"vim.mouseSelectionGoesIntoVisualMode":{"type":"boolean","description":"If enabled, dragging with the mouse activates Visual mode.","default":true},"vim.disableExtension":{"type":"boolean","description":"Disables the VSCodeVim extension. The extension will continue to be loaded and activated, but Vim functionality will be disabled.","default":false},"vim.enableNeovim":{"type":"boolean","markdownDescription":"Use Neovim to execute Ex commands. You should restart VS Code after enabling/disabling this for the changes to take effect. **NOTE:** Neovim version 0.2.0 or greater must be installed, and if the executable is not on your PATH, `#vim.neovimPath#` must be set.","default":false},"vim.neovimPath":{"type":"string","markdownDescription":"Path to Neovim executable. For example, `/usr/bin/nvim`, or `C:\\\\Program Files\\\\Neovim\\\\bin\\\\nvim.exe`.","default":"","scope":"machine"},"vim.neovimUseConfigFile":{"type":"boolean","markdownDescription":"Use a config file for Neovim, specified by `vim.neovimConfigPath`.","default":false},"vim.neovimConfigPath":{"type":"string","markdownDescription":"Path to Neovim configuration file. `vim.neovimUseConfigFile` must be enabled. If path is left blank, Neovim will use its default config path, i.e. `~/.config/nvim/init.vim` or \'C:\\\\Users\\\\USERNAME\\\\AppData\\\\Local\\\\nvim\\\\init.vim\'.","default":"","scope":"machine"},"vim.vimrc.enable":{"type":"boolean","markdownDescription":"Use key mappings from a `.vimrc` file.","default":false},"vim.vimrc.path":{"type":"string","markdownDescription":"Path to a Vim configuration file. If unset, it will check for `$HOME/.vimrc`, `$HOME/_vimrc`, and `$HOME/.config/nvim/init.vim`, in that order."},"vim.substituteGlobalFlag":{"type":"boolean","markdownDescription":"Automatically apply the global flag, `/g`, to substitute commands. When set to true, use `/g` to mean only first match should be replaced.","default":false,"markdownDeprecationMessage":"**Deprecated**: Please use `#vim.gdefault#` instead.","deprecationMessage":"Deprecated: Please use vim.gdefault instead."},"vim.gdefault":{"type":"boolean","markdownDescription":"Automatically apply the global flag, `/g`, to substitute commands. When set to true, use `/g` to mean only first match should be replaced.","default":false},"vim.cursorStylePerMode.normal":{"type":"string","description":"Cursor style for Normal mode.","enum":["","block","block-outline","line","line-thin","underline","underline-thin"]},"vim.cursorStylePerMode.insert":{"type":"string","description":"Cursor style for Insert mode.","enum":["","block","block-outline","line","line-thin","underline","underline-thin"]},"vim.cursorStylePerMode.replace":{"type":"string","description":"Cursor style for Replace mode.","enum":["","block","block-outline","line","line-thin","underline","underline-thin"]},"vim.cursorStylePerMode.visual":{"type":"string","description":"Cursor style for Visual mode.","enum":["","block","block-outline","line","line-thin","underline","underline-thin"]},"vim.cursorStylePerMode.visualline":{"type":"string","description":"Cursor style for VisualLine mode.","enum":["","block","block-outline","line","line-thin","underline","underline-thin"]},"vim.cursorStylePerMode.visualblock":{"type":"string","description":"Cursor style for VisualBlock mode.","enum":["","block","block-outline","line","line-thin","underline","underline-thin"]},"vim.autoSwitchInputMethod.enable":{"type":"boolean","description":"If enabled, the input method switches automatically when the mode changes.","default":false},"vim.autoSwitchInputMethod.defaultIM":{"type":"string","markdownDescription":"The input method for your normal mode, find more information [here](https://github.com/VSCodeVim/Vim#input-method).","default":""},"vim.autoSwitchInputMethod.switchIMCmd":{"type":"string","description":"The shell command to switch input method.","default":"/path/to/im-select {im}"},"vim.autoSwitchInputMethod.obtainIMCmd":{"type":"string","description":"The shell command to get current input method.","default":"/path/to/im-select"},"vim.whichwrap":{"type":"string","description":"Comma-separated list of motion keys that should wrap to next/previous line.","default":"b,s"},"vim.report":{"type":"number","description":"Threshold for reporting number of lines changed.","default":2,"minimum":1},"vim.digraphs":{"type":"object","description":"Custom digraph shortcuts for inserting special characters, expressed as UTF16 code points.","default":{}},"vim.wrapscan":{"type":"boolean","description":"Searches wrap around the end of the file.","default":true},"vim.startofline":{"type":"boolean","markdownDescription":"When `true` the commands listed below move the cursor to the first non-blank of the line. When `false` the cursor is kept in the same column (if possible). This applies to the commands: `<C-d>`, `<C-u>`, `<C-b>`, `<C-f>`, `G`, `H`, `M`, `L`, `gg`, and to the commands `d`, `<<` and `>>` with a linewise operator.","default":true},"vim.showMarksInGutter":{"type":"boolean","description":"Show the currently set mark(s) in the gutter.","default":false},"vim.shell":{"type":"string","description":"Path to the shell to use for `!` and `:!` commands.","default":""}}},"languages":[{"id":"vimrc","extensions":[".vimrc"],"configuration":"./language-configuration.json"}],"grammars":[{"language":"vimrc","scopeName":"source.vimrc","path":"./syntaxes/vimrc.tmLanguage.json"}]},"scripts":{"vscode:prepublish":"gulp build","build":"gulp build","test":"node ./out/test/runTest.js","forceprettier":"gulp forceprettier"},"dependencies":{"diff-match-patch":"1.0.5","lodash":"^4.17.21","neovim":"4.10.1","os-browserify":"0.3.0","parsimmon":"^1.18.0","path-browserify":"1.0.1","process":"0.11.10","queue":"^6.0.2","source-map-support":"0.5.21","untildify":"4.0.0","util":"0.12.4","winston":"3.6.0","winston-console-for-electron":"0.0.6","winston-transport":"4.5.0"},"devDependencies":{"@types/diff":"5.0.2","@types/diff-match-patch":"1.0.32","@types/glob":"7.2.0","@types/lodash":"4.14.178","@types/mocha":"9.1.0","@types/node":"14.18.12","@types/parsimmon":"1.10.6","@types/sinon":"10.0.11","@types/source-map-support":"0.5.4","@types/vscode":"1.57.0","@vscode/test-electron":"2.1.2","clean-webpack-plugin":"4.0.0","event-stream":"4.0.1","fork-ts-checker-webpack-plugin":"7.2.1","gulp":"4.0.2","gulp-bump":"3.2.0","gulp-git":"2.10.1","gulp-sourcemaps":"3.0.0","gulp-tag-version":"1.3.1","gulp-tslint":"8.1.4","gulp-typescript":"5.0.1","minimist":"1.2.5","mocha":"9.2.0","plugin-error":"1.0.1","prettier":"2.5.1","sinon":"13.0.1","ts-loader":"9.2.6","tslint":"6.1.3","typescript":"4.5.5","vsce":"2.6.7","webpack":"5.69.1","webpack-cli":"4.9.2","webpack-merge":"5.8.0","webpack-stream":"7.0.0"}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.activate=void 0,r("./src/actions/include-main.ts"),r("./src/configuration/validators/inputMethodSwitcherValidator.ts"),r("./src/configuration/validators/remappingValidator.ts");const t=r("./extensionBase.ts");r("./node_modules/setimmediate/setImmediate.js"),e.activate=async function(e){(0,t.activate)(e,!1)}})(),n})()}));
|
||
//# sourceMappingURL=extensionWeb.js.map
|